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

36 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 %}
2024-04-29 00:32:20 +00:00
{%- assign repo_url = page.metadata | value: "repo_url" -%}
{%- if repo_url == "-- repo_url not found --" -%}
{%- capture repo_url %}https://{{ repo_domain }}/bit-badger/{{ repo_name }}{% endcapture -%}
{%- endif -%}
<h1 class=project-title>
{% if parts_count == 1 -%}
{{ page.title }}<br>
<small><small>
2024-04-29 00:32:20 +00:00
<a href="{{ repo_url }}" target=_blank rel=noopener title="{{ parts[0] }} Source Repository">
View Source 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-29 00:32:20 +00:00
<a href="{{ repo_url }}" target=_blank rel=noopener title="{{ parts[0] }} Source Repository">View Source Repo</a>
{%- endif %}
</article>