mirror of
https://github.com/inventree/inventree-website.git
synced 2025-06-12 10:05:36 +00:00
add news
This commit is contained in:
24
_layouts/collection_base.html
Normal file
24
_layouts/collection_base.html
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<header>
|
||||
{% if page.backLink or page.backLink == nil %}
|
||||
<a href="{{ layout.base_link | relative_url }}" class="flex items-center m-5 text-xl hover:underline">
|
||||
<img class="w-6 h-6" src="{{ '/assets/back.svg' | relative_url }}" />
|
||||
<span>Back</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<h1>{{ page.title }}</h1>
|
||||
<p>
|
||||
{{ page.date | date_to_string }}
|
||||
{% assign publisher = site.publishers | where: 'short_name', page.publisher | first %}
|
||||
{% if publisher %}
|
||||
- <a href="{{ publisher.url | relative_url }}">{{ publisher.name }}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{{ content }}
|
||||
</article>
|
5
_layouts/news.html
Normal file
5
_layouts/news.html
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
layout: collection_base
|
||||
base_link: '/news'
|
||||
---
|
||||
{{ content }}
|
@ -1,24 +1,5 @@
|
||||
---
|
||||
layout: default
|
||||
layout: collection_base
|
||||
base_link: '/blog'
|
||||
---
|
||||
|
||||
<header>
|
||||
{% if page.backLink or page.backLink == nil %}
|
||||
<a href="{{ '/blog' | relative_url }}" class="flex items-center m-5 text-xl hover:underline">
|
||||
<img class="w-6 h-6" src="{{ '/assets/back.svg' | relative_url }}" />
|
||||
<span>Back</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<article>
|
||||
<h1>{{ page.title }}</h1>
|
||||
<p>
|
||||
{{ page.date | date_to_string }}
|
||||
{% assign publisher = site.publishers | where: 'short_name', page.publisher | first %}
|
||||
{% if publisher %}
|
||||
- <a href="{{ publisher.url | relative_url }}">{{ publisher.name }}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{{ content }}
|
||||
</article>
|
||||
{{ content }}
|
||||
|
Reference in New Issue
Block a user