Rename template vars from path to url.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<meta name="viewport" content="width=device-width">
|
||||
|
||||
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans">
|
||||
<link rel="stylesheet" href="{{ theme.path }}/css/style.min.css">
|
||||
<link rel="stylesheet" href="{{ theme.url }}/css/style.min.css">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="four columns thumbnail
|
||||
{% if loop.index % 4 == 1 %}alpha{% endif%}
|
||||
{% if loop.index % 4 == 0 %}omega{% endif%}">
|
||||
<a href="{{ album.path }}">
|
||||
<a href="{{ album.url }}">
|
||||
<img src="{{ album.thumb }}" class="album_thumb"
|
||||
alt="{{ album.name }}" title="{{ album.name }}" /></a>
|
||||
<span class="album_title">{{ album.title }}</span>
|
||||
@@ -66,8 +66,8 @@
|
||||
</div>
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
|
||||
<script>!window.jQuery && document.write(unescape('%3Cscript src="{{ theme.path }}/js/jquery-1.8.2.min.js"%3E%3C/script%3E'))</script>
|
||||
<script src="{{ theme.path }}/js/jquery.colorbox.min.js"></script>
|
||||
<script>!window.jQuery && document.write(unescape('%3Cscript src="{{ theme.url }}/js/jquery-1.8.2.min.js"%3E%3C/script%3E'))</script>
|
||||
<script src="{{ theme.url }}/js/jquery.colorbox.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(".gallery").colorbox({
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<meta name="viewport" content="width=device-width">
|
||||
|
||||
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Molengo">
|
||||
<link rel="stylesheet" href="{{ theme.path }}/css/style.min.css?v=2">
|
||||
<link rel="stylesheet" href="{{ theme.url }}/css/style.min.css?v=2">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
@@ -28,7 +28,7 @@
|
||||
<!-- <h1>Albums</h1> -->
|
||||
<ul>
|
||||
{% for album in albums %}
|
||||
<li><a href="{{ album.path }}">
|
||||
<li><a href="{{ album.url }}">
|
||||
<img src="{{ album.thumb }}" class="album_thumb" alt="{{ album.name }}" title="{{ album.name }}" /></a>
|
||||
<span class="album_title">{{ album.title }}</span>
|
||||
</li>
|
||||
@@ -62,9 +62,9 @@
|
||||
|
||||
{% if images %}
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
|
||||
<script>!window.jQuery && document.write(unescape('%3Cscript src="{{ theme.path }}/js/jquery-1.8.2.min.js"%3E%3C/script%3E'))</script>
|
||||
<script src="{{ theme.path }}/js/galleria-1.2.8.min.js"></script>
|
||||
<script src="{{ theme.path }}/js/galleria.classic.min.js"></script>
|
||||
<script>!window.jQuery && document.write(unescape('%3Cscript src="{{ theme.url }}/js/jquery-1.8.2.min.js"%3E%3C/script%3E'))</script>
|
||||
<script src="{{ theme.url }}/js/galleria-1.2.8.min.js"></script>
|
||||
<script src="{{ theme.url }}/js/galleria.classic.min.js"></script>
|
||||
<script>
|
||||
Galleria.configure({
|
||||
imageCrop: false,
|
||||
|
||||
@@ -102,7 +102,7 @@ class Writer():
|
||||
self.logger.info("Output path : %s", path)
|
||||
|
||||
ctx = copy.deepcopy(self.ctx)
|
||||
ctx['theme']['path'] = os.path.relpath(self.theme_path, path)
|
||||
ctx['theme']['url'] = os.path.relpath(self.theme_path, path)
|
||||
ctx['index_url'] = os.path.relpath(self.output_dir, path) + '/'
|
||||
|
||||
# paths to upper directories (with titles and links)
|
||||
@@ -135,7 +135,7 @@ class Writer():
|
||||
quality=self.settings['jpg_quality'])
|
||||
|
||||
ctx['albums'].append({
|
||||
'path': d + '/',
|
||||
'url': d + '/',
|
||||
'title': paths[dpath]['title'],
|
||||
'thumb': os.path.join(d, thumb_name)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user