Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions _layouts/eip.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
</svg>

<div class="home">
{% assign doc_prefix = "EIP" %}
{% if page.category == "ERC" %}
{% assign doc_prefix = "ERC" %}
{% endif %}
<span class="h5">
{% if page.status == "Stagnant" %}
<span class="badge text-light bg-danger" data-bs-toggle="tooltip" data-bs-title="This EIP had no activity for at least 6 months. This EIP should not be used.">🚧 Stagnant</span>
Expand Down Expand Up @@ -46,11 +50,7 @@
{% endif %}
</span>
<h1 class="page-heading">
{% if page.category == "ERC" %}
ERC-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}
{% elsif page.category != "ERC" %}
EIP-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}
{% endif %}
{{ doc_prefix }}-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}
<a href="{{ page.discussions-to | uri_escape }}" class="no-underline">
<svg role="img" aria-label="Discuss" class="inline-svg" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 16 16">
<use xlink:href="#bi-chat"/>
Expand Down Expand Up @@ -125,17 +125,20 @@ <h2>Citation</h2>
Article schema specification:
https://schema.org/TechArticle
{% endcomment %}
{% assign draft_suffix = "" %}
{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %}
{% assign draft_suffix = " [DRAFT]" %}
{% endif %}
{% capture doc_title %}
{{ doc_prefix }}-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}{{ draft_suffix }}
{% endcapture %}
{% assign doc_title = doc_title | strip %}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "TechArticle",
{% if page.category == "ERC" %}
"headline": "ERC-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
"name": "ERC-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
{% else %}
"headline": "EIP-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
"name": "EIP-{{ page.eip | xml_escape }}: {{ page.title | xml_escape }}{% if page.status == "Draft" or page.status == "Stagnant" or page.status == "Withdrawn" or page.status == "Review" or page.status == "Last Call" %} [DRAFT]{% endif %}",
{% endif %}
"headline": "{{ doc_title }}",
"name": "{{ doc_title }}",
"author": "{{ page.author }}",
"dateCreated": "{{ page.created | date: "%Y-%m-%d" }}",
"datePublished": "{{ page.created | date: "%Y-%m-%d" }}",
Expand Down
Loading