Skip to content

Commit d6507c6

Browse files
committed
directory links
1 parent e7b97d0 commit d6507c6

File tree

8 files changed

+52
-17
lines changed

8 files changed

+52
-17
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
I"�{"source"=>"/home/bobby/Documents/websites/code", "destination"=>"/home/bobby/Documents/websites/code/_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"=>"[email protected]", "description"=>"Personal blog about model aircraft and small robots\n", "paginate"=>6, "github_username"=>"RCmags", "youtube_username"=>"RCmags", "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", "destination"=>"/home/bobby/Documents/websites/code/_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"=>"[email protected]", "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

_data/directory.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Projects directory
2+
3+
projects:
4+
url: "projects.html"
5+
6+
Aircraft:
7+
url: "projects/aircraft.html"
8+
9+
Arduino Libraries:
10+
url: "projects/arduino-libraries.html"
11+
12+
Miscellaneous:
13+
url: "projects/miscellaneous.html"
14+
15+
Robots:
16+
url: "projects/robots.html"
17+
18+
# Blog directory
19+
20+
blog:
21+
url: "blog.html"
22+
23+
cat1:
24+
url: "blog/cat1.html"
25+
26+
cat2:
27+
url: "blog/cat2.html"

_includes/pagination.html renamed to _includes/paginator-buttons.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
<!-- Post list -->
2-
{% include paginator-list.html src=paginator %}
3-
4-
<!-- Pagination buttons -->
51
<div class="pagination">
62
<!-- Previous button -->
73
{% if paginator.previous_page %}

_includes/paginator-list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<div id="categories">
2222
<!-- directory -->
2323
{% for category in post.categories %}
24-
<span class="text">{{ category }}</span>
24+
<a class="text" href="{{ site.baseurl }}/{{ site.data.directory[category].url }}">{{ category }}</a>
2525
{% endfor %}
2626
</div>
2727
</div>

_includes/search-lunr.html

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@
4949
function lunr_search(term) {
5050
document.getElementById('lunrsearchresults').innerHTML = '<ul></ul>';
5151
if(term) {
52+
// Response
5253
document.getElementById('lunrsearchresults').innerHTML =
53-
"<p>Results for '" + term + "'</p>" + document.getElementById('lunrsearchresults').innerHTML;
54+
"<p class='result-indicator'>Results for '" + term + "'</p>" + document.getElementById('lunrsearchresults').innerHTML;
55+
56+
5457
//put results on the screen.
5558
var results = idx.search(term);
5659
if(results.length>0){
@@ -63,9 +66,13 @@
6366
var body = documents[ref]['body'].substring(0,160)+'...';
6467
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML =
6568
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML +
66-
"<li class='lunrsearchresult'><a href='" + url + "'><span class='title'>" +
67-
title + "</span><br /><span class='body'>" + body;
68-
//+ "</span><br /><span class='url'>" + url +"</span></a></li>";
69+
"<li class='lunrsearchresult'> \
70+
<a href='" + url + "'> \
71+
<span class='title'>" + title + "</span> \
72+
<br /> \
73+
<span class='body'>" + body + "</span> \
74+
</a> \
75+
</li>";
6976
}
7077
} else {
7178
document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML =
@@ -77,11 +84,10 @@
7784
</script>
7885

7986
<!-- Input bar -->
80-
<form onSubmit="return lunr_search(document.getElementById('lunrsearch').value);"
81-
class="form-control">
87+
<form onSubmit="return lunr_search(document.getElementById('lunrsearch').value);" class="form-control">
8288

8389
<input type="text" id="lunrsearch" name="q"
84-
maxlength="255" value="" placeholder="Type a keyword" />
90+
maxlength="255" value="" placeholder="Type a keyword" />
8591
</form>
8692

8793
<!-- Results -->

_sass/pagination.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
width: auto;
4242

4343
.text {
44-
color: white; //black;
45-
background: SandyBrown; //PaleGoldenRod;
44+
text-align: center;
45+
color: white;
46+
background: SandyBrown;
4647
padding: 2px 5px 2px 5px;
4748
border-radius: 8px;
4849
}

_sass/search-lunr.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@
3232
}
3333
}
3434

35-
35+
.result-indicator {
36+
font-size: 32px;
37+
}

index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
layout: default
33
---
44

5+
<!-- title -->
56
<header class="header-holder">
67
<span class="header-title">
78
Home
@@ -11,4 +12,6 @@
1112
</span>
1213
</header>
1314

14-
{% include pagination.html %}
15+
<!-- Post list -->
16+
{% include paginator-list.html src=paginator %}
17+
{% include paginator-buttons.html %}

0 commit comments

Comments
 (0)