Compare commits

...

5 Commits

Author SHA1 Message Date
yaemiku 2f9bb8d43b
[func] publishing 2022-08-19 23:59:23 +02:00
yaemiku a51f3bef43
[fix] green buttons shenanigans 2022-08-18 03:15:30 +02:00
yaemiku 24e43d8c79
[fix] no bg 2022-08-18 02:44:26 +02:00
yaemiku 28b7a99827
[fix] youth not prose 2022-08-18 02:13:05 +02:00
yaemiku 8d297114c6
[fix] md -> lg 2022-08-18 02:11:00 +02:00
11 changed files with 260 additions and 53 deletions

View File

@ -29,11 +29,11 @@ def load_config(request):
'Wyniki II Ligi': SecondLeague.objects.all(), 'Wyniki II Ligi': SecondLeague.objects.all(),
'Wyniki III Ligi': ThirdLeague.objects.all() 'Wyniki III Ligi': ThirdLeague.objects.all()
}, },
'calendars': Calendar.objects.all(), 'calendars': Calendar.objects.filter(published=True),
'gpb': GrandPrixB.load(), 'gpb': GrandPrixB.load(),
'tournaments': Tournament.objects.filter(published=True), 'tournaments': Tournament.objects.filter(published=True),
'memberships': Membership.objects.filter(published=True), 'memberships': Membership.objects.filter(published=True),
'youth': Youth.objects.all(), 'youth': Youth.objects.filter(published=True),
'mbkb': MBKB.objects.all(), 'mbkb': MBKB.objects.filter(published=True),
'atu': Atu.load() 'atu': Atu.load()
} }

View File

@ -34,13 +34,13 @@
<body class="antialiased flex flex-col gap-4 bg-stone-50"> <body class="antialiased flex flex-col gap-4 bg-stone-50">
<header class="w-full bg-white shadow-md border-b border-slate-400 pb-1"> <header class="w-full bg-white shadow-md border-b border-slate-400 pb-1">
<div <nav
class="m-4 container flex flex-col lg:flex-row items-center lg:items-start justify-around mx-auto" class="m-4 container flex flex-col lg:flex-row items-center lg:items-start justify-center mx-auto"
> >
<div class="self-center"> <div class="self-center">
<img class="max-h-[200px]" src="{% static 'podlzbs.jpg' %}" alt="" /> <img class="max-h-[200px]" src="{% static 'podlzbs.jpg' %}" alt="" />
</div> </div>
<div class="flex flex-col lg:self-end"> <div class="flex flex-col lg:self-end w-full">
<div class="mb-4 mx-auto p-2 text-center"> <div class="mb-4 mx-auto p-2 text-center">
<h1> <h1>
Podlaski Związek <br /> Podlaski Związek <br />
@ -48,45 +48,39 @@
</h1> </h1>
</div> </div>
{% if nav %} {% if nav %}
<nav>
<ul
class="flex flex-wrap justify-center lg:items-end gap-3 text-[15px] leading-5 m-2"
>
{% for button in nav %}
<li>
<a
class="nbutton home {% if button.href == '/' %}{{ home }}{% elif button.href in request.path %}active{% endif %}"
href="{{ button.href }}"
target="{% if button.blank %}_blank{% else %}_self{% endif %}"
>{{ button.title }}</a
>
</li>
{% endfor %}
</ul>
</nav>
{% endif %}
</div>
{% if uppernav %}
<nav>
<ul <ul
class="flex flex-wrap justify-center lg:items-end gap-3 text-[15px] leading-5 m-2" class="flex flex-wrap justify-center lg:items-end gap-3 text-[15px] leading-5 my-2"
> >
{% for button in uppernav %} {% for button in nav %}
<li title="{{ button.title }}"> <li>
<a <a
class="nbutton home {% if button.href == '/' %}{{ home }}{% elif button.href in request.path %}active{% endif %}"
href="{{ button.href }}" href="{{ button.href }}"
target="{% if button.blank %}_blank{% else %}_self{% endif %}" target="{% if button.blank %}_blank{% else %}_self{% endif %}"
><img >{{ button.title }}</a
class="max-h-12" >
src="{{ button.photo.url }}"
alt="{{ button.title }}"
/></a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</nav> {% endif %}
</div>
{% if uppernav %}
<ul class="flex flex-wrap justify-center lg:w-40 gap-3 lg:m-0 mt-2">
{% for button in uppernav %}
<li title="{{ button.title }}">
<a
href="{{ button.href }}"
target="{% if button.blank %}_blank{% else %}_self{% endif %}"
><img
class="max-h-12"
src="{{ button.photo.url }}"
alt="{{ button.title }}"
/></a>
</li>
{% endfor %}
</ul>
{% endif %} {% endif %}
</div> </nav>
</header> </header>
<main <main
class="container xl:max-w-screen-xl mx-auto p-4 prose-img:my-1 prose-p:my-[0.3em]" class="container xl:max-w-screen-xl mx-auto p-4 prose-img:my-1 prose-p:my-[0.3em]"

