0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Added site icon to sign in screen

This commit is contained in:
Peter Zimon 2021-03-03 13:36:40 +01:00
parent 477b58e076
commit 4a79a94993
3 changed files with 41 additions and 13 deletions

View file

@ -3,6 +3,7 @@ import Controller, {inject as controller} from '@ember/controller';
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
import {alias} from '@ember/object/computed';
import {computed} from '@ember/object';
import {htmlSafe} from '@ember/string';
import {isArray as isEmberArray} from '@ember/array';
import {isVersionMismatchError} from 'ghost-admin/services/ajax';
import {inject as service} from '@ember/service';
@ -39,6 +40,17 @@ export default Controller.extend(ValidationEngine, {
return color;
}),
siteIconStyle: computed('config.icon', function () {
let icon = this.get('config.icon');
if (icon) {
return htmlSafe(`background-image: url(${icon})`);
}
icon = 'https://static.ghost.org/v3.0.0/images/ghost-squircle.png';
return htmlSafe(`background-image: url(${icon})`);
}),
actions: {
authenticate() {
return this.validateAndAuthenticate.perform();

View file

@ -9,6 +9,34 @@
text-align: left;
}
.gh-signin header {
display: flex;
flex-direction: column;
align-items: center;
}
.gh-signin .gh-site-icon {
margin-bottom: 20px;
width: 70px;
height: 70px;
background-color: transparent;
background-size: 70px;
border-radius: 3px;
}
.gh-signin h1 {
font-size: 4.1rem;
font-weight: 600;
letter-spacing: -.025em;
line-height: 1.15em;
font-weight: 700;
color: var(--black);
max-width: 620px;
width: 100%;
text-align: center;
margin-bottom: 40px;
}
.gh-signin .form-group {
margin-bottom: 1.5rem;
}
@ -98,19 +126,6 @@
border-color: var(--midgrey) !important;
}
.gh-signin h1 {
font-size: 4.1rem;
font-weight: 600;
letter-spacing: -.025em;
line-height: 1.15em;
font-weight: 700;
color: var(--black);
max-width: 620px;
width: 100%;
text-align: center;
margin-bottom: 40px;
}
/* Email notification */
/* ---------------------------------------------------------- */
.gh-auth-animation-container {

View file

@ -21,6 +21,7 @@
{{else}}
<form id="login" method="post" class="gh-signin" novalidate="novalidate" {{action "authenticate" on="submit"}}>
<header>
<div class="gh-site-icon" style="{{this.siteIconStyle}}"></div>
<h1>Sign in to {{this.config.blogTitle}}.</h1>
</header>
<GhFormGroup @errors={{this.signin.errors}} @hasValidated={{this.hasValidated}} @property="identification">