forked from MapComplete/MapComplete
		
	Refactoring: more css cleanup
This commit is contained in:
		
							parent
							
								
									4548689a28
								
							
						
					
					
						commit
						59544ec073
					
				
					 8 changed files with 13 additions and 53 deletions
				
			
		|  | @ -632,6 +632,7 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> { | ||||||
|             const trc: TagRenderingConfigJson = { |             const trc: TagRenderingConfigJson = { | ||||||
|                 id: "all-tags", |                 id: "all-tags", | ||||||
|                 render: { "*": "{all_tags()}" }, |                 render: { "*": "{all_tags()}" }, | ||||||
|  | 
 | ||||||
|                 metacondition: { |                 metacondition: { | ||||||
|                     or: [ |                     or: [ | ||||||
|                         "__featureSwitchIsTesting=true", |                         "__featureSwitchIsTesting=true", | ||||||
|  |  | ||||||
|  | @ -6,8 +6,8 @@ | ||||||
|   export let src: string; |   export let src: string; | ||||||
|   let htmlElem: HTMLElement; |   let htmlElem: HTMLElement; | ||||||
|   $: { |   $: { | ||||||
|     if(htmlElem){ |     if (htmlElem) { | ||||||
|     htmlElem.innerHTML = src |       htmlElem.innerHTML = src; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -14,6 +14,7 @@ export default abstract class BaseUIElement { | ||||||
| 
 | 
 | ||||||
|     public onClick(f: () => void) { |     public onClick(f: () => void) { | ||||||
|         this._onClick = f |         this._onClick = f | ||||||
|  |         this.SetClass("cursor-pointer") | ||||||
|         if (this._constructedHtmlElement !== undefined) { |         if (this._constructedHtmlElement !== undefined) { | ||||||
|             this._constructedHtmlElement.onclick = f |             this._constructedHtmlElement.onclick = f | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  | @ -16,9 +16,9 @@ | ||||||
|   export let wikipediaDetails: Store<FullWikipediaDetails>; |   export let wikipediaDetails: Store<FullWikipediaDetails>; | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <a href={$wikipediaDetails.articleUrl} target="_blank" rel="noreferrer" class="flex"> | <a class="flex" href={$wikipediaDetails.articleUrl} rel="noreferrer" target="_blank"> | ||||||
|   <img src="./assets/svg/wikipedia.svg" class="w-6 h-6"/> |   <img class="w-6 h-6" src="./assets/svg/wikipedia.svg" /> | ||||||
|   <Tr t={Translations.t.general.wikipedia.fromWikipedia}/> |   <Tr t={Translations.t.general.wikipedia.fromWikipedia} /> | ||||||
| </a> | </a> | ||||||
| 
 | 
 | ||||||
| {#if $wikipediaDetails.wikidata} | {#if $wikipediaDetails.wikidata} | ||||||
|  | @ -26,15 +26,16 @@ | ||||||
| {/if} | {/if} | ||||||
| 
 | 
 | ||||||
| {#if $wikipediaDetails.firstParagraph === "" || $wikipediaDetails.firstParagraph === undefined} | {#if $wikipediaDetails.firstParagraph === "" || $wikipediaDetails.firstParagraph === undefined} | ||||||
|   <Loading > |   <Loading> | ||||||
|     <Tr t={Translations.t.general.wikipedia.loading}/> |     <Tr t={Translations.t.general.wikipedia.loading} /> | ||||||
|   </Loading> |   </Loading> | ||||||
| {:else} | {:else} | ||||||
|  |   <span class="wikipedia-article"> | ||||||
|   <FromHtml src={$wikipediaDetails.firstParagraph} /> |   <FromHtml src={$wikipediaDetails.firstParagraph} /> | ||||||
|   <Disclosure let:open> |   <Disclosure let:open> | ||||||
|     <DisclosureButton> |     <DisclosureButton> | ||||||
|       <span class="flex"> |       <span class="flex"> | ||||||
|       <ChevronRightIcon class="w-6 h-6" style={open ? "transform: rotate(90deg);" : ""} /> |       <ChevronRightIcon style={(open ? "transform: rotate(90deg); " : "") +"  transition: all .25s linear; width: 1.5rem; height: 1.5rem"} /> | ||||||
|       Read the rest of the article |       Read the rest of the article | ||||||
|          |          | ||||||
|       </span> |       </span> | ||||||
|  | @ -43,4 +44,5 @@ | ||||||
|       <FromHtml src={$wikipediaDetails.restOfArticle} /> |       <FromHtml src={$wikipediaDetails.restOfArticle} /> | ||||||
|     </DisclosurePanel> |     </DisclosurePanel> | ||||||
|   </Disclosure> |   </Disclosure> | ||||||
|  |   </span> | ||||||
| {/if} | {/if} | ||||||
|  |  | ||||||
|  | @ -36,10 +36,7 @@ | ||||||
|     max-width: 100%; |     max-width: 100%; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .question-subtext { | 
 | ||||||
|     font-size: medium; |  | ||||||
|     font-weight: normal; |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| .question-option-with-border { | .question-option-with-border { | ||||||
|     border: 2px solid lightgray; |     border: 2px solid lightgray; | ||||||
|  |  | ||||||
|  | @ -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; |  | ||||||
| } |  | ||||||
|  | @ -4,7 +4,6 @@ | ||||||
|     <meta charset="UTF-8"> |     <meta charset="UTF-8"> | ||||||
|     <meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport"> |     <meta content="width=device-width, initial-scale=1.0, user-scalable=no" name="viewport"> | ||||||
|     <link href="./vendor/leaflet.css" rel="stylesheet"/> |     <link href="./vendor/leaflet.css" rel="stylesheet"/> | ||||||
|     <link href="./css/userbadge.css" rel="stylesheet"/> |  | ||||||
|     <link href="./css/tabbedComponent.css" rel="stylesheet"/> |     <link href="./css/tabbedComponent.css" rel="stylesheet"/> | ||||||
|     <link href="./css/mobile.css" rel="stylesheet"/> |     <link href="./css/mobile.css" rel="stylesheet"/> | ||||||
|     <link href="./css/openinghourstable.css" rel="stylesheet"/> |     <link href="./css/openinghourstable.css" rel="stylesheet"/> | ||||||
|  |  | ||||||
|  | @ -4,7 +4,6 @@ | ||||||
|     <title>Small tests</title> |     <title>Small tests</title> | ||||||
|     <link href="index.css" rel="stylesheet"/> |     <link href="index.css" rel="stylesheet"/> | ||||||
|     <link href="./index.css" rel="stylesheet"/> |     <link href="./index.css" rel="stylesheet"/> | ||||||
|     <link href="./css/userbadge.css" rel="stylesheet"/> |  | ||||||
|     <link href="./css/tabbedComponent.css" rel="stylesheet"/> |     <link href="./css/tabbedComponent.css" rel="stylesheet"/> | ||||||
|     <link href="./css/mobile.css" rel="stylesheet"/> |     <link href="./css/mobile.css" rel="stylesheet"/> | ||||||
|     <link href="./css/openinghourstable.css" rel="stylesheet"/> |     <link href="./css/openinghourstable.css" rel="stylesheet"/> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue