Skip to content

Commit 181f498

Browse files
committed
Blog initialized with first post.
1 parent 2e14c5d commit 181f498

18 files changed

+247
-130
lines changed

_config.yml

+33-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,39 @@ vimeo_username: codercoded
1212
# Build settings
1313
markdown: kramdown
1414

15+
gems: [jekyll/responsive_image]
16+
17+
responsive_image:
18+
# [Required]
19+
# Path to the image template.
20+
template: _includes/blog-image-medium.html
21+
22+
23+
# [Optional, Default: []]
24+
# An array of resize configuration objects. Each object must contain at least
25+
# a `width` value.
26+
27+
# Use always 3 sizes, since we use static indexes
28+
sizes:
29+
- width: 480 # [Required] How wide the resized image will be.
30+
- width: 800
31+
- width: 1400
32+
33+
# [Optional, Default: assets/resized/%{filename}-%{width}x%{height}.%{extension}]
34+
# The template used when generating filenames for resized images. Must be a
35+
# relative path.
36+
#
37+
# Parameters available are:
38+
# %{basename} Basename of the file (assets/some-file.jpg => some-file.jpg)
39+
# %{filename} Basename without the extension (assets/some-file.jpg => some-file)
40+
# %{extension} Extension of the file (assets/some-file.jpg => jpg)
41+
# %{width} Width of the resized image
42+
# %{height} Height of the resized image
43+
#
44+
output_path_format: images/resized/%{width}/%{basename}
45+
46+
1547
# Serve settings
1648
host: 0.0.0.0
1749

18-
production: true
50+
production: false

_includes/blog-image-medium.html

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div class="image">
2+
<a href="/{{ original.path }}" target="_blank"><img src="/{{ resized[1].path }}"></a>
3+
<div class="caption">{{ title }}</div>
4+
</div>

_includes/blog-image-small.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<img src="/images/resized/{{resized[0].width}}/{{ resized[0].path }}" href="{{ original.path }}" target="_blank">

_includes/nav.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<li><a href="#work">Work</a></li>
55
<li><a href="#references">References</a></li>
66
<li><a href="#contact">Contact</a></li>
7-
<!-- <li><a href="/blog/">Blog</a></li> -->
7+
<li><a href="/blog/">Blog</a></li>
88
</ul>
99
</nav>

_includes/nav_blog.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<li><a href="/#work">Work</a></li>
66
<li><a href="/#references">References</a></li>
77
<li><a href="/#contact">Contact</a></li>
8-
<!-- <li><a href="/blog/">Blog</a></li> -->
8+
<li><a href="/blog/">Blog</a></li>
99
</ul>
1010
</nav>

_includes/responsive-image.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% capture srcset %}
2+
{% for i in resized %}
3+
/{{ i.path }} {{ i.width }}w,
4+
{% endfor %}
5+
{% endcapture %}
6+
7+
<img src="/{{ path }}" srcset="{{ srcset | strip_newlines }} /{{ original.path }} {{ original.width }}w">

_layouts/blog.html

+39-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,45 @@
77

88
{% include nav_blog.html %}
99

10-
{{ content }}
10+
11+
<div class="wrapper">
12+
<article class="blog container">
13+
<div class="row">
14+
<div class="8u 12u$(mobile)">
15+
16+
{{ content }}
17+
18+
</div>
19+
20+
<div class="4u 12u$(mobile)">
21+
<div id="sidebar">
22+
23+
<!-- Sidebar -->
24+
<section>
25+
<h3>Coder Coded Blog</h3>
26+
<p>This blog is for posting news about our work and stuff we encounter during hacking.</p>
27+
<footer>
28+
<a href="/#work" class="button">Check out what we do</a>
29+
</footer>
30+
</section>
31+
32+
<section>
33+
<h3>Latest posts</h3>
34+
<ul class="style2">
35+
{% for post in site.posts limit:10 %}
36+
<li>
37+
<span>{{ post.date | date: "%b %d, %Y" }}</span> &raquo; <a href="{{ post.url }}"> {{ post.title }}</a>
38+
</li>
39+
{% endfor %}
40+
</ul>
41+
</section>
42+
43+
</div>
44+
</div>
45+
</div>
46+
</article>
47+
</div>
48+
1149

1250
{% include footer.html %}
1351

_layouts/post.html

+26-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,33 @@
11
---
2-
layout: base
2+
layout: blog
33
---
4-
<div class="post">
54

6-
<header class="post-header">
7-
<h1 class="post-title">{{ page.title }}</h1>
8-
<p class="post-meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
9-
</header>
5+
<div class="post-content">
6+
7+
<div class="date">{{ page.date | date: "%b %d, %Y" }}</div>
8+
9+
<article class="box">
10+
11+
{% assign path = images/{{ page.image }} %}
12+
13+
{% if page.image %}
14+
{% responsive_image_block %}
15+
path: images/{{ page.image }}
16+
alt: {{ page.image_alt }}
17+
title: {{ page.image_alt }}
18+
{% endresponsive_image_block %}
19+
{% endif %}
20+
21+
<h2 class="title">{{ page.title }}</h2>
22+
23+
{% if page.subtitle %}
24+
<h3>{{ page.subtitle }}</h3>
25+
{% endif %}
1026

11-
<article class="post-content">
1227
{{ content }}
28+
29+
<!-- <a href="{{ page.url }}">Read more</a> -->
30+
1331
</article>
1432

15-
</div>
33+
</div>

_posts/2015-10-15-welcome-to-jekyll.markdown

-25
This file was deleted.

