2
0
mirror of https://github.com/thumbsup/thumbsup synced 2024-11-03 15:40:14 +00:00

New <footer> config setting to add a line of text (or HTML) at the bottom

This commit is contained in:
Romain 2017-01-27 17:41:59 +11:00
parent dc7a7b5848
commit 7575da7474
8 changed files with 84 additions and 1 deletions

View File

@ -112,6 +112,10 @@ var opts = yargs
'google-analytics': {
description: 'Code for Google Analytics tracking',
type: 'string'
},
'footer': {
description: 'Optional text or HTML footer',
default: null
}
})
.config('config')
@ -142,5 +146,6 @@ index.build({
theme: opts['theme'],
css: opts['css'],
googleAnalytics: opts['google-analytics'],
index: opts['index']
index: opts['index'],
footer: opts['footer']
});

View File

@ -25,6 +25,7 @@ exports.build = function(rootAlbum, opts, callback) {
css: opts.css ? path.basename(opts.css) : null,
title: opts.title,
titleWords: opts.title.split(' '),
footer: opts.footer,
thumbSize: opts.thumbSize,
largeSize: opts.largeSize,
googleAnalytics: opts.googleAnalytics

View File

@ -71,4 +71,13 @@
{{~/each}}
</ul>
<!--
Optional footer
-->
{{#if gallery.footer}}
<footer>
<p>{{{gallery.footer}}}</p>
</footer>
{{/if}}
</div>

View File

@ -86,6 +86,21 @@ h1 a {
color: @header-foreground;
}
// -----------------------------------
// Footer
// -----------------------------------
footer {
color: #666;
font-size: 0.9em;
font-style: italic;
margin-top: 3em;
}
footer a {
color: #17baef;
}
// -----------------------------------
// Breadcrumbs navigation
// -----------------------------------

View File

@ -60,3 +60,12 @@
{{/if}}
{{/each}}
</ul>
<!--
Optional footer
-->
{{#if gallery.footer}}
<footer>
<p>{{{gallery.footer}}}</p>
</footer>
{{/if}}

View File

@ -77,6 +77,17 @@ nav li:not(.active):hover {
background-color: #eee;
}
footer {
color: #33609c;
font-size: 0.9em;
font-style: italic;
margin-top: 2em;
}
footer a {
color: #000;
}
#galleries a {
display: inline-block;
}

View File

@ -81,4 +81,13 @@
</section>
<!--
Optional footer
-->
{{#if gallery.footer}}
<footer>
<p>{{{gallery.footer}}}</p>
</footer>
{{/if}}
</div>

View File

@ -82,6 +82,24 @@ h1 a {
color: @header-foreground;
}
// -----------------------------------
// Footer
// -----------------------------------
footer {
border-top: 1px solid @header-foreground;
color: @header-foreground;
font-size: 0.8em;
font-style: italic;
margin-left: 2em;
margin-top: 3em;
padding-top: 0.5em;
}
footer a {
color: #555;
}
// -----------------------------------
// Breadcrumbs navigation
// -----------------------------------
@ -205,6 +223,12 @@ nav.breadcrumbs .separator {
margin: 0 0.5em 0 1.5em;
}
#media:after {
content: "";
display: table;
clear: both;
}
#media li {
float: left;
margin-right: 0.4em;