Skip to content

Commit

Permalink
Merge pull request City-of-Helsinki#3 from terotic/feature/turku-styling
Browse files Browse the repository at this point in the history
Fix Turku styling and add default styles for Helsinki & Espoo adfs
  • Loading branch information
juyrjola committed Sep 26, 2019
2 parents a064c12 + 5af75ac commit 08f69d8
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 169 deletions.
1 change: 1 addition & 0 deletions themes/static/svg/espoo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
158 changes: 0 additions & 158 deletions themes/static/svg/helsinki-vaakuna-sininen.svg

This file was deleted.

1 change: 1 addition & 0 deletions themes/static/svg/helsinki_adfs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions themes/static/svg/yletunnus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 46 additions & 8 deletions themes/styles/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@

.login-method {
.btn {
background-color: $gray-500;
color: #fff;
text-align: left;
font-weight: 600;

&-facebook {
background-color: #4172B8;
Expand All @@ -96,23 +98,59 @@
&-github {
background-color: #181717;
&:hover {
background-color: darken(#181717, 7%);
background-color: lighten(#181717, 7%);
}
}
&-tumblr {
background-color: #36465D;
&:hover {
background-color: darken(#36465D, 7%);
}
}
&-yletunnus {
background-color: #00b5c8;
&:hover {
background-color: darken(#00b4c8, 7%);
}
}
&-helsinki, &-helsinki_adfs {
background-color: #0000bf;
&:hover {
background-color: darken(#0000bf, 7%);
}
}
&-espoo, &-espoo_adfs {
background-color: #00A0E2;
&:hover {
background-color: darken(#00A0E2, 7%);
}
}
}

.icon {
.icon, .ext-icon {
display: inline-block;
height: 1.2em;
width: 1.7em;
border-right: 1px solid #fff;
padding-right: .5em;
margin-right: .5em;
border-right: 2px solid #fff;
padding-right: .75rem;
margin-right: .5rem;
vertical-align: middle;

svg {
display: block;
height: 1.2em;
height: 1.5rem;
max-width: 1.5rem;
fill: #fff;
}

img {
height: 1.5rem;
max-width: 1.5rem;
}
}

.method-name {
display: inline-block;
vertical-align: middle;
width: auto;
}

}
3 changes: 3 additions & 0 deletions themes/styles/themes/turku/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ $brand-warning: $theme-warning;
$brand-danger: $theme-danger;

$font-family-sans-serif: "Open Sans", Arial, sans-serif;
$font-family-base: $font-family-sans-serif;

$headings-font-weight: 700;

$navbar-default-color: $white;
$navbar-default-link-color: $white;
Expand Down
2 changes: 1 addition & 1 deletion themes/templates/tunnistamo/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body class="bg-brand-light">
<div class="container content-container">
<div class="row justify-content-center">
<div class="col-sm-8 col-md-6">
<div class="col-sm-10 col-md-8 mt-5">
<div class="card content-card">
<header class="card-title">
<div class="logo theme-logo"></div>
Expand Down
1 change: 1 addition & 0 deletions tunnistamo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@

SVG_DIRS = [
os.path.join(NODE_MODULES_ROOT, 'simple-icons', 'icons'),
os.path.join(BASE_DIR, 'themes', 'static', 'svg'),
]

COMPRESS_PRECOMPILERS = (
Expand Down
8 changes: 6 additions & 2 deletions users/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
<span class="icon icon-{{ method.provider_id }}" aria-hidden="true">
{% svg method.provider_id %}
</span>
{{ method.name }}
<span class="method-name">
{{ method.name }}
</span>
</a>
{% else %}
<a href="{{ method.login_url }}"
Expand All @@ -28,7 +30,9 @@
<span class="ext-icon">
<img src="{{ method.logo_url }}" />
</span>
{{ method.name }}
<span class="method-name">
{{ method.name }}
</span>
</a>
{% endif %}
{% if method.short_description %}
Expand Down

0 comments on commit 08f69d8

Please sign in to comment.