Skip to content

Commit 403736a

Browse files
committed
added support for drafts
1 parent 9311bbc commit 403736a

33 files changed

+279
-278
lines changed

_layouts/category_index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<main class="post-list">
66
<h1>Category: {{ page.category }}</h1>
77

8-
{% for post in site.categories[page.category] %}
8+
{% assign published_posts = site.categories[page.category] | where: "published", "true" %}
9+
{% for post in published_posts %}
910
<article class="post">
1011
<div class="post-info">
1112
{% if post.author %}<strong>Author:</strong> {{ post.author }}<br>{% endif %}

_posts/2015-04-25-welcome.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
---
22
title: Welcome
3-
date: 2015-04-25 18:44:00 +0000
3+
date: 2015-04-25T18:44:00.000Z
44
categories:
5-
- announcement
5+
- announcement
66
layout: post
7+
published: true
78
---
89

910
![laptop](/assets/laptop.jpg)
1011

1112
Welcome to my blog. I am a frontend .NET web developer (mainly ASP.net MVC with C#).
1213
At home I use Linux exclusively and code in Python, Haskell, PHP (with the excellent
13-
[Laravel][1] framework), or any other language that fits the bill.
14+
[Laravel](http://laravel.org/) framework), or any other language that fits the bill.
1415

1516
I plan to post about programming mainly, but I may also post on other topics as well.
1617
Stay tuned -- or don't (I won't hate you).
1718

1819
## P.S.
1920

2021
"Expositus" is Latin for "open" and "accessible".
21-
22-
[1]:http://laravel.org/
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
---
22
title: Pseudo-Element Kung-Fu
3-
date: 2015-05-08 00:00:00 +0000
3+
date: 2015-05-08T00:00:00.000Z
44
categories:
5-
- css
6-
- programming
7-
- web
5+
- css
6+
- programming
7+
- web
88
layout: post
9+
published: true
910
---
1011

1112
I recently found that the `content` property can contain cooler stuff than just
1213
strings. For instance, you can show the `href` of a link in a cool popup with
1314
absolutely no JS:
1415

15-
~~~css
16+
```css
1617
content: attr(href);
17-
~~~
18+
```
1819

1920
<p data-height="378" data-theme-id="6851" data-slug-hash="YXypBV" data-default-tab="result" data-user="flyingfisch" class='codepen'>See the Pen <a href='http://codepen.io/flyingfisch/pen/YXypBV/'>Pure CSS link hover popup</a> by flyingfisch (<a href='http://codepen.io/flyingfisch'>@flyingfisch</a>) on <a href='http://codepen.io'>CodePen</a>.</p>
2021
<script async src="//assets.codepen.io/assets/embed/ei.js"></script>
2122

2223
This allows us to show popups without JS as well, like so:
2324

24-
~~~markup
25+
```markup
2526
<span class="popup" data-popuptext="This is a CSS-only popup!">Hover!</span>
26-
~~~
27+
```
2728

28-
~~~css
29+
```css
2930
span.popup:hover:after {
3031
content: attr(data-popuptext);
3132
}
32-
~~~
33+
```
3334

3435
And of course a live demo with the full source:
3536

3637
<p data-height="268" data-theme-id="6851" data-slug-hash="oXbBXz" data-default-tab="result" data-user="flyingfisch" class='codepen'>See the Pen <a href='http://codepen.io/flyingfisch/pen/oXbBXz/'>Pure CSS hover popup</a> by flyingfisch (<a href='http://codepen.io/flyingfisch'>@flyingfisch</a>) on <a href='http://codepen.io'>CodePen</a>.</p>
3738
<script async src="//assets.codepen.io/assets/embed/ei.js"></script>
3839

3940
That's all I've got, have fun messing around with `content`!
40-

_posts/2015-05-17-using-rest-internally.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
---
22
title: Using REST Inside Programs
3-
date: 2015-05-17 00:00:00 +0000
3+
date: 2015-05-17T00:00:00.000Z
44
categories:
5-
- programming
6-
- web
5+
- programming
6+
- web
77
layout: post
8+
published: true
89
---
910

10-
Rich Hickey proposed an interesting idea in his [keynote at RailsConf 2012][1].
11+
Rich Hickey proposed an interesting idea in his [keynote at RailsConf 2012](https://www.youtube.com/watch?v=rI8tNMsozo0).
1112
The idea, if I understand correctly, is that if serialization is good between
1213
servers as a way to separate concerns, then why don't we do it between different
1314
sections of code on the same server?
1415

1516
Using REST between different code blocks seems like a good idea, but serialization seems a bit useless
1617
in my humble opinion, since it only seems to add complexity to the program.
1718

18-
I decided to write a little [proof-of-concept][2] for this program in Python.
19+
I decided to write a little [proof-of-concept](https://github.com/flyingfisch/python-rest-poc/commits?author=flyingfisch) for this program in Python.
1920
There is a module `rest.py` which currently contains one class: `CRUD`. `CRUD`
2021
has four built-in functions: `create()`, `read()`, `update()`, and `delete()`.
2122

2223
Here is the documentation for each of the built-in functions:
2324

24-
~~~python
25+
```python
2526
create(object)
2627
"""
2728
Creates a new object.
@@ -49,12 +50,12 @@ Deletes object from list.
4950
Keyword arguments:
5051
objectId -- Key of object to delete
5152
"""
52-
~~~
53+
```
5354

5455
The built-in commands operate on an internal list `_objects`, accessible through
5556
`read()`. Here is a simple example using the default methods.
5657

57-
~~~python
58+
```python
5859
from rest import CRUD
5960

6061
# A dictionary entry class
@@ -86,9 +87,6 @@ Dictionary.Delete(0)
8687

8788
# Print the (empty) dictionary out to the terminal
8889
print(Dictionary.read())
89-
~~~
90+
```
9091

9192
Not sure how useful this is going to be, but it was fun to code up!
92-
93-
[1]:https://www.youtube.com/watch?v=rI8tNMsozo0
94-
[2]:https://github.com/flyingfisch/python-rest-poc/commits?author=flyingfisch

_posts/2015-05-25-building-a-modern-website-part-0.md

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
title: 'Building a Modern Website: Part 0'
3-
date: 2015-05-25 00:00:00 +0000
3+
date: 2015-05-25T00:00:00.000Z
44
categories:
5-
- frontend
6-
- design
7-
- tutorial
8-
- modern-website-series
5+
- frontend
6+
- design
7+
- tutorial
8+
- modern-website-series
99
layout: post
10+
published: true
1011
---
1112

1213
This is the first of a [3-post series](/modern-website-series/) series on building a modern website. The demo website is a fictional sailing club's homepage. This post covers the mockup process and building the header. The next part will go into the navigation bar and body text.
@@ -27,7 +28,6 @@ Since this is going to be responsive, we need to have a mobile layout as well.
2728
<figcaption>Wireframe for mobile layout.</figcaption>
2829
</figure>
2930

30-
3131
# Colors
3232

3333
The colors for this site are going to be blue and white. I got the exact shades straight from the [Tango project's color palette](http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines#Color_Palette).
@@ -43,25 +43,25 @@ The first thing I like to do before actually designing the site is find a font t
4343

4444
Here is the `link` tag for the fonts, we're just going to add it into the header. Although there are other methods of using Google Fonts, the `link` tag has the best browser support.
4545

46-
~~~markup
46+
```markup
4747
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700|Alegreya:400,400italic,700,700italic" rel="stylesheet" type="text/css">
48-
~~~
48+
```
4949

5050
We will also be using [Normalize.css](https://necolas.github.io/normalize.css/) which basically gives you a starting point that looks the same across all browsers. Since we want to override it's styles with ours we put it's link tag first. Our `head` tag should look something like this now:
5151

52-
~~~markup
52+
```markup
5353
<head>
5454
<title>R. S. Sailing Club</title>
5555
5656
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700|Alegreya:400,400italic,700,700italic" rel="stylesheet" type="text/css">
5757
<link href="/css/normalize.css" rel="stylesheet" type="text/css">
5858
<link href="/css/style.css" rel="stylesheet" type="text/css">
5959
</head>
60-
~~~
60+
```
6161

6262
We're going to be using [SASS](http://sass-lang.com/) for the stylesheets, but don't worry, I'll explain any nuances we come across in the project. For now, just think of it as CSS with extra features. Here is our stylesheet so far:
6363

64-
~~~scss
64+
```scss
6565
html, body {
6666
width: 100%;
6767
height: 100%;
@@ -79,17 +79,17 @@ body {
7979
h1, h2, h3, h4, h5, h6 {
8080
font-family: 'Montserrat', sans-serif;
8181
}
82-
~~~
82+
```
8383

8484
# Designing the header
8585

8686
Now that the fonts have been selected, we can start on the header. The markup for now is pretty simple.
8787

88-
~~~markup
88+
```markup
8989
<header>
9090
<h1>R. S. Sailing Club</h1>
9191
</header>
92-
~~~
92+
```
9393

9494
Now let's get into the CSS. We want the background of the header to be dark blue, and the font should be white. Here is the site so far:
9595

@@ -104,45 +104,45 @@ This is probably a good time to go over a couple important SASS features: variab
104104

105105
Variables names start with a `$`, and can contain any information you can put in a property. For example:
106106

107-
~~~scss
107+
```scss
108108
$my-border: 2px solid black;
109109

110110
div {
111111
border: $my-border;
112112
}
113-
~~~
113+
```
114114

115115
That compiles to this CSS:
116116

117-
~~~css
117+
```css
118118
div {
119119
border: 2px solid black;
120120
}
121-
~~~
121+
```
122122

123123
# Nested Selectors
124124

125125
If you want to select an element inside another element, you can nest the selectors. Here is an example:
126126

127-
~~~scss
127+
```scss
128128
header {
129129
h1 {
130130
color: #fff;
131131
}
132132
}
133-
~~~
133+
```
134134

135135
This compiles to:
136136

137-
~~~css
137+
```css
138138
header h1 {
139139
color: #fff;
140140
}
141-
~~~
141+
```
142142

143143
You can also use the `&` to select the parent element, like this:
144144

145-
~~~scss
145+
```scss
146146
a {
147147
color #000;
148148
text-decoration: none;
@@ -151,19 +151,16 @@ a {
151151
text-decoration: underline;
152152
}
153153
}
154-
~~~
154+
```
155155

156156
Which compiles into this CSS:
157157

158-
~~~css
158+
```css
159159
a {
160160
color: #000;
161161
text-decoration: none;
162162
}
163163
a:hover {
164164
text-decoration: underline;
165165
}
166-
~~~
167-
168-
169-
166+
```

_posts/2015-05-28-tolkien-ipsum.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
title: Announcing Tolkien Ipsum
3-
date: 2015-05-28 00:00:00 +0000
3+
date: 2015-05-28T00:00:00.000Z
44
categories:
5-
- announcement
5+
- announcement
66
layout: post
7+
published: true
78
---
89

910
I built a little website that generates Lord of the Rings themed Lorem Ipsum. You can [check it out live](http://tolkienipsum.cloudapp.net/) or view the source on [GitHub](https://github.com/flyingfisch/tolkienIpsum).

0 commit comments

Comments
 (0)