mirror of
https://github.com/inventree/inventree-website.git
synced 2025-06-13 10:35:27 +00:00
migrate plugins repo
This commit is contained in:
47
_layouts/plugin.html
Normal file
47
_layouts/plugin.html
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
<h1>{{ page.name }}</h1>
|
||||
{% include publisher_ref.html pub=page.publisher %}
|
||||
|
||||
<div class="row g-5">
|
||||
<div class="col-md-8">
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="position-sticky" style="top: 2rem;">
|
||||
|
||||
<div class="p-4 mb-3 bg-light rounded position-relative">
|
||||
<h4 class="fst-italic">Github</h4>
|
||||
<p class="mb-0">{{ page.github | remove: "https://github.com/" }}</p>
|
||||
<a href="{{ page.github }}" class="stretched-link" aria-label="open github repo"></a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="fst-italic">Categories</h4>
|
||||
<ol class="list-unstyled">
|
||||
{% for categorie in page.categories %}
|
||||
<li><a href="/categories/#{{ categorie | slugify }}"><span class="badge rounded-pill bg-warning">{{ categorie }}</span></a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4 class="fst-italic">Tags</h4>
|
||||
<ol class="list-unstyled">
|
||||
{% for tag in page.tags %}
|
||||
<li><a href="/tags/#{{ tag | slugify }}"><span class="badge rounded-pill bg-info">{{ tag }}</span></a></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 position-relative">
|
||||
<h4 class="fst-italic">Website</h4>
|
||||
<p class="mb-0">{{ page.website }}</p>
|
||||
<a href="{{ page.website }}" class="stretched-link" aria-label="open website"></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -16,5 +16,13 @@ layout: default
|
||||
</header>
|
||||
|
||||
<article class="prose prose-sm sm:prose lg:prose-lg xl:prose-xl mx-auto min-h-screen">
|
||||
<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 }}">{{ publisher.name }}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{{ content }}
|
||||
</article>
|
42
_layouts/publisher.html
Normal file
42
_layouts/publisher.html
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
<h1>
|
||||
<img src="https://github.com/{{ page.github }}.png?size=40" alt="mdo" class="rounded-circle" width="40" height="40">
|
||||
{{ page.name }}
|
||||
</h1>
|
||||
|
||||
<div>
|
||||
{% if page.github %}
|
||||
<a href="https://github.com/{{page.github}}"><span class="badge bg-secondary">GitHub</span></a>
|
||||
{% endif %}
|
||||
|
||||
{% if page.website %}
|
||||
<a href="{{page.website}}"><span class="badge bg-secondary">Official Website</span></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<blockquote class="blockquote">
|
||||
<p class="mb-0">{{ content }}</p>
|
||||
</blockquote>
|
||||
|
||||
{% assign filtered_posts = site.posts | where: 'publisher', page.short_name %}
|
||||
{% if filtered_posts and filtered_posts.size != 0 %}
|
||||
<h3>Posts</h3>
|
||||
<ul class="list-unstyled">
|
||||
{% for post in filtered_posts %}
|
||||
<li>{{ post.date | date_to_string }} <a href="{{ post.url }}" class="lead">{{ post.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% assign filtered_plugins = site.plugins | where: 'publisher', page.short_name %}
|
||||
{% if filtered_plugins and filtered_plugins.size != 0 %}
|
||||
<h3>Plugins</h3>
|
||||
<ul class="list-unstyled">
|
||||
{% for plugin in filtered_plugins %}
|
||||
<a href="{{ plugin.title }}"></a>
|
||||
<li>{{ plugin.title }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
Reference in New Issue
Block a user