Browse Source

Merge branch 'master' into zadavatko_problemu

zadavatko_problemu
Jonas Havelka 4 weeks ago
parent
commit
8c71d71094
  1. 12
      .gitignore
  2. 16
      _git_hooks/README.md
  3. 30
      _git_hooks/pre-commit
  4. 61
      _git_hooks/update
  5. 5
      aesop/apps.py
  6. 4
      aesop/ovvpfile.py
  7. 7
      aesop/urls.py
  8. 4
      aesop/utils.py
  9. 9
      aesop/views.py
  10. 4
      api/apps.py
  11. 6
      api/tests/test_skola_autocomplete.py
  12. 14
      api/urls.py
  13. 5
      api/views/__init__.py
  14. 28
      api/views/autocomplete.py
  15. 88
      data/sitetree.json
  16. 204
      deploy_v2/admin_org_prava.json
  17. 27
      docs/css.rst
  18. 8
      docs/dalsi_soubory.rst
  19. 1
      docs/index.rst
  20. 1
      docs/jak_nahrat_do_flatpage
  21. 25
      docs/tabulka_prerekvizit.rst
  22. 2
      docs/vyvoj.rst
  23. 2
      docs/zapisy/2021-12-06-testovani_dokumentace_codereview.md
  24. 97
      docs/zavislosti.rst
  25. 25
      galerie/TODO
  26. 2
      galerie/admin.py
  27. 47
      galerie/autocomplete_light_registry.py.old
  28. 3
      galerie/forms.py
  29. 1
      galerie/migrations/0001_initial.py
  30. 1
      galerie/migrations/0002_auto_20151013_1145.py
  31. 1
      galerie/migrations/0003_add_galerie_poradi.py
  32. 1
      galerie/migrations/0004_nepovinna_galerie_u_obrazku.py
  33. 1
      galerie/migrations/0005_obrazek_ordering_datum.py
  34. 1
      galerie/migrations/0006_django_imagekit.py
  35. 1
      galerie/migrations/0007_obrazek_odstranen_datum.py
  36. 1
      galerie/migrations/0008_auto_20190430_2340.py
  37. 1
      galerie/migrations/0009_auto_20190610_2358.py
  38. 13
      galerie/migrations/0011_pre_split_soustredeni.py
  39. 20
      galerie/migrations/0012_soustredeni_relink.py
  40. 14
      galerie/migrations/0013_post_split_soustredeni.py
  41. 5
      galerie/models.py
  42. 186
      galerie/static/css/galerie.css
  43. 2
      galerie/templates/galerie/Galerie.html
  44. 2
      galerie/templates/galerie/GalerieNahled.html
  45. 2
      galerie/templates/galerie/GalerieNew.html
  46. 6
      galerie/templates/galerie/base.html
  47. 11
      galerie/urls.py
  48. 2
      galerie/views.py
  49. 11
      header_fotky/admin.py
  50. 4
      header_fotky/apps.py
  51. 14
      header_fotky/models.py
  52. 11
      korektury/TODO
  53. 16
      korektury/admin.py
  54. 10
      korektury/forms.py
  55. 1
      korektury/migrations/0001_initial.py
  56. 1
      korektury/migrations/0002_auto_20151202_2351.py
  57. 1
      korektury/migrations/0003_auto_20151204_1855.py
  58. 1
      korektury/migrations/0004_auto_20151204_2240.py
  59. 1
      korektury/migrations/0005_auto_20151204_2244.py
  60. 1
      korektury/migrations/0006_oprava_pdf.py
  61. 1
      korektury/migrations/0007_auto_20151225_1237.py
  62. 1
      korektury/migrations/0008_auto_20151229_1556.py
  63. 1
      korektury/migrations/0009_trizeni_korektur_v_seznamu.py
  64. 1
      korektury/migrations/0010_Pridani_odkazu_na_organizatora.py
  65. 1
      korektury/migrations/0011_prevod_autora_z_charField_na_Organizator.py
  66. 1
      korektury/migrations/0012_delete_autor.py
  67. 1
      korektury/migrations/0013_rename_autor_org.py
  68. 1
      korektury/migrations/0014_add_org_to_pdf.py
  69. 1
      korektury/migrations/0015_auto_20161004_2005.py
  70. 1
      korektury/migrations/0016_auto_20190430_2340.py
  71. 1
      korektury/migrations/0017_auto_20190610_2358.py
  72. 18
      korektury/migrations/0020_lepsi_popis_nazvu_PDF_v_adminu.py
  73. 13
      korektury/migrations/0021_auto_20240312_2124.py
  74. 30
      korektury/migrations/0022_alter_komentar_autor_alter_korekturovanepdf_org_and_more.py
  75. 14
      korektury/migrations/0023_personalni_post_migrate.py
  76. 41
      korektury/migrations/0024_vic_orgu_k_pdf.py
  77. 26
      korektury/models.py
  78. 3
      korektury/tests.py
  79. 10
      korektury/urls.py
  80. 19
      korektury/views.py
  81. 2
      make/init_local
  82. 18
      mamweb/admin.py
  83. 88
      mamweb/middleware.py
  84. 21
      mamweb/settings_common.py
  85. 12
      mamweb/settings_prod.py
  86. 8
      mamweb/settings_test.py
  87. 12068
      mamweb/static/bootstrap/css/bootstrap.css
  88. 6314
      mamweb/static/bootstrap/js/bootstrap.bundle.js
  89. 102
      mamweb/static/css/base.css
  90. 469
      mamweb/static/css/bootstrap-theme.css
  91. 6331
      mamweb/static/css/bootstrap.css
  92. 16
      mamweb/static/css/constants.css
  93. 581
      mamweb/static/css/layout.css
  94. 38
      mamweb/static/css/mamweb-dev.css
  95. 1257
      mamweb/static/css/mamweb.css
  96. 488
      mamweb/static/css/modules.css
  97. 525
      mamweb/static/css/prettyPhoto.css
  98. 29
      mamweb/static/css/rozliseni.css
  99. BIN
      mamweb/static/fonts/ghoul/ghoul.ttf
  100. BIN
      mamweb/static/fonts/glyphicons-halflings-regular.eot

12
.gitignore

@ -31,9 +31,15 @@ TODO
# reversion kvůli historii objektů v reversion
**/reversion
# pro lidi, co programují v nástrojích od JetBrains
.idea
# dokumentace
docs/_build
docs/modules
# logy týracího skriptu (./checklinks.sh)
/wget.log.*
# pro lidi, co programují v nástrojích od JetBrains
.idea
# Mac users
.DS_Store

16
_git_hooks/README.md

@ -1,16 +0,0 @@
git hooks
=========
Kontrola stylu pythoních zdrojáků pomocí flake8. Kontrolujeme jen změny,
abychom nenutili lidi dělat nesouvisející úpravy, které by rozbíjely historii
(git blame).
pre-commit
----------
* kontrola změn před commitnutím
* instalace: lokálně zkopírovat do .git/hooks (musí být spustitelný)
update
------
* kontrola změn přicházejících s pushem
* instalace: na atreyi zkopírovat do /akce/MaM/MaMweb/mamweb.git/hooks

30
_git_hooks/pre-commit

@ -1,30 +0,0 @@
#!/bin/sh
#
# Git hook script to verify what is about to be committed.
# Checks that the changes don't introduce new flake8 errors.
TMPDIFF=`tempfile`
FLAKE8="`git rev-parse --show-toplevel`/bin/flake8"
status=0
# select only changed python files which are not migrations
changed=`git diff --cached --name-only | grep 'py$' | grep -v 'migrations/[0-9]'`
if [ -z $changed ] ; then
# Nothing to check. Note the exit is necessary -- we would not pass any
# paths to git diff below and it would output the diff unfiltered.
exit 0
fi
git diff --unified=1 --cached HEAD -- $changed > $TMPDIFF
# only do the check when there are some changes to be commited
# otherwise flake8 would hang waiting for input
if [ -s $TMPDIFF ] ; then
cat $TMPDIFF | $FLAKE8 --diff
status=$?
fi
rm -f $TMPDIFF
exit $status

61
_git_hooks/update

@ -1,61 +0,0 @@
#!/bin/sh
# git update hook to check that pushed changes don't introduce new flake8
# errors
# --- Command line
refname="$1"
oldrev="$2"
newrev="$3"
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
echo " (if you want, you could supply GIT_DIR then run" >&2
echo " $0 <ref> <oldrev> <newrev>)" >&2
exit 1
fi
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
echo "usage: $0 <ref> <oldrev> <newrev>" >&2
exit 1
fi
TMPDIR=`mktemp -d`
TMPDIFF=`tempfile`
[ $refname != "refs/heads/master" -a $refname != "refs/heads/stable" ] && exit 0
# select only changed python files which are not migrations
changed=`git diff --name-only $oldrev $newrev | grep 'py$' | grep -v 'migrations/[0-9]'`
if [ -z $changed ] ; then
# Nothing to check. Note the exit is necessary -- we would not pass any
# paths to git diff below and it would output the diff unfiltered.
exit 0
fi
git diff --unified=1 $oldrev $newrev -- $changed >${TMPDIFF}
# there is no working tree in bare git repository, so we recreate it for flake8
git archive $newrev | tar -x -C ${TMPDIR}
cd ${TMPDIR}
# report only errors on lines in diff
# (if threre was flake8 installed on atrey, we could just call flake8)
/akce/MaM/WWW/mamweb-test/bin/flake8 --diff <${TMPDIFF}
status=$?
if [ $status != 0 ] ; then
echo
echo -n "Změny, které se snažíte pushnout, obsahují kód v pythonu "
echo -n "nevyhovující flake8 (viz výše). Opravte je a zkuste to znovu. "
echo -n "Nezapomeňte, že můžete editovat historii (git commit --amend, "
echo -n "git rebase -i). Pokud byste chybu příště raději odhalili už při "
echo "commitu, zkopírujte si pre-commit hook z _git_hooks do .git/hooks."
echo
fi
rm -rf ${TMPDIR}
rm -f ${TMPDIFF}
exit $status

5
aesop/apps.py

@ -1,8 +1,5 @@
"""
Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace.
"""
from django.apps import AppConfig
class AesopConfig(AppConfig):
name = 'aesop'
verbose_name = 'Export do AESOPa'

4
aesop/ovvpfile.py

@ -1,5 +1,5 @@
from django.http import HttpResponse
from django.utils.encoding import force_text
from django.utils.encoding import force_str
class OvvpFile:
@ -20,7 +20,7 @@ class OvvpFile:
yield '\t'.join(self.columns) + '\n'
# rows
for r in self.rows:
yield '\t'.join([force_text(r[c]) for c in self.columns]) + '\n'
yield '\t'.join([force_str(r[c]) for c in self.columns]) + '\n'
def to_string(self):
return ''.join(self.to_lines())

7
aesop/urls.py

@ -1,10 +1,3 @@
"""
Soubor sloužící jako router, tj. zde se definují url adresy a na co ukazují:
- ``aesop-export/mam-rocnik-<int:prvni_rok>.csv`` (seminar_export_rocnik) :class:`~aesop.views.ExportRocnikView`
- ``aesop-export/mam-sous-<str:datum_zacatku>.csv`` (seminar_export_sous) :class:`~aesop.views.ExportSousView`
- ``aesop-export/index.csv`` (seminar_export_index) :class:`~aesop.views.ExportIndexView`
"""
from django.urls import path
from aesop import views

4
aesop/utils.py

