diff --git a/.worktime b/.worktime deleted file mode 100644 index fc5688f..0000000 --- a/.worktime +++ /dev/null @@ -1,12 +0,0 @@ -08.06.2022 - 1h 37 mins -09.06.2022 - 1h -12.06.2022 - 1h 15 mins -15.06.2022 - 1h 30 mins -23.06.2022 - 1h 30 mins -07.07.2022 - 2h 30 mins -15.07.2022 - 3h -24.07.2022 - 3h 30 mins -25.07.2022 - 3h 30 mins -26.07.2022 - 1h 30 mins -27.07.2022 - 4h -01.08.2022 - 30 mins \ No newline at end of file diff --git a/core/context_processors.py b/core/context_processors.py index 55ce0ea..6c1a081 100644 --- a/core/context_processors.py +++ b/core/context_processors.py @@ -25,8 +25,8 @@ def load_config(request): 'regulaminy': Regulation.objects.all(), 'rodos': RODO.objects.all(), 'leagues': { - 'Wyniki I Ligi': FirstLeague.objects.all().reverse(), - 'Wyniki II Ligi': SecondLeague.objects.all().reverse(), + 'Wyniki I Ligi': FirstLeague.objects.all(), + 'Wyniki II Ligi': SecondLeague.objects.all(), 'Wyniki III Ligi': ThirdLeague.objects.all() }, 'calendars': Calendar.objects.all(), diff --git a/core/static/atu.jpg b/core/static/atu.jpg deleted file mode 100644 index b24a402..0000000 Binary files a/core/static/atu.jpg and /dev/null differ diff --git a/core/static/cezar.gif b/core/static/cezar.gif deleted file mode 100644 index af45dad..0000000 Binary files a/core/static/cezar.gif and /dev/null differ diff --git a/core/static/favicon.ico b/core/static/favicon.ico new file mode 100644 index 0000000..c2b3a64 Binary files /dev/null and b/core/static/favicon.ico differ diff --git a/core/static/icon-192x192.png b/core/static/icon-192x192.png new file mode 100644 index 0000000..fc4cf89 Binary files /dev/null and b/core/static/icon-192x192.png differ diff --git a/core/static/icon-512x512.png b/core/static/icon-512x512.png new file mode 100644 index 0000000..7d01f18 Binary files /dev/null and b/core/static/icon-512x512.png differ diff --git a/core/static/kareta.jpg b/core/static/kareta.jpg deleted file mode 100644 index 3839049..0000000 Binary files a/core/static/kareta.jpg and /dev/null differ diff --git a/core/static/labs.jpg b/core/static/labs.jpg deleted file mode 100644 index a20896e..0000000 Binary files a/core/static/labs.jpg and /dev/null differ diff --git a/core/static/labs.webp b/core/static/labs.webp deleted file mode 100644 index b243cf6..0000000 Binary files a/core/static/labs.webp and /dev/null differ diff --git a/core/static/logo.jpg b/core/static/logo.jpg new file mode 100644 index 0000000..d3ee954 Binary files /dev/null and b/core/static/logo.jpg differ diff --git a/core/static/logo.webp b/core/static/logo.webp deleted file mode 100644 index 6e532c3..0000000 Binary files a/core/static/logo.webp and /dev/null differ diff --git a/core/static/mbkb.webp b/core/static/mbkb.webp deleted file mode 100644 index 4664914..0000000 Binary files a/core/static/mbkb.webp and /dev/null differ diff --git a/core/static/pzbs.webp b/core/static/pzbs.webp deleted file mode 100644 index 5cd100b..0000000 Binary files a/core/static/pzbs.webp and /dev/null differ diff --git a/core/templates/atu.html b/core/templates/atu.html index 831bb31..4d83b43 100644 --- a/core/templates/atu.html +++ b/core/templates/atu.html @@ -2,10 +2,8 @@ {% block title %}ATU | pdlzbs{% endblock %} -{% load static tailwind_tags tablepipe %} {% block content %} +{% load static tailwind_tags wysiwyg %} {% block content %}
-
- {{ atu.content | tablescroll | safe }} -
+
{% content atu %}
{% endblock %} diff --git a/core/templates/base.html b/core/templates/base.html index b709490..8793f35 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -10,6 +10,20 @@ + + + + {% block title %}Podlaski Związek Brydża Sportowego{% endblock %} @@ -75,7 +89,7 @@
{% block content %}{% endblock %}
diff --git a/core/templates/calendar.html b/core/templates/calendar.html index 198f9bc..f886619 100644 --- a/core/templates/calendar.html +++ b/core/templates/calendar.html @@ -1,11 +1,9 @@ {% extends 'base.html' %} {% block title %}Kalendarz | pdlzbs{% endblock %} -{% load static tailwind_tags tablepipe %} {% block content %} +{% load static tailwind_tags wysiwyg %} {% block content %}
{% for calendar in calendars %} -
- {{ calendar.content | tablescroll | safe }} -
+
{% content calendar %}
{% if not forloop.last %}
{% endif %} {% empty %} diff --git a/core/templates/grandprix.html b/core/templates/grandprix.html index ab58452..c52e070 100644 --- a/core/templates/grandprix.html +++ b/core/templates/grandprix.html @@ -2,6 +2,6 @@ {% block title %}Grand Prix Białegostoku | pdlzbs{% endblock %} -{% load static tailwind_tags tablepipe %} {% block content %} -
{{ gpb.content | tablescroll | safe }}
+{% load static tailwind_tags wysiwyg %} {% block content %} +
{% content gpb %}
{% endblock %} diff --git a/core/templates/home-reverse.html b/core/templates/home-reverse.html new file mode 100644 index 0000000..9257044 --- /dev/null +++ b/core/templates/home-reverse.html @@ -0,0 +1,14 @@ +{% extends 'base.html' %} + +{% block title %}{{ focus.title | default:"-" }} | pdlzbs{% endblock %} + +{% load static tailwind_tags wysiwyg %} {% block content %} +
+
+ {% if focus.show_title %} +

