36 lines
1.6 KiB
Plaintext
36 lines
1.6 KiB
Plaintext
<article class="content auto">
|
|
{%- assign parts = page.title | split: ' » ' -%}
|
|
{%- assign parts_count = parts | size -%}
|
|
{%- 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 %}
|
|
{%- 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>
|
|
<a href="{{ repo_url }}" target=_blank rel=noopener title="{{ parts[0] }} Source Repository">
|
|
View Source Repo
|
|
</a>
|
|
{% if is_logged_on %} • <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 %} • <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">« {{ parts[0] }} Home</a>
|
|
<a href="{{ repo_url }}" target=_blank rel=noopener title="{{ parts[0] }} Source Repository">View Source Repo</a>
|
|
{%- endif %}
|
|
</article>
|