1
0

news fixed

This commit is contained in:
Filip Rojek 2023-11-21 21:04:25 +01:00
parent 1f5c3543fc
commit 7adef46d74
11 changed files with 97 additions and 25 deletions

View File

@ -4,6 +4,7 @@ date = 2022-02-27
[extra] [extra]
author = "Jaroslav Valkoun" author = "Jaroslav Valkoun"
pinned = true
+++ +++
Děkujeme všem za nezapomenutelný večer! Na fotky z fotokoutku od <a href="https://www.facebook.com/profile.php?id=100009098313789" target="_blank" style="color: var(--clrRed); text-decoration: underline">Petry Horákové</a> a z parketu od <a href="https://www.instagram.com/ota.pro/" target="_blank" style="color: var(--clrRed); text-decoration: underline">Oty Procházky</a> se můžete podívat přes odkazy níže. Budeme se těšit příští rok! Děkujeme všem za nezapomenutelný večer! Na fotky z fotokoutku od <a href="https://www.facebook.com/profile.php?id=100009098313789" target="_blank" style="color: var(--clrRed); text-decoration: underline">Petry Horákové</a> a z parketu od <a href="https://www.instagram.com/ota.pro/" target="_blank" style="color: var(--clrRed); text-decoration: underline">Oty Procházky</a> se můžete podívat přes odkazy níže. Budeme se těšit příští rok!

View File

@ -1,10 +0,0 @@
+++
title = "My first post"
date = 2019-11-27
[extra]
author = "Filip Rojek"
+++
- This is my first blog post.
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi magnam architecto in iusto labore tempora saepe dignissimos aliquid quidem fugiat qui praesentium, distinctio veritatis quis suscipit eos temporibus. Aliquid, nemo.

View File

@ -0,0 +1,9 @@
+++
title = "Program plesu"
date = 2024-01-07
[extra]
author = "Jaroslav Valkoun"
+++
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,18 @@
+++
title = "Vesele Vanoce!"
date = 2023-12-24
[extra]
author = "Filip Rojek"
pinned = true
+++
<iframe
class="video"
height="315"
src="https://www.youtube.com/embed/YXbvzCNCBt0"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>

View File

@ -2,6 +2,7 @@ main {
display: flex; display: flex;
gap: 2rem; gap: 2rem;
margin-top: 2rem; margin-top: 2rem;
margin-bottom: 2rem;
section#news { section#news {
width: 60vw; width: 60vw;
@ -65,9 +66,12 @@ main {
footer { footer {
display: flex; display: flex;
justify-content: center; justify-content: center;
a { flex-direction: column;
color: blue; align-items: center;
text-decoration: none; margin: .5rem;
font-size: 0.7rem;
a, p {
color: var(--clr-murrey);
} }
} }
} }

30
sass/news.scss Normal file
View File

@ -0,0 +1,30 @@
.news-wrapper {
display: flex;
flex-direction: column;
gap: 1rem;
color: var(--clr-murrey);
.news-card {
position: relative;
background-color: var(--clr-cards);
border-radius: 1rem;
padding: 1rem;
.pin-img {
width: 1rem;
position: absolute;
right: 1rem;
display: none;
}
}
.pinned {
order: -1;
}
.pinned .pin-img {
display: block;
}
iframe.video {
border-radius: 15px;
aspect-ratio: 16/9;
width: min(560px, 100%);
}
}

