Skip to content
Snippets Groups Projects
Commit 1a6cff6c authored by jarmil's avatar jarmil
Browse files

Merge branch 'test' into localwebs

parents e1f72545 cb77be8b
No related branches found
No related tags found
2 merge requests!173Release,!134Weby pro MS
Showing
with 785 additions and 3 deletions
......@@ -47,6 +47,25 @@ Rozšíření která používáme:
├── tuning = app na tuning administračního rozhraní Majáku
└── users = app s custom user modelem a SSO, apod.
### Styleguide
Některé weby využívají [Pirátskou UI styleguide](https://gitlab.pirati.cz/to/weby/ui-styleguide)
pro vzhled. Idea je, že se budou sdílet nejen statické assety (CSS, JS, ...),
ale i univerzální kusy template, které se dají includovat v různých webech
(patička webu, karta článku do přehledu, atp.).
Sdílené části využívané na více webech se umísťují do:
shared/static/styleguideXX/ = statické assety (CSS, JS, obrázky, ...)
shared/templates/styleguideXX/ = snippety pro include v templatech
`XX` v názvu adresáře je číslo major a minor verze šablony. Např. `styleguide18`
obsahuje věci ze šablony verze `1.8.x`. Důvodem je snažší migrace na novější
verze šablony, které mohou obsahovat nekompatibilní změny. Každý web tak může
(a nemusí) migrovat nezávisle dle potřeby.
Různé verze šablony jsou k vidění na [styleguide.pir-test.eu](https://styleguide.pir-test.eu/)
### Kalendáře
Pro práci s kalendáři v iCal formátu je připravena appka `calendar_utils`.
......@@ -65,12 +84,14 @@ kalendáře. Je třeba ho pravidelně volat na pozadí (přes CRON).
Appka Uniweb umí vložit do stránky Jupyter notebook a zobrazit jeho výstup.
Pokud některé buňky nechceš generovat do výstupní stránky, nastav u nich tag "exclude".
Pokud některé buňky nechceš generovat do výstupní stránky, nastav u nich tag
"exclude".
Pokud chceš generovat jen výstup dané buňky, použij tag "output"
Pozor: u plotly grafů je nutno zadat tagem "output" výstup buňky s inicializací knihovny, tedy něco kde je "import plotly" apod.
Pokud celou takovou buňku vynecháš tagem "exclude", žádné grafy se nezobrazí.
Pozor: u plotly grafů je nutno zadat tagem "output" výstup buňky s inicializací
knihovny, tedy něco kde je "import plotly" apod. Pokud celou takovou buňku
vynecháš tagem "exclude", žádné grafy se nezobrazí.
## Deployment
......
......@@ -48,6 +48,7 @@ INSTALLED_APPS = [
"pirates",
"tuning",
"search",
"regulace_konopi",
"wagtail.contrib.forms",
"wagtail.contrib.redirects",
"wagtail.contrib.modeladmin",
......
from django.apps import AppConfig
class RegulaceKonopiConfig(AppConfig):
name = 'regulace_konopi'
# Generated by Django 3.1.1 on 2020-10-28 12:50
from django.db import migrations, models
import django.db.models.deletion
import uniweb.models
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
import wagtailmetadata.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('wagtailcore', '0052_pagelogentry'),
('wagtailimages', '0022_uploadedimage'),
]
operations = [
migrations.CreateModel(
name='RegkonSubPage',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')),
('content', wagtail.core.fields.StreamField([('title', wagtail.core.blocks.CharBlock(icon='title', label='nadpis')), ('text', wagtail.core.blocks.RichTextBlock(features=['h2', 'h3', 'h4', 'h5', 'bold', 'italic', 'ol', 'ul', 'hr', 'link', 'document-link', 'image', 'superscript', 'subscript', 'strikethrough', 'blockquote'], label='text')), ('carousel', wagtail.core.blocks.ListBlock(wagtail.images.blocks.ImageChooserBlock(label='obrázek'), icon='image', label='carousel')), ('FAQ', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('question', wagtail.core.blocks.TextBlock()), ('answer', wagtail.core.blocks.RichTextBlock())], template='regulace_konopi/blocks/faq.html'), label='faq')), ('meps', wagtail.core.blocks.StructBlock([('name', wagtail.core.blocks.CharBlock(label='název')), ('mep', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('name', wagtail.core.blocks.CharBlock(label='jméno')), ('approved', wagtail.core.blocks.ChoiceBlock(choices=[(1, 'schváleno'), (0, 'odmítá'), (-1, 'nevyjádřil se')], label='hlasoval'))])))], template='regulace_konopi/blocks/party.html'))], blank=True, verbose_name='obsah stránky')),
('search_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image', verbose_name='Search image')),
],
options={
'verbose_name': 'Podstránka',
},
bases=('wagtailcore.page', uniweb.models.SubpageMixin, wagtailmetadata.models.MetadataMixin, models.Model),
),
migrations.CreateModel(
name='RegkonHomePage',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')),
('content', wagtail.core.fields.StreamField([('title', wagtail.core.blocks.CharBlock(icon='title', label='nadpis')), ('text', wagtail.core.blocks.RichTextBlock(features=['h2', 'h3', 'h4', 'h5', 'bold', 'italic', 'ol', 'ul', 'hr', 'link', 'document-link', 'image', 'superscript', 'subscript', 'strikethrough', 'blockquote'], label='text')), ('carousel', wagtail.core.blocks.ListBlock(wagtail.images.blocks.ImageChooserBlock(label='obrázek'), icon='image', label='carousel'))], blank=True, verbose_name='obsah stránky')),
('matomo_id', models.IntegerField(blank=True, null=True, verbose_name='Matomo ID pro sledování návštěvnosti')),
('top_menu', wagtail.core.fields.StreamField([('item', wagtail.core.blocks.StructBlock([('name', wagtail.core.blocks.CharBlock(label='název')), ('page', wagtail.core.blocks.PageChooserBlock(label='stránka', page_type=['regulace_konopi.RegkonHomePage', 'regulace_konopi.RegkonSubPage']))]))], blank=True, verbose_name='horní menu')),
('search_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image', verbose_name='Search image')),
],
options={
'verbose_name': 'Regulace konpí',
},
bases=(wagtailmetadata.models.MetadataMixin, 'wagtailcore.page', models.Model),
),
]
# Generated by Django 3.1.2 on 2020-11-01 22:43
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("regulace_konopi", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="regkonsubpage",
name="content",
field=wagtail.core.fields.StreamField(
[
(
"title",
wagtail.core.blocks.CharBlock(icon="title", label="nadpis"),
),
(
"text",
wagtail.core.blocks.RichTextBlock(
features=[
"h2",
"h3",
"h4",
"h5",
"bold",
"italic",
"ol",
"ul",
"hr",
"link",
"document-link",
"image",
"superscript",
"subscript",
"strikethrough",
"blockquote",
],
label="text",
),
),
(
"carousel",
wagtail.core.blocks.ListBlock(
wagtail.images.blocks.ImageChooserBlock(label="obrázek"),
icon="image",
label="carousel",
),
),
(
"FAQ",
wagtail.core.blocks.ListBlock(
wagtail.core.blocks.StructBlock(
[
("question", wagtail.core.blocks.TextBlock()),
("answer", wagtail.core.blocks.RichTextBlock()),
],
template="regulace_konopi/blocks/faq.html",
),
label="faq",
),
),
(
"meps",
wagtail.core.blocks.StructBlock(
[
("name", wagtail.core.blocks.CharBlock(label="název")),
(
"mep",
wagtail.core.blocks.ListBlock(
wagtail.core.blocks.StructBlock(
[
(
"name",
wagtail.core.blocks.CharBlock(
label="jméno"
),
),
(
"approved",
wagtail.core.blocks.ChoiceBlock(
choices=[
(1, "Pro"),
(0, "Proti"),
(-1, "Zdržel se"),
],
label="hlasoval",
),
),
]
)
),
),
],
template="regulace_konopi/blocks/party.html",
),
),
],
blank=True,
verbose_name="obsah stránky",
),
),
]
from django.db import models
# Create your models here.
from django.utils.translation import gettext_lazy
from wagtail.admin import blocks
from wagtail.admin.edit_handlers import StreamFieldPanel, MultiFieldPanel, FieldPanel, HelpPanel
from wagtail.core.fields import StreamField
from wagtail.core.models import Page
from wagtail.images.blocks import ImageChooserBlock
from wagtail.images.edit_handlers import ImageChooserPanel
from wagtailmetadata.models import MetadataPageMixin
from tuning import help
SUPPORT_CHOICES = (
(1, 'Pro'),
(0, 'Proti'),
(-1, 'Zdržel se')
)
RICH_TEXT_FEATURES = [
"h2",
"h3",
"h4",
"h5",
"bold",
"italic",
"ol",
"ul",
"hr",
"link",
"document-link",
"image",
"superscript",
"subscript",
"strikethrough",
"blockquote",
]
class MenuItemBlock(blocks.StructBlock):
name = blocks.CharBlock(label="název")
page = blocks.PageChooserBlock(
label="stránka",
page_type=["regulace_konopi.RegkonHomePage", "regulace_konopi.RegkonSubPage"],
)
class Meta:
label = "stránka"
class MepBlock(blocks.StructBlock):
name = blocks.CharBlock(label="jméno")
approved = blocks.ChoiceBlock(choices=SUPPORT_CHOICES, label="hlasoval")
class Meta:
label = "Poslanec"
class PartyBlock(blocks.StructBlock):
name = blocks.CharBlock(label="název")
mep = blocks.ListBlock(MepBlock())
class Meta:
label = "Politická strana"
class FaqBlock(blocks.StructBlock):
question = blocks.TextBlock()
answer = blocks.RichTextBlock()
class RegkonHomePage(MetadataPageMixin, Page):
### FIELDS
content = StreamField(
[
("title", blocks.CharBlock(label="nadpis", icon="title")),
("text", blocks.RichTextBlock(label="text", features=RICH_TEXT_FEATURES)),
(
"carousel",
blocks.ListBlock(
ImageChooserBlock(label="obrázek"), label="carousel", icon="image"
),
),
],
verbose_name="obsah stránky",
blank=True,
)
# settings
matomo_id = models.IntegerField(
"Matomo ID pro sledování návštěvnosti", blank=True, null=True
)
top_menu = StreamField(
[("item", MenuItemBlock())], verbose_name="horní menu", blank=True,
)
### PANELS
content_panels = Page.content_panels + [
StreamFieldPanel("content"),
]
promote_panels = [
MultiFieldPanel(
[
FieldPanel("seo_title"),
FieldPanel("search_description"),
ImageChooserPanel("search_image"),
HelpPanel(help.build(help.IMPORTANT_TITLE)),
],
gettext_lazy("Common page configuration"),
),
]
settings_panels = [
FieldPanel("matomo_id"),
StreamFieldPanel("top_menu"),
]
### RELATIONS
subpage_types = [
"regulace_konopi.RegkonSubPage",
]
### OTHERS
class Meta:
verbose_name = "Regulace konpí"
@property
def root_page(self):
return self
class RegkonSubPage(Page, MetadataPageMixin):
### FIELDS
content = StreamField(
[
("title", blocks.CharBlock(label="nadpis", icon="title")),
("text", blocks.RichTextBlock(label="text", features=RICH_TEXT_FEATURES)),
(
"carousel",
blocks.ListBlock(
ImageChooserBlock(label="obrázek"), label="carousel", icon="image"
),
),
("FAQ",
blocks.ListBlock(
FaqBlock(template='regulace_konopi/blocks/faq.html'), label="faq")
),
("meps", PartyBlock(template='regulace_konopi/blocks/party.html'))
],
verbose_name="obsah stránky",
blank=True,
)
### PANELS
promote_panels = [
MultiFieldPanel(
[
FieldPanel("slug"),
FieldPanel("seo_title"),
FieldPanel("search_description"),
ImageChooserPanel("search_image"),
HelpPanel(help.build(help.NO_SEO_TITLE, help.NO_SEARCH_IMAGE)),
],
gettext_lazy("Common page configuration"),
),
]
content_panels = Page.content_panels + [
StreamFieldPanel("content"),
]
settings_panels = []
### RELATIONS
parent_page_types = ["regulace_konopi.RegkonHomePage"]
subpage_types = []
### OTHERS
class Meta:
verbose_name = "Podstránka"
@property
def root_page(self):
if not hasattr(self, "_root_page"):
self._root_page = self.get_ancestors().type(RegkonHomePage).specific().get()
return self._root_page
def get_meta_image(self):
return self.search_image or self.root_page.get_meta_image()
.mep-status {
max-width: 1.5rem;
float: left;
margin-right: 0.5rem;
}
.navbar {
background-color: #212121 !important;
}
.nav-link {
color: white !important;
}
\ No newline at end of file
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" width="512" height="512" x="0" y="0" viewBox="0 0 513.323 513.323" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g>
<g xmlns="http://www.w3.org/2000/svg">
<g>
<path d="M256.661,257.323c-135.275,0-245.333,110.059-245.333,245.333c0,5.888,4.779,10.667,10.667,10.667h469.333 c5.888,0,10.667-4.779,10.667-10.667C501.995,367.381,391.936,257.323,256.661,257.323z" fill="#dc3545" data-original="#000000" style="" class=""/>
</g>
</g>
<g xmlns="http://www.w3.org/2000/svg">
<g>
<circle cx="256.661" cy="117.333" r="117.333" fill="#dc3545" data-original="#000000" style="" class=""/>
</g>
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
</g></svg>
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" width="512" height="512" x="0" y="0" viewBox="0 0 513.323 513.323" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g>
<g xmlns="http://www.w3.org/2000/svg">
<g>
<path d="M256.661,257.323c-135.275,0-245.333,110.059-245.333,245.333c0,5.888,4.779,10.667,10.667,10.667h469.333 c5.888,0,10.667-4.779,10.667-10.667C501.995,367.381,391.936,257.323,256.661,257.323z" fill="#6c757d" data-original="#000000" style="" class=""/>
</g>
</g>
<g xmlns="http://www.w3.org/2000/svg">
<g>
<circle cx="256.661" cy="117.333" r="117.333" fill="#6c757d" data-original="#000000" style="" class=""/>
</g>
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
</g></svg>
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" width="512" height="512" x="0" y="0" viewBox="0 0 513.323 513.323" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><g>
<g xmlns="http://www.w3.org/2000/svg">
<g>
<path d="M256.661,257.323c-135.275,0-245.333,110.059-245.333,245.333c0,5.888,4.779,10.667,10.667,10.667h469.333 c5.888,0,10.667-4.779,10.667-10.667C501.995,367.381,391.936,257.323,256.661,257.323z" fill="#28a745" data-original="#000000" style="" class=""/>
</g>
</g>
<g xmlns="http://www.w3.org/2000/svg">
<g>
<circle cx="256.661" cy="117.333" r="117.333" fill="#28a745" data-original="#000000" style="" class=""/>
</g>
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
<g xmlns="http://www.w3.org/2000/svg">
</g>
</g></svg>
This diff is collapsed.
This diff is collapsed.
{% load static wagtailcore_tags wagtailimages_tags wagtailmetadata_tags %}
<!doctype html>
<html lang="cs">
<head>
<!-- Meta -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width"/>
{% meta_tags %}
{% if settings.MAJAK_ENV == "test" %}
<meta name="robots" content="noindex, nofollow">
{% endif %}
<!-- Favicon -->
{% include "shared/favicon_snippet.html" %}
<!-- Styles -->
<link href="{% static "regulace_konopi/vendor/css/bootstrap.min.css" %}" rel="stylesheet"/>
<link href="{% static "styleguide18/assets/css/styles.css" %}" rel="stylesheet" media="all"/>
<link href="{% static "styleguide18/assets/css/pattern-scaffolding.css" %}" rel="stylesheet" media="all"/>
<link href="{% static "shared/vendor/fancybox/jquery.fancybox.min.css" %}" rel="stylesheet">
<link href="{% static "regulace_konopi/assets/css/styles.css" %}" rel="stylesheet" media="all"/>
<script src="{% static "shared/vendor/jquery/jquery-3.4.1.min.js" %}"></script>
<style type="text/css">
.inline-block {
display: inline-block;
}
</style>
{% if page.root_page.matomo_id %}
{% include "shared/matomo_snippet.html" with matomo_id=page.root_page.matomo_id %}
{% endif %}
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-sm navbar-dark sticky-top bg-dark" id="">
<div class="container">
<div class="brand-wrapper">
<a class="navbar-brand" href="/"><img src="{% static "styleguide18/assets/images/logo-round-white.svg" %}"
class="d-inline-block m-auto"/>{{ page.root_page.seo_title }}</a>
</div>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"
data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false"
aria-label="Toggle navigation">
Menu
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
{% for item in page.root_page.top_menu %}
<li class="nav-item">
<a href="{% pageurl item.value.page %}" data-href="{% pageurl item.value.page %}"
class="nav-link">{{ item.value.name }}</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</nav>
<div class="container container--default lg:py-4">
{% block content %}{% endblock %}
</div>
<footer class="footer bg-grey-700 text-white __js-root">
<ui-app inline-template>
<div>
<div class="footer__main py-4 lg:py-16 container container--default">
<section class="footer__brand">
<a href="https://www.pirati.cz">
<img src="{% static "styleguide18/assets/images/logo.svg" %}" alt="logo pirátské strany"
class="w-32 md:w-40 pb-6"/>
</a>
<p class="para hidden md:block md:mb-4 lg:mb-0 text-grey-200">
<span class="copyleft inline-block">&copy;</span> {% now "Y" %} Piráti. Všechna práva vyhlazena. Sdílejte a
nechte ostatní sdílet za stejných podmínek.
</p>
</section>
<section class="footer__social lg:text-right">
<div class="mb-4">
<div class="social-icon-group space-x-2 text-white pb-4">
<a href="https://www.pirati.cz" class="social-icon "><i class="ico--home"></i></a>
<a href="https://www.facebook.com/ceska.piratska.strana/" class="social-icon "><i
class="ico--facebook"></i></a>
<a href="https://twitter.com/PiratskaStrana" class="social-icon "><i class="ico--twitter"></i></a>
<a href="https://www.youtube.com/user/CeskaPiratskaStrana" class="social-icon "><i
class="ico--youtube"></i></a>
<a href="https://www.instagram.com/pirati.cz/" class="social-icon "><i class="ico--instagram"></i></a>
<a href="https://www.flickr.com/photos/pirati/" class="social-icon "><i class="ico--flickr"></i></a>
</div>
</div>
<div
class="flex flex-col md:flex-row lg:flex-col lg:items-end space-y-2 md:space-y-0 md:space-x-2 lg:space-x-0 lg:space-y-2">
<a href="https://dary.pirati.cz"
class="btn btn--icon btn--cyan-200 btn--hoveractive text-lg btn--fullwidth sm:btn--autowidth">
<div class="btn__body-wrap">
<div class="btn__body ">Přispěj</div>
<div class="btn__icon ">
<i class="ico--pig"></i>
</div>
</div>
</a>
<a href="https://nalodeni.pirati.cz"
class="btn btn--icon btn--blue-300 btn--hoveractive text-lg btn--fullwidth sm:btn--autowidth">
<div class="btn__body-wrap">
<div class="btn__body ">Naloď se</div>
<div class="btn__icon ">
<i class="ico--anchor"></i>
</div>
</div>
</a>
</div>
</section>
</div>
</div>
</ui-app>
</footer>
<script src="{% static "regulace_konopi/vendor/js/bootstrap.bundle.min.js" %}"></script>
<script src="{% static "styleguide18/assets/js/vue.2.6.11.js" %}"></script>
<script src="{% static "shared/vendor/lazysizes/lazysizes.min.js" %}"></script>
<script src="{% static "shared/vendor/fancybox/jquery.fancybox.min.js" %}"></script>
{% block extra_js %}
{% endblock %}
</body>
</html>
<div class="card">
<div class="card-header" id="headingOne">
<h2 class="mb-0">
<button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse"
data-target="#faq{{ forloop.counter }}" aria-expanded="true" aria-controls="faq{{ forloop.counter }}">
{{ value.question }}
</button>
</h2>
</div>
<div id="faq{{ forloop.counter }}" class="collapse " aria-labelledby="headingOne" data-parent="#faqAccordion">
<div class="card-body">
{{ value.answer }}
</div>
</div>
</div>
{% load static %}
<div class="content-block my-4 clearfix{% if forloop.first %} mt-8 lg:mt-12{% endif %}">
<h2>{{ value.name }}</h2>
{% for mep in value.mep %}
<button type="button" class="btn " data-container="body" data-toggle="popover" data-placement="top"
data-content="{{ mep.name }}">
<img class="mep-status" src=
{% if mep.approved == '1' %}
"{% static "regulace_konopi/svg/user-positive.svg" %}"
{% elif mep.approved == '-1' %}
"{% static "regulace_konopi/svg/user-neutral.svg" %}"
{% else %}
"{% static "regulace_konopi/svg/user-negative.svg" %}"
{% endif %}
/>
</button>
{% endfor %}
</div>
<script>
$(function () {
$('[data-toggle="popover"]').popover()
})
</script>
\ No newline at end of file
{% extends "regulace_konopi/base.html" %}
{% load wagtailcore_tags %}
{% block content %}
<main>
{% include "regulace_konopi/snippet_sections.html" %}
</main>
{% endblock %}
{% extends "regulace_konopi/base.html" %}
{% block content %}
<main>
{% include "regulace_konopi/snippet_sections.html" %}
</main>
{% endblock %}
{% load uniweb_filters wagtailcore_tags wagtailimages_tags %}
<section class="mb-8 lg:mb-16">
{% for block in page.content %}
{% if block.block_type == "title" %}
<h1 class="head-alt-md md:head-alt-lg max-w-5xl my-6 lg:mt-16">{{ block.value }}</h1>
{% endif %}
{% if block.block_type == "text" %}
<div class="content-block my-4 clearfix{% if forloop.first %} mt-8 lg:mt-12{% endif %}">
{{ block.value|richtext }}
</div>
{% endif %}
{% if block.block_type == "carousel" %}
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
{% for picture in block.value %}
{% image picture width-2000 as img %}
<div class="carousel-item {% if forloop.first %}active{% endif %}">
<img class="d-block w-100" src="{{ img.url }}" alt="First slide">
</div>
{% endfor %}
</div>
<a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
{% endif %}
{% if block.block_type == "FAQ" %}
<div class="faq" id="faqAccordion">
{% for faq in block.value %}
{% include_block faq %}
{% endfor %}
</div>
{% endif %}
{% if block.block_type == "meps" %}
{% include_block block %}
{% endif %}
{% endfor %}
</section>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment