mirror of
https://github.com/inventree/inventree-website.git
synced 2025-04-27 21:16:45 +00:00
refactor
This commit is contained in:
parent
7705d45ada
commit
755e0813ef
2
404.md
2
404.md
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: post
|
layout: content
|
||||||
permalink: /404
|
permalink: /404
|
||||||
backLink: False
|
backLink: False
|
||||||
---
|
---
|
||||||
|
@ -44,12 +44,12 @@ defaults:
|
|||||||
path: ""
|
path: ""
|
||||||
type: "posts"
|
type: "posts"
|
||||||
values:
|
values:
|
||||||
layout: "post"
|
layout: "collection/post"
|
||||||
- scope:
|
- scope:
|
||||||
path: ""
|
path: ""
|
||||||
type: "news"
|
type: "news"
|
||||||
values:
|
values:
|
||||||
layout: "news"
|
layout: "collection/news"
|
||||||
- scope:
|
- scope:
|
||||||
path: ""
|
path: ""
|
||||||
values:
|
values:
|
||||||
|
22
_layouts/collection/collection_index.html
Normal file
22
_layouts/collection/collection_index.html
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
<section class="cm-gray-2 body-font">
|
||||||
|
<div class="pt-3 pb-1 section-container">
|
||||||
|
<h1 class="header-text title-font mb-4 cm-gray-2">{{ page.title_text }}</h1>
|
||||||
|
<div class="flex flex-wrap">
|
||||||
|
|
||||||
|
{% assign cols = site[page.collection] %}
|
||||||
|
{% if page.collection_reverse == true %}{% assign cols = cols | reverse %}{% endif %}
|
||||||
|
{% for item in cols %}
|
||||||
|
<div class="p-6 md:w-1/2 flex flex-col items-start">
|
||||||
|
<h2 class="header-text title-font mb-4 cm-gray-1">
|
||||||
|
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
|
||||||
|
</h2>
|
||||||
|
<span class="leading-relaxed mb-4">{{ item.excerpt | strip_html | strip_newlines | truncate: 156 }}</span>
|
||||||
|
<span>{{ item.date | date_to_string }} | </span>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: collection_base
|
layout: collection/collection_base
|
||||||
base_link: '/news'
|
base_link: '/news'
|
||||||
---
|
---
|
||||||
{{ content }}
|
{{ content }}
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: collection_base
|
layout: collection/collection_base
|
||||||
base_link: '/blog'
|
base_link: '/blog'
|
||||||
---
|
---
|
||||||
{{ content }}
|
{{ content }}
|
24
blog.html
24
blog.html
@ -1,25 +1,7 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: collection/collection_index
|
||||||
title: Blog
|
title: Blog
|
||||||
|
title_text: InvenTree Blog
|
||||||
permalink: /blog
|
permalink: /blog
|
||||||
|
collection: posts
|
||||||
---
|
---
|
||||||
<section class="cm-gray-2 body-font">
|
|
||||||
<div class="pt-3 pb-1 section-container">
|
|
||||||
<h1 class="header-text title-font mb-4 cm-gray-2">InvenTree Blog</h1>
|
|
||||||
<div class="flex flex-wrap">
|
|
||||||
|
|
||||||
{% for post in site.posts %}
|
|
||||||
<div class="p-6 md:w-1/2 flex flex-col items-start">
|
|
||||||
<h2 class="header-text title-font mb-4 cm-gray-1">
|
|
||||||
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
|
||||||
</h2>
|
|
||||||
<span class="leading-relaxed mb-4">{{ post.excerpt | strip_html | strip_newlines | truncate: 156 }}</span>
|
|
||||||
<span>
|
|
||||||
{{ post.date | date_to_string }} |
|
|
||||||
{% include partial/publisher_ref.html pub=post.publisher %}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
22
news.html
22
news.html
@ -1,22 +1,8 @@
|
|||||||
---
|
---
|
||||||
layout: default
|
layout: collection/collection_index
|
||||||
title: News
|
title: News
|
||||||
|
title_text: InvenTree News
|
||||||
permalink: /news
|
permalink: /news
|
||||||
|
collection: news
|
||||||
|
collection_reverse: true
|
||||||
---
|
---
|
||||||
<section class="cm-gray-2 body-font">
|
|
||||||
<div class="pt-3 pb-1 section-container">
|
|
||||||
<h1 class="header-text title-font mb-4 cm-gray-2">InvenTree News</h1>
|
|
||||||
<div class="flex flex-wrap">
|
|
||||||
|
|
||||||
{% for post in site.news %}
|
|
||||||
<div class="p-6 md:w-1/2 flex flex-col items-start">
|
|
||||||
<h2 class="header-text title-font mb-4 cm-gray-1">
|
|
||||||
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
|
|
||||||
</h2>
|
|
||||||
<span class="leading-relaxed mb-4">{{ post.excerpt | strip_html | strip_newlines | truncate: 156 }}</span>
|
|
||||||
<span>{{ post.date | date_to_string }} | </span>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user