add choklet template with several defined flavours, two and three column fluid layouts with optional side margins and a region for a blog-style header photo

This commit is contained in:
friendica
2014-03-02 16:46:34 -08:00
parent e931af8307
commit 895c9411d9
10 changed files with 248 additions and 48 deletions

View File

@@ -8,12 +8,10 @@ function nav(&$a) {
*
*/
$ssl_state = ((local_user()) ? true : false);
if(!(x($a->page,'nav')))
$a->page['nav'] = '';
$base = $a->get_baseurl($ssl_state);
$base = z_root();
$a->page['htmlhead'] .= <<< EOT
<script>$(document).ready(function() {
@@ -33,18 +31,6 @@ EOT;
/**
* Placeholder div for popup panel
*/
/**
*
* Our network is distributed, and as you visit friends some of the
* sites look exactly the same - it isn't always easy to know where you are.
* Display the current site location as a navigation aid.
*
*/
if(local_user()) {
$channel = $a->get_channel();
$observer = $a->get_observer();
@@ -58,6 +44,26 @@ EOT;
$sitelocation = (($myident) ? $myident : $a->get_hostname());
/**
*
* Provide a banner/logo/whatever
*
*/
$banner = get_config('system','banner');
if($banner === false)
$banner = get_config('system','sitename');
$a->page['header'] .= replace_macros(get_markup_template('hdr.tpl'), array(
'$baseurl' => $a->get_baseurl(),
'$sitelocation' => $sitelocation,
'$langselector' => ((get_config('system','select_language')) ? lang_selector() : ''),
'$banner' => $banner
));
// nav links: array of array('href', 'text', 'extra css classes', 'title')
$nav = Array();
@@ -128,7 +134,7 @@ EOT;
if(($a->config['system']['register_policy'] == REGISTER_OPEN) && (! local_user()) && (! remote_user()))
$nav['register'] = array('register',t('Register'), "", t('Create an account'));
$help_url = $a->get_baseurl($ssl_state) . '/help';
$help_url = z_root() . '/help';
if(! get_config('system','hide_help'))
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'));
@@ -209,7 +215,6 @@ EOT;
$a->page['nav'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
'$langselector' => ((get_config('system','select_language')) ? lang_selector() : ''),
'$sitelocation' => $sitelocation,
'$nav' => $x['nav'],
'$banner' => $banner,