mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-07-02 01:32:41 +00:00
Show forum topics on homepage (#2562)
Signed-off-by: Daniel Gray <dngray@privacyguides.org>
This commit is contained in:
@ -23,7 +23,7 @@
|
||||
{% extends "main.html" %}
|
||||
{% set homepage = config.extra.privacy_guides.homepage %}
|
||||
{% block extrahead %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/home.css?v=3.3.0' | url }}">
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/home.css?v=20240501' | url }}">
|
||||
{% for feed in homepage.rss %}
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ feed.title }}" href="{{ feed.link }}">
|
||||
{% endfor %}
|
||||
@ -49,6 +49,24 @@
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% if config.theme.language == "en" %}
|
||||
<div class="mdx-discourse-topics">
|
||||
<h2>Top discussions this week</h2>
|
||||
<div
|
||||
class="topics-list"
|
||||
data-forum="https://discuss.privacyguides.net"
|
||||
data-feed="https://discuss.privacyguides.net/top.json?period=weekly"
|
||||
data-count="5">
|
||||
</div>
|
||||
<noscript>
|
||||
<a href="https://discuss.privacyguides.net/" class="md-button md-button--primary">
|
||||
Join the forum
|
||||
</a>
|
||||
</noscript>
|
||||
|
||||
<hr />
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ page.content }}
|
||||
<div class="mdx-cta">
|
||||
<hr />
|
||||
@ -62,4 +80,26 @@
|
||||
<p>{{ cta.description }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if config.theme.language == "en" %}
|
||||
<div class="mdx-discourse-topics">
|
||||
<h3>Join a discussion</h3>
|
||||
<div
|
||||
class="topics-list"
|
||||
data-forum="https://discuss.privacyguides.net"
|
||||
data-feed="https://discuss.privacyguides.net/latest.json"
|
||||
data-count="15">
|
||||
</div>
|
||||
<noscript>
|
||||
<a href="https://discuss.privacyguides.net/" class="md-button md-button--primary">
|
||||
Join the forum
|
||||
</a>
|
||||
</noscript>
|
||||
|
||||
<hr />
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/discourse-topics.js' | url }}"></script>
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user