_posts/2015-11-09-fear-of-flying.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: post
3+
title: "Our winning hack - Fear of Flying"
4+
subtitle: "Junction 2015 hackathon winner of .AERO track"
5+
date: 2015-11-09 11:48:00
6+
categories: blog
7+
image: fear-of-flying.jpg
8+
image_alt: "Fear of Flying - Apps and ideas to beat aviophobia."
9+
---
10+
11+
30% of people are anxious about flying (at least in some point of their lives). About 6% do not fly at all. _Fear of flying_ or _aviophobia_ is a problem that is recognized, but currently only a handful of innovations exist to cope with it. Some airlines provide hands-on courses a couple of times in a year to cope with aviophobia. These courses cost money, but are highly popular. We realized that there is practically zero content available for aviophobic people during flights.
12+
13+
### What it does
14+
New airplanes have a web server and a wi-fi access point for passengers. We designed a set of apps that utilize an accelerometer attached to the web server and the in-flight portal that provides the landing page for passengers using the airplane wi-fi. We have produced 4 different apps to give you an idea.
15+
16+
### Turbulence meter
17+
18+
Airplanes can take much more than what people experience during turbulence. This meter displays the "safe zone" for airplane and plots the currently experienced g-forces. Demo online [here](http://aero.codercoded.com/turbulence/), *emulate accelerometer from devtools, or view with mobile device.*
19+
20+
### Mood meter
21+
22+
Passengers can now communicate their level of anxiety to the cabin crew by using the passenger mood-meter. It is embarrassing to talk directly to flight attendants about your fears when other people are listening. The mood-meter is a very subtle way to inform cabin crew about the level of anxiety of the passenger, and also the reason - another passenger makes you feel uncomfortable, or you're afraid of current flight conditions. Check out the [cabin crew view](http://aero.codercoded.com/seatmap/) or [passenger app](http://aero.codercoded.com/slider/) demos online.
23+
24+
Cabin crew view shows a "seatmap heatmap" of passenger anxiety levels, making it possible for cabin crew to react in situations during flight.
25+
26+
### Airplane soundtrack
27+
A lot of people think that the airplane makes sounds that are not normal. This app plays the passenger all the normal sounds that airplane makes during flights. This way they can reassure themselves that the sounds they're hearing are perfectly normal
28+
29+
### Fun in the turbulence
30+
31+
We think that turbulence should be _anticipated_ by the passengers. It is our job to come up with ideas that get into life only during turbulence. There could be games or similar that provide rewards during it, or something like we envisioned with wobbly faces / things. Couple of demos: [Kekkonen](http://aero.codercoded.com/fun/) and an [NSFW](http://aero.codercoded.com/boobs/) version.

_sass/_blog.scss

+38-2
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,30 @@
99
position: relative;
1010
}
1111

12+
.title {
13+
font-weight: bold;
14+
}
15+
1216
.box {
1317
display: block;
1418
text-align: left;
1519
@media screen and (max-width: 1600px) {
1620
padding-top: 3.5em;
1721
}
22+
}
1823

24+
.image {
25+
@media screen and (max-width: 1600px) {
26+
margin-top: -1.5em;
27+
}
1928
}
2029

2130
.date {
2231
padding: 0.5em 1em;
2332
color: $gray-lightest;
2433
background-color: $gray-darkest;
2534
position: absolute;
35+
z-index: 100;
2636
top: 16px;
2737
left: -140px;
2838
width: 154px;
@@ -31,8 +41,8 @@
3141

3242
@media screen and (max-width: 1600px) {
3343
left: auto;
34-
top: 4px;
35-
right: 4px;
44+
top: 1em;
45+
right: 1em;
3646
text-align: right;
3747

3848
}
@@ -41,6 +51,22 @@
4151

4252
}
4353

54+
.image {
55+
margin-bottom: 32px;
56+
57+
img {
58+
border: 1px solid $gray-lightest;
59+
}
60+
61+
.caption {
62+
padding: 4px;
63+
font-weight: 300;
64+
font-style: italic;
65+
}
66+
67+
}
68+
69+
4470
.blog-nav {
4571
.logo img {
4672
height: 42px;
@@ -72,6 +98,10 @@
7298

7399
@include breakpoint(mobile) {
74100

101+
.box {
102+
padding: 12px;
103+
}
104+
75105
.blog-nav {
76106
.logo img {
77107
display: none;
@@ -81,7 +111,13 @@
81111
.blog {
82112
.date {
83113
width: 120px;
114+
top: 0.5em;
115+
right: 0.5em;
84116
}
85117
}
86118

119+
.image {
120+
margin-top: -2.5em;
121+
}
122+
87123
}

_sass/_layout.scss

+29
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,31 @@
88
box-shadow: none;
99
}
1010

11+
&.news {
12+
13+
text-align: left;
14+
15+
padding: 2em 0 2em 0;
16+
17+
h1, h2 {
18+
font-weight: bold;
19+
line-height: 1em;
20+
margin-bottom: 0.3em;
21+
}
22+
23+
header {
24+
width: 100%;
25+
margin: 0;
26+
padding: 0;
27+
}
28+
29+
.news-image {
30+
width: 256px;
31+
float: right;
32+
border: 1px solid $gray-lighter;
33+
}
34+
}
35+
1136
&.style1 {
1237
background-color: #303030;
1338
background-image: url('/images/bg.jpg');
@@ -601,6 +626,10 @@
601626
}
602627
}
603628

629+
#news {
630+
padding: 2em;
631+
}
632+
604633
/* Nav */
605634
#nav {
606635
a {

0 commit comments

Comments
 (0)