mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
358 lines
5.4 KiB
Text
358 lines
5.4 KiB
Text
/**
|
|
* Basic responsive layout from http://www.adamkaplan.me/grid/
|
|
*
|
|
* The rem to px conversions don't seem to hold on my Dell 2408 display,
|
|
* but do seem correct on iOS. Need to look into this.
|
|
*/
|
|
|
|
/* Small screen is the default set of styles */
|
|
@screen-iphone-landscape: 35.5rem; /* ~ 568px */
|
|
@screen-medium: 40rem; /* ~ 640px */
|
|
@screen-large: 64rem; /* ~ 1024px */
|
|
|
|
html { font-size: 100%; }
|
|
|
|
@media (min-width: @screen-medium) {
|
|
html { font-size: 112%; }
|
|
}
|
|
|
|
@media (min-width: @screen-large) {
|
|
html { font-size: 120%; }
|
|
}
|
|
|
|
*, *:before, *:after {
|
|
-moz-box-sizing: border-box;
|
|
-webkit-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.container {
|
|
margin: 0 auto;
|
|
max-width: 48rem;
|
|
width: 90%;
|
|
}
|
|
|
|
@media (min-width: @screen-medium) {
|
|
.column {
|
|
float: left;
|
|
padding-left: 1rem;
|
|
padding-right: 1rem;
|
|
}
|
|
|
|
.column.full { width: 100%; }
|
|
.column.two-thirds { width: 66.7%; }
|
|
.column.half { width: 50%; }
|
|
.column.third { width: 33.3%; }
|
|
.column.fourth { width: 24.95%; }
|
|
.column.flow-opposite { float: right; }
|
|
}
|
|
|
|
|
|
/**
|
|
* Modern clearfix hack
|
|
* http://nicolasgallagher.com/micro-clearfix-hack/
|
|
*/
|
|
.clearfix:before,
|
|
.clearfix:after {
|
|
content: " ";
|
|
display: table;
|
|
}
|
|
.clearfix:after {
|
|
clear: both;
|
|
}
|
|
|
|
|
|
/**
|
|
* Super barebones responsive images
|
|
*/
|
|
|
|
img {
|
|
max-width: 100%;
|
|
}
|
|
|
|
|
|
/**
|
|
* Site styles
|
|
*/
|
|
|
|
// colors
|
|
@background: #f7f7f7;
|
|
@text: #222;
|
|
@highlight: #a00;
|
|
|
|
@rss-orange: #f60;
|
|
@twitter-blue: #4099ff;
|
|
|
|
// font weight
|
|
@weight-thin: 400;
|
|
|
|
body {
|
|
background-color: @background;
|
|
color: @text;
|
|
font-family: 'Helvetica Neue', 'Verdana', 'Roboto', sans-serif;
|
|
}
|
|
|
|
a {
|
|
color: lighten(@highlight, 5%);
|
|
}
|
|
|
|
a:visited {
|
|
color: @highlight;
|
|
}
|
|
|
|
header.primary {
|
|
background-color: darken(@text, 5%);
|
|
color: @background;
|
|
padding: 0.4rem 0.8rem;
|
|
border-bottom: solid 1px lighten(@text, 40%);
|
|
box-shadow: 0 0 12px 2px @text;
|
|
|
|
.title {
|
|
float: left;
|
|
}
|
|
|
|
h1, h4 {
|
|
display: inline-block;
|
|
margin: 0;
|
|
padding: 0;
|
|
font-weight: @weight-thin;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
h1 {
|
|
height: 1.3rem;
|
|
font-size: 1.3rem;
|
|
|
|
a, a:visited {
|
|
color: @background;
|
|
}
|
|
}
|
|
|
|
h4 {
|
|
height: 0.8rem;
|
|
font-size: 0.8rem;
|
|
color: darken(@background, 10%);
|
|
}
|
|
|
|
nav {
|
|
|
|
/* Fix font rendering bugs in Safari. In this case, font weight differences
|
|
* with the #octocat's fixed position, font weight in landscape on iPhone,
|
|
* and probably other ones I hadn't discovered yet.
|
|
*/
|
|
-webkit-transform: translate3d(0, 0, 0);
|
|
|
|
padding-top: 0.5rem;
|
|
clear: left;
|
|
font-size: 1.1rem;
|
|
|
|
@media (min-width: @screen-iphone-landscape) {
|
|
float: right;
|
|
clear: none;
|
|
|
|
padding: 0.55rem 0;
|
|
height: 1rem;
|
|
}
|
|
|
|
a, a:visited {
|
|
color: @highlight;
|
|
}
|
|
|
|
ul {
|
|
margin: 0;
|
|
padding: 0;
|
|
|
|
li {
|
|
display: inline-block;
|
|
list-style-type: none;
|
|
padding: 0.1rem 0.62rem;
|
|
}
|
|
|
|
li i.fa {
|
|
color: darken(@background, 10%);
|
|
|
|
-o-transition: 0.2s;
|
|
-ms-transition: 0.2s;
|
|
-moz-transition: 0.2s;
|
|
-webkit-transition: 0.2s;
|
|
transition: 0.2s;
|
|
}
|
|
|
|
li.email i.fa:hover {
|
|
color: lighten(@background, 10%);
|
|
}
|
|
|
|
li.rss i.fa:hover {
|
|
color: desaturate(@rss-orange, 20%);
|
|
}
|
|
|
|
li.twitter i.fa:hover {
|
|
color: desaturate(@twitter-blue, 20%);
|
|
}
|
|
|
|
} /* ul */
|
|
} /* nav */
|
|
} /* header.primary */
|
|
|
|
/* Improve colours in mobile Safari ... wish I could include desktop Safari somehow */
|
|
@media screen and (-webkit-min-device-pixel-ratio: 2) {
|
|
header.primary nav {
|
|
a, a:visited {
|
|
color: lighten(@highlight, 10%);
|
|
}
|
|
}
|
|
}
|
|
|
|
footer {
|
|
border-top: solid 1px lighten(@text, 70%);
|
|
padding: 1rem 0;
|
|
text-align: center;
|
|
color: lighten(@text, 30%);
|
|
|
|
a, a:visited {
|
|
color: lighten(@text, 30%);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
* Archive
|
|
*/
|
|
|
|
ul.archive {
|
|
padding-left: 0;
|
|
margin-left: 5%;
|
|
margin-bottom: 2rem;
|
|
list-style-type: none;
|
|
|
|
@media (min-width: @screen-medium) {
|
|
margin-right: 5%;
|
|
}
|
|
|
|
li {
|
|
margin: 0.8rem 0;
|
|
|
|
a {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.date {
|
|
font-size: 80%;
|
|
padding-left: 0.5rem;
|
|
color: lighten(@text, 30%);
|
|
// float: right;
|
|
} /* .date */
|
|
|
|
} /* li */
|
|
|
|
} /* ul.archive */
|
|
|
|
|
|
/**
|
|
* Projects
|
|
*/
|
|
|
|
#octocat {
|
|
position: fixed;
|
|
bottom: 1rem;
|
|
width: 96%;
|
|
text-align: center;
|
|
z-index: -1;
|
|
opacity: 0.1;
|
|
|
|
@media (min-width: @screen-medium) {
|
|
right: 1rem;
|
|
width: auto;
|
|
}
|
|
}
|
|
|
|
.project-listing {
|
|
margin-bottom: 1rem;
|
|
|
|
h4, p {
|
|
margin: 0.5rem 0;
|
|
}
|
|
|
|
}
|
|
|
|
.project-stats {
|
|
text-align: center;
|
|
margin: 2rem 0;
|
|
|
|
a {
|
|
padding: 0 0.3rem;
|
|
}
|
|
|
|
}
|
|
|
|
body.projects:not(.index) .container {
|
|
h2, h4 {
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
.project-info {
|
|
|
|
h3 {
|
|
text-align: center;
|
|
margin-bottom: 0.2rem;
|
|
}
|
|
|
|
.column {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
ul {
|
|
padding-left: 0;
|
|
text-align: center;
|
|
|
|
li {
|
|
list-style-type: none;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* Posts
|
|
*/
|
|
|
|
article header h2 {
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
blockquote {
|
|
margin-left: 6%;
|
|
font-style: italic;
|
|
color: lighten(@text, 15%);
|
|
}
|
|
|
|
blockquote:before {
|
|
content: '\201F'; // left double curly quote
|
|
float: left;
|
|
margin-top: -0.35rem;
|
|
margin-left: -1rem;
|
|
font-size: 150%;
|
|
}
|
|
|
|
ul.audio li {
|
|
height: 2rem;
|
|
margin: 0.5rem 0;
|
|
}
|
|
|
|
ul.audio audio {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
pre {
|
|
background-color: darken(@background, 5%);
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
pre.line-numbers {
|
|
float: left;
|
|
margin-top: 0;
|
|
color: #888;
|
|
}
|