Improve category handling. Remove top-bar navigation for now (may bring it back later, in a more customized fashion)
This commit is contained in:
parent
998581a948
commit
4c719fa3cf
|
@ -25,7 +25,6 @@ markdown: kramdown
|
|||
|
||||
# Category settings
|
||||
category_titles:
|
||||
-
|
||||
technology: "Anna the Technologist"
|
||||
media: "Anna the Player of Games"
|
||||
religion: "Anna the Mystic"
|
||||
technology: "The Technologist"
|
||||
media: "The Player of Games"
|
||||
religion: "The Mystic"
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<h1 class="page-heading">{{ include.category | capitalize }}</h1>
|
||||
|
||||
<ul class="post-list">
|
||||
{% for post in site.categories[include.category] limit:include.limit %}
|
||||
<li>
|
||||
|
|
|
@ -13,13 +13,6 @@
|
|||
</svg>
|
||||
</a>
|
||||
|
||||
<div class="trigger">
|
||||
{% for my_page in site.pages %}
|
||||
{% if my_page.title %}
|
||||
<a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,7 @@ layout: default
|
|||
</header>
|
||||
|
||||
<div class="post-content">
|
||||
{% include category_list.html category=page.data['category'] limit=0 %}
|
||||
{% include category_list.html category=page.category limit=1000000 %}
|
||||
</div>
|
||||
|
||||
</article>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
class CategoryPage < Jekyll::Page
|
||||
def initialize(site, base, dir, category)
|
||||
def initialize(site, base, category)
|
||||
@site = site
|
||||
@base = base
|
||||
@dir = dir
|
||||
@dir = category
|
||||
@name = 'index.html'
|
||||
|
||||
self.process(@name)
|
||||
self.read_yaml(File.join(base, '_layouts'), 'category_index.html')
|
||||
self.data['category'] = category
|
||||
|
||||
category_title = site.config['category_titles'][category] || category.capitalize
|
||||
category_title = site.config["category_titles"][category] || category.capitalize
|
||||
self.data['title'] = "#{category_title}"
|
||||
end
|
||||
end
|
||||
|
@ -23,7 +23,7 @@ class CategoryPageGenerator < Jekyll::Generator
|
|||
end
|
||||
|
||||
site.categories.each_key do |category|
|
||||
site.pages << CategoryPage.new(site, site.source, category, category)
|
||||
site.pages << CategoryPage.new(site, site.source, category)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ layout: default
|
|||
<div class="home">
|
||||
{% for category in site.categories %}
|
||||
{% if category.first == "meta" %} {% continue %} {% endif %}
|
||||
<h1 class="page-heading">{{ site.config.category_titles[category] }}</h1>
|
||||
<div class="column col-{{site.categories.size | minus: 1}}">
|
||||
{% include category_list.html category=category.first limit=5 %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user