Skip to content
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

Remove public primary nav (db) and "news" app #3715

Merged
merged 3 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion hypha/public/funds/templates/public_funds/fund_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% block header_modifier %}header--grey-pixels{% endblock %}
{# Dont include fixed apply button on this page #}
{% block apply_button %}{% endblock %}
{% load wagtailcore_tags wagtailimages_tags navigation_tags static %}
{% load wagtailcore_tags wagtailimages_tags static %}

{% block content %}
{% include "public_funds/includes/fund_apply_cta.html" with page=page apply_page=page.application_type %}
Expand Down
2 changes: 1 addition & 1 deletion hypha/public/funds/templates/public_funds/lab_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% block header_modifier %}header--grey-pixels{% endblock %}
{# Dont include fixed apply button on this page #}
{% block apply_button %}{% endblock %}
{% load wagtailcore_tags wagtailimages_tags navigation_tags static %}
{% load wagtailcore_tags wagtailimages_tags static %}

{% block content %}
{% include "public_funds/includes/lab_apply_cta.html" %}
Expand Down
147 changes: 0 additions & 147 deletions hypha/public/home/management/commands/export_public_pages_json.py

This file was deleted.

11 changes: 1 addition & 10 deletions hypha/public/home/templates/home/home_page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load cache wagtailcore_tags wagtailimages_tags static navigation_tags util_tags %}
{% load cache wagtailcore_tags wagtailimages_tags static util_tags %}

{% block header %}
{% image page.header_image fill-1440x740 as header_image %}
Expand Down Expand Up @@ -32,12 +32,6 @@
</button>
</div>

<section class="header__menus header__menus--desktop">
{% cache 3600 navigation__primary wagtail_site %}
{% primarynav %}
{% endcache %}
</section>

<section class="header__menus header__menus--mobile">
<div class="header__inner header__inner--menu-open">
<a href="{{ settings.utils.SystemMessagesSettings.site_logo_link|default:"/" }}" aria-label="Home link">
Expand All @@ -49,9 +43,6 @@
{% endif %}
</a>
</div>
{% cache 3600 navigation__primary wagtail_site %}
{% primarynav %}
{% endcache %}
</section>

<div class="header__button-container">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated by Django 4.2.9 on 2024-01-10 07:42

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("navigation", "0003_alter_navigationsettings_primary_navigation"),
]

operations = [
migrations.DeleteModel(
name="NavigationSettings",
),
]
34 changes: 0 additions & 34 deletions hypha/public/navigation/models.py
Original file line number Diff line number Diff line change
@@ -1,34 +0,0 @@
from django.utils.translation import gettext_lazy as _
from modelcluster.models import ClusterableModel
from wagtail import blocks
from wagtail.admin.panels import FieldPanel
from wagtail.contrib.settings.models import BaseSiteSetting
from wagtail.fields import StreamField

from hypha.core.wagtail.admin import register_public_site_setting


class LinkBlock(blocks.StructBlock):
page = blocks.PageChooserBlock()
title = blocks.CharBlock(
help_text=_("Leave blank to use the page's own title"), required=False
)

class Meta:
template = ("navigation/blocks/menu_item.html",)


@register_public_site_setting(icon="", classnames="icon icon-list-ul")
class NavigationSettings(BaseSiteSetting, ClusterableModel):
primary_navigation = StreamField(
[
("link", LinkBlock()),
],
blank=True,
help_text=_("Main site navigation"),
use_json_field=True,
)

panels = [
FieldPanel("primary_navigation"),
]
10 changes: 0 additions & 10 deletions hypha/public/navigation/templates/navigation/primarynav.html

This file was deleted.

Empty file.
20 changes: 0 additions & 20 deletions hypha/public/navigation/templatetags/navigation_tags.py

This file was deleted.

21 changes: 0 additions & 21 deletions hypha/public/news/blocks.py

This file was deleted.

87 changes: 0 additions & 87 deletions hypha/public/news/feeds.py

This file was deleted.

Empty file.
Loading