Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • feat-more-blocks
  • feat-rework-election-page
  • feat/custom-css
  • feat/dary-improvements
  • feat/geo-feature-collections
  • feat/hideable-tweets
  • feat/instagram-feed
  • feat/people-octopus-imports
  • feat/pirstan-changes
  • feat/redesign-fixes-3
  • feat/redesign-improvements-10
  • feat/redesign-improvements-8
  • feat/separate-import-thread
  • feature/crypto-widget
  • features/add-custom-numbering-for-candidates
  • features/add-dynamic-candidate-numbers
  • features/add-embed-to-articles
  • features/add-feature-enlarging-sub-block
  • features/add-link-to-images
  • features/add-pdf-page
  • features/add-redirects
  • features/add-thumbnail-principle-to-uniweb-and-senate
  • features/add-timeline
  • features/add-typed-table
  • features/create-collapsible-extra-legal-info
  • features/create-mastodon-feed-block
  • features/create-wordcloud-from-article-page
  • features/donation-panel-should-be-optional
  • features/extend-hero-banner
  • features/fix-broken-calendar-categories
  • master
  • test
32 results

Target

Select target project
  • to/majak
  • b1242/majak
2 results
Select Git revision
  • fix1
  • localwebs
  • master
  • pdp
  • seo1
  • target-groups
  • test
7 results
Show changes
Showing
with 1973 additions and 0 deletions
czech_inspirational/static/czech_inspirational/images/videobox_resp.png

573 KiB

czech_inspirational/static/czech_inspirational/images/videobox_sm.jpg

46.7 KiB

czech_inspirational/static/czech_inspirational/images/videobox_sm.webp

21.8 KiB

czech_inspirational/static/czech_inspirational/images/violetbg.png

7.38 KiB

