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

Add layouts to the DWDS #663

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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 src/content/templates/content/navigation_page.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "dwds_content.html" %}
{% extends "dwds/layouts/2_col.html" %}
{% load wagtailcore_tags %}

{% block page_title %}
Expand Down
39 changes: 0 additions & 39 deletions src/core/templates/dwds_content.html

This file was deleted.

16 changes: 16 additions & 0 deletions src/dw_design_system/dwds/layouts/1_col.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% extends "dwds/layouts/base.html" %}

{% block content %}
<div class="primary-content">
{% block pre_primary_content %}
{{ pre_primary_content }}
{% endblock pre_primary_content %}
{% block primary_content %}
{{ primary_content }}
{% endblock primary_content %}
{% block post_primary_content %}
{{ post_primary_content }}
{% include 'includes/tag_set.html' %}
{% endblock post_primary_content %}
</div>
{% endblock content %}
29 changes: 29 additions & 0 deletions src/dw_design_system/dwds/layouts/2_col.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% extends "dwds/layouts/base.html" %}

{% block content %}
<div class="with-sidebar-right">
<div class="primary-content">
{% block pre_primary_content %}
{{ pre_primary_content }}
{% endblock pre_primary_content %}
{% block primary_content %}
{{ primary_content }}
{% endblock primary_content %}
{% block post_primary_content %}
{{ post_primary_content }}
{% include 'includes/tag_set.html' %}
{% endblock post_primary_content %}
</div>
<div class="secondary-content">
{% block pre_secondary_content %}
{{ pre_secondary_content }}
{% endblock pre_secondary_content %}
{% block secondary_content %}
{{ secondary_content }}
{% endblock secondary_content %}
{% block post_secondary_content %}
{{ post_secondary_content }}
{% endblock post_secondary_content %}
</div>
</div>
{% endblock content %}
29 changes: 29 additions & 0 deletions src/dw_design_system/dwds/layouts/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{% extends "base.html" %}


{% block pre_main %}
<div class="dwds-container">
{% endblock pre_main %}

{% block main_content %}
<div class="dwds" style="margin-bottom: var(--s2)">
<div class="stack">
{% block pre_content %}
{{ pre_content }}
{% endblock pre_content %}
{% block page_title %}
<h1>{{ page.title }}</h1>
{% endblock page_title %}
{% block content %}
{{ content }}
{% endblock content %}
{% block post_content %}
{{ post_content }}
{% endblock post_content %}
</div>
</div>
{% endblock main_content %}

{% block post_main %}
</div>
{% endblock post_main %}
2 changes: 1 addition & 1 deletion src/home/templates/home/home_page_new.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "dwds_content.html" %}
{% extends "dwds/layouts/2_col.html" %}
{% load static %}
{% load wagtailcore_tags %}
{% load wagtailimages_tags %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends 'dwds_content.html' %}
{% extends "dwds/layouts/1_col.html" %}

{% load bookmarks %}

Expand Down