Skip to content

Commit 3871e03

Browse files
committed
Add carbon ads
1 parent 94e754a commit 3871e03

File tree

5 files changed

+98
-2
lines changed

5 files changed

+98
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.sass-cache/
33
_site/
44
node_modules/
5+
.vscode/

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ title: JSON Schema
1818
description: The home of JSON Schema
1919
baseurl: "" # the subpath of your site, e.g. /blog
2020
url: "" # the base hostname & protocol for your site
21-
#twitter_username: jekyllrb
21+
twitter_username: jsonschema
2222
github_username: json-schema-org
2323
google_analytics: UA-99695987-1
2424

_layouts/default.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
3+
4+
{%- include head.html -%}
5+
6+
<body>
7+
8+
{%- include header.html -%}
9+
10+
<main class="page-content" aria-label="Content">
11+
{% if page.url != "/" %}
12+
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CE7I627Y&placement=json-schemaorg" id="_carbonads_js"></script>
13+
{% endif %}
14+
<div class="wrapper">
15+
{{ content }}
16+
</div>
17+
</main>
18+
19+
{%- include footer.html -%}
20+
21+
</body>
22+
23+
</html>

assets/main.scss

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,75 @@ code {
4848
// minima.scss overrides
4949
$spacing-unit: 10px !default;
5050
$content-width: 960px !default;
51+
52+
// Carbon ads
53+
54+
#carbonads {
55+
max-width: 300px;
56+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
57+
display: flex;
58+
position: fixed;
59+
right: 30px;
60+
top: 90px;
61+
font-size: 12px;
62+
line-height: 1.45;
63+
box-shadow: 0 0 17px rgba(0,0,0,.2);
64+
}
65+
66+
@media (max-width: 1199.98px) {
67+
#carbonads {
68+
display: block;
69+
position: relative;
70+
right: unset;
71+
top: unset;
72+
margin: auto;
73+
margin-bottom: 30px;
74+
overflow: hidden;
75+
max-width: 728px;
76+
font-size: 24px;
77+
box-sizing: content-box;
78+
}
79+
}
80+
81+
#carbonads > span {
82+
position: relative;
83+
display: block;
84+
padding: 10px;
85+
border-radius: 4px;
86+
background-color: #fff;
87+
box-shadow: 0 1px 3px hsla(0, 0%, 0%, .05);
88+
}
89+
90+
#carbonads .carbon-wrap {
91+
display: flex;
92+
}
93+
94+
#carbonads .carbon-img {
95+
margin-right: 10px;
96+
line-height: 1;
97+
}
98+
99+
#carbonads .carbon-text {
100+
margin-bottom: 12px;
101+
color: #637381;
102+
text-decoration: none;
103+
}
104+
105+
#carbonads .carbon-poweredby {
106+
position: absolute;
107+
bottom: 10px;
108+
left: 152px;
109+
color: #c5cdd0;
110+
text-decoration: none;
111+
text-transform: uppercase;
112+
letter-spacing: .5px;
113+
font-weight: 500;
114+
font-size: 8px;
115+
line-height: 1;
116+
}
117+
118+
@media only screen and (min-width: 320px) and (max-width: 759px) {
119+
.carbon-text {
120+
font-size: 14px;
121+
}
122+
}

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: page
2+
layout: default
33
title: JSON Schema
44
permalink: /
55
---

0 commit comments

Comments
 (0)