5
static/svg/pin.svg Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.5" fill-rule="evenodd" clip-rule="evenodd" d="M16.2188 4.83755L19.1835 7.80516C21.1954 9.81905 22.2014 10.826 21.9667 11.9115C21.7319 12.9969 20.4 13.4973 17.7362 14.4981L15.8922 15.191C15.1788 15.459 14.8221 15.593 14.5468 15.8314C14.4262 15.9358 14.3184 16.054 14.2254 16.1835C14.013 16.4795 13.9119 16.8472 13.7095 17.5825C13.2493 19.2551 13.0192 20.0914 12.4713 20.4041C12.2404 20.5358 11.9792 20.6049 11.7134 20.6045C11.0827 20.6036 10.4699 19.9902 9.24441 18.7635L7.77841 17.2961L6.69935 16.2163L5.28476 14.8C4.06698 13.581 3.45809 12.9715 3.45413 12.3446C3.45242 12.0735 3.5228 11.8069 3.65804 11.5721C3.97088 11.0289 4.80107 10.8 6.46145 10.3423C7.19811 10.1392 7.56644 10.0377 7.86251 9.82451C7.99536 9.72887 8.11619 9.61754 8.22239 9.49292C8.45908 9.2152 8.59063 8.85617 8.85373 8.1381L9.5217 6.31506C10.5086 3.62155 11.0021 2.2748 12.0904 2.03468C13.1788 1.79457 14.1921 2.8089 16.2188 4.83755Z" fill="#1C274C"/>
<path d="M3.30236 21.7764L7.77841 17.2961L6.69935 16.2163L2.22345 20.6965C1.92552 20.9947 1.92552 21.4782 2.22345 21.7764C2.52138 22.0747 3.00443 22.0747 3.30236 21.7764Z" fill="#1C274C"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -8,6 +8,7 @@
<link rel="stylesheet" href="/global.css"> <link rel="stylesheet" href="/global.css">
<link rel="stylesheet" href="/header.css"> <link rel="stylesheet" href="/header.css">
<link rel="stylesheet" href="/main.css"> <link rel="stylesheet" href="/main.css">
<link rel="stylesheet" href="/news.css">
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Kanit:wght@400;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Kanit:wght@400;700&display=swap" rel="stylesheet">
@ -19,9 +20,9 @@
<a href="/"><img src="/img/pkmples_logo.png" alt="pkmples logo"></a> <a href="/"><img src="/img/pkmples_logo.png" alt="pkmples logo"></a>
</div> </div>
<div class="nav-right"> <div class="nav-right">
<a href="#"><img src="/svg/facebook.svg" alt="facebook logo"></img></a> <a href="https://www.facebook.com/events/823114292589147" target="_blank"><img src="/svg/facebook.svg" alt="facebook logo"></img></a>
<a href="#"><img src="/svg/instagram.svg" alt="instagram logo"></img></a> <a href="https://www.instagram.com/pkm.hub" target="_blank"><img src="/svg/instagram.svg" alt="instagram logo"></img></a>
<a href="#"><img src="/svg/youtube.svg" alt="youtube logo"></img></a> <a href="https://www.youtube.com/@pkmhub" target="_blank"><img src="/svg/youtube.svg" alt="youtube logo"></img></a>
<a href="/galerie">galerie</a> <a href="/galerie">galerie</a>
<a href="/archiv">archiv</a> <a href="/archiv">archiv</a>
</div> </div>

View File

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block main %} {% block main %}
<section id="news"> <section id="news" class="news-wrapper">
{% block news %} {% endblock news %} {% block news %} {% endblock news %}
</section> </section>
<section class="aside-wrapper"> <section class="aside-wrapper">
@ -68,7 +68,8 @@
</section> </section>
</aside> </aside>
<footer> <footer>
<a href="https://www.fofrweb.com/" target="_blank">Vytvořeno týmem Fofrweb</a> <p>Nadační fond maléDivy • Kulturní centrum Turnov • Big Band ZUŠ Turnov</p>
<p>&copy; <a href="https://fofrweb.com/">Fofrweb</a> + PKM</p>
</footer> </footer>
</section> </section>
{% endblock main %} {% endblock main %}

View File

@ -1,14 +1,18 @@
{% extends "index.html" %} {% extends "index.html" %}
{% block news %} {% block news %}
<h1>Novinky</h1>
<h2>Co se děje kolem našeho plesu?</h2>
{% for page in section.pages %} {% for page in section.pages %}
<article> {% set article_class = "news-card" %}
<p>{{ page.date }}</p> {% if page.extra.pinned %}
<p>Autor: {{ page.extra["author"] }}</p> {% set article_class = article_class ~ " pinned" %}
{% endif %}
<article class="news-card {{ article_class }}">
<img src="/svg/pin.svg" alt="pin icon" class="pin-img">
<h3>{{ page.title }}</h3> <h3>{{ page.title }}</h3>
<p>{{ page.date | date(format="%d. %m. %Y")}}</p>
<p>Autor: {{ page.extra["author"] }}</p>
{{ page.content | safe }} {{ page.content | safe }}
</article> </article>
<hr>
{% endfor %} {% endfor %}
{% endblock news %} {% endblock news %}