Template:Button: Difference between revisions
Malcolmmcc (talk | contribs) No edit summary |
Malcolmmcc (talk | contribs) No edit summary |
||
(14 intermediate revisions by the same user not shown) | |||
Line 24: | Line 24: | ||
Default the link is presumed to be external (meaning a page not on the wiki). 5 is therefore not necessary for this.<br> | Default the link is presumed to be external (meaning a page not on the wiki). 5 is therefore not necessary for this.<br> | ||
<code><nowiki> | <code><nowiki> | ||
{{Button| | {{Button|...}}</nowiki></code> | ||
{{Button|1=http://mcgilleus.ca|2=External Link|3=fas fa-external-link|4=#395C6B}} | {{Button|1=http://mcgilleus.ca|2=External Link|3=fas fa-external-link|4=#395C6B}} | ||
{{col-break}} | {{col-break}} | ||
If you want it to got to a page on the wiki, ''you must specify that <code>5=internal</code>''.<br> | If you want it to got to a page on the wiki, ''you must specify that <code>5=internal</code>''.<br> | ||
<code><nowiki> | <code><nowiki> | ||
{{Button| | {{Button|...|5=internal}}</nowiki></code> | ||
{{Button|1=Launchpad|2=Internal Article|3=far fa-file|4=#395C6B|5=internal}} | {{Button|1=Launchpad|2=Internal Article|3=far fa-file|4=#395C6B|5=internal}} | ||
{{col-end}} | {{col-end}} | ||
Line 35: | Line 35: | ||
If you'd like to change the link color, using either words, hex, or rgba(), set ''<code>6=color of choice</code>''.<br> | If you'd like to change the link color, using either words, hex, or rgba(), set ''<code>6=color of choice</code>''.<br> | ||
<code><nowiki> | <code><nowiki> | ||
{{Button| | {{Button|...|6=Crimson}}</nowiki></code> | ||
{{Button|1=http://mcgilleus.ca|2=Text color|3=fas fa-i-cursor|4=#E6E1C5|6=Crimson}} | {{Button|1=http://mcgilleus.ca|2=Text color|3=fas fa-i-cursor|4=#E6E1C5|6=Crimson}} | ||
Default the text is white, 6= is not necessary for this case. | Default the text is white, 6= is not necessary for this case. | ||
Line 42: | Line 42: | ||
If you want the button to float to the right of the page, use <code>7=right</code>. <br> | If you want the button to float to the right of the page, use <code>7=right</code>. <br> | ||
<code><nowiki> | <code><nowiki> | ||
{{Button| | {{Button|...|7=right}}</nowiki></code> | ||
{{Button|1=http://mcgilleus.ca|2=Float right|3=fas fa-indent|4=#3B252C|7=right}} | {{Button|1=http://mcgilleus.ca|2=Float right|3=fas fa-indent|4=#3B252C|7=right}} | ||
Additionally, if you want it to float=left (meaning that all other objects, headers included, will stay to the right of the block), you can specity <code>7=left</code>. | Additionally, if you want it to float=left (meaning that all other objects, headers included, will stay to the right of the block), you can specity <code>7=left</code>. | ||
Line 48: | Line 48: | ||
You can make the button teeny, <code>8=small</code>.<br> | You can make the button teeny, <code>8=small</code>.<br> | ||
<code><nowiki> | <code><nowiki> | ||
{{Button| | {{Button|...|8=small}}</nowiki></code> | ||
{{Button|1=http://mcgilleus.ca|2=Smol|3=fas fa-compress-alt|4=#8F6593|8=small}} | {{Button|1=http://mcgilleus.ca|2=Smol|3=fas fa-compress-alt|4=#8F6593|8=small}} | ||
==9 Icon placement== | ==9 Icon placement== | ||
The icon can be on the right side as well.<br> | The icon can be on the right side as well.<br> | ||
<code><nowiki> | <code><nowiki> | ||
{{Button| | {{Button|...|9=iright}}</nowiki></code> | ||
{{Button|1=http://mcgilleus.ca|2=Right Icon|3=fas fa-fast-forward|4=#3F7CAC|9=iright}} | {{Button|1=http://mcgilleus.ca|2=Right Icon|3=fas fa-fast-forward|4=#3F7CAC|9=iright}} | ||
</noinclude> | </noinclude> | ||
<includeonly><div class="no-link" style=" | <includeonly><div class="no-link" id="butt" style=" | ||
display: inline-block; | display: inline-block; | ||
text-decoration:none; | text-decoration:none; | ||
margin: 0px 8px; | margin: 0px 8px 5px 8px; | ||
border-radius:inherit; | |||
background-color: {{{4}}}; | background-color: {{{4}}}; | ||
border: none; | border: none; | ||
Line 66: | Line 67: | ||
text-decoration: none; | text-decoration: none; | ||
font-size: {{#ifeq: {{{8|}}}|small|14px|16px}}; | font-size: {{#ifeq: {{{8|}}}|small|14px|16px}}; | ||
{{#if:{{{7|}}}|{{#ifeq:{{{7|}}}|right|float:right;|float:left;}}|}}"> | {{#if:{{{7|}}}|{{#ifeq:{{{7|}}}|right|float:right;|float:left;}}|}};{{{extra|}}}"> | ||
{{#ifeq:{{{5|}}}|internal | {{#ifeq:{{{5|}}}|internal | ||
|[[{{{1}}}|{{#ifeq:{{{9|}}}|iright|<span style="color:{{#if:{{{6|}}}|{{{6}}}|#fff}}">{{{2}}} <i class="{{{3}}}"></i></span>|<span style="color:{{#if:{{{6|}}}|{{{6}}}|#fff}}"><i class="{{{3}}}"></i> {{{2}}}</span>}}]] | |[[{{{1}}}|{{#ifeq:{{{9|}}}|iright|<span style="color:{{#if:{{{6|}}}|{{{6}}}|#fff}}">{{#if:{{{2|}}}|{{{2}}} }}<i class="{{{3}}}"></i></span>|<span style="color:{{#if:{{{6|}}}|{{{6}}}|#fff}}"><i class="{{{3}}}"></i>{{#if:{{{2|}}}| {{{2}}}|}}</span>}}]] | ||
|{{#ifeq:{{{9|}}}|iright|[{{{1}}} <span style="color:{{#if:{{{6|}}}|{{{6}}}|#fff}}">{{{2}}} <i class="{{{3}}}"></i></span>]|[{{{1}}} <span style="color:{{#if:{{{6|}}}|{{{6}}}|#fff}}"><i class="{{{3}}}"></i> {{{2}}}</span>]}}}} </div></includeonly> | |{{#ifeq:{{{9|}}}|iright|[{{{1}}} <span style="color:{{#if:{{{6|}}}|{{{6}}}|#fff}}">{{#if:{{{2|}}}|{{{2}}} |}}<i class="{{{3}}}"></i></span>]|[{{{1}}} <span style="color:{{#if:{{{6|}}}|{{{6}}}|#fff}}"><i title="{{{10|}}}" class="{{{3}}}"></i>{{#if:{{{2|}}}| {{{2}}}}}</span>]}}}} </div></includeonly> |