View File

@ -4,9 +4,7 @@
<!----> <!---->
{% load static tailwind_tags wysiwyg %} {% block content %} {% load static tailwind_tags wysiwyg %} {% block content %}
<div class="flex flex-col items-center gap-4"> <div class="flex flex-col items-center gap-4">
<article <article class="prose w-full max-w-screen-md p-4">
class="prose w-full max-w-screen-md bg-white rounded-md shadow-md p-4"
>
{% if focus.show_title %} {% if focus.show_title %}
<h1 class="font-medium text-center mb-2">{{ focus.title }}</h1> <h1 class="font-medium text-center mb-2">{{ focus.title }}</h1>
{% endif %} {% endif %}

View File

@ -4,9 +4,7 @@
<!----> <!---->
{% load static tailwind_tags wysiwyg %} {% block content %} {% load static tailwind_tags wysiwyg %} {% block content %}
<div class="flex flex-col items-center gap-4"> <div class="flex flex-col items-center gap-4">
<article <article class="w-full max-w-screen-lg p-4">
class="prose w-full max-w-screen-md bg-white rounded-md shadow-md p-4"
>
{% if focus.show_title %} {% if focus.show_title %}
<h1 class="font-medium text-center mb-2">{{ focus.title }}</h1> <h1 class="font-medium text-center mb-2">{{ focus.title }}</h1>
{% endif %} {% endif %}

View File

@ -5,9 +5,7 @@
{% load static tailwind_tags wysiwyg %} {% block content %} {% load static tailwind_tags wysiwyg %} {% block content %}
<div class="flex flex-col items-center gap-4"> <div class="flex flex-col items-center gap-4">
{% for article in youth %} {% for article in youth %}
<article <article class="w-full max-w-screen-lg p-4">
class="prose w-full max-w-screen-md bg-white rounded-md shadow-md p-4"
>
{% if article.show_title %} {% if article.show_title %}
<h1 class="font-medium text-center mb-2">{{ article.title }}</h1> <h1 class="font-medium text-center mb-2">{{ article.title }}</h1>
{% endif %} {% endif %}

View File

@ -0,0 +1,18 @@
# Generated by Django 4.0.5 on 2022-08-19 21:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calendar', '0002_alter_calendar_content'),
]
operations = [
migrations.AddField(
model_name='calendar',
name='published',
field=models.BooleanField(default=True, verbose_name='Kalendarz opublikowany'),
),
]

View File

@ -5,6 +5,7 @@ from tinymce.models import HTMLField
class Calendar(models.Model): class Calendar(models.Model):
published = models.BooleanField('Kalendarz opublikowany', default=True)
year = models.IntegerField('Rok', primary_key=True) year = models.IntegerField('Rok', primary_key=True)
content = HTMLField('Kalendarz', default='', blank=True) content = HTMLField('Kalendarz', default='', blank=True)

View File