(function (Vue) {
'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue);
var screens = {
'sm': '576px',
'md': '768px',
'lg': '992px',
'xl': '1200px',
'2xl': '1366px',
};
const lgScreenSize = parseInt(screens.lg.replace("px", ""), 10);
const forEachNode = function (array, callback, scope) {
for (var i = 0; i < array.length; i++) {
callback.call(scope, array[i]); // passes back stuff we need
}
};
function getWindowWidth() {
return Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
}
function isLgScreenSize() {
return getWindowWidth() >= lgScreenSize;
}
//
var script = {
data() {
return {
show: false
};
},
props: {
href: {
type: String,
},
label: {
type: String,
}
},
methods: {
onMouseEnter() {
if (isLgScreenSize()) {
this.$data.show = true;
}
},
onMouseLeave() {
if (isLgScreenSize()) {
this.$data.show = false;
}
},
handleClick(evt) {
// On mobile screens, first click should just toggle and redir on second one
if (isLgScreenSize() || this.$data.show) {
if (this.$props.href) {
window.location = this.$props.href;
}
}
this.$data.show = !this.$data.show;
}
}
};
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {
if (typeof shadowMode !== 'boolean') {
createInjectorSSR = createInjector;
createInjector = shadowMode;
shadowMode = false;
}
// Vue.extend constructor export interop.
const options = typeof script === 'function' ? script.options : script;
// render functions
if (template && template.render) {
options.render = template.render;
options.staticRenderFns = template.staticRenderFns;
options._compiled = true;
// functional template
if (isFunctionalTemplate) {
options.functional = true;
}
}
// scopedId
if (scopeId) {
options._scopeId = scopeId;
}
let hook;
if (moduleIdentifier) {
// server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__;
}
// inject component styles
if (style) {
style.call(this, createInjectorSSR(context));
}
// register component module identifier for async chunk inference
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier);
}
};
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook;
}
else if (style) {
hook = shadowMode
? function (context) {
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));
}
: function (context) {
style.call(this, createInjector(context));
};
}
if (hook) {
if (options.functional) {
// register for functional component in vue file
const originalRender = options.render;
options.render = function renderWithStyleInjection(h, context) {
hook.call(context);
return originalRender(h, context);
};
}
else {
// inject component registration as beforeCreate hook
const existing = options.beforeCreate;
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
}
}
return script;
}
/* script */
const __vue_script__ = script;
/* template */
var __vue_render__ = function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c(
"div",
{ on: { mouseenter: _vm.onMouseEnter, mouseleave: _vm.onMouseLeave } },
[
!_vm.href
? _c(
"span",
{
staticClass: "navbar-menu__link navbar-menu__submenu-toggle",
class: { "navbar-menu__submenu-toggle--open": _vm.show },
on: { click: _vm.handleClick }
},
[_vm._v(_vm._s(_vm.label))]
)
: _vm._e(),
_vm._v(" "),
_vm.href
? _c(
"a",
{
staticClass: "navbar-menu__link navbar-menu__submenu-toggle",
class: { "navbar-menu__submenu-toggle--open": _vm.show },
attrs: { href: _vm.href },
on: {
click: function($event) {
$event.preventDefault();
return _vm.handleClick($event)
}
}
},
[_vm._v(_vm._s(_vm.label))]
)
: _vm._e(),
_vm._v(" "),
_c(
"div",
{
staticClass: "navbar-menu__submenu-wrap",
class: { "navbar-menu__submenu-wrap--show": _vm.show }
},
[_vm._t("default")],
2
)
]
)
};
var __vue_staticRenderFns__ = [];
__vue_render__._withStripped = true;
/* style */
const __vue_inject_styles__ = undefined;
/* scoped */
const __vue_scope_id__ = undefined;
/* module identifier */
const __vue_module_identifier__ = undefined;
/* functional template */
const __vue_is_functional_template__ = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__ = /*#__PURE__*/normalizeComponent(
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
__vue_inject_styles__,
__vue_script__,
__vue_scope_id__,
__vue_is_functional_template__,
__vue_module_identifier__,
false,
undefined,
undefined,
undefined
);
var script$1 = {
components: {
UiNavbarSubitem: __vue_component__
},
data() {
return {
isLgScreenSize: isLgScreenSize(),
show: false,
resizeHandler: () => {
this.$data.isLgScreenSize = isLgScreenSize();
},
};
},
mounted() {
this.$nextTick(() => {
window.addEventListener("resize", this.$data.resizeHandler);
});
},
beforeDestroy() {
window.removeEventListener("resize", this.$data.resizeHandler);
}
};
/* script */
const __vue_script__$1 = script$1;
/* template */
/* style */
const __vue_inject_styles__$1 = undefined;
/* scoped */
const __vue_scope_id__$1 = undefined;
/* module identifier */
const __vue_module_identifier__$1 = undefined;
/* functional template */
const __vue_is_functional_template__$1 = undefined;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
{},
__vue_inject_styles__$1,
__vue_script__$1,
__vue_scope_id__$1,
__vue_is_functional_template__$1,
__vue_module_identifier__$1,
false,
undefined,
undefined,
undefined
);
//
var script$2 = {
data() {
return {
isLgScreenSize: isLgScreenSize(),
show: false,
resizeHandler: () => {
this.$data.isLgScreenSize = isLgScreenSize();
},
};
},
props: {
href: {
type: String,
},
label: {
type: String,
},
labelclass: {
type: String,
},
wrapperclass: {
type: String,
default: "",
},
slotwrapperclass: {
type: String,
default: "",
}
},
methods: {
handleClick() {
if (this.$props.href) {
window.location = this.$props.href;
}
this.$data.show = !this.$data.show;
}
},
mounted() {
this.$nextTick(() => {
window.addEventListener("resize", this.$data.resizeHandler);
});
},
beforeDestroy() {
window.removeEventListener("resize", this.$data.resizeHandler);
}
};
/* script */
const __vue_script__$2 = script$2;
/* template */
var __vue_render__$1 = function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", { class: [_vm.wrapperclass, "footer-collapsible"] }, [
_c(
"span",
{
staticClass: "text-xl uppercase text-white footer-collapsible__toggle",
class: [
_vm.labelclass,
_vm.show ? "footer-collapsible__toggle--open" : ""
],
on: { click: _vm.handleClick }
},
[_vm._v(_vm._s(_vm.label))]
),
_vm._v(" "),
_c(
"div",
{
directives: [
{
name: "show",
rawName: "v-show",
value: _vm.show || _vm.isLgScreenSize,
expression: "show || isLgScreenSize"
}
],
class: [_vm.slotwrapperclass]
},
[_vm._t("default")],
2
)
])
};
var __vue_staticRenderFns__$1 = [];
__vue_render__$1._withStripped = true;
/* style */
const __vue_inject_styles__$2 = undefined;
/* scoped */
const __vue_scope_id__$2 = undefined;
/* module identifier */
const __vue_module_identifier__$2 = undefined;
/* functional template */
const __vue_is_functional_template__$2 = false;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
__vue_inject_styles__$2,
__vue_script__$2,
__vue_scope_id__$2,
__vue_is_functional_template__$2,
__vue_module_identifier__$2,
false,
undefined,
undefined,
undefined
);
var script$3 = {
mounted() {
console.log(`Mounted generic Vue app in ` , this.$el);
}
};
/* script */
const __vue_script__$3 = script$3;
/* template */
/* style */
const __vue_inject_styles__$3 = undefined;
/* scoped */
const __vue_scope_id__$3 = undefined;
/* module identifier */
const __vue_module_identifier__$3 = undefined;
/* functional template */
const __vue_is_functional_template__$3 = undefined;
/* style inject */
/* style inject SSR */
/* style inject shadow dom */
const __vue_component__$3 = /*#__PURE__*/normalizeComponent(
{},
__vue_inject_styles__$3,
__vue_script__$3,
__vue_scope_id__$3,
__vue_is_functional_template__$3,
__vue_module_identifier__$3,
false,
undefined,
undefined,
undefined
);
// import FlipClock from "./components/FlipClock";
// Vue.component("ui-calendar-renderer", Renderer);
// Vue.component("ui-calendar-dummy-provider", DummyProvider);
// Vue.component("ui-calendar-google-provider", GoogleProvider);
// Vue.component("ui-region-map", RegionMap);
// Vue.component("ui-view-provider", ViewProvider);
Vue__default['default'].component("ui-navbar", __vue_component__$1);
Vue__default['default'].component("ui-footer-collapsible", __vue_component__$2);
const appFactory = (el, attrs) => {
// Bootstrap Vue.js.
new Vue__default['default']({
el,
components: {
UiApp: __vue_component__$3
}
});
};
/**
* Bootstrap Vue.js application at given Element instance.
*
* App properties are passed via data attributes, like:
*
* <div class="__vue-root" data-message="Hello" data-app="SomeApp"></div>
*
* @param {Element} el DOM Element
*/
function renderVueAppElement(el) {
const attrs = Object.assign({}, el.dataset);
return appFactory(el);
}
function init(event) {
// Initialize Vue.js apps.
forEachNode(document.querySelectorAll('.__js-root'), renderVueAppElement);
}
document.addEventListener('DOMContentLoaded', init);
var anchorPrehrat = document.getElementById('prehrat-video');
if(anchorPrehrat !== null) {
anchorPrehrat.addEventListener('click', function(e){
e.preventDefault();
var originalheight=this.offsetHeight;
// console.log(this.parentNode);
// this.children[0].style.display = 'none';
// this.children[1].style.display = 'block';
this.parentNode.classList.add("tha_videocont_activated");
this.outerHTML=`
<iframe style="width:100%; height:` + originalheight + `px;" src="https://www.youtube.com/embed/hhs-cWWrKoY?autoplay=1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
`;
});
}
//uncomment for collapsible chapter list instead of link to separate page
// var anchorShowFull = document.getElementById('showfulltable');
// if(anchorShowFull !== null) {
// anchorShowFull.addEventListener('click', function(e){
// e.preventDefault();
// var chaptertable = document.getElementById("chaptertable");
// chaptertable.classList.remove("candidate-table--fadeout");
// var secondchapterlist = document.getElementById("secondchapterlist");
// secondchapterlist.classList.remove("hidden");
// this.remove();
// });
// }
function forceDownload(href) {
var anchor = document.createElement('a');
anchor.href = href;
anchor.download = href;
document.body.appendChild(anchor);
anchor.click();
}
function change_download_HTML(element,heading){
var downloadheading = document.getElementById("downloadheading");
downloadheading.innerHTML=heading;
element.outerHTML=`
<div class="text-center pb-2 md:pb-0 mb-28">
<a class="dlhref md:mx-4" href="/downloads/Ebook_cesko_inspirativni.pdf"><button class="w-80 text-lg btn btn--hoveractive btn--to-grey-700 inline-block align-top mb-3">
<div class="btn__body py-10 h-12">Stáhnout ebook</div>
</button></a><!--
--><a class="dlhref md:mx-4" href="/downloads/Ebook_cesko_inspirativni.epub"><button class="w-80 btn text-lg btn btn--cyan-200 btn--hoveractive inline-block align-top mb-3">
<div class="btn__body py-10 h-12">Stáhnout ebook pro čtečky</div>
</button></a>
</div>
`;
}
var savemailform = document.getElementById('savemailform');
if(savemailform !== null) {
savemailform.addEventListener('submit', function(e){
e.preventDefault();
change_download_HTML(this,"Email uložen,<br>Děkujeme");
});
}
//opt to download without giving e-mail
var NoMailLink = document.getElementById('nomail');
if(NoMailLink !== null) {
NoMailLink.addEventListener('click', function(e){
e.preventDefault();
change_download_HTML(savemailform,"Příjemné<br>čtení!");
});
}
var hrefs = document.getElementsByClassName("dlhref");
for (var i = 0; i < hrefs.length; i++) {
hrefs.item(i).addEventListener('click', function(e){
e.preventDefault();
console.log(this.href);
forceDownload(this.href);
setTimeout(function(){
window.location.href = "?diky";
}, 1000);
});
}
}(Vue));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsic2NyZWVucy5qcyIsInNvdXJjZS9qcy91dGlscy5qcyIsInNvdXJjZS9qcy9jb21wb25lbnRzL25hdmJhci9OYXZiYXJTdWJpdGVtLnZ1ZSIsIm5vZGVfbW9kdWxlcy92dWUtcnVudGltZS1oZWxwZXJzL2Rpc3Qvbm9ybWFsaXplLWNvbXBvbmVudC5tanMiLCJzb3VyY2UvanMvY29tcG9uZW50cy9uYXZiYXIvTmF2YmFyLnZ1ZSIsInNvdXJjZS9qcy9jb21wb25lbnRzL2Zvb3Rlci9Gb290ZXJDb2xsYXBzaWJsZS52dWUiLCJzb3VyY2UvanMvY29tcG9uZW50cy9VaUFwcC52dWUiLCJzb3VyY2UvanMvbWFpbi5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHtcclxuICAnc20nOiAnNTc2cHgnLFxyXG4gICdtZCc6ICc3NjhweCcsXHJcbiAgJ2xnJzogJzk5MnB4JyxcclxuICAneGwnOiAnMTIwMHB4JyxcclxuICAnMnhsJzogJzEzNjZweCcsXHJcbn07XHJcbiIsImltcG9ydCBzY3JlZW5zI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gICBlbHNlIGlmIChzdHlsZSkge1xyXG4gICAgICAgIGhvb2sgPSBzaGFkb3dNb2RlXHJcbiAgICAgICAgICAgID8gZnVuY3Rpb24gKGNvbnRleHQpIHtcclxuICAgICAgICAgICAgICAgIHN0eWxlLmNhbGwodGhpcywgY3JlYXRlSW5qZWN0b3JTaGFkb3coY29udGV4dCwgdGhpcy4kcm9vdC4kb3B0aW9ucy5zaGFkb3dSb290KSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgOiBmdW5jdGlvbiAoY29udGV4dCkge1xyXG4gICAgICAgICAgICAgICAgc3R5bGUuY2FsbCh0aGlzLCBjcmVhdGVJbmplY3Rvcihjb250ZXh0KSk7XHJcbiAgICAgICAgICAgIH07XHJcbiAgICB9XHJcbiAgICBpZiAoaG9vaykge1xyXG4gICAgICAgIGlmIChvcHRpb25zLmZ1bmN0aW9uYWwpIHtcclxuICAgICAgICAgICAgLy8gcmVnaXN0ZXIgZm9yIGZ1bmN0aW9uYWwgY29tcG9uZW50IGluIHZ1ZSBmaWxlXHJcbiAgICAgICAgICAgIGNvbnN0IG9yaWdpbmFsUmVuZGVyID0gb3B0aW9ucy5yZW5kZXI7XHJcbiAgICAgICAgICAgIG9wdGlvbnMucmVuZGVyID0gZnVuY3Rpb24gcmVuZGVyV2l0aFN0eWxlSW5qZWN0aW9uKGgsIGNvbnRleHQpIHtcclxuICAgICAgICAgICAgICAgIGhvb2suY2FsbChjb250ZXh0KTtcclxuICAgICAgICAgICAgICAgIHJldHVybiBvcmlnaW5hbFJlbmRlcihoLCBjb250ZXh0KTtcclxuICAgICAgICAgICAgfTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgIC8vIGluamVjdCBjb21wb25lbnQgcmVnaXN0cmF0aW9uIGFzIGJlZm9yZUNyZWF0ZSBob29rXHJcbiAgICAgICAgICAgIGNvbnN0IGV4aXN0aW5nID0gb3B0aW9ucy5iZWZvcmVDcmVhdGU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VBQ3BELEVBQUUsQ0FBQyxDQUFDLGNBQWMsRUFBRSxDQUFDO0VBQ3JCLEVBQUUsb0JBQW9CLENBQUMsSUFBSSxDQUFDLDJCQUEyQixDQUFDLENBQUM7RUFDekQsRUFBRSxDQUFDLENBQUM7RUFDSixDQUFDO0FBQ0Q7RUFDQTtFQUNBLElBQUksVUFBVSxHQUFHLFFBQVEsQ0FBQyxjQUFjLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDbkQ7RUFDQSxHQUFHLFVBQVUsS0FBSyxJQUFJLEVBQUU7RUFDeEIsQ0FBQyxVQUFVLENBQUMsZ0JBQWdCLENBQUMsT0FBTyxFQUFFLFNBQVMsQ0FBQyxDQUFDO0VBQ2pELEVBQUUsQ0FBQyxDQUFDLGNBQWMsRUFBRSxDQUFDO0VBQ3JCLEVBQUUsb0JBQW9CLENBQUMsWUFBWSxDQUFDLG9CQUFvQixDQUFDLENBQUM7RUFDMUQsRUFBRSxDQUFDLENBQUM7RUFDSjs7Ozs7OyJ9
/*!
* vue-carousel v0.7.1
* (c) 2018 todd.beauchamp@ssense.com
* https://github.com/ssense/vue-carousel#readme
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueCarousel=e():t.VueCarousel=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.Slide=e.Carousel=void 0;var r=n(1),a=i(r),o=n(41),s=i(o),u=function(t){t.component("carousel",a.default),t.component("slide",s.default)};e.default={install:u},e.Carousel=a.default,e.Slide=s.default},function(t,e,n){function i(t){n(2)}var r=n(7)(n(8),n(46),i,null,null);t.exports=r.exports},function(t,e,n){var i=n(3);"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);n(5)("80564c20",i,!0,{})},function(t,e,n){e=t.exports=n(4)(),e.push([t.id,".VueCarousel{position:relative}.VueCarousel-wrapper{width:100%;position:relative;overflow:hidden}.VueCarousel-inner{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-webkit-backface-visibility:hidden;backface-visibility:hidden}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},r=0;r<this.length;r++){var a=this[r][0];"number"==typeof a&&(i[a]=!0)}for(r=0;r<e.length;r++){var o=e[r];"number"==typeof o[0]&&i[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},function(t,e,n){function i(t){for(var e=0;e<t.length;e++){var n=t[e],i=l[n.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](n.parts[r]);for(;r<n.parts.length;r++)i.parts.push(a(n.parts[r]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{for(var o=[],r=0;r<n.parts.length;r++)o.push(a(n.parts[r]));l[n.id]={id:n.id,refs:1,parts:o}}}}function r(){var t=document.createElement("style");return t.type="text/css",d.appendChild(t),t}function a(t){var e,n,i=document.querySelector("style["+m+'~="'+t.id+'"]');if(i){if(p)return g;i.parentNode.removeChild(i)}if(b){var a=h++;i=f||(f=r()),e=o.bind(null,i,a,!1),n=o.bind(null,i,a,!0)}else i=r(),e=s.bind(null,i),n=function(){i.parentNode.removeChild(i)};return e(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;e(t=i)}else n()}}function o(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=y(e,r);else{var a=document.createTextNode(r),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}function s(t,e){var n=e.css,i=e.media,r=e.sourceMap;if(i&&t.setAttribute("media",i),v.ssrId&&t.setAttribute(m,e.id),r&&(n+="\n/*# sourceURL="+r.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var u="undefined"!=typeof document,c=n(6),l={},d=u&&(document.head||document.getElementsByTagName("head")[0]),f=null,h=0,p=!1,g=function(){},v=null,m="data-vue-ssr-id",b="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,n,r){p=n,v=r||{};var a=c(t,e);return i(a),function(e){for(var n=[],r=0;r<a.length;r++){var o=a[r],s=l[o.id];s.refs--,n.push(s)}e?(a=c(t,e),i(a)):a=[];for(var r=0;r<n.length;r++){var s=n[r];if(0===s.refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete l[s.id]}}}};var y=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t,e){for(var n=[],i={},r=0;r<e.length;r++){var a=e[r],o=a[0],s=a[1],u=a[2],c=a[3],l={id:t+":"+r,css:s,media:u,sourceMap:c};i[o]?i[o].parts.push(l):n.push(i[o]={id:o,parts:[l]})}return n}},function(t,e){t.exports=function(t,e,n,i,r){var a,o=t=t||{},s=typeof t.default;"object"!==s&&"function"!==s||(a=t,o=t.default);var u="function"==typeof o?o.options:o;e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns),i&&(u._scopeId=i);var c;if(r?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=c):n&&(c=n),c){var l=u.functional,d=l?u.render:u.beforeCreate;l?u.render=function(t,e){return c.call(e),d(t,e)}:u.beforeCreate=d?[].concat(d,c):[c]}return{esModule:a,exports:o,options:u}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),a=i(r),o=n(29),s=i(o),u=n(30),c=i(u),l=n(31),d=i(l),f=n(36),h=i(f),p=n(41),g=i(p),v={onwebkittransitionend:"webkitTransitionEnd",onmoztransitionend:"transitionend",onotransitionend:"oTransitionEnd otransitionend",ontransitionend:"transitionend"},m=function(){for(var t in v)if(t in window)return v[t]};e.default={name:"carousel",beforeUpdate:function(){this.computeCarouselWidth()},components:{Navigation:d.default,Pagination:h.default,Slide:g.default},data:function(){return{browserWidth:null,carouselWidth:null,currentPage:0,dragging:!1,dragMomentum:0,dragOffset:0,dragStartY:0,dragStartX:0,isTouch:"undefined"!=typeof window&&"ontouchstart"in window,offset:0,refreshRate:16,slideCount:0,transitionend:"transitionend"}},mixins:[s.default],provide:function(){return{carousel:this}},props:{easing:{type:String,default:"ease"},minSwipeDistance:{type:Number,default:8},navigationClickTargetSize:{type:Number,default:8},mouseDrag:{type:Boolean,default:!0},navigationEnabled:{type:Boolean,default:!1},navigationNextLabel:{type:String,default:""},navigationPrevLabel:{type:String,default:""},paginationActiveColor:{type:String,default:"#000000"},paginationColor:{type:String,default:"#efefef"},paginationEnabled:{type:Boolean,default:!0},paginationPadding:{type:Number,default:10},paginationSize:{type:Number,default:10},perPage:{type:Number,default:2},perPageCustom:{type:Array},resistanceCoef:{type:Number,default:20},scrollPerPage:{type:Boolean,default:!0},speed:{type:Number,default:500},loop:{type:Boolean,default:!1},navigateTo:{type:Number,default:0},spacePadding:{type:Number,default:0}},watch:{navigateTo:function(t){t!==this.currentPage&&this.goToPage(t)},currentPage:function(t){this.$emit("pageChange",t)}},computed:{breakpointSlidesPerPage:function(){if(!this.perPageCustom)return this.perPage;var t=this.perPageCustom,e=this.browserWidth,n=t.sort(function(t,e){return t[0]>e[0]?-1:1}),i=n.filter(function(t){return e>=t[0]}),r=i[0]&&i[0][1];return r||this.perPage},canAdvanceForward:function(){return this.loop||this.offset<this.maxOffset},canAdvanceBackward:function(){return this.loop||this.currentPage>0},currentPerPage:function(){return!this.perPageCustom||this.$isServer?this.perPage:this.breakpointSlidesPerPage},currentOffset:function(){return(this.offset+this.dragOffset)*-1},isHidden:function(){return this.carouselWidth<=0},maxOffset:function(){return this.slideWidth*this.slideCount-this.carouselWidth+2*this.spacePadding},pageCount:function(){return this.scrollPerPage?Math.ceil(this.slideCount/this.currentPerPage):this.slideCount},slideWidth:function(){var t=this.carouselWidth-2*this.spacePadding,e=Math.min(this.currentPerPage,this.slideCount);return t/e},transitionStyle:function(){return this.speed/1e3+"s "+this.easing+" transform"},padding:function t(){var t=this.spacePadding;return t>0&&t}},methods:{getNextPage:function(){return this.currentPage<this.pageCount-1?this.currentPage+1:this.loop?0:this.currentPage},getPreviousPage:function(){return this.currentPage>0?this.currentPage-1:this.loop?this.pageCount-1:this.currentPage},advancePage:function(t){t&&"backward"===t&&this.canAdvanceBackward?this.goToPage(this.getPreviousPage(),"navigation"):(!t||t&&"backward"!==t)&&this.canAdvanceForward&&this.goToPage(this.getNextPage(),"navigation")},attachMutationObserver:function(){var t=this,e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(e){var n={attributes:!0,data:!0};this.mutationObserver=new e(function(){t.$nextTick(function(){t.computeCarouselWidth()})}),this.$parent.$el&&this.mutationObserver.observe(this.$parent.$el,n)}},handleNavigation:function(t){this.advancePage(t)},detachMutationObserver:function(){this.mutationObserver&&this.mutationObserver.disconnect()},getBrowserWidth:function(){return this.browserWidth=window.innerWidth,this.browserWidth},getCarouselWidth:function(){var t=this.$refs["VueCarousel-inner"];return this.carouselWidth=t&&t.clientWidth||0,this.carouselWidth},getSlideCount:function(){this.slideCount=this.$slots&&this.$slots.default&&this.$slots.default.filter(function(t){return t.tag&&t.tag.indexOf("slide")>-1}).length||0},goToPage:function(t){t>=0&&t<=this.pageCount&&(this.offset=this.scrollPerPage?Math.min(this.slideWidth*this.currentPerPage*t,this.maxOffset):Math.min(this.slideWidth*t,this.maxOffset),this.currentPage=t)},onStart:function(t){document.addEventListener(this.isTouch?"touchend":"mouseup",this.onEnd,!0),document.addEventListener(this.isTouch?"touchmove":"mousemove",this.onDrag,!0),this.startTime=t.timeStamp,this.dragging=!0,this.dragStartX=this.isTouch?t.touches[0].clientX:t.clientX,this.dragStartY=this.isTouch?t.touches[0].clientY:t.clientY},onEnd:function(t){var e=this.isTouch?t.changedTouches[0].clientX:t.clientX,n=this.dragStartX-e;if(this.dragMomentum=n/(t.timeStamp-this.startTime),0!==this.minSwipeDistance&&Math.abs(n)>=this.minSwipeDistance){var i=this.scrollPerPage?this.slideWidth*this.currentPerPage:this.slideWidth;this.dragOffset=this.dragOffset+(0,a.default)(n)*(i/2)}this.offset+=this.dragOffset,this.dragOffset=0,this.dragging=!1,this.render(),document.removeEventListener(this.isTouch?"touchend":"mouseup",this.onEnd,!0),document.removeEventListener(this.isTouch?"touchmove":"mousemove",this.onDrag,!0)},onDrag:function(t){var e=this.isTouch?t.touches[0].clientX:t.clientX,n=this.isTouch?t.touches[0].clientY:t.clientY,i=this.dragStartX-e,r=this.dragStartY-n;if(!(this.isTouch&&Math.abs(i)<Math.abs(r))){t.stopImmediatePropagation(),this.dragOffset=i;var a=this.offset+this.dragOffset;a<0?this.dragOffset=-Math.sqrt(-this.resistanceCoef*this.dragOffset):a>this.maxOffset&&(this.dragOffset=Math.sqrt(this.resistanceCoef*this.dragOffset))}},onResize:function(){var t=this;this.computeCarouselWidth(),this.dragging=!0,this.render(),setTimeout(function(){t.dragging=!1},this.refreshRate)},render:function(){this.offset+=Math.max(-this.currentPerPage+1,Math.min(Math.round(this.dragMomentum),this.currentPerPage-1))*this.slideWidth;var t=this.scrollPerPage?this.slideWidth*this.currentPerPage:this.slideWidth;this.offset=t*Math.round(this.offset/t),this.offset=Math.max(0,Math.min(this.offset,this.maxOffset)),this.currentPage=this.scrollPerPage?Math.round(this.offset/this.slideWidth/this.currentPerPage):Math.round(this.offset/this.slideWidth)},computeCarouselWidth:function(){this.getSlideCount(),this.getBrowserWidth(),this.getCarouselWidth(),this.setCurrentPageInBounds()},setCurrentPageInBounds:function(){if(!this.canAdvanceForward&&this.scrollPerPage){var t=this.pageCount-1;this.currentPage=t>=0?t:0,this.offset=Math.max(0,Math.min(this.offset,this.maxOffset))}},handleTransitionEnd:function(){this.$emit("transitionEnd")}},mounted:function(){window.addEventListener("resize",(0,c.default)(this.onResize,this.refreshRate)),(this.isTouch||this.mouseDrag)&&this.$refs["VueCarousel-wrapper"].addEventListener(this.isTouch?"touchstart":"mousedown",this.onStart),this.attachMutationObserver(),this.computeCarouselWidth(),this.transitionend=m(),this.$refs["VueCarousel-inner"].addEventListener(this.transitionend,this.handleTransitionEnd)},beforeDestroy:function(){this.detachMutationObserver(),window.removeEventListener("resize",this.getBrowserWidth),this.$refs["VueCarousel-inner"].removeEventListener(this.transitionend,this.handleTransitionEnd),this.$refs["VueCarousel-wrapper"].removeEventListener(this.isTouch?"touchstart":"mousedown",this.onStart)}}},function(t,e,n){t.exports={default:n(10),__esModule:!0}},function(t,e,n){n(11),t.exports=n(14).Math.sign},function(t,e,n){var i=n(12);i(i.S,"Math",{sign:n(28)})},function(t,e,n){var i=n(13),r=n(14),a=n(15),o=n(17),s=n(27),u="prototype",c=function(t,e,n){var l,d,f,h=t&c.F,p=t&c.G,g=t&c.S,v=t&c.P,m=t&c.B,b=t&c.W,y=p?r:r[e]||(r[e]={}),C=y[u],x=p?i:g?i[e]:(i[e]||{})[u];p&&(n=e);for(l in n)d=!h&&x&&void 0!==x[l],d&&s(y,l)||(f=d?x[l]:n[l],y[l]=p&&"function"!=typeof x[l]?n[l]:m&&d?a(f,i):b&&x[l]==f?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[u]=t[u],e}(f):v&&"function"==typeof f?a(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[l]=f,t&c.R&&C&&!C[l]&&o(C,l,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.5.4"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(16);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(18),r=n(26);t.exports=n(22)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(19),r=n(21),a=n(25),o=Object.defineProperty;e.f=n(22)?Object.defineProperty:function(t,e,n){if(i(t),e=a(e,!0),i(n),r)try{return o(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(20);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(22)&&!n(23)(function(){return 7!=Object.defineProperty(n(24)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){t.exports=!n(23)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(20),r=n(13).document,a=i(r)&&i(r.createElement);t.exports=function(t){return a?r.createElement(t):{}}},function(t,e,n){var i=n(20);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={props:{autoplay:{type:Boolean,default:!1},autoplayTimeout:{type:Number,default:2e3},autoplayHoverPause:{type:Boolean,default:!0}},data:function(){return{autoplayInterval:null}},destroyed:function(){this.$isServer||(this.$el.removeEventListener("mouseenter",this.pauseAutoplay),this.$el.removeEventListener("mouseleave",this.startAutoplay))},methods:{pauseAutoplay:function(){this.autoplayInterval&&(this.autoplayInterval=clearInterval(this.autoplayInterval))},startAutoplay:function(){this.autoplay&&(this.autoplayInterval=setInterval(this.advancePage,this.autoplayTimeout))}},mounted:function(){!this.$isServer&&this.autoplayHoverPause&&(this.$el.addEventListener("mouseenter",this.pauseAutoplay),this.$el.addEventListener("mouseleave",this.startAutoplay)),this.startAutoplay()}};e.default=n},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e,n){var i=void 0;return function(){var r=void 0,a=function(){i=null,n||t.apply(r)},o=n&&!i;clearTimeout(i),i=setTimeout(a,e),o&&t.apply(r)}};e.default=n},function(t,e,n){function i(t){n(32)}var r=n(7)(n(34),n(35),i,"data-v-7fed18e9",null);t.exports=r.exports},function(t,e,n){var i=n(33);"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);n(5)("a1957e6c",i,!0,{})},function(t,e,n){e=t.exports=n(4)(),e.push([t.id,".VueCarousel-navigation-button[data-v-7fed18e9]{position:absolute;top:50%;box-sizing:border-box;color:#000;text-decoration:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background-color:transparent;padding:0;cursor:pointer;outline:none}.VueCarousel-navigation-next[data-v-7fed18e9]{right:0;transform:translateY(-50%) translateX(100%)}.VueCarousel-navigation-prev[data-v-7fed18e9]{left:0;transform:translateY(-50%) translateX(-100%)}.VueCarousel-navigation--disabled[data-v-7fed18e9]{opacity:.5;cursor:default}",""])},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"navigation",inject:["carousel"],props:{clickTargetSize:{type:Number,default:8},nextLabel:{type:String,default:""},prevLabel:{type:String,default:""}},computed:{canAdvanceForward:function(){return this.carousel.canAdvanceForward||!1},canAdvanceBackward:function(){return this.carousel.canAdvanceBackward||!1}},methods:{triggerPageAdvance:function(t){this.$emit("navigationclick",t)}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"VueCarousel-navigation"},[n("button",{staticClass:"VueCarousel-navigation-button VueCarousel-navigation-prev",class:{"VueCarousel-navigation--disabled":!t.canAdvanceBackward},style:"padding: "+t.clickTargetSize+"px; margin-right: -"+t.clickTargetSize+"px;",attrs:{type:"button","aria-label":"Previous page",role:"button"},domProps:{innerHTML:t._s(t.prevLabel)},on:{click:function(e){e.preventDefault(),t.triggerPageAdvance("backward")}}}),t._v(" "),n("button",{staticClass:"VueCarousel-navigation-button VueCarousel-navigation-next",class:{"VueCarousel-navigation--disabled":!t.canAdvanceForward},style:"padding: "+t.clickTargetSize+"px; margin-left: -"+t.clickTargetSize+"px;",attrs:{type:"button","aria-label":"Next page",role:"button"},domProps:{innerHTML:t._s(t.nextLabel)},on:{click:function(e){e.preventDefault(),t.triggerPageAdvance()}}})])},staticRenderFns:[]}},function(t,e,n){function i(t){n(37)}var r=n(7)(n(39),n(40),i,"data-v-7e42136f",null);t.exports=r.exports},function(t,e,n){var i=n(38);"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);n(5)("3ea8dd5f",i,!0,{})},function(t,e,n){e=t.exports=n(4)(),e.push([t.id,".VueCarousel-pagination[data-v-7e42136f]{width:100%;text-align:center}.VueCarousel-dot-container[data-v-7e42136f]{display:inline-block;margin:0 auto;padding:0}.VueCarousel-dot[data-v-7e42136f]{display:inline-block;cursor:pointer}.VueCarousel-dot-button[data-v-7e42136f]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background-color:transparent;padding:0;border-radius:100%;outline:none;cursor:pointer}.VueCarousel-dot-button[data-v-7e42136f]:focus{outline:1px solid #add8e6}",""])},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"pagination",inject:["carousel"],methods:{goToPage:function(t){this.$emit("paginationclick",t)},isCurrentDot:function(t){return t===this.carousel.currentPage}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:t.carousel.pageCount>1,expression:"carousel.pageCount > 1"}],staticClass:"VueCarousel-pagination"},[n("ul",{staticClass:"VueCarousel-dot-container",attrs:{role:"tablist"}},t._l(t.carousel.pageCount,function(e,i){return n("li",{key:i,staticClass:"VueCarousel-dot",class:{"VueCarousel-dot--active":t.isCurrentDot(i)},style:"\n margin-top: "+2*t.carousel.paginationPadding+"px;\n padding: "+t.carousel.paginationPadding+"px;\n ",attrs:{"aria-hidden":"false",role:"presentation","aria-selected":t.isCurrentDot(i)?"true":"false"},on:{click:function(e){t.goToPage(i)}}},[n("button",{staticClass:"VueCarousel-dot-button",style:"\n width: "+t.carousel.paginationSize+"px;\n height: "+t.carousel.paginationSize+"px;\n background: "+(t.isCurrentDot(i)?t.carousel.paginationActiveColor:t.carousel.paginationColor)+";\n ",attrs:{type:"button",role:"button",tabindex:i}})])}))])},staticRenderFns:[]}},function(t,e,n){function i(t){n(42)}var r=n(7)(n(44),n(45),i,null,null);t.exports=r.exports},function(t,e,n){var i=n(43);"string"==typeof i&&(i=[[t.id,i,""]]),i.locals&&(t.exports=i.locals);n(5)("e8ab14d8",i,!0,{})},function(t,e,n){e=t.exports=n(4)(),e.push([t.id,".VueCarousel-slide{-ms-flex-preferred-size:inherit;flex-basis:inherit;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-touch-callout:none;outline:none}",""])},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"slide",data:function(){return{width:null}},inject:["carousel"],mounted:function(){this.$isServer||this.$el.addEventListener("dragstart",function(t){return t.preventDefault()})},computed:{activeSlides:function t(){for(var e=this.carousel,n=e.currentPage,i=e.perPage,r=e.$children,t=(e.slideCount,[]),a=r.filter(function(t){return t.$el&&t.$el.className.includes("VueCarousel-slide")}).map(function(t){return t._uid}),o=0;o<i;){var s=a[n*i+o];t.push(s),o++}return t},isActive:function(){return this.activeSlides.includes(this._uid)},isCenter:function(){var t=this.carousel.perPage;return!(t%2===0||!this.isActive)&&this.activeSlides.indexOf(this._uid)===Math.floor(t/2)}}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"VueCarousel-slide",class:{"VueCarousel-slide-active":t.isActive,"VueCarousel-slide-center":t.isCenter},attrs:{tabindex:"-1"}},[t._t("default")],2)},staticRenderFns:[]}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("section",{staticClass:"VueCarousel"},[n("div",{ref:"VueCarousel-wrapper",staticClass:"VueCarousel-wrapper"},[n("div",{ref:"VueCarousel-inner",staticClass:"VueCarousel-inner",style:{transform:"translate3d("+t.currentOffset+"px, 0, 0)",transition:t.dragging?"none":t.transitionStyle,"ms-flex-preferred-size":t.slideWidth+"px","webkit-flex-basis":t.slideWidth+"px","flex-basis":t.slideWidth+"px",visibility:t.slideWidth?"visible":"hidden","padding-left":t.padding+"px","padding-right":t.padding+"px"},attrs:{role:"listbox"}},[t._t("default")],2)]),t._v(" "),t.paginationEnabled&&t.pageCount>0?n("pagination",{on:{paginationclick:function(e){t.goToPage(e,"pagination")}}}):t._e(),t._v(" "),t.navigationEnabled?n("navigation",{attrs:{clickTargetSize:t.navigationClickTargetSize,nextLabel:t.navigationNextLabel,prevLabel:t.navigationPrevLabel},on:{navigationclick:t.handleNavigation}}):t._e()],1)},staticRenderFns:[]}}])});
{% load static wagtailcore_tags wagtailimages_tags wagtailmetadata_tags %}
<!DOCTYPE html>
<html id="patternlab-html">
<head id="patternlab-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 rel="stylesheet" href="{% static "czech_inspirational/css/styles.css" %}" media="all" />
<link rel="stylesheet" href="{% static "czech_inspirational/css/custom_bookweb.css" %}" media="all" />
{% if page.root_page.matomo_id %}
{% include "shared/matomo_snippet.html" with matomo_id=page.root_page.matomo_id %}
{% endif %}
</head>
<body class="overflow-x-hidden">
<nav class="navbar navbar--simple __js-root">
<ui-app inline-template>
<ui-navbar inline-template>
<div>
<div class="container container--wide navbar__content" :class="{'navbar__content--initialized': true}">
<div class="navbar__brand my-4 flex items-center lg:pr-8 lg:my-0">
<a href="&#x2F;" class="lg:border-r lg:border-grey-300 lg:pr-8">
<img src="{% static "czech_inspirational/images/logo_napis_white.svg" %}" class="w-40" />
</a>
</div>
<div class="navbar__menutoggle my-4 flex justify-end lg:hidden">
<a href="#" @click="show = !show" class="no-underline hover:no-underline">
<i class="ico--menu text-3xl">
</i>
</a>
</div>
<div v-if="show || isLgScreenSize" class="navbar__main navbar__section navbar__section--expandable container-padding--zero lg:container-padding--auto">
<ul class="navbar-menu text-white">
<li class="navbar-menu__item">
<a href="{{ page.root_page.chapters_page_url }}" data-href="{{ page.root_page.chapters_page_url }}" class="navbar-menu__link">Přečíst online</a>
</li>
<li class="navbar-menu__item">
<a href="{{ page.root_page.download_page_url }}" data-href="{{ page.root_page.download_page_url }}" class="navbar-menu__link">Stáhnout ebook</a>
</li>
</ul>
</div>
<div v-if="show || isLgScreenSize" class="pb-4 lg:py-2 navbar__actions navbar__section navbar__section--expandable container-padding--zero lg:container-padding--auto self-start flex flex-col sm:flex-row lg:flex-col sm:space-x-4 space-y-2 sm:space-y-0 lg:space-y-2 xl:flex-row xl:space-x-2 xl:space-y-0 items-stretch md:items-start lg:items-center md-h-12">
<a href="{{ page.root_page.buy_book_url }}">
<!-- -->
<button class="btn btn--icon btn--cyan-200 btn--hoveractive btn--condensed btn--fullwidth md:btn--autowidth lg:text-sm xl:text-base">
<div class="btn__body-wrap">
<div class="btn__body ">Koupit knihu</div>
<div class="btn__icon ">
<i class="ico--pirati">
</i>
</div>
</div>
</button>
<!-- -->
</a>
</div>
</div>
</div>
</ui-navbar>
</ui-app>
</nav>
{% block content %}{% endblock content %}
<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 target="_blank" href="https://www.pirati.cz/">
<img src="{% static "czech_inspirational/images/logo.svg" %}" alt="" 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="inline-block" style="transform: scale(-1, 1);">&copy;</span>
Piráti, {% now "Y" %}. <a href="https://wiki.pirati.cz/rules/prah#licence" target="_blank" class="underline">CC-BY-SA 4.0</a>.
Všechna práva vyhlazena. Sdílejte a nechte ostatní sdílet za stejných podmínek.<br>
Zadavatel | zpracovatel: Česká pirátská strana
</p>
</section>
<section class="footer__main-links bg-grey-700 text-white lg:grid grid-cols-3 gap-4">
<div class="pt-8 pb-4 lg:py-0">
</div>
<div class="py-4 lg:py-0 border-t border-grey-400 lg:border-t-0">
<ui-footer-collapsible label="Podpoř nás">
<ul class="mt-6 space-y-2 text-grey-200">
<li>
<a href="https://nalodeni.pirati.cz/">Nalodit se</a>
</li>
<li>
<a href="https://dary.pirati.cz/">Darovat</a>
</li>
<li>
<a href="https://www.piratskyobchod.cz/">Pirátský obchod</a>
</li>
</ul>
</ui-footer-collapsible>
</div>
<div class="pt-4 lg:py-0 border-t border-grey-400 lg:border-t-0">
<ui-footer-collapsible label="Jak pracujeme">
<ul class="mt-6 space-y-2 text-grey-200">
<li>
<a href="https://piratipracuji.cz/">Piráti pracují</a>
</li>
<li>
<a href="https://www.pirati.cz/">Pirátský web</a>
</li>
<li>
<a href="https://www.piratskelisty.cz/">Pirátské listy</a>
</li>
</ul>
</ui-footer-collapsible>
</div>
</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 target="_blank" href="https://www.facebook.com/ceska.piratska.strana/" class="social-icon ">
<i class="ico--facebook">
</i>
</a>
<a target="_blank" href="https://www.instagram.com/pirati.cz/" class="social-icon ">
<i class="ico--instagram">
</i>
</a>
<a target="_blank" href="https://www.twitter.com/PiratskaStrana" class="social-icon ">
<i class="ico--twitter">
</i>
</a>
<a target="_blank" href="https://www.youtube.com/user/CeskaPiratskaStrana" class="social-icon ">
<i class="ico--youtube">
</i>
</a>
</div>
<a href="mailto:info@pirati.cz" class="icon-link contact-line ">
<i class="ico--envelope">
</i>
<span>Dejte nám vědět</span>
</a>
</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/">
<button class="btn btn--icon btn--white btn--hoveractive text-lg btn--fullwidth sm:btn--autowidth">
<div class="btn__body-wrap">
<div class="btn__body ">Darovat</div>
<div class="btn__icon ">
<i class="ico--donation-full">
</i>
</div>
</div>
</button>
</a>
<a href="https://nalodeni.pirati.cz/">
<button 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 ">Nalodit se</div>
<div class="btn__icon ">
<i class="ico--anchor">
</i>
</div>
</div>
</button>
</a>
</div>
</section>
</div>
<section class="footer__sub-links lg:border-t border-grey-400 bg-black">
<div class="container container--default">
<ui-footer-collapsible label="Otevřenost" labelClass="lg:w-1/4" wrapperClass="flex flex-col lg:flex-row lg:space-x-4 lg:items-center py-4 lg:py-6 border-t border-grey-400 lg:border-t-0" slotWrapperclass="lg:w-2/4">
<ul class="lg:w-full lg:pr-8 grid grid-cols-1 lg:grid-cols-3 lg:gap-4 items-center mt-6 space-y-2 lg:mt-0 lg:space-y-0 text-grey-200 text-xs">
<li class="w-full">
<a href="https://ib.fio.cz/ib/transparent?a=2100048174">Transparentní účet</a>
</li>
<li class="w-full">
<a href="https://smlouvy.pirati.cz/">Registr smluv</a>
</li>
<li class="w-full">
<a href="https://evidence.pirati.cz/">Seznam lobbistických kontaktů</a>
</li>
</ul>
</ui-footer-collapsible>
</div>
</section>
</div>
</ui-app>
</footer>
<script src="{% static "shared/vendor/vue/vue.2.6.11.js" %}"></script>
<script src="{% static "czech_inspirational/js/main.bundle.js" %}"></script>
{% block extrascript %}{% endblock %}
</body>
</html>
{% extends "czech_inspirational/base.html" %}
{% load static wagtailcore_tags wagtailimages_tags %}
{% block content %}
<div class="container container--default text-center">
<h1 class="head-alt-lg lg:head-alt-xl mt-40 text-left">{{ page.title }}</h1>
<div class="text-left my-8">{{ page.author }}</div>
<figure class="tha_chapterhead">
<div class="block bg-grey-100 text-center py-3">
<picture class="block mx-auto">
{% image page.image max-1200x600 as img %}
<img src="{{ img.url }}" alt="{{ page.title }}" class="w-full" />
</picture>
</div>
<figcaption class="font-condensed text-sm text-left uppercase mt-4">Ilustrace: Věra Veselá</figcaption>
</figure>
</div>
<article class="pt-20 container container--default lg:flex lg:space-x-16 mb-20">
<div class="lg:w-2/3 content-block">
{{ page.text|richtext }}
{% if page.extra_text %}
<div class="bg-blue-300 pl-8 py-8 pr-8 mt-16 text-white">
{{ page.extra_text|richtext }}
</div>
{% endif %}
</div>
<aside class="pt-8 lg:w-1/3 md:pt-0">
<div id="tha_stickysharebox" class="sharebox md:card md:elevation-10 mt-20 md:mt-0">
<div class="md:card__body">
<span class="head-alt-base md:head-alt-md">Sdílení je aktem lásky</span>
<div class="flex w-full space-x-4 pt-4 md:pt-8 text-center text-white">
<a href="https://www.facebook.com/ceska.piratska.strana/" class="hover:no-underline bg-brands-facebook px-8 py-3 text-2xl w-full"><i class="ico--facebook"></i></a>
<a href="https://www.twitter.com/PiratskaStrana" class="hover:no-underline bg-brands-twitter px-8 py-3 text-2xl w-full"><i class="ico--twitter"></i></a>
</div>
</div>
<div class="h-52 overflow-hidden hidden md:block">
<img src="{% static "czech_inspirational/images/flag.png" %}" alt="Pirátská strana" class="w-80 object-cover m-auto">
</div>
</div>
</aside>
</article>
<hr>
<div id="paging" class="mt-20 container container--default">
<h1 class="head-alt-base md:head-alt-md">Další kapitoly</h1>
</div>
<div id="tha_carousel_cont" class="mb-20 container container--wide">
<div id="tha_carousel"></div>
<div class="text-center">
<a href="{{ page.root_page.chapters_page_url }}">
<button class="btn btn--icon btn--inverted-icon btn--hoveractive btn--to-grey-700">
<div class="btn__body-wrap">
<div class="btn__body py-4 px-4">Zpět na kapitoly</div>
<div class="btn__icon bg-grey-800">
<i class="ico--chevron-left"></i>
</div>
</div>
</button>
</a>
</div>
</div>
{% endblock %}
{% block extrascript %}
<script src="https://ssense.github.io/vue-carousel/js/vue-carousel.min.js"></script>
<script>
<!-- document.addEventListener('DOMContentLoaded', function(){ -->
Vue.use(VueCarousel);
var nextlabel="<i class='ico--chevron-right'></i>";
var prevlabel="<i class='ico--chevron-left'></i>";
new Vue({
el: '#tha_carousel',
components: {
'carousel': VueCarousel.Carousel,
'slide': VueCarousel.Slide
},
template: `
<carousel :perPage="4" :perPageCustom="[ [200, 1], [768, 3], [1024, 4]]" :navigationEnabled="true" :navigationNextLabel="nextlabel" :navigationPrevLabel="prevlabel" class="article-card-list pt-12 pb-8">
{% for chapter in chapters %}
<slide>
<div class="relative card card--hoveractive elevation-3 hover:elevation-8 article-card mt-8 h-80 sm:h-96">
<div class="absolute -top-8 w-full">
<a href="{% pageurl chapter %}" class="block w-24 h-24 mx-auto p-1 border border-grey-100 rounded-full">
<img src="{% static "czech_inspirational/images/violetbg.png" %}" class="rounded-full">
</a>
<div class="article-card-cover__details head-alt-md text-center w-full h-full leading-relaxed text-white"><span class="tha_cardnumber">{{ chapter.number }}</span></div>
</div>
<div class="card__body article-card__body pt-24 sm:pt-32">
<a href="{% pageurl chapter %}" class="">
<h1 class="head-heavy-xs text-center uppercase card-headline mb-4">{{ chapter.title }}</h1>
</a>
</div>
</div>
</slide>
{% endfor %}
</carousel>
`
});
<!-- }); -->
</script>
{% endblock %}
{% extends "czech_inspirational/base.html" %}
{% load wagtailcore_tags %}
{% block content %}
<div class="container container--default text-center">
<section>
<h1 class="head-alt-lg lg:head-alt-xl mt-40 mb-20 text-left">{{ page.title }}</h1>
<div class="candidate-table container-padding--zero lg:container-padding--auto mb-20">
{% for chapter in chapters %}
<a href="{% pageurl chapter %}" data-href="{% pageurl chapter %}" class="candidate-table-row">
<div class="font-alt flex justify-center items-center col-start-1 col-end-1 avatar candidate-table-row__avatar ml-4 lg:ml-8 mr-5 my-1 h-12 w-12 text-white bg-pink-800 align-middle text-3xl">
<div style="position:relative;top:-1px;height:26px;">{{ chapter.number }}</div>
</div>
<div class="col-start-2 col-end-6 text-left pl-0 pr-4 candidate-table-row__name">
<span class="font-bold font-condensed uppercase">{{ chapter.title }}</span>
</div>
</a>
{% endfor %}
</div>
</section>
</div>
{% endblock %}
{% extends "czech_inspirational/base.html" %}
{% load static wagtailcore_tags %}
{% block content %}
<div class="container container--default">
{% if show == "download" %}
<h2 id="downloadheading" class="mt-40 mx-auto mb-8 --leading-4 head-alt-md lg:head-alt-lg max-w-xl text-center">Příjemné<br>čtení!</h2>
<div class="text-center pb-2 md:pb-0 mb-28">
<a class="dlhref md:mx-4" href="{{ page.book_file.url }}">
<button class="w-80 text-lg btn btn--hoveractive btn--to-grey-700 inline-block align-top mb-3">
<div class="btn__body py-10 h-12">Stáhnout ebook</div>
</button>
</a>
</div>
{% elif show == "thanks" %}
<h2 id="downloadheading" class="mt-40 mx-auto mb-46 --leading-4 head-alt-md lg:head-alt-lg max-w-xl text-center">Kniha se stahuje,<br>děkujeme</h2>
<div class="mt-64 pt-8 sm:pt-0 sm:mt-48 text-center">
<a href="/" class="head-heavy-2xs underline text-cyan-200 whitespace-nowrap"><span class="head-heavy-2xs">Zpět na Homepage</span></a>
</div>
{% else %}
<h2 id="downloadheading" class="mt-40 mx-auto mb-8 --leading-4 head-alt-md lg:head-alt-lg max-w-xl text-center">Zadejte svůj e-mail a&nbsp;stáhněte si ebook</h2>
<form class="text-center block" method="post">
{% csrf_token %}
<div class="inline-block text-left align-top">
<input type="email" name="email" class="text-input form-field__control w-full" value="" placeholder="Váš Email" required="required">
<div class="checkbox form-field__control display-block mt-2 mb-8 md:mb-0">
<input type="checkbox" id="checkbox_1" required="required" name="accept_terms">
<label for="checkbox_1">Souhlasím se zásadami ochrany osobních údajů</label>
</div>
<div class="checkbox form-field__control display-block mt-2 mb-8 md:mb-0">
<input type="checkbox" id="checkbox_2" name="subscribe">
<label for="checkbox_2">Souhlasím se zasíláním novinek od Pirátské strany</label>
</div>
</div>
<button class="mt-0 btn text-lg btn btn--cyan-200 btn--hoveractive border-cyan-200 inline-block align-top">
<div class="btn__body py-0 h-12">Potvrdit</div>
</button>
<div class="mt-12 pt-1 text-center">
<a href="?stahnout" class="head-heavy-2xs underline text-cyan-200 whitespace-nowrap">
<span href="#" class="social-icon social-icon--fill social-icon--4 bg-cyan-200 text-white mr-2">
<i class="ico--download3 text-sm"></i>
</span>
<span class="head-heavy-2xs">Chci stáhnout ebook bez zadání emailu</span>
</a>
</div>
</form>
{% endif %}
</div>
<div class="text-center mb-20">
<a target="_blank" href="https://www.pirati.cz/o-nas/ochrana-osobnich-udaju/" class="block underline mt-6 text-sm text-grey-300">Zásady ochrany osobních údajů</a>
</div>
<div class="tha_underground tha_underground_higher relative">
<picture class="tha_heroimage block card elevation-21 mx-auto">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/bookmockup_sm.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/bookmockup.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/bookmockup@2x.webp" %}" type="image/webp">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/bookmockup_sm.jpg" %}" type="image/jpeg">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/bookmockup.jpg" %}" type="image/jpeg">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/bookmockup@2x.jpg" %}" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/bookmockup_sm.jpg" %} 608w,
{% static "czech_inspirational/images/bookmockup.jpg" %} 683w,
{% static "czech_inspirational/images/bookmockup@2x.jpg" %} 1366w" sizes="(max-width: 720px) 608px,
(max-width: 1440px) 683px,
(min-width: 1441px) 1366px" src="{% static "czech_inspirational/images/bookmockup.jpg" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
<aside id="tha_animations_container1" class="tha_animations_container">
<div id="tha_leftfloat1" class="hidden md:block">
<picture class="block">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/leftfloat1.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/leftfloat1@2x.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/leftfloat1.png" %}" type="image/png">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/leftfloat1@2x.png" %}" type="image/png">
<img srcset="{% static "czech_inspirational/images/leftfloat1.png" %} 2x,
{% static "czech_inspirational/images/leftfloat1@2x.png" %} 1x" src="{% static "czech_inspirational/images/leftfloat1.png" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
</div>
<div id="tha_rightfloat1" class="hidden md:block">
<picture class="block">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/rightfloat1.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/rightfloat1@2x.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/rightfloat1.png" %}" type="image/png">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/rightfloat1@2x.png" %}" type="image/png">
<img srcset="{% static "czech_inspirational/images/rightfloat1.png" %} 561w,
{% static "czech_inspirational/images/rightfloat1@2x.png" %} 1122w" sizes="(max-width: 1440px) 561px,
(min-width: 1441px) 1122px" src="{% static "czech_inspirational/images/leftfloat1.png" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
</div>
</aside>
</div>
{% endblock %}
{% extends "czech_inspirational/base.html" %}
{% load static wagtailcore_tags %}
{% block content %}
<div class="tha_fullwidth_container relative">
<div class="container container--default text-center">
<h1 class="head-alt-lg lg:head-alt-xl mt-40 mx-auto text-center max-w-3xl mb-8">KNIHA O PRÁCI PIRÁTŮ NA&nbsp;RADNICÍCH JE NA SVĚTĚ</h1>
<div class="pb-20">
<a href="{{ page.root_page.chapters_page_url }}">
<!-- -->
<button class="btn btn--icon btn--to-grey-700 mx-2 mb-2 btn--hoveractive">
<div class="btn__body-wrap">
<div class="btn__body ">Přečíst online</div>
<div class="btn__icon ">
<i class="ico--eye">
</i>
</div>
</div>
</button>
<!-- -->
</a>
<a href="{{ page.root_page.buy_book_url }}">
<!-- -->
<button class="btn btn--icon btn--cyan-200 mx-2 mb-2 btn--hoveractive">
<div class="btn__body-wrap">
<div class="btn__body ">Koupit knihu</div>
<div class="btn__icon ">
<i class="ico--pig">
</i>
</div>
</div>
</button>
<!-- -->
</a>
</div>
<picture class="tha_heroimage block card elevation-21 mx-auto mb-20 max-w-full">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/bookmockup_sm.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/bookmockup.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/bookmockup@2x.webp" %}" type="image/webp">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/bookmockup_sm.jpg" %}" type="image/jpeg">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/bookmockup.jpg" %}" type="image/jpeg">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/bookmockup@2x.jpg" %}" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/bookmockup_sm.jpg" %} 608w,{% static "czech_inspirational/images/bookmockup.jpg" %} 683w, {% static "czech_inspirational/images/bookmockup@2x.jpg" %} 1366w"
sizes="(max-width: 720px) 608px, (max-width: 1440px) 683px, (min-width: 1441px) 1366px" src="{% static "czech_inspirational/images/bookmockup.jpg" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
<picture class="tha_logo_illustrated block mx-auto">
<source srcset="{% static "czech_inspirational/images/logo-illustrated.webp" %} 1x, {% static "czech_inspirational/images/logo-illustrated@2x.webp" %} 2x" type="image/webp">
<source srcset="{% static "czech_inspirational/images/logo-illustrated.jpg" %} 1x, {% static "czech_inspirational/images/logo-illustrated@2x.jpg" %} 2x" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/logo-illustrated.jpg" %} 1x, {% static "czech_inspirational/images/logo-illustrated@2x.jpg" %} 2x" src="{% static "czech_inspirational/images/logo-illustrated.jpg" %}" alt="logo Pirátské strany" class="w-full">
</picture>
<div class="text-center mb-40">
<h2 class="head-alt-md lg:head-alt-lg mt-8 mx-auto mb-12 --leading-4 max-w-2xl">Změna k lepšímu začíná tam, kde je každý z nás doma.</h2>
<p class="para text-lg lg:text-2xl mx-auto max-w-3xl mb-20">Víte, jakou práci odvedli Piráti na radnicích? Přesně to se dozvíte v naší první knize. Jmenuje se Česko inspirativní a není o vzdušných zámcích, ale o tom, co jsme skutečně pomohli změnit k lepšímu. Můžete jí inspirovat vedení svojí obce, vysvětlit díky ní rodině i přátelům, proč podporujete právě Piráty, nebo potěšit sami sebe výsledky z desítek obcí a měst.</p>
<p class="para text-md lg:text-lg mx-auto max-w-xl">Knihu si nyní můžete přečíst celou online, stáhnout si ji ve formě ebooku, nebo si ji objednat fyzicky.</p>
</div>
<div>
<a id="prehrat-video" href="#prehrat-video" class="block">
<picture class="">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/videobox_sm.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/videobox.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/videobox@2x.webp" %}" type="image/webp">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/videobox_sm.jpg" %}" type="image/jpeg">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/videobox.jpg" %}" type="image/jpeg">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/videobox@2x.jpg" %}" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/videobox_sm.jpg" %} 656w, {% static "czech_inspirational/images/videobox.jpg" %} 683w, {% static "czech_inspirational/images/videobox@2x.jpg" %} 1366w" sizes="(max-width: 720px) 656px, (max-width: 1440px) 683px, (min-width: 1441px) 1366px" src="{% static "czech_inspirational/images/videobox.jpg" %}" alt="přehrát video">
</picture>
</a>
</div>
</div>
<aside id="tha_animations_container1" class="tha_animations_container">
<div id="tha_leftfloat1" class="hidden md:block">
<picture class="block">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/leftfloat1.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/leftfloat1@2x.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/leftfloat1.png" %}" type="image/png">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/leftfloat1@2x.png" %}" type="image/png">
<img srcset="{% static "czech_inspirational/images/leftfloat1.png" %} 2x, {% static "czech_inspirational/images/leftfloat1@2x.png" %} 1x" src="{% static "czech_inspirational/images/leftfloat1.png" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
</div>
<div id="tha_leftfloat2" class="hidden md:block">
<picture class="block">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/bookmockup_sm.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/bookmockup.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/bookmockup@2x.webp" %}" type="image/webp">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/bookmockup_sm.jpg" %}" type="image/jpeg">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/bookmockup.jpg" %}" type="image/jpeg">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/bookmockup@2x.jpg" %}" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/leftfloat2.png" %} 1x, {% static "czech_inspirational/images/leftfloat2@2x.png" %} 2x" src="{% static "czech_inspirational/images/leftfloat2.png" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
</div>
<div id="tha_leftfloat_arrow" class="hidden md:block">
<img src="{% static "czech_inspirational/images/leftfloat_arrow@2x.png" %}" alt="šipka">
</div>
<div id="tha_rightfloat_arrow1" class="hidden md:block">
<img src="{% static "czech_inspirational/images/rightfloatarrow1.png" %}" alt="šipka">
</div>
<div id="tha_rightfloat_arrow2" class="hidden md:block">
<img src="{% static "czech_inspirational/images/rightfloatarrow2.png" %}" alt="šipka">
</div>
<div id="tha_rightfloat1" class="hidden md:block">
<picture class="block">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/rightfloat1.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/rightfloat1@2x.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/rightfloat1.png" %}" type="image/png">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/rightfloat1@2x.png" %}" type="image/png">
<img srcset="{% static "czech_inspirational/images/rightfloat1.png" %} 561w, {% static "czech_inspirational/images/rightfloat1@2x.png" %} 1122w" sizes="(max-width: 1440px) 561px, (min-width: 1441px) 1122px" src="{% static "czech_inspirational/images/leftfloat1.png" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
</div>
<div id="tha_rightfloat2" class="hidden md:block">
<picture class="block">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/bookmockup_sm.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/bookmockup.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/bookmockup@2x.webp" %}" type="image/webp">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/bookmockup_sm.jpg" %}" type="image/jpeg">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/bookmockup.jpg" %}" type="image/jpeg">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/bookmockup@2x.jpg" %}" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/rightfloat2.png" %} 310w, {% static "czech_inspirational/images/rightfloat2@2x.png" %} 620w" sizes="(max-width: 1440px) 310px, (min-width: 1441px) 620px" src="{% static "czech_inspirational/images/rightfloat2.png" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
</div>
</aside>
<!--tha_animations_container-->
</div>
<div class="tha_fullwidth_container relative pt-40">
<div class="container container--default text-center">
<section class="text-center">
<h2 class="head-alt-md lg:head-alt-lg mb-20">OBSAH KNIHY</h2>
<div id="chaptertable" class="candidate-table candidate-table--fadeout container-padding--zero lg:container-padding--auto inline-block">
{% for chapter in chapters %}
<a href="{% pageurl chapter %}" data-href="{% pageurl chapter %}" class="candidate-table-row">
<div class="font-alt flex justify-center items-center col-start-1 col-end-1 avatar candidate-table-row__avatar ml-4 lg:ml-8 mr-5 my-1 h-12 w-12 text-white bg-pink-800 align-middle text-3xl">
<div style="position:relative;top:-1px;height:26px;">{{ chapter.number }}</div>
</div>
<div class="col-start-2 col-end-6 text-left pl-0 pr-4 candidate-table-row__name">
<span class="font-bold font-condensed uppercase">{{ chapter.title }}</span>
</div>
</a>
{% endfor %}
</div>
</section>
<div class="text-center">
<a id="showfulltable" href="{{ page.root_page.chapters_page_url }}">
<button class="btn btn--icon btn--black-200 max-w-none btn--to-grey-700 btn--hoveractive">
<div class="btn__body-wrap">
<div class="btn__body py-8">Zobrazit všechny kapitoly</div>
<div class="btn__icon px-8">
<i class="ico--chevron-right">
</i>
</div>
</div>
</button>
</a>
</div>
<h2 class="mt-40 mx-auto mb-8 --leading-4 head-alt-lg lg:head-alt-xl max-w-lg text-center">Podpořte piráty koupí knihy!</h2>
<div class="text-center mb-20">
<a href="{{ page.root_page.buy_book_url }}">
<!-- -->
<button class="btn btn--icon btn--cyan-200 btn--hoveractive">
<div class="btn__body-wrap">
<div class="btn__body">Koupit knihu</div>
<div class="btn__icon ">
<i class="ico--pig">
</i>
</div>
</div>
</button>
<!-- -->
</a>
</div>
</div>
<!--- end container==default -->
<aside id="tha_animations_container2" class="tha_animations_container">
<div id="tha_leftparalax" class="hidden md:block">
<picture class="block">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/leftparalax.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/leftparalax@2x.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/leftparalax.jpg" %}" type="image/jpeg">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/leftparalax@2x.jpg" %}" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/leftparalax.jpg" %} 2x, {% static "czech_inspirational/images/leftparalax.jpg" %} 1x" src="{% static "czech_inspirational/images/leftparalax.jpg" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
</div>
<div id="tha_rightparalax" class="hidden md:block">
<picture class="block">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/rightparalax.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/rightparalax@2x.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/rightparalax.jpg" %}" type="image/jpeg">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/rightparalax@2x.jpg" %}" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/rightparalax.jpg" %} 2x, {% static "czech_inspirational/images/rightparalax.jpg" %} 1x" src="{% static "czech_inspirational/images/rightparalax.jpg" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
</div>
<div id="tha_bottom_arrow" class="hidden md:block">
<img src="{% static "czech_inspirational/images/bottomarrow@2x.png" %}" alt="šipka">
</div>
</aside>
<!--end tha_animations_container-->
</div>
<div class="tha_underground">
<div id="tha_bottomcenter" class="mx-auto max-w-full relative">
<picture class="tha_heroimage block card elevation-21">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/bookmockup_sm.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/bookmockup.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/bookmockup@2x.webp" %}" type="image/webp">
<source media="(max-width: 720px)" srcset="{% static "czech_inspirational/images/bookmockup_sm.jpg" %}" type="image/jpeg">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/bookmockup.jpg" %}" type="image/jpeg">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/bookmockup@2x.jpg" %}" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/bookmockup_sm.jpg" %} 608w, {% static "czech_inspirational/images/bookmockup.jpg" %} 683w, {% static "czech_inspirational/images/bookmockup@2x.jpg" %} 1366w" sizes="(max-width: 720px) 608px, (max-width: 1440px) 683px, (min-width: 1441px) 1366px" src="{% static "czech_inspirational/images/bookmockup.jpg" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
<div id="tha_leftwing">
<picture class="block mx-auto max-w-full">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/leftwing.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/leftwing@2x.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/leftwing.jpg" %}" type="image/jpeg">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/leftwing@2x.jpg" %}" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/leftwing.jpg" %} 1x, {% static "czech_inspirational/images/leftwing@2x.jpg" %} 2x" src="{% static "czech_inspirational/images/leftwing.jpg" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
</div>
<div id="tha_rightwing">
<picture class="block mx-auto max-w-full">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/rightwing.webp" %}" type="image/webp">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/rightwing@2x.webp" %}" type="image/webp">
<source media="(max-width: 1440px)" srcset="{% static "czech_inspirational/images/rightwing.jpg" %}" type="image/jpeg">
<source media="(min-width: 1441px)" srcset="{% static "czech_inspirational/images/rightwing@2x.jpg" %}" type="image/jpeg">
<img srcset="{% static "czech_inspirational/images/rightwing.jpg" %} 1x, {% static "czech_inspirational/images/rightwing@2x.jpg" %} 2x" src="{% static "czech_inspirational/images/rightwing.jpg" %}" alt="kniha Česko inspirativní" class="w-full">
</picture>
</div>
</div>
</div>
{% endblock %}
from django.apps import AppConfig
class DistrictConfig(AppConfig):
name = "district"
from django.template.defaultfilters import slugify
from django.utils.safestring import mark_safe
from django.utils.text import slugify
from wagtail import blocks
from wagtail.blocks import (
CharBlock,
DateTimeBlock,
ListBlock,
PageChooserBlock,
StreamBlock,
StructBlock,
TextBlock,
URLBlock,
)
from wagtail.images.blocks import ImageChooserBlock
from shared.blocks import CandidateBlock as SharedCandidateBlockMixin
from shared.blocks import CandidateListBlock as SharedCandidateListBlockMixin
from shared.blocks import (
CandidateSecondaryListBlock as SharedCandidateSecondaryListBlockMixin,
)
from shared.blocks import (
CardLinkBlockMixin,
CardLinkWithHeadlineBlockMixin,
CarouselProgramBlock,
CustomPrimaryCandidateBlock,
CustomSecondaryCandidateBlock,
PeopleGroupBlockMixin,
PersonContactBlockMixin,
PersonCustomPositionBlockMixin,
ProgramGroupBlock,
ProgramGroupBlockMixin,
)
from shared.blocks import ProgramGroupBlockPopout as SharedProgramGroupBlockPopout
from shared.blocks import (
ProgramGroupWithCandidatesBlock as SharedProgramGroupWithCandidatesBlockMixin,
)
from shared.blocks import SecondaryCandidateBlock as SharedSecondaryCandidateBlockMixin
from shared.blocks import TeamBlockMixin
# --- BEGIN New blocks ---
class FullscreenHeaderBlock(StructBlock):
desktop_image = ImageChooserBlock(
label="Obrázek na pozadí (desktop)",
help_text="Pokud není vybráno video, ukáže se na desktopu.",
required=False,
)
mobile_image = ImageChooserBlock(
label="Obrázek na pozadí (mobil)",
help_text="Pokud není vybráno video, ukáže se na mobilu.",
required=False,
)
desktop_video_url = URLBlock(
label="Video (desktop)",
help_text="Pokud je vybráno, ukáže se na desktopech s povoleným autoplayem místo obrázku.",
required=False,
)
mobile_video_url = URLBlock(
label="Video (mobil)",
help_text="Pokud je vybráno, ukáže se na mobilech s povoleným autoplayem místo obrázku.",
required=False,
)
desktop_line_1 = TextBlock(label="Desktop první řádek", required=False)
desktop_line_2 = TextBlock(label="Desktop druhý řádek", required=False)
mobile_line_1 = TextBlock(label="První mobilní řádek", required=False)
mobile_line_2 = TextBlock(label="Druhý mobilní řádek", required=False)
mobile_line_3 = TextBlock(label="Třetí mobilní řádek", required=False)
button_url = URLBlock(
label="Odkaz tlačítka",
help_text="Bez odkazu tlačítko nebude viditelné.",
required=False,
)
button_text = CharBlock(
label="Text tlačítka",
help_text="Odkaz funguje i bez tlačítka. Pokud chceš tlačítko skrýt, nevyplňuj text.",
required=False,
)
class Meta:
template = "styleguide2/includes/molecules/menus/district/carousel.html"
icon = "form"
label = "Header"
class ButtonBlock(blocks.StructBlock):
title = blocks.CharBlock(label="Titulek", max_length=128, required=True)
page = blocks.PageChooserBlock(label="Stránka", required=False)
link = blocks.URLBlock(label="Odkaz", required=False)
class Meta:
label = "Tlačítko"
class ElectionsCountdownBlock(StructBlock):
title = CharBlock(label="Titulek", required=True)
text_before_countdown = CharBlock(
label="Text před odpočtem", default="Aktuálně zbývá", required=True
)
countdown_timestamp = DateTimeBlock(label="Datum & čas voleb", required=True)
buttons = ListBlock(ButtonBlock(), label="Tlačítka", required=False)
class Meta:
label = "Odpočet do voleb"
icon = "time"
template = "styleguide2/includes/organisms/main_section/district/elections.html"
class NewsletterBlock(StructBlock):
class Meta:
label = "Newsletter banner"
icon = "mail"
template = "styleguide2/includes/organisms/main_section/newsletter_section.html"
class PersonCustomPositionBlock(PersonCustomPositionBlockMixin):
page = PageChooserBlock(
page_type=[
"district.DistrictOctopusPersonPage",
"district.DistrictManualOctopusPersonPage",
"district.DistrictPersonPage",
],
label="Detail osoby",
)
class OctopusMixin(blocks.StructBlock):
title = CharBlock(label="Titulek", required=True)
def get_prep_value(self, value):
value = super().get_prep_value(value)
value["slug"] = slugify(value["title"])
return value
def get_context(self, value, *args, **kwargs):
from .models import DistrictOctopusPersonPage
context = super().get_context(value, *args, **kwargs)
context["person_list"] = (
DistrictOctopusPersonPage.objects.filter(
originating_groups__name=value["group_shortcut"]
)
.order_by("person__order", "title")
# Hacky, but should work all of the time with our current members.
.distinct("person__order", "title")
.all()
)
return context
class Meta:
abstract = True
label = "Osoby z Chobotnice"
icon = "group"
template = "styleguide2/includes/organisms/cards/people_card_list.html"
class OctopusGroupBlock(OctopusMixin):
slug = blocks.CharBlock(
label="Slug bloku",
required=False,
help_text="Není třeba vyplňovat, bude automaticky vyplněno",
)
group_shortcut = CharBlock(
label="Zkratka skupiny", help_text="Např. cen_to_ved", required=True
)
class Meta:
label = "Skupina osob z Chobotnice"
class OctopusTeamBlock(OctopusMixin):
slug = blocks.CharBlock(
label="Slug bloku",
required=False,
help_text="Není třeba vyplňovat, bude automaticky vyplněno",
)
team_shortcut = CharBlock(
label="Zkratka týmu", help_text="Např. TO-admin", required=True
)
roles = CharBlock(
label="Role",
help_text=mark_safe(
"Pokud chceš zobrazit pouze osoby se specifickými rolemi "
"v tomto týmu, můžeš role zadat zde ve formátu "
"<em>role1,role2,role3</em>."
),
required=False,
)
def get_context(self, value, *args, **kwargs):
from .models import DistrictOctopusPersonPage
# Skip OctopusMixin
context = blocks.StructBlock.get_context(self, value, *args, **kwargs)
filter = Q(
originating_teams__name=value["team_shortcut"],
)
if value["roles"]:
filter = filter & Q(originating_role=value["roles"].split(","))
context["person_list"] = (
DistrictOctopusPersonPage.objects.filter(filter)
.order_by("person__order", "title")
# Hacky, but should work all of the time with our current members.
.distinct("person__order", "title")
.all()
)
return context
class Meta:
label = "Tým osob z Chobotnice"
class PeopleGroupBlock(PeopleGroupBlockMixin):
person_list = blocks.ListBlock(
blocks.PageChooserBlock(
page_type=[
"district.DistrictPersonPage",
"district.DistrictOctopusPersonPage",
"district.DistrictManualOctopusPersonPage",
],
label="Detail osoby",
),
default=[],
label="Osoby",
help_text="S pozicemi z jejich podstránek",
)
person_list_with_custom_positions = ListBlock(
PersonCustomPositionBlock(),
default=[],
label="Osoby",
help_text="S nastavitelnými pozicemi",
)
class CardLinkBlock(CardLinkBlockMixin):
page = PageChooserBlock(
label="Stránka",
page_type=[
"district.DistrictArticlesPage",
"district.DistrictCenterPage",
"district.DistrictContactPage",
"district.DistrictCrossroadPage",
"district.DistrictCustomPage",
"district.DistrictPeoplePage",
"district.DistrictGeoFeatureCollectionPage",
"district.DistrictCalendarPage",
"district.DistrictPdfPage",
"district.DistrictNewProgramPage",
],
required=False,
)
class Meta:
template = "styleguide2/includes/molecules/boxes/card_box_block.html"
icon = "link"
label = "Karta s odkazem"
class CardLinkWithHeadlineBlock(CardLinkWithHeadlineBlockMixin):
card_items = ListBlock(
CardLinkBlock(
template="styleguide2/includes/molecules/boxes/card_box_block.html"
),
label="Karty s odkazy",
)
class Meta:
template = (
"styleguide2/includes/molecules/boxes/card_box_with_headline_block.html"
)
icon = "link"
label = "Karty odkazů s nadpisem"
class TeamBlock(TeamBlockMixin):
team_list = ListBlock(
CardLinkWithHeadlineBlock(label="Karta týmu"),
label="Týmy",
)
class AddressBlock(StructBlock):
title = CharBlock(label="Titulek", required=True)
map_link = URLBlock(label="Odkaz na detail mapy", required=False)
address = TextBlock(label="Adresa", required=True)
address_info = TextBlock(label="Info k adrese", required=False)
class Meta:
template = "styleguide2/includes/atoms/text/address.html"
icon = "home"
label = "Adresa"
class PersonContactBlock(PersonContactBlockMixin):
person = PageChooserBlock(
label="Osoba",
page_type=[
"district.DistrictPersonPage",
"district.DistrictOctopusPersonPage",
"district.DistrictManualOctopusPersonPage",
],
)
class CenterContactBlock(StructBlock):
title = CharBlock(label="Titulek", required=True)
contact_list = ListBlock(PersonContactBlock())
class Meta:
template = "styleguide2/includes/molecules/contact/center_contacts.html"
icon = "mail"
label = "Kontakt"
# --- END New blocks ---
class SimplePersonBlock(StructBlock):
title = blocks.CharBlock(label="Jméno a příjmení", max_length=128, required=True)
job = blocks.CharBlock(
label="Povolání", max_length=128, required=False, help_text="Např. 'Informatik'"
)
profile_photo = ImageChooserBlock(label="Profilová fotka", required=False)
email = blocks.EmailBlock(label="Email", required=False)
city = blocks.CharBlock(label="Město/obec", max_length=64, required=False)
age = blocks.IntegerBlock(label="Věk", required=False)
is_pirate = blocks.BooleanBlock(
label="Je členem Pirátské strany?", default=True, required=False
)
other_party = blocks.CharBlock(label="Strana", max_length=64, required=False)
other_party_logo = ImageChooserBlock(
label="Logo strany", required=False, help_text="Vyplňte pokud osoba není Pirát"
)
# socials
facebook_url = blocks.URLBlock(label="Odkaz na Facebook", required=False)
instagram_url = blocks.URLBlock(label="Odkaz na Instagram", required=False)
twitter_url = blocks.URLBlock(label="Odkaz na Twitter", required=False)
youtube_url = blocks.URLBlock(label="Odkaz na Youtube kanál", required=False)
flickr_url = blocks.URLBlock(label="Odkaz na Flickr", required=False)
class Meta:
icon = "user"
label = "Osoba blok"
class PersonBadgeBlock(StructBlock):
person = PageChooserBlock(
label="Osoba",
page_type=(
"district.DistrictPersonPage",
"district.DistrictOctopusPersonPage",
"district.DistrictManualOctopusPersonPage",
),
required=True,
)
caption = CharBlock(
label="Popisek",
required=False,
help_text="Vlastní popisek na vizitce. Pokud není uvedeno, použije se výchozí profese osoby.",
)
class Meta:
template = "styleguide2/includes/molecules/contact/person_badge.html"
icon = "user"
label = "Vizitka"
class PersonBadgeListBlock(StructBlock):
people = ListBlock(PersonBadgeBlock(), label="Vizitky")
class Meta:
template = "styleguide2/includes/molecules/contact/person_badge_list.html"
icon = "group"
label = "Seznam vizitek"
class PersonUrlBlock(StructBlock):
title = CharBlock(label="Název", required=True)
url = URLBlock(label="URL", required=True)
custom_icon = CharBlock(
label="Vlastní ikonka ze styleguide",
required=False,
help_text="Pro vlastní ikonku zadejde název ikonky z https://styleguide.pirati.cz/latest/?p=viewall-atoms-icons (bez tečky), např. 'ico--beer'",
)
class ArticlesBlock(StructBlock):
articles = ListBlock(
PageChooserBlock(
"district.DistrictArticlePage", required=True, label="Aktualita"
),
label="Seznam aktualit",
required=True,
)
class Meta:
template = "styleguide2/includes/organisms/articles/article_list_block.html"
icon = "list-ul"
label = "Blok aktualit"
class ArticleLinksBlock(StructBlock):
articles = ListBlock(
PageChooserBlock(
"district.DistrictArticlePage", required=True, label="Aktualita"
),
label="Seznam aktualit",
required=True,
)
class Meta:
template = "styleguide2/includes/organisms/articles/article_links_block.html"
icon = "list-ul"
label = "Seznam nadpisů článků"
class ProgramGroupBlockCrossroad(ProgramGroupBlockMixin):
point_list = ListBlock(CardLinkBlock(), label="Karty programu")
class Meta:
icon = "date"
label = "Rozcestníkový program"
class ProgramGroupBlockPopout(SharedProgramGroupBlockPopout, ProgramGroupBlockMixin):
pass
class CandidateBlock(SharedCandidateBlockMixin):
page = PageChooserBlock(
label="Stránka",
page_type=[
"district.DistrictPersonPage",
"district.DistrictOctopusPersonPage",
"district.DistrictManualOctopusPersonPage",
],
)
class SecondaryCandidateBlock(SharedSecondaryCandidateBlockMixin):
page = PageChooserBlock(
label="Stránka",
page_type=[
"district.DistrictPersonPage",
"district.DistrictOctopusPersonPage",
"district.DistrictManualOctopusPersonPage",
],
)
class CandidateListBlock(SharedCandidateListBlockMixin):
stream_candidates = StreamBlock(
[
("candidate", CandidateBlock()),
("custom_candidate", CustomPrimaryCandidateBlock()),
],
required=False,
label=" ", # Hacky way to show no label
)
class CandidateSecondaryListBlock(SharedCandidateSecondaryListBlockMixin):
new_candidates = StreamBlock(
[
("candidate_page", SecondaryCandidateBlock()),
("candidate_custom", CustomSecondaryCandidateBlock()),
],
required=False,
label=" ", # Hacky way to show no label
)
class ProgramGroupWithCandidatesBlock(SharedProgramGroupWithCandidatesBlockMixin):
primary_candidates = CandidateListBlock(
label="Osoby na čele kandidátky",
help_text="Zobrazí se ve velkých blocích na začátku stránky.",
)
secondary_candidates = CandidateSecondaryListBlock(
label="Ostatní osoby na kandidátce",
help_text="Zobrazí se v kompaktním seznamu pod čelem kandidátky. Níže můžeš změnit nadpis.",
)
program = StreamBlock(
[
("program_group", ProgramGroupBlock()),
("program_group_crossroad", ProgramGroupBlockCrossroad()),
("program_group_popout", ProgramGroupBlockPopout()),
(
"carousel_program",
CarouselProgramBlock(
template="styleguide2/includes/molecules/program/program_block.html"
),
),
],
required=False,
)
import os
import tempfile
from shared.forms import ArticlesPageForm as SharedArticlesPageForm
from shared.forms import JekyllImportForm as SharedJekyllImportForm
from .tasks import import_jekyll_articles
class JekyllImportForm(SharedJekyllImportForm):
def handle_import(self):
lock_file_name = os.path.join(
tempfile.gettempdir(), f".{self.instance.id}.articles-import-lock"
)
if os.path.isfile(lock_file_name):
return
open(lock_file_name, "w").close()
import_jekyll_articles.delay(
article_parent_page_id=self.instance.id,
collection_id=self.cleaned_data["collection"].id,
url=self.cleaned_data["jekyll_repo_url"],
dry_run=self.cleaned_data["dry_run"],
use_git=True,
)
class DistrictArticlesPageForm(SharedArticlesPageForm, JekyllImportForm):
def __init__(self, *args, **kwargs):
from shared.models import SharedTag
from .models import DistrictArticleTag
super().__init__(*args, **kwargs)
self.fields["shared_tags"].queryset = SharedTag.objects.order_by("name")
if self.instance.pk:
valid_tag_ids = list(
DistrictArticleTag.objects.filter(
content_object__in=self.instance.get_children().specific()
)
.values_list("tag_id", flat=True)
.distinct()
.all()
)
valid_shared_tag_ids = (
self.instance.shared_tags.values_list("id", flat=True).distinct().all()
)
self.fields["displayed_tags"].queryset = (
DistrictArticleTag.objects.filter(id__in=valid_tag_ids)
.order_by("tag__name")
.distinct("tag__name")
)
self.fields["displayed_shared_tags"].queryset = (
SharedTag.objects.filter(id__in=valid_shared_tag_ids)
.order_by("name")
.distinct("name")
)
else:
self.fields["displayed_tags"].queryset = DistrictArticleTag.objects.filter(
id=-1
)
self.fields["displayed_shared_tags"].queryset = SharedTag.objects.filter(
id=-1
)
from django.core.management.base import BaseCommand
from ...jekyll_import import JekyllArticleImporter
class Command(BaseCommand):
help = """Importuje články z pirátského jekyll webu."""
def add_arguments(self, parser):
parser.add_argument("path", help="Cesta k jekyll repu")
parser.add_argument(
"--hostname",
default=None,
help="Hostname webu, defaultně vezme první site (/admin/sites/)",
)
parser.add_argument(
"--clanky-id",
required=True,
type=int,
help="Id nadstránky článků (DistrictArticlesPage), pod kterou se články naimportují",
)
parser.add_argument(
"--kolekce-id",
required=True,
type=int,
help="Id kolekce (Collection) pro import obrázků.",
)
parser.add_argument(
"--dry-run",
default=False,
type=bool,
help="Zda je o testovací běh.",
)
parser.add_argument(
"--use-git",
default=True,
type=bool,
help="Zda je o testovací běh.",
)
def handle(self, *args, **options):
return JekyllArticleImporter(
article_parent_page_id=options["clanky_id"],
collection_id=options["kolekce_id"],
url=options["path"],
dry_run=options["dry_run"],
use_git=options["use_git"],
).perform_import()
from django.core.management.base import BaseCommand
from wagtail.models.media import Collection
from district.models import DistrictManualOctopusPersonPage, DistrictPeoplePage
from district.tasks import (
import_manual_person,
import_people_from_group,
import_people_from_team,
)
class Command(BaseCommand):
help = """Importuje Osoby z Chobotnice."""
def handle(self, *args, **options):
for people_page in DistrictPeoplePage.objects.all():
for group in people_page.get_syncable_octopus_groups():
if not hasattr(people_page.root_page, "image_collection_id"):
# FIXME: This should not be UniwebHomePage, but sometimes it is.
continue
collection_id = people_page.root_page.image_collection_id
if collection_id is None:
collection_id = Collection.objects.first().id
import_people_from_group.delay(
people_page.id,
collection_id,
group["shortcut"],
group["title"],
)
for people_page in DistrictPeoplePage.objects.all():
for team in people_page.get_syncable_octopus_teams():
if not hasattr(people_page.root_page, "image_collection_id"):
# FIXME: This should not be UniwebHomePage, but sometimes it is.
continue
collection_id = people_page.root_page.image_collection_id
if collection_id is None:
collection_id = Collection.objects.first().id
import_people_from_team.delay(
people_page.id,
collection_id,
team["shortcut"],
team["title"],
team["roles"],
)
for person_page in DistrictManualOctopusPersonPage.objects.all():
import_manual_person.delay(
person_page.id,
(
person_page.root_page.image_collection_id
if hasattr(person_page.root_page, "image_collection_id")
else 0
),
)