Skip to content
This repository was archived by the owner on Sep 23, 2023. It is now read-only.

Commit 364823c

Browse files
edg2sMatmaRex
authored andcommitted
Logo: Set font to Montserrat
Also split logo in CSS so text can be coloured on hover, and hidden on mobile.
1 parent 92485b9 commit 364823c

File tree

3 files changed

+41
-24
lines changed

3 files changed

+41
-24
lines changed

css/common.css

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,53 @@ header {
4747
margin: 0;
4848
flex-grow: 1;
4949
white-space: nowrap;
50+
height: 2em;
51+
position: relative;
5052
}
5153

5254
.logo {
55+
position: relative;
5356
display: inline-block;
54-
text-decoration: none;
55-
color: inherit;
56-
background: url( ../images/logo.svg ) no-repeat 0 0;
57-
background-size: 2em;
58-
line-height: 2em;
59-
padding-left: 2.5em;
57+
width: 2em;
58+
height: 2em;
59+
margin-right: 7em;
60+
background: url( ../images/wordmark.svg );
61+
background-size: cover;
62+
}
63+
64+
.logo > span {
65+
color: transparent;
66+
}
67+
68+
.logo:after {
69+
content: ' ';
70+
position: absolute;
71+
top: 0;
72+
left: 2em;
73+
width: 7em;
74+
height: 2em;
75+
background: url( ../images/wordmark.svg ) -2em 0;
76+
background-size: cover;
6077
}
6178

6279
.logo:hover {
6380
text-decoration: none;
64-
color: #2a4b8d;
81+
}
82+
83+
.logo:hover:after {
84+
/* #2a4b8d */
85+
filter: invert( 24% ) sepia( 13% ) saturate( 5585% ) hue-rotate( 195deg ) brightness( 98% ) contrast( 87% );
86+
}
87+
88+
@media ( max-width: 720px ) {
89+
/* Hide text part of logo on mobile */
90+
.logo {
91+
margin-right: 1em;
92+
}
93+
94+
.logo:after {
95+
display: none;
96+
}
6597
}
6698

6799
.sourceAndUser {

header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<body>
2323
<header>
2424
<div class="headerInner">
25-
<h1><a class="logo" href="' . $basePath . '/.">Patch demo</a></h1>
25+
<h1><a class="logo" href="' . $basePath . '/."><span>Patch demo</span></a></h1>
2626
<div class="sourceAndUser">';
2727
if ( $user ) {
2828
echo "<div class='user'>Logged in as <b>{$user->username}</b> [<a href='?logout'>Log out</a>]</div>";

images/wordmark.svg

Lines changed: 1 addition & 16 deletions
Loading

0 commit comments

Comments
 (0)