From f93419a1695fa57ccc99630cf73bd1e5887d67a0 Mon Sep 17 00:00:00 2001 From: Breezewish Date: Sun, 2 Jul 2017 22:30:16 +0800 Subject: [PATCH] emphasize in-domain redirections in domains (#174) --- vj4/handler/base.py | 1 + vj4/ui/common/variables.inc.styl | 2 ++ vj4/ui/components/header/header.page.styl | 30 +++++++++++++++++++++++ vj4/ui/templates/layout/basic.html | 5 ++++ vj4/ui/templates/partials/footer.html | 3 +++ vj4/ui/templates/partials/nav.html | 2 ++ 6 files changed, 43 insertions(+) diff --git a/vj4/handler/base.py b/vj4/handler/base.py index e3328f842..32467776e 100644 --- a/vj4/handler/base.py +++ b/vj4/handler/base.py @@ -183,6 +183,7 @@ def render_html(self, template_name, **kwargs): if '_' not in kwargs: kwargs['_'] = self.translate kwargs['domain_id'] = self.domain_id + kwargs['domain'] = self.domain if 'page_name' not in kwargs: kwargs['page_name'] = self.NAME if 'page_title' not in kwargs: diff --git a/vj4/ui/common/variables.inc.styl b/vj4/ui/common/variables.inc.styl index 4dbec7b15..4d4362f85 100644 --- a/vj4/ui/common/variables.inc.styl +++ b/vj4/ui/common/variables.inc.styl @@ -86,6 +86,8 @@ $header-bg-height = 320px $header-bg-height-mini = $header-bg-height - $header-layer-height $header-logo-width = 280px $header-logo-height = 150px +$header-logo-domain-lh = 60px +$header-logo-system-lh = 30px $footer-bg-color = $content-bg-color diff --git a/vj4/ui/components/header/header.page.styl b/vj4/ui/components/header/header.page.styl index b7f54bdfd..918973c94 100644 --- a/vj4/ui/components/header/header.page.styl +++ b/vj4/ui/components/header/header.page.styl @@ -1,4 +1,5 @@ $header-gap-mini = ($header-bg-height-mini - $nav-item-height - $header-logo-height) / 2 +$header-gap-mini-domain = ($header-bg-height-mini - $nav-item-height - $header-logo-domain-lh - $header-logo-system-lh) / 2 .header position: relative @@ -44,6 +45,35 @@ $header-gap-mini = ($header-bg-height-mini - $nav-item-height - $header-logo-hei +mobile() display: inline-block +.header__logo--domain + font-size: rem(40px) + margin-top: rem($header-gap-mini-domain + $nav-item-height) + height: rem($header-logo-domain-lh) + line-height: rem($header-logo-domain-lh) + + a + text-shadow: 1px 1px 5px rgba(#000, 0.4) + + &, &:hover, &:visited, &:link + color: #FFF + text-decoration: none + +.header__logo--system + line-height: rem($header-logo-system-lh) + color: #FFF + font-size: rem($font-size-small) + + a + opacity: 0.8 + + &, &:hover, &:visited, &:link + text-decoration: none + color: #FFF + + &:hover + opacity: 1 + text-decoration: underline + .location-path color: rgba(#FFF, 0.3) line-height: rem(30px) diff --git a/vj4/ui/templates/layout/basic.html b/vj4/ui/templates/layout/basic.html index b77d2e71a..6d4afafce 100644 --- a/vj4/ui/templates/layout/basic.html +++ b/vj4/ui/templates/layout/basic.html @@ -8,7 +8,12 @@ {% include "partials/nav_hamburger.html" %}
+ {% if domain_id == vj4.model.builtin.DOMAIN_ID_SYSTEM %} + {% else %} + + + {% endif %}
{% include "partials/path.html" %}
diff --git a/vj4/ui/templates/partials/footer.html b/vj4/ui/templates/partials/footer.html index bd518e518..63f7ffb70 100644 --- a/vj4/ui/templates/partials/footer.html +++ b/vj4/ui/templates/partials/footer.html @@ -19,6 +19,9 @@

{{ _('Development') }}