@ -1,6 +1,6 @@
import datetime
from django.utils.encoding import force_text
from django.utils.encoding import force_str
from aesop.ovvpfile import OvvpFile
@ -9,7 +9,7 @@ def default_ovvpfile(event, rocnik):
of = OvvpFile()
of.headers['version'] = '1'
of.headers['event'] = event
of.headers['year'] = force_text(rocnik.prvni_rok)
of.headers['year'] = force_str(rocnik.prvni_rok)
of.headers['date'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
of.headers['id-scope'] = 'mam'
of.headers['id-generation'] = '1'

9
aesop/views.py

@ -1,19 +1,14 @@
"""
Soubor sloužící k deklaraci jednotlivých views (nejčastěji funkce beroucí request
a vracející :func:`django.shortcuts.render` respektive nějakou response, nebo
třídy většinou rozšiřující nějakou třídu z :mod:`django.views.generic`)
"""
import django
from django.shortcuts import get_object_or_404
from django.http import HttpResponse
from django.urls import reverse
from django.views import generic
from django.utils.encoding import force_text
from django.utils.encoding import force_str
from .utils import default_ovvpfile
from seminar.models import Rocnik, Soustredeni
from vysledkovky import utils
from seminar.utils import aktivniResitele
from tvorba.utils import aktivniResitele
class ExportIndexView(generic.View):
def get(self, request):

4
api/apps.py

@ -1,8 +1,6 @@
"""
Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace.
"""
from django.apps import AppConfig
class ApiConfig(AppConfig):
name = 'api'
verbose_name = 'Různá webová API'

6
api/tests/test_skola_autocomplete.py

@ -1,9 +1,9 @@
from django.test import TestCase
from django.test import TestCase, tag
from django.urls import reverse
import seminar.models as m
import seminar.views as v
from seminar.utils import sync_skoly
from personalni.utils import sync_skoly
@tag('stejny-model-na-produkci')
class OrgSkolyAutocompleteTestCase(TestCase):
@classmethod
def setUpClass(cls):

14
api/urls.py

@ -1,18 +1,6 @@
"""
Soubor sloužící jako router, tj. zde se definují url adresy a na co ukazují:
- ``api/expor/skoly/`` (export_skoly) :func:`~api.views.exports.exportSkolView`
- ``api/autocomplete/skola/`` (autocomplete_skola) :class:`~api.views.autocomplete.SkolaAutocomplete`
- ``api/autocomplete/resitel/`` (autocomplete_resitel) :class:`~api.views.autocomplete.ResitelAutocomplete`
- ``api/autocomplete/problem/odevzdatelny`` (autocomplete_problem_odevzdatelny) :class:`~api.views.autocomplete.OdevzdatelnyProblemAutocomplete`
Na autocomplete v3 čeká:
- ``autocomplete/organizatori/`` (seminar_autocomplete_organizator) :class:`~api.views.autocomplete.OrganizatorAutocomplete`
"""
from django.urls import path
from . import views
from seminar.utils import org_required
from personalni.utils import org_required
urlpatterns = [
# Export škol

5
api/views/__init__.py

@ -1,7 +1,2 @@
"""
Soubory sloužící k deklaraci jednotlivých views (nejčastěji funkce beroucí request
a vracející :func:`django.shortcuts.render` respektive nějakou response, nebo
třídy většinou rozšiřující nějakou třídu z :mod:`django.views.generic`)
"""
from .autocomplete import *
from .exports import *

28
api/views/autocomplete.py

@ -37,9 +37,9 @@ class ResitelAutocomplete(LoginRequiredAjaxMixin,autocomplete.Select2QuerySetVie
query = Q()
for part in parts:
query &= (
Q(osoba__jmeno__istartswith=self.q)|
Q(osoba__prijmeni__istartswith=self.q)|
Q(osoba__prezdivka__istartswith=self.q)
Q(osoba__jmeno__istartswith=part)|
Q(osoba__prijmeni__istartswith=part)|
Q(osoba__prezdivka__istartswith=part)
)
qs = qs.filter(query)
return qs
@ -70,23 +70,17 @@ class PublicResitelAutocomplete(LoginRequiredAjaxMixin, autocomplete.Select2Quer
class OdevzdatelnyProblemAutocomplete(autocomplete.Select2QuerySetView):
""" View k :mod:`dal.autocomplete` pro vyhledávání problémů především v odevzdávátku. """
def get_queryset(self):
nastaveni = get_object_or_404(m.Nastaveni)
rocnik = nastaveni.aktualni_rocnik
# Od tohoto místa dál jsem zkoušel spoustu variací podle https://django-polymorphic.readthedocs.io/en/stable/advanced.html
temaQ = Q(Tema___rocnik = rocnik, stav=m.Problem.STAV_ZADANY)
ulohaQ = Q(Uloha___cislo_zadani__rocnik = rocnik, stav=m.Problem.STAV_ZADANY)
clanekQ = Q(Clanek___cislo__rocnik = rocnik, stav=m.Problem.STAV_ZADANY)
qs = m.Problem.objects.filter(temaQ | ulohaQ | clanekQ)
#print(temata, ulohy, clanky)
#ulohy.union(temata, all=True)
#print(ulohy)
#ulohy.union(clanky, all=True)
#print(ulohy)
#qs = ulohy
print(qs)
qs = m.Problem.objects.filter(stav=m.Problem.STAV_ZADANY)
if self.q:
qs = qs.filter(
Q(nazev__icontains=self.q))
nadproblem_id = int(self.forwarded.get("nadproblem_id", -1))
if nadproblem_id != -1:
# Seřadíme tak, aby ty s nadproblem==None byly dole (větší motivace tam naklikat konkrétní úlohy) a pak nějak rozumně.
# Tohle je řazení pro odevzdávátko, kde je definován nadproblém, proto je to v tomto ifu. (Jinde si to netroufám řadit)
qs = qs.order_by("nadproblem", "kod", "nazev")
qs = list(filter(lambda problem: problem.hlavni_problem.id == nadproblem_id, qs))
return qs
class ProblemAutocomplete(autocomplete.Select2QuerySetView):

88
data/sitetree.json

@ -437,7 +437,7 @@
"insitetree": true,
"parent": 21,
"sort_order": 36,
"title": "Poslat řešení",
"title": "Nahrát řešení",
"tree": 1,
"url": "seminar_nahraj_reseni",
"urlaspattern": true
@ -476,9 +476,9 @@
"access_perm_type": 1,
"access_permissions": [
[
"change_hodnoceni",
"seminar",
"hodnoceni"
"org",
"auth",
"user"
]
],
"access_restricted": true,
@ -719,7 +719,7 @@
"insitetree": true,
"parent": 21,
"sort_order": 36,
"title": "Nahrát řešení",
"title": "Vložit řešení",
"tree": 1,
"url": "seminar_vloz_reseni",
"urlaspattern": true
@ -1025,5 +1025,83 @@
},
"model": "sitetree.treeitem",
"pk": 51
},
{
"fields": {
"access_guest": false,
"access_loggedin": false,
"access_perm_type": 1,
"access_permissions": [
[
"resitel",
"auth",
"user"
]
],
"access_restricted": true,
"alias": null,
"description": "",
"hidden": false,
"hint": "",
"inbreadcrumbs": true,
"inmenu": true,
"insitetree": true,
"parent": 23,
"sort_order": 52,
"title": "Nahrát řešení k nadproblému {{nadproblem_id}}",
"tree": 1,
"url": "seminar_nahraj_reseni nadproblem_id",
"urlaspattern": true
},
"model": "sitetree.treeitem",
"pk": 52
},
{
"fields": {
"access_guest": false,
"access_loggedin": false,
"access_perm_type": 1,
"access_permissions": [],
"access_restricted": false,
"alias": null,
"description": "",
"hidden": false,
"hint": "",
"inbreadcrumbs": true,
"inmenu": true,
"insitetree": true,
"parent": 28,
"sort_order": 53,
"title": "Přidat PDF",
"tree": 1,
"url": "/admin/korektury/korekturovanepdf/add/",
"urlaspattern": false
},
"model": "sitetree.treeitem",
"pk": 53
},
{
"fields": {
"access_guest": false,
"access_loggedin": false,
"access_perm_type": 1,
"access_permissions": [],
"access_restricted": true,
"alias": null,
"description": "",
"hidden": false,
"hint": "",
"inbreadcrumbs": true,
"inmenu": true,
"insitetree": true,
"parent": 20,
"sort_order": 54,
"title": "Export do abstraktů sousu {{ soustredeni.id }}",
"tree": 1,
"url": "seminar_soustredeni_abstrakty soustredeni.id",
"urlaspattern": true
},
"model": "sitetree.treeitem",
"pk": 54
}
]

204
deploy_v2/admin_org_prava.json

@ -64,6 +64,36 @@
"ct_app_label": "galerie",
"ct_model": "obrazek"
},
{
"codename": "add_fotkaheader",
"ct_app_label": "header_fotky",
"ct_model": "fotkaheader"
},
{
"codename": "change_fotkaheader",
"ct_app_label": "header_fotky",
"ct_model": "fotkaheader"
},
{
"codename": "view_fotkaheader",
"ct_app_label": "header_fotky",
"ct_model": "fotkaheader"
},
{
"codename": "add_fotkaurlvazba",
"ct_app_label": "header_fotky",
"ct_model": "fotkaurlvazba"
},
{
"codename": "change_fotkaurlvazba",
"ct_app_label": "header_fotky",
"ct_model": "fotkaurlvazba"
},
{
"codename": "view_fotkaurlvazba",
"ct_app_label": "header_fotky",
"ct_model": "fotkaurlvazba"
},
{
"codename": "add_komentar",
"ct_app_label": "korektury",
@ -225,123 +255,118 @@
"ct_model": "clanek"
},
{
"codename": "add_konfera",
"codename": "add_deadline",
"ct_app_label": "seminar",
"ct_model": "deadline"
},
{
"codename": "change_deadline",
"ct_app_label": "seminar",
"ct_model": "deadline"
},
{
"codename": "view_deadline",
"ct_app_label": "seminar",
"ct_model": "deadline"
},
{
"codename": "add_konfera",
"ct_app_label": "soustredeni",
"ct_model": "konfera"
},
{
"codename": "change_konfera",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "konfera"
},
{
"codename": "delete_konfera",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "konfera"
},
{
"codename": "view_konfera",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "konfera"
},
{
"codename": "add_konfery_ucastnici",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "konfery_ucastnici"
},
{
"codename": "change_konfery_ucastnici",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "konfery_ucastnici"
},
{
"codename": "delete_konfery_ucastnici",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "konfery_ucastnici"
},
{
"codename": "view_konfery_ucastnici",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "konfery_ucastnici"
},
{
"codename": "add_nastaveni",
"ct_app_label": "seminar",
"ct_app_label": "various",
"ct_model": "nastaveni"
},
{
"codename": "change_nastaveni",
"ct_app_label": "seminar",
"ct_app_label": "various",
"ct_model": "nastaveni"
},
{
"codename": "delete_nastaveni",
"ct_app_label": "seminar",
"ct_app_label": "various",
"ct_model": "nastaveni"
},
{
"codename": "view_nastaveni",
"ct_app_label": "seminar",
"ct_app_label": "various",
"ct_model": "nastaveni"
},
{
"codename": "add_novinky",
"ct_app_label": "seminar",
"ct_app_label": "novinky",
"ct_model": "novinky"
},
{
"codename": "change_novinky",
"ct_app_label": "seminar",
"ct_app_label": "novinky",
"ct_model": "novinky"
},
{
"codename": "delete_novinky",
"ct_app_label": "seminar",
"ct_app_label": "novinky",
"ct_model": "novinky"
},
{
"codename": "view_novinky",
"ct_app_label": "seminar",
"ct_app_label": "novinky",
"ct_model": "novinky"
},
{
"codename": "add_organizator",
"ct_app_label": "seminar",
"ct_model": "organizator"
},
{
"codename": "change_organizator",
"ct_app_label": "seminar",
"ct_model": "organizator"
},
{
"codename": "delete_organizator",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "organizator"
},
{
"codename": "view_organizator",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "organizator"
},
{
"codename": "add_osoba",
"ct_app_label": "seminar",
"ct_model": "osoba"
},
{
"codename": "change_osoba",
"ct_app_label": "seminar",
"ct_model": "osoba"
},
{
"codename": "delete_osoba",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "osoba"
},
{
"codename": "view_osoba",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "osoba"
},
{
@ -366,22 +391,22 @@
},
{
"codename": "add_prijemce",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "prijemce"
},
{
"codename": "change_prijemce",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "prijemce"
},
{
"codename": "delete_prijemce",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "prijemce"
},
{
"codename": "view_prijemce",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "prijemce"
},
{
@ -404,24 +429,14 @@
"ct_app_label": "seminar",
"ct_model": "problem"
},
{
"codename": "add_resitel",
"ct_app_label": "seminar",
"ct_model": "resitel"
},
{
"codename": "change_resitel",
"ct_app_label": "seminar",
"ct_model": "resitel"
},
{
"codename": "delete_resitel",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "resitel"
},
{
"codename": "view_resitel",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "resitel"
},
{
@ -446,82 +461,82 @@
},
{
"codename": "add_skola",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "skola"
},
{
"codename": "change_skola",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "skola"
},
{
"codename": "delete_skola",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "skola"
},
{
"codename": "view_skola",
"ct_app_label": "seminar",
"ct_app_label": "personalni",
"ct_model": "skola"
},
{
"codename": "add_soustredeni",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni"
},
{
"codename": "change_soustredeni",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni"
},
{
"codename": "delete_soustredeni",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni"
},
{
"codename": "view_soustredeni",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni"
},
{
"codename": "add_soustredeni_organizatori",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni_organizatori"
},
{
"codename": "change_soustredeni_organizatori",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni_organizatori"
},
{
"codename": "delete_soustredeni_organizatori",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni_organizatori"
},
{
"codename": "view_soustredeni_organizatori",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni_organizatori"
},
{
"codename": "add_soustredeni_ucastnici",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni_ucastnici"
},
{
"codename": "change_soustredeni_ucastnici",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni_ucastnici"
},
{
"codename": "delete_soustredeni_ucastnici",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni_ucastnici"
},
{
"codename": "view_soustredeni_ucastnici",
"ct_app_label": "seminar",
"ct_app_label": "soustredeni",
"ct_model": "soustredeni_ucastnici"
},
{
@ -603,50 +618,5 @@
"codename": "view_taggeditem",
"ct_app_label": "taggit",
"ct_model": "taggeditem"
},
{
"codename": "add_fotkaheader",
"ct_app_label": "header_fotky",
"ct_model": "fotkaheader"
},
{
"codename": "change_fotkaheader",
"ct_app_label": "header_fotky",
"ct_model": "fotkaheader"
},
{
"codename": "view_fotkaheader",
"ct_app_label": "header_fotky",
"ct_model": "fotkaheader"
},
{
"codename": "add_fotkaurlvazba",
"ct_app_label": "header_fotky",
"ct_model": "fotkaurlvazba"
},
{
"codename": "change_fotkaurlvazba",
"ct_app_label": "header_fotky",
"ct_model": "fotkaurlvazba"
},
{
"codename": "view_fotkaurlvazba",
"ct_app_label": "header_fotky",
"ct_model": "fotkaurlvazba"
},
{
"codename": "add_deadline",
"ct_app_label": "seminar",
"ct_model": "deadline"
},
{
"codename": "change_deadline",
"ct_app_label": "seminar",
"ct_model": "deadline"
},
{
"codename": "view_deadline",
"ct_app_label": "seminar",
"ct_model": "deadline"
}
]

27
docs/css.rst

@ -0,0 +1,27 @@
CSS (a další styly na webu)
===========================
Inspirován `css-trick článkem <https://css-tricks.com/methods-organize-css/>`_ jsem se rozhodl rozdělit
CSSka do
- Konstant (``constants.css``), které jsou využívány na mnoha místech CSSek
- Nastylování html tagů (``base.css``)
- Layoutu (``layout.css``), což je to, co určuje celkové rozložení stránky
- Jednotlivých prvků (``modules.css``)
Dále jsem separoval CSSka pro **galerii** (potřebuje hodně specifických stylů). Stejně tak **korekturovátko** má styly separátně.
Dále web (asi) používá externí frameworky (v separátních složkách – mají k sobě i JS a podobné věci):
- bootstrap: dělá nějaké basic stylování, *web je na něm hodně závislý* (například jsem zjistil, že bootstrap kdysi přidával ``font-size:14px``, bez čehož se web úplně rozpadnul) (také na něm běží mobilní meníčko, které navíc vyžaduje Popper, tedy bootstrap.bundle.js místo bootstrap.js)
Pak jsou tu ``mamweb-dev.css`` a ``printtable.css``, co jsem si ještě nerozmyslel, co s tím.
Pár myšlenek
------------
- Až na pár výjimek (galerii a korekturovátko) bych styly držel v jedné složce a málo souborech,
protože CSS šíleně dědí všechno možné
- Chce to dobře pojmenovávat třídy (speciálně aby bylo vidět, co ta třída dělá nebo kde se používá)
- Chce to hodně komentovat kód (speciálně tam, kde není splněn předchozí bod)

8
docs/dalsi_soubory.rst

@ -9,12 +9,6 @@ static
------
Složka, kam django nakopíruje všechno ze složek static a pak na to z templatů / kódu jde ukazovat pomocí ``static``.
_git_hooks
----------
Hooky do gitu pro kontrolu Pythoního stylu. Především ``flake8``.
Zbylo tu z minulosti mamwebu.
data
----
Obsahuje data, která patří do databáze, ale jsou přímo součástí webu jako
@ -28,7 +22,7 @@ Generuje se za pomocí::
nebo (v případě meníčka)::
./manage.py dumpdata sitetree --natrual-foreign > data/sitetree_new.json
./manage.py dumpdata sitetree --natural-foreign > data/sitetree_new.json
./fix_json.py data/sitetree_new.json data/sitetree.json
deploy_v2

1
docs/index.rst

@ -27,6 +27,7 @@ Dokumentace (jak v ``docs/``, tak přímo v kódu) je psaná ve
:titlesonly:
vyvoj
zavislosti
sphinx
skripty
modules/modules

1
ilustrace_odmeny/jak_nahrat_do_flatpage → docs/jak_nahrat_do_flatpage

@ -1,3 +1,4 @@
FIXME přepsat do rst, přidat i další věci a případně přesunout na wiki
Přidání obrázků do odměn:
admin -> flatpage odměn -> ikona přidat obrázek
záložka odeslat, vybrat obrázek, odeslat

25
docs/tabulka_prerekvizit.rst

@ -1,25 +0,0 @@
.. Není odkázaná z menu, je to záměr
Tabulka prerekvizit v různých distribucích
=========
.. admonition:: Metodika
Na čistém repozitáři (``git clean -fxd``) a čistém systému spouštíme
``make/init_local``. Když to spadne, tak do tabulky zapíšeme, co jsme
přiinstalovali. Protože větev ``makefiles`` aktuálně není mergenutá do
masteru, nefunguje synchronizace flatpages (a stejně nemáme SSH klíč), takže
tam ``make/init_local`` sestřelíme a vyzkoušíme, že ``make/test`` spustí
testy.
.. Grafické tabulky (grid-tables, simple-tables) jsou strašný porod vyrábět, dlabu na to a cpu to do CSV…
.. csv-table:: Prerekvizity v jednotlivých distribucích
:header: Distribuce / OS, Repozitář s Py3.9, venv, py knihovny, PostgreSQL knihovna, poznámky
Ubuntu 22.10, ??, ``python3-venv``, ``python3-dev``, ``libpq-dev``, "Je potřeba zapnout zdroj ``universe`` a nainstalovat kompilátor C (``gcc``)?"
Linux Mint 21, ??, ``python3-venv``, ``python3-dev``, ``libpq-dev``, ""
Archlinux 2022.11.01, AUR, vestavěný, vestavěné, ``postgresql-libs``, "Je potřeba céčkový kompilátor (``gcc``)"
openSUSE Leap 15.4, oficiální (``python39``), předinstalovaný?, ``python39-devel``, ??FIXME!!, "Výchozí verze pythonu je 3.6 a ta je moc stará, potřeba instalovat ``gcc``. Nevím jak sehnat pg_config."
Debian 11, "oficiální, výchozí", ??, ??, ??, "Určitě to tam rozběhat jde, protože Gimli. Nejspíš bude relativně podobné Ubuntu."

2
docs/vyvoj.rst

