responsive.php (4104B)
1 <?php 2 $lang = array( 3 'site_lang_recent_pages' =>'Recent Pages', 4 'site_lang_related_pages'=>'Related Pages', 5 'site_lang_keywords' =>'Keywords', 6 'site_lang_categories' =>'Categories', 7 'site_lang_calendar' =>'Calendar', 8 'site_lang_from' =>'from', 9 'site_lang_to' =>'to', 10 'site_lang_in' =>'in', 11 'site_date_format' =>'%x', 12 'site_date_format_full' =>'%x', 13 'site_footer_category' =>'about', 14 'site_title' =>'My Blog' 15 ); 16 extract($lang,EXTR_SKIP); 17 18 ?><html lang="de"> 19 <head> 20 <title><?php echo TITLE ?> - <?php echo $site_title ?></title> 21 <meta content="text/html; charset=UTF-8" http-equiv="content-type" /> 22 <meta name="viewport" content="width=device-width, initial-scale=1" /> 23 <link rel="stylesheet" href="<?php echo SITE_UP ?>style.css"> 24 </head> 25 <body> 26 27 <header> 28 <h1><?php echo $site_title ?></h1> 29 </header> 30 31 <main> 32 33 <article> 34 35 <header id="name"> 36 <h1><?php echo TITLE ?></h1> 37 38 <?php if ( is_array($PAGE) ) { ?> 39 <span class="date"><?php echo strftime($site_date_format_full,$PAGE['date']) ?></span> 40 <span class="author"><?php echo $PAGE['author'] ?></span> 41 <span class="category"><a href="<?php echo SITE_UP.'category'.SLASH.$PAGE['category'] ?>"><?php echo $PAGE['category'] ?></a></span> 42 <ul class="keywords"><?php foreach( $PAGE['keywords'] as $keyword ) { ?><li><a href="<?php echo SITE_UP.'tag'.SLASH.$keyword ?>"><?php echo $keyword ?></a></li><?php } ?></ul> 43 <?php } ?> 44 </header> 45 46 <?php echo CONTENT ?> 47 </article> 48 49 50 <?php if ( is_array($PAGE) ) { ?> 51 <nav id="related"> 52 <header> 53 <h1><?php echo $site_lang_related_pages ?></h1> 54 </header> 55 <ul> 56 <?php foreach( $PAGES_RELATED as $page ) 57 {?> 58 <li> 59 <a href="<?php echo SITE_UP.$page['url'] ?>"><?php echo $page['title'] ?></a> 60 </li> 61 <?php } ?> 62 </ul> 63 64 </nav> 65 <?php } ?> 66 67 68 <nav id="categories"> 69 <header> 70 <h1><?php echo $site_lang_categories ?></h1> 71 </header> 72 73 <ul> 74 <?php $count=0; 75 foreach( $PAGES_BY_CATEGORY as $category=>$pages) 76 { ?> 77 <li><a href="<?php echo SITE_UP.'category/'.$category ?>"><?php echo $CATEGORY_NAMES[$category] ?></a></li> 78 <?php } ?> 79 </ul> 80 </nav> 81 82 83 84 85 86 <nav id="recent"> 87 <header> 88 <h1><?php echo $site_lang_recent_pages ?></h1> 89 </header> 90 <ul> 91 <?php $count=0; foreach( array_reverse($PAGES_BY_DATE) as $pagesOnDate) 92 { 93 foreach( $pagesOnDate as $page ) 94 { 95 96 if ($count++ > 10) break; ?> 97 <li> 98 <a href="<?php echo SITE_UP.$page['url'] ?>"><?php echo $page['title'] ?></a> 99 </li> 100 <?php }} ?> 101 </ul> 102 103 </nav> 104 105 106 <nav id="calendar"> 107 <header> 108 <h1><?php echo $site_lang_calendar ?></h1> 109 </header> 110 111 <ul class="year"> 112 <?php $oldYear = 0; foreach( array_reverse($PAGES_BY_DATE,true) as $date => $pagesOnDate) 113 { 114 $year = date('Y',$date); 115 if ( $year != $oldYear ) 116 { 117 $oldYear = $year; 118 ?> 119 <li> 120 <a href="<?php echo SITE_UP.$year ?>"><?php echo $year ?></a> 121 <ul class="month"> 122 <?php 123 $oldMonth = 0; 124 foreach( array_reverse($PAGES_BY_DATE,true) as $date2 => $pagesOnDate) 125 { 126 $y = date('Y',$date2); 127 if ( $y != $year) 128 continue; 129 130 $month = date('m',$date2); 131 if ( $month != $oldMonth ) 132 { 133 $oldMonth = $month; 134 135 ?> 136 <li> 137 <a href="<?php echo SITE_UP.$year.SLASH.$month ?>"><?php echo date('F',$date2) ?></a> 138 </li> 139 <?php }} ?> 140 </ul> 141 </li> 142 143 <?php } } ?> 144 </ul> 145 146 </nav> 147 148 149 <nav id="keywords"> 150 <header> 151 <h1><?php echo $site_lang_keywords ?></h1> 152 </header> 153 154 <ul> 155 <?php $count=0; foreach( $PAGES_BY_KEYWORD as $keyword=>$pages) 156 { 157 $fontsize = min(3,((count($pages)-1)/5)+1); ?> 158 159 <li style="font-size:<?php echo $fontsize ?>em;"><a href="<?php echo SITE_UP.'tag/'.$keyword ?>"><?php echo $keyword ?></a> 160 </li> 161 <?php } ?> 162 </ul> 163 164 </nav> 165 166 167 </main> 168 169 <footer> 170 171 <ul> 172 <?php foreach( $PAGES_BY_CATEGORY[$site_footer_category] as $page) {?> 173 <li><a href="<?php echo SITE_UP.$page['url'] ?>"><?php echo $page['title']?></a></li> 174 <?php } ?> 175 </ul> 176 177 </footer> 178 179 </body> 180 </html>