From 59544ec073ae9631ba00c97c5f5ee63fffa2c49b Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 21 Apr 2023 18:09:14 +0200 Subject: [PATCH] Refactoring: more css cleanup --- Models/ThemeConfig/Conversion/PrepareLayer.ts | 1 + UI/Base/FromHtml.svelte | 4 +- UI/BaseUIElement.ts | 1 + UI/Wikipedia/WikipediaArticle.svelte | 14 ++++--- css/tagrendering.css | 5 +-- css/userbadge.css | 39 ------------------- index.html | 1 - test.html | 1 - 8 files changed, 13 insertions(+), 53 deletions(-) delete mode 100644 css/userbadge.css diff --git a/Models/ThemeConfig/Conversion/PrepareLayer.ts b/Models/ThemeConfig/Conversion/PrepareLayer.ts index 19c1d380b..fbb69c35c 100644 --- a/Models/ThemeConfig/Conversion/PrepareLayer.ts +++ b/Models/ThemeConfig/Conversion/PrepareLayer.ts @@ -632,6 +632,7 @@ export class AddEditingElements extends DesugaringStep { const trc: TagRenderingConfigJson = { id: "all-tags", render: { "*": "{all_tags()}" }, + metacondition: { or: [ "__featureSwitchIsTesting=true", diff --git a/UI/Base/FromHtml.svelte b/UI/Base/FromHtml.svelte index 5202cbf87..f947b9de3 100644 --- a/UI/Base/FromHtml.svelte +++ b/UI/Base/FromHtml.svelte @@ -6,8 +6,8 @@ export let src: string; let htmlElem: HTMLElement; $: { - if(htmlElem){ - htmlElem.innerHTML = src + if (htmlElem) { + htmlElem.innerHTML = src; } } diff --git a/UI/BaseUIElement.ts b/UI/BaseUIElement.ts index 37d651c30..94a976476 100644 --- a/UI/BaseUIElement.ts +++ b/UI/BaseUIElement.ts @@ -14,6 +14,7 @@ export default abstract class BaseUIElement { public onClick(f: () => void) { this._onClick = f + this.SetClass("cursor-pointer") if (this._constructedHtmlElement !== undefined) { this._constructedHtmlElement.onclick = f } diff --git a/UI/Wikipedia/WikipediaArticle.svelte b/UI/Wikipedia/WikipediaArticle.svelte index e7067b4b8..cea30593c 100644 --- a/UI/Wikipedia/WikipediaArticle.svelte +++ b/UI/Wikipedia/WikipediaArticle.svelte @@ -16,9 +16,9 @@ export let wikipediaDetails: Store; - - - + + + {#if $wikipediaDetails.wikidata} @@ -26,15 +26,16 @@ {/if} {#if $wikipediaDetails.firstParagraph === "" || $wikipediaDetails.firstParagraph === undefined} - - + + {:else} + - + Read the rest of the article @@ -43,4 +44,5 @@ + {/if} diff --git a/css/tagrendering.css b/css/tagrendering.css index 417c4c62f..09634d2e9 100644 --- a/css/tagrendering.css +++ b/css/tagrendering.css @@ -36,10 +36,7 @@ max-width: 100%; } -.question-subtext { - font-size: medium; - font-weight: normal; -} + .question-option-with-border { border: 2px solid lightgray; diff --git a/css/userbadge.css b/css/userbadge.css deleted file mode 100644 index 3b272cc48..000000000 --- a/css/userbadge.css +++ /dev/null @@ -1,39 +0,0 @@ - -.userstats { - display: flex; - align-items: center; - margin-top: 0.2em; - margin-bottom: 0.2em; -} - -.userstats a { - display: block ruby; - padding-right: 0.2em; - margin-bottom: 0.2em; -} - -.userstats span { - display: block ruby; - padding-right: 0.2em; - margin-bottom: 0.2em; -} - -.userstats svg { - width: 1em; - height: 1em; - border-radius: 0; - display: block; -} - -.userstats img { - width: 1em; - height: 1em; - border-radius: 0; - display: block; -} - -.userbadge-login { - background-color: var(--subtle-detail-color) !important; - color: var(--subtle-detail-color-contrast); - height: 3em; -} diff --git a/index.html b/index.html index e2e555346..6cc4bd75c 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,6 @@ - diff --git a/test.html b/test.html index a84eca7e2..2a5d2478c 100644 --- a/test.html +++ b/test.html @@ -4,7 +4,6 @@ Small tests -