Merge pull request #63 from Psycojoker/light

light thme can be use for principal theme
This commit is contained in:
Laurent Peuch 2016-11-01 14:07:08 +01:00 committed by GitHub
commit 676830b239
12 changed files with 67 additions and 37 deletions

View File

@ -4,9 +4,9 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
{% block css %} {% block css %}
{% endblock %} {% endblock %}
{% if settings.rss -%} {% if settings.rss %}
<link rel="alternate" type="application/rss+xml" title="{{ settings.title }}" href="{{ settings.url }}/feed.xml" /> <link rel="alternate" type="application/rss+xml" title="{{ settings.title }}" href="{{ settings.url }}/feed.xml" />
{% endif -%} {% endif %}
<!--Let browser know website is optimized for mobile--> <!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>{{ settings.title }}</title> <title>{{ settings.title }}</title>
@ -18,11 +18,11 @@
{% block logo %} {% block logo %}
{% endblock %} {% endblock %}
<h1>{{ settings.title }}</h1> <h1>{{ settings.title }}</h1>
{% if settings.sub_title -%}<h4>{{ settings.sub_title }}</h4>{% endif -%} {% if settings.sub_title %}<h4>{{ settings.sub_title }}</h4>{% endif %}
<hr> <hr>
{% if settings.menu -%} {% if settings.menu %}
{% include 'menu.html' %} {% include 'menu.html' %}
{% endif -%} {% endif %}
</div> </div>

View File

@ -7,14 +7,14 @@
<atom:link href="{{ settings.url }}/feed.xml" rel="self" type="application/rss+xml" /> <atom:link href="{{ settings.url }}/feed.xml" rel="self" type="application/rss+xml" />
{% for gallery in galleries %} {% for gallery in galleries %}
{% set absolute_url = settings.url + "/" + gallery.link -%} {% set absolute_url = settings.url + "/" + gallery.link %}
<item> <item>
<title>{{ gallery.title }}</title> <title>{{ gallery.title }}</title>
<link>{{ absolute_url }}</link> <link>{{ absolute_url }}</link>
<guid>{{ gallery.link }}</guid> <guid>{{ gallery.link }}</guid>
{% if gallery.sub_title -%} {% if gallery.sub_title %}
<description>{{ gallery.sub_title }}</description> <description>{{ gallery.sub_title }}</description>
{% endif -%} {% endif %}
<pubDate>{{ gallery.date }}</pubDate> <pubDate>{{ gallery.date }}</pubDate>
</item> </item>
{% endfor %} {% endfor %}

View File

@ -1,9 +1,9 @@
{% if settings.licence is not defined %} {% if settings.licence is not defined %}
{% set licence_url = 'https://creativecommons.org/licenses/by-sa/3.0/' -%} {% set licence_url = 'https://creativecommons.org/licenses/by-sa/3.0/' %}
{% set licence_name = 'CC-BY-SA' -%} {% set licence_name = 'CC-BY-SA' %}
{% else %} {% else %}
{% set licence_url = settings.licence.url -%} {% set licence_url = settings.licence.url %}
{% set licence_name = settings.licence.name -%} {% set licence_name = settings.licence.name %}
{% endif %} {% endif %}
<footer> <footer>

View File

@ -1,10 +1,15 @@
{% if settings.settings.light_mode %}
{% set pathstatic = "." %}
{% else %}
{% set pathstatic = ".." %}
{% endif %}
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8"> <meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="./static/css/fonts.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="{{ pathstatic }}/static/css/fonts.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="./static/css/style-page.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="{{ pathstatic }}/static/css/style-page.css" media="screen,projection"/>
<!--Let browser know website is optimized for mobile--> <!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
@ -31,6 +36,5 @@
</div> </div>
</div> </div>
{% include "footer.html" %} {% include "footer.html" %}
</body> </body>
</html> </html>

View File

@ -20,7 +20,7 @@
<h2>{{ gallery.title }}</h2> <h2>{{ gallery.title }}</h2>
{% if gallery.sub_title %}<h3>{{ gallery.sub_title }}</h3>{% endif %} {% if gallery.sub_title %}<h3>{{ gallery.sub_title }}</h3>{% endif %}
{% if settings.show_date and gallery.date %}<div class="gallery-datetime">{{ gallery.date.strftime("%d %B %Y") }}</div>{% endif %} {% if settings.show_date and gallery.date %}<div class="gallery-datetime">{{ gallery.date.strftime("%d %B %Y") }}</div>{% endif %}
{% if gallery.tags %}<div class="gallery-tag">IN {% for tag in gallery.tags -%} <span> {{ tag }}</span> {% endfor -%}</div>{% endif %} {% if gallery.tags %}<div class="gallery-tag">IN {% for tag in gallery.tags %} <span> {{ tag }}</span> {% endfor %}</div>{% endif %}
</div> </div>
</a> </a>
{% if gallery.cover_type == "video" %} {% if gallery.cover_type == "video" %}