@ -37,7 +37,7 @@ Kromě toho je potřeba mít účet na `Gitee <https://gitea.ks.matfyz.cz>`_, kd
bydlí gitový repozitář s kódem.
.. tip:: Potřebné balíčky v různých distribucích jsou sepsané v :ref:`tabulce
prerekvizit <Tabulka prerekvizit v různých distribucích>`.
prerekvizit <Alternativní jména balíčků>`.
Doporučené
^^^^^^^^^^

2
docs/zapisy/2021-12-06-testovani_dokumentace_codereview.md

@ -116,7 +116,7 @@ Aktuálně: Jakýsi coding style zhruba existuje, není popsaný, šíří se li
- Nesmí být striktně vynucovaný
- Musel by být hodně nastavitelný
- Nechceme mít kód plný `#NOQA: WTF42`
- Nejspíš vždycky bude mít false positives (`seminar.utils.roman_numerals`) i false negatives (`seminar.models.tvorba.Cislo.posli_cislo_mailem`)
- Nejspíš vždycky bude mít false positives (`tvorba.utils.roman_numerals`) i false negatives (`seminar.models.tvorba.Cislo.posli_cislo_mailem`)
- Možná dobrý sluha, ale určitě špatný pán (also: špatná zkušenost ☺)
- __Důsledek:__ Hrozí, že těch falešných varování bude moc, čímž to ztratí smysl úplně
- Potenciálně by šlo aplikovat jen lokálně na změny?

97
docs/zavislosti.rst

@ -0,0 +1,97 @@
Závislosti webu
@@@@@@@@@@@@@@@
Web ke svému běhu potřebuje různé další programy. Tahle stránka se snaží je pokrýt.
Stránka je koncipována jako odrážkový seznam balíčků pro Ubuntu s případnými
komentáři, na konci stránky jsou uvedena :ref:`jména balíčků <Alternativní jména
balíčků>` v různých dalších distribucích. (Seznam mj. cílí na lokální
rozchození, proto popisuji Ubuntu a ne Debian. I tak se ale snažíme popsat web
v úplnosti.)
.. I use Arch, btw.
Základ webu
===========
- ``python3`` – Ideálně Python 3.9, jenž je na Gimlim
- ``python3-pip`` pro instalaci dalších Pythoních balíčků podle ``requirements.txt``
- ``python3-venv``
- ``gcc`` – kompilace Pythoních knihoven ze zdrojových distribucí (sdist), možná (neotestováno) jde jako alternativu použít ``python3-wheel`` a stahovat bdists
- ``python3-dev`` – taktéž
- ``libpq-dev`` do třetice…
- ``ghostscript`` TODO konverze PDF v korekturovátku
- ``pdflatex`` FIXME! generování obálek a stvrzenek
- ``git`` – používán :ref:`Make skripty`
- ``locales`` pro české formáty
Nasazení na produkci / testweb
==============================
(nejsou nutně potřeba k provozu lokální instance)
- ``rsync``
- ``pg_utils`` FIXME
- ``htpasswd`` FIXME – aby testweb nepoužívali náhodní kolemjdoucí
- ``postgresql-server`` TODO
- ``acl`` pro nastavování práv přes ``setfacl``
Pro testweb je potřeba i všechno pro :ref:`dokumentaci <Dokumentace>`, vizte níž.
Předpokládá se nasazení v uWSGI pod Nginxem a služba běžící pod systemd, nicméně to už je spíš záležitost infrastruktury a ne specifikum mamwebu.
Dokumentace
===========
- ``make`` pro zbuildění
- Pythoní balíčky podle příslušné části ``requirements.txt``
Vývojové nástroje
=================
(Nejsou nezbytně nutné, ale předpokládáme jejich užitečnost. Mohou se hodit i na produkci.)
- ``psql`` TODO pro manuální dotazy do PostgreSQL
- ``sqlite3`` TODO totéž pro SQLite3
- ``ssh``
- ``graphviz`` pro vygenerování schématu
- ``rsync``
- ``ipython3`` – hezčí interaktivní shell (stačí z ``requirements.txt``)
Potenciální usnadnění života
============================
(Úplně zbytečné, ale sdílíme pozitivní zkušenosti :-))
- ``tea`` – CLI klient pro Giteu, aby člověk nepotřeboval otevírat web pro založení PR
Alternativní jména balíčků
==========================
Různé distribuce balí SW různě, takže to, co je v jedné distribuci jeden
balíček může být v jiné rozděleno do víc. Pro usnadnění nasazení je tady
přehled známých alternativních jmen.
TODO: tabulka není úplná. Pokud na něco narazíte, tak ji prosím doplňte.
.. admonition:: Jak se pozná, že web funguje, pro účely tabulky?
Na čistém repozitáři (``git clean -fxd``) a čistém systému spouštíme
``make/init_local``. Když to spadne, tak do tabulky zapíšeme, co jsme
přiinstalovali. Protože nefunguje synchronizace flatpages (nemáme SSH klíč),
``make/init_local`` sestřelíme při pokusu o synchronizaci a vyzkoušíme, že
``make/test`` spustí testy.
.. Grafické tabulky (grid-tables, simple-tables) jsou strašný porod vyrábět, dlabu na to a cpu to do CSV…
.. csv-table:: Prerekvizity v jednotlivých distribucích
:header: Distribuce / OS, Repozitář s Py3.9, venv, py knihovny, PostgreSQL knihovna, poznámky
Ubuntu 22.10, ??, ``python3-venv``, ``python3-dev``, ``libpq-dev``, "Je potřeba zapnout zdroj ``universe`` a nainstalovat kompilátor C (``gcc``)?"
Linux Mint 21, ??, ``python3-venv``, ``python3-dev``, ``libpq-dev``, ""
Archlinux 2022.11.01, AUR, vestavěný, vestavěné, ``postgresql-libs``, "Je potřeba céčkový kompilátor (``gcc``)"
openSUSE Leap 15.4, oficiální (``python39``), předinstalovaný?, ``python39-devel``, ??FIXME!!, "Výchozí verze pythonu je 3.6 a ta je moc stará, potřeba instalovat ``gcc``. Nevím jak sehnat pg_config."
Debian 11, "oficiální, výchozí", ??, ??, ??, "Určitě to tam rozběhat jde, protože Gimli. Nejspíš bude relativně podobné Ubuntu."

25
galerie/TODO

@ -1,25 +0,0 @@
========
| TODO |
|======|
Aktualni
* co s titulni fotkou
* do CSS
* nahledy
* nastylovat tabulku s nahledy
* komentare uz na nahledy?
* detail
* nahledy pred a po
* opravit prechodove sipky
* vyrobit prechodove sipky ve M&M-stylu
Dlouhodobe
* sipky na prechazeni mezi fotkami
* hromadne PRIDANI fotek do jiz existujici galerie
Fylozoficke
* zvolit velikosti velke a male fotky
* je potreba i jine razeni nez automaticky podle casu nebo staci podgalerie?
* napr. dve hry na dvou ruznych mistech ve stejny cas
* fotky od ucastniku ze hry (skupinky se pohybuji ve stejny cas, ale maji sled fotek) -- nestaci to pripadne vrazit do podgalerii?

2
galerie/admin.py

@ -1,5 +1,3 @@
#coding: utf-8
from galerie.models import Obrazek, Galerie
from django.contrib import admin
from django.http import HttpResponseRedirect

47
galerie/autocomplete_light_registry.py.old

@ -1,47 +0,0 @@
# -*- coding: utf-8 -*-
from autocomplete_light import shortcuts as autocomplete_light
from .models import Obrazek, Galerie
from .views import cesta_od_korene
class ObrazekAutocomplete(autocomplete_light.AutocompleteModelBase):
model = Obrazek
search_fields = ['nazev', 'popis']
split_words = True
limit_choices = 15
attrs = {
# This will set the input placeholder attribute:
'placeholder': u'Obrázek',
# This will set the yourlabs.Autocomplete.minimumCharacters
# options, the naming conversion is handled by jQuery
'data-autocomplete-minimum-characters': 1,
}
choice_html_format = '''
<span class="block" data-value="{}">
<span class="block">
{}
<span class="block">{}</span>
</span>
</span>
'''
def choice_label(self, obrazek):
cesta = "/".join(g.nazev for g in cesta_od_korene(obrazek.galerie))
popis = "{}<br>".format(obrazek.popis) if obrazek.popis else ""
return '{}<br>{}{}'.format(obrazek.nazev, popis, cesta)
def choice_html(self, obrazek):
"""Vrátí kus html i s obrázkem, které se pak ukazuje v nabídce"""
return self.choice_html_format.format(self.choice_value(obrazek),
obrazek.obrazek_maly_tag(), self.choice_label(obrazek))
widget_attrs={
'data-widget-maximum-values': 15,
'class': 'modern-style',
}
autocomplete_light.register(ObrazekAutocomplete)

3
galerie/forms.py

@ -1,7 +1,4 @@
#coding: utf-8
from django import forms
from seminar.models import Soustredeni
class KomentarForm(forms.Form):
komentar = forms.CharField(label = "Komentář:", max_length = 300, required=False)

1
galerie/migrations/0001_initial.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
galerie/migrations/0002_auto_20151013_1145.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
galerie/migrations/0003_add_galerie_poradi.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
galerie/migrations/0004_nepovinna_galerie_u_obrazku.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
galerie/migrations/0005_obrazek_ordering_datum.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
galerie/migrations/0006_django_imagekit.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
galerie/migrations/0007_obrazek_odstranen_datum.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
galerie/migrations/0008_auto_20190430_2340.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-04-30 21:40
from __future__ import unicode_literals

1
galerie/migrations/0009_auto_20190610_2358.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.21 on 2019-06-10 21:58
from __future__ import unicode_literals

13
galerie/migrations/0011_pre_split_soustredeni.py

@ -0,0 +1,13 @@
# Generated by Django 4.2.11 on 2024-04-30 21:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('galerie', '0010_auto_20200819_0947'),
]
operations = [
]

20
galerie/migrations/0012_soustredeni_relink.py

@ -0,0 +1,20 @@
# Generated by Django 4.2.11 on 2024-05-01 13:07
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('soustredeni', '0001_split_from_seminar'),
('galerie', '0011_pre_split_soustredeni'),
]
operations = [
migrations.AlterField(
model_name='galerie',
name='soustredeni',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='soustredeni.soustredeni'),
),
]

14
galerie/migrations/0013_post_split_soustredeni.py

@ -0,0 +1,14 @@
# Generated by Django 4.2.11 on 2024-05-01 13:35
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('galerie', '0012_soustredeni_relink'),
('soustredeni', '0003_post_split_soustredeni'),
]
operations = [
]

5
galerie/models.py

@ -1,14 +1,11 @@
# coding: utf-8
from django.db import models
#from django.db.models import Q
from django.utils.encoding import force_text
from imagekit.models import ImageSpecField
from imagekit.processors import ResizeToFit, Transpose
import os
from seminar.models import Soustredeni
from soustredeni.models import Soustredeni
VZDY=0
ORG=1

186
galerie/static/css/galerie.css

@ -0,0 +1,186 @@
@charset "utf-8"; /* vynuť utf-8 */
/* Galerie */
/* velká fotka */
/* zmenšování spolu s oknem prohlížeče */
.galerie .obrazek, .titulni_obrazek {
max-width: 100%;
height: auto;
width: auto\9; /* ie8 */
}
.predchozi_obrazek{
position: absolute;
z-index: 1;
width: 33%;
height: 100%;
left: 0;
top: 0;
}
.predchozi_obrazek:hover{
background-image: url("/static/galerie/prvky/predchozi.svg");
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));
background-position: left center;
background-repeat: no-repeat;
}
.dalsi_obrazek{
position: absolute;
z-index: 1;
width: 33%;
height: 100%;
left: 67%;
top: 0;
}
.dalsi_obrazek:hover{
background-image: url("/static/galerie/prvky/dalsi.svg");
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));
background-position: right center;
background-repeat: no-repeat;
}
.galerie {
position: relative;
text-align: center;
margin: 20px auto 0 auto;
}
.galerie h1 {
text-align: center;
}
.galerie_hlavicka {
margin: 30px auto 30px auto;
}
.popis {
margin: 10px 10px 30px 0px;
text-align: center;
}
#nahoru {
text-align: center;
}
/* titulní obrázek hlavní galerie soustředění */
.galerie_nahledy{
/*margin: 1em 0;*/
margin: auto;
padding: 10px;
text-align: center;
overflow: auto;
}
.galerie_nahledy img {
margin: 10px;
}
.galerie_nahledy div.navigace {
display: inline-block;
}
.galerie_nahled, .podgalerie_nahled { /* frame */
display: block;
position: relative;
float: left;
width: 200px;
height: 200px;
text-align: center;
border: solid;
border-width: 1px;
border-radius: 4px;
border-color: var(--svetla-oranzova);
background-color: var(--barva-pozadi);
white-space: nowrap;
margin: 10px;
font-weight: bold;
}
.galerie_nahled:hover, .podgalerie_nahled:hover {
background-color: var(--svetla-oranzova);
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));
color: var(--tmava-oranzova);
}
.vystredeno{ /* helper */
display: inline-block;
height: 100%;
vertical-align: middle;
}
.galerie_nahled img {
vertical-align: middle;
max-height: 180px;
max-width: 180px;
}
.galerie_nahled div {
position: absolute;
bottom: 0px;
width: 100%;
text-align: center;
}
.podgalerie_nahled img {
margin-top: 20px;
margin-bottom: 15px;
max-height: 125px;
max-width: 167px;
}
.podgalerie_nahled .nazev_galerie {
position: absolute;
width: 100%;
top: 160px;
}
/* Odkazy na předchozí a následující podgalerii */
.galerie_predchozi_nasledujici {
overflow: auto;
margin: 10px auto 10px auto;
}
.galerie_predchozi_nasledujici .predchozi {
float: left;
}
.galerie_predchozi_nasledujici .nasledujici {
float: right;
}
/* posune kotvu obrázku v galerii o oranžový pruh dolu, aby se pod ním obrázek neschovával */
/* https://stackoverflow.com/questions/10732690/offsetting-an-html-anchor-to-adjust-for-fixed-header */
.kotva_obrazku {
position: absolute;
width: 0;
height: 55px; /* viz #title */
margin-top: -55px; /* viz #title */
}
@media(max-width: 860px) {
.kotva_obrazku {
height: 3em; /* #FIXME nemám páru, jak zjistit výšku toho elementu */
margin-top: -3em; /* #FIXME */
}
}
/* plus a minus tlacitka */
.mam-org-only-galerie {
background: var(--orgovska-svetla-fialova);
padding: 10px;
margin: 10px 10px 10px -20px;
border: #333 2px dashed;
float: left;
}
.mam-org-only-galerie a{
padding: 3px 5px;
margin: 5px;
border-radius: 20px;
background-color: var(--tmava-oranzova);;
color: var(--barva-pozadi);
float: left;
}

2
galerie/templates/galerie/Galerie.html

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "galerie/base.html" %}
{% block nadpis1a %}

2
galerie/templates/galerie/GalerieNahled.html

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "galerie/base.html" %}
{% block nadpis1a %}
Galerie {{galerie.nazev}}

2
galerie/templates/galerie/GalerieNew.html

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "galerie/base.html" %}
{% block content %}

6
galerie/templates/galerie/base.html

@ -0,0 +1,6 @@
{% extends "base.html" %}
{% load static %}
{% block custom_css %}
<link href="{% static 'css/galerie.css' %}?version=1" rel="stylesheet">
{% endblock %}

11
galerie/urls.py

