Dotclear


Ignore:
Timestamp:
02/25/14 13:30:43 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Applying inheritance/extension template mechanism on currywurst templateset, step 1, addresses #1933

Location:
inc/public/default-templates/currywurst
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • inc/public/default-templates/currywurst/README.md

    r2623 r2675  
    6464  - send-trackback 
    6565 
     66### __layout.html 
     67 
     68Reprend l'intégralité du home.html et définit les blocs permettant l'héritage et extension 
     69 
     70La liste des noms utilisés pour les blocs sont les suivants (les noms sont composés de deux termes, le nom du parent direct du bloc et le nom du bloc en question, sachant que le nom 'attr' est réservé aux attributs des balises, comme pour 'body-attr') : 
     71 
     72- html-head : contenu de la balise head 
     73  - head-title : contenu de la balise title 
     74  - head-meta : liste des balises meta du head 
     75  - head-dc : liste des balises dublin core du head 
     76  - head-linkrel : liste des balises link rel du head 
     77- body-attr : attributs de la balise body 
     78- html-body : contenu de la balise body 
     79  - body-page : contenu de la div #page 
     80    - page-top : contenu d'entête de la div #page (en général inclusion du _top.html) 
     81    - page-wrapper : contenu principal de la div #page, soit le contenu de la div #wrapper 
     82      - wrapper-main : contenu principal de la div #wrapper, soit le contenu de la div #main 
     83        - main-content : contenu de la div #content 
     84      - wrapper-sidebar : contenu annexe de la div #wrapper (en général inclusion de _sidebar.html) 
     85    - page-footer : contenu de pied de page de la div #page (en général inclusion du _footer.html) 
     86 
     87Pour rappel, la hiérarchie des blocs html est la suivante : 
     88 
     89- html 
     90  - head 
     91  - body 
     92    - #page 
     93      - .header 
     94      - #wrapper 
     95        - #main 
     96          - #content 
     97        - #sidebar/.sidebar 
     98      - #footer/.footer 
     99 
     100 
    66101*** 
    67102 
  • inc/public/default-templates/currywurst/home.html

    r2669 r2675  
    1 <!DOCTYPE html> 
    2 <html lang="{{tpl:BlogLanguage}}"> 
    3 <head> 
    4      <meta charset="UTF-8" /> 
    5      <meta name="ROBOTS" content="{{tpl:BlogMetaRobots}}" /> 
    6  
    7      <title>{{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></title> 
    8      <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription cut_string="180" encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" /> 
    9      <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 
    10      <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> 
    11      <meta name="date" content="{{tpl:BlogUpdateDate iso8601="1"}}" /> 
    12  
    13      <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> 
    14      <meta property="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" /> 
    15      <meta property="dc.description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription encode_html="1"}}" /> 
    16      <meta property="dc.language" content="{{tpl:BlogLanguage}}" /> 
    17      <meta property="dc.publisher" content="{{tpl:BlogEditor encode_html="1"}}" /> 
    18      <meta property="dc.rights" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 
    19      <meta property="dc.date" content="{{tpl:BlogUpdateDate iso8601="1"}}" /> 
    20      <meta property="dc.type" content="text" /> 
    21      <meta property="dc.format" content="text/html" /> 
    22  
    23      <link rel="contents" title="{{tpl:lang Archives}}" href="{{tpl:BlogArchiveURL}}" /> 
    24      <tpl:Categories> 
    25           <link rel="section" href="{{tpl:CategoryURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" /> 
    26      </tpl:Categories> 
    27  
    28      <tpl:Entries no_content="1"> 
    29           <tpl:EntriesHeader> 
    30                <tpl:Pagination> 
    31                     <tpl:PaginationIf end="0"> 
    32                          <link rel="prev" title="{{tpl:lang previous entries}}" href="{{tpl:PaginationURL offset="1"}}" /> 
    33                     </tpl:PaginationIf> 
    34  
    35                     <tpl:PaginationIf start="0"> 
    36                          <link rel="next" title="{{tpl:lang next entries}}" href="{{tpl:PaginationURL offset="-1"}}" /> 
    37                     </tpl:PaginationIf> 
    38                </tpl:Pagination> 
    39           </tpl:EntriesHeader> 
    40  
    41           <link rel="chapter" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" /> 
    42      </tpl:Entries> 
    43  
    44      <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 
    45      <link rel="EditURI" type="application/rsd+xml" title="RSD" href="{{tpl:BlogRSDURL}}" /> 
    46      <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" /> 
    47  
    48      {{tpl:include src="_head.html"}} 
    49 </head> 
    50 <body class="dc-home <tpl:SysIf current_mode="default">dc-home-first</tpl:SysIf>"> 
    51      <div id="page"> 
    52           {{tpl:include src="_top.html"}} 
    53  
    54           <div id="wrapper"> 
    55  
    56                <div id="main" role="main"> 
    57                     <div id="content"> 
    58  
    59                          <tpl:Entries> 
    60  
    61                               <!-- First page --> 
    62                               <tpl:SysIf current_mode="default"> 
    63                                    <tpl:LoopPosition start="1" length="1"> 
    64                                         {{tpl:include src="_entry-full.html"}} 
    65                                    </tpl:LoopPosition> 
    66  
    67                                    <tpl:LoopPosition start="2"> 
    68                                         {{tpl:include src="_entry-short.html"}} 
    69                                    </tpl:LoopPosition> 
    70                               </tpl:SysIf> 
    71  
    72                               <!-- Next pages --> 
    73                               <tpl:SysIf current_mode="!default"> 
    74                                    {{tpl:include src="_entry-short.html"}} 
    75                               </tpl:SysIf> 
    76  
    77                               <!-- Pagination --> 
    78                               <tpl:EntriesFooter> 
    79                                    {{tpl:include src="_pagination.html"}} 
    80                               </tpl:EntriesFooter> 
    81  
    82                          </tpl:Entries> 
    83  
    84                     </div> <!-- End #content --> 
    85                </div> <!-- End #main --> 
    86  
    87                {{tpl:include src="_sidebar.html"}} 
    88  
    89           </div> <!-- End #wrapper --> 
    90  
    91           {{tpl:include src="_footer.html"}} 
    92      </div> <!-- End #page --> 
    93 </body> 
    94 </html> 
     1{{tpl:extends parent="__layout.html"}} 
  • inc/public/default-templates/currywurst/post.html

    r2669 r2675  
    1 <!DOCTYPE html> 
    2 <html lang="{{tpl:BlogLanguage}}"> 
    3 <head> 
    4      <meta charset="UTF-8" /> 
     1{{tpl:extends parent="__layout.html"}} 
     2 
     3<tpl:Block name="head-title">{{tpl:EntryTitle encode_html="1"}} - {{tpl:BlogName encode_html="1"}}</tpl:Block> 
     4 
     5<tpl:Block name="head-meta"> 
    56     <meta name="ROBOTS" content="{{tpl:BlogMetaRobots}}" /> 
    6  
    7      <title>{{tpl:EntryTitle encode_html="1"}} - {{tpl:BlogName encode_html="1"}}</title> 
    87     <meta name="description" lang="{{tpl:EntryLang}}" content="{{tpl:EntryContent full="1" encode_html="1" remove_html="1" cut_string="180"}}" /> 
    98     <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 
    109     <meta name="author" content="{{tpl:EntryAuthorCommonName encode_html="1"}}" /> 
    1110     <meta name="date" content="{{tpl:EntryDate iso8601="1"}}" /> 
     11</tpl:Block> 
    1212 
     13<tpl:Block name="head-dc"> 
    1314     <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> 
    1415     <meta property="dc.title" content="{{tpl:EntryTitle encode_html="1"}}" /> 
     
    2122     <meta property="dc.type" content="text" /> 
    2223     <meta property="dc.format" content="text/html" /> 
     24</tpl:Block> 
    2325 
     26<tpl:Block name"head-linkrel"> 
    2427     <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 
    2528     <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 
    26  
    2729     <tpl:EntryNext><link rel="next" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" /></tpl:EntryNext> 
    2830     <tpl:EntryPrevious><link rel="prev" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" /></tpl:EntryPrevious> 
     31     <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 
     32</tpl:Block> 
    2933 
    30      <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 
    31  
    32      {{tpl:include src="_head.html"}} 
     34<tpl:Block name="html-head"> 
     35     {{tpl:parent}} 
    3336 
    3437     <script type="text/javascript" src="{{tpl:BlogThemeURL}}/../default/js/post.js"></script> 
     
    3841          //]]> 
    3942     </script> 
    40 </head> 
    41 <body class="dc-post"> 
    42      <div id="page"> 
    43           {{tpl:EntryPingData}} 
     43</tpl:Block> 
    4444 
    45           {{tpl:include src="_top.html"}} 
     45<tpl:Block name="body-attr">class="dc-post"</tpl:Block> 
    4646 
    47           <div id="wrapper"> 
     47<tpl:Block name="page-top"> 
     48     {{tpl:EntryPingData}} 
     49     {{tpl:parent}} 
     50</tpl:Block> 
    4851 
    49                <div id="main" role="main"> 
    50                     <div id="content"> 
     52<tpl:Block name="main-content"> 
     53     <p class="navlinks topnl"> 
     54          <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 
     55           title="{{tpl:EntryTitle encode_html="1"}}" class="prev">&#171; {{tpl:EntryTitle encode_html="1" 
     56           cut_string="50"}}</a></tpl:EntryPrevious> 
     57          <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" 
     58           title="{{tpl:EntryTitle encode_html="1"}}" class="next">{{tpl:EntryTitle encode_html="1" 
     59           cut_string="50"}} &#187;</a></tpl:EntryNext> 
     60     </p> 
    5161 
    52                          <p class="navlinks topnl"> 
    53                               <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 
    54                                title="{{tpl:EntryTitle encode_html="1"}}" class="prev">&#171; {{tpl:EntryTitle encode_html="1" 
    55                                cut_string="50"}}</a></tpl:EntryPrevious> 
    56                               <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" 
    57                                title="{{tpl:EntryTitle encode_html="1"}}" class="next">{{tpl:EntryTitle encode_html="1" 
    58                                cut_string="50"}} &#187;</a></tpl:EntryNext> 
    59                          </p> 
     62     {{tpl:include src="_simple-entry.html"}} 
    6063 
    61                          {{tpl:include src="_simple-entry.html"}} 
    62  
    63                          <p class="navlinks"> 
    64                               <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 
    65                                title="{{tpl:EntryTitle encode_html="1"}}" class="prev">&#171; {{tpl:EntryTitle encode_html="1" 
    66                                cut_string="50"}}</a></tpl:EntryPrevious> 
    67                               <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" 
    68                                title="{{tpl:EntryTitle encode_html="1"}}" class="next">{{tpl:EntryTitle encode_html="1" 
    69                                cut_string="50"}} &#187;</a></tpl:EntryNext> 
    70                          </p> 
    71  
    72                     </div> 
    73                </div> <!-- End #main --> 
    74  
    75                {{tpl:include src="_sidebar.html"}} 
    76  
    77           </div> <!-- End #wrapper --> 
    78  
    79           {{tpl:include src="_footer.html"}} 
    80      </div> <!-- End #page --> 
    81 </body> 
    82 </html> 
     64     <p class="navlinks"> 
     65          <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 
     66           title="{{tpl:EntryTitle encode_html="1"}}" class="prev">&#171; {{tpl:EntryTitle encode_html="1" 
     67           cut_string="50"}}</a></tpl:EntryPrevious> 
     68          <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" 
     69           title="{{tpl:EntryTitle encode_html="1"}}" class="next">{{tpl:EntryTitle encode_html="1" 
     70           cut_string="50"}} &#187;</a></tpl:EntryNext> 
     71     </p> 
     72</tpl:Block> 
  • inc/public/default-templates/currywurst/search.html

    r2603 r2675  
    1 <!DOCTYPE html> 
    2 <html lang="{{tpl:BlogLanguage}}"> 
    3 <head> 
    4      <meta charset="UTF-8" /> 
     1{{tpl:extends parent="__layout.html"}} 
     2 
     3<tpl:Block name="head-title">{{tpl:lang Search}} - {{tpl:SysSearchString encode_html="1"}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></tpl:Block> 
     4 
     5<tpl:Block name="head-meta"> 
    56     <meta name="ROBOTS" content="{{tpl:BlogMetaRobots robots="NOINDEX,NOARCHIVE"}}" /> 
    6  
    7      <title>{{tpl:lang Search}} - {{tpl:SysSearchString encode_html="1"}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></title> 
    87     <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 
    98     <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> 
    109     <meta name="date" content="{{tpl:BlogUpdateDate iso8601="1"}}" /> 
     10</tpl:Block> 
    1111 
     12<tpl:Block name="head-dc"> 
    1213     <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> 
    1314     <meta property="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Search}} - {{tpl:SysSearchString encode_html="1"}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" /> 
     
    1819     <meta property="dc.type" content="text" /> 
    1920     <meta property="dc.format" content="text/html" /> 
     21</tpl:Block> 
    2022 
     23<tpl:Block name="head-linkrel"> 
    2124     <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 
    2225     <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 
    23  
    2426     <tpl:Entries no_content="1"> 
    2527          <tpl:EntriesHeader> 
     
    2830                         <link rel="prev" title="{{tpl:lang previous entries}}" href="{{tpl:PaginationURL offset="1"}}" /> 
    2931                    </tpl:PaginationIf> 
    30  
    3132                    <tpl:PaginationIf start="0"> 
    3233                         <link rel="next" title="{{tpl:lang next entries}}" href="{{tpl:PaginationURL offset="-1"}}" /> 
     
    3435               </tpl:Pagination> 
    3536          </tpl:EntriesHeader> 
    36  
    3737          <link rel="chapter" href="{{tpl:EntryURL}}" title="{{tpl:EntryTitle encode_html="1"}}" /> 
    3838     </tpl:Entries> 
     39     <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" /> 
     40</tpl:Block> 
    3941 
    40      <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" /> 
     42<tpl:Block name="body-attr">class="dc-search"</tpl:Block> 
    4143 
    42      {{tpl:include src="_head.html"}} 
    43 </head> 
    44 <body class="dc-search"> 
    45      <div id="page"> 
    46           {{tpl:include src="_top.html"}} 
     44<tpl:Block name="main-content"> 
     45     <div id="content-info"> 
     46          <h2>{{tpl:lang Search}}</h2> 
     47          <tpl:SysIf search_count="==0"> 
     48               <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned no result."}}</p> 
     49          </tpl:SysIf> 
     50          <tpl:SysIf search_count="==1"> 
     51               <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned <strong>%2$s</strong> result."}}</p> 
     52          </tpl:SysIf> 
     53          <tpl:SysIf search_count="&gt;1"> 
     54               <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned <strong>%2$s</strong> results."}}</p> 
     55          </tpl:SysIf> 
     56     </div> 
    4757 
    48           <div id="wrapper"> 
     58     <div class="content-inner"> 
     59          <tpl:Entries type="post,page"> 
    4960 
    50                <div id="main" role="main"> 
    51                     <div id="content"> 
     61               {{tpl:include src="_entry-short.html"}} 
    5262 
    53                          <div id="content-info"> 
    54                               <h2>{{tpl:lang Search}}</h2> 
    55                               <tpl:SysIf search_count="==0"> 
    56                                    <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned no result."}}</p> 
    57                               </tpl:SysIf> 
    58                               <tpl:SysIf search_count="==1"> 
    59                                    <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned <strong>%2$s</strong> result."}}</p> 
    60                               </tpl:SysIf> 
    61                               <tpl:SysIf search_count="&gt;1"> 
    62                                    <p>{{tpl:SysSearchString encode_html="1" string="Your search for <em>%1$s</em> returned <strong>%2$s</strong> results."}}</p> 
    63                               </tpl:SysIf> 
    64                          </div> 
    65  
    66                          <div class="content-inner"> 
    67                               <tpl:Entries type="post,page"> 
    68  
    69                                    {{tpl:include src="_entry-short.html"}} 
    70  
    71                                    <tpl:EntriesFooter> 
    72                                         <tpl:Pagination> 
    73                                              <p class="pagination"> 
    74                                                   <tpl:PaginationIf end="0"> 
    75                                                        <a href="{{tpl:PaginationURL offset="+1"}}" class="prev">&#171; {{tpl:lang previous entries}}</a> - 
    76                                                   </tpl:PaginationIf> 
    77                                                    {{tpl:lang page}} {{tpl:PaginationCurrent}} {{tpl:lang of}} {{tpl:PaginationCounter}} 
    78                                                   <tpl:PaginationIf start="0"> 
    79                                                         - <a href="{{tpl:PaginationURL offset="-1"}}" class="next">{{tpl:lang next entries}} &#187;</a> 
    80                                                   </tpl:PaginationIf> 
    81                                              </p> 
    82                                         </tpl:Pagination> 
    83                                    </tpl:EntriesFooter> 
    84                               </tpl:Entries> 
    85                          </div> <!-- End #content-inner --> 
    86                     </div> <!-- End #content --> 
    87                </div> <!-- End #main --> 
    88  
    89                {{tpl:include src="_sidebar.html"}} 
    90  
    91           </div> <!-- End #wrapper --> 
    92  
    93           {{tpl:include src="_footer.html"}} 
    94      </div> <!-- End #page --> 
    95 </body> 
    96 </html> 
     63               <tpl:EntriesFooter> 
     64                    <tpl:Pagination> 
     65                         <p class="pagination"> 
     66                              <tpl:PaginationIf end="0"> 
     67                                   <a href="{{tpl:PaginationURL offset="+1"}}" class="prev">&#171; {{tpl:lang previous entries}}</a> - 
     68                              </tpl:PaginationIf> 
     69                               {{tpl:lang page}} {{tpl:PaginationCurrent}} {{tpl:lang of}} {{tpl:PaginationCounter}} 
     70                              <tpl:PaginationIf start="0"> 
     71                                    - <a href="{{tpl:PaginationURL offset="-1"}}" class="next">{{tpl:lang next entries}} &#187;</a> 
     72                              </tpl:PaginationIf> 
     73                         </p> 
     74                    </tpl:Pagination> 
     75               </tpl:EntriesFooter> 
     76          </tpl:Entries> 
     77     </div> <!-- End #content-inner --> 
     78</tpl:Block> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map