Skip to content

Commit

Permalink
refactor(blocks): rename to convention
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman committed Jul 13, 2023
1 parent 7c06ee2 commit f9ddfec
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 44 deletions.
20 changes: 6 additions & 14 deletions benefits/core/templates/core/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{% load i18n %}
{% load static %}
{% get_current_language as LANGUAGE_CODE %}
<!doctype html>
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}" class="{% block classes %}{% endblock classes %}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="{% translate "core.pages.help.about.p[0]" %}">
{# djlint:off #}
<title>{% block page_title %}{% if page.title %}{{ page.title }}&nbsp;|&nbsp;{% endif %}{% endblock page_title %}{% translate "core.pages.title.suffix" %}</title>
<title>{% block page-title %}{% if page.title %}{{ page.title }}&nbsp;|&nbsp;{% endif %}{% endblock page-title %}{% translate "core.pages.title.suffix" %}</title>
{# djlint:on #}

<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -57,24 +57,16 @@
<div id="header-container" class="navbar navbar-expand-sm navbar-dark bg-primary justify-content-between">
<div class="container">
<span class="navbar-brand p-0">
<img class="sm d-lg-none"
src="{% static "img/logo-sm.svg" %}"
width="90"
height="51.3"
alt="{% translate "core.logos.small" context "image alt text" %}"/>
<img class="lg d-none d-lg-block"
src="{% static "img/logo-lg.svg" %}"
width="220"
height="50"
alt="{% translate "core.logos.large" context "image alt text" %}"/>
<img class="sm d-lg-none" src="{% static "img/logo-sm.svg" %}" width="90" height="51.3" alt="{% translate "core.logos.small" context "image alt text" %}" />
<img class="lg d-none d-lg-block" src="{% static "img/logo-lg.svg" %}" width="220" height="50" alt="{% translate "core.logos.large" context "image alt text" %}" />
</span>
<div class="form-inline">{% include "core/includes/lang-selector.html" %}</div>
</div>
</div>
</header>

<main id="main-content" role="main">
{% block main_content %}
{% block main-content %}
{% block nav-buttons %}
{% endblock nav-buttons %}
<div class="container main-row">
Expand Down Expand Up @@ -106,7 +98,7 @@ <h1>{{ page.headline }}</h1>
</div>
{% endblock call-to-action %}
</div>
{% endblock main_content %}
{% endblock main-content %}
</main>

<footer id="footer">
Expand Down
4 changes: 2 additions & 2 deletions benefits/core/templates/core/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load i18n %}
{% load static %}

{% block main_content %}
{% block main-content %}
<div class="container">
<div class="row justify-content-center">
<div class="col-10">
Expand Down Expand Up @@ -88,4 +88,4 @@ <h2 class="pt-8" id="questions">{% translate "core.pages.help.questions" %}</h2>
</div>
</div>
</div>
{% endblock main_content %}
{% endblock main-content %}
4 changes: 2 additions & 2 deletions benefits/core/templates/core/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{ block.super |add:" landing" }}
{% endblock classes %}

{% block main_content %}
{% block main-content %}
<div class="container">
<div class="row align-items-end align-items-lg-center">
<div class="col-lg-5">
Expand All @@ -17,4 +17,4 @@ <h2 class="p-sm pb-lg-8 pt-1 pt-lg-4 pb-4">{% translate "core.pages.landing.h2"
</div>
</div>
</div>
{% endblock main_content %}
{% endblock main-content %}
4 changes: 2 additions & 2 deletions benefits/core/templates/core/logged-out.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "core/base.html" %}
{% load i18n %}

{% block main_content %}
{% block main-content %}
<div class="container">
<div class="row justify-content-lg-center">
<h1 class="pb-lg-8 pb-5">
Expand All @@ -11,4 +11,4 @@ <h1 class="pb-lg-8 pb-5">
{% include "core/includes/icon.html" with icon=page.icon %}
</div>
</div>
{% endblock main_content %}
{% endblock main-content %}
4 changes: 2 additions & 2 deletions benefits/eligibility/templates/eligibility/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
{{ block.super | add:" eligibility-index" }}
{% endblock classes %}

{% block page_title %}
{% block page-title %}
{% translate "eligibility.pages.index.title" %}&nbsp;|&nbsp;
{% endblock page_title %}
{% endblock page-title %}

{% block nav-buttons %}
{% url "core:index" as url %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% extends "eligibility/start.html" %}
{% load i18n %}