{{ focus.title }}

+ {% endif %} +
{% content focus %}
+
+
+{% endblock %} diff --git a/core/templates/home.html b/core/templates/home.html index 975bb9e..f2c4f23 100644 --- a/core/templates/home.html +++ b/core/templates/home.html @@ -1,10 +1,10 @@ {% extends 'base.html' %} {% block title %}Strona główna | pdlzbs{% endblock %} -{% load static tailwind_tags tablepipe %} {% block content %} +{% load static tailwind_tags wysiwyg %} {% block content %}
- {{ gpw.content | tablescroll | safe }} + {% content gpw %}

{{ post.title }}

{% endif %} -
{{ post.content | tablescroll | safe }}
+
{% readmore post %}
{% if not forloop.last %}
diff --git a/core/templates/mbkb.html b/core/templates/mbkb.html index 155dfa0..cfa4e5e 100644 --- a/core/templates/mbkb.html +++ b/core/templates/mbkb.html @@ -2,7 +2,7 @@ {% block title %}Miejski Białostocki Klub Brydżowy | pdlzbs{% endblock %} -{% load static tailwind_tags tablepipe %} {% block content %} +{% load static tailwind_tags wysiwyg %} {% block content %}

Miejski Białostocki Klub Brydżowy

@@ -10,7 +10,7 @@
{% if article.show_title %}

{{ article.title }}

- {% endif %} {{ article.content | tablescroll | safe }} + {% endif %} {% content article %}
{% if not forloop.last %}
diff --git a/core/templates/membership.html b/core/templates/membership.html index 59b8524..821bda8 100644 --- a/core/templates/membership.html +++ b/core/templates/membership.html @@ -2,10 +2,10 @@ {% block title %}Składki Członkowskie | pdlzbs{% endblock %} -{% load static tailwind_tags tablepipe %} {% block content %} +{% load static tailwind_tags wysiwyg %} {% block content %}
{% for membership in memberships %} -
{{ membership.content | safe }}
+
{% content membership %}
{% if not forloop.last %}
{% endif %} {% empty %} diff --git a/core/templates/tournaments-reverse.html b/core/templates/tournaments-reverse.html new file mode 100644 index 0000000..9f81176 --- /dev/null +++ b/core/templates/tournaments-reverse.html @@ -0,0 +1,27 @@ +{% extends 'base.html' %} + +{% block title %}{{ focus.title | default:"-" }} | pdlzbs{% endblock %} + +{% load static tailwind_tags wysiwyg %} {% block content %} +
+
+ {% if focus.show_title %} +

