Skip to content

Commit a69f1e5

Browse files
authored
Merge pull request json-schema-org#347 from Relequestual/carbon-ads
Add carbon ads
2 parents 94e754a + 4c4721a commit a69f1e5

File tree

5 files changed

+102
-2
lines changed

5 files changed

+102
-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: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,79 @@ 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: 10px;
60+
top: 90px;
61+
font-size: 12px;
62+
line-height: 1.45;
63+
background-color: #f9f9f9;
64+
border: 1px dashed;
65+
border-color: #cacaca;
66+
}
67+
68+
@media (max-width: 1420px) {
69+
#carbonads {
70+
display: block;
71+
position: relative;
72+
right: unset;
73+
top: unset;
74+
margin: auto;
75+
margin-bottom: 30px;
76+
overflow: hidden;
77+
max-width: 728px;
78+
font-size: 24px;
79+
box-sizing: content-box;
80+
}
81+
}
82+
83+
#carbonads > span {
84+
position: relative;
85+
display: block;
86+
padding: 10px;
87+
border-radius: 4px;
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: 10px;
115+
line-height: 1;
116+
}
117+
118+
#carbonads .carbon-poweredby:hover {
119+
color: #637381;
120+
}
121+
122+
@media only screen and (min-width: 320px) and (max-width: 759px) {
123+
.carbon-text {
124+
font-size: 14px;
125+
}
126+
}

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)