View File

@ -1,19 +1,19 @@
<nav> <nav>
<div class="nav-wrapper"> <div class="nav-wrapper">
<ul> <ul>
{%- for line in settings.menu -%} {% for line in settings.menu %}
{% set file_name, menu_name = line.items()[0] %} {% set file_name, menu_name = line.items()[0] %}
{% if file_name.startswith('http') %} {% if file_name.startswith('http') %}
{% set file_name = file_name %} {% set file_name = file_name %}
{% elif gallery %} {% elif gallery %}
{% set file_name = "../"+file_name %} {% set file_name = "../"+file_name %}
{%- endif -%} {% endif %}
{%- if loop.first -%} {% if loop.first %}
<li><a href={{ file_name }} class=first-item-menu>{{ menu_name }}</a></li> <li><a href={{ file_name }} class=first-item-menu>{{ menu_name }}</a></li>
{% else %} {% else %}
<li><a href={{ file_name }} class=item-menu>{{ menu_name }}</a></li> <li><a href={{ file_name }} class=item-menu>{{ menu_name }}</a></li>
{%- endif -%} {% endif %}
{%- endfor -%} {% endfor %}
</ul> </ul>
</div> </div>
</nav> </nav>

View File

@ -1,9 +1,15 @@
{% extends "base.html" %} {% extends "base.html" %}
{% if settings.settings.light_mode %}
{% set pathstatic = "../" %}
{% else %}
{% set pathstatic = "" %}
{% endif %}
{% block css %} {% block css %}
<link type="text/css" rel="stylesheet" href="../static/css/fonts.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="{{ pathstatic }}static/css/fonts.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="../static/css/style.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="{{ pathstatic }}static/css/style.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="../static/css/style-page.css" media="screen,projection"/> <link type="text/css" rel="stylesheet" href="{{ pathstatic }}static/css/style-page.css" media="screen,projection"/>
{% endblock %} {% endblock %}
{% block logo %} {% block logo %}
@ -22,11 +28,11 @@
<div class="back-to-home"> <div class="back-to-home">
<hr> <hr>
<a href="../index.html"> <a href="../index.html">
<div id="logo" src="../static/img/logo.svg"/> <div id="logo" src="{{ pathstatic }}/static/img/logo.svg"/>
HOME HOME
</div> </div>
</a> </a>
</div> </div>
<script type="text/javascript" src="../static/js/jquery-2.1.4.min.js" charset="utf-8"></script> <script type="text/javascript" src="{{ pathstatic }}static/js/jquery-2.1.4.min.js" charset="utf-8"></script>
{% endblock %} {% endblock %}

View File

