Skip to content

Commit

Permalink
Refresh menu styling on large screens
Browse files Browse the repository at this point in the history
- Reduce the font weight
- Add the dxw 'D' as a list item indicator (excluding the back link),
  which is a style adopted from our main site's [impact report][1]
- Remove the second line indent

[1]: https://www.dxw.com/dxw-impact
  • Loading branch information
yndajas committed Oct 17, 2023
1 parent 431a294 commit e389061
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/_includes/related_pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% assign related_pages = related_page_group.items | sort_natural: "title" %}

{% for related_page in related_pages %}
{% unless related_page.unrelatable %}
{% unless related_page.unrelatable or (related_page.title.size == 0) %}
<li>
<a href="{{ related_page.url }}">
{{ related_page.title }}
Expand Down
22 changes: 19 additions & 3 deletions src/_sass/_related.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

$large-screen-nav-height: 134.992px;
$large-screen-contribute-height: 81px;
$list-d-size: 11px;

.related {
overflow-y: auto;
Expand All @@ -13,7 +14,6 @@ $large-screen-contribute-height: 81px;

font-family: typography.$heading-font-family;
font-size: 0.9em;
font-weight: typography.$heading-font-weight;

background-color: colours.$accent-a;

Expand Down Expand Up @@ -55,8 +55,6 @@ $large-screen-contribute-height: 81px;

a {
margin-bottom: 0.5em;
padding-left: 2em;
text-indent: -2em;

&:hover,
&:focus,
Expand All @@ -66,11 +64,29 @@ $large-screen-contribute-height: 81px;
}

ul li {
position: relative;
padding-right: 0;
padding-left: calc($list-d-size + 10px);
white-space: unset;

&.related__back-link {
margin-bottom: 1.5em;
padding-left: 0;
}

&:not(.related__back-link)::before {
content: "";

position: absolute;
top: 8px;
left: 0;

width: $list-d-size;
height: $list-d-size;

background: url("/assets/images/d-symbol-blue.svg");
background-repeat: no-repeat;
background-size: contain;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/_sass/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $body-font-weight-bold: 700;
$heading-font-family: poppins, sans-serif;
$heading-font-weight: 600;

@import "https://fonts.googleapis.com/css?family=Poppins:600&display=swap";
@import "https://fonts.googleapis.com/css?family=Poppins:400,600&display=swap";
@import "https://fonts.googleapis.com/css?family=Cardo:400,700&display=swap";

body {
Expand Down
3 changes: 3 additions & 0 deletions src/assets/images/d-symbol-blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e389061

Please sign in to comment.