diff --git a/judge/views/contests.py b/judge/views/contests.py index 9c054ed..107e281 100644 --- a/judge/views/contests.py +++ b/judge/views/contests.py @@ -153,11 +153,25 @@ class ContestList( def _now(self): return timezone.now() + def GET_with_session(self, request, key): + if not request.GET.get(key): + return request.session.get(key, False) + return request.GET.get(key, None) == "1" + + def update_session(self, request): + to_update = ("show_orgs",) + for key in to_update: + if key in request.GET: + val = request.GET.get(key) == "1" + request.session[key] = val + else: + request.session[key] = False + def get(self, request, *args, **kwargs): self.contest_query = None self.org_query = [] self.show_orgs = 0 - if request.GET.get("show_orgs"): + if self.GET_with_session(request, "show_orgs"): self.show_orgs = 1 if self.request.GET.get("orgs") and self.request.profile: @@ -177,6 +191,7 @@ class ContestList( except ValueError: pass + self.update_session(request) return super(ContestList, self).get(request, *args, **kwargs) def _get_queryset(self): diff --git a/resources/content-description.scss b/resources/content-description.scss index a93855a..0587b15 100644 --- a/resources/content-description.scss +++ b/resources/content-description.scss @@ -4,6 +4,7 @@ line-height: 1.6em; font-size: 16px; font-family: "Segoe UI", "Noto Sans", Arial, "Lucida Grande", sans-serif; + overflow-wrap: anywhere; h1, h2, h3, h4, h5, .admonition-title, summary { font-family: "Noto Sans", "Segoe UI", Arial, "Lucida Grande", sans-serif; diff --git a/templates/organization/list.html b/templates/organization/list.html index a7530d5..3fde1a1 100644 --- a/templates/organization/list.html +++ b/templates/organization/list.html @@ -32,7 +32,7 @@