Skip to content

Commit 3feff6f

Browse files
committed
moved page title to navbar
1 parent 508446a commit 3feff6f

File tree

14 files changed

+105
-52
lines changed

14 files changed

+105
-52
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
I"X{"source"=>"/home/bobby/Documents/websites/code_current", "destination"=>"/home/bobby/Documents/websites/code_current/_site", "collections_dir"=>"collections", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}, "projects"=>{"output"=>true}, "blog"=>{"output"=>true}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-feed", "jekyll-seo-tag"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>nil, "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num/", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false, "syntax_highlighter"=>"rouge", "syntax_highlighter_opts"=>{:default_lang=>"plaintext", :guess_lang=>true}, "coderay"=>{}}, "title"=>"Unusual Vehicles", "author"=>"Raul G.", "email"=>"memoryofatrufestival@gmail.com", "description"=>"Personal blog about model aircraft and small robots\n", "paginate"=>6, "github_username"=>"RCmags", "youtube_username"=>"XXXmags", "rcgroups_username_id"=>"189488", "show_excerpts"=>false, "minima"=>{"date_format"=>"%-d %b %Y"}, "livereload_port"=>35729, "serving"=>true, "watch"=>true, "url"=>"http://localhost:4000"}:ET
1+
I"�{"source"=>"/home/bobby/Documents/websites/code_current", "destination"=>"/home/bobby/Documents/websites/code_current/_site", "collections_dir"=>"collections", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}, "projects"=>{"output"=>true}, "blog"=>{"output"=>true}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-feed", "jekyll-seo-tag"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>nil, "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num/", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false}, "title"=>"Unusual Vehicles", "author"=>"Raul G.", "email"=>"memoryofatrufestival@gmail.com", "description"=>"Personal blog about model aircraft and small robots\n", "paginate"=>6, "github_username"=>"RCmags", "youtube_username"=>"XXXmags", "rcgroups_username_id"=>"189488", "show_excerpts"=>false, "minima"=>{"date_format"=>"%-d %b %Y"}, "livereload_port"=>35729, "serving"=>true, "watch"=>true, "url"=>"http://localhost:4000"}:ET

_includes/header.html

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@
33
<div class="wrapper">
44
{%- assign default_paths = site.pages | map: "path" -%}
55
{%- assign page_paths = site.header_pages | default: default_paths -%}
6-
7-
<a class="site-title" rel="author" href="{{ "/" | relative_url }}">
8-
<img class="home_icon" src="{{ site.baseurl }}/assets/icons/page/news.svg">
9-
Home
10-
</a>
11-
6+
127
{%- if page_paths -%}
138
<nav class="site-nav">
9+
10+
<!-- Hamburger menu -->
1411
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
1512
<label for="nav-trigger">
1613
<span class="menu-icon">
@@ -21,17 +18,23 @@
2118
</label>
2219

2320
<div class="trigger">
21+
<!-- home -->
22+
<a class="page-link" href="{{ "/" | relative_url }}">
23+
Home
24+
<img class="page_icon" src="{{ site.baseurl }}/assets/icons/page/news.svg">
25+
</a>
26+
27+
<!-- page links -->
2428
{%- for path in page_paths -%}
25-
{%- assign my_page = site.pages | where: "path", path | first -%}
26-
{%- if my_page.title -%}
27-
<a class="page-link" href="{{ my_page.url | relative_url }}">
28-
{{ my_page.title | escape }}
29-
{%- if my_page.icon -%}
30-
<img class="page_icon" src="{{ site.baseurl }}/assets/icons/page/{{my_page.icon}}">
29+
{%- assign page = site.pages | where: "path", path | first -%}
30+
{%- if page.title -%}
31+
<a class="page-link" href="{{ page.url | relative_url }}">
32+
{{ page.title | escape }}
33+
{%- if page.icon -%}
34+
<img class="page_icon" src="{{ site.baseurl }}/assets/icons/page/{{page.icon}}">
3135
{%- endif -%}
3236
</a>
3337
{%- endif -%}
34-
3538
{%- endfor -%}
3639
</div>
3740
</nav>

_includes/page-header.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<header class="header-holder">
2+
<h1 class="header-title">
3+
{{ include.content }}
4+
</h1>
5+
</header>

_layouts/category-page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
layout: default
33
---
44

5+
{% include page-header.html content="Category" %}
6+
57
<!-- category -->
68
<header class="post-header">
79
<h1 style ="text-align: center;" class="post-title">{{ page.category | escape }}</h1>

