diff options
author | friendica <info@friendica.com> | 2014-03-02 16:46:34 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-03-02 16:46:34 -0800 |
commit | 895c9411d9393776f2ae4846935e42c31fde41af (patch) | |
tree | b77824215a9e6ca8377aba451adba062cc95201d | |
parent | e931af830701fdacc64e2cc014aa0057dc91e093 (diff) | |
download | volse-hubzilla-895c9411d9393776f2ae4846935e42c31fde41af.tar.gz volse-hubzilla-895c9411d9393776f2ae4846935e42c31fde41af.tar.bz2 volse-hubzilla-895c9411d9393776f2ae4846935e42c31fde41af.zip |
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
-rw-r--r-- | include/nav.php | 39 | ||||
-rw-r--r-- | view/css/choklet.css | 33 | ||||
-rw-r--r-- | view/css/choklet_edgesthree.css | 55 | ||||
-rw-r--r-- | view/css/choklet_edgestwo.css | 48 | ||||
-rw-r--r-- | view/css/choklet_full.css | 49 | ||||
-rw-r--r-- | view/css/choklet_three.css | 51 | ||||
-rw-r--r-- | view/php/choklet.php | 3 | ||||
-rw-r--r-- | view/php/default.php | 3 | ||||
-rw-r--r-- | view/php/full.php | 3 | ||||
-rwxr-xr-x | view/tpl/nav.tpl | 12 |
10 files changed, 248 insertions, 48 deletions
diff --git a/include/nav.php b/include/nav.php index dd15ff411..4e3d9fbec 100644 --- a/include/nav.php +++ b/include/nav.php @@ -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, diff --git a/view/css/choklet.css b/view/css/choklet.css index 883bb1ed3..355c9d3d5 100644 --- a/view/css/choklet.css +++ b/view/css/choklet.css @@ -1,15 +1,22 @@ +header #banner { + position: fixed; + top: 0; + width: 250px; + margin-left: auto; + margin-right: auto; +} + #blog-banner { position: relative; - margin-top: 45px; + margin-top: 75px; width: 100%; - height: 100px; margin-bottom: 20px; } nav.navbar { - width: 90%; - margin-left: 5%; - margin-right: 5%; + width: 100%; + margin-left: 0; + margin-right: 0; } aside#region_1 { @@ -30,20 +37,14 @@ section { margin-left: 15px; margin-right: 15px; float: left; - min-width: 650px; - width: 60%; + min-width: 400px; + width: 70%; display: block; padding-bottom: 350px; } -#region_3 { - float: right; - min-width: 210px; - max-width: 220px; - width: 20%; -} #blog-margin { - margin-right: 5%; - margin-left: 5%; -}
\ No newline at end of file + margin-right: 0; + margin-left: 0; +} diff --git a/view/css/choklet_edgesthree.css b/view/css/choklet_edgesthree.css new file mode 100644 index 000000000..ad4b4e29c --- /dev/null +++ b/view/css/choklet_edgesthree.css @@ -0,0 +1,55 @@ +header #banner { + position: fixed; + top: 0; + width: 250px; + margin-left: auto; + margin-right: auto; +} +#blog-banner { + position: relative; + margin-top: 75px; + width: 100%; + margin-bottom: 20px; +} + +nav.navbar { + width: 90%; + margin-left: 5%; + margin-right: 5%; +} + +aside#region_1 { + display: block; + min-width: 210px; + max-width: 220px; + width: 20%; + float: left; + margin-left: 10px; +} + +aside input[type='text'] { + width: 174px; +} + + +section { + margin-left: 15px; + margin-right: 15px; + float: left; + min-width: 650px; + width: 60%; + display: block; + padding-bottom: 350px; +} + +#region_3 { + float: right; + min-width: 210px; + max-width: 220px; + width: 20%; +} + +#blog-margin { + margin-right: 5%; + margin-left: 5%; +}
\ No newline at end of file diff --git a/view/css/choklet_edgestwo.css b/view/css/choklet_edgestwo.css new file mode 100644 index 000000000..83bf8eb50 --- /dev/null +++ b/view/css/choklet_edgestwo.css @@ -0,0 +1,48 @@ +header #banner { + position: fixed; + top: 0; + width: 250px; + margin-left: auto; + margin-right: auto; +} +#blog-banner { + position: relative; + margin-top: 75px; + width: 100%; + margin-bottom: 20px; +} + +nav.navbar { + width: 90%; + margin-left: 5%; + margin-right: 5%; +} + +aside#region_1 { + display: block; + min-width: 210px; + max-width: 220px; + width: 20%; + float: left; + margin-left: 10px; +} + +aside input[type='text'] { + width: 174px; +} + + +section { + margin-left: 15px; + margin-right: 15px; + float: left; + min-width: 400px; + width: 70%; + display: block; + padding-bottom: 350px; +} + +#blog-margin { + margin-right: 5%; + margin-left: 5%; +}
\ No newline at end of file diff --git a/view/css/choklet_full.css b/view/css/choklet_full.css new file mode 100644 index 000000000..883bb1ed3 --- /dev/null +++ b/view/css/choklet_full.css @@ -0,0 +1,49 @@ +#blog-banner { + position: relative; + margin-top: 45px; + width: 100%; + height: 100px; + margin-bottom: 20px; +} + +nav.navbar { + width: 90%; + margin-left: 5%; + margin-right: 5%; +} + +aside#region_1 { + display: block; + min-width: 210px; + max-width: 220px; + width: 20%; + float: left; + margin-left: 10px; +} + +aside input[type='text'] { + width: 174px; +} + + +section { + margin-left: 15px; + margin-right: 15px; + float: left; + min-width: 650px; + width: 60%; + display: block; + padding-bottom: 350px; +} + +#region_3 { + float: right; + min-width: 210px; + max-width: 220px; + width: 20%; +} + +#blog-margin { + margin-right: 5%; + margin-left: 5%; +}
\ No newline at end of file diff --git a/view/css/choklet_three.css b/view/css/choklet_three.css new file mode 100644 index 000000000..5bbff0e3b --- /dev/null +++ b/view/css/choklet_three.css @@ -0,0 +1,51 @@ +header #banner { + position: fixed; + top: 0; + width: 250px; + margin-left: auto; + margin-right: auto; +} +#blog-banner { + position: relative; + margin-top: 75px; + width: 100%; + margin-bottom: 20px; +} + +nav.navbar { + width: 100%; + margin-left: 0; + margin-right: 0; +} + +aside#region_1 { + display: block; + min-width: 210px; + max-width: 220px; + width: 20%; + float: left; + margin-left: 10px; +} + +aside input[type='text'] { + width: 174px; +} + + +section { + margin-left: 15px; + margin-right: 15px; + float: left; + min-width: 650px; + width: 60%; + display: block; + padding-bottom: 350px; +} + +#region_3 { + float: right; + min-width: 210px; + max-width: 220px; + width: 20%; +} + diff --git a/view/php/choklet.php b/view/php/choklet.php index 31b0b124c..fcfaf7804 100644 --- a/view/php/choklet.php +++ b/view/php/choklet.php @@ -7,7 +7,8 @@ </head>
<body>
<div id="blog-margin">
- <?php if(x($page,'nav')) echo $page['nav']; ?>
+ <header><?php if(x($page,'header')) echo $page['header']; ?></header>
+ <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"><?php if(x($page,'nav')) echo $page['nav']; ?></nav>
<div id="blog-banner"><?php if(x($page,'banner')) echo $page['banner']; ?></div>
<aside id="region_1"><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
<section id="region_2"><?php if(x($page,'content')) echo $page['content']; ?>
diff --git a/view/php/default.php b/view/php/default.php index 3573bf829..fd29ef3db 100644 --- a/view/php/default.php +++ b/view/php/default.php @@ -6,7 +6,8 @@ <?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?>
</head>
<body>
- <?php if(x($page,'nav')) echo $page['nav']; ?>
+ <header><?php if(x($page,'header')) echo $page['header']; ?></header>
+ <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"><?php if(x($page,'nav')) echo $page['nav']; ?></nav>
<aside id="region_1"><?php if(x($page,'aside')) echo $page['aside']; ?></aside>
<section id="region_2"><?php if(x($page,'content')) echo $page['content']; ?>
<div id="page-footer"></div>
diff --git a/view/php/full.php b/view/php/full.php index d8643d5a1..99653c06d 100644 --- a/view/php/full.php +++ b/view/php/full.php @@ -6,7 +6,8 @@ <?php if(x($page,'htmlhead')) echo $page['htmlhead'] ?> </head> <body> - <nav><?php if(x($page,'nav')) echo $page['nav']; ?></nav> + <header><?php if(x($page,'header')) echo $page['header']; ?></header> + <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"><?php if(x($page,'nav')) echo $page['nav']; ?></nav> <section><?php if(x($page,'content')) echo $page['content']; ?> <div id="page-footer"></div> </section> diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl index 7d2ce1b7a..7c2ea817d 100755 --- a/view/tpl/nav.tpl +++ b/view/tpl/nav.tpl @@ -1,9 +1,3 @@ -<header> -<!-- <div id="site-location">{{$sitelocation}}</div> --> - <div id="banner" class="hidden-sm hidden-xs">{{$banner}}</div> -</header> - -<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1"> @@ -175,11 +169,5 @@ </ul> </div> </div> -</nav> -<ul id="nav-notifications-template" style="display:none;" rel="template"> - <li class="{5}"><a href="{0}" title="{2} {3}"><img src="{1}"><span class='contactname'>{2}</span>{3}<br><span class="notif-when">{4}</span></a></li> -</ul> -{{if $langselector}}<div id="langselector" >{{$langselector}}</div>{{/if}} -<div id="panel" style="display: none;"></div> |