Add a setting to specify a list of links and adapt the themes to show the links.

This commit is contained in:
Simon
2012-12-22 16:13:52 +01:00
parent 14224154f1
commit 99ef37879b
8 changed files with 149 additions and 36 deletions

View File

@@ -39,6 +39,7 @@ _DEFAULT_CONFIG = {
'ext_list': ['.jpg', '.jpeg', '.JPG', '.JPEG', '.png'],
'theme': 'colorbox',
'index_in_url': False,
'links': '',
'google_analytics': ''
}

File diff suppressed because one or more lines are too long

View File

@@ -17,12 +17,27 @@ ul {
padding-left: 20px;
}
header {
margin-top: 40px;
.container {
margin: 0 0 0 40px;
}
h1 { margin-bottom: 10px; }
h2 { margin-top: 10px; }
h1 a, h2 a { text-decoration: none; }
header {
h1 a { text-decoration: none; }
}
.sidebar {
h1 {
font-size: 35px;
line-height: 40px;
margin: 40px 0;
a { text-decoration: none; }
}
footer {
position: absolute;
bottom: 40px;
}
}
.thumbnail {
@@ -46,4 +61,31 @@ header {
.album_thumb {}
.album_title {
display: block;
}
}
@media only screen and (min-width: 767px) {
header {
margin-top: 40px;
}
.sidebar {
position: fixed;
height: 100%;
width: 220px;
}
}
@media only screen and (max-width: 767px) {
.container {
padding-bottom: 40px;
}
.sidebar footer {
bottom: 10px;
}
}
@media only screen and (min-width: 768px) and (max-width: 959px) {
.sidebar {
width: 172px;
}
}

View File

@@ -17,21 +17,42 @@
</head>
<body>
<div class="container">
<header class="sixteen columns">
<h1>{{ index_link }}</h1>
{% if breadcumb %}
<h2>» {{ breadcumb }}</h2>
{% endif %}
<hr>
</header>
<div id="main" role="main" class="sixteen columns">
<div class="four columns">
<div class="sidebar">
<h1>{{ index_link }}</h1>
{% if settings.links %}
<nav id="menu">
<ul>
{% for title, link in settings.links %}
<li><a href="{{ link }}">{{ title }}</a></li>
{% endfor %}
</ul>
</nav>
{% endif %}
<footer>
<p>{% if author %}&copy; {{ author }} - {% endif %}
Generated by <a href="{{ sigal_link }}">sigal</a></p>
</footer>
</div>
</div>
<div id="main" role="main" class="twelve columns offset-by-four">
<header>
{% if breadcumb %}
<h2>{{ breadcumb }}</h2>
<hr>
{% endif %}
</header>
{% if albums %}
<div id="albums" class="row">
{% for album in albums %}
<div class="four columns thumbnail
{% if loop.index % 4 == 1 %}alpha{% endif%}
{% if loop.index % 4 == 0 %}omega{% endif%}">
{% if loop.index % 3 == 1 %}alpha{% endif%}
{% if loop.index % 3 == 0 %}omega{% endif%}">
<a href="{{ album.url }}">
<img src="{{ album.thumb }}" class="album_thumb"
alt="{{ album.name }}" title="{{ album.name }}" /></a>
@@ -45,8 +66,8 @@
<div id="gallery" class="row">
{% for image in images %}
<div class="four columns thumbnail
{% if loop.index % 4 == 1 %}alpha{% endif%}
{% if loop.index % 4 == 0 %}omega{% endif%}">
{% if loop.index % 3 == 1 %}alpha{% endif%}
{% if loop.index % 3 == 0 %}omega{% endif%}">
<a href="{{ image.file }}" class="gallery" title="{{ image.file }}">
<img src="{{ image.thumb }}" alt="{{ image.file }}"
title="{{ image.file }}" /></a>
@@ -61,11 +82,6 @@
</div>
{% endif %}
</div>
<footer class="sixteen columns">
<p>{% if author %}&copy; {{ author }} - {% endif %}
Generated by <a href="{{ sigal_link }}">sigal</a></p>
</footer>
</div>
{% if images %}

File diff suppressed because one or more lines are too long

View File

@@ -2,10 +2,14 @@
@import "normalize";
$textColor: #aaa;
$titleColor: #eee;
$linkColor: #999;
body {
font: 16px/1.5 Molengo, sans-serif;
background-color: #242424;
color: #aaa;
color: $textColor;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
@@ -16,7 +20,7 @@ body {
}
a, a:link, a:visited {
color: #999;
color: $linkColor;
text-decoration: underline;
}
a:hover {
@@ -27,14 +31,13 @@ a:hover {
header {
padding: 1em 0;
color: #dadada;
color: $titleColor;
h1, h2 {
color: #eee;
margin: 10px 0;
color: $titleColor;
a, a:link, a:visited {
color: #eee;
color: $titleColor;
text-shadow: 0 2px 0 #000;
text-decoration: none;
}
@@ -43,6 +46,42 @@ header {
text-decoration: none;
}
}
h1, h2 {
margin: 10px 0;
}
h1, #menu {
display: inline-block;
width: 49.5%;
}
#menu {
text-align: right;
ul {
list-style-type: none;
margin: 0 0 10px;
padding: 0;
li {
display: inline-block;
a, a:link, a:visited {
color: $textColor;
border-bottom: 1px solid $textColor;
padding-bottom: 2px;
margin-left: 5px;
text-decoration: none;
}
a:hover {
color: $titleColor;
border-color: $titleColor;
text-decoration: none;
}
}
}
}
}
/* gallery */
@@ -78,7 +117,7 @@ header {
.album_thumb {}
.album_title {
display: block;
color: #dadada;
color: $titleColor;
font-size: 1.3em;
font-variant: small-caps;
font-weight: bold;

View File

@@ -18,10 +18,21 @@
<body>
<div class="container">
<header>
<h1>{{ index_link }}</h1>
{% if breadcumb %}
<h2>» {{ breadcumb }}</h2>
{% endif %}
<h1>{{ index_link }}</h1>
{% if settings.links %}
<nav id="menu">
<ul>
{% for title, link in settings.links %}
<li><a href="{{ link }}">{{ title }}</a></li>
{% endfor %}
</ul>
</nav>
{% endif %}
{% if breadcumb %}
<h2>{{ breadcumb }}</h2>
{% endif %}
</header>
<div id="main" role="main">

View File

@@ -39,6 +39,10 @@ keep_orig = True
# Add index.html to the URLs
# index_in_url = False
# A list of links (tuples (title, URL))
links = [('Example link', 'http://example.org'),
('Another link', 'http://example.org')]
# Keep exif metadatas in output image (default: False)
copy_exif = True