@ -1,14 +1,5 @@
"""
Soubor sloužící jako router, tj. zde se definují url adresy a na co ukazují:
- ``<int:pk>/`` :func:`~galerie.views.nahled`
- ``<int:pk>/<int:fotka>/`` :func:`~galerie.views.detail`
- ``<int:galerie>/new/`` :func:`~galerie.views.new_galerie`
- ``<int:galerie>/plus/<int:subgalerie>/`` :func:`~galerie.views.plus_galerie`
- ``<int:galerie>/minus/<int:subgalerie>/`` :func:`~galerie.views.minus_galerie`
"""
from django.urls import path
from seminar.utils import org_required
from personalni.utils import org_required
from . import views
urlpatterns = [

2
galerie/views.py

@ -1,5 +1,3 @@
# coding: utf-8
import random
from django.http import HttpResponse, Http404

11
header_fotky/admin.py

@ -1,14 +1,3 @@
"""
Soubor sloužící k definici toho, co bude v adminu. Většinou pouhým zavoláním
funkce :func:`django.contrib.admin.site.register`, v případě, že chceme něco
upravit, tak jako třída rozšiřující :class:`django.contrib.admin.ModelAdmin`
s dekorátorem :func:`django.contrib.admin.register`.
Zde se definuje admin pro:
- :class:`~header_fotky.models.FotkaHeader`
- :class:`~header_fotky.models.FotkaUrlVazba`
"""
from django.contrib import admin
from django.contrib.admin import ModelAdmin
import header_fotky.models as m

4
header_fotky/apps.py

@ -1,8 +1,6 @@
"""
Soubor sloužící k pojmenování a jiným nastavením djangovské aplikace.
"""
from django.apps import AppConfig
class HeaderFotkyConfig(AppConfig):
name = 'header_fotky'
verbose_name = 'Fotky v záhlaví'

14
header_fotky/models.py

@ -1,17 +1,3 @@
"""
Tento soubor slouží k definici databázového modelu.
Třídy rozšiřují většinou :class:`django.db.models.Model` a jejich atributy jsou
většinou sloupce v databázi (tj. nastaví se na hodnotu něčeho z :mod:`django.db.models`).
Na výběr jsou:
- :class:`django.db.models.TextField`
- :class:`django.db.models.ForeignKey`
- :class:`django.db.models.DateField`
- :class:`django.db.models.DateTimeField`
- :class:`django.db.models.ImageField`
- :class:`django.db.models.CharField`
"""
from django.core.exceptions import ValidationError
from django.db import models
from django.utils import timezone

11
korektury/TODO

@ -1,11 +0,0 @@
- korektura potrebuje reakci
+ komentáře fixně na username
- používat skutečné jméno?
- vyžádat pozornost autora obsahu
- zvednout upload limit na 5MB
- sbalit a rozbalit korekturu
- nahrávání jiných věcí než PDF - kontrolovat?
- stylování
- seznam PDF - co zobrazovat?

16
korektury/admin.py

@ -1,13 +1,3 @@
"""
Soubor sloužící k definici toho, co bude v adminu. Většinou pouhým zavoláním
funkce :func:`django.contrib.admin.site.register`, v případě, že chceme něco
upravit, tak jako třída rozšiřující :class:`django.contrib.admin.ModelAdmin`
s dekorátorem :func:`django.contrib.admin.register`.
Zde se definuje admin pro:
- :class:`korektury.models.KorekturovanePDF`
"""
from django.contrib import admin
from reversion.admin import VersionAdmin
from korektury.models import KorekturovanePDF
@ -15,7 +5,6 @@ from korektury.models import KorekturovanePDF
from django.core.mail import EmailMessage
from django.urls import reverse
# Register your models here.
class KorekturovanePDFAdmin(VersionAdmin):
"""
nastaví čas vložení (:attr:`~koretkury.models.KorekturovanePDF.cas`) a počet
@ -36,12 +25,13 @@ class KorekturovanePDFAdmin(VersionAdmin):
fieldsets = [
(None,
{'fields':
['pdf', 'cas', 'org', 'stran', 'nazev', 'komentar', 'poslat_mail']}),
['pdf', 'cas', 'stran', 'nazev', 'orgove', 'komentar', 'poslat_mail']}),
# (u'PDF', {'fields': ['pdf']}),
]
list_display = ['nazev', 'cas', 'stran', 'org']
list_display = ['nazev', 'cas', 'stran']
list_filter = []
search_fields = []
autocomplete_fields = ['orgove']
def save_model(self, request, obj, form, change):
"""

10
korektury/forms.py

@ -1,13 +1,3 @@
"""
Formuláře (:class:`django.forms.Form`) umožňují jednoduchou tvorbu formulářů,
které lze pak jednoduše dát do frontendu i zpracovat na backendu.
Pro přidání políčka do formuláře je potřeba
- mít v modelu tu položku, kterou chci upravovat
- přidat do views (prihlaskaView, resitelEditView)
- přidat do forms
- includovat do html
"""
from django import forms
class OpravaForm(forms.Form):

1
korektury/migrations/0001_initial.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
korektury/migrations/0002_auto_20151202_2351.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
korektury/migrations/0003_auto_20151204_1855.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
korektury/migrations/0004_auto_20151204_2240.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
korektury/migrations/0005_auto_20151204_2244.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
korektury/migrations/0006_oprava_pdf.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
korektury/migrations/0007_auto_20151225_1237.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
korektury/migrations/0008_auto_20151229_1556.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

1
korektury/migrations/0009_trizeni_korektur_v_seznamu.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

1
korektury/migrations/0010_Pridani_odkazu_na_organizatora.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

1
korektury/migrations/0011_prevod_autora_z_charField_na_Organizator.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

1
korektury/migrations/0012_delete_autor.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

1
korektury/migrations/0013_rename_autor_org.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

1
korektury/migrations/0014_add_org_to_pdf.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

1
korektury/migrations/0015_auto_20161004_2005.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models

1
korektury/migrations/0016_auto_20190430_2340.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-04-30 21:40
from __future__ import unicode_literals

1
korektury/migrations/0017_auto_20190610_2358.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.21 on 2019-06-10 21:58
from __future__ import unicode_literals

18
korektury/migrations/0020_lepsi_popis_nazvu_PDF_v_adminu.py

@ -0,0 +1,18 @@
# Generated by Django 2.2.28 on 2023-06-19 19:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('korektury', '0019_auto_20221205_2014'),
]
operations = [
migrations.AlterField(
model_name='korekturovanepdf',
name='nazev',
field=models.CharField(help_text='Název (např. `22.1 | analyza v4` nebo `propagace | letacek v0`) korekturovaného PDF', max_length=50, verbose_name='název PDF'),
),
]

13
korektury/migrations/0021_auto_20240312_2124.py

@ -0,0 +1,13 @@
# Generated by Django 4.2.8 on 2024-03-12 20:24
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('korektury', '0020_lepsi_popis_nazvu_PDF_v_adminu'),
]
operations = [
]

30
korektury/migrations/0022_alter_komentar_autor_alter_korekturovanepdf_org_and_more.py

@ -0,0 +1,30 @@
# Generated by Django 4.2.11 on 2024-03-19 21:35
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('personalni', '0003_initial'),
('korektury', '0021_auto_20240312_2124'),
]
operations = [
migrations.AlterField(
model_name='komentar',
name='autor',
field=models.ForeignKey(blank=True, help_text='Autor komentáře', null=True, on_delete=django.db.models.deletion.SET_NULL, to='personalni.organizator'),
),
migrations.AlterField(
model_name='korekturovanepdf',
name='org',
field=models.ForeignKey(blank=True, default=None, help_text='Zodpovědný organizátor za obsah', null=True, on_delete=django.db.models.deletion.SET_NULL, to='personalni.organizator'),
),
migrations.AlterField(
model_name='oprava',
name='autor',
field=models.ForeignKey(blank=True, help_text='Autor opravy', null=True, on_delete=django.db.models.deletion.SET_NULL, to='personalni.organizator'),
),
]

14
korektury/migrations/0023_personalni_post_migrate.py

@ -0,0 +1,14 @@
# Generated by Django 4.2.11 on 2024-03-26 21:25
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('korektury', '0022_alter_komentar_autor_alter_korekturovanepdf_org_and_more'),
('personalni', '0005_personalni_post_migrate'),
]
operations = [
]

41
korektury/migrations/0024_vic_orgu_k_pdf.py

@ -0,0 +1,41 @@
# Generated by Django 4.2.13 on 2024-06-11 23:53
from django.db import migrations, models
def pridej_orgy(apps, schema_editor):
PDF = apps.get_model('korektury', 'KorekturovanePDF')
for pdf in PDF.objects.all(): # Tohle by asi mělo jít udělat pomocí update, ale moc práce a rychlé hledání taky nepomohlo.
if pdf.org is not None: pdf.orgove.add(pdf.org)
pdf.save() # ig?
def vyber_orga(apps, schema_editor):
PDF = apps.get_model('korektury', 'KorekturovanePDF')
for pdf in PDF.objects.all():
orgove = pdf.orgove.all()
if len(orgove) > 1:
raise migrations.exceptions.IrreversibleError(f'PDF {pdf.id} má víc než jednoho zodpovědného orga, nejde odmigrovat na verzi, která umí jen jednoho.')
if len(orgove) == 0:
pdf.org = None
else:
pdf.org = orgove[0]
pdf.save()
class Migration(migrations.Migration):
dependencies = [
('personalni', '0011_osloveni_vsechny_choices'),
('korektury', '0023_personalni_post_migrate'),
]
operations = [
migrations.AddField(
model_name='korekturovanepdf',
name='orgove',
field=models.ManyToManyField(blank=True, default=None, help_text='Zodpovědní organizátoři za obsah (chodí jim maily o nových korekturách)', to='personalni.organizator'),
),
migrations.RunPython(pridej_orgy, vyber_orga),
migrations.RemoveField(
model_name='korekturovanepdf',
name='org',
),
]

26
korektury/models.py

@ -1,27 +1,12 @@
"""
Tento soubor slouží k definici databázového modelu.
Třídy rozšiřují většinou :class:`django.db.models.Model` a jejich atributy jsou
většinou sloupce v databázi (tj. nastaví se na hodnotu něčeho z :mod:`django.db.models`).
Na výběr jsou:
- :class:`django.db.models.TextField`
- :class:`django.db.models.ForeignKey`
- :class:`django.db.models.DateField`
- :class:`django.db.models.DateTimeField`
- :class:`django.db.models.ImageField`
- :class:`django.db.models.CharField`
"""
import os
from django.db import models
from django.utils import timezone
from django.conf import settings
from django.utils.encoding import force_text
from django.core.exceptions import ObjectDoesNotExist
from django.utils.functional import cached_property
from django.utils.text import get_valid_filename
from seminar.models import Organizator
from personalni.models import Organizator
import subprocess
from reversion import revisions as reversion
@ -41,7 +26,6 @@ def generate_filename(self, filename):
clean)
return os.path.join(settings.KOREKTURY_PDF_DIR, fname)
#@reversion.register(ignore_duplicates=True)
class KorekturovanePDF(models.Model):
class Meta:
@ -55,15 +39,15 @@ class KorekturovanePDF(models.Model):
cas = models.DateTimeField(u'čas vložení PDF',default=timezone.now,help_text = 'Čas vložení PDF')
nazev = models.CharField(u'název PDF',blank = False,max_length=50, help_text='Název (např. 22.1 verze 4) korekturovaného PDF')
nazev = models.CharField(u'název PDF',blank = False,max_length=50, help_text='Název (např. `22.1 | analyza v4` nebo `propagace | letacek v0`) korekturovaného PDF')
komentar = models.TextField(u'komentář k PDF',blank = True, help_text='Komentář ke korekturovanému PDF (např. na co se zaměřit)')
pdf = models.FileField(u'PDF', upload_to = generate_filename)
org = models.ForeignKey(Organizator, blank=True,
help_text='Zodpovědný organizátor za obsah',
null=True, default=None, on_delete=models.SET_NULL)
orgove = models.ManyToManyField(Organizator, blank=True,
help_text='Zodpovědní organizátoři za obsah (chodí jim maily o nových korekturách)',
default=None)
stran = models.IntegerField(u'počet stran', help_text='Počet stran PDF',
default=0)

3
korektury/tests.py

@ -1,3 +0,0 @@
from django.test import TestCase
# Create your tests here.

10
korektury/urls.py

