Implement redesign first stage

This commit is contained in:
Josh Lockhart
2015-09-27 19:29:22 -04:00
parent d1baa3081d
commit a7e08ea53a
9 changed files with 869 additions and 68 deletions

389
less/all.less Normal file
View File

@@ -0,0 +1,389 @@
/******************************************************************************
* Variables
*****************************************************************************/
@serif: georgia, serif;
@sans: verdana, sans-serif;
@phpPurple: #8892BF;
@phpPurpleDark: #4F5B93;
/******************************************************************************
* Basics
*****************************************************************************/
*{
box-sizing: border-box;
}
body{
counter-reset: chapter;
font-size: 24px;
line-height: 32px;
}
h1, h2, h3, h4{
font-family: @serif;
}
h1, .alpha{
position: relative;
font-size: 48px;
font-weight: normal;
line-height: 50px;
text-align: center;
}
h2, .beta{
font-size: 32px;
font-weight: normal;
line-height: 36px;
}
h3, .gamma{
font-size: 24px;
font-weight: bold;
line-height: 30px;
}
blockquote{
border-left: 3px solid #CCC;
padding-left: 20px;
color: #777;
font-style: italic;
word-wrap: break-word;
}
a{
color: @phpPurpleDark;
&:hover{
color: @phpPurple;
}
}
.back-to-top{
text-align: center;
a{
background: @phpPurpleDark;
border-radius: 3px;
display: inline-block;
height: 40px;
padding: 0 20px;
transition: all 0.1s ease;
color: white;
font-family: @sans;
font-size: 13px;
line-height: 40px;
text-decoration: none;
text-transform: uppercase;
&:hover{
background: @phpPurple;
}
}
}
img{
max-width: 100%;
}
pre, code{
color: #777;
font-family: "Source Code Pro", Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
font-size: 85%;
}
a{
pre, code{
color: inherit;
}
}
pre{
background: #f7f7f7;
border: 1px solid #EEE;
border-radius: 3px;
display: block;
overflow: auto;
padding: 20px;
width: 100%;
}
@media (max-width: 767px) {
body{
font-size: 18px;
line-height: 24px;
}
h1, .alpha{
font-size: 36px;
line-height: 38px;
}
h2, .beta{
font-size: 24px;
line-height: 28px;
}
h3, .gamma{
font-size: 18px;
line-height: 23px;
}
blockquote{
margin-left: 0;
}
ul, ol{
padding-left: 1em;
}
pre{
padding: 5px 10px;
}
}
@media (max-width: 360px) {
body{
font-size: 16px;
line-height: 21px;
}
h1, .alpha{
font-size: 28px;
line-height: 30px;
}
h2, .beta{
font-size: 20px;
line-height: 23px;
}
h3, .gamma{
font-size: 16px;
line-height: 20px;
}
}
/******************************************************************************
* Header
*****************************************************************************/
.site-header{
padding-top: 40px;
margin-bottom: 40px;
text-align: center;
h1{
margin: 0;
font-size: 72px;
line-height: 60px;
em{
display: block;
font-size: 34px;
font-style: normal;
}
a{
color: #333;
text-decoration: none;
&:hover{
color: @phpPurple;
}
}
}
.build-date{
margin-bottom: 10px;
color: #999;
font-family: @sans;
font-size: 11px;
text-transform: uppercase;
}
.fork-me{
position: absolute;
top: 0;
right: 0;
z-index: 100;
width: 120px;
}
}
@media (max-width: 767px) {
.site-header{
.fork-me{
width: 100px;
}
}
}
/******************************************************************************
* Navigation
*****************************************************************************/
.site-navigation,
.site-content,
.site-footer{
margin: 0 auto;
max-width: 840px;
width: 92%;
}
.site-navigation{
columns: 3;
column-gap: 40px;
ul{
list-style: none;
margin: 0;
padding: 0;
li{
margin-bottom: 20px;
font-size: 22px;
line-height: 23px;
a{
display: block;
color: #444;
font-weight: 700;
text-decoration: none;
&:hover{
color: @phpPurple;
}
}
ul{
padding-top: 8px;
}
li{
margin-bottom: 6px;
font-size: 18px;
a{
border: none;
color: #777;
font-weight: normal;
}
}
}
}
li{
break-inside: avoid;
}
}
@media (max-width: 820px) {
.site-navigation{
columns: 2;
}
}
@media (max-width: 560px) {
.site-navigation{
columns: 1;
}
}
/******************************************************************************
* Content
*****************************************************************************/
.site-content{
h1{
padding-top: 40px;
position: relative;
&:after{
border: 1px solid #DDD;
border-bottom: none;
content: "";
display: block;
height: 8px;
position: absolute;
left: 0;
top: 0;
width: 100%;
}
}
&.chapters{
counter-reset: chapter;
h1{
counter-increment: chapter;
padding-top: 60px;
&:before{
display: inline-block;
content: "Chapter " counter(chapter) ".";
position: absolute;
top: 30px;
left: 50%;
transform: translateX(-50%);
color: #999;
font-size: 12px;
letter-spacing: 1px;
line-height: 20px;
text-transform: uppercase;
text-align: center;
}
}
}
#welcome{
ul{
columns: 3;
column-gap: 30px;
list-style-position: inside;
}
}
.back-to-top{
margin-bottom: 60px;
}
}
@media (max-width: 870px) {
.site-content #welcome ul{
columns: 2;
}
}
@media (max-width: 600px) {
.site-content #welcome ul{
columns: 1;
}
}
/******************************************************************************
* Footer
*****************************************************************************/
.site-footer{
border-top: 1px solid #CCC;
margin: 60px auto 0 auto;
padding: 40px 20px;
font-family: @sans;
font-size: 16px;
text-align: center;
h2{
.gamma;
margin-bottom: 10px;
}
ul{
list-style: none;
margin: 0 0 20px 0;
padding: 0;
}
.license{
color: #777;
font-size: 13px;
}
}