Skip to content

Commit

Permalink
Allows customizable status symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Dec 2, 2024
1 parent 2d23260 commit 5158216
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 2 additions & 3 deletions _includes/sitemap.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
{%- assign sublinks=linked_page.footer_links | default: linked_page.dropdown_links | default: linked_page.links -%}
{%- for link in sublinks -%}
{%- assign linked_subpage=site.pages | find: "url", link.link -%}
{%- assign status=linked_subpage.status -%}
<li>
<a class='button-label' href="{{link.link | absolute_url}}" {% if status -%}title="{{status}}"{%- endif -%}>
{%- if link.label -%}
Expand All @@ -27,8 +26,8 @@
{%- else -%}
{{linked_subpage.title}}
{%- endif -%}
{%- if status == 'Upcoming' or status == 'New' or status == 'Soon' -%}
&nbsp;<span class="status-symbol"></span>
{%- if linked_subpage.status_icon -%}
&nbsp;<span class="status-symbol">{{ linked_subpage.status_icon }}</span>
{%- endif -%}
</a>
</li>
Expand Down
5 changes: 2 additions & 3 deletions _includes/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<ul class='submenu'>
{%- for link in sublinks -%}
{%- assign linked_subpage=site.pages | find: "url", link.link -%}
{%- assign status=linked_subpage.status -%}
<li class="{{link.class}}">
<a class='button-label {{link.a_class}}' href="{{link.link | absolute_url}}" {% if status -%}title="{{status}}"{%- endif -%}>
{%- if link.label -%}
Expand All @@ -32,8 +31,8 @@
{%- else -%}
{{linked_subpage.title}}
{%- endif -%}
{%- if status == 'Happening Now' or status == 'Upcoming' or status == 'New' or status == 'Soon' -%}
&nbsp;<span class="status-symbol"></span>
{%- if linked_subpage.status_icon -%}
&nbsp;<span class="status-symbol">{{ linked_subpage.status_icon }}</span>
{%- endif -%}
</a>
</li>
Expand Down
7 changes: 6 additions & 1 deletion _tools/frontmatter-validator/schemas/page.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@
"type": "string"
},
"status": {
"type": "string"
"type": "string",
"examples": ["New", "Upcoming", "Beta"]
},
"status_icon": {
"type": "string",
"examples": ["", "", "❤︎", ""]
},
"location": {
"type": "string"
Expand Down

0 comments on commit 5158216

Please sign in to comment.