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

Add carbon ads #347

Merged
merged 3 commits into from
Jul 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.sass-cache/
_site/
node_modules/
.vscode/
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ title: JSON Schema
description: The home of JSON Schema
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site
#twitter_username: jekyllrb
twitter_username: jsonschema
github_username: json-schema-org
google_analytics: UA-99695987-1

Expand Down
23 changes: 23 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">

{%- include head.html -%}

<body>

{%- include header.html -%}

<main class="page-content" aria-label="Content">
{% if page.url != "/" %}
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CE7I627Y&placement=json-schemaorg" id="_carbonads_js"></script>
{% endif %}
<div class="wrapper">
{{ content }}
</div>
</main>

{%- include footer.html -%}

</body>

</html>
76 changes: 76 additions & 0 deletions assets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,79 @@ code {
// minima.scss overrides
$spacing-unit: 10px !default;
$content-width: 960px !default;

// Carbon ads

#carbonads {
max-width: 300px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
display: flex;
position: fixed;
right: 10px;
top: 90px;
font-size: 12px;
line-height: 1.45;
background-color: #f9f9f9;
border: 1px dashed;
border-color: #cacaca;
}

@media (max-width: 1420px) {
#carbonads {
display: block;
position: relative;
right: unset;
top: unset;
margin: auto;
margin-bottom: 30px;
overflow: hidden;
max-width: 728px;
font-size: 24px;
box-sizing: content-box;
}
}

#carbonads > span {
position: relative;
display: block;
padding: 10px;
border-radius: 4px;
}

#carbonads .carbon-wrap {
display: flex;
}

#carbonads .carbon-img {
margin-right: 10px;
line-height: 1;
}

#carbonads .carbon-text {
margin-bottom: 12px;
color: #637381;
text-decoration: none;
}

#carbonads .carbon-poweredby {
position: absolute;
bottom: 10px;
left: 152px;
color: #c5cdd0;
text-decoration: none;
text-transform: uppercase;
letter-spacing: .5px;
font-weight: 500;
font-size: 10px;
line-height: 1;
}

#carbonads .carbon-poweredby:hover {
color: #637381;
}

@media only screen and (min-width: 320px) and (max-width: 759px) {
.carbon-text {
font-size: 14px;
}
}
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: page
layout: default
title: JSON Schema
permalink: /
---
Expand Down