Remove the index link from the breadcumb.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -17,11 +17,12 @@ ul {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
header {
|
||||
margin-top: 40px;
|
||||
margin-bottom: 0;
|
||||
|
||||
a { text-decoration: none; }
|
||||
h1 { margin-bottom: 10px; }
|
||||
h2 { margin-top: 10px; }
|
||||
h1 a, h2 a { text-decoration: none; }
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
|
||||
@@ -18,7 +18,10 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<header class="sixteen columns">
|
||||
<h1>{{ paths }}</h1>
|
||||
<h1>{{ index_link }}</h1>
|
||||
{% if breadcumb %}
|
||||
<h2>» {{ breadcumb }}</h2>
|
||||
{% endif %}
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -29,8 +29,9 @@ header {
|
||||
padding: 1em 0;
|
||||
color: #dadada;
|
||||
|
||||
h1 {
|
||||
h1, h2 {
|
||||
color: #eee;
|
||||
margin: 10px 0;
|
||||
|
||||
a, a:link, a:visited {
|
||||
color: #eee;
|
||||
|
||||
@@ -18,8 +18,10 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1>{{ paths }}</h1>
|
||||
<!-- <h1><a href="{{ index_url }}">{{ gallery_name }}</a>{% if title %} - {{ title }}{% endif %}</h1> -->
|
||||
<h1>{{ index_link }}</h1>
|
||||
{% if breadcumb %}
|
||||
<h2>» {{ breadcumb }}</h2>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<div id="main" role="main">
|
||||
|
||||
@@ -87,6 +87,7 @@ class Writer():
|
||||
'theme': {'name': os.path.basename(self.theme)},
|
||||
'images': [],
|
||||
'albums': [],
|
||||
'breadcumb': ''
|
||||
}
|
||||
|
||||
def copy_assets(self):
|
||||
@@ -104,16 +105,22 @@ class Writer():
|
||||
ctx = copy.deepcopy(self.ctx)
|
||||
ctx['theme']['url'] = os.path.relpath(self.theme_path, path)
|
||||
ctx['index_url'] = os.path.relpath(self.output_dir, path) + '/'
|
||||
ctx['index_link'] = link(ctx['index_url'], paths['.']['title'])
|
||||
|
||||
# paths to upper directories (with titles and links)
|
||||
tmp_path = relpath
|
||||
ctx['paths'] = link('.', paths[tmp_path]['title'])
|
||||
if relpath != '.':
|
||||
tmp_path = relpath
|
||||
breadcumb = [link('.', paths[tmp_path]['title'])]
|
||||
|
||||
while tmp_path != '.':
|
||||
tmp_path = os.path.normpath(os.path.join(tmp_path, '..'))
|
||||
url = os.path.relpath(tmp_path, relpath) + '/'
|
||||
ctx['paths'] = link(url, paths[tmp_path]['title']) + \
|
||||
PATH_SEP + ctx['paths']
|
||||
while True:
|
||||
tmp_path = os.path.normpath(os.path.join(tmp_path, '..'))
|
||||
if tmp_path == '.':
|
||||
break
|
||||
|
||||
url = os.path.relpath(tmp_path, relpath) + '/'
|
||||
breadcumb.append(link(url, paths[tmp_path]['title']))
|
||||
|
||||
ctx['breadcumb'] = PATH_SEP.join(reversed(breadcumb))
|
||||
|
||||
for i in paths[relpath]['img']:
|
||||
ctx['images'].append({'file': i,
|
||||
|
||||
Reference in New Issue
Block a user