zombie-globbies
Version:
A very quick fix for [**Zombie**](https://github.com/assaf/zombie) to permit to crawl correctly webpages with attributes on the html tag (eg: html lang="en").
266 lines (249 loc) • 4.79 kB
CSS
/** General content styles **/
body {
font-family: "Helvetica Neue", "Calibri", "Helvetica", "Verdana";
font-size: 13pt;
line-height: 1.3;
color: #222;
margin: 0;
padding: 0;
text-rendering: optimizeLegibility;
}
h1 {
font-size: 300%;
margin: 0 0 0.6em 0;
}
h1, h2, h3, h4 {
font-family: "Optima", "Helvetica", "Trebuchet MS";
color: steelblue;
font-weight: 700;
margin: 1.2em 0 0.6em 0;
text-rendering: optimizeLegibility;
}
p {
margin: 0 0 0.6em 0;
}
pre, code {
font-family: "Source Code Pro", "Menlo", "Courier New";
font-size: 11pt;
color: #666;
line-height: 1.2;
overflow: auto;
overflow-y: hidden;
white-space: pre;
}
pre, .code {
background: #eef;
padding: 0.1em 0.3em 0.6em 0.3em;
}
h4 code {
color: steelblue;
}
a {
color: steelblue;
text-decoration: none;
}
a:hover, a:active {
border-bottom: 1px solid steelblue;
}
ol, ul {
margin: 0.6em 0 0.6em 0;
padding: 0;
counter-reset: list-item;
}
li {
list-style: none;
margin: 0 0 0.6em 1.5em;
padding: 0;
counter-increment: list-item;
}
ol li:before {
content: counter(list-item, decimal) ".";
font-weight: 400;
margin: 0 0.5em 0 -1.0em;
width: 1.5em;
display: inline-block;
text-align: right;
}
ul li:before {
content: "\2022";
font-weight: 300;
margin: 0 0.5em 0 -1.0em;
}
blockquote {
margin: 1.1em 2.3em 1.1em 2.3em;
color: #777;
font-style: italic;
}
em {
font-style: italic;
}
strong {
font-weight: 700;
color: #333;
}
/** Content size and margins for different devices **/
/* On narrow devices, we fix the page width a 480px and apply minimal margins.
* On wider devices (e.g iPad), we allow the content to expand to fix the page
* with reasonable margins.
* Every wider (desktop), we keep the content at a maximum width of 780px.
*/
.content {
padding: 1em 0 4em 0;
}
@media screen and (max-width: 480px) {
.content {
width: 480px;
}
}
@media screen and (max-width: 1024px) {
.content {
width: auto;
margin: 0px 12px;
}
}
@media screen and (min-width: 1024px) {
.content {
margin: 0px auto;
width: 780px;
}
}
/** Navigation bar **/
#navigation-bar {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 9;
background: #444;
line-height: 28px;
overflow: hidden;
padding: 4px 0;
box-shadow: 0px 12px 36px #fff;
font-size: 14pt;
font-weight: 700;
-webkit-transition: all .5s ease-in-out;
-moz-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
}
#navigation-bar.contracted {
height: 28px;
}
#navigation-bar.expanded {
}
#navigation-bar a.expand {
position: absolute;
right: 0;
top: 0;
padding: 4px 12px;
z-index: 99;
display: block;
background: #444;
border: none;
width: 4em;
}
#navigation-bar a.expand span:before {
content: "\02261\0A0 More";
}
#navigation-bar.expanded a.expand span:before {
content: "\02261\0A0 Close";
}
#navigation-bar ul {
list-style: none;
padding: 0 0 0.6em 1.2em;
margin: 0;
}
#navigation-bar.contracted li {
display: none;
}
#navigation-bar.contracted li.always-shown {
display: inline-block;
}
#navigation-bar li {
display: inline-block;
padding: 0;
margin: 0 5em 6px 0;
}
#navigation-bar a {
color: #eee;
white-space: pre;
display: block;
border-bottom: 2px solid #444;
}
#navigation-bar a:hover {
border-bottom: 2px solid #fff;
}
#navigation-bar li:before {
display: none;
}
/* On iPhone we show Menu link instead of full navigation bar.
* Likewise, when open we show Close button.
*/
@media screen and (max-width: 480px) {
#navigation-bar.contracted {
background: transparent;
box-shadow: none;
}
#navigation-bar a.expand span:before {
content: "\02261\0A0 Menu" ;
}
#navigation-bar.expanded a.expand span:before {
content: "\02261\0A0 Close" ;
}
#navigation-bar.contracted ul {
margin-left: 100%;
}
#navigation-bar a.expand {
border: none;
}
}
/** Printing **/
@media print {
body {
margin: 0.75in 0.5in 1.25in 0.5in;
color: #000;
font-family: "Garamond";
}
.content {
padding: 0 ;
margin: 0;
width: 100%;
overflow: hidden;
}
h2, h3, h4 {
page-break-after: avoid;
}
p, pre, code, ul, ol, blockquote, .syntaxhighlighter {
page-break-inside: avoid;
widows: 3;
orphans: 3;
font-size: 10pt;
}
#navigation-bar {
display: none;
}
@page {
counter-increment: pages;
@bottom-center {
font-weight: bolder;
content: "Page " counter(pages);
}
}
}
/** Syntax highlighting **/
code.plain {
}
code.comments {
color: #998;
font-style: italic;
}
code.string {
color: #14d;
}
code.keyword {
color: #000;
}
code.variable {
color: #008080;
}
code.value {
}