Add navbar

This commit is contained in:
Jeremy Dormitzer 2019-06-08 10:51:08 -04:00
parent 28328b8870
commit a950f6dce8
10 changed files with 70 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -35,3 +35,21 @@
font-weight: bold;
font-style: italic;
}
@font-face {
font-family: 'Century Supra (Small Caps)';
src: url('Century Supra C3 Regular.otf') format('opentype'),
url('Century Supra C3 Regular.ttf') format('truetype'),
url('century_supra_c3_regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Century Supra (Small Caps)';
src: url('Century Supra C3 Bold.otf') format('opentype'),
url('Century Supra C3 Bold.ttf') format('truetype'),
url('century_supra_c3_bold.woff') format('woff');
font-weight: bold;
font-style: normal;
}

4
src/index.ptree Normal file
View File

@ -0,0 +1,4 @@
#lang pollen
index.html
blog

View File

@ -2,14 +2,17 @@
(define navbar-height 60)
(define serif-font-stack "'Century Supra', 'Palatino Linotype', Palatino, Palladio, 'URW Palladio L', 'Book Antiqua', Baskerville, 'Bookman Old Style', 'Bitstream Charter', 'Nimbus Roman No9 L', Garamond, 'Apple Garamond', 'ITC Garamond Narrow', 'New Century Schoolbook', 'Century Schoolbook', 'Century Schoolbook L', Georgia, serif")
(define small-caps-font-stack "'Century Supra (Small Caps)', 'Palatino Linotype', Palatino, Palladio, 'URW Palladio L', 'Book Antiqua', Baskerville, 'Bookman Old Style', 'Bitstream Charter', 'Nimbus Roman No9 L', Garamond, 'Apple Garamond', 'ITC Garamond Narrow', 'New Century Schoolbook', 'Century Schoolbook', 'Century Schoolbook L', Georgia, serif")
(define monospace-font-stack "'Triplicate Code', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace")
(define body-color "#404040")
(define link-color "royalblue")
(define link-hover-color "midnightblue")
(define link-visited-color "purple")
(define nav-hover-color "#707070")
body {
height: 100%;
max-width: 1920px;
display: flex;
flex-direction: column;
justify-content: space-between;
@ -17,11 +20,16 @@ body {
font-family: |serif-font-stack|;
color: |body-color|;
line-height: 1.5;
margin: 0;
margin: auto;
font-feature-settings: 'kern' 1;
text-rendering: optimizeLegibility;
}
header {
height: |navbar-height|px;
margin-top: 1em;
}
footer {
text-align: center;
padding: 1em 0 1em 0;
@ -54,6 +62,10 @@ pre > code.hljs {
padding: 1.5em;
}
.site {
height: 100%;
}
.main {
display: grid;
grid-template-columns: repeat(12, 1fr);
@ -67,6 +79,28 @@ pre > code.hljs {
hyphens: auto;
}
ul.navigation {
list-style: none;
margin: 0;
padding: 0;
}
ul.navigation > li {
display: inline;
margin-left: 2em;
font-family: |small-caps-font-stack|;
font-size: 25px;
letter-spacing: 0.05rem;
}
ul.navigation > li > a {
color: |body-color|;
}
ul.navigation > li > a:hover {
color: |nav-hover-color|;
}
.float-left {
float: left;
margin-right: 1em;

View File

@ -8,8 +8,19 @@
<link rel="stylesheet" type="text/css" href="/stylesheet.css" />
</head>
<body>
<div class="main">
(->html doc)
<div class="site">
<header>
<nav>
<ul class="navigation">
<!-- TODO refactor these into a function to make it easy to add new items -->
<li><a href="/">home</a></li>
<li><a href="/blog">blog</a></li>
</ul>
</nav>
</header>
<div class="main">
(->html doc)
</div>
</div>
<footer>
© Jeremy Dormitzer 2019