-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #355 from nationalarchives/feature/221-priority-of…
…-download-as-xml-button Redesign download links to give XML less prominence
- Loading branch information
Showing
7 changed files
with
188 additions
and
65 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
ds_judgements_public_ui/sass/includes/_judgment_text_download_options.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.judgment-download-options { | ||
max-width: 90%; | ||
margin: 0 auto calc($spacer__unit*3) auto; | ||
|
||
@media (min-width: $grid__breakpoint-medium) { | ||
max-width: 46rem; | ||
} | ||
|
||
&__header { | ||
border-bottom: 4px solid $color__yellow; | ||
padding-bottom: calc($spacer__unit * 0.5); | ||
margin-bottom: calc($spacer__unit * 2); | ||
display: inline-block; | ||
} | ||
|
||
&__options-list { | ||
display: flex; | ||
flex-direction: column; | ||
gap: $spacer__unit; | ||
|
||
@media (min-width: $grid__breakpoint-medium) { | ||
flex-direction: row; | ||
} | ||
} | ||
|
||
&__download-option { | ||
border: 1px solid $color__yellow; | ||
padding: $spacer__unit; | ||
} | ||
|
||
h3 { | ||
margin-top: 0; | ||
} | ||
|
||
p { | ||
margin-bottom: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
ds_judgements_public_ui/templates/includes/judgment_text_download_options.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% load i18n %} | ||
<div id="download-options" class="judgment-download-options"> | ||
<h2 class="judgment-download-options__header">{% translate "judgment.downloadoptions.title" %}</h2> | ||
<div class="judgment-download-options__options-list"> | ||
<div class="judgment-download-options__download-option"> | ||
<h3> | ||
<a href="{% url 'detail_pdf' context.judgment_uri %}"> | ||
{% translate "judgment.downloadoptions.pdf.cta" %}{{context.pdf_size}} | ||
</a> | ||
</h3> | ||
<p> | ||
{% translate "judgment.downloadoptions.pdf.description" %} | ||
</p> | ||
</div> | ||
<div class="judgment-download-options__download-option"> | ||
<h3> | ||
<a href="{% url 'detail_xml' context.judgment_uri %}"> | ||
{% translate "judgment.downloadoptions.xml.cta" %} | ||
</a> | ||
</h3> | ||
<p> | ||
{% translate "judgment.downloadoptions.xml.description" %} | ||
</p> | ||
</div> | ||
</div> | ||
</div> |
12 changes: 7 additions & 5 deletions
12
ds_judgements_public_ui/templates/includes/judgment_text_toolbar.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
{% load i18n %} | ||
<div class="judgment-toolbar"> | ||
<div class="judgment-toolbar__container"> | ||
<div class="judgment-toolbar__return-link"> | ||
{% if request.args.origin == 'results' %} | ||
|
||
{% if request.args.origin == 'results' %} | ||
<div class="judgment-toolbar__return-link"></div> | ||
<a href="{{ request.args.return_link }}">{% translate "judgment.back" %}</a> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
<div class="judgment-toolbar__download"> | ||
<a class="judgment-download__option--xml" role="button" draggable="false" href="{% url 'detail_xml' context.judgment_uri %}">{% translate "judgment.downloadasxml" %}</a> | ||
<a class="judgment-download__option--pdf" role="button" draggable="false" href="{% url 'detail_pdf' context.judgment_uri %}">{% translate "judgment.downloadaspdf" %}{{context.pdf_size}}</a> | ||
<p class="judgment-download__download-options" role="note">{% translate "judgment.downloadoptions.shortcutlink" %}</p> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.