Skip to content

Commit

Permalink
github homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
dnxbf321 committed Feb 25, 2016
1 parent cd9ce97 commit deb10fc
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 13 deletions.
13 changes: 11 additions & 2 deletions layout/_partial/header.swig
Expand Up @@ -2,9 +2,18 @@
<div class="center">
<div class="wrap">
<div id="site">
<h1><a href="{{ config.root }}">{{ config.title }}</a></h1>
<h1>
<a href="{{ config.root }}">{{ config.title }}</a>
{% if theme.github %}
<a class="github" href="https://github.com/{{ theme.github }}">
<svg aria-hidden="true" class="octicon octicon-mark-github" height="28" role="img" version="1.1" viewBox="0 0 16 16" width="28"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59 0.4 0.07 0.55-0.17 0.55-0.38 0-0.19-0.01-0.82-0.01-1.49-2.01 0.37-2.53-0.49-2.69-0.94-0.09-0.23-0.48-0.94-0.82-1.13-0.28-0.15-0.68-0.52-0.01-0.53 0.63-0.01 1.08 0.58 1.23 0.82 0.72 1.21 1.87 0.87 2.33 0.66 0.07-0.52 0.28-0.87 0.51-1.07-1.78-0.2-3.64-0.89-3.64-3.95 0-0.87 0.31-1.59 0.82-2.15-0.08-0.2-0.36-1.02 0.08-2.12 0 0 0.67-0.21 2.2 0.82 0.64-0.18 1.32-0.27 2-0.27 0.68 0 1.36 0.09 2 0.27 1.53-1.04 2.2-0.82 2.2-0.82 0.44 1.1 0.16 1.92 0.08 2.12 0.51 0.56 0.82 1.27 0.82 2.15 0 3.07-1.87 3.75-3.65 3.95 0.29 0.25 0.54 0.73 0.54 1.48 0 1.07-0.01 1.93-0.01 2.2 0 0.21 0.15 0.46 0.55 0.38C13.71 14.53 16 11.53 16 8 16 3.58 12.42 0 8 0z"></path></svg>
</a>
{% endif %}
</h1>
{% if config.subtitle %}
<h2><a href="{{ config.root }}">{{ config.subtitle }}</a></h2>
<h2>
<a href="{{ config.root }}">{{ config.subtitle }}</a>
</h2>
{{ endif }}
</div>
<nav id="menu">
Expand Down
43 changes: 32 additions & 11 deletions source/css/partial/_header.scss
Expand Up @@ -11,17 +11,6 @@ $margin: 15px;

background: $color-background;
text-shadow: 0 1px 1px rgba(0, 0, 0, .05);
&.small {
padding: 0;

box-shadow: 0 0 5px rgba(0, 0, 0, .1);
h1 {
font-size: 1.5em;
}
h2 {
display: none;
}
}
.center {
.wrap {
display: table;
Expand All @@ -35,6 +24,19 @@ $margin: 15px;
}
a {
color: inherit;
&.github {
display: inline-block;

vertical-align: -2px;

color: #9e9e9e;
&:hover {
color: inherit;
}
.octicon {
fill: currentColor;
}
}
}
}
}
Expand Down Expand Up @@ -74,6 +76,25 @@ $margin: 15px;
}
}

#header.small {
padding: 0;

box-shadow: 0 0 5px rgba(0, 0, 0, .1);
h1 {
font-size: 1.5em;
}
h2 {
display: none;
}
svg.octicon.octicon-mark-github {
width: 22px;
height: 22px;
}
#menu ul {
margin: 22px 0;
}
}

@media screen and (max-width: $width-phone) {
#header {
position: absolute;
Expand Down

0 comments on commit deb10fc

Please sign in to comment.