diff --git a/opentech/apply/funds/templates/funds/applicationsubmission_admin_detail.html b/opentech/apply/funds/templates/funds/applicationsubmission_admin_detail.html index 47380b0e4c80c68a41c39e3ca68474a91c73dc85..5cc8cc9b0e583c3e7c5bbf49c32130517068c74f 100644 --- a/opentech/apply/funds/templates/funds/applicationsubmission_admin_detail.html +++ b/opentech/apply/funds/templates/funds/applicationsubmission_admin_detail.html @@ -44,4 +44,5 @@ <script src="{% static 'js/apply/toggle-actions-panel.js' %}"></script> <script src="{% static 'js/apply/toggle-reviewers.js' %}"></script> <script src="{% static 'js/apply/toggle-sidebar.js' %}"></script> + <script src="{% static 'js/apply/submission-text-cleanup.js' %}"></script> {% endblock %} diff --git a/opentech/apply/funds/templates/funds/applicationsubmission_detail.html b/opentech/apply/funds/templates/funds/applicationsubmission_detail.html index 4f11172e9405e0a21527c14c99b5a4aa7cbbf300..ab0d66ee88020181b763d932bef573136a516b00 100644 --- a/opentech/apply/funds/templates/funds/applicationsubmission_detail.html +++ b/opentech/apply/funds/templates/funds/applicationsubmission_detail.html @@ -49,14 +49,14 @@ {% endblock %} <div class="wrapper wrapper--sidebar"> {% if request.user|has_edit_perm:object and object.status == 'draft_proposal' and not request.user.is_apply_staff %} - <div> + <div class="wrapper--sidebar--inner"> <h4>Congratulations!</h4> <h5>Your {{ object.previous.stage }} application has been accepted.</h5> <a class="button button--primary" href="{% url 'funds:submissions:edit' object.id %}">Start your {{ object.stage }} application</a> </div> {% else %} - <div> - <h6 class="heading heading--submission-meta"> + <article class="wrapper--sidebar--inner"> + <header class="heading heading--submission-meta heading-text zeta"> <span>Submitted: <strong>{{ object.submit_time.date }} by {{ object.user.get_full_name }}</strong></span> <span>Last edited: <strong>{{ object.live_revision.timestamp.date }} by {{ object.live_revision.author }}</strong></span> {% if request.user|has_edit_perm:object %} @@ -70,10 +70,10 @@ <svg class="icon icon--padlock"><use xlink:href="#padlock"></use></svg> </span> {% endif %} - </h6> + </header> {% include "funds/includes/rendered_answers.html" %} - </div> + </article> {% endif %} <aside class="sidebar"> @@ -131,5 +131,6 @@ {% block extra_js %} <script src="{% static 'js/apply/tabs.js' %}"></script> + <script src="{% static 'js/apply/submission-text-cleanup.js' %}"></script> {% endblock %} diff --git a/opentech/apply/funds/templates/funds/applicationsubmission_form.html b/opentech/apply/funds/templates/funds/applicationsubmission_form.html index ce956b2c6c511fd146bc2e61f3c654cfcf6926cf..4b9de190c67debb681a1de664af615bcbb8560cd 100644 --- a/opentech/apply/funds/templates/funds/applicationsubmission_form.html +++ b/opentech/apply/funds/templates/funds/applicationsubmission_form.html @@ -11,7 +11,7 @@ {% include "forms/includes/form_errors.html" with form=form %} <div class="wrapper wrapper--light-grey-bg wrapper--form wrapper--sidebar"> - <div> + <div class="wrapper--sidebar--inner"> <form class="form" action="" method="post" enctype="multipart/form-data"> {% csrf_token %} {{ form.media }} diff --git a/opentech/apply/funds/templates/funds/includes/rendered_answers.html b/opentech/apply/funds/templates/funds/includes/rendered_answers.html index 573d6bd2469cf29f53a865e030bd07300701ddfc..301e1820b640b35948f92e4f315f31917e038c6a 100644 --- a/opentech/apply/funds/templates/funds/includes/rendered_answers.html +++ b/opentech/apply/funds/templates/funds/includes/rendered_answers.html @@ -3,26 +3,26 @@ <div class="grid grid--proposal-info"> <div> <h5>Requested Funding</h5> - <p>{{ object.get_value_display }}</p> + {{ object.get_value_display }} </div> <div> <h5>Project Duration</h5> - <p>{{ object.get_duration_display }}</p> + {{ object.get_duration_display }} </div> <div> <h5>Legal Name</h5> - <p>{{ object.get_full_name_display }}{% if request.user.is_apply_staff %} (<a href="{% url 'wagtailusers_users:edit' object.user_id %}">Edit account</a>){% endif %}</p> + {{ object.get_full_name_display }}{% if request.user.is_apply_staff %} (<a href="{% url 'wagtailusers_users:edit' object.user_id %}">Edit account</a>){% endif %} </div> <div> <h5>Email</h5> - <p>{{ object.get_email_display }}</p> + {{ object.get_email_display }} </div> <div class="grid__cell--span-two"> <h5>Address</h5> - <p>{{ object.get_address_display }}</p> + {{ object.get_address_display }} </div> </div> <div class="rich-text rich-text--answers"> diff --git a/opentech/apply/stream_forms/templates/stream_forms/render_field.html b/opentech/apply/stream_forms/templates/stream_forms/render_field.html index 8826fee6c0450155b406543ff9f1afd5d40e18fd..01afc0c0ce157203f85b21803c275c113c4fefca 100644 --- a/opentech/apply/stream_forms/templates/stream_forms/render_field.html +++ b/opentech/apply/stream_forms/templates/stream_forms/render_field.html @@ -1,10 +1,10 @@ {% if include_question %} -<div> - <h5>{{ value.field_label }}</h5> +<section> + <h4>{{ value.field_label }}</h4> {% endif %} - <div>{% block data_display %}{{ data }}{% endblock %}</div> + {% block data_display %}<span>{{ data }}</span>{% endblock %} {% if include_question %} -</div> +</section> {% endif %} diff --git a/opentech/public/news/templates/news/news_page.html b/opentech/public/news/templates/news/news_page.html index 5dc991351ca93c9a60f29860618dba8a4849f6c4..632ffe69f2b485be1568910f4afbe85cc08b9629 100644 --- a/opentech/public/news/templates/news/news_page.html +++ b/opentech/public/news/templates/news/news_page.html @@ -2,25 +2,25 @@ {% load wagtailcore_tags wagtailimages_tags static %} {% block content %} -<div class="wrapper wrapper--small"> +<article class="wrapper wrapper--small"> - <h5 class="heading heading--author"> - {{ page.display_date|date:"D, Y-m-d H:i" }} + <header class="heading heading--author heading-text epsilon"> + <time datetime="{{ page.display_date|date:"c" }}">{{ page.display_date|date:"D, Y-m-d H:i" }}</time> {% if page.authors.all %} | By: {% for author in page.authors.all %} <a href="{% pageurl author.author %}">{{ author.author }}</a> {% endfor %} {% endif %} - </h5> + </header> {% if page.introduction %} <h4 class="heading heading--introduction">{{ page.introduction }}</h4> {% endif %} - <section class="main-body"> + <div class="main-body"> {% include_block page.body %} - </section> + </div> {% if page.news_types.all %} <ul class="list list--flex"> @@ -40,7 +40,7 @@ {% endif %} {% include "includes/share.html" %} -</div> +</article> {% include "includes/relatedcontent.html" with related_documents=page.related_documents.all related_pages=page.related_pages.all %} diff --git a/opentech/public/people/templates/people/person_page.html b/opentech/public/people/templates/people/person_page.html index 7ec3a90c775044c0c45e99552f22bdfc5e9493df..f6f605655f1c639264c935b87947a27a42b35f93 100644 --- a/opentech/public/people/templates/people/person_page.html +++ b/opentech/public/people/templates/people/person_page.html @@ -4,7 +4,7 @@ {% block content %} <section class="wrapper wrapper--small wrapper--inner-space-large wrapper--sidebar"> - <div> + <div class="wrapper--sidebar--inner"> {% for person_type in page.person_types.all %} <h5 class="heading heading--no-margin">{{ person_type }}</h5> {% endfor %} diff --git a/opentech/public/projects/templates/projects/project_page.html b/opentech/public/projects/templates/projects/project_page.html index 40a87ce4729c77351392ee912607270d83b191ba..f67fd493293409fb65f32cf120dd0a8163d10f01 100644 --- a/opentech/public/projects/templates/projects/project_page.html +++ b/opentech/public/projects/templates/projects/project_page.html @@ -13,7 +13,7 @@ </div> <div class="wrapper wrapper--sidebar wrapper--inner-space-small"> - <div> + <div class="wrapper--sidebar--inner"> {{ page.body }} </div> <div> diff --git a/opentech/public/standardpages/templates/standardpages/information_page.html b/opentech/public/standardpages/templates/standardpages/information_page.html index c91053b449e8c0ea4857fa941b3fef2312cef49b..8a22f0df064cc48c18b17441775cc0e1985ce414 100644 --- a/opentech/public/standardpages/templates/standardpages/information_page.html +++ b/opentech/public/standardpages/templates/standardpages/information_page.html @@ -4,7 +4,7 @@ {% block content %} <div class="wrapper wrapper--flex"> - <section class="section section--main"> + <article class="section section--main"> {% if page.introduction %} <h4 class="heading heading--introduction">{{ page.introduction }}</h4> {% endif %} @@ -12,7 +12,7 @@ {% include_block page.body %} {% include "includes/share.html" %} - </section> + </article> </div> {% include "includes/relatedcontent.html" with related_pages=page.related_pages.all %} diff --git a/opentech/static_src/src/javascript/apply/submission-text-cleanup.js b/opentech/static_src/src/javascript/apply/submission-text-cleanup.js new file mode 100644 index 0000000000000000000000000000000000000000..9c5f7b813e0ae690f191ef71c7a35d8dba91dcfb --- /dev/null +++ b/opentech/static_src/src/javascript/apply/submission-text-cleanup.js @@ -0,0 +1,14 @@ +(function ($) { + + 'use strict'; + + $('p').each(function () { + // Detach (remove) p tag with only whitespace inside. + if ($.trim($(this).text()) === '') { + $(this).detach(); + } + }); + + +})(jQuery); + diff --git a/opentech/static_src/src/sass/apply/components/_link.scss b/opentech/static_src/src/sass/apply/components/_link.scss index bb2bb45d78ba2b82d1130b2f0f942133629e2479..65917654e32eb79eb5e59afb500db9050585f364 100644 --- a/opentech/static_src/src/sass/apply/components/_link.scss +++ b/opentech/static_src/src/sass/apply/components/_link.scss @@ -30,10 +30,6 @@ background: $color--light-blue; transition: background-color, $transition; - @include media-query(mob-landscape) { - max-width: 300px; - } - &:focus, &:hover { background-color: $color--dark-blue; diff --git a/opentech/static_src/src/sass/apply/components/_rich-text.scss b/opentech/static_src/src/sass/apply/components/_rich-text.scss index 7a8b80a3aa9e7cb6a349288bf66f9ad48c2b774a..4457e5494ae076fbaeb38f2d63f8b3b09b8d4fd6 100644 --- a/opentech/static_src/src/sass/apply/components/_rich-text.scss +++ b/opentech/static_src/src/sass/apply/components/_rich-text.scss @@ -3,11 +3,19 @@ word-break: break-word; &--answers { - > div { + > section { margin: 0 0 1rem; + + p:first-of-type { + margin-top: 0; + } + + p:empty { + margin: 0; + } } - h5 { + h4 { margin: 0; } } diff --git a/opentech/static_src/src/sass/apply/components/_wrapper.scss b/opentech/static_src/src/sass/apply/components/_wrapper.scss index 18e04f4270b3377c95a2cbca4d440b6bd0bf6a3d..cf14c2fe9e3c99c34137f3c664e107db9a940445 100644 --- a/opentech/static_src/src/sass/apply/components/_wrapper.scss +++ b/opentech/static_src/src/sass/apply/components/_wrapper.scss @@ -167,7 +167,7 @@ } } - > div:first-child { + &--inner { flex: 1; @include media-query(tablet-portrait) {