Main Page: Difference between revisions View history

No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
<span style="display:none">{{#cargo_declare:
_table = card
|title=String
|subtitle=String
|color=String
|card_type=String
|link=String
}}</span>
==Template structure ==
==Template structure ==
 
{{card
 
|title=UK Quick Start Editing Guide
{{portal-title|title=main page}}
|subtitle=some card content
|color=#0099FF
|type=Map Editor
|link=page name if different form title
}}
<pre>
<pre>
<nowiki>
<nowiki>
{{portal-title
{{card
|title=Title text (if not set gets community name)
|title=UK Quick Start Editing Guide
|title-icon=icon (if not set gets waze defautl icon)
|subtitle=some card content (if empty loads target page automatic excerpt)
|hide numbers=add any key to hide
|color=#0099FF
|type=Card Type
|image=File name (optional) if empty gets first image in linked page (overridden by color if set)
|link=page name if different form title
}}</nowiki>
}}</nowiki>
</pre>
</pre>
</noinclude>
</noinclude>
<includeonly>
<includeonly>
<div class="flex justify-between items-center mb-10 pb-border-b border-gray-200 not-prose noexcerpt">
<li class="noexcerpt temaplte-card list-none w-64 flex-none rounded-md border border-gray-300 overflow-hidden pb-4 md:pb-16 pl-0 relative hover:shadow transition" style="list-style: none">
<div class="flex h3 items-center font-medium gap-x-3 font-headline">{{#if:{{{title-icon|}}}|<span style="min-width:25px">[[File:{{{title-icon|Waze happy.png}}}|waze icon|link=|class=rounded-full overflow-hidden w-6 h-6 object-cover border border-gray-300]]</span>}}<h1>{{{title|{{SITENAME}}}}}</h1><div data-toggle-dialog="waze-community-js" class="bg-gray-100 cursor-pointer grid h-8 hover:opacity-100 hover:opacity-75 items-center justify-center ml-1 opacity-0 rounded-full w-8"><i class="w-icon w-icon-chevron-down"></i></div>
<div class="noexcerpt card__header text-sm flex flex-column justify-center h-16 md:h-28 mb-6 contain font-headline">{{#if: {{{image|}}}{{#if:{{{color|}}}||{{#pageimage:{{{link|{{{title|}}}}}}}} }}| <div class="w-full overflow-hidden">[[{{#if:{{{image|}}}|file:{{{image}}}|file:{{#pageimage:{{{link|{{{title|}}}}}} }}}}|253px|link={{{link|{{{title|}}}}}}|class=w-full]]</div>
</div>{{#if: {{{hide numbers|}}}||
|<div style="background-color:{{#if:{{{color|}}}|{{{color|#0099FF}}}|{{#var:color}} }}" class="card__bar w-full h-2 absolute top-0"></div>
<ul class="hidden 0flex gap-x-3 md:gap-x-10"><li class="flex items-center"><i class="w-icon w-icon-people text-4xl mr-2"></i><h4><div class="font-medium font-headline">{{NUMBEROFUSERS}}</div><div class="text-xs text-gray-800">Members</div></h4></li>
<h4 class="px-3 md:px-4 mt-8 w-full text-xs text-gray-600">{{{type|}}}</h4>
<li class="flex items-center"><i class="w-icon w-icon-book text-4xl mr-2"></i><h4><div class="font-medium font-headline">{{NUMBEROFPAGES}}</span><div class="text-xs text-gray-800">Articles</div></h4></li>
}}
</ul>|}}
<wz-button-link color="secondary" href="Special:FormEdit/Portal/{{FULLPAGENAME}}"><i class="w-icon w-icon-pencil"></i></wz-button-link>
</div>
</div>
 
<h6 class="px-3 md:px-4 mb-3 text-gray-900 font-headline h6">{{#ifeq: {{#sub:{{{link|{{{title|}}}}}}|0|4}} | http |[{{{link|}}} {{{title|}}}]|[[{{{link|{{{title|}}}}}}|{{{title|{{{link}}} }}}]]}}</h6>
 
<div class="card__content px-3 md:px-4 text-gray-700 text-sm">{{#if:{{{subtitle|}}}|{{{subtitle}}}|
 
{{#textextract:{{{link|{{{title|}}} }}} }} }}</div>
<includeonly>
<div class="link-as-card">{{#ifeq: {{#sub:{{{link|{{{title|}}}}}}|0|4}} | http |[{{{link|}}} {{{title|}}}]|[[{{{link|{{{title|}}}}}}]]}}</div>
</li>
{{#cargo_store:
_table = card
|title={{{title|}}}
|link={{{link|}}}
|subtitle={{{subtitle|}}}
|color={{{color|}}}
|card_type={{{type|}}}
}}
</includeonly>

Revision as of 20:59, 9 March 2023

Error: #cargo_declare must be called from a template page.

Template structure

Template:Card


{{card
|title=UK Quick Start Editing Guide
|subtitle=some card content (if empty loads target page automatic excerpt)
|color=#0099FF
|type=Card Type
|image=File name (optional) if empty gets first image in linked page (overridden by color if set)
|link=page name if different form title
}}