Textpattern | PHP Cross Reference | Content Management Systems |
1 <?php 2 3 /* 4 * Textpattern Content Management System 5 * https://textpattern.com/ 6 * 7 * Copyright (C) 2020 The Textpattern Development Team 8 * 9 * This file is part of Textpattern. 10 * 11 * Textpattern is free software; you can redistribute it and/or 12 * modify it under the terms of the GNU General Public License 13 * as published by the Free Software Foundation, version 2. 14 * 15 * Textpattern is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with Textpattern. If not, see <https://www.gnu.org/licenses/>. 22 */ 23 24 if (!defined('txpinterface')) { 25 die('txpinterface is undefined.'); 26 } 27 28 class classic_theme extends \Textpattern\Admin\Theme 29 { 30 function html_head() 31 { 32 $out[] = '<meta name="viewport" content="width=device-width, initial-scale=1">'; 33 $out[] = '<link rel="stylesheet" href="'.$this->url.'assets/css/textpattern.css">'; 34 $out[] = '<link rel="icon" href="'.$this->url.'assets/img/favicon.ico">'; 35 $out[] = '<meta name="generator" content="Textpattern CMS">'; 36 37 return join(n, $out); 38 } 39 40 function header() 41 { 42 global $txp_user; 43 44 $out[] = '<div class="txp-masthead">'; 45 $out[] = hed('Textpattern', 1, ' class="txp-branding"'); 46 $out[] = hed(htmlspecialchars(get_pref('sitename')), 2, ' class="txp-accessibility"'); 47 $out[] = navPop(1); 48 $out[] = '</div>'; 49 50 if ($txp_user) { 51 if (!$this->is_popup) { 52 $out[] = '<nav role="navigation" aria-label="'.gTxt('navigation').'">'; 53 $out[] = '<div class="nav-tabs" id="nav-primary">'; 54 $out[] = '<ul>'; 55 56 $secondary = ''; 57 58 foreach ($this->menu as $tab) { 59 $tc = ($tab['active']) ? ' class="active"' : ''; 60 $out[] = '<li'.$tc.'>'. 61 href($tab["label"], array('event' => $tab['event'])). 62 '</li>'; 63 64 if ($tab['active'] && !empty($tab['items'])) { 65 $secondary = '<div class="nav-tabs" id="nav-secondary">'. 66 n.'<ul>'; 67 68 foreach ($tab['items'] as $item) { 69 $tc = ($item['active']) ? ' class="active" aria-current="page"' : ''; 70 $secondary .= n.'<li'.$tc.'>'. 71 href($item['label'], array('event' => $item['event'])). 72 '</li>'; 73 } 74 75 $secondary .= n.'</ul>'. 76 n.'</div>'; 77 } 78 } 79 80 $out[] = '<li class="txp-view-site">'. 81 href(gTxt('tab_view_site'), hu, array( 82 'rel' => 'noopener', 83 'target' => '_blank' 84 )). 85 '</li>'; 86 87 $out[] = '</ul>'; 88 $out[] = '</div>'; 89 $out[] = $secondary; 90 $out[] = '</nav>'; 91 } 92 } 93 94 return join(n, $out); 95 } 96 97 function footer() 98 { 99 global $txp_user; 100 101 $out[] = href('Textpattern CMS'.sp.span(gTxt('opens_external_link'), array('class' => 'ui-icon ui-icon-extlink')), 'https://textpattern.com', array( 102 'class' => 'mothership', 103 'rel' => 'external noopener', 104 'target' => '_blank', 105 )). 106 n.'('.txp_version.')'. 107 n.span('·', array('role' => 'separator')). 108 n.gTxt('logged_in_as'). 109 n.span(txpspecialchars($txp_user), array('class' => 'txp-username')). 110 n.span('·', array('role' => 'separator')). 111 n.href(gTxt('logout'), 'index.php?logout=1', array( 112 'class' => 'txp-logout', 113 'onclick' => 'return verify(\''.gTxt('are_you_sure').'\')', 114 )); 115 116 return join(n, $out); 117 } 118 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
title