pedf
/
fakulta-online
Archived
1
0
Fork 0

Změna struktury obrázku na pozadí indexu

master
Emil Miler 5 years ago
parent 5691b7dcf3
commit 71f92a89a7

@ -7,10 +7,12 @@ $main-width: 720px;
body { body {
min-height: 100vh; min-height: 100vh;
margin: 0; margin: 0;
background: url(/body-bg.svg) top center no-repeat #d22d40;
background-size:100% auto;
color: #fff; color: #fff;
font-size: 1.3em; font-size: 1.3em;
background: url(/body-bg.svg) #d22d40;
background-position: top center;
background-size: 100% auto;
background-repeat: no-repeat;
a { text-decoration: none; } a { text-decoration: none; }
} }
@ -47,13 +49,16 @@ main {
h2 { font-size: 3em; } h2 { font-size: 3em; }
} }
main#index { body.index {
background-image: url(/index-bg.png), url(/body-bg.svg);
background-position: center center, top center;
background-size: 30em auto, 100% auto;
main {
max-width: $header-width; max-width: $header-width;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background: url(/index-bg.png) center center no-repeat;
background-size: contain;
padding: 2em 1em; padding: 2em 1em;
section, aside { max-width: 35%; } section, aside { max-width: 35%; }
@ -78,3 +83,4 @@ main#index {
} }
} }
} }
}

@ -7,15 +7,15 @@
<link rel="stylesheet" href="/style.css" type="text/css"> <link rel="stylesheet" href="/style.css" type="text/css">
<link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="icon" href="/favicon.ico" type="image/x-icon">
</head> </head>
<body> <body{% if section.permalink == config.base_url %} class="index"{% endif %}>
<nav id="nav">navigace</nav> <nav id="nav">navigace</nav>
<header> <header>
<img src="/logo.png" alt="Logo"> <img src="/logo.png" alt="Logo">
<a href="{{ config.base_url }}"><h1>{{ config.title }}</h1></a> <a href="{{ config.base_url }}"><h1>{{ config.title }}</h1></a>
<span id="menu" onclick="togglevisible('#nav')">Menu</span> <span id="menu" onclick="togglevisible('#nav')">Menu</span>
</header> </header>
<main>
{% block content %} {% block content %}
<main id="index">
<section> <section>
<h2>{{ config.title }}</h2> <h2>{{ config.title }}</h2>
{{ section.content | safe }} {{ section.content | safe }}
@ -27,8 +27,8 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</aside> </aside>
</main>
{% endblock %} {% endblock %}
</main>
</body> </body>
<script> <script>
function togglevisible(id){document.querySelector(id).classList.toggle("visible")} function togglevisible(id){document.querySelector(id).classList.toggle("visible")}