{{ focus.title }}

+ {% endif %} +
+ {% buttons focus.buttons %} +
+
+ +
{% content focus %}
+
+
+
+{% endblock %} diff --git a/core/templates/tournaments.html b/core/templates/tournaments.html index 356354e..6645ed8 100644 --- a/core/templates/tournaments.html +++ b/core/templates/tournaments.html @@ -1,33 +1,31 @@ {% extends 'base.html' %} -{% block title %}Składki Członkowskie | pdlzbs{% endblock %} +{% block title %}Inne turnieje | pdlzbs{% endblock %} -{% load static tailwind_tags tablepipe %} {% block content %} -

Inne turnieje

-{% if tournaments %} +{% load static tailwind_tags wysiwyg %} {% block content %} {% if tournaments %}
{% for tournament in tournaments %}
{% if tournament.show_title %} -

{{ tournament.title }}

+

{{ tournament.title }}

{% endif %} -
- -
{{ tournament.content | safe }}
-
-

+

+ {% buttons tournament.buttons %} +
+
- {{ tournament.link_title | default:"Wyniki" }} - -

+ class="mx-auto" + > +
{% content tournament %}
+
{% if not forloop.last %}
diff --git a/core/templates/youth-reverse.html b/core/templates/youth-reverse.html new file mode 100644 index 0000000..d35d7fd --- /dev/null +++ b/core/templates/youth-reverse.html @@ -0,0 +1,19 @@ +{% extends 'base.html' %} + +{% block title %}{{ focus.title | default:"-" }} | pdlzbs{% endblock %} + +{% load static tailwind_tags wysiwyg %} {% block content %} +
+
+ {% if focus.show_title %} +

{{ focus.title }}

+ {% endif %} +
+ {% buttons focus.buttons %} +
+ {% content focus %} +
+
+{% endblock %} diff --git a/core/templates/youth.html b/core/templates/youth.html index c6f4eee..55e1d33 100644 --- a/core/templates/youth.html +++ b/core/templates/youth.html @@ -2,15 +2,19 @@ {% block title %}Młodzież | pdlzbs{% endblock %} -{% load static tailwind_tags tablepipe %} {% block content %} -

Młodzież

- +{% load static tailwind_tags wysiwyg %} {% block content %}
{% for article in youth %} -
+
{% if article.show_title %} -

{{ article.title }}

- {% endif %} {{ article.content | tablescroll | safe }} +

{{ article.title }}

+ {% endif %} +
+ {% buttons article.buttons %} +
+ {% content article %}
{% if not forloop.last %}
diff --git a/core/templatetags/tablepipe.py b/core/templatetags/tablepipe.py deleted file mode 100644 index 3453c71..0000000 --- a/core/templatetags/tablepipe.py +++ /dev/null @@ -1,10 +0,0 @@ -from django import template -import re - -register = template.Library() - - -@register.filter(name='tablescroll') -def get_due_date_string(value): - a = re.sub(r']*?>', '
\g<0>', value) - return re.sub(r'<\/table>', '
', a) diff --git a/core/templatetags/wysiwyg.py b/core/templatetags/wysiwyg.py new file mode 100644 index 0000000..0707a9c --- /dev/null +++ b/core/templatetags/wysiwyg.py @@ -0,0 +1,64 @@ +from django import template +from django.urls.base import reverse_lazy, resolve +from django.utils.safestring import mark_safe +import re + +register = template.Library() + + +@register.filter +def tableoverflow(value): + return re.sub(r'<\/table>', '
', re.sub(r']*?>', '
\g<0>', value)) if value else '' + + +@register.simple_tag(takes_context=True) +def readmore(context, value: str): + current_view = resolve(context.request.path).url_name + + if 'reverse' not in current_view: + reverse_view_url = reverse_lazy( + current_view + '-reverse', args=(value.id,)) + + res = value.content.split('') + cntnt = res[0] + if len(res) > 1: + cntnt += f'

...

