Commit 19a67179 authored by Isabella Skořepová's avatar Isabella Skořepová
Browse files

Split html from content

parent f5c51595
......@@ -2349,6 +2349,31 @@
"integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==",
"dev": true
},
"@types/prop-types": {
"version": "15.7.3",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz",
"integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==",
"dev": true
},
"@types/react": {
"version": "16.9.17",
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.17.tgz",
"integrity": "sha512-UP27In4fp4sWF5JgyV6pwVPAQM83Fj76JOcg02X5BZcpSu5Wx+fP9RMqc2v0ssBoQIFvD5JdKY41gjJJKmw6Bg==",
"dev": true,
"requires": {
"@types/prop-types": "*",
"csstype": "^2.2.0"
}
},
"@types/react-dom": {
"version": "16.9.4",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.9.4.tgz",
"integrity": "sha512-fya9xteU/n90tda0s+FtN5Ym4tbgxpq/hb/Af24dvs6uYnYn+fspaxw5USlw0R8apDNwxsqumdRoCoKitckQqw==",
"dev": true,
"requires": {
"@types/react": "*"
}
},
"a-sync-waterfall": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz",
......@@ -3512,6 +3537,12 @@
"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz",
"integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4="
},
"csstype": {
"version": "2.6.8",
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.8.tgz",
"integrity": "sha512-msVS9qTuMT5zwAGCVm4mxfrZ18BNc6Csd0oJAtiFMZ1FAx1CCvy2+5MDmYoix63LM/6NDbNtodCiGYGmFgO0dA==",
"dev": true
},
"currently-unhandled": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
......@@ -9629,6 +9660,12 @@
"integrity": "sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==",
"dev": true
},
"typescript": {
"version": "3.7.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz",
"integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==",
"dev": true
},
"ua-parser-js": {
"version": "0.7.17",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz",
......
import React from 'react'
import React, { PropsWithChildren } from 'react'
import { SymbolSearch, SymbolMenu, SymbolFacebook } from './svgs'
import { Search } from './search'
import { Html } from './html'
export function Base(props) {
const { config, children, footerlink = null, ...htmlProps } = props
export function BaseBody({
config,
children,
}: PropsWithChildren<{ config: any }>) {
return (
<Html {...htmlProps} config={config}>
{/* % block bodyattr %}{% endblock % */}
<div id="all">
{/* Top nav */}
<nav
className="supernav"
role="navigation"
style={{ zIndex: 5, position: 'absolute' }}
>
<div className="nav-wrapper container">
<a
data-activates="nav-mobile"
className="menu-icon hide-on-med-and-up"
style={{ float: 'left' }}
>
<SymbolMenu color="#fff" size={false} />
<div id="all">
{/* Top nav */}
<nav
className="supernav"
role="navigation"
style={{ zIndex: 5, position: 'absolute' }}
>
<div className="nav-wrapper container">
<a
data-activates="nav-mobile"
className="menu-icon hide-on-med-and-up"
style={{ float: 'left' }}
>
<SymbolMenu color="#fff" size={false} />
</a>
<div style={{ zIndex: 2 }} className="brand-logo">
<a id="logo-container" href={`${config.baseurl}/tag/vse/1/`}>
<img
className="hide-on-small-and-up"
src={`${config.baseurl}/theme/icon56.png`}
/>
<img
className="hide-on-med-and-up hide-on-ultra-small"
src={`${config.baseurl}/theme/logo56.png`}
/>
<img
className="hide-on-small-only"
src={`${config.baseurl}/theme/logo64.png`}
/>
</a>
<div style={{ zIndex: 2 }} className="brand-logo">
<a id="logo-container" href={`${config.baseurl}/tag/vse/1/`}>
<img
className="hide-on-small-and-up"
src={`${config.baseurl}/theme/icon56.png`}
/>
<img
className="hide-on-med-and-up hide-on-ultra-small"
src={`${config.baseurl}/theme/logo56.png`}
/>
<img
className="hide-on-small-only"
src={`${config.baseurl}/theme/logo64.png`}
/>
</a>
</div>
<div className="toplinks">
<a className="hide-on-small-only left" id="aktuality">
Aktuality
</a>
<a className="hide-on-small-only left" id="clanky">
Články
</a>
<a className="hide-on-small-only left" id="o-nas">
O nás
</a>
<a className="search-icon left">
<SymbolSearch color="#fff" size={false} />
</a>
</div>
</div>
</nav>
<script
dangerouslySetInnerHTML={{
__html: `
<div className="toplinks">
<a className="hide-on-small-only left" id="aktuality">
Aktuality
</a>
<a className="hide-on-small-only left" id="clanky">
Články
</a>
<a className="hide-on-small-only left" id="o-nas">
O nás
</a>
<a className="search-icon left">
<SymbolSearch color="#fff" size={false} />
</a>
</div>
</div>
</nav>
<script
dangerouslySetInnerHTML={{
__html: `
$(document).ready(function() {
$(".menu-icon").sideNav();
$("#o-nas").click(function() {
......@@ -93,126 +94,16 @@ export function Base(props) {
});
});
`,
}}
/>
{/* Side nav */}
<ul id="nav-mobile" className="side-nav collapsible">
<li className="no-padding">
<a className="collapsible-header waves-effect waves-teal">
Aktuality
</a>
<div className="collapsible-body">
<ul>
<li>
<a href={`${config.baseurl}/tag/aktuality`}>
Všechny aktuality
</a>
</li>
<li>
<a href={`${config.baseurl}/tag/pozvanky`}>Pozvánky</a>
</li>
<li>
<a href={`${config.baseurl}/tag/stalo-se`}>Stalo se</a>
</li>
<li>
<a href={`${config.baseurl}/tag/zavody`}>Závody</a>
</li>
</ul>
</div>
</li>
<li className="no-padding">
<a className="collapsible-header waves-effect waves-teal">Články</a>
<div className="collapsible-body">
<ul>
<li>
<a href={`${config.baseurl}/tag/clanky`}>Všechny články</a>
</li>
<li>
<a href={`${config.baseurl}/tag/programovani`}>
Programování
</a>
</li>
<li>
<a href={`${config.baseurl}/tag/mikroprocesory`}>
Mikroprocesory
</a>
</li>
<li>
<a href={`${config.baseurl}/tag/konstrukce`}>Konstrukce</a>
</li>
<li>
<a href={`${config.baseurl}/tag/technicke-clanky`}>
Technické články
</a>
</li>
<li>
<a href={`${config.baseurl}/tag/zajimavosti`}>Zajímavosti</a>
</li>
</ul>
</div>
</li>
<li className="no-padding">
<a className="collapsible-header waves-effect waves-teal">O nás</a>
<div className="collapsible-body">
<ul>
<li>
<a href={`${config.baseurl}/clanek/o-radioklubu`}>
O Radioklubu
</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/kontakt`}>Kontakt</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/krouzek-mladeze`}>
Kroužek mládeže
</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/pro-cleny-rk`}>
Pro členy RK
</a>
</li>
</ul>
</div>
</li>
</ul>
{/* Lower nav */}
<nav
className="subnav subnav1 hide-on-small-and-down"
role="navigation"
>
<div className="nav-wrapper container">
<ul className="right">
<li>
<a href={`${config.baseurl}/clanek/o-radioklubu`}>
O Radioklubu
</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/kontakt`}>Kontakt</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/krouzek-mladeze`}>
Kroužek mládeže
</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/pro-cleny-rk`}>
Pro členy RK
</a>
</li>
</ul>
</div>
</nav>
{/* Lower nav 2 - Aktuality */}
<nav
className="subnav subnav2 hide-on-small-and-down"
role="navigation"
>
<div className="nav-wrapper container">
<ul className="right">
}}
/>
{/* Side nav */}
<ul id="nav-mobile" className="side-nav collapsible">
<li className="no-padding">
<a className="collapsible-header waves-effect waves-teal">
Aktuality
</a>
<div className="collapsible-body">
<ul>
<li>
<a href={`${config.baseurl}/tag/aktuality`}>
Všechny aktuality
......@@ -229,14 +120,11 @@ export function Base(props) {
</li>
</ul>
</div>
</nav>
{/* Lower nav 3 - Články */}
<nav
className="subnav subnav3 hide-on-small-and-down"
role="navigation"
>
<div className="nav-wrapper container">
<ul className="right">
</li>
<li className="no-padding">
<a className="collapsible-header waves-effect waves-teal">Články</a>
<div className="collapsible-body">
<ul>
<li>
<a href={`${config.baseurl}/tag/clanky`}>Všechny články</a>
</li>
......@@ -261,73 +149,168 @@ export function Base(props) {
</li>
</ul>
</div>
</nav>
<Search />
{children}
</li>
<li className="no-padding">
<a className="collapsible-header waves-effect waves-teal">O nás</a>
<div className="collapsible-body">
<ul>
<li>
<a href={`${config.baseurl}/clanek/o-radioklubu`}>
O Radioklubu
</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/kontakt`}>Kontakt</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/krouzek-mladeze`}>
Kroužek mládeže
</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/pro-cleny-rk`}>
Pro členy RK
</a>
</li>
</ul>
</div>
</li>
</ul>
<footer className="page-footer blue">
<div className="container s6">
<a
className="orange-text text-lighten-3"
target="_blank"
href="https://git.ok1kvk.cz/"
>
Gitlab
</a>{' '}
|{' '}
<a
className="orange-text text-lighten-3"
target="_blank"
href="http://forum.ok1kvk.cz/"
>
Fórum
</a>{' '}
|{' '}
<a className="orange-text text-lighten-3" href="/clanek/webkamera/">
Webkamera
</a>{' '}
|{' '}
<a
className="orange-text text-lighten-3"
href="/clanek/jak-nahlasit-chybu/"
>
Jak nahlásit chybu
</a>{' '}
{footerlink}{' '}
<div style={{ display: 'inline-block', height: '1em' }}>
<a
style={{
display: 'block',
float: 'left',
marginTop: '-.5em',
}}
target="_blank"
href="https://www.facebook.com/ok1kvk"
>
<SymbolFacebook color="white" size="2em" />
{/* Lower nav */}
<nav className="subnav subnav1 hide-on-small-and-down" role="navigation">
<div className="nav-wrapper container">
<ul className="right">
<li>
<a href={`${config.baseurl}/clanek/o-radioklubu`}>O Radioklubu</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/kontakt`}>Kontakt</a>
</li>
<li>
<a href={`${config.baseurl}/clanek/krouzek-mladeze`}>
Kroužek mládeže
</a>
</div>
</div>
<div className="container s6">
Stránky pro OK1KVK vytvořila{' '}
</li>
<li>
<a href={`${config.baseurl}/clanek/pro-cleny-rk`}>Pro členy RK</a>
</li>
</ul>
</div>
</nav>
{/* Lower nav 2 - Aktuality */}
<nav className="subnav subnav2 hide-on-small-and-down" role="navigation">
<div className="nav-wrapper container">
<ul className="right">
<li>
<a href={`${config.baseurl}/tag/aktuality`}>Všechny aktuality</a>
</li>
<li>
<a href={`${config.baseurl}/tag/pozvanky`}>Pozvánky</a>
</li>
<li>
<a href={`${config.baseurl}/tag/stalo-se`}>Stalo se</a>
</li>
<li>
<a href={`${config.baseurl}/tag/zavody`}>Závody</a>
</li>
</ul>
</div>
</nav>
{/* Lower nav 3 - Články */}
<nav className="subnav subnav3 hide-on-small-and-down" role="navigation">
<div className="nav-wrapper container">
<ul className="right">
<li>
<a href={`${config.baseurl}/tag/clanky`}>Všechny články</a>
</li>
<li>
<a href={`${config.baseurl}/tag/programovani`}>Programování</a>
</li>
<li>
<a href={`${config.baseurl}/tag/mikroprocesory`}>
Mikroprocesory
</a>
</li>
<li>
<a href={`${config.baseurl}/tag/konstrukce`}>Konstrukce</a>
</li>
<li>
<a href={`${config.baseurl}/tag/technicke-clanky`}>
Technické články
</a>
</li>
<li>
<a href={`${config.baseurl}/tag/zajimavosti`}>Zajímavosti</a>
</li>
</ul>
</div>
</nav>
<Search />
{children}
<footer className="page-footer blue">
<div className="container s6">
<a
className="orange-text text-lighten-3"
target="_blank"
href="https://git.ok1kvk.cz/"
>
Gitlab
</a>{' '}
|{' '}
<a
className="orange-text text-lighten-3"
target="_blank"
href="http://forum.ok1kvk.cz/"
>
Fórum
</a>{' '}
|{' '}
<a className="orange-text text-lighten-3" href="/clanek/webkamera/">
Webkamera
</a>{' '}
|{' '}
<a
className="orange-text text-lighten-3"
href="/clanek/jak-nahlasit-chybu/"
>
Jak nahlásit chybu
</a>{' '}
<div style={{ display: 'inline-block', height: '1em' }}>
<a
className="orange-text text-lighten-3"
style={{
display: 'block',
float: 'left',
marginTop: '-.5em',
}}
target="_blank"
href="https://codewitchbella.com"
href="https://www.facebook.com/ok1kvk"
>
Isabella Skořepová
</a>{' '}
2015-2020
<SymbolFacebook color="white" size="2em" />
</a>
</div>
</footer>
</div>
<div className="container s6">
Stránky pro OK1KVK vytvořila{' '}
<a
className="orange-text text-lighten-3"
target="_blank"
href="https://codewitchbella.com"
>
Isabella Skořepová
</a>{' '}
2015-2020
</div>
</footer>
<script src={`${config.baseurl}/theme/js/materialize.js`}></script>
<script src={`${config.baseurl}/theme/js/init.js`}></script>
<script src={`${config.baseurl}/theme/js/materialize.js`}></script>
<script src={`${config.baseurl}/theme/js/init.js`}></script>
<script
dangerouslySetInnerHTML={{
__html: `
<script
dangerouslySetInnerHTML={{
__html: `
(function($) {
var onresize = function(){
$("footer").height("auto");
......@@ -337,12 +320,12 @@ export function Base(props) {
$(document).load(onresize);
$(document).ready(onresize);
})(jQuery);`,
}}
/>
{config.debug ? null : (
<script
dangerouslySetInnerHTML={{
__html: `
}}
/>
{config.debug ? null : (
<script
dangerouslySetInnerHTML={{
__html: `
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
......@@ -351,13 +334,12 @@ export function Base(props) {
ga('create', 'UA-74646565-1', 'auto');
ga('send', 'pageview');
`,
}}
/>
)}
<script
src={`${config.baseurl}/theme/lightbox2/dist/js/lightbox.min.js`}