Skip to content

Commit a77822b

Browse files
committed
Add hello
1 parent 7976623 commit a77822b

8 files changed

Lines changed: 1765 additions & 8 deletions

File tree

_includes/menu.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<script type="text/javascript">
2+
window.helloCarbon = function() {
3+
var $huggingFace = document.getElementById('huggingFace');
4+
var $carbon = document.getElementById('carbon');
5+
$huggingFace.style.display = 'none';
6+
$carbon.style.display = 'block';
7+
}
8+
</script>
9+
110
<aside class="menu">
211
<header class="menu-header">
312
<a id="logo" class="menu-logo" href="{{site.url}}">
@@ -46,4 +55,22 @@
4655
<strong>Close</strong>
4756
</a>
4857
</nav>
58+
<footer class="menu-hello">
59+
<div id="huggingFace">
60+
<p>
61+
CSS Reference is <strong>free</strong> and <br>
62+
always will be!
63+
</p>
64+
<p>
65+
Please whitelist us in <br>
66+
your ad blocker.
67+
</p>
68+
<p>
69+
Thank you! <img src="{{site.url}}/images/hugging-face.png" alt="Hugging face emoji">
70+
</p>
71+
</div>
72+
<div id="carbon">
73+
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=cssreferenceio" id="_carbonads_js" onload ="window.helloCarbon()"></script>
74+
</div>
75+
</footer>
4976
</aside>

_includes/noscript.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<noscript>
2+
<style type="text/css">
3+
.menu-hello {
4+
min-height: 0;
5+
}
6+
7+
#huggingFace {
8+
display: block;
9+
}
10+
11+
#carbon {
12+
display: none;
13+
}
14+
</style>
15+
</noscript>

_layouts/single.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@
4040
{% include google-fonts.html %}
4141
<script src="{{site.url}}/javascript/clipboard.min.js"></script>
4242
<script src="{{site.url}}/javascript/main.js"></script>
43+
{% include noscript.html %}
4344
</body>
4445
</html>

css/website.css

Lines changed: 1650 additions & 1 deletion
Large diffs are not rendered by default.

images/hugging-face.png

6.88 KB
Loading

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,6 @@ <h2 class="header-title">
5454
<script src="{{site.url}}/javascript/clipboard.min.js"></script>
5555
<script src="{{site.url}}/javascript/main.js"></script>
5656
<script src="{{site.url}}/javascript/index.js"></script>
57+
{% include noscript.html %}
5758
</body>
5859
</html>

sass/header.sass

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ $gradient-bottom: linear-gradient($primary, lighten($primary, 5%))
99
color: $plum-dark
1010
display: flex
1111
justify-content: flex-start
12-
padding: 2rem
12+
padding: 3rem 2rem
1313
position: relative
1414
text-align: left
1515

@@ -36,13 +36,11 @@ $width: 486px
3636
color: $plum-invert
3737
font-size: 1.4rem
3838
font-weight: $weight-bold
39-
margin-bottom: 0.5rem
40-
margin-top: 1rem
39+
margin-top: 2rem
4140
text-shadow: 0 2px 4px rgba(#000, 0.1)
4241

4342
.header-subtitle
4443
color: $plum-dark
45-
margin-top: 1rem
4644
max-width: 40em
4745
a
4846
border-bottom: 1px solid rgba($plum-dark, 0.2)

sass/menu.sass

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,64 @@
167167
margin-right: 0.25rem
168168
margin-top: 1px
169169

170+
.menu-hello
171+
background: #fff
172+
min-height: 218px
173+
174+
#huggingFace
175+
background: #fff
176+
color: $text-strong
177+
display: none
178+
font-size: 16px
179+
line-height: 1.4
180+
padding: 1.5rem
181+
img
182+
height: 24px
183+
margin-top: -4px
184+
vertical-align: middle
185+
width: 24px
186+
strong
187+
position: relative
188+
&:before
189+
background: hsl(171, 100%, 81%)
190+
bottom: 0
191+
content: ""
192+
height: 2px
193+
left: 0
194+
position: absolute
195+
right: 0
196+
p + p
197+
margin-top: 0.5em
198+
199+
#carbon
200+
display: block
201+
font-size: 14px
202+
line-height: 1.2
203+
min-height: 218px
204+
205+
#carbonads
206+
a,
207+
img,
208+
span
209+
display: block
210+
max-width: 240px
211+
.carbon-wrap
212+
a:first-child
213+
height: calc(100px + 1rem)
214+
padding: 1rem 1rem 0
215+
a:last-child
216+
padding: 0.5rem 1rem 0
217+
.carbon-poweredby
218+
color: $text-light
219+
padding: 0.5rem 1rem 1rem
220+
&:hover
221+
.carbon-wrap a:last-child
222+
text-decoration: underline
223+
170224
+mobile
171-
.menu-logo,
172-
.menu-title
173-
display: none
225+
.menu-header
226+
padding: 2rem
227+
padding-bottom: 0
174228
.menu-share
175229
background: #fff
176230
bottom: 0
@@ -186,6 +240,14 @@
186240
position: fixed
187241
&.is-active
188242
display: flex
243+
#huggingFace
244+
padding: 2rem
245+
#carbonads
246+
.carbon-wrap a:first-child,
247+
.carbon-wrap a:last-child,
248+
.carbon-poweredby
249+
padding-left: 2rem
250+
padding-right: 2rem
189251

190252
+desktop
191253
.menu
@@ -218,5 +280,9 @@
218280
.menu-list
219281
a
220282
padding: 0.5rem 2rem
283+
.menu-hello
284+
background: #fff
285+
flex-grow: 0
286+
flex-shrink: 0
221287
.menu-close
222288
display: none

0 commit comments

Comments
 (0)