mirror of
https://github.com/inventree/inventree-website.git
synced 2025-04-28 05:26:44 +00:00
Move lookup and link to partials (#106)
This commit is contained in:
parent
b5e1cf59e5
commit
f4969b4cfe
3
_includes/partial/publisher_link.html
Normal file
3
_includes/partial/publisher_link.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{% assign pub_small = include.pub | downcase %}
|
||||||
|
{% assign publisher_ref = site.publishers | where: 'short_name', pub_small | first %}
|
||||||
|
<a href="{{ publisher_ref.url | relative_url }}">{{ publisher_ref.name }}</a>
|
@ -15,10 +15,7 @@ layout: default
|
|||||||
<h1>{{ page.title }}</h1>
|
<h1>{{ page.title }}</h1>
|
||||||
<p>
|
<p>
|
||||||
{{ page.date | date_to_string }}
|
{{ page.date | date_to_string }}
|
||||||
{% assign publisher = site.publishers | where: 'short_name', page.author | first %}
|
{% include partial/publisher_link.html pub= page.author %}
|
||||||
{% if publisher %}
|
|
||||||
- <a href="{{ publisher.url | relative_url }}">{{ publisher.name }}</a>
|
|
||||||
{% endif %}
|
|
||||||
</p>
|
</p>
|
||||||
{{ content }}
|
{{ content }}
|
||||||
</article>
|
</article>
|
@ -14,7 +14,7 @@ layout: default
|
|||||||
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
|
<a href="{{ item.url | relative_url }}">{{ item.title }}</a>
|
||||||
</h2>
|
</h2>
|
||||||
<span class="leading-relaxed mb-4">{{ item.excerpt | strip_html | strip_newlines | truncate: 156 }}</span>
|
<span class="leading-relaxed mb-4">{{ item.excerpt | strip_html | strip_newlines | truncate: 156 }}</span>
|
||||||
<span>{{ item.date | date_to_string }} | {{ item.author }}</span>
|
<span>{{ item.date | date_to_string }} | {% include partial/publisher_link.html pub=item.author %}</span>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user