Add amazon affiliate link to gethead.info site header

This commit is contained in:
Josh Buchea 2017-07-22 21:28:17 -07:00
parent 626e5402fa
commit 513362013a
5 changed files with 105 additions and 22 deletions

View File

@ -1,6 +1,6 @@
# Site settings
title: <head> Cheat Sheet
description: A list of everything that could go in the <head> of your document
title: <head> cheatsheet
description: "A free guide to <head> elements"
baseurl: "" # the subpath of your site, e.g. /blog/
url: "http://gethead.info" # the base hostname & protocol for your site (no trailing slash)
twitter_username: joshbuchea

View File

@ -8,7 +8,7 @@
<!-- <meta name="theme-color" content="#2980b9"> -->
<!-- <meta name="google-site-verification" content=""> -->
<title>{% if page.title %}{{ page.title | xml_escape }}{% else %}{{ site.title | xml_escape }}{% endif %}</title>
<title>{% if page.title %}{{ page.title | xml_escape }}{% else %}{{ site.title | xml_escape }} - {{ site.description | xml_escape }} {% endif %}</title>
<link rel="stylesheet" href="main.css">
<!-- <link rel="mask-icon" href="favicon.svg" color="#2980b9"> -->

View File

@ -1,12 +1,30 @@
<header class="site__header">
<div class="container">
<h1 class="site__title">{{ site.title | xml_escape }}</h1>
<h1 class="site__title">
<!-- {{ site.title | xml_escape }} -->
<!-- <span>get</span>head<span>.info</span> -->
&lt;head&gt; cheatsheet
</h1>
{% include share-page.html %}
<div class="header-content">
<div class="header-ad">
<a target="_blank" href="https://amazon.com/?tag=buchea-20">
<img src="/img/amazon-logo-large.jpg" width="100%" height="auto">
<p>Please use this affiliate link when you shop at Amazon.</p>
<p>Thank You! 🤗</p>
</a>
</div>
<div>
By <a href="http://joshbuchea.com/">Josh Buchea</a> / <a href="https://twitter.com/{{ site.twitter_username }}">@{{ site.twitter_username }}</a>
<div class="header-text">
<h2>A free guide to &lt;head&gt; elements</h2>
{% include share-page.html %}
<div>
By <a href="http://joshbuchea.com/">Josh Buchea</a> / <a href="https://twitter.com/{{ site.twitter_username }}">@{{ site.twitter_username }}</a>
</div>
</div>
</div>
<a href="//github.com/joshbuchea/head" class="github" target="_blank">

BIN
img/amazon-logo-large.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -6,6 +6,14 @@
@import 'github';
@import 'syntax';
* {
box-sizing: border-box;
&:before,
&:after {
box-sizing: border-box;
}
}
body {
margin: 0;
padding: 0;
@ -25,24 +33,17 @@ h1#head {
}
a {
color: #70B7FD;
color: #222;
}
a:hover,
a:focus {
color: #70B7FD;
color: #000;
}
a {
transition: all .2s ease-in-out;
border-bottom: 1px solid #ddd;
text-decoration: none;
transition: all .2s ease-in-out;
color: #70B7FD;
color: #222;
&:hover,
&:focus {
border-bottom: 1px solid #70B7FD;
color: #70B7FD;
color: #000;
}
}
@ -52,6 +53,10 @@ img {
vertical-align: middle;
}
ul ul {
padding-left: 20px;
}
.container {
margin: 0 auto;
max-width: 800px;
@ -59,13 +64,69 @@ img {
}
.site__header {
padding: 80px 0 40px;
padding: 60px 0 30px;
background-color: #F2F2F2;
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
}
}
.site__title {
margin-top: 0;
font-size: 48px;
font-size: 40px;
text-align: center;
& > span:last-child {
color: #ACACAC;
}
@media(min-width: 700px) {
font-size: 72px;
text-align: left;
}
}
.header-content {
@media(min-width: 700px) {
display: flex;
align-items: flex-start;
}
}
.header-ad {
display: flex;
align-items: center;
margin: 0 auto 40px;
box-shadow: 0 0 1rem rgba(0,0,0,0.2);
border-radius: 5px;
background-color: #fff;
min-width: 240px;
width: 240px;
height: 218px;
font-size: .8em;
& > a {
display: block;
padding: 1rem 2rem;
border-bottom: none;
}
p:last-of-type {
margin-bottom: 0;
}
@media(min-width: 700px) {
margin: 0;
}
}
.header-text {
text-align: center;
@media(min-width: 700px) {
margin-left: 40px;
text-align: left;
}
}
.site__main {
@ -77,6 +138,10 @@ img {
font-size: 1.5em;
}
.site__main p:nth-of-type(2) {
display: none;
}
pre {
overflow-x: auto;
word-wrap: normal;