Czytaj dalej' + + return mark_safe(tableoverflow(cntnt)) + + +@register.simple_tag() +def content(value: str): + return mark_safe(tableoverflow(value.content)) + + +@register.simple_tag() +def buttons(value: str): + lines = value.split('\n') + + def parse(line: str) -> str: + try: + if '->' in line: + text, url = line.split('->') + return f'{text}' + else: + text, url = line.split('|') + return f'{text}' + except: + return '' + + return mark_safe(''.join([parse(line) for line in lines])) + + +@register.filter() +def firstbutton(value: str): + lines = value.split('\n') + + def parse(line: str) -> str: + try: + text, url = line.split('|' if '|' in line else '->') + return url + except: + return '' + + return mark_safe(parse(lines[0])) diff --git a/core/urls.py b/core/urls.py index ec03a91..b518eb2 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,23 +1,28 @@ from django.urls import path -from .views import * +from .views import rtpath, tpath + +from db.main.models import Post +from db.tournaments.models import Tournament +from db.youth.models import Youth urlpatterns = [ - path('', HomeView.as_view(), name='home'), - path('zarzad', AdministrationView.as_view(), name='administration'), - path('zarzad/ogloszenia', AdministrationAnnouncementsView.as_view(), - name='administration_announcements'), - path('zarzad/protokolyiuchwaly', AdministrationProtocolsView.as_view(), - name='administration_protocols'), - path('zarzad/regulaminy', AdministrationRegulationsView.as_view(), - name='administration_regulations'), - path('zarzad/rodo', AdministrationRODOView.as_view(), - name='administration_rodos'), - path('ligi', LeagueView.as_view(), name='league'), - path('kalendarz', CalendarView.as_view(), name='calendar'), - path('grandprixbialegostoku', GrandPrixView.as_view(), name='gpx'), - path('inneturnieje', TournamentView.as_view(), name='tournaments'), - path('skladki', MembershipView.as_view(), name='membership'), - path('mlodziez', YouthView.as_view(), name='youth'), - path('atu', AtuView.as_view(), name='atu'), - path('mbkb', MBKBView.as_view(), name='mbkb'), + tpath('', 'home', {'home': 'active'}), + rtpath('aktualnosci/', 'home', Post, {'home': 'active'}), + + tpath('zarzad', 'administration'), + tpath('zarzad/ogloszenia', 'administration/announcements'), + tpath('zarzad/protokolyiuchwaly', 'administration/protocols'), + tpath('zarzad/regulaminy', 'administration/regulations'), + tpath('zarzad/rodo', 'administration/rodos'), + + tpath('ligi', 'league'), + tpath('kalendarz', 'calendar'), + tpath('grandprixbialegostoku', 'grandprix'), + tpath('inneturnieje', 'tournaments'), + rtpath('inneturnieje/', 'tournaments', Tournament), + tpath('skladki', 'membership'), + tpath('mlodziez', 'youth'), + rtpath('mlodziez/', 'youth', Youth), + tpath('atu', 'atu'), + tpath('mbkb', 'mbkb'), ] diff --git a/core/views.py b/core/views.py index abd1c54..56e36b7 100644 --- a/core/views.py +++ b/core/views.py @@ -1,65 +1,26 @@ from django.shortcuts import render -from django.views.generic import TemplateView -import importlib -import pkgutil +from django.urls import path + # Create your views here. +def template(filename, ec={}): + def closure(request): + return render(request, filename+'.html', ec) -class HomeView(TemplateView): - template_name = 'home.html' - extra_context = { - 'home': 'active' - } + return closure -class AdministrationView(TemplateView): - template_name = 'administration.html' +def reverse_template(filename, model, ec={}): + def closure(request, id): + return render(request, filename+'-reverse.html', {**ec, 'focus': model.objects.get(id=id)}) + + return closure -class AdministrationAnnouncementsView(TemplateView): - template_name = 'administration/announcements.html' +def tpath(p: str, filename: str, ec={}): + return path(p, template(filename, ec), name=filename.replace('/', '_')) -class AdministrationProtocolsView(TemplateView): - template_name = 'administration/protocols.html' - - -class AdministrationRegulationsView(TemplateView): - template_name = 'administration/regulations.html' - - -class AdministrationRODOView(TemplateView): - template_name = 'administration/rodos.html' - - -class LeagueView(TemplateView): - template_name = 'league.html' - - -class CalendarView(TemplateView): - template_name = 'calendar.html' - - -class GrandPrixView(TemplateView): - template_name = 'grandprix.html' - - -class TournamentView(TemplateView): - template_name = "tournaments.html" - - -class MembershipView(TemplateView): - template_name = 'membership.html' - - -class YouthView(TemplateView): - template_name = "youth.html" - - -class AtuView(TemplateView): - template_name = 'atu.html' - - -class MBKBView(TemplateView): - template_name = "mbkb.html" +def rtpath(p: str, filename: str, model, ec={}): + return path(p, reverse_template(filename, model, ec), name=filename.replace('/', '_')+'-reverse') diff --git a/db/main/admin.py b/db/main/admin.py index 62bb1ff..73c29e0 100644 --- a/db/main/admin.py +++ b/db/main/admin.py @@ -7,7 +7,7 @@ from .models import * @admin.register(Post) class PostModelAdmin(OrderableAdmin, admin.ModelAdmin): - list_display = ['__str__', 'ordering'] + list_display = ['__str__', 'link', 'ordering'] list_editable = ['ordering'] ordering_field_hide_input = True exclude = ['ordering'] diff --git a/db/main/models.py b/db/main/models.py index 49745a0..da78615 100644 --- a/db/main/models.py +++ b/db/main/models.py @@ -1,4 +1,6 @@ from django.db import models +from django.urls.base import reverse_lazy +from django.utils.safestring import mark_safe from tinymce.models import HTMLField from admin_ordering.models import OrderableModel from core.utils import SingletonModel @@ -16,6 +18,11 @@ class Post(OrderableModel): def __str__(self): return self.title or '(brak tytułu)' + @property + def link(self): + href = reverse_lazy('home-reverse', args=[self.id]) + return mark_safe(f'{href}') + class Meta(OrderableModel.Meta): verbose_name = 'Aktualność PodlZBS' verbose_name_plural = 'Aktualności PodlZBS' diff --git a/db/tournaments/admin.py b/db/tournaments/admin.py index fdab371..9e209f2 100644 --- a/db/tournaments/admin.py +++ b/db/tournaments/admin.py @@ -7,7 +7,7 @@ from .models import * @admin.register(Tournament) class TournamentModelAdmin(OrderableAdmin, admin.ModelAdmin): - list_display = ['__str__', 'ordering'] + list_display = ['__str__', 'link', 'ordering'] list_editable = ['ordering'] ordering_field_hide_input = True exclude = ['ordering'] diff --git a/db/tournaments/migrations/0006_remove_tournament_link_remove_tournament_link_title_and_more.py b/db/tournaments/migrations/0006_remove_tournament_link_remove_tournament_link_title_and_more.py new file mode 100644 index 0000000..6ad8740 --- /dev/null +++ b/db/tournaments/migrations/0006_remove_tournament_link_remove_tournament_link_title_and_more.py @@ -0,0 +1,26 @@ +# Generated by Django 4.0.5 on 2022-08-17 21:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('tournaments', '0005_tournament_link_title_tournament_published_and_more'), + ] + + operations = [ + migrations.RemoveField( + model_name='tournament', + name='link', + ), + migrations.RemoveField( + model_name='tournament', + name='link_title', + ), + migrations.AddField( + model_name='tournament', + name='buttons', + field=models.TextField(blank=True, default='', verbose_name='Przyciski'), + ), + ] diff --git a/db/tournaments/models.py b/db/tournaments/models.py index 784784e..24951a8 100644 --- a/db/tournaments/models.py +++ b/db/tournaments/models.py @@ -1,10 +1,31 @@ from django.db import models +from django.urls.base import reverse_lazy +from django.utils.safestring import mark_safe from admin_ordering.models import OrderableModel from tinymce.models import HTMLField from filebrowser.fields import FileBrowseField # Create your models here. +buttons_help_text = """Tutaj można wpisać dowolną ilość przycisków w następującym formacie: + + tekst1 -> link + teskt2 | link + ... + + Symbol -> oznacza, że link będzie otwarty w nowej karcie + Symbol | oznacza, że link będzie otwarty w tej samej karcie + Na przykład: + + pzbs -> https://pzbs.pl + fotogaleria | https://galeria.podlaskizbs.pl + cezar -> https://www.msc.com.pl/cezar + + PZBS i Cezar zostaną otwarte w nowej karcie + UWAGA !! + Klikając na zdjęcie zawsze zostaniemy przekierowani na pierwszy link w nowej karcie + """.replace('\n', '
') + class Tournament(OrderableModel): published = models.BooleanField('Wpis opublikowany', default=True) @@ -13,13 +34,17 @@ class Tournament(OrderableModel): photo = FileBrowseField( 'Zdjęcie', directory='inneturnieje/', max_length=200, blank=True) content = HTMLField('Tekst', default='', blank=True) - link = models.TextField('Link do wyników') - link_title = models.CharField( - 'Tytuł linku', default='', blank=True, max_length=250) + buttons = models.TextField( + 'Przyciski', default='', blank=True, help_text=buttons_help_text) def __str__(self): return self.title or '(brak tytułu)' + @property + def link(self): + href = reverse_lazy('youth-reverse', args=[self.id]) + return mark_safe(f'{href}') + class Meta(OrderableModel.Meta): verbose_name = 'Inny turniej' verbose_name_plural = 'Inne turnieje' diff --git a/db/youth/admin.py b/db/youth/admin.py index 41db4b3..84c261d 100644 --- a/db/youth/admin.py +++ b/db/youth/admin.py @@ -7,7 +7,7 @@ from .models import * @admin.register(Youth) class YouthModelAdmin(OrderableAdmin, admin.ModelAdmin): - list_display = ['__str__', 'ordering'] + list_display = ['__str__', 'link', 'ordering'] list_editable = ['ordering'] ordering_field_hide_input = True exclude = ['ordering'] diff --git a/db/youth/migrations/0003_youth_buttons.py b/db/youth/migrations/0003_youth_buttons.py new file mode 100644 index 0000000..1ce4501 --- /dev/null +++ b/db/youth/migrations/0003_youth_buttons.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.5 on 2022-08-17 21:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('youth', '0002_alter_youth_options_youth_ordering_youth_published_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='youth', + name='buttons', + field=models.TextField(blank=True, default='', verbose_name='Przyciski'), + ), + ] diff --git a/db/youth/models.py b/db/youth/models.py index 3763300..a16c6c1 100644 --- a/db/youth/models.py +++ b/db/youth/models.py @@ -1,19 +1,46 @@ from django.db import models +from django.urls.base import reverse_lazy +from django.utils.safestring import mark_safe from tinymce.models import HTMLField from admin_ordering.models import OrderableModel + # Create your models here. +buttons_help_text = """Tutaj można wpisać dowolną ilość przycisków w następującym formacie: + + tekst1 -> link + teskt2 | link + ... + + Symbol -> oznacza, że link będzie otwarty w nowej karcie + Symbol | oznacza, że link będzie otwarty w tej samej karcie + Na przykład: + + pzbs -> https://pzbs.pl + fotogaleria | https://galeria.podlaskizbs.pl + cezar -> https://www.msc.com.pl/cezar + + PZBS i Cezar zostaną otwarte w nowej karcie + """.replace('\n', '
') + class Youth(OrderableModel): published = models.BooleanField('Wpis opublikowany', default=True) show_title = models.BooleanField('Pokaż tytuł', default=True) title = models.CharField('Tytuł', default='', blank=True, max_length=250) content = HTMLField('Tekst', default='', blank=True) + buttons = models.TextField( + 'Przyciski', default='', blank=True, help_text=buttons_help_text) def __str__(self): return self.title or '(brak tytułu)' + @property + def link(self): + href = reverse_lazy('youth-reverse', args=[self.id]) + return mark_safe(f'{href}') + class Meta(OrderableModel.Meta): verbose_name = 'Młodzież' verbose_name_plural = 'Młodzież' diff --git a/pdlzbs/settings.py b/pdlzbs/settings.py index dc7e9e0..b36da83 100644 --- a/pdlzbs/settings.py +++ b/pdlzbs/settings.py @@ -153,7 +153,7 @@ TINYMCE_DEFAULT_CONFIG = { "height": "320px", "width": "960px", "menubar": "file edit view insert format tools table help", - "plugins": "advlist autolink lists link image charmap print preview anchor searchreplace visualblocks code " + "plugins": "advlist autolink lists link image charmap print preview anchor searchreplace visualblocks code pagebreak " "fullscreen insertdatetime media table paste code help wordcount spellchecker", "toolbar": "undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft " "aligncenter alignright alignjustify | outdent indent | numlist bullist checklist | forecolor " diff --git a/static/atu.jpg b/static/atu.jpg deleted file mode 100644 index b24a402..0000000 Binary files a/static/atu.jpg and /dev/null differ diff --git a/static/cezar.gif b/static/cezar.gif deleted file mode 100644 index af45dad..0000000 Binary files a/static/cezar.gif and /dev/null differ diff --git a/static/css/dist/styles.css b/static/css/dist/styles.css index 2984374..b84440e 100644 --- a/static/css/dist/styles.css +++ b/static/css/dist/styles.css @@ -1300,18 +1300,22 @@ select { margin-bottom: 1rem; } -.mt-8 { - margin-top: 2rem; -} - .mb-auto { margin-bottom: auto; } +.mt-4 { + margin-top: 1rem; +} + .block { display: block; } +.inline-block { + display: inline-block; +} + .inline { display: inline; } @@ -1336,14 +1340,6 @@ select { display: none; } -.h-\[40px\] { - height: 40px; -} - -.h-full { - height: 100%; -} - .h-screen { height: 100vh; } @@ -1364,10 +1360,6 @@ select { width: 100%; } -.w-\[48px\] { - width: 48px; -} - .w-36 { width: 9rem; } @@ -1388,10 +1380,6 @@ select { max-width: 768px; } -.shrink-0 { - flex-shrink: 0; -} - .basis-1\/2 { flex-basis: 50%; } @@ -1520,6 +1508,10 @@ select { padding: 0.5rem; } +.p-8 { + padding: 2rem; +} + .px-4 { padding-left: 1rem; padding-right: 1rem; @@ -1540,9 +1532,9 @@ select { padding-bottom: 0.5rem; } -.px-16 { - padding-left: 4rem; - padding-right: 4rem; +.px-12 { + padding-left: 3rem; + padding-right: 3rem; } .pb-1 { @@ -1553,10 +1545,6 @@ select { padding-bottom: 1rem; } -.pb-6 { - padding-bottom: 1.5rem; -} - .text-left { text-align: left; } @@ -1593,10 +1581,6 @@ select { font-size: 15px; } -.text-\[13px\] { - font-size: 13px; -} - .text-\[2\.25rem\] { font-size: 2.25rem; } @@ -1614,8 +1598,8 @@ select { font-weight: 300; } -.font-bold { - font-weight: 700; +.font-normal { + font-weight: 400; } .font-semibold { @@ -1642,11 +1626,6 @@ select { letter-spacing: 0em; } -.text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); -} - .antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; @@ -1821,14 +1800,15 @@ h4 { margin-bottom: 0.3em; } -.prose-a\:text-center :is(:where(a):not(:where([class~="not-prose"] *))) { - text-align: center; -} - .prose-img\:m-1 :is(:where(img):not(:where([class~="not-prose"] *))) { margin: 0.25rem; } +.prose-img\:my-1 :is(:where(img):not(:where([class~="not-prose"] *))) { + margin-top: 0.25rem; + margin-bottom: 0.25rem; +} + @media (min-width: 1024px) { .lg\:w-screen { width: 100vw; diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..c2b3a64 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/icon-192x192.png b/static/icon-192x192.png new file mode 100644 index 0000000..fc4cf89 Binary files /dev/null and b/static/icon-192x192.png differ diff --git a/static/icon-512x512.png b/static/icon-512x512.png new file mode 100644 index 0000000..7d01f18 Binary files /dev/null and b/static/icon-512x512.png differ diff --git a/static/kareta.jpg b/static/kareta.jpg deleted file mode 100644 index 3839049..0000000 Binary files a/static/kareta.jpg and /dev/null differ diff --git a/static/labs.jpg b/static/labs.jpg deleted file mode 100644 index a20896e..0000000 Binary files a/static/labs.jpg and /dev/null differ diff --git a/static/labs.webp b/static/labs.webp deleted file mode 100644 index b243cf6..0000000 Binary files a/static/labs.webp and /dev/null differ diff --git a/static/logo.jpg b/static/logo.jpg new file mode 100644 index 0000000..d3ee954 Binary files /dev/null and b/static/logo.jpg differ diff --git a/static/logo.webp b/static/logo.webp deleted file mode 100644 index 6e532c3..0000000 Binary files a/static/logo.webp and /dev/null differ diff --git a/static/mbkb.webp b/static/mbkb.webp deleted file mode 100644 index 4664914..0000000 Binary files a/static/mbkb.webp and /dev/null differ diff --git a/static/pzbs.webp b/static/pzbs.webp deleted file mode 100644 index 5cd100b..0000000 Binary files a/static/pzbs.webp and /dev/null differ diff --git a/theme/static/css/dist/styles.css b/theme/static/css/dist/styles.css index c20db76..b84440e 100644 --- a/theme/static/css/dist/styles.css +++ b/theme/static/css/dist/styles.css @@ -1304,10 +1304,18 @@ select { margin-bottom: auto; } +.mt-4 { + margin-top: 1rem; +} + .block { display: block; } +.inline-block { + display: inline-block; +} + .inline { display: inline; } @@ -1500,6 +1508,10 @@ select { padding: 0.5rem; } +.p-8 { + padding: 2rem; +} + .px-4 { padding-left: 1rem; padding-right: 1rem; @@ -1520,9 +1532,9 @@ select { padding-bottom: 0.5rem; } -.px-16 { - padding-left: 4rem; - padding-right: 4rem; +.px-12 { + padding-left: 3rem; + padding-right: 3rem; } .pb-1 { @@ -1533,10 +1545,6 @@ select { padding-bottom: 1rem; } -.pb-6 { - padding-bottom: 1.5rem; -} - .text-left { text-align: left; } @@ -1590,14 +1598,14 @@ select { font-weight: 300; } -.font-semibold { - font-weight: 600; -} - .font-normal { font-weight: 400; } +.font-semibold { + font-weight: 600; +} + .lowercase { text-transform: lowercase; } @@ -1792,14 +1800,15 @@ h4 { margin-bottom: 0.3em; } -.prose-a\:text-center :is(:where(a):not(:where([class~="not-prose"] *))) { - text-align: center; -} - .prose-img\:m-1 :is(:where(img):not(:where([class~="not-prose"] *))) { margin: 0.25rem; } +.prose-img\:my-1 :is(:where(img):not(:where([class~="not-prose"] *))) { + margin-top: 0.25rem; + margin-bottom: 0.25rem; +} + @media (min-width: 1024px) { .lg\:w-screen { width: 100vw; diff --git a/theme/static_src/tailwind.config.js b/theme/static_src/tailwind.config.js index 84505e8..bff3ebc 100644 --- a/theme/static_src/tailwind.config.js +++ b/theme/static_src/tailwind.config.js @@ -1,29 +1,9 @@ -/** - * This is a minimal config. - * - * If you need the full config, get it from here: - * https://unpkg.com/browse/tailwindcss@latest/stubs/defaultConfig.stub.js - */ - module.exports = { content: [ - /** - * HTML. Paths to Django template files that will contain Tailwind CSS classes. - */ - - /* Templates within theme app (/templates), e.g. base.html. */ "../templates/**/*.html", - /* - * Main templates directory of the project (BASE_DIR/templates). - * Adjust the following line to match your project structure. - */ "../../../templates/**/*.html", - /* - * Templates in other django apps (BASE_DIR//templates). - * Adjust the following line to match your project structure. - */ "../../../**/templates/**/*.html", /** @@ -39,7 +19,7 @@ module.exports = { * Python: If you use Tailwind CSS classes in Python, uncomment the following line * and make sure the pattern below matches your project structure. */ - // '../../**/*.py' + "../../../core/templatetags/*.py", ], theme: { extend: {},