@ -0,0 +1,18 @@
# Generated by Django 4.0.5 on 2022-08-19 21:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tournaments', '0006_remove_tournament_link_remove_tournament_link_title_and_more'),
]
operations = [
migrations.AlterField(
model_name='tournament',
name='buttons',
field=models.TextField(blank=True, default='', help_text='Tutaj można wpisać dowolną ilość przycisków w następującym formacie:<br /> <code><br /> tekst1 -> link<br /> teskt2 | link<br /> ...<br /> </code><br /> Symbol <code>-></code> oznacza, że link będzie otwarty w nowej karcie<br /> Symbol <code>|</code> oznacza, że link będzie otwarty w tej samej karcie<br /> Na przykład:<br /> <code><br /> pzbs -> https://pzbs.pl<br /> fotogaleria | https://galeria.podlaskizbs.pl<br /> cezar -> https://www.msc.com.pl/cezar<br /> </code><br /> PZBS i Cezar zostaną otwarte w nowej karcie<br /> <b>UWAGA !!</b><br /> Klikając na zdjęcie zawsze zostaniemy przekierowani na pierwszy podany link<br /> Gdy nie podamy tekstu przyciku, nie pokaże on się, można to wykorzystać w taki sposób:<br /> <code><br /> -> link do wyników<br /> fotogaleria -> link do fotogalerii<br /> </code><br /> Wtedy pokaże się <b>tylko przycisk fotogalerii</b>, a zdjęcie przekieruje nas do wyników!<br /> ', verbose_name='Przyciski'),
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 4.0.5 on 2022-08-19 21:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('youth', '0003_youth_buttons'),
]
operations = [
migrations.AlterField(
model_name='youth',
name='buttons',
field=models.TextField(blank=True, default='', help_text='Tutaj można wpisać dowolną ilość przycisków w następującym formacie:<br /> <code><br /> tekst1 -> link<br /> teskt2 | link<br /> ...<br /> </code><br /> Symbol <code>-></code> oznacza, że link będzie otwarty w nowej karcie<br /> Symbol <code>|</code> oznacza, że link będzie otwarty w tej samej karcie<br /> Na przykład:<br /> <code><br /> pzbs -> https://pzbs.pl<br /> fotogaleria | https://galeria.podlaskizbs.pl<br /> cezar -> https://www.msc.com.pl/cezar<br /> </code><br /> PZBS i Cezar zostaną otwarte w nowej karcie<br /> ', verbose_name='Przyciski'),
),
]

View File

@ -1270,6 +1270,10 @@ select {
margin: 0.5rem; margin: 0.5rem;
} }
.m-0 {
margin: 0px;
}
.mx-auto { .mx-auto {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -1280,6 +1284,11 @@ select {
margin-bottom: 0px; margin-bottom: 0px;
} }
.my-2 {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.mb-2 { .mb-2 {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
@ -1304,10 +1313,6 @@ select {
margin-bottom: auto; margin-bottom: auto;
} }
.mt-0 {
margin-top: 0px;
}
.mt-2 { .mt-2 {
margin-top: 0.5rem; margin-top: 0.5rem;
} }
@ -1348,6 +1353,16 @@ select {
height: 100vh; height: 100vh;
} }
.h-12 {
height: 3rem;
}
.h-max {
height: -webkit-max-content;
height: -moz-max-content;
height: max-content;
}
.max-h-\[200px\] { .max-h-\[200px\] {
max-height: 200px; max-height: 200px;
} }
@ -1360,6 +1375,24 @@ select {
max-height: 18rem; max-height: 18rem;
} }
.min-h-min {
min-height: -webkit-min-content;
min-height: -moz-min-content;
min-height: min-content;
}
.min-h-fit {
min-height: -webkit-fit-content;
min-height: -moz-fit-content;
min-height: fit-content;
}
.min-h-max {
min-height: -webkit-max-content;
min-height: -moz-max-content;
min-height: max-content;
}
.w-full { .w-full {
width: 100%; width: 100%;
} }
@ -1368,6 +1401,10 @@ select {
width: 9rem; width: 9rem;
} }
.w-auto {
width: auto;
}
.max-w-screen-lg { .max-w-screen-lg {
max-width: 1024px; max-width: 1024px;
} }
@ -1384,6 +1421,14 @@ select {
max-width: 768px; max-width: 768px;
} }
.shrink {
flex-shrink: 1;
}
.grow {
flex-grow: 1;
}
.basis-1\/2 { .basis-1\/2 {
flex-basis: 50%; flex-basis: 50%;
} }
@ -1400,6 +1445,10 @@ select {
resize: both; resize: both;
} }
.grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.flex-col { .flex-col {
flex-direction: column; flex-direction: column;
} }
@ -1589,6 +1638,11 @@ select {
line-height: 1; line-height: 1;
} }
.text-sm {
font-size: 0.875rem;
line-height: 1.25rem;
}
.font-medium { .font-medium {
font-weight: 500; font-weight: 500;
} }
@ -1621,6 +1675,14 @@ select {
line-height: 1.5; line-height: 1.5;
} }
.leading-3 {
line-height: .75rem;
}
.leading-4 {
line-height: 1rem;
}
.tracking-normal { .tracking-normal {
letter-spacing: 0em; letter-spacing: 0em;
} }
@ -1799,20 +1861,36 @@ h4 {
margin-bottom: 0.3em; margin-bottom: 0.3em;
} }
.prose-figure\:mt-0 :is(:where(figure):not(:where([class~="not-prose"] *))) {
margin-top: 0px;
}
.prose-img\:my-1 :is(:where(img):not(:where([class~="not-prose"] *))) { .prose-img\:my-1 :is(:where(img):not(:where([class~="not-prose"] *))) {
margin-top: 0.25rem; margin-top: 0.25rem;
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
} }
@media (min-width: 1024px) { @media (min-width: 1024px) {
.lg\:m-0 {
margin: 0px;
}
.lg\:w-screen { .lg\:w-screen {
width: 100vw; width: 100vw;
} }
.lg\:w-10 {
width: 2.5rem;
}
.lg\:w-40 {
width: 10rem;
}
.lg\:max-w-md {
max-width: 28rem;
}
.lg\:max-w-xs {
max-width: 20rem;
}
.lg\:flex-row { .lg\:flex-row {
flex-direction: row; flex-direction: row;
} }

View File

@ -1270,6 +1270,10 @@ select {
margin: 0.5rem; margin: 0.5rem;
} }
.m-0 {
margin: 0px;
}
.mx-auto { .mx-auto {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -1280,6 +1284,11 @@ select {
margin-bottom: 0px; margin-bottom: 0px;
} }
.my-2 {
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.mb-2 { .mb-2 {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
@ -1344,6 +1353,16 @@ select {
height: 100vh; height: 100vh;
} }
.h-12 {
height: 3rem;
}
.h-max {
height: -webkit-max-content;
height: -moz-max-content;
height: max-content;
}
.max-h-\[200px\] { .max-h-\[200px\] {
max-height: 200px; max-height: 200px;
} }
@ -1356,6 +1375,24 @@ select {
max-height: 18rem; max-height: 18rem;
} }
.min-h-min {
min-height: -webkit-min-content;
min-height: -moz-min-content;
min-height: min-content;
}
.min-h-fit {
min-height: -webkit-fit-content;
min-height: -moz-fit-content;
min-height: fit-content;
}
.min-h-max {
min-height: -webkit-max-content;
min-height: -moz-max-content;
min-height: max-content;
}
.w-full { .w-full {
width: 100%; width: 100%;
} }
@ -1364,6 +1401,10 @@ select {
width: 9rem; width: 9rem;
} }
.w-auto {
width: auto;
}
.max-w-screen-lg { .max-w-screen-lg {
max-width: 1024px; max-width: 1024px;
} }
@ -1380,6 +1421,14 @@ select {
max-width: 768px; max-width: 768px;
} }
.shrink {
flex-shrink: 1;
}
.grow {
flex-grow: 1;
}
.basis-1\/2 { .basis-1\/2 {
flex-basis: 50%; flex-basis: 50%;
} }
@ -1396,6 +1445,10 @@ select {
resize: both; resize: both;
} }
.grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.flex-col { .flex-col {
flex-direction: column; flex-direction: column;
} }
@ -1585,6 +1638,11 @@ select {
line-height: 1; line-height: 1;
} }
.text-sm {
font-size: 0.875rem;
line-height: 1.25rem;
}
.font-medium { .font-medium {
font-weight: 500; font-weight: 500;
} }
@ -1617,6 +1675,14 @@ select {
line-height: 1.5; line-height: 1.5;
} }
.leading-3 {
line-height: .75rem;
}
.leading-4 {
line-height: 1rem;
}
.tracking-normal { .tracking-normal {
letter-spacing: 0em; letter-spacing: 0em;
} }
@ -1801,10 +1867,30 @@ h4 {
} }
@media (min-width: 1024px) { @media (min-width: 1024px) {
.lg\:m-0 {
margin: 0px;
}
.lg\:w-screen { .lg\:w-screen {
width: 100vw; width: 100vw;
} }
.lg\:w-10 {
width: 2.5rem;
}
.lg\:w-40 {
width: 10rem;
}
.lg\:max-w-md {
max-width: 28rem;
}
.lg\:max-w-xs {
max-width: 20rem;
}
.lg\:flex-row { .lg\:flex-row {
flex-direction: row; flex-direction: row;
} }