8000 Nav categories block is likely to cause bugs when new pages are added · Issue #27 · scidsg/frontpage · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Nav categories block is likely to cause bugs when new pages are added #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
brassy-endomorph opened this issue Jan 26, 2024 · 0 comments

Comments

@brassy-endomorph
Copy link
Collaborator

This block:

{% if request.endpoint not in ['login', 'register', 'publish', 'edit_article', 'user_settings', 'team', 'approve_articles', 'users'] %}
<ul class="categories-list">
{% for scope in all_scopes %}
<li>
{% if scope.type == 'type' %}
<a href="{{ url_for('articles_by_type', article_type=scope.name) }}">{{ scope.name }}</a>
{% elif scope.type == 'country' %}
<a href="{{ url_for('articles_by_country', country=scope.name) }}">{{ scope.name }}</a>
{% elif scope.type == 'source' %}
<a href="{{ url_for('articles_by_source', source=scope.name) }}">{{ scope.name }}</a>
{% endif %}
</li>
{% endfor %}
<li><a href="{{ url_for('all_categories') }}">All</a></li>
</ul>
{% endif %}

Should be moved to its own template that extends from base.html and then the relevant pages should extend from this. Where the div is currently should be an injectable block that defaults to empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0