Skip to content

Commit 363d05e

Browse files
committed
Switch header over to use local logo and drop js for animating logo and tagline on load
1 parent f56e411 commit 363d05e

File tree

3 files changed

+174
-33
lines changed

3 files changed

+174
-33
lines changed

docs/_includes/header.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<header id="_header">
2-
<h1><a href="/"><img onload="window.document.getElementById('_header').classList.add('onload');" src="//cldup.com/xFVFxOioAU.svg"></a></h1>
3-
<p id="tag"><em>simple</em>, <em>flexible</em>, <em>fun</em></p>
2+
<h1>
3+
<a href="/">
4+
<img src="/images/mocha-logo.svg" alt="Mocha" width="192" height="192">
5+
</a>
6+
</h1>
7+
8+
<p id="tag">
9+
<em>simple</em>, <em>flexible</em>, <em>fun</em>
10+
</p>
411
</header>

docs/css/style.css

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,54 @@ body {
77
border-top: 2px solid #ddd;
88
}
99

10-
#content {
11-
padding: 0 110px 60px 110px;
10+
@keyframes fadein {
11+
from {
12+
opacity: 0;
13+
}
14+
15+
to {
16+
opacity: 1;
17+
}
18+
}
19+
20+
@keyframes slideright {
21+
from {
22+
transform: translateX(-45px);
23+
}
24+
25+
to {
26+
transform: translateX(0);
27+
}
1228
}
1329

1430
header {
1531
padding: 140px 110px 0 110px;
1632
}
1733

18-
h1 {
34+
#_header h1 {
1935
margin-left: -19px;
2036
opacity: 0;
21-
-webkit-transition: opacity 1s;
22-
-moz-transition: opacity 1s;
23-
-o-transition: opacity 1s;
24-
transition: opacity 1s;
37+
animation: fadein 1s forwards;
38+
}
39+
40+
#tag {
41+
color: #c29d7f;
42+
font-weight: 100;
43+
font-size: 30px;
44+
margin-top: -158px;
45+
margin-left: 185px;
46+
margin-bottom: 125px;
47+
letter-spacing: 2px;
48+
49+
animation: fadein 1s forwards, slideright 1s forwards;
50+
}
51+
52+
#content {
53+
padding: 0 110px 60px 110px;
54+
}
55+
56+
#tag em {
57+
font-style: normal
2558
}
2659

2760
#_backers a, #_sponsors a {
@@ -61,30 +94,6 @@ h3 > code {
6194
font-size: 14px;
6295
}
6396

64-
#tag {
65-
opacity: 0;
66-
color: #c29d7f;
67-
font-weight: 100;
68-
font-size: 30px;
69-
margin-top: -155px;
70-
margin-left: 140px;
71-
margin-bottom: 125px;
72-
letter-spacing: 2px;
73-
-webkit-transition: opacity 1s, margin-top 200ms, margin-bottom 200ms, margin-left 1s;
74-
-moz-transition: opacity 1s, margin-top 200ms, margin-bottom 200ms, margin-left 1s;
75-
-o-transition: opacity 1s, margin-top 200ms, margin-bottom 200ms, margin-left 1s;
76-
transition: opacity 1s, margin-top 200ms, margin-bottom 200ms, margin-left 1s;
77-
}
78-
79-
#tag em {
80-
font-style: normal
81-
}
82-
83-
.onload #tag {
84-
opacity: 1;
85-
margin-left: 185px;
86-
}
87-
8897
#content > p:first-child {
8998
font-size: 20px;
9099
font-weight: 200;

docs/images/mocha-logo.svg

Lines changed: 125 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)