1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00
nerd-fonts/_includes/css/main.css
2017-04-24 18:55:08 -04:00

365 lines
7.4 KiB
CSS

html { box-sizing: border-box; }
*, *:before, *:after { box-sizing: inherit; }
/* ---------------------------*/
/* ----- Special Styles ----- */
/* ---------------------------*/
/* ----- colors (autogenerated from _config.yml)----- */
{% for c in site.colors %}
.border-{{c[0]}} { border-color: {{ c[1] }} !important; }
.text-{{c[0]}} { color: {{ c[1] }}; }
.text-{{c[0]}} a { color: {{ c[1] }}; }
.bg-{{c[0]}} { background-color: {{ c[1] }} !important; }
{% endfor %}
/* ----- per-post colors! ----- */
{% for node in site.posts %}
{% capture id %}{{ node.id | remove:'/' | downcase }}{% endcapture %}
{% capture bg %}{% if site.colors[node.bg] %}{{ site.colors[node.bg] }}{% else %}{{ node.bg }}{% endif %}{% endcapture %}
{% capture fg %}{% if site.colors[node.color] %}{{ site.colors[node.color] }}{% else %}{{ node.color }}{% endif %}{% endcapture %}
nav .p-{{id}} { border-color: {{ bg }}; }
#{{id}} { background-color: {{ bg }} !important; color: {{ fg }}; }
#{{id}} a { color: {{ fg }}; }
#{{id}} .sectiondivider { color: {{ bg }}; }
{% endfor %}
/* ----- code, syntax highlighting, etc ----- */
code, pre { font-family: Monaco, Menlo, Consolas, "Courier New", monospace; }
/* spesifically inline code */
code, pre {
background: rgba(255,255,255,0.2);
display: inline;
word-wrap: break-word;
}
/* block code */
pre code { background: none; display: block; }
pre {
display: block;
margin: 20px 5%;
padding: 4px 8px;
background: rgba(255,255,255,0.1);
word-wrap: break-word;
}
.highlight { margin:20px 5%; }
/* ----- base elements ----- */
img {
max-width:100%!important;
height:auto;
vertical-align:middle;
}
hr {
margin:60px auto;
width:50%;
border-color: {{ site.colors.black }};
}
.container { word-wrap: break-word; }
.center { text-align: center; }
.left, .container .left { text-align: left; }
.right, .container .right { text-align: right; }
.container h1, .container h2, .container h3, .container h4 {
margin-bottom: 20px;
text-align: center;
padding: 0 4%;
}
.container p, .container ol, .container ul {
font-size: 17px;
padding: 0 5%;
}
.container ol, .container ul { padding: 0 8%; }
.container p:first-of-type {
margin-top: 10px;
}
/* keep embedded videos fluid! */
.icontain {
position: relative;
height: 0;
overflow: hidden;
padding-bottom: 56.25%; /* keep 16x9 Aspect Ratio */
}
.i4x3 { padding-bottom: 75.00%; } /* keep 4x3 Aspect Ratio */
.icontain iframe {
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
}
.inlineblock {
display:-moz-inline-stack;
display:inline-block;
zoom:1;
*display:inline;
}
/* ---------------------------*/
/* ----- Main Structure ----- */
/* ---------------------------*/
/* ----- top menu ----- */
{% assign navborder = 3 %}
{% assign navborder_active = 6 %}
nav {
font-size:15px;
width:100%;
position:fixed;
z-index:100;
top:0;
left:0;
background:#2e2e2e;
}
nav ul {
list-style:none;
text-align:center;
padding:0;
margin:0;
letter-spacing:-4px;
}
nav ul li {
display:inline-block;
border-top:{{navborder}}px solid;
padding: {{navborder}}px;
*display:inline;
zoom:1;
line-height:normal;
letter-spacing:normal;
text-transform:uppercase;
min-width:110px;
line-height:60px;
margin:0;
}
nav ul li a, nav ul li a:visited {
display:block;
color:#fff;
text-decoration:none;
font-weight:600;
opacity:.75;
}
nav ul li a:hover {
opacity:1
}
nav ul li:hover, nav ul li.active {
border-top-width: {{navborder_active}}px;
padding-top: 0;
}
/* ----- sections/articles ----- */
.section {
position:relative;
display:block;
width:100%;
min-height:300px;
padding:210px 0;
background:url(img/bgnoise.png);
/* generated noise from noisetexturegenerator.com */
}
.section:first-of-type {
padding-top: 90px;
}
#footer {
padding: 8px 0;
min-height:0;
text-align:center;
background-color:#2e2e2e;
background-image:none;
}
#footer .container p { font-size:13px; margin:0; }
.subtlecircle {
text-align:center;
z-index:3;
border-radius:50%;
-moz-border-radius:50%;
-webkit-border-radius:50%;
box-shadow: 0px 1px 15px rgba(0,0,0,0.05);
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAF0lEQVQIHWP8//+/MQMaYELjg7kUCgIASm8DOqGzfp8AAAAASUVORK5CYII=);
}
.sectiondivider {
width:270px;
height:270px;
padding:15px;
position:absolute;
top:-135px;
left:50%;
margin-left:-135px;
}
.sectiondivider img {
width:200px;
height:240px;
position: static;
margin-top: -20px;
}
.sectiondivider .fa-stack {
font-size: 130px;
position: static;
margin-top: -8px;
}
.sectiondivider .fa-circle { color: #fff; }
.sectiondivider h5 {
font-size:15px;
font-weight:700;
text-transform:uppercase;
position:absolute;
bottom:50px;
left:auto;
text-align:center;
display:block;
z-index:6;
width:240px;
}
.sectiondivider.imaged {
text-shadow: 1px 1px 3px #333;
}
.columned {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
-webkit-column-gap: 40px;
-moz-column-gap: 40px;
column-gap: 40px;
-webkit-column-rule: 1px outset rgba(255,255,255,0.5);
-moz-column-rule: 1px outset rgba(255,255,255,0.5);
column-rule: 1px outset rgba(255,255,255,0.5);
}
.longlist { font-size: 14px !important; }
.longlist li { margin-bottom: 3px; }
/* ----- fork on github banner ----- */
#forkongithub a {
color:#fff;
text-decoration:none;
font-family:arial,sans-serif;
text-align:center;
font-weight:700;
font-size:1rem;
line-height:2rem;
position:relative;
transition:.5s;
padding:5px 40px;
}
#forkongithub a::before, #forkongithub a::after {
content:""; width:100%; display:block; position:absolute;
top:1px; left:0; height:1px; background:#fff;
}
#forkongithub a::after { bottom:1px; top:auto; }
@media screen and (min-width:800px) {
#forkongithub {
position:fixed;
display:block;
top:0;
right:0;
width:200px;
overflow:hidden;
height:209px;
z-index:9999;
}
#forkongithub a {
width:200px;
position:absolute;
top:60px;
right:-60px;
transform:rotate(45deg);
-webkit-transform:rotate(45deg);
-ms-transform:rotate(45deg);
-moz-transform:rotate(45deg);
-o-transform:rotate(45deg);
box-shadow:4px 4px 10px rgba(0,0,0,0.8);
box-sizing: content-box;
}
}
/* mid size (tablets, landscapes) */
@media only screen and (max-width: 679px) {
nav { font-size:11px; }
nav ul li {
min-width:60px;
line-height:40px;
}
.section:first-of-type {
padding-top: 70px;
}
}
/* tiny size (phones) */
@media only screen and (max-width: 380px) {
nav ul li { min-width:90px; line-height:20px; }
.section:first-of-type {
padding-top: 70px;
}
}
/* anything not desktop */
@media only screen and (max-width: 767px) {
.container h1 { font-size: 30px; }
.container h2 { font-size: 24px; }
.container h3 { font-size: 20px; }
.container h4 { font-size: 18px; }
.section { padding:130px 0; }
.sectiondivider {
width:200px;
height:200px;
padding:15px;
top:-100px;
margin-left:-100px;
}
.sectiondivider img {
width:150px;
height:180px;
}
.sectiondivider .fa-stack {
font-size: 100px;
margin-top: -14px;
}
.sectiondivider h5 {
font-size:15px;
bottom:30px;
width:170px
}
.columned {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
}
}