Complete missing UX flows and production integrity commands
All checks were successful
CI / ci (pull_request) Successful in 32s
All checks were successful
CI / ci (pull_request) Successful in 32s
This commit is contained in:
@@ -12,10 +12,18 @@
|
||||
<script src="{% static 'js/consent.js' %}" nonce="{{ request.csp_nonce|default:'' }}"></script>
|
||||
<script src="{% static 'js/theme.js' %}" defer></script>
|
||||
<script src="{% static 'js/prism.js' %}" defer></script>
|
||||
<script src="{% static 'js/newsletter.js' %}" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
{% include 'components/nav.html' %}
|
||||
{% include 'components/cookie_banner.html' %}
|
||||
{% if messages %}
|
||||
<section aria-label="Messages">
|
||||
{% for message in messages %}
|
||||
<p>{{ message }}</p>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endif %}
|
||||
<main>{% block content %}{% endblock %}</main>
|
||||
{% include 'components/footer.html' %}
|
||||
</body>
|
||||
|
||||
@@ -26,12 +26,22 @@
|
||||
{{ page.body }}
|
||||
{% article_json_ld page %}
|
||||
</article>
|
||||
<section aria-label="Share this article">
|
||||
<h2>Share</h2>
|
||||
<a href="https://x.com/intent/post?url={{ request.build_absolute_uri|urlencode }}&text={{ page.title|urlencode }}" target="_blank" rel="noopener noreferrer">Share on X</a>
|
||||
<a href="https://www.linkedin.com/sharing/share-offsite/?url={{ request.build_absolute_uri|urlencode }}" target="_blank" rel="noopener noreferrer">Share on LinkedIn</a>
|
||||
<button type="button" data-copy-link data-copy-url="{{ request.build_absolute_uri }}">Copy link</button>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Related</h2>
|
||||
{% for article in related_articles %}
|
||||
<a href="{{ article.url }}">{{ article.title }}</a>
|
||||
{% endfor %}
|
||||
</section>
|
||||
<aside>
|
||||
<h2>Newsletter</h2>
|
||||
{% include 'components/newsletter_form.html' with source='article' label='Never miss a post' %}
|
||||
</aside>
|
||||
{% if page.comments_enabled %}
|
||||
<section>
|
||||
<form method="post" action="{% url 'comment_post' %}">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% load core_tags %}
|
||||
<footer>
|
||||
{% get_legal_pages as legal_pages %}
|
||||
{% include 'components/newsletter_form.html' with source='footer' label='Newsletter' %}
|
||||
{% for page in legal_pages %}
|
||||
<a href="{{ page.url }}">{{ page.title }}</a>
|
||||
{% endfor %}
|
||||
|
||||
@@ -2,4 +2,5 @@
|
||||
<a href="/">Home</a>
|
||||
<a href="/articles/">Articles</a>
|
||||
<a href="/about/">About</a>
|
||||
{% include 'components/newsletter_form.html' with source='nav' label='Get updates' %}
|
||||
</nav>
|
||||
|
||||
11
templates/components/newsletter_form.html
Normal file
11
templates/components/newsletter_form.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<form method="post" action="/newsletter/subscribe/" data-newsletter-form>
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="source" value="{{ source|default:'unknown' }}" />
|
||||
<label>
|
||||
<span>{{ label|default:"Newsletter" }}</span>
|
||||
<input type="email" name="email" required />
|
||||
</label>
|
||||
<input type="text" name="honeypot" style="display:none" />
|
||||
<button type="submit">Subscribe</button>
|
||||
<p data-newsletter-message aria-live="polite"></p>
|
||||
</form>
|
||||
Reference in New Issue
Block a user