{% block page_title %}
{% block page-title %}
{% translate "eligibility.pages.start.mst_cc.title" %}&nbsp;|&nbsp;
{% endblock page_title %}
{% endblock page-title %}

{% block headline %}
<div class="col-lg-10">
Expand Down
4 changes: 2 additions & 2 deletions benefits/eligibility/templates/eligibility/start--senior.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% extends "eligibility/start.html" %}
{% load i18n %}

{% block page_title %}
{% block page-title %}
{% translate "eligibility.pages.start.senior.title" %}&nbsp;|&nbsp;
{% endblock page_title %}
{% endblock page-title %}

{% block headline %}
<div class="col-lg-10">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% extends "eligibility/start.html" %}
{% load i18n %}

{% block page_title %}
{% block page-title %}
{% translate "eligibility.pages.start.veteran.title" %}&nbsp;|&nbsp;
{% endblock page_title %}
{% endblock page-title %}

{% block headline %}
<div class="col-lg-10">
Expand Down
4 changes: 2 additions & 2 deletions benefits/eligibility/templates/eligibility/unverified.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "core/base.html" %}

{% block main_content %}
{% block main-content %}
{% include "core/includes/sign-out-link.html" %}

<div class="container">
Expand All @@ -21,4 +21,4 @@
</div>

</div>
{% endblock main_content %}
{% endblock main-content %}
4 changes: 2 additions & 2 deletions benefits/enrollment/templates/enrollment/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% extends "core/base.html" %}
{% load i18n %}

{% block page_title %}
{% block page-title %}
{% translate "enrollment.pages.index.title" %}&nbsp;|&nbsp;
{% endblock page_title %}
{% endblock page-title %}

{% block nav-buttons %}
{% include "core/includes/sign-out-link.html" %}
Expand Down
4 changes: 2 additions & 2 deletions benefits/enrollment/templates/enrollment/retry.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "core/base.html" %}

{% block main_content %}
{% block main-content %}
{% include "core/includes/sign-out-link.html" %}

<div class="container">
Expand All @@ -23,4 +23,4 @@
{% endif %}

</div>
{% endblock main_content %}
{% endblock main-content %}
4 changes: 2 additions & 2 deletions benefits/enrollment/templates/enrollment/success.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
{{ block.super |add:" enrollment-success" }}
{% endblock classes %}

{% block page_title %}
{% block page-title %}
{% translate "enrollment.pages.success.title" %}&nbsp;|&nbsp;
{% endblock page_title %}
{% endblock page-title %}

{% block headline %}
<div class="col-lg-8">
Expand Down
4 changes: 2 additions & 2 deletions benefits/templates/200-user-error.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "core/base.html" %}

{% block main_content %}
{% block main-content %}
<div class="container">
{% include "core/includes/icon-title.html" with title=page.headline icon=page.icon %}

Expand All @@ -14,4 +14,4 @@
<div class="col-lg-3 col-8">{% include "core/includes/button--home.html" %}</div>
</div>
</div>
{% endblock main_content %}
{% endblock main-content %}
4 changes: 2 additions & 2 deletions benefits/templates/400.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "core/base.html" %}

{% block main_content %}
{% block main-content %}
<div class="container">
{% include "core/includes/icon-title.html" with title=page.headline icon=page.icon %}

Expand All @@ -14,4 +14,4 @@
<div class="col-lg-3 col-8">{% include "core/includes/button--home.html" %}</div>
</div>
</div>
{% endblock main_content %}
{% endblock main-content %}
4 changes: 2 additions & 2 deletions benefits/templates/404.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "core/base.html" %}

{% block main_content %}
{% block main-content %}
<div class="container">
{% include "core/includes/icon-title.html" with title=page.headline icon=page.icon %}

Expand All @@ -14,4 +14,4 @@
<div class="col-lg-3 col-8">{% include "core/includes/button--home.html" %}</div>
</div>
</div>
{% endblock main_content %}
{% endblock main-content %}
4 changes: 2 additions & 2 deletions benefits/templates/500.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "core/base.html" %}

{% block main_content %}
{% block main-content %}
<div class="container">
{% include "core/includes/icon-title.html" with title=page.headline icon=page.icon %}

Expand All @@ -14,4 +14,4 @@
<div class="col-lg-3 col-8">{% include "core/includes/button--home.html" %}</div>
</div>
</div>
{% endblock main_content %}
{% endblock main-content %}

0 comments on commit f9ddfec

Please sign in to comment.