Доработка пакета

master
Антон Касимов 2018-12-17 13:13:59 +03:00
parent e8519fd954
commit c6ea6f685a
7 changed files with 23 additions and 11 deletions

View File

@ -1,3 +1,4 @@
{%- import 'macros.jinja2' as macros -%}
<!doctype html> <!doctype html>
<html ⚡> <html ⚡>
<head> <head>
@ -11,7 +12,7 @@
</head> </head>
<body> <body>
{% block body %} {% block body %}
{{content}} {{content|markdown}}
{% endblock %} {% endblock %}
{% include 'amp-counter.jinja2' %} {% include 'amp-counter.jinja2' %}
</body> </body>

View File

@ -1,4 +1,5 @@
{%- from 'macros.jinja2' import b -%} {%- import 'macros.jinja2' as macros -%}
{%- import 'forms.jinja2' as forms -%}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{request.locale_name}}"> <html lang="{{request.locale_name}}">
<head> <head>
@ -9,6 +10,9 @@
<meta name="description" content="{{description}}"> <meta name="description" content="{{description}}">
<meta name="generator" content="flatfilecms"> <meta name="generator" content="flatfilecms">
<link rel="icon" type="image/png" href="/static/img/favicon.png"> <link rel="icon" type="image/png" href="/static/img/favicon.png">
{% if amphtml is defined -%}
<link rel="amphtml" href="{{amphtml}}">
{% endif -%}
<title>{{title}}</title> <title>{{title}}</title>
{% block links %} {% block links %}
{%- endblock %} {%- endblock %}

View File

@ -0,0 +1,6 @@
<blockquote class="text-secondary border-left border-secondary mx-0 mx-md-2 mx-lg-4 mx-xl-5 pl-3">
<div{%if blockquote_collapse%} class="collapse" id="{{blockquote_id}}"{%endif%}>
{{blockquote_content}}
</div>
<footer class="blockquote-footer">{%if blockquote_collapse%}<a href="#{{blockquote_id}}" title="Раскрыть текст" data-toggle="collapse" data-target="#{{blockquote_id}}" aria-expanded="false" aria-controls="{{blockquote_id}}"><i class="fas fa-expand-arrows-alt"></i> {{blockquote_name}}</a>{%else%}{{blockquote_name}}{%endif%}</footer>
</blockquote>

View File

@ -1,5 +1,6 @@
<div{% if image %} style="background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url({{image}}) no-repeat center center; background-size:cover"{% endif %}> {% if header_class is not defined %}{% set header_class="dark" %}{%endif%}
<nav class="navbar navbar-expand-sm navbar-dark container"> <div{% if image %} style="background: linear-gradient(to bottom, {% if header_class=="dark" %}rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7){% else %}rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7){% endif %}), url({{image}}) no-repeat center center; background-size:cover"{% endif %}>
<nav class="navbar navbar-expand-sm navbar-{{header_class}} container">
<a href="/" class="navbar-brand"> <a href="/" class="navbar-brand">
{% include 'logo.jinja2' %} {% include 'logo.jinja2' %}
</a> </a>
@ -51,10 +52,10 @@
</ul> </ul>
</div> </div>
</nav> </nav>
<div class="jumbotron container text-white bg-transparent"> <div class="jumbotron container text-{% if header_class=="dark" %}light{% else %}dark{% endif %} bg-transparent">
<h1 class="display-4">{{title}}</h1> <h1 class="page-title">{{title}}</h1>
{%- if description %} {%- if description %}
<p class="lead">{{description}}</p> <p class="page-lead">{{description}}</p>
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@ -8,8 +8,8 @@
{% endwebpack %} {% endwebpack %}
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<header> <header class="sticky-top">
<nav id="nav-page" class="navbar navbar-expand-sm navbar-dark fixed-top"> <nav id="nav-page" class="navbar navbar-expand-sm navbar-{{header_class|default('light')}}">
<a href="/" class="navbar-brand"> <a href="/" class="navbar-brand">
{% include 'logo.jinja2' %} {% include 'logo.jinja2' %}
</a> </a>

View File

@ -6,7 +6,7 @@
{% endif %} {% endif %}
{% for name in ['why', 'what', 'who', 'call'] %} {% for name in ['why', 'what', 'who', 'call'] %}
{% if name in data %} {% if name in data %}
{{("{% call b(tag='section', id='"+name+"') %}")|safe}} {{("{% call macros.b(tag='section', id='"+name+"') %}")|safe}}
{{data[name]|safe}} {{data[name]|safe}}

View File

@ -10,7 +10,7 @@ with open(os.path.join(here, 'CHANGES.txt')) as f:
requires = [ requires = [
'plaster_pastedeploy', 'plaster_pastedeploy',
'pyramid >= 1.9a', 'pyramid >= 1.10',
'pyramid_debugtoolbar', 'pyramid_debugtoolbar',
'pyramid_jinja2', 'pyramid_jinja2',
'pyramid_retry', 'pyramid_retry',