Difference between revisions of "Template:Header"

From En JW United
Jump to navigation Jump to search
 
(16 intermediate revisions by the same user not shown)
Line 44: Line 44:
 
<div class="gen_header_title" style="display:table-cell; text-align:center; width:60%;"><!--
 
<div class="gen_header_title" style="display:table-cell; text-align:center; width:60%;"><!--
  
-->'''<span id="header_title_text">{{{title|Untitled}}}</span>''' <!--
+
-->'''
 +
<span id="header_title_text">[[{{{title|Untitled}}}|{{{title}}}]]</span>'''<br>
 +
<span>Publication date: {{{year|}}}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 +
<span>Volume: {{{volume|}}}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 +
<span>Number: {{{number|}}}</span>'''
 +
'''<!--
  
Year-->{{#if:{{{year|}}}{{{override_year|}}}<!--
 
      -->|{{#if:{{{override_year|}}}<!--
 
        -->|&nbsp;({{{override_year}}})&nbsp;[[Category:Pages with override year]]<!--
 
        -->|{{header/year<!--
 
            -->|{{{year}}}<!-- unaltered user input
 
            -->|noprint ={{#if:{{{noyear|}}}|1|0}}<!-- send 1 if "noyear" was called and 0 if not
 
            -->|nocat  ={{#ifeq:{{{disambiguation|}}}|yes<!--
 
                        -->|1<!-- send 1 if this is a disambiguation page and 0 if it is not, unless...
 
                        -->|{{#if:{{{noyearcat|}}}<!--
 
                          -->|1<!-- send 1 if "noyearcat" was called and 0 if not, unless...
 
                          -->|{{is subpage}}<!-- will return 1 if it is a subpage and 0 if not
 
                        -->}}<!--
 
                      -->}}<!-- a result of 1 will turn categorisation off; 0 will keep it on
 
          -->}}<!-- header/year subroutine
 
      -->}}<!-- if override_year
 
    -->}}<!--
 
  
 
Author field
 
Author field
Line 184: Line 173:
 
<div style="display:table-row;"><!--
 
<div style="display:table-row;"><!--
  
 +
faux TD-->
 +
<div class="searchaux" style="display:table-cell;"><!--
  
 +
  check if page is connected to Wikidata (#ifeq)
 +
  -->{{#ifeq:{{#invoke:Wikibase|id}}|no entity<!--
 +
 +
 +
 +
  end #ifeq
 +
  -->}}<!--
 +
 +
  Shortcut link
 +
  -->{{#if:{{{shortcut|}}}|{{Shortcut|{{{shortcut}}}}}}}<!--
 +
 +
  Notes from parameter
 +
  -->{{{notes}}}<!--
 +
 +
close faux TD-->
 +
</div><!--
 +
 +
close faux TR-->
 +
</div><!--
 +
 +
close faux TBODY-->
 +
</div><!--
 +
 +
close faux TABLE-->
 +
</div><!--
 +
 +
END OF VISIBLE TEMPLATE
 +
 +
MICROFORMAT DATA-->
 +
<includeonly><div id="ws-data" class="ws-noexport" style="display:none; speak:none;"><!--
 +
 +
--><span id="ws-article-id">{{{{{|safesubst:}}}PAGEID}}</span><!--
 +
 +
--><span id="ws-title">{{{title|}}}{{#if:{{{section|}}}|&#32;— ''{{{section}}}''}}</span><!--
 +
 +
-->{{#if:{{{author|}}}{{{override_author|}}}<!--
 +
-->|<span id="ws-author"><!--
 +
-->{{#if:{{{override_author|}}}<!--
 +
-->|{{{override_author}}}<!--
 +
-->|{{{author}}}<!--
 +
-->}}<!--
 +
--></span><!--
 +
-->|<!--
 +
-->}}<!--
 +
 +
 +
-->{{#if:{{{translator|}}}{{{override_translator|}}}<!--
 +
-->|<span id="ws-translator"><!--
 +
-->{{#if:{{{override_translator|}}}<!--
 +
-->|{{{override_translator}}}<!--
 +
-->|{{{translator}}}<!--
 +
-->}}<!--
 +
--></span><!--
 +
-->|<!--
 +
-->}}<!--
 +
 +
 +
-->{{#if:{{{year|}}}{{{override_year|}}}<!--
 +
-->|<span id="ws-year"><!--
 +
-->{{#if:{{{override_year|}}}<!--
 +
-->|{{{override_year}}}<!--
 +
-->|{{{year}}}<!--
 +
-->}}<!--
 +
--></span><!--
 +
-->|<!--
 +
-->}}<!--
 +
 +
END OF MICROFORMAT DATA-->
 +
</div><!--
 +
 +
Subpages
 +
  -->{{#ifeq:{{BASEPAGENAME}}|{{PAGENAME}}||{{#switch:1
 +
|{{#ifexist:{{#rel2abs:../}}|1}}
 +
|{{#ifexist:{{#rel2abs:../../}}|1}}
 +
|{{#ifexist:{{#rel2abs:../../../}}|1}} = [[Category:{{#if:{{NAMESPACE}}|{{NAMESPACE}} subpages|Subpages}}]]
 +
}}}}<!--
 +
 +
Categories:
 +
-->{{#if:{{{categories|}}}
 +
 +
      |<!-- Replace each string that ends in a slash with a category definition.
 +
            This does include the final one because we're adding a slash to the input string.
 +
      -->{{#invoke:String|replace|{{{categories}}}/|([^/]+)/*|[[Category:%1]]||plain=false }}<!--
 +
 +
-->}}<!--
 +
 +
Track pages using the author override
 +
-->{{#if:{{{override_author|}}}|[[Category:Pages with override author]]}}<!--
 +
 +
Track pages using contributor
 +
-->{{#if:{{{contributor|}}}|[[Category:Pages with contributor]]}}<!--
 +
 +
Track pages using override_contributor
 +
-->{{#if:{{{override_contributor|}}}|[[Category:Pages with override contributor]]}}<!--
 +
 +
Track pages with no author given
 +
-->{{#ifeq:{{lc:{{{override_author|{{{author|}}}}}}}}|unknown|[[Category:Anonymous texts]]}}<!--
 +
 +
Track pages using shortcuts
 +
-->{{#if:{{{shortcut|}}}|[[Category:Mainspace pages with shortcuts]]}}<!--
 +
 +
Track pages using the year override options
 +
-->{{#if:{{{override_year|}}}|[[Category:Pages with override year]]}}<!--
 +
-->{{#if:{{{noyear|}}}|[[Category:Pages with noyear]]}}<!--
 +
-->{{#if:{{{noyearcat|}}}|[[Category:Pages with noyearcat]]}}<!--
  
 
END OF NON-VISIBLE CONTENT
 
END OF NON-VISIBLE CONTENT

Latest revision as of 03:05, 15 October 2019