@ -1,13 +1,5 @@
"""
Soubor sloužící jako router, tj. zde se definují url adresy a na co ukazují:
- ``korektury/`` (korektury_list) :class:`~korektury.views.KorekturySeskupeneListView`
- ``korektury/neseskupene/`` (korektury_neseskupene_list) :class:`~korektury.views.KorekturyAktualniListView`
- ``korektury/zastarale/`` (korektury_stare_list) :class:`~korektury.views.KorekturyZastaraleListView`
- ``korektury/<int:pdf>/`` (korektury) :class:`~korektury.views.KorekturyView`
"""
from django.urls import path
from seminar.utils import org_required
from personalni.utils import org_required
from . import views
urlpatterns = [

19
korektury/views.py

@ -1,11 +1,5 @@
"""
Soubor sloužící k deklaraci jednotlivých views (nejčastěji funkce beroucí request
a vracející :func:`django.shortcuts.render` respektive nějakou response, nebo
třídy většinou rozšiřující nějakou třídu z :mod:`django.views.generic`)
"""
from django.shortcuts import get_object_or_404, render
from django.views import generic
from django.utils.translation import ugettext as _
from django.conf import settings
from django.http import HttpResponseForbidden
from django.core.mail import EmailMessage
@ -189,9 +183,9 @@ class KorekturyView(generic.TemplateView):
if email_komentujiciho:
emails.add(email_komentujiciho)
# zodpovedny org
if oprava.pdf.org:
email_zobpovedny = oprava.pdf.org.osoba.email
# zodpovedni orgove
for org in oprava.pdf.orgove.all():
email_zobpovedny = org.osoba.email
if email_zobpovedny:
emails.add(email_zobpovedny)
@ -200,13 +194,6 @@ class KorekturyView(generic.TemplateView):
if email:
emails.discard(email)
if not settings.POSLI_MAILOVOU_NOTIFIKACI:
print("Poslal bych upozornění na tyto adresy: ", " ".join(emails))
print("---- Upozornění:")
print(text)
print("---- Konec upozornění")
return
EmailMessage(
subject=subject,
body=text,

2
make/init_local

@ -7,5 +7,5 @@ make/install_web
ensure_venv
./manage.py testdata
./manage.py loaddata data/*
make/sync_prod_flatpages
#make/sync_prod_flatpages
./manage.py load_org_permissions deploy_v2/admin_org_prava.json

18
mamweb/admin.py

@ -35,15 +35,25 @@ locale.setlocale(locale.LC_COLLATE, 'cs_CZ.UTF-8')
# https://books.agiliq.com/projects/django-admin-cookbook/en/latest/set_ordering.html
# FIXME zpraseno pomocí toho, že Python umí bez problému přepisovat funkce
def get_app_list(self, request):
def get_app_list(self, request, app_label=None):
"""
Return a sorted list of all the installed apps that have been
registered in this site.
"""
app_dict = self._build_app_dict(request)
# Sort the apps alphabetically.
app_list = sorted(app_dict.values(), key=lambda x: locale.strxfrm('!') if (x['name'] == "Seminar") else locale.strxfrm(x['name'].lower()))
app_dict = self._build_app_dict(request, label=app_label)
aplikace_nahore = [
'seminar',
'personalni',
'novinky',
'korektury',
'various',
'prednasky',
'soustredeni',
]
# Odhlášený admin má prázdný app_dict :-/
app_list = [app_dict[label] for label in aplikace_nahore if label in app_dict] + [app_dict[label] for label in app_dict if label not in aplikace_nahore]
# Sort the models alphabetically within each app.
for app in app_list:

88
mamweb/middleware.py

@ -1,88 +0,0 @@
from datetime import datetime, date
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect
class LoggedInHintCookieMiddleware(object):
"""Middleware to securely help with 'logged-in' detection for dual HTTP/HTTPS sites.
On insecure requests: Checks for a (non-secure) cookie settings.LOGGED_IN_HINT_COOKIE_NAME
and if present, redirects to HTTPS (same adress).
Note this usually breaks non-GET (POST) requests.
On secure requests: Updates cookie settings.LOGGED_IN_HINT_COOKIE_NAME to reflect
whether an user is logged in in the current session (cookie set to 'True' or cleared).
The cookie is set to expire at the same time as the sessionid cookie.
By default, LOGGED_IN_HINT_COOKIE_NAME = 'logged_in_hint'.
"""
def __init__(self):
if hasattr(settings, 'LOGGED_IN_HINT_COOKIE_NAME'):
self.cookie_name = settings.LOGGED_IN_HINT_COOKIE_NAME
else: self.cookie_name = 'logged_in_hint'
self.cookie_value = 'True'
def cookie_correct(self, request):
return self.cookie_name in request.COOKIES and request.COOKIES[self.cookie_name] == self.cookie_value
def process_request(self, request):
if not request.is_secure():
if self.cookie_correct(request):
# redirect insecure (assuming http) requests with hint cookie to https
url = request.build_absolute_uri()
assert url[:5] == 'http:'
return HttpResponseRedirect('https:' + url[5:])
return None
def process_response(self, request, response):
if request.is_secure():
# assuming full session info (as the conn. is secure)
try:
user = request.user
except AttributeError: # no user - ajax or other special request
return response
if user.is_authenticated():
if not self.cookie_correct(request):
expiry = None if request.session.get_expire_at_browser_close() else request.session.get_expiry_date()
response.set_cookie(self.cookie_name, value=self.cookie_value, expires=expiry, secure=False)
else:
if self.cookie_name in request.COOKIES:
response.delete_cookie(self.cookie_name)
return response
class vzhled:
def process_request(self, request):
return None
def process_view(self, request, view_func, view_args, view_kwargs):
#print "====== process_request ======"
#print view_func
#print view_args
#print view_kwargs
#print "============================="
return None
def process_template_response(self, request, response):
hodin = datetime.now().hour
if (hodin <= 6) or (hodin >= 14): # TODO 20
response.context_data['noc'] = True
else:
response.context_data['noc'] = False
return response
def process_response(self, request, response):
#hodin = datetime.now().hour
#if (hodin <= 6) or (hodin >= 14): # TODO 20
#response.context_data['noc'] = True
#else:
#response.context_data['noc'] = False
return response
##def process_exception(request, exception):
#pass

21
mamweb/settings_common.py

@ -28,7 +28,6 @@ APPEND_SLASH = True
LANGUAGE_CODE = 'cs'
TIME_ZONE = 'Europe/Prague'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
@ -54,6 +53,9 @@ LOGIN_REDIRECT_URL = 'profil'
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
DOBA_ODHLASENI_PRI_ZASKRTNUTI_NEODHLASOVAT = 365 * 24 * 3600 # rok
# View pro chybu s CSRF tokenem (např. se sušenkami)
CSRF_FAILURE_VIEW = 'various.views.csrf.csrf_error'
# Modules configuration
AUTHENTICATION_BACKENDS = (
@ -66,9 +68,6 @@ MIDDLEWARE = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
# FIXME: rozbilo se při přechodu na Django 2.0, nevím, jestli
# se to dá zahodit bez náhrady
# 'mamweb.middleware.LoggedInHintCookieMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
@ -85,10 +84,10 @@ TEMPLATES = [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.request',
'django.contrib.messages.context_processors.messages',
'sekizai.context_processors.sekizai',
'header_fotky.context_processors.vzhled',
'various.context_processors.rozliseni',
'various.context_processors.april',
'various.context_processors.halloween',
)
},
},
@ -108,7 +107,6 @@ INSTALLED_APPS = (
'django.contrib.auth',
# Utilities
'sekizai',
'reversion',
'django_countries',
'solo',
@ -118,9 +116,6 @@ INSTALLED_APPS = (
'dal',
'dal_select2',
'crispy_forms',
'django_comments',
'django.contrib.flatpages',
'django.contrib.humanize',
@ -137,6 +132,7 @@ INSTALLED_APPS = (
# MaMweb
'mamweb',
'seminar',
'tvorba',
'galerie',
'korektury',
'prednasky',
@ -150,6 +146,9 @@ INSTALLED_APPS = (
'personalni',
'soustredeni',
'treenode',
'vyroci',
'sifrovacka',
'novinky',
# Admin upravy:
@ -345,10 +344,6 @@ KOREKTURY_IMG_DIR = os.path.join('korektury', 'img')
CISLO_IMG_DIR = os.path.join('cislo', 'img')
# E-MAIL NOTIFICATIONS
POSLI_MAILOVOU_NOTIFIKACI = False
# Logování chyb
class InvalidTemplateVariable(str):

12
mamweb/settings_prod.py

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
import os.path
#
@ -20,15 +18,18 @@ INSTALLED_APPS += (
)
# SECURITY WARNING: keep the secret key used in production secret!
assert not SECRET_KEY.startswith('12345')
# `'DOCUTILSCONFIG' in os.environ` kvůli sphinxu
# FIXME zjistit, zda je bezpečné a zda se to nedá udělat lépe
assert 'DOCUTILSCONFIG' in os.environ or not SECRET_KEY.startswith('12345')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
TEMPLATE_DEBUG = False
ALLOWED_HOSTS = ['mam.mff.cuni.cz', 'www.mam.mff.cuni.cz', 'atrey.karlin.mff.cuni.cz',
'mamweb.bezva.org','gimli.ms.mff.cuni.cz']
ALLOWED_HOSTS = ['mam.mff.cuni.cz', # Hlavní a asi jediná funkční adresa
'mam.matfyz.cz', # Ne že by se tohle použilo, ale pro potenciální případ změny…
]
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
@ -67,5 +68,4 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/
# E-MAIL NOTIFICATIONS
POSLI_MAILOVOU_NOTIFIKACI = True
LOCAL_TEST_PROD = "prod"

8
mamweb/settings_test.py

@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-
import os.path
#
@ -32,7 +30,10 @@ DEBUG = True
TEMPLATES[0]['OPTIONS']['debug'] = True
ALLOWED_HOSTS = ['*.mam.mff.cuni.cz', 'atrey.karlin.mff.cuni.cz', 'mam.mff.cuni.cz', 'mam-test.kam.mff.cuni.cz', 'gimli.ms.mff.cuni.cz', 'mam-test.ks.matfyz.cz']
ALLOWED_HOSTS = [
'mam-test.ks.matfyz.cz',
'*.mam.mff.cuni.cz', # Asi se nikdy nepoužije…
]
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
@ -71,7 +72,6 @@ LOGGING['handlers']['registration_error_log']['filename'] = '/home/mam-web/logs/
FILE_UPLOAD_PERMISSIONS = 0o440
# Testování e-mailů
POSLI_MAILOVOU_NOTIFIKACI = True
EMAIL_BACKEND = 'various.mail_prefixer.PrefixingMailBackend'
# TODO Pouze na otestování testu… Zvolit konferu!
# XXX: Je to pole, protože implementační detail backendu.

12068
mamweb/static/bootstrap/css/bootstrap.css

File diff suppressed because it is too large

6314
mamweb/static/bootstrap/js/bootstrap.bundle.js

File diff suppressed because it is too large

102
mamweb/static/css/base.css

@ -0,0 +1,102 @@
@charset "utf-8"; /* vynuť utf-8 */
/* Obecné styly pro html tagy */
@font-face {
font-family: 'OpenSans';
src: url("../fonts/OpenSans/OpenSans-Regular.ttf");
font-weight: normal;
}
/* https://fontzone.net/font-details/qtghoulface-regular doplněný o diakritiku pomocí FontForge*/
@font-face {
font-family: 'GhoulFace';
src: url("../fonts/ghoul/ghoul.ttf");
font-weight: normal;
}
body {
font-size: 14px;
font-family: 'OpenSans';
background-color: var(--barva-pozadi);
min-height: 100%;
}
p {
/* zarovnání odstavců do bloku */
text-align: justify;
}
/**** NADPISY ****/
h1, h2, h3, h4 { color: var(--tmava-oranzova); }
h5, h6 { color: black; }
h1, h2, h3, h4, h5, h6 {
font-variant: small-caps;
font-weight: bold;
}
/* TODO: odlišit 1 a 2 */
h1 { font-size: 200%; }
h2 { font-size: 200%; }
h3 { font-size: 160%; }
h4 { font-size: 140%; }
h5 { font-size: 140%; }
h6 { font-size: 120%; }
h1 {
margin-top: 0;
}
/*****************/
/**** TLAČÍTKA ****/
a {
color: var(--tmava-oranzova);
text-decoration: none;
}
a:focus, a:hover, a:active {
color: var(--hlavni-oranzova);
}
.button {
margin: 10px 0 10px 0;
padding: 4px 0; /*vertikální centování textu*/
text-align: center;
background-color: var(--hlavni-oranzova);
color: var(--barva-pozadi);
font-size: 150%;
font-weight: bold;
font-variant: small-caps;
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));
&:hover {
position: relative;
top: 2px;
left: 2px;
background-color: #df490e;
}
}
/******************/
/**** Další ****/
input[type="file"] {
max-width: 250px;
text-overflow: ellipsis;
}
/***************/
/**** Divné (aneb nevím, co bylo cílem) ****/
h1 a:hover {
text-decoration: none;
}
img {
filter: drop-shadow(0px 3px 3px rgba(0, 0, 0, 0.4));
max-width: 100%;
height: auto;
}
/*******************************************/

469
mamweb/static/css/bootstrap-theme.css

@ -1,469 +0,0 @@
/*!
* Bootstrap v3.3.1 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
}
.btn-default:active,
.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default.active,
.btn-primary.active,
.btn-success.active,
.btn-info.active,
.btn-warning.active,
.btn-danger.active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.btn-default .badge,
.btn-primary .badge,
.btn-success .badge,
.btn-info .badge,
.btn-warning .badge,
.btn-danger .badge {
text-shadow: none;
}
.btn:active,
.btn.active {
background-image: none;
}
.btn-default {
text-shadow: 0 1px 0 #fff;
background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #dbdbdb;
border-color: #ccc;
}
.btn-default:hover,
.btn-default:focus {
background-color: #e0e0e0;
background-position: 0 -15px;
}
.btn-default:active,
.btn-default.active {
background-color: #e0e0e0;
border-color: #dbdbdb;
}
.btn-default:disabled,
.btn-default[disabled] {
background-color: #e0e0e0;
background-image: none;
}
.btn-primary {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #245580;
}
.btn-primary:hover,
.btn-primary:focus {
background-color: #265a88;
background-position: 0 -15px;
}
.btn-primary:active,
.btn-primary.active {
background-color: #265a88;
border-color: #245580;
}
.btn-primary:disabled,
.btn-primary[disabled] {
background-color: #265a88;
background-image: none;
}
.btn-success {
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #3e8f3e;
}
.btn-success:hover,
.btn-success:focus {
background-color: #419641;
background-position: 0 -15px;
}
.btn-success:active,
.btn-success.active {
background-color: #419641;
border-color: #3e8f3e;
}
.btn-success:disabled,
.btn-success[disabled] {
background-color: #419641;
background-image: none;
}
.btn-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #28a4c9;
}
.btn-info:hover,
.btn-info:focus {
background-color: #2aabd2;
background-position: 0 -15px;
}
.btn-info:active,
.btn-info.active {
background-color: #2aabd2;
border-color: #28a4c9;
}
.btn-info:disabled,
.btn-info[disabled] {
background-color: #2aabd2;
background-image: none;
}
.btn-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #e38d13;
}
.btn-warning:hover,
.btn-warning:focus {
background-color: #eb9316;
background-position: 0 -15px;
}
.btn-warning:active,
.btn-warning.active {
background-color: #eb9316;
border-color: #e38d13;
}
.btn-warning:disabled,
.btn-warning[disabled] {
background-color: #eb9316;
background-image: none;
}
.btn-danger {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-color: #b92c28;
}
.btn-danger:hover,
.btn-danger:focus {
background-color: #c12e2a;
background-position: 0 -15px;
}
.btn-danger:active,
.btn-danger.active {
background-color: #c12e2a;
border-color: #b92c28;
}
.btn-danger:disabled,
.btn-danger[disabled] {
background-color: #c12e2a;
background-image: none;
}
.thumbnail,
.img-thumbnail {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
background-color: #e8e8e8;
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
background-color: #2e6da4;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.navbar-default {
background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .active > a {
background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
}
.navbar-brand,
.navbar-nav > li > a {
text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.navbar-inverse {
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a {
background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
}
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
}
@media (max-width: 767px) {
.navbar .navbar-nav .open .dropdown-menu > .active > a,
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #fff;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
}
.alert {
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
}
.alert-success {
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
background-repeat: repeat-x;
border-color: #b2dba1;
}
.alert-info {
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
background-repeat: repeat-x;
border-color: #9acfea;
}
.alert-warning {
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
background-repeat: repeat-x;
border-color: #f5e79e;
}
.alert-danger {
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
background-repeat: repeat-x;
border-color: #dca7a7;
}
.progress {
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-success {
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-info {
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-warning {
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-danger {
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.list-group {
border-radius: 4px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
text-shadow: 0 -1px 0 #286090;
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
background-repeat: repeat-x;
border-color: #2b669a;
}
.list-group-item.active .badge,
.list-group-item.active:hover .badge,
.list-group-item.active:focus .badge {
text-shadow: none;
}
.panel {
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.panel-default > .panel-heading {
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.panel-primary > .panel-heading {
background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.panel-success > .panel-heading {
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
background-repeat: repeat-x;
}
.panel-info > .panel-heading {
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
background-repeat: repeat-x;
}
.panel-warning > .panel-heading {
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
background-repeat: repeat-x;
}
.panel-danger > .panel-heading {
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
background-repeat: repeat-x;
}
.well {
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
background-repeat: repeat-x;
border-color: #dcdcdc;
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
}

6331
mamweb/static/css/bootstrap.css

File diff suppressed because it is too large

16
mamweb/static/css/constants.css

@ -0,0 +1,16 @@
@charset "utf-8"; /* vynuť utf-8 */
/* Konstanty (převážně barvy) pro užití v dalších css */
:root {
--hlavni-oranzova: #e84e10;
--tmava-oranzova: #6f2509;
--svetla-oranzova: #f9d59e;
--svetlounka-oranzova: rgb(253, 237, 213);
--orgovska-fialova: #6a0043;
--orgovska-svetla-fialova: #eee4ec;
--barva-pozadi: #fffbf6;
}

581
mamweb/static/css/layout.css

