Skip to content

Commit

Permalink
feat: page contents (#116)
Browse files Browse the repository at this point in the history
* initial setup for templates

* update: basic hero banner

* new: teamplate area

* remove main top margin

* update colour and ensure headings are correct

* new layouts from templates

* updates to header component

* hide breadcrumb on homepage template

* new: event content card

* fix link heading size

* fix padding issue in grid spacing

* add a display to links

* content card updates

* homepage template updates

* Restyled by prettier (#105)

Co-authored-by: Restyled.io <commits@restyled.io>

* replace user research with templates

* add padding to card img

* content card updates

* new: hub header

* new - page contents component

* add page contents to menu

Co-authored-by: Nathan Rogan <nathanroagn@centro.org.uk>
Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
4 people authored Mar 10, 2021
1 parent 09298b1 commit c625a7a
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/wmcads/components/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
@import "lists/unordered-list/unordered-list"; // Unordered list elements
@import "loader/loader"; // Loader
@import "message/message"; // Messages
@import "page-contents/page-contents"; // Page contents
@import "page-header/page-header"; // Page header
@import "phase-indicator/phase-indicator"; // Phase indicator
@import "portfolio-dashboard/portfolio-dashboard"; // Portfolio dashboard
Expand Down
2 changes: 1 addition & 1 deletion src/wmcads/components/hub-header/_hub-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

.text-pane {
position: absolute;
left: calc((100% - 960px) / 2);
left: calc((100% - 927px) / 2);
max-width: 468px;
overflow: auto;
}
Expand Down
10 changes: 10 additions & 0 deletions src/wmcads/components/page-contents/_page-contents.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% macro wmcadsPageContents(params) %}
<div class="wmcads-page-contents">
<h3>Page contents</h3>
<div>Page title</div>
<a>link 1</a>
<a>link 2</a>
<a>link 3</a>
<a>link 4</a>
</div>
{% endmacro %}
31 changes: 31 additions & 0 deletions src/wmcads/components/page-contents/_page-contents.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.wmcads-page-contents {
width: 288px;
min-height: 57px;
margin-bottom: 30px;
padding: 10px;
border-bottom: 3px solid $black;
background: $white;

h3 {
margin-top: 0;
margin-bottom: 10px;
color: get-color(cta);
font-size: 23px;
font-weight: bold;
line-height: 24px;
}

div {
margin-bottom: 10px;
padding-left: 10px;
border-left: 3px solid get-color(primary);
}

a {
display: block;
margin-bottom: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
3 changes: 3 additions & 0 deletions src/www/assets/json/merged.njk.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
{
"name": "Message"
},
{
"name": "Page contents"
},
{
"name": "Page header"
},
Expand Down
3 changes: 3 additions & 0 deletions src/www/data.njk.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
{
"name": "Message"
},
{
"name": "Page contents"
},
{
"name": "Page header"
},
Expand Down
12 changes: 12 additions & 0 deletions src/www/pages/components/page-contents/index.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "www/_layouts/layout-left-pane.njk" %}
{% set pageTitle="Page contents" %}
{% from "wmcads/components/page-contents/_page-contents.njk" import wmcadsPageContents %}
{% from "www/_partials/component-example/component-example.njk" import compExample %}

{% block content %}
{{
compExample([
wmcadsPageContents()
])
}}
{% endblock %}

0 comments on commit c625a7a

Please sign in to comment.