summaryrefslogtreecommitdiff
path: root/templates/html.tpl
blob: d5c778e049c59db205887818ac5cdca6a011b7ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$bitlanguage|default:'en'}" lang="{$bitlanguage|default:'en'}" {$htmlTagAttributes} {if $gBitLanguage->isLanguageRTL()}dir="rtl"{/if}>
{if $gBitThemes->mDisplayMode}
	{assign var=displayClass value=$gBitThemes->mDisplayMode|cat:"mode"|cat:" "}
{/if}
{if $gQueryUser->mUserId}
	{assign var=userClass value="user"|cat:$gQueryUser->mUserId|cat:" "}
{/if}
{if $gContent->mContentId}
	{assign var=contentClass value="cid"|cat:$gContent->mContentId}
{/if}
{strip}
<head>
	<title>{$browserTitle} - {$gBitSystem->getConfig('site_title')}</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="referrer" content="always">

	<link rel="icon" href="{$gBitThemes->getStyleUrl()}favicon.png" type="image/png" />

	{**** if the theme has a header, it goes first ****}
	{if file_exists("`$smarty.const.CONFIG_THEME_PATH`theme_head_inc.tpl")}
		{include file="`$smarty.const.CONFIG_THEME_PATH`theme_head_inc.tpl"}
	{/if}

	{**** get custom head files from individual packages ****}
	{foreach from=$gBitThemes->mAuxFiles.templates.html_head_inc item=file}
		{include file=$file}
	{/foreach}

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="{$smarty.const.CONFIG_PKG_URL}js/html5shim/html5shiv.js"></script>
    <![endif]-->
</head>
<body itemscope itemtype="http://schema.org/WebPage"
	{if $gBitSystem->mOnload} onload="{foreach from=$gBitSystem->mOnload item=loadString}{$loadString}{/foreach}" {/if}
	{if $gBitSystem->mOnunload} onunload="{foreach from=$gBitSystem->mOnunload item=loadString}{$loadString}{/foreach}"	{/if} 
	id="{$gBitSystem->getActivePackage()}" class="{$displayClass}{$userClass}{$contentClass}">
{if $gBitSystem->mDebugHtml}
	<div id="bw_debughtml">
		<a href="#postdebug" onclick="document.getElementById('bw_debughtml').style.display='none';">Go to content</a>
		{$gBitSystem->mDebugHtml}
	</div>
	<a name="postdebug"></a>
{/if}

	{if $gBitSystem->isFeatureActive( 'bidirectional_text' )}<div dir="rtl">{/if}

	{if $gBitThemes->mDisplayMode != 'edit'}
		{if $gBitSystem->isFeatureActive( 'site_left_column' ) && !$gHideModules && $gBitThemes->hasColumnModules('l')}
			{assign var=leftCol value=$gBitThemes->fetchLayoutColumn('l')}
		{/if}

		{if $gBitSystem->isFeatureActive( 'site_right_column' ) && !$gHideModules && $gBitThemes->hasColumnModules('r')}
			{assign var=rightCol value=$gBitThemes->fetchLayoutColumn('r')}
		{/if}
	{/if}

	{if $leftCol && $rightCol}
		{assign var=extraColumns value=2}
	{elseif !empty($leftCol)}
		{assign var=extraColumns value=1}
	{elseif !empty($rightCol)}
		{assign var=extraColumns value=1}
	{else}
		{assign var=extraColumns value=0}{/if}

	{if $gBitSystem->isFeatureActive( 'site_top_column' ) && !$gHideModules}
	<header itemscope itemtype="http://schema.org/WPHeader" class="container{$gBitSystem->getConfig('layout-header')}" id="bw-main-header">
		{$gBitThemes->displayLayoutColumn('t')}
	{if $gBitSystem->getConfig('site_notice')}
	<div class="container{$gBitSystem->getConfig('layout-header')}">
		<div class="sitenotice">{$gBitSystem->getConfig('site_notice')}</div>
	</div>
	{/if}

	</header>
	{/if}

	<div id="bw-main-spacer-top"></div>

	<section id="bw-main-content" class="container{$gBitSystem->getConfig('layout-body')}"><div class="row">
		{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='row' serviceHash=$gContent->mInfo}

		{**** Theme Layout Modules : NAVIGATION ****}
		{if $leftCol}
		<nav id="navigation" class="col-md-3 col-sm-4 col-xs-12">
			<div class="row">
				{$leftCol}
			</div>
		</nav><!-- end #navigation -->{* needed by output filters. *}
		{/if}

		<main id="wrapper" class="col-md-{math equation='12-x*3' x=$extraColumns} col-sm-{math equation='12-x*4' x=$extraColumns} col-xs-12">
			{**** Theme Layout Modules : CENTER ****}
			{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='wrapper' serviceHash=$gContent->mInfo}
			{include file="bitpackage:liberty/display_structure.tpl"}
			{include file=$mid}
		</main><!-- end #wrapper -->

		{**** Theme Layout Modules : EXTRA ****}
		{if $rightCol}
		<nav id="extra" class="col-md-3 col-sm-4 col-xs-12">
			<div class="row">
				{$rightCol}
			</div>
		</nav><!-- end #extra -->{* needed by output filters. *}
		{/if}
	</div></section>

	<div id="bw-spacer-bottom"></div>

	<footer id="bw-main-footer" class="container{$gBitSystem->getConfig('layout-footer')}">
		{**** Theme Layout Modules : BOTTOM ****}
		{if $gBitSystem->isFeatureActive( 'site_bottom_column' ) && !$gHideModules}
			{$gBitThemes->displayLayoutColumn('b')}
		{/if}
		{* get custom footer files from individual packages *}
		{foreach from=$gBitThemes->mAuxFiles.templates.footer_inc item=file}
			{include file=$file}
		{/foreach}
	</footer>

	{if $gBitSystem->isFeatureActive( 'bidirectional_text' )}</div>{/if}
	{include file="bitpackage:kernel/footer.tpl"}
	</body>
</html>
{/strip}