@ -0,0 +1,581 @@
@charset "utf-8"; /* vynuť utf-8 */
/* Rozložení webu a jeho prvky (hlavička, menu, footer) */
:root {
--footer-height: 200px;
--login-bar-height: 20px;
}
/**** KONTEJNER ****/
div.kontejner {/* Ne container, aby se to netlouklo s bootstrapem. */
width: 970px;
margin: auto;
min-height: 100vh;
position: relative;
padding: 0;
.org-logged-in & {
margin-top: var(--login-bar-height);
}
div.kontent-wrapper {
padding-bottom: var(--footer-height);
div.kontent {
padding: 15px 30px;
}
}
}
/* Roztáhne obsah z containeru na celou šířku obrazovky: */
.full_width {
width: 100vw;
margin-left: calc(-50vw + 485px);
/* Na úzkém displeji nechceme nic dělat. */
@media(max-width: 860px) {
margin-left: 0;
width: unset;
}
}
/*******************/
/**** HLAVIČKA ****/
#title { /*dělá blbosti šířka, je to kvůli fixed pozici, zatím natvrdo, vyřešit*/
height: 55px;
width: 970px;
position: fixed;
z-index: 2048;
background-color: var(--hlavni-oranzova);
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));
font-size: 28px;
color: var(--barva-pozadi);
font-weight: 400;
font-variant: small-caps;
text-align: center;
text-decoration: none;
padding-top: 8px;
text-shadow: none;
}
#header {
position: relative;
background: url("../images/header/vikendovka.jpg") no-repeat center top; /* poměr 350:970, TODO: aby to nemuselo být přesně na pixely */
background-size: 100%;
top: 58px;
img.logo {
width: 100%;
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));
}
img.logo-mobile {
display: none;
}
.no-mobile {
background-size: contain;
}
}
/******************/
/**** Footer ****/
#footer {
position: absolute;
bottom: 0;
width: 100%;
background: url("../images/mozaika-footer.svg") no-repeat top center;
height: var(--footer-height);
background-size: 100%;
filter: drop-shadow(5px 0px 5px rgba(0, 0, 0, 0.4));
padding-top: 3.5%;
p.license {
text-align: center;
font-weight: 400;
bottom: 0;
a {
color: #333;
}
}
@media (max-width: 650px) {
display: none;
}
}
p.license-mobile {
display: none;
margin-bottom: 0;
@media (max-width: 650px) {
position: relative;
display: block;
font-size: 90%;
background-color: var(--hlavni-oranzova);
padding: 5%;
text-align: justify;
}
}
/****************/
/**** LOGIN BAR ****/
div.login-bar {
background: var(--orgovska-fialova);
color: var(--svetla-oranzova);
width: 100%;
position: fixed;
margin-top: calc(-1 * var(--login-bar-height));
min-height: var(--login-bar-height);
z-index: 4086;
padding-left: 5px;
padding-right: 5px;
div {
display: inline;
}
a.LOGIN-ref-admin {
display: inline;
color: var(--barva-pozadi);
}
.LOGIN_napis-webarum {
display: inline;
color: var(--barva-pozadi);
float: right;
a {
color: var(--svetla-oranzova);
text-decoration: underline;
}
}
}
/*******************/
/* stránka přes celý displej */
@media (max-width: 970px) {
div.kontejner {
width: 100%;
}
#title {
width: 100%;
text-align: center;
}
#header {
background-size: 100%;
img.logo {
width: 100%;
}
}
#footer {
width: 100%;
}
}
/* malý tablet, mobil */
@media (max-width: 650px) {
#hide-if-small.login-bar-flatpage {
display: none;
}
#title {
display: none;
}
#header {
width: 100%;
top: 0;
background-image: none;
img.logo {
display: none;
}
img.logo-mobile {
display: block;
top: 0;
left: 0;
width: 100%;
filter: drop-shadow(0px 0 5px rgba(0, 0, 0, 0.4));
margin-bottom: 3px;
}
.no-mobile{
display: none;
}
}
}
/**** MENU ****/
ul.menu_mobile {
display: none;
}
nav.nav-button {
display: none;
}
ul.menu {
width: 100%;
padding: 0;
margin-top: -5px; /* posune celé menu nahoru (pak potřeba zvětšit mezeru mezi menu a submenu) */
font-variant: small-caps;
a {
text-decoration: none;
font-weight: bold;
font-size: 105%;
}
li {
margin: 0;
display: inline-block;
width: 16.666667%;
text-align: center;
font-size: 140%;
font-weight: 400;
>a:hover, >a:active {
color: black;
}
&.active>a {
color: var(--svetla-oranzova);
}
}
ul.submenu {
background-color: var(--hlavni-oranzova);
margin-top: 10px; /* mezera mezi hlavním menu a submenu */
margin-bottom: 10px;
padding-top: 10px;
padding-bottom: 5px;
filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.4));
z-index: 50;
font-weight: 400;
li {
width: auto;
padding: 0 20px 0 20px;
display: inline-block;
>a {
color: var(--svetla-oranzova);
text-decoration: none;
text-shadow: none;
:hover {
color: black;
}
}
}
}
ul.submenu li.active>a, .parentactive ul li:first-child>a {
color: black;
}
}
@media (max-width: 970px) {
ul.menu {
font-size: 90%;
margin-top: -7px;
li {
margin-top: 10px; /* posunutí textu hlavního menu níže */
}
}
ul.submenu {
margin-top: 8px; /* mezera mezi hlavním menu a submenu */
li {
margin-top: 0; /* aby se spolu s textem hlavního menu neposunoval níže i text submenu */
}
}
}
@media(max-width: 800px) {
ul.menu {
font-size: 80%;
margin-top: -2px;
li {
margin-top: 10px; /* posunutí textu hlavního menu níže */
}
}
ul.submenu {
margin-top: 8px; /* mezera mezi hlavním menu a submenu */
li {
margin-top: 0; /* aby se spolu s textem hlavního menu neposunoval níže i text submenu */
}
}
}
@media (max-width: 650px) {
ul.menu {
display: none;
}
ul.menu_mobile {
display: block;
z-index: 10;
position: sticky;
font-variant: small-caps;
font-size: 150%;
font-weight: bold;
list-style-type: none;
padding-top: 3px;
padding-bottom: 3px;
padding-left: 12px;
a {
&:active, &:hover, &:focus {
text-decoration: none;
color: black;
}
}
ul {
list-style-type: none;
font-size: 90%;
color: black; /*černé šipky submenu*/
li {
> a {
color: black;
}
&::before {
content: ' \276D '; /*https://www.w3schools.com/cssref/css_entities.asp*/
}
}
}
br {
display: none;
}
}
nav.nav-button {
display: block;
position: sticky;
position: -webkit-sticky;
top: 0;
z-index: 10;
}
#navbar-content {
background-color: var(--hlavni-oranzova);
}
button.navbar-button {
color: #f9d59e;
background-color: var(--hlavni-oranzova);
font-variant: small-caps;
font-size: 160%;
border-radius: 0;
border-width: 0;
width: 100%;
text-align: right;
}
button.navbar-button span::after {
content: ' \2261 ';
font-size: 120%;
}
li.dropdown div.submenu_mobile {
display: none;
--bs-dropdown-bg: var(--hlavni-oranzova);
}
li.dropdown div.submenu_mobile.show {
display: block;
}
} /* konec @media */
/**************/
/**** ROZLIŠENÍ MEZI LOKÁLNÍM, TESTOVACÍM A PRODUKČNÍM WEBEM ****/
body.localweb, body.testweb, body.suprodweb {
&:before, &:after {
content: "";
position: fixed;
width: 20px;
height: 100%;
top: 0;
z-index: -1000;
}
&:before { left: 0; }
&:after { right: 0; }
}
body.localweb { &:before, &:after { background: greenyellow; } }
body.testweb { &:before, &:after { background: darkorange; } }
body.suprodweb { &:before, &:after { background: red; } }
/****************************************************************/
/**** ZBYTEK ****/
/* (konkrétní stránky) */
/* Titulní stránka */
.titulnistrana {
display: flex;
text-align: justify;
@media(max-width: 800px){
display: block;
}
h1 { text-align: center; }
.TITULNI_STRANA_zjistit_vic{
text-align: center;
margin-bottom: 30px;
hr {
display: none;
@media(max-width: 800px){
display: flex;
}
}
}
.TITULNI_STRANA_graf {
@media(max-width: 800px) {
padding-top: 40px;
}
.TITULNI_STRANA_graf-svg {
display: flex;
#svg-graf {
width: 100%;
height: auto;
margin: 30px;
@media(max-width: 800px){
max-width: 500px;
padding: 10px;
margin: auto;
}
}
}
}
.TITULNI_STRANA_obsah {
width: 66%;
@media(max-width: 800px){
width: 100%;
}
}
.TITULNI_STRANA_vitej_titulka, .TITULNI_STRANA_temata_titulka {
width: 49%;
padding: 10px;
display: table-cell;
@media (max-width: 650px) {
width: 100%;
display: block;
}
}
.TITULNI_STRANA_novinky {
width: 33%;
padding: 10px;
@media(max-width: 800px){
width: 100%;
max-width: 500px;
margin: auto;
}
}
}
div.org-text {
font-style: italic;
}
div.odpocet {
margin: 20px;
text-align: center;
}
/* Stránky Aktuální ročník */
.stranka_aktualni_zadani {
text-align: center;
#AKTUALNI_ZADADNI_obrazek {
margin-top: 15px;
}
div.AKTUALNI_ZADANI_termin {
text-align: center;
font-size: large;
font-weight: bold;
@media (max-width: 420px) {
font-size: small;
}
.AKTUALNI_ZADANI_datum {
color: var(--hlavni-oranzova);
margin: 0;
}
}
}
#obrazek_cisla_archiv {
text-align: center;
margin: 10px;
}
/* Stránka Jak řešit */
.jakresit svg {
width: 33%;
padding: 10px;
filter: none;
@media(max-width: 860px) {
margin: auto;
display: grid;
width: 100%;
max-width: 360px;
}
}

38
mamweb/static/css/mamweb-dev.css

@ -1,38 +0,0 @@
/*
.pink {
background-color: #ffc0cb;
}
div.borderized {
border-style: solid;
border-radius: 5px;
padding: 5px;
padding-right: 20px;
}
div.tnmenu {
float: right;
margin-right: 0px;
}
div.parent {
border-width: 2px;
}
div.children {
border-width: 1px;
}
div.node_type {
background-color: #d4d4d4;
}
.hidden-tn {
display: none;
}
/*test*/
h1 {
color: chartreuse;
}

1257
mamweb/static/css/mamweb.css

File diff suppressed because it is too large

488
mamweb/static/css/modules.css

@ -0,0 +1,488 @@
@charset "utf-8"; /* vynuť utf-8 */
/* Bloky použité na webu */
.horizonatlni_scrollovani { overflow-x: auto; }
/* Používá se pro podproblémy ve výsledkovkách -- zesvětlí se daný sloupec */
.zesvetleni { color: gray; }
/**** OZNAČENÍ NE-PUBLIC ČÁSTÍ ****/
.mam-org-only {
background: var(--orgovska-svetla-fialova);
padding: 10px;
margin: 10px -10px;
border: var(--orgovska-fialova) 2px dashed;
& .mam-org-only {
border: 0;
}
&li {
padding: 3px 0;
margin: -2px 0;
}
}
/**********************************/
/**** ZAŠKRTÁVÁTKO ****/
/* Select2 používaný hlavně multiple selectem. Přidání checkboxů a změna barvy. */
/* Podle https://stackoverflow.com/a/48290544 */
/* U autocomplete.ModelSelect2Multiple vyžaduje 'data-dropdown-css-class': 's2m-se-zaskrtavatky' */
.s2m-se-zaskrtavatky .select2-results__option[aria-selected=true]:before {
content: '☑ ';
padding: 0 0 0 8px;
}
.s2m-se-zaskrtavatky .select2-results__option[aria-selected=false]:before {
content: '◻ ';
padding: 0 0 0 8px;
}
/* Oranžové zvýraznění v Select2 */
.select2-results__option--highlighted {
background-color: var(--hlavni-oranzova) !important;
}
/**********************/
/**** OTÁČECÍ KARTY ****/
/* (orgové, archiv) */
.flip-card {
perspective: 1000px; /* Remove this if you don't want the 3D effect */
margin-left: auto;
margin-right: auto;
/* This container is needed to position the front and back side */
.flip-card-inner {
position: relative;
width: 100%;
height: 100%;
transition: transform 0.8s;
transform-style: preserve-3d;
}
/* Do an horizontal flip when you move the mouse over the flip box container */
&:hover .flip-card-inner {
transform: rotateY(180deg);
}
/* Position the front and back side */
.flip-card-front, .flip-card-back {
position: absolute;
width: 100%;
height: 100%;
-webkit-backface-visibility: hidden; /* Safari */
backface-visibility: hidden;
}
div.flip-card-foto, div.flip-card-foto img {
width: 100%;
height: 100%;
/* Pokud je na přední straně něco proklikávacího (třeba celá fotka), tak na dotykových zařízeních nemůže proklikávat, aby se dalo otáčet */
@media(hover: none) {
a { pointer-events: none; }
}
}
/* Style the back side */
.flip-card-back {
transform: rotateY(180deg);
padding: 10px;
padding-top: 20px;
}
}
.flip-card-back {
background-color: var(--svetla-oranzova);
color: black;
}
.otaceci_cisla .flip-card-back {
background-color: white;
color: unset;
}
/* Otáčecí karta musí mít kolem sebe nějaké místo a mívá nějaký nadpis */
.flip_card_container {
display: inline-block;
width: 30%;
min-width: 300px;
text-align: center;
}
/** Jednotlivá použití **/
.seznam_orgu, .seznam_archiv, .rozcestnik_temat {
text-align: center; /* zarovná karty na střed */
}
.seznam_orgu .flip-card {
width: 200px;
height: 250px;
}
.seznam_orgu .flip_card_container h3 {
margin-bottom: 0;
}
.seznam_archiv .flip-card {
width: 210px;
height: 298px;
}
.cisla-v-rocniku .flip-card {
width: 144px;
height: 205px;
}
.cisla-v-rocniku .flip_card_container {
width: 15%;
min-width: 165px;
padding: 10px;
}
.rozcestnik_temat .flip-card {
width: 300px;
height: 300px;
}
.rozcestnik_temat .flip_card_container {
width: 40%;
min-width: 350px;
padding-bottom: 20px;
}
/************************/
/* karty archiv */
div.popis_rocniku {
text-align: left;
font-weight: bold;
margin: 20px;
}
div.popis_rocniku a, div.cislo_odkazy a {
font-weight: bold;
color: unset;
}
div.popis_rocniku a:hover,
div.cislo_odkazy a:hover {
color: var(--tmava-oranzova);
}
div.cislo_odkazy ul {
margin: 0;
padding: 0;
}
/* karty orgů */
div.org_email {
margin-bottom: 10px;
font-weight: bold;
}
/***********************/
/**** TABULKY ****/
/** Tabulka s čárami mezi sloupci **/
/* Např. výsledkovky */
.tabulka_oramovane_sloupce {
border: solid 2px;
td, th {
&:first-child, &:first-child {
border-left: none;
border-right: solid 1px;
}
&:nth-child(2), &:nth-child(2) {
border-left: none;
}
padding: 0.1em 0.3em;
border-left: solid 1px;
}
thead { th, td {
border-bottom: solid 1px;
} }
}
/***********************************/
/** Tabulka se střídajícími se barvami řádků **/
/* Skoro jakákoliv tabulka kromě výsledkovek */
.barevna_tabulka {
td th {
padding: 1px 10px 1px 10px;
}
tbody tr:nth-child(even), thead tr {
background: var(--svetlounka-oranzova);
}
tbody tr:nth-child(odd) {
background: var(--barva-pozadi);
}
}
/**********************************************/
/** Tabulka, kde první řádek a sloupec je pořád vidět **/
/* Např. tabulka odevzdaných řešení, nebo výsledkovky */
.tabulka_s_uchycenym_radkem_a_sloupcem {
/* Omezí výšku a šířku, aby bylo příjemné na scrollování a zapne scrollování */
display: block;
width: fit-content; /* display: block; roztahuje na celou šířku */
max-height: 80vh;
overflow: auto;
max-width: 90%; /* (FIXME asi není potřeba u tabulek, co nejsou na celou obrazovku) */
margin-left: 5%; /* Vystředování (FIXME není potřeba u tabulek, co nejsou na celou obrazovku) */
border-collapse: separate; /* Pokud má tabulka orámování, je potřeba ho separovat, aby dodrželo position: sticky; */
border-spacing: 0;
/* Uchytí první řádek */
thead tr {
position: sticky;
top: 0;
z-index: 2;
}
/* Uchytí první sloupec */
td, th { &:first-child {
position: sticky;
left: 0;
background: inherit; /* (Snad) zneprůhlední první sloupec */
z-index: 1;
} }
}
/* (Snad) zneprůhlednění prvního řádku (a sloupce) FIXME: tohle je trochu hack a potenciálně může něco rozbít */
.tabulka_s_uchycenym_radkem_a_sloupcem,
.tabulka_s_uchycenym_radkem_a_sloupcem thead,
.tabulka_s_uchycenym_radkem_a_sloupcem tbody,
.tabulka_s_uchycenym_radkem_a_sloupcem tr,
.kontejner,
.kontent-wrapper,
.kontent
{
background: inherit;
}
/*******************************************************/
/** Tabulka mající všechna ohraničení **/
.plne_ohranicena_tabulka {
border-collapse: collapse;
tr { th, td {
border: 1px solid black;
padding: 1px 10px 1px 10px;
} }
}
/***************************************/
/** Tabulka odevzdaných a došlých řešení **/
.tabulka_doslych_reseni td {
min-width: 8em; /* Nastřeleno, aby se řádky s řešeními nezalamovaly. */
}
/******************************************/
/** Výsledkovky **/
.vysledkovka, .tabulka_oramovane_sloupce {
td, th {
&:first-child { position: unset; }
&:nth-child(2) {
border-right: solid 1px;
position: sticky;
left: 0;
background: inherit; /* (Snad) zneprůhlední druhý sloupec */
z-index: 1;
}
&:nth-child(3) {
border-left: none;
}
}
}
/*****************/
/** Tabulka mých (řešitelových) řešení **/
.moje_reseni tr {
th, td {
text-align: center;
}
td.problem { text-align: left; }
}
/* Různá šířka problému */
.odevzdanareseni_mid, .odevzdanareseni_small, .odevzdanareseni_mini { display: none; }
@media (max-width: 970px) {
.odevzdanareseni_big { display: none; }
.odevzdanareseni_mid { display: table-cell; }
}
@media(max-width: 800px) {
.odevzdanareseni_mid { display: none; }
.odevzdanareseni_small { display: table-cell; }
}
@media (max-width: 650px) {
.odevzdanareseni_small { display: none; }
.odevzdanareseni_mini { display: table-cell; }
}
/****************************************/
/** Detail řešení **/
.bodovani>input {
width: 4em;
&::placeholder {
color: lightgray;
opacity: 1;
}
&::-webkit-input-placeholder { /* Edge */
color: lightgray;
}
}
/* td obsahující křížek v detailu řešení se nesmí smrštit na 0 */
.td:has(.smazat_hodnoceni) {
min-width: 20px;
padding: 3px;
}
/*******************/
/*****************/
.novinka {
.novinka_obrazek {
margin: 10px 0 10px 0;
width: 100%;
}
.novinka_datum {
font-weight: bold;
}
.novinka_autor {
text-align: right;
font-style: italic;
}
}
/**** FORMULÁŘE ****/
/* přihláška a další formuláře */
table.form td, table.form tr {
table-layout: fixed;
word-wrap: break-word;
padding: 5px;
}
table#reseni.form td, table#reseni.form tr {
display: inline-table;
}
@media (max-width: 650px) {
table.form td, table.form tr {
display: inherit;
}
}
@media(max-width: 800px) {
table#reseni.form td, table#reseni.form tr {
display: inline-grid;
max-width: 300px;
}
}
.field-with-comment{
position:relative;
}
.field-comment{
display:none;
text-shadow: 0 1px 0 #fff;
background-color: #f0f0f0 ;
position:absolute;
z-index:100;
border-width:1px;
border-color: #dbdbdb;
border-style:solid;
border-radius: 5px;
padding:3px;
top:50px;
left:10px;
}
.field-with-comment:hover span.field-comment{
display: block;
}
input {
margin: 5px;
}
textarea.feedback {
margin: 5px;
}
ul.form {
list-style-type: none;
padding-left: 0;
}
label.field-label {
font-weight: normal;
}
label.field-required {
font-weight: bold;
}
.field-error {
font-size: 14px;
color: red;
}
ul.form li{
margin-bottom: 3px;
}
div.gdpr {
font-size: 6pt;
p {
font-size: 6pt;
margin-bottom: .66em;
}
}
/* registrace */
label[for=id_skola] {
font-weight: bold;
}
/*******************/

