-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy paththeme.php
More file actions
139 lines (128 loc) · 5.04 KB
/
Copy paththeme.php
File metadata and controls
139 lines (128 loc) · 5.04 KB
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
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<?php
global $Wcms;
if(defined('VERSION') && !defined('version'))
define('version', VERSION);
if(version<'2.0.0')
defined('INC_ROOT') OR die('Direct access is not allowed.');
$theme_css = 'css/style-adivvyo.css';
$Wcms->addListener('menu', 'getMenuAdivvyo'); // in functions.php
$Wcms->addListener('settings', 'alterAdmin'); // in functions.php
$currentSlug = implode('/', $Wcms->currentPageTree); // used in meta tags
?>
<html lang="en">
<head>
<title><?=wCMS::get('config','siteTitle')?> - <?=wCMS::page('title')?></title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<?=wCMS::page('description')?>">
<meta name="keywords" content="<?=wCMS::page('keywords')?>">
<meta property="og:type" content="<?=acGet($currentSlug .'|og:type') ?: 'website' ?>">
<meta property="og:image" content="<?=acGet($currentSlug . '|og:image')?>">
<meta property="og:url" content="<?=acGet($currentSlug . '|og:url')?>">
<meta property="og:description" content="<?=acGet($currentSlug . '|og:description')?>">
<meta property="og:title" content="<?=acGet($currentSlug .'|og:title') ?: wCMS::get('config','siteTitle')?>">
<meta property="og:site_name" content="<?=acGet($currentSlug .'|og:site_name') ?: wCMS::get('config','siteTitle')?>">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link id="stylesheet" rel="stylesheet" href="<?=wCMS::asset($theme_css)?>">
<link href='https://fonts.googleapis.com/css?family=Baumans' rel='stylesheet'>
<?=wCMS::css()?>
<?php
# If /favicon.xxx exists, insert a <link> for it
foreach (array('png','jpg','gif','ico') as $ext) {
$ico_file = '/favicon.' . $ext;
$ico_path = $Wcms->rootDir . $ico_file;
if (file_exists($ico_path)) {
echo "\n";
echo "\t<link rel=\"icon\" type=\"image/$ext\" href=\"$ico_file\">";
echo "\n";
break; # Break out of the foreach loop
}
}
?>
</head>
<body>
<?=wCMS::alerts()?>
<?=wCMS::settings()?>
<nav class="navbar navbar-default">
<div class="container css3-shadow colorBackground">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu-collapse">
<span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="<?=wCMS::url()?>">
<?php
# If there is a title_logo.png in place, use it, else the siteTitle
$logo_file = 'title_logo.png';
$logo_url = $Wcms->asset("img/" . $logo_file);
$logo_on_disk = $Wcms->rootDir .
'/themes/' . $Wcms->get('config', 'theme') . '/img/' . $logo_file;
if (file_exists($logo_on_disk)) {
echo "<img class=\"navbar-brand title-logo\" src=\"$logo_url\">";
} else {
echo wCMS::get('config','siteTitle');
}
?>
</a>
</div>
<div class="collapse navbar-collapse" id="menu-collapse">
<ul class="nav navbar-nav navbar-right">
<?=wCMS::menu()?>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row-fluid">
<div class="box css3-shadow whiteBackground col-lg-12 text-left padding40 d-flex" style="min-height:85vh">
<?=wCMS::page('content')?>
</div>
</div>
</div>
<?php
// This loggedIn check was added after I upgraded to 3.6.0 and discovered the
// bug reported here: https://github.com/hightowe/wcms-theme-adivvyo/issues/2
?>
<?php if (!$Wcms->loggedIn): ?>
<div class="container-fluid footer colorBackground">
<div class="whiteFont col-lg-12 text-center">
<!-- ?=wCMS::block('subside')? -->
<?=wCMS::footer()?>
<?=getSiteLinkedInLink()?>
</div>
</div>
<?php endif ?>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/jquery.autosize/3.0.17/autosize.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>
$(document).ready(function() {
$('.submenu-toggle, .nav-placeholder > .nav-link').on('click', function(e) {
var $parent = $(this).closest('li');
var $submenu = $parent.find('> .subPageDropdown');
var $toggle = $parent.find('> .submenu-toggle');
if ($(window).width() < 768) {
// Mobile accordion behavior
e.preventDefault();
$submenu.slideToggle();
$toggle.toggleClass('open');
} else {
// Desktop/Tablet click-to-open behavior
e.preventDefault();
// Close other open submenus if they aren't parents of this one
$('.nav-item.clicked-open').not($parent.parents()).not($parent).removeClass('clicked-open');
$parent.toggleClass('clicked-open');
}
});
// Close submenus when clicking outside
$(document).on('click', function(e) {
if (!$(e.target).closest('.nav-item').length) {
$('.nav-item.clicked-open').removeClass('clicked-open');
}
});
});
</script>
<?=wCMS::js()?>
</body>
</html>