Difference between revisions of "Template:Ribbon2/test"

From Geohashing
(default seems to work)
 
(Honestly I didn't expect this trick to work)
Line 5: Line 5:
 
}
 
}
 
.ribbon2 {
 
.ribbon2 {
  display: inline-grid;
 
 
   padding: 5px 5px 5px 0;
 
   padding: 5px 5px 5px 0;
 
   margin: 2px 0;
 
   margin: 2px 0;
Line 11: Line 10:
 
   border: 1px solid lightgray;
 
   border: 1px solid lightgray;
 
   border-left: 5px solid #bada55;
 
   border-left: 5px solid #bada55;
 +
  align-items: center;
 +
}
 +
 +
.ribbon2-grid {
 +
  display: grid;
 
   grid-template-areas:  
 
   grid-template-areas:  
 
       "icon achv imag xtra"
 
       "icon achv imag xtra"
 
       "icon actn imag xtra";
 
       "icon actn imag xtra";
 
   grid-template-columns: min-content auto min-content min-content;
 
   grid-template-columns: min-content auto min-content min-content;
  align-items: center;
 
 
}
 
}
 +
 +
.ribbon2-flex {
 +
  display:flex;
 +
}
 +
 
.ribbon2 > * {
 
.ribbon2 > * {
 
   margin: 0 5px;
 
   margin: 0 5px;
Line 27: Line 35:
 
   font-weight: bold;
 
   font-weight: bold;
 
}
 
}
.ribbon2-actn {
+
.ribbon2-grid .ribbon2-actn {
 
   grid-area: actn;
 
   grid-area: actn;
 
   padding-left: 1em;
 
   padding-left: 1em;
Line 68: Line 76:
 
}
 
}
  
}}{{#switch:{{#var:ribbontheme}}
+
}}{{Ribbon2/{{#switch:{{#var:ribbontheme}}|mini=mini|micro=micro|#default=default}}
| mini = {{Ribbon2/mini}}
+
|color={{{color|#bada55}}}
| micro = {{Ribbon2/micro}}
+
|icon={{{icon|landgeohash.png}}}
| #default = {{Ribbon2/default}}
+
|achievement={{{achievement}}}
 +
|action={{{action}}}
 +
|expedition={{{expedition}}}
 
}}<noinclude>
 
}}<noinclude>
  
Line 81: Line 91:
 
{{#vardefine:ribbontheme|mini}}
 
{{#vardefine:ribbontheme|mini}}
 
{{Ribbon2/test|action={{Lipsum}}}}
 
{{Ribbon2/test|action={{Lipsum}}}}
 +
{{#vardefine:ribbontheme|micro}}
 +
{{Ribbon2/test|achievement=foo|expedition=bar}}
  
 
== TODO ==
 
== TODO ==
  
* Handle long actions in mini and micro themes
+
* <s>Handle long actions in mini and micro themes</s>
* Split themes into their own templates?
+
* <s>Split themes into their own templates?</s>
  
  
 
</noinclude>
 
</noinclude>

Revision as of 15:05, 19 September 2020

Landgeohash.png
{{{achievement}}}
{{{action}}}

Tests

Landgeohash.png
{{{achievement}}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Landgeohash.png
{{{achievement}}}
{{{action}}}


Landgeohash.png
{{{achievement}}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Landgeohash.png
foo:
bar

TODO

  • Handle long actions in mini and micro themes
  • Split themes into their own templates?