@ -1,3 +1,8 @@
{% if settings.settings.light_mode %}
{% set pathstatic = ".." %}
{% else %}
{% set pathstatic = "." %}
{% endif %}
{% if section.image.type == "video" %} {% if section.image.type == "video" %}
{% set video = Video(section.image) %} {% set video = Video(section.image) %}
{{ video.copy() }} {{ video.copy() }}
@ -8,13 +13,13 @@
{% endif %} {% endif %}
{% if video %} {% if video %}
<section class="bordered-picture"> <section class="bordered-picture">
<video class="lazy" id="video" poster="../{{ video.generate_thumbnail("800") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted> <video class="lazy" id="video" poster="{{ pathstatic }}/{{ video.generate_thumbnail("800") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
<source src="../{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm"> <source src="{{ pathstatic }}/{{ video }}" type="video/webm" data-source="{{ video }}" data-format="vp8" data-extension="webm">
</video> </video>
</section> </section>
{% else %} {% else %}
<section class="bordered-picture"> <section class="bordered-picture">
<img src="../{{ image.generate_thumbnail("x800") }}" alt="{% if caption %}{{ caption }}{% endif %}"> <img src="{{ pathstatic }}/{{ image.generate_thumbnail("x800") }}" alt="{% if caption %}{{ caption }}{% endif %}">
</section> </section>
{% endif %} {% endif %}

View File

@ -1,3 +1,8 @@
{% if settings.settings.light_mode %}
{% set pathstatic = ".." %}
{% else %}
{% set pathstatic = "." %}
{% endif %}
{% if section.image.type == "video" %} {% if section.image.type == "video" %}
{% set video = Video(section.image) %} {% set video = Video(section.image) %}
{{ video.copy() }} {{ video.copy() }}
@ -9,10 +14,10 @@
<div class="image"> <div class="image">
{% if video %} {% if video %}
<video autoplay loop muted class="fillWidth"> <video autoplay loop muted class="fillWidth">
<source src="../{{ video }}" type="video/webm" data-source="../{{ video }}" data-format="vp8" data-extension="webm"> <source src="{{ pathstatic }}/{{ video }}" type="video/webm" data-source="{{ pathstatic }}/{{ video }}" data-format="vp8" data-extension="webm">
</video> </video>
{% else %} {% else %}
<img src="../{{ image.generate_thumbnail("x800") }}"> <img src="{{ pathstatic }}/{{ image.generate_thumbnail("x800") }}">
{% endif %} {% endif %}
</div> </div>
{% if section.text %} {% if section.text %}

View File

@ -1,5 +1,10 @@
{% if settings.settings.light_mode %}
{% set pathstatic = ".." %}
{% else %}
{% set pathstatic = "." %}
{% endif %}
{% set image = Image(section.image) %} {% set image = Image(section.image) %}
{{ image.copy() }} {{ image.copy() }}
<section class="panorama"> <section class="panorama">
<img src="../{{ image.generate_thumbnail("x800") }}"> <img src="{{ pathstatic }}/{{ image.generate_thumbnail("x800") }}">
</section> </section>

View File

@ -1,3 +1,8 @@
{% if settings.settings.light_mode %}
{% set pathstatic = ".." %}
{% else %}
{% set pathstatic = "." %}
{% endif %}
<section class="pictures-group"> <section class="pictures-group">
{% for line in section.images %} {% for line in section.images %}
{% for image in line %} {% for image in line %}
@ -12,12 +17,12 @@
{% endif %} {% endif %}
<div class="image"> <div class="image">
{% if video %} {% if video %}
<video id="video" poster="../{{ video.generate_thumbnail("800") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted> <video id="video" poster="{{ pathstatic }}/{{ video.generate_thumbnail("800") }}" alt="" autoplay="autoplay" loop="loop" preload="auto" muted>
<source src="../{{ video }}" type="video/webm" data-source="../{{ video }}" data-format="vp8" data-extension="webm"> <source src="{{ pathstatic }}/{{ video }}" type="video/webm" data-source="{{ pathstatic }}/{{ video }}" data-format="vp8" data-extension="webm">
</video> </video>
{% set video = "" %} {% set video = "" %}
{% else %} {% else %}
<img src="../{{ image.generate_thumbnail("x800") }}" alt="{% if caption %}{{ caption }}{% endif %}"> <img src="{{ pathstatic }}/{{ image.generate_thumbnail("x800") }}" alt="{% if caption %}{{ caption }}{% endif %}">
{% endif %} {% endif %}
</div> </div>
{% endfor %} {% endfor %}

View File

@ -1,9 +1,9 @@
{% set absolute_url = settings.url + "/" + link -%} {% set absolute_url = settings.url + "/" + link %}
<div class=share> <div class=share>
<h5>Share this story</h5> <h5>Share this story</h5>
<ul class="icon"> <ul class="icon">
<li> <li>
<a class="twitter" href="https://twitter.com/share?text={{ gallery.name }}&url={{absolute_url}}{%if gallery.tags %}&hashtags={% for tag in gallery.tags -%}{{ tag }}{% if not loop.lirst and not loop.last %},{% endif %}{% endfor -%}{% endif -%}" target="_blank">Twitter</a> <a class="twitter" href="https://twitter.com/share?text={{ gallery.name }}&url={{absolute_url}}{%if gallery.tags %}&hashtags={% for tag in gallery.tags %}{{ tag }}{% if not loop.lirst and not loop.last %},{% endif %}{% endfor %}{% endif %}" target="_blank">Twitter</a>
</li> </li>
<li> <li>
<a class="facebook" href="http://www.facebook.com/share.php?u={{absolute_url}}" target="_blank">Facebook</a> <a class="facebook" href="http://www.facebook.com/share.php?u={{absolute_url}}" target="_blank">Facebook</a>