Remove a few empty spaces and line breaks

Most it is done by my editor automatically.
This commit is contained in:
Tobias 2021-01-17 21:04:37 +01:00
parent 4aebf05918
commit c2ee058682
8 changed files with 19 additions and 24 deletions

View file

@ -12,5 +12,4 @@ export class FixedUiElement extends UIElement {
return this._html; return this._html;
} }
} }

View file

@ -14,7 +14,7 @@ export class SubtleButton extends UIElement{
this.linkTo = linkTo; this.linkTo = linkTo;
this.message = Translations.W(message); this.message = Translations.W(message);
if(this.message !== null){ if(this.message !== null){
this.message.dumbMode = false; this.message.dumbMode = false;
} }
if ((imageUrl ?? "") === "") { if ((imageUrl ?? "") === "") {
this.image = new FixedUiElement(""); this.image = new FixedUiElement("");
@ -27,7 +27,7 @@ export class SubtleButton extends UIElement{
} }
InnerRender(): string { InnerRender(): string {
if(this.message !== null && this.message.IsEmpty()){ if(this.message !== null && this.message.IsEmpty()){
// Message == null: special case to force empty text // Message == null: special case to force empty text
return ""; return "";
@ -41,7 +41,7 @@ export class SubtleButton extends UIElement{
'</a>' '</a>'
]).Render(); ]).Render();
} }
return new Combine([ return new Combine([
'<span class="subtle-button">', '<span class="subtle-button">',
this.image, this.image,

View file

@ -14,10 +14,10 @@ import LanguagePicker from "../LanguagePicker";
export default class MoreScreen extends UIElement { export default class MoreScreen extends UIElement {
private readonly _onMainScreen: boolean; private readonly _onMainScreen: boolean;
private _component: UIElement; private _component: UIElement;
constructor(onMainScreen: boolean = false) { constructor(onMainScreen: boolean = false) {
super(State.state.locationControl); super(State.state.locationControl);
this._onMainScreen = onMainScreen; this._onMainScreen = onMainScreen;
@ -111,7 +111,7 @@ export default class MoreScreen extends UIElement {
const customThemesNames = State.state.installedThemes.data ?? []; const customThemesNames = State.state.installedThemes.data ?? [];
if (customThemesNames.length > 0) { if (customThemesNames.length > 0) {
els.push(Translations.t.general.customThemeIntro) els.push(Translations.t.general.customThemeIntro)
@ -123,7 +123,7 @@ export default class MoreScreen extends UIElement {
let intro : UIElement= tr.intro; let intro : UIElement= tr.intro;
if(this._onMainScreen){ if(this._onMainScreen){
intro = new Combine([ intro = new Combine([
LanguagePicker.CreateLanguagePicker(Translations.t.general.index.SupportedLanguages()) LanguagePicker.CreateLanguagePicker(Translations.t.general.index.SupportedLanguages())
.SetStyle("position: absolute; right: 1.5em; top: 1.5em;"), .SetStyle("position: absolute; right: 1.5em; top: 1.5em;"),
Translations.t.general.index.SetStyle("margin-top: 2em;display:block; margin-bottom: 1em;") Translations.t.general.index.SetStyle("margin-top: 2em;display:block; margin-bottom: 1em;")

View file

@ -52,15 +52,15 @@ export class DropDown<T> extends InputElement<T> {
if(this._values.length <=1){ if(this._values.length <=1){
return ""; return "";
} }
let options = ""; let options = "";
for (let i = 0; i < this._values.length; i++) { for (let i = 0; i < this._values.length; i++) {
options += "<option value='" + i + "'>" + this._values[i].shown.InnerRender() + "</option>" options += "<option value='" + i + "'>" + this._values[i].shown.InnerRender() + "</option>"
} }
return "<form>" + return "<form>" +
"<label for='dropdown-" + this.id + "'>" + this._label.Render() + " </label>" + "<label for='dropdown-" + this.id + "'>" + this._label.Render() + " </label>" +
"<select name='dropdown-" + this.id + "' id='dropdown-" + this.id + "'>" + "<select name='dropdown-" + this.id + "' id='dropdown-" + this.id + "'>" +
options + options +
"</select>" + "</select>" +
"</form>"; "</form>";

View file

@ -167,8 +167,8 @@
"en": "<h1 class='text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl'><span class='block text-gray-800 xl:inline'>Welcome to</span> <span class='block text-green-600 xl:inline'>MapComplete</span></h1><p class='mt-3 text-base font-semibold text-gray-500 sm:mt-5 sm:text-lg sm:max-w-xl sm:mx-auto md:mt-5 md:text-xl lg:mx-0'>MapComplete is an OpenStreetMap-viewer and editor, which shows you information about a specific theme.</p><p class='mt-3 text-base text-green-600 sm:mt-5 sm:text-lg sm:max-w-xl sm:mx-auto md:mt-5 md:text-xl lg:mx-0'>Pick a theme below to get started.</p>", "en": "<h1 class='text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl'><span class='block text-gray-800 xl:inline'>Welcome to</span> <span class='block text-green-600 xl:inline'>MapComplete</span></h1><p class='mt-3 text-base font-semibold text-gray-500 sm:mt-5 sm:text-lg sm:max-w-xl sm:mx-auto md:mt-5 md:text-xl lg:mx-0'>MapComplete is an OpenStreetMap-viewer and editor, which shows you information about a specific theme.</p><p class='mt-3 text-base text-green-600 sm:mt-5 sm:text-lg sm:max-w-xl sm:mx-auto md:mt-5 md:text-xl lg:mx-0'>Pick a theme below to get started.</p>",
"nl": "<h3>Welkom bij MapComplete</h3> MapComplete is een OpenStreetMap applicatie waar informatie over een specifiek thema bekeken en aangepast kan worden.<br/><br/>Kies hieronder een thema om te beginnen." "nl": "<h3>Welkom bij MapComplete</h3> MapComplete is een OpenStreetMap applicatie waar informatie over een specifiek thema bekeken en aangepast kan worden.<br/><br/>Kies hieronder een thema om te beginnen."
}, },
"loginWithOpenStreetMap": { "loginWithOpenStreetMap": {
"en": "Login with OpenStreetMap", "en": "Login with OpenStreetMap",
"ca": "Entra a OpenStreetMap", "ca": "Entra a OpenStreetMap",
@ -775,7 +775,7 @@
"nl": "Selecteer lagen" "nl": "Selecteer lagen"
} }
}, },
"weekdays": { "weekdays": {
"abbreviations": { "abbreviations": {
"monday": { "monday": {

View file

@ -11,11 +11,11 @@ Contains tweaks for small screens
@media only screen and (max-width: 600px), only screen and (max-height: 600px) { @media only screen and (max-width: 600px), only screen and (max-height: 600px) {
.only-on-mobile { .only-on-mobile {
display: unset !important; display: unset !important;
background-color: var(--background-color); background-color: var(--background-color);
color: var(--foreground-color); color: var(--foreground-color);
} }
.hidden-on-mobile { .hidden-on-mobile {
display: none !important; display: none !important;
} }
@ -39,7 +39,7 @@ Contains tweaks for small screens
#geolocate-button { #geolocate-button {
display: block; display: block;
} }
.leaflet-popup { .leaflet-popup {
/* On mobile, the popups are shown as a full-screen element */ /* On mobile, the popups are shown as a full-screen element */
display: none; display: none;
@ -52,7 +52,7 @@ Contains tweaks for small screens
width: 60%; width: 60%;
} }
.add-popup-all-buttons { .add-popup-all-buttons {
/* Buttons in the 'add new point' have a default of 50vh maxheight which is ugly in the new context*/ /* Buttons in the 'add new point' have a default of 50vh maxheight which is ugly in the new context*/
max-height: unset !important; max-height: unset !important;
@ -60,7 +60,7 @@ Contains tweaks for small screens
#messagesboxmobile { #messagesboxmobile {
display: block; display: block;
position: absolute; position: absolute;
z-index: 10000; z-index: 10000;
width: 100vw; width: 100vw;

View file

@ -387,10 +387,8 @@ a {
background-color: var(--background-color); background-color: var(--background-color);
color: var(--foreground-color); color: var(--foreground-color);
transition: opacity 500ms linear; transition: opacity 500ms linear;
text-align: center; text-align: center;
horiz-align: center; horiz-align: center;
font-weight: bold; font-weight: bold;

View file

@ -150,16 +150,14 @@ function createManifest(layout: LayoutConfig, relativePath: string) {
let icon = layout.icon; let icon = layout.icon;
if (icon.endsWith(".svg") || icon.startsWith("<svg") || icon.startsWith("<?xml")) { if (icon.endsWith(".svg") || icon.startsWith("<svg") || icon.startsWith("<?xml")) {
// This is an svg. Lets create the needed pngs! // This is an svg. Lets create the needed pngs!
let path = layout.icon; let path = layout.icon;
if (layout.icon.startsWith("<")) { if (layout.icon.startsWith("<")) {
// THis is already the svg // THis is already the svg
path = "./assets/generated/" + layout.id + "_logo.svg" path = "./assets/generated/" + layout.id + "_logo.svg"
writeFileSync(path, layout.icon) writeFileSync(path, layout.icon)
} }
const sizes = [72, 96, 120, 128, 144, 152, 180, 192, 384, 512]; const sizes = [72, 96, 120, 128, 144, 152, 180, 192, 384, 512];
for (const size of sizes) { for (const size of sizes) {
const name = createIcon(path, size, layout); const name = createIcon(path, size, layout);