525
mamweb/static/css/prettyPhoto.css

@ -1,525 +0,0 @@
/* ------------------------------------------------------------------------
This you can edit.
------------------------------------------------------------------------- */
/* ----------------------------------
Default Theme
----------------------------------- */
div.pp_default .pp_top,
div.pp_default .pp_top .pp_middle,
div.pp_default .pp_top .pp_left,
div.pp_default .pp_top .pp_right,
div.pp_default .pp_bottom,
div.pp_default .pp_bottom .pp_left,
div.pp_default .pp_bottom .pp_middle,
div.pp_default .pp_bottom .pp_right { height: 13px; }
div.pp_default .pp_top .pp_left { background: url(../images/prettyPhoto/default/sprite.png) -78px -93px no-repeat; } /* Top left corner */
div.pp_default .pp_top .pp_middle { background: url(../images/prettyPhoto/default/sprite_x.png) top left repeat-x; } /* Top pattern/color */
div.pp_default .pp_top .pp_right { background: url(../images/prettyPhoto/default/sprite.png) -112px -93px no-repeat; } /* Top right corner */
div.pp_default .pp_content .ppt { color: #f8f8f8; }
div.pp_default .pp_content_container .pp_left { background: url(../images/prettyPhoto/default/sprite_y.png) -7px 0 repeat-y; padding-left: 13px; }
div.pp_default .pp_content_container .pp_right { background: url(../images/prettyPhoto/default/sprite_y.png) top right repeat-y; padding-right: 13px; }
div.pp_default .pp_content { background-color: #fff; } /* Content background */
div.pp_default .pp_next:hover { background: url(../images/prettyPhoto/default/sprite_next.png) center right no-repeat; cursor: pointer; } /* Next button */
div.pp_default .pp_previous:hover { background: url(../images/prettyPhoto/default/sprite_prev.png) center left no-repeat; cursor: pointer; } /* Previous button */
div.pp_default .pp_expand { background: url(../images/prettyPhoto/default/sprite.png) 0 -29px no-repeat; cursor: pointer; width: 28px; height: 28px; } /* Expand button */
div.pp_default .pp_expand:hover { background: url(../images/prettyPhoto/default/sprite.png) 0 -56px no-repeat; cursor: pointer; } /* Expand button hover */
div.pp_default .pp_contract { background: url(../images/prettyPhoto/default/sprite.png) 0 -84px no-repeat; cursor: pointer; width: 28px; height: 28px; } /* Contract button */
div.pp_default .pp_contract:hover { background: url(../images/prettyPhoto/default/sprite.png) 0 -113px no-repeat; cursor: pointer; } /* Contract button hover */
div.pp_default .pp_close { width: 30px; height: 30px; background: url(../images/prettyPhoto/default/sprite.png) 2px 1px no-repeat; cursor: pointer; } /* Close button */
div.pp_default #pp_full_res .pp_inline { color: #000; }
div.pp_default .pp_gallery ul li a { background: url(../images/prettyPhoto/default/default_thumb.png) center center #f8f8f8; border:1px solid #aaa; }
div.pp_default .pp_gallery ul li a:hover,
div.pp_default .pp_gallery ul li.selected a { border-color: #fff; }
div.pp_default .pp_social { margin-top: 7px; }
div.pp_default .pp_gallery a.pp_arrow_previous,
div.pp_default .pp_gallery a.pp_arrow_next { position: static; left: auto; }
div.pp_default .pp_nav .pp_play,
div.pp_default .pp_nav .pp_pause { background: url(../images/prettyPhoto/default/sprite.png) -51px 1px no-repeat; height:30px; width:30px; }
div.pp_default .pp_nav .pp_pause { background-position: -51px -29px; }
div.pp_default .pp_details { position: relative; }
div.pp_default a.pp_arrow_previous,
div.pp_default a.pp_arrow_next { background: url(../images/prettyPhoto/default/sprite.png) -31px -3px no-repeat; height: 20px; margin: 4px 0 0 0; width: 20px; }
div.pp_default a.pp_arrow_next { left: 52px; background-position: -82px -3px; } /* The next arrow in the bottom nav */
div.pp_default .pp_content_container .pp_details { margin-top: 5px; }
div.pp_default .pp_nav { clear: none; height: 30px; width: 110px; position: relative; }
div.pp_default .pp_nav .currentTextHolder{ font-family: Georgia; font-style: italic; color:#999; font-size: 11px; left: 75px; line-height: 25px; margin: 0; padding: 0 0 0 10px; position: absolute; top: 2px; }
div.pp_default .pp_close:hover, div.pp_default .pp_nav .pp_play:hover, div.pp_default .pp_nav .pp_pause:hover, div.pp_default .pp_arrow_next:hover, div.pp_default .pp_arrow_previous:hover { opacity:0.7; }
div.pp_default .pp_description{ font-size: 11px; font-weight: bold; line-height: 14px; margin: 5px 50px 5px 0; }
div.pp_default .pp_bottom .pp_left { background: url(../images/prettyPhoto/default/sprite.png) -78px -127px no-repeat; } /* Bottom left corner */
div.pp_default .pp_bottom .pp_middle { background: url(../images/prettyPhoto/default/sprite_x.png) bottom left repeat-x; } /* Bottom pattern/color */
div.pp_default .pp_bottom .pp_right { background: url(../images/prettyPhoto/default/sprite.png) -112px -127px no-repeat; } /* Bottom right corner */
div.pp_default .pp_loaderIcon { background: url(../images/prettyPhoto/default/loader.gif) center center no-repeat; } /* Loader icon */
/* ----------------------------------
Light Rounded Theme
----------------------------------- */
div.light_rounded .pp_top .pp_left { background: url(../images/prettyPhoto/light_rounded/sprite.png) -88px -53px no-repeat; } /* Top left corner */
div.light_rounded .pp_top .pp_middle { background: #fff; } /* Top pattern/color */
div.light_rounded .pp_top .pp_right { background: url(../images/prettyPhoto/light_rounded/sprite.png) -110px -53px no-repeat; } /* Top right corner */
div.light_rounded .pp_content .ppt { color: #000; }
div.light_rounded .pp_content_container .pp_left,
div.light_rounded .pp_content_container .pp_right { background: #fff; }
div.light_rounded .pp_content { background-color: #fff; } /* Content background */
div.light_rounded .pp_next:hover { background: url(../images/prettyPhoto/light_rounded/btnNext.png) center right no-repeat; cursor: pointer; } /* Next button */
div.light_rounded .pp_previous:hover { background: url(../images/prettyPhoto/light_rounded/btnPrevious.png) center left no-repeat; cursor: pointer; } /* Previous button */
div.light_rounded .pp_expand { background: url(../images/prettyPhoto/light_rounded/sprite.png) -31px -26px no-repeat; cursor: pointer; } /* Expand button */
div.light_rounded .pp_expand:hover { background: url(../images/prettyPhoto/light_rounded/sprite.png) -31px -47px no-repeat; cursor: pointer; } /* Expand button hover */
div.light_rounded .pp_contract { background: url(../images/prettyPhoto/light_rounded/sprite.png) 0 -26px no-repeat; cursor: pointer; } /* Contract button */
div.light_rounded .pp_contract:hover { background: url(../images/prettyPhoto/light_rounded/sprite.png) 0 -47px no-repeat; cursor: pointer; } /* Contract button hover */
div.light_rounded .pp_close { width: 75px; height: 22px; background: url(../images/prettyPhoto/light_rounded/sprite.png) -1px -1px no-repeat; cursor: pointer; } /* Close button */
div.light_rounded .pp_details { position: relative; }
div.light_rounded .pp_description { margin-right: 85px; }
div.light_rounded #pp_full_res .pp_inline { color: #000; }
div.light_rounded .pp_gallery a.pp_arrow_previous,
div.light_rounded .pp_gallery a.pp_arrow_next { margin-top: 12px !important; }
div.light_rounded .pp_nav .pp_play { background: url(../images/prettyPhoto/light_rounded/sprite.png) -1px -100px no-repeat; height: 15px; width: 14px; }
div.light_rounded .pp_nav .pp_pause { background: url(../images/prettyPhoto/light_rounded/sprite.png) -24px -100px no-repeat; height: 15px; width: 14px; }
div.light_rounded .pp_arrow_previous { background: url(../images/prettyPhoto/light_rounded/sprite.png) 0 -71px no-repeat; } /* The previous arrow in the bottom nav */
div.light_rounded .pp_arrow_previous.disabled { background-position: 0 -87px; cursor: default; }
div.light_rounded .pp_arrow_next { background: url(../images/prettyPhoto/light_rounded/sprite.png) -22px -71px no-repeat; } /* The next arrow in the bottom nav */
div.light_rounded .pp_arrow_next.disabled { background-position: -22px -87px; cursor: default; }
div.light_rounded .pp_bottom .pp_left { background: url(../images/prettyPhoto/light_rounded/sprite.png) -88px -80px no-repeat; } /* Bottom left corner */
div.light_rounded .pp_bottom .pp_middle { background: #fff; } /* Bottom pattern/color */
div.light_rounded .pp_bottom .pp_right { background: url(../images/prettyPhoto/light_rounded/sprite.png) -110px -80px no-repeat; } /* Bottom right corner */
div.light_rounded .pp_loaderIcon { background: url(../images/prettyPhoto/light_rounded/loader.gif) center center no-repeat; } /* Loader icon */
/* ----------------------------------
Dark Rounded Theme
----------------------------------- */
div.dark_rounded .pp_top .pp_left { background: url(../images/prettyPhoto/dark_rounded/sprite.png) -88px -53px no-repeat; } /* Top left corner */
div.dark_rounded .pp_top .pp_middle { background: url(../images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat; } /* Top pattern/color */
div.dark_rounded .pp_top .pp_right { background: url(../images/prettyPhoto/dark_rounded/sprite.png) -110px -53px no-repeat; } /* Top right corner */
div.dark_rounded .pp_content_container .pp_left { background: url(../images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat-y; } /* Left Content background */
div.dark_rounded .pp_content_container .pp_right { background: url(../images/prettyPhoto/dark_rounded/contentPattern.png) top right repeat-y; } /* Right Content background */
div.dark_rounded .pp_content { background: url(../images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat; } /* Content background */
div.dark_rounded .pp_next:hover { background: url(../images/prettyPhoto/dark_rounded/btnNext.png) center right no-repeat; cursor: pointer; } /* Next button */
div.dark_rounded .pp_previous:hover { background: url(../images/prettyPhoto/dark_rounded/btnPrevious.png) center left no-repeat; cursor: pointer; } /* Previous button */
div.dark_rounded .pp_expand { background: url(../images/prettyPhoto/dark_rounded/sprite.png) -31px -26px no-repeat; cursor: pointer; } /* Expand button */
div.dark_rounded .pp_expand:hover { background: url(../images/prettyPhoto/dark_rounded/sprite.png) -31px -47px no-repeat; cursor: pointer; } /* Expand button hover */
div.dark_rounded .pp_contract { background: url(../images/prettyPhoto/dark_rounded/sprite.png) 0 -26px no-repeat; cursor: pointer; } /* Contract button */
div.dark_rounded .pp_contract:hover { background: url(../images/prettyPhoto/dark_rounded/sprite.png) 0 -47px no-repeat; cursor: pointer; } /* Contract button hover */
div.dark_rounded .pp_close { width: 75px; height: 22px; background: url(../images/prettyPhoto/dark_rounded/sprite.png) -1px -1px no-repeat; cursor: pointer; } /* Close button */
div.dark_rounded .pp_details { position: relative; }
div.dark_rounded .pp_description { margin-right: 85px; }
div.dark_rounded .currentTextHolder { color: #c4c4c4; }
div.dark_rounded .pp_description { color: #fff; }
div.dark_rounded #pp_full_res .pp_inline { color: #fff; }
div.dark_rounded .pp_gallery a.pp_arrow_previous,
div.dark_rounded .pp_gallery a.pp_arrow_next { margin-top: 12px !important; }
div.dark_rounded .pp_nav .pp_play { background: url(../images/prettyPhoto/dark_rounded/sprite.png) -1px -100px no-repeat; height: 15px; width: 14px; }
div.dark_rounded .pp_nav .pp_pause { background: url(../images/prettyPhoto/dark_rounded/sprite.png) -24px -100px no-repeat; height: 15px; width: 14px; }
div.dark_rounded .pp_arrow_previous { background: url(../images/prettyPhoto/dark_rounded/sprite.png) 0 -71px no-repeat; } /* The previous arrow in the bottom nav */
div.dark_rounded .pp_arrow_previous.disabled { background-position: 0 -87px; cursor: default; }
div.dark_rounded .pp_arrow_next { background: url(../images/prettyPhoto/dark_rounded/sprite.png) -22px -71px no-repeat; } /* The next arrow in the bottom nav */
div.dark_rounded .pp_arrow_next.disabled { background-position: -22px -87px; cursor: default; }
div.dark_rounded .pp_bottom .pp_left { background: url(../images/prettyPhoto/dark_rounded/sprite.png) -88px -80px no-repeat; } /* Bottom left corner */
div.dark_rounded .pp_bottom .pp_middle { background: url(../images/prettyPhoto/dark_rounded/contentPattern.png) top left repeat; } /* Bottom pattern/color */
div.dark_rounded .pp_bottom .pp_right { background: url(../images/prettyPhoto/dark_rounded/sprite.png) -110px -80px no-repeat; } /* Bottom right corner */
div.dark_rounded .pp_loaderIcon { background: url(../images/prettyPhoto/dark_rounded/loader.gif) center center no-repeat; } /* Loader icon */
/* ----------------------------------
Dark Square Theme
----------------------------------- */
div.dark_square .pp_left ,
div.dark_square .pp_middle,
div.dark_square .pp_right,
div.dark_square .pp_content { background: #000; }
div.dark_square .currentTextHolder { color: #c4c4c4; }
div.dark_square .pp_description { color: #fff; }
div.dark_square .pp_loaderIcon { background: url(../images/prettyPhoto/dark_square/loader.gif) center center no-repeat; } /* Loader icon */
div.dark_square .pp_expand { background: url(../images/prettyPhoto/dark_square/sprite.png) -31px -26px no-repeat; cursor: pointer; } /* Expand button */
div.dark_square .pp_expand:hover { background: url(../images/prettyPhoto/dark_square/sprite.png) -31px -47px no-repeat; cursor: pointer; } /* Expand button hover */
div.dark_square .pp_contract { background: url(../images/prettyPhoto/dark_square/sprite.png) 0 -26px no-repeat; cursor: pointer; } /* Contract button */
div.dark_square .pp_contract:hover { background: url(../images/prettyPhoto/dark_square/sprite.png) 0 -47px no-repeat; cursor: pointer; } /* Contract button hover */
div.dark_square .pp_close { width: 75px; height: 22px; background: url(../images/prettyPhoto/dark_square/sprite.png) -1px -1px no-repeat; cursor: pointer; } /* Close button */
div.dark_square .pp_details { position: relative; }
div.dark_square .pp_description { margin: 0 85px 0 0; }
div.dark_square #pp_full_res .pp_inline { color: #fff; }
div.dark_square .pp_gallery a.pp_arrow_previous,
div.dark_square .pp_gallery a.pp_arrow_next { margin-top: 12px !important; }
div.dark_square .pp_nav { clear: none; }
div.dark_square .pp_nav .pp_play { background: url(../images/prettyPhoto/dark_square/sprite.png) -1px -100px no-repeat; height: 15px; width: 14px; }
div.dark_square .pp_nav .pp_pause { background: url(../images/prettyPhoto/dark_square/sprite.png) -24px -100px no-repeat; height: 15px; width: 14px; }
div.dark_square .pp_arrow_previous { background: url(../images/prettyPhoto/dark_square/sprite.png) 0 -71px no-repeat; } /* The previous arrow in the bottom nav */
div.dark_square .pp_arrow_previous.disabled { background-position: 0 -87px; cursor: default; }
div.dark_square .pp_arrow_next { background: url(../images/prettyPhoto/dark_square/sprite.png) -22px -71px no-repeat; } /* The next arrow in the bottom nav */
div.dark_square .pp_arrow_next.disabled { background-position: -22px -87px; cursor: default; }
div.dark_square .pp_next:hover { background: url(../images/prettyPhoto/dark_square/btnNext.png) center right no-repeat; cursor: pointer; } /* Next button */
div.dark_square .pp_previous:hover { background: url(../images/prettyPhoto/dark_square/btnPrevious.png) center left no-repeat; cursor: pointer; } /* Previous button */
/* ----------------------------------
Light Square Theme
----------------------------------- */
div.light_square .pp_left ,
div.light_square .pp_middle,
div.light_square .pp_right,
div.light_square .pp_content { background: #fff; }
div.light_square .pp_content .ppt { color: #000; }
div.light_square .pp_expand { background: url(../images/prettyPhoto/light_square/sprite.png) -31px -26px no-repeat; cursor: pointer; } /* Expand button */
div.light_square .pp_expand:hover { background: url(../images/prettyPhoto/light_square/sprite.png) -31px -47px no-repeat; cursor: pointer; } /* Expand button hover */
div.light_square .pp_contract { background: url(../images/prettyPhoto/light_square/sprite.png) 0 -26px no-repeat; cursor: pointer; } /* Contract button */
div.light_square .pp_contract:hover { background: url(../images/prettyPhoto/light_square/sprite.png) 0 -47px no-repeat; cursor: pointer; } /* Contract button hover */
div.light_square .pp_close { width: 75px; height: 22px; background: url(../images/prettyPhoto/light_square/sprite.png) -1px -1px no-repeat; cursor: pointer; } /* Close button */
div.light_square .pp_details { position: relative; }
div.light_square .pp_description { margin-right: 85px; }
div.light_square #pp_full_res .pp_inline { color: #000; }
div.light_square .pp_gallery a.pp_arrow_previous,
div.light_square .pp_gallery a.pp_arrow_next { margin-top: 12px !important; }
div.light_square .pp_nav .pp_play { background: url(../images/prettyPhoto/light_square/sprite.png) -1px -100px no-repeat; height: 15px; width: 14px; }
div.light_square .pp_nav .pp_pause { background: url(../images/prettyPhoto/light_square/sprite.png) -24px -100px no-repeat; height: 15px; width: 14px; }
div.light_square .pp_arrow_previous { background: url(../images/prettyPhoto/light_square/sprite.png) 0 -71px no-repeat; } /* The previous arrow in the bottom nav */
div.light_square .pp_arrow_previous.disabled { background-position: 0 -87px; cursor: default; }
div.light_square .pp_arrow_next { background: url(../images/prettyPhoto/light_square/sprite.png) -22px -71px no-repeat; } /* The next arrow in the bottom nav */
div.light_square .pp_arrow_next.disabled { background-position: -22px -87px; cursor: default; }
div.light_square .pp_next:hover { background: url(../images/prettyPhoto/light_square/btnNext.png) center right no-repeat; cursor: pointer; } /* Next button */
div.light_square .pp_previous:hover { background: url(../images/prettyPhoto/light_square/btnPrevious.png) center left no-repeat; cursor: pointer; } /* Previous button */
div.light_square .pp_loaderIcon { background: url(../images/prettyPhoto/light_rounded/loader.gif) center center no-repeat; } /* Loader icon */
/* ----------------------------------
Facebook style Theme
----------------------------------- */
div.facebook .pp_top .pp_left { background: url(../images/prettyPhoto/facebook/sprite.png) -88px -53px no-repeat; } /* Top left corner */
div.facebook .pp_top .pp_middle { background: url(../images/prettyPhoto/facebook/contentPatternTop.png) top left repeat-x; } /* Top pattern/color */
div.facebook .pp_top .pp_right { background: url(../images/prettyPhoto/facebook/sprite.png) -110px -53px no-repeat; } /* Top right corner */
div.facebook .pp_content .ppt { color: #000; }
div.facebook .pp_content_container .pp_left { background: url(../images/prettyPhoto/facebook/contentPatternLeft.png) top left repeat-y; } /* Content background */
div.facebook .pp_content_container .pp_right { background: url(../images/prettyPhoto/facebook/contentPatternRight.png) top right repeat-y; } /* Content background */
div.facebook .pp_content { background: #fff; } /* Content background */
div.facebook .pp_expand { background: url(../images/prettyPhoto/facebook/sprite.png) -31px -26px no-repeat; cursor: pointer; } /* Expand button */
div.facebook .pp_expand:hover { background: url(../images/prettyPhoto/facebook/sprite.png) -31px -47px no-repeat; cursor: pointer; } /* Expand button hover */
div.facebook .pp_contract { background: url(../images/prettyPhoto/facebook/sprite.png) 0 -26px no-repeat; cursor: pointer; } /* Contract button */
div.facebook .pp_contract:hover { background: url(../images/prettyPhoto/facebook/sprite.png) 0 -47px no-repeat; cursor: pointer; } /* Contract button hover */
div.facebook .pp_close { width: 22px; height: 22px; background: url(../images/prettyPhoto/facebook/sprite.png) -1px -1px no-repeat; cursor: pointer; } /* Close button */
div.facebook .pp_details { position: relative; }
div.facebook .pp_description { margin: 0 37px 0 0; }
div.facebook #pp_full_res .pp_inline { color: #000; }
div.facebook .pp_loaderIcon { background: url(../images/prettyPhoto/facebook/loader.gif) center center no-repeat; } /* Loader icon */
div.facebook .pp_arrow_previous { background: url(../images/prettyPhoto/facebook/sprite.png) 0 -71px no-repeat; height: 22px; margin-top: 0; width: 22px; } /* The previous arrow in the bottom nav */
div.facebook .pp_arrow_previous.disabled { background-position: 0 -96px; cursor: default; }
div.facebook .pp_arrow_next { background: url(../images/prettyPhoto/facebook/sprite.png) -32px -71px no-repeat; height: 22px; margin-top: 0; width: 22px; } /* The next arrow in the bottom nav */
div.facebook .pp_arrow_next.disabled { background-position: -32px -96px; cursor: default; }
div.facebook .pp_nav { margin-top: 0; }
div.facebook .pp_nav p { font-size: 15px; padding: 0 3px 0 4px; }
div.facebook .pp_nav .pp_play { background: url(../images/prettyPhoto/facebook/sprite.png) -1px -123px no-repeat; height: 22px; width: 22px; }
div.facebook .pp_nav .pp_pause { background: url(../images/prettyPhoto/facebook/sprite.png) -32px -123px no-repeat; height: 22px; width: 22px; }
div.facebook .pp_next:hover { background: url(../images/prettyPhoto/facebook/btnNext.png) center right no-repeat; cursor: pointer; } /* Next button */
div.facebook .pp_previous:hover { background: url(../images/prettyPhoto/facebook/btnPrevious.png) center left no-repeat; cursor: pointer; } /* Previous button */
div.facebook .pp_bottom .pp_left { background: url(../images/prettyPhoto/facebook/sprite.png) -88px -80px no-repeat; } /* Bottom left corner */
div.facebook .pp_bottom .pp_middle { background: url(../images/prettyPhoto/facebook/contentPatternBottom.png) top left repeat-x; } /* Bottom pattern/color */
div.facebook .pp_bottom .pp_right { background: url(../images/prettyPhoto/facebook/sprite.png) -110px -80px no-repeat; } /* Bottom right corner */
/* ------------------------------------------------------------------------
DO NOT CHANGE
------------------------------------------------------------------------- */
div.pp_pic_holder a:focus { outline:none; }
div.pp_overlay {
background: #000;
display: none;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 9500;
}
div.pp_pic_holder {
display: none;
position: absolute;
width: 100px;
z-index: 10000;
}
.pp_top {
height: 20px;
position: relative;
}
* html .pp_top { padding: 0 20px; }
.pp_top .pp_left {
height: 20px;
left: 0;
position: absolute;
width: 20px;
}
.pp_top .pp_middle {
height: 20px;
left: 20px;
position: absolute;
right: 20px;
}
* html .pp_top .pp_middle {
left: 0;
position: static;
}
.pp_top .pp_right {
height: 20px;
left: auto;
position: absolute;
right: 0;
top: 0;
width: 20px;
}
.pp_content { height: 40px; min-width: 40px; }
* html .pp_content { width: 40px; }
.pp_fade { display: none; }
.pp_content_container {
position: relative;
text-align: left;
width: 100%;
}
.pp_content_container .pp_left { padding-left: 20px; }
.pp_content_container .pp_right { padding-right: 20px; }
.pp_content_container .pp_details {
float: left;
margin: 10px 0 2px 0;
}
.pp_description {
display: none;
margin: 0;
}
.pp_social { float: left; margin: 0; }
.pp_social .facebook { float: left; margin-left: 5px; width: 55px; overflow: hidden; }
.pp_social .twitter { float: left; }
.pp_nav {
clear: right;
float: left;
margin: 3px 10px 0 0;
}
.pp_nav p {
float: left;
margin: 2px 4px;
white-space: nowrap;
}
.pp_nav .pp_play,
.pp_nav .pp_pause {
float: left;
margin-right: 4px;
text-indent: -10000px;
}
a.pp_arrow_previous,
a.pp_arrow_next {
display: block;
float: left;
height: 15px;
margin-top: 3px;
overflow: hidden;
text-indent: -10000px;
width: 14px;
}
.pp_hoverContainer {
position: absolute;
top: 0;
width: 100%;
z-index: 2000;
}
.pp_gallery {
display: none;
left: 50%;
margin-top: -50px;
position: absolute;
z-index: 10000;
}
.pp_gallery div {
float: left;
overflow: hidden;
position: relative;
}
.pp_gallery ul {
float: left;
height: 35px;
margin: 0 0 0 5px;
padding: 0;
position: relative;
white-space: nowrap;
}
.pp_gallery ul a {
border: 1px #000 solid;
border: 1px rgba(0,0,0,0.5) solid;
display: block;
float: left;
height: 33px;
overflow: hidden;
}
.pp_gallery ul a:hover,
.pp_gallery li.selected a { border-color: #fff; }
.pp_gallery ul a img { border: 0; }
.pp_gallery li {
display: block;
float: left;
margin: 0 5px 0 0;
padding: 0;
}
.pp_gallery li.default a {
background: url(../images/prettyPhoto/facebook/default_thumbnail.gif) 0 0 no-repeat;
display: block;
height: 33px;
width: 50px;
}
.pp_gallery li.default a img { display: none; }
.pp_gallery .pp_arrow_previous,
.pp_gallery .pp_arrow_next {
margin-top: 7px !important;
}
a.pp_next {
background: url(../images/prettyPhoto/light_rounded/btnNext.png) 10000px 10000px no-repeat;
display: block;
float: right;
height: 100%;
text-indent: -10000px;
width: 49%;
}
a.pp_previous {
background: url(../images/prettyPhoto/light_rounded/btnNext.png) 10000px 10000px no-repeat;
display: block;
float: left;
height: 100%;
text-indent: -10000px;
width: 49%;
}
a.pp_expand,
a.pp_contract {
cursor: pointer;
display: none;
height: 20px;
position: absolute;
right: 30px;
text-indent: -10000px;
top: 10px;
width: 20px;
z-index: 20000;
}
a.pp_close {
position: absolute; right: 0; top: 0;
display: block;
line-height:22px;
text-indent: -10000px;
}
.pp_bottom {
height: 20px;
position: relative;
}
* html .pp_bottom { padding: 0 20px; }
.pp_bottom .pp_left {
height: 20px;
left: 0;
position: absolute;
width: 20px;
}
.pp_bottom .pp_middle {
height: 20px;
left: 20px;
position: absolute;
right: 20px;
}
* html .pp_bottom .pp_middle {
left: 0;
position: static;
}
.pp_bottom .pp_right {
height: 20px;
left: auto;
position: absolute;
right: 0;
top: 0;
width: 20px;
}
.pp_loaderIcon {
display: block;
height: 24px;
left: 50%;
margin: -12px 0 0 -12px;
position: absolute;
top: 50%;
width: 24px;
}
#pp_full_res {
line-height: 1 !important;
}
#pp_full_res .pp_inline {
text-align: left;
}
#pp_full_res .pp_inline p { margin: 0 0 15px 0; }
div.ppt {
color: #fff;
display: none;
font-size: 17px;
margin: 0 0 5px 15px;
z-index: 9999;
}

29
mamweb/static/css/rozliseni.css

@ -1,29 +0,0 @@
/* Rozlišení mezi lokálním, test a produkčním webem */
.localweb {
border-left: 20px solid greenyellow;
border-right: 20px solid greenyellow;
}
.localweb .login-bar {
margin-left: -20px;
}
.testweb {
border-left: 20px solid darkorange;
border-right: 20px solid darkorange;
}
.testweb .login-bar {
margin-left: -20px;
}
/* Produkční web z pohledu superuživatele */
.suprodweb {
border-left: 20px solid red;
border-right: 20px solid red;
}
.suprodweb .login-bar {
margin-left: -20px;
}

BIN
mamweb/static/fonts/ghoul/ghoul.ttf

Binary file not shown.

BIN
mamweb/static/fonts/glyphicons-halflings-regular.eot

Binary file not shown.

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save