2
0
mirror of https://github.com/inventree/inventree-website.git synced 2025-07-31 01:31:33 +00:00

Merge pull request #110 from matmair/matmair/issue94

Add plugin repo
This commit is contained in:
Oliver
2023-01-29 13:00:49 +11:00
committed by GitHub
21 changed files with 340 additions and 115 deletions

View File

@@ -0,0 +1,53 @@
---
layout: default
---
<div class="pt-3 pb-1 section-container">
<h1 class="header-text title-font mb-4 cm-gray-1">{{page.title}}</h1>
<span class="content">
{% assign all_items = "" | split: "/" %}
{% for col_item in site[page.collection] %}
{% for item in col_item[page.reference] %}
{% assign preprocessed = item | strip %}
{% unless preprocessed == "" %}
{% assign all_items = all_items | push: preprocessed %}
{% endunless %}
{% endfor %}
{% endfor %}
{% assign all_items = all_items | uniq | sort %}
<p>The full list of plugins is available on the main <a href="{% link plugins.html %}">plugin list</a> page.</p><br>
<p class="mb-0 italic">Click on a name to jump to the plugins that are marked with it.</p>
<i class="fa fa-tag"></i>
{% for item in all_items %}
{% unless tag == "" %}
<a class="label" href="{{ page.permalink | prepend: site.baseurl }}#{{ item | slugify }}">
<span class="badge">{{ item }}</span>
</a>
{% endunless %}
{% endfor %}
</span>
<br><br>
{% for item in all_items %}
{% unless item == "" %}
<div id="{{ item | slugify }}" class="anchor"></div>
<h2 class="text-lg sm:text-xl cm-gray-1 font-medium title-font mb-2">{{ item }}</h2>
<div class="flex flex-wrap">
{% for plugin in site[page.collection] %}
{% assign col_items = "" | split: "/" %}
{% for item in plugin[page.reference] %}
{% assign lower_item = item %}
{% assign col_items = col_items | push: lower_item %}
{% endfor %}
{% if col_items contains item %}
<div class="space-4 p-2 md:w-1/2">{% include plugin_card.html plugin=plugin %}</div>
{% endif %}
{% endfor %}
</div>
{% endunless %}
{% endfor %}
</div></div>

View File

@@ -4,48 +4,86 @@ notitle: true
fullwith: true
---
<h2>{{ page.name }}
<span class="sm:ml-2 text-sm">{% include partial/publisher_ref.html pub=page.publisher %}</span>
<span class="sm:ml-2 text-sm">{% include partial/publisher_ref.html pub=page.author %}</span>
<span class="sm:ml-2 text-sm">last modified: {{ page.last-modified-date | date_to_string }}</span>
</h2>
<div class="md:flex md:flex-row flex-wrap">
<div class="w-full md:w-3/4">
<div class="flex-wrap md:flex md:flex-nowrap">
<div class="w-full md:w-auto md:mr-4">
{{ content }}
</div>
<div class="w-full md:w-1/4">
<h2 class="block sm:hidden">Link section</h2>
<h2 class="block sm:hidden">Detail section</h2>
<div>
<p class="mb-0">License:
{% if page.open_source %}<i class="fa-brands fa-osi"></i>{% else %}<i class="fa-solid fa-lock"></i>{% endif %}
{{ page.license }}<br>
<div class="flex flex-wrap">
Status:
<div>{% if page.stable %}<i class="fa-regular fa-circle-check"></i>Stable{% else %}<i class="fa-solid fa-triangle-exclamation"></i> Unstable{% endif %}</div>
<div>{% if page.maintained %}<i class="fa-regular fa-circle-check"></i>Maintained{% else %}<i class="fa-solid fa-circle-exclamation"></i> Unmaintained{% endif %}</div>
</div>
{% if page.pypi and page.package_name %}Package on PyPI:<pre class="my-0">{{ page.package_name }}</pre>{% endif %}
</p>
<a href="{{ page.website }}" class="no-underline" aria-label="open website">
<div>
<h4 class="plugin_links">Website <i class="fa-solid fa-arrow-up-right-from-square" title="External link"></i></h4>
<p class="font-normal">{{ page.website }}</p>
</div>
</a>
{% if page.issue_tracker %}
<a href="{{ page.issue_tracker }}" class="no-underline" aria-label="open the issue tracker">
<div>
<h4 class="fst-italic">Github</h4>
<p>{{ page.github | remove: "https://github.com/" }}</p>
<a href="{{ page.github }}" class="stretched-link" aria-label="open github repo"></a>
<h4 class="plugin_links">Issue Tracker <i class="fa-solid fa-arrow-up-right-from-square" title="External link"></i></h4>
</div>
</a>
{% endif %}
{% if page.github %}
<a href="{{ page.github }}" class="no-underline" aria-label="open source on GitHub">
<div>
<h4 class="plugin_links">Sourcecode on GitHub <i class="fa-solid fa-arrow-up-right-from-square" title="External link"></i></h4>
<p class="font-normal">{{ page.github | remove: "https://github.com/" }}</p>
</div>
</a>
{% endif %}
{% if page.gitlab %}
<a href="{{ page.gitlab }}" class="no-underline" aria-label="open source on Gitlab">
<div>
<h4 class="plugin_links">Sourcecode on Gitlab <i class="fa-solid fa-arrow-up-right-from-square" title="External link"></i></h4>
<p class="font-normal">{{ page.gitlab | remove: "https://gitlab.com/" }}</p>
</div>
</a>
{% endif %}
{% if page.source %}
<a href="{{ page.source }}" class="no-underline" aria-label="open source on SCM">
<div>
<h4 class="plugin_links">Sourcecode on SCM <i class="fa-solid fa-arrow-up-right-from-square" title="External link"></i></h4>
<p class="font-normal">{{ page.source }}</p>
</div>
</a>
{% endif %}
<div>
<h4 class="fst-italic">Categories</h4>
<ol class="list-unstyled">
<h4 class="plugin_links">Categories</h4>
<div>
{% for categorie in page.categories %}
<li><a href="/categories/#{{ categorie | slugify }}"><span class="badge bg-yellow-500">{{ categorie }}</span></a></li>
<a href="{% link categories.html %}#{{ categorie | slugify }}"><span class="plugin_cat">{{ categorie }}</span></a>
{% endfor %}
</ol>
</div>
</div>
<div>
<h4 class="fst-italic">Tags</h4>
<ol class="list-unstyled">
<h4 class="plugin_links">Tags</h4>
<div>
{% for tag in page.tags %}
<li><a href="/tags/#{{ tag | slugify }}"><span class="badge bg-blue-400">{{ tag }}</span></a></li>
<a href="{% link tags.html %}#{{ tag | slugify }}"><span class="plugin_tag">{{ tag }}</span></a>
{% endfor %}
</ol>
</div>
</div>
<div>
<h4 class="fst-italic">Website</h4>
<p>{{ page.website }}</p>
<a href="{{ page.website }}" class="stretched-link" aria-label="open website"></a>
</div>
</div>
</div>
</div>

View File

@@ -1,11 +0,0 @@
---
layout: content
---
<article>
{{ content }}
{% if page.plugin %}
<hr>
<p>Find out more about this plugin on the plugin site</p>
{% include plugin_card.html plugin=page.plugin %}
{% endif %}
</article>