_layouts/page.html

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22
layout: default
33
---
44
<article class="post">
5-
6-
<header class="post-header">
7-
<h1 style ="text-align: center;" class="post-title">{{ page.title | escape }}</h1>
8-
</header>
9-
10-
<div class="post-content">
11-
{{ content }}
12-
</div>
13-
5+
{% include page-header.html content=page.title %}
6+
7+
<div class="post-content">
8+
{{ content }}
9+
</div>
1410
</article>

_layouts/post.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
layout: default
33
---
4+
5+
{% include page-header.html content="Post" %}
6+
47
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">
58

69
<header class="post-header">

_sass/icons.scss

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,10 @@
66

77
.page_icon {
88
@extend .icon;
9-
padding-left: 10px;
10-
padding-right: 5px;
11-
}
12-
13-
.home_icon {
14-
@extend .icon;
15-
padding-right: 0px;
16-
padding-bottom: 10px;
9+
padding-left: 5px;
1710
}
1811

1912
.postlist_icon {
20-
display: inline;
21-
height: 48px;
22-
width: 48px;
13+
@extend .page_icon;
14+
padding-left: 0px;
2315
}

_sass/minima.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ $grey-color-dark: darken($grey-color, 25%) !default;
2121

2222
$table-text-align: left !default;
2323

24+
$header-color: #f8f9f9;
25+
2426
// Width of the content area
2527
$content-width: 1000px !default;
2628
$on-palm: 600px !default;

_sass/minima/_base.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ img {
8080
display: block;
8181
margin-left: auto;
8282
margin-right: auto;
83+
border-radius: 5px;
8384
}
8485

8586

_sass/minima/_layout.scss

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
.site-header {
55
//border-top: 1px solid $grey-color-dark;
66
border-bottom: 2px solid $grey-color-light;
7-
min-height: $spacing-unit * 1.865;
7+
//min-height: 60px; //$spacing-unit * 1.865;
8+
height: 60px;
89

910
box-shadow: 0px 1px 6px $grey-color-light;
1011
margin-bottom: 5px;
1112

1213
// Positioning context for the mobile navigation icon
1314
position: relative;
14-
background: #f8f9f9;
15+
background: $header-color;
1516

1617
//background: black; //black;// #ff9933; //#f8f9f9;
1718
}
@@ -31,7 +32,8 @@
3132

3233
.site-nav {
3334
float: right;
34-
line-height: $base-line-height * $base-font-size * 2.25;
35+
line-height: 60px;
36+
// $base-line-height * $base-font-size * 2.6;
3537

3638
.nav-trigger {
3739
display: none;
@@ -46,20 +48,24 @@
4648
line-height: $base-line-height;
4749

4850
// Increase menu item size
49-
@include relative-font-size(1.25);
51+
@include relative-font-size(1.2);
5052

5153
// Gaps between nav items, but not on the last one
5254
&:not(:last-child) {
5355
margin-right: 20px;
5456
}
5557
}
5658

57-
@include media-query($on-palm) {
59+
@include media-query($on-laptop) {
5860
position: absolute;
59-
top: 6px;
60-
right: $spacing-unit * 0.5;
61-
background-color: $background-color;
62-
border: 1px solid $grey-color-light;
61+
top: 11px; // vertical position of icon-container
62+
right: 16px;
63+
z-index: 10; // raise above images
64+
65+
// styling
66+
background-color: $header-color; //$background-color;
67+
//border: 1px solid $grey-color-light;
68+
box-shadow: inset 0 0 3px grey;
6369
border-radius: 5px;
6470
text-align: right;
6571

@@ -120,7 +126,7 @@
120126
padding: $spacing-unit 0;
121127

122128
box-shadow: 0px -1px 6px $grey-color-light;
123-
background: #f8f9f9; //#ff9933; //
129+
background: $header-color; //#ff9933; //
124130
}
125131

126132
.footer-heading {
@@ -244,6 +250,30 @@
244250
}
245251
}
246252

253+
/**
254+
* Page header
255+
*/
256+
257+
.header-holder {
258+
position: absolute;
259+
top: 10px;
260+
//margin-bottom: $spacing-unit;
261+
//padding-left: 10px;
262+
//padding-right: 10px;
263+
//padding-bottom: 2px;
264+
265+
//border: 1px solid LightGray;
266+
//background: Gainsboro;
267+
//border-radius: 14px;
268+
}
269+
270+
.header-title {
271+
@include relative-font-size(2.625);
272+
letter-spacing: -1px;
273+
line-height: 1;
274+
color: LightSteelBlue;
275+
}
276+
247277
.post-content {
248278
margin-bottom: $spacing-unit;
249279

0 commit comments

Comments
 (0)