bitbadger.solutions-theme/theme/project-page.liquid

37 lines
1.6 KiB
Plaintext
Raw Normal View History

<article class="content auto">
{%- assign parts = page.title | split: ' » ' -%}
{%- assign parts_count = parts | size -%}
2024-04-21 17:37:31 +00:00
{%- capture repo_name %}{% if parts_count == 1 %}{{ page.title }}{% else %}{{ parts[0] }}{% endif %}{% endcapture -%}
{%- assign is_github = page.metadata | value: "is_github" -%}
{%- capture repo_domain %}{% if is_github == "true" %}github.com{% else %}git.bitbadger.solutions{% endif %}{% endcapture %}
{%- capture repo_text %}{% if is_github == "true" %}GitHub{% else %}Source{% endif %}{% endcapture %}
<h1 class=project-title>
{% if parts_count == 1 -%}
{{ page.title }}<br>
<small><small>
2024-04-21 17:37:31 +00:00
<a href="https://{{ repo_domain }}/bit-badger/{{ repo_name }}" target=_blank rel=noopener
title="{{ parts[0] }} {{ repo_text }} Repository">
View {{ repo_text }} Repo
</a>
{% if is_logged_on %} &bull; <a hx-boost=false href="{{ page | edit_page_link }}">Edit Page</a>{% endif %}
</small></small>
{%- else -%}
<small><small>
<a href="." title="{{ parts[0] }} Home">{{ parts[0] }}</a>
{% if is_logged_on %} &bull; <a hx-boost=false href="{{ page | edit_page_link }}">Edit</a>{% endif %}
</small></small>
<br>
{{ parts[1] }}
{%- endif %}
</h1>
{{ page.text }}
{% if parts_count > 1 -%}
<p class=project-footer>
<a href="." title="{{ parts[0] }} Home">&laquo; {{ parts[0] }} Home</a>
2024-04-21 17:37:31 +00:00
<a href="https://{{ repo_domain }}/bit-badger/{{ repo_name }}" target=_blank rel=noopener
title="{{ parts[0] }} {{ repo_text }} Repository">
View {{ repo_text }} Repo
</a>
{%- endif %}
</article>