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

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>
<html ⚡>
<head>
@ -11,7 +12,7 @@
</head>
<body>
{% block body %}
{{content}}
{{content|markdown}}
{% endblock %}
{% include 'amp-counter.jinja2' %}
</body>

View File

@ -1,4 +1,5 @@
{%- from 'macros.jinja2' import b -%}
{%- import 'macros.jinja2' as macros -%}
{%- import 'forms.jinja2' as forms -%}
<!DOCTYPE html>
<html lang="{{request.locale_name}}">
<head>
@ -9,6 +10,9 @@
<meta name="description" content="{{description}}">
<meta name="generator" content="flatfilecms">
<link rel="icon" type="image/png" href="/static/img/favicon.png">
{% if amphtml is defined -%}
<link rel="amphtml" href="{{amphtml}}">
{% endif -%}
<title>{{title}}</title>
{% block links %}
{%- 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 %}>
<nav class="navbar navbar-expand-sm navbar-dark container">
{% if header_class is not defined %}{% set header_class="dark" %}{%endif%}
<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">
{% include 'logo.jinja2' %}
</a>
@ -51,10 +52,10 @@
</ul>
</div>
</nav>
<div class="jumbotron container text-white bg-transparent">
<h1 class="display-4">{{title}}</h1>
<div class="jumbotron container text-{% if header_class=="dark" %}light{% else %}dark{% endif %} bg-transparent">
<h1 class="page-title">{{title}}</h1>
{%- if description %}
<p class="lead">{{description}}</p>
<p class="page-lead">{{description}}</p>
{% endif %}
</div>
</div>

View File

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

View File

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

View File

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