mirror of
https://github.com/til-schneider/slim-wiki.git
synced 2025-08-07 00:56:35 +02:00
Added footer
This commit is contained in:
@@ -28,6 +28,15 @@ table {
|
||||
// See: https://github.com/less/less.js/issues/1903
|
||||
@small-screen-breakpoint: (@contentMaxWidth + 2 * @contentMinMarginX);
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.main-column {
|
||||
width: @contentMaxWidth;
|
||||
margin: 0 auto;
|
||||
@@ -44,3 +53,14 @@ table {
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 30px 0 150px;
|
||||
}
|
||||
|
||||
footer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
@@ -2,7 +2,6 @@
|
||||
font-size: 16px;
|
||||
color: @colorText;
|
||||
line-height: 1.4;
|
||||
padding-top: 30px;
|
||||
|
||||
p, h5, h6 {
|
||||
margin: 15px 0;
|
||||
|
@@ -26,3 +26,14 @@ a:hover, a:active {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
}
|
||||
|
||||
footer {
|
||||
height: 50px;
|
||||
padding-top: 30px;
|
||||
border-top: 1px solid #ddd;
|
||||
color: #666;
|
||||
background: #f5f5f5;
|
||||
|
||||
font-size: 13px;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
@@ -1,3 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (function_exists('date_default_timezone_set')) {
|
||||
date_default_timezone_set('Europe/Berlin');
|
||||
}
|
||||
|
||||
$config['wikiName'] = 'Slim Wiki';
|
||||
|
||||
//$config['footerHtml'] = '© Copyright 2000-'.date('Y').' My name';
|
||||
|
@@ -22,21 +22,28 @@
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<nav class="breadcrumbs"><div class="main-column"><?php
|
||||
$isFirst = true;
|
||||
foreach ($data['breadcrumbs'] as $item) {
|
||||
if (! $isFirst) {
|
||||
echo ' / ';
|
||||
<div id="wrapper">
|
||||
<nav class="breadcrumbs"><div class="main-column"><?php
|
||||
$isFirst = true;
|
||||
foreach ($data['breadcrumbs'] as $item) {
|
||||
if (! $isFirst) {
|
||||
echo ' / ';
|
||||
}
|
||||
if ($item['active']) {
|
||||
echo $item['name'];
|
||||
} else {
|
||||
?><a href="<?php echo $data['basePath'] . $item['path']; ?>"><?php echo $item['name']; ?></a><?php
|
||||
}
|
||||
$isFirst = false;
|
||||
}
|
||||
if ($item['active']) {
|
||||
echo $item['name'];
|
||||
} else {
|
||||
?><a href="<?php echo $data['basePath'] . $item['path']; ?>"><?php echo $item['name']; ?></a><?php
|
||||
}
|
||||
$isFirst = false;
|
||||
?></div></nav>
|
||||
<article class="content main-column"><?php echo $data['articleHtml']; ?></article>
|
||||
<?php
|
||||
if (isset($data['footerHtml'])) {
|
||||
?><footer><div class="main-column"><?php echo $data['footerHtml']; ?></div></footer><?php
|
||||
}
|
||||
?></div></nav>
|
||||
<article class="content main-column"><?php echo $data['articleHtml']; ?></article>
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<!-- build:js client/view.js -->
|
||||
|
@@ -21,7 +21,10 @@ class Main {
|
||||
$data = array();
|
||||
$data['baseUrl'] = $baseUrl;
|
||||
$data['basePath'] = $basePath;
|
||||
$data['wikiName'] = $config['wikiName'];
|
||||
|
||||
foreach (array('wikiName', 'footerHtml') as $key) {
|
||||
$data[$key] = $config[$key];
|
||||
}
|
||||
|
||||
$data['breadcrumbs'] = $this->createBreadcrumbs($articleBaseDir, $requestPathArray, $config['wikiName']);
|
||||
|
||||
|
Reference in New Issue
Block a user