File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 padding-left : nhsuk-spacing (3 );
1515 background-color : nhsuk-colour (" grey-1" );
1616
17+ @include nhsuk-font-size (22 );
18+
1719 // stylelint-disable-next-line max-nesting-depth
1820 @include nhsuk-media-query ($from : tablet) {
1921 margin-left : #{nhsuk-spacing (-4 ) - 1px } ;
Original file line number Diff line number Diff line change 1+ @use " sass:color" ;
12@use " ../vendor/nhsuk-frontend" as * ;
23
34.app-session-banner {
3031 .nhsuk-notification-banner__heading {
3132 color : $nhsuk-reverse-text-colour ;
3233 }
34+
35+ .app-secondary-navigation {
36+ margin : 0 ;
37+ border-bottom : 0 none ;
38+ background : nhsuk-shade ($nhsuk-brand-colour , 20% );
39+ box-shadow : 0 -1px 0 0 $nhsuk-secondary-border-colour ;
40+ }
41+
42+ .app-secondary-navigation__list {
43+ box-shadow : none ;
44+
45+ @include nhsuk-media-query ($until : tablet) {
46+ margin-left : #{$nhsuk-gutter-half * -1 } ;
47+ }
48+ }
49+
50+ & [data-app-sticky-init ] {
51+ position : sticky ;
52+ z-index : 999 ;
53+ top : 0 ;
54+ right : 0 ;
55+ left : 0 ;
56+
57+ width : 100vw ;
58+ margin-right : -50vw ;
59+ margin-left : -50vw ;
60+ }
61+
62+ & [data-stuck = " true" ] {
63+ border-bottom-color : nhsuk-colour (" grey-3" );
64+ box-shadow : 0 $nhsuk-border-width 0 color .scale (nhsuk-colour (" grey-3" ), $alpha : -50% );
65+
66+ .app-main-wrapper--xs {
67+ padding-top : nhsuk-spacing (2 );
68+ padding-bottom : 0 ;
69+ }
70+
71+ .nhsuk-breadcrumb {
72+ @include nhsuk-visually-hidden ;
73+ }
74+
75+ .nhsuk-heading-l {
76+ @include nhsuk-font-size (22 );
77+ }
78+
79+ .app-secondary-navigation {
80+ box-shadow : none ;
81+ }
82+
83+ .app-secondary-navigation__list {
84+ @include nhsuk-font-size (16 );
85+ }
86+ }
3387}
Original file line number Diff line number Diff line change 3434 box-shadow : 0 $nhsuk-border-width 0 color .scale (nhsuk-colour (" grey-3" ), $alpha : -50% );
3535 }
3636}
37-
38- .app-sticky-navigation--reverse {
39- border-bottom : 0 none ;
40- background : nhsuk-shade ($nhsuk-brand-colour , 20% );
41-
42- .app-secondary-navigation {
43- box-shadow : 0 -1px 0 0 $nhsuk-reverse-border-colour ;
44- }
45- }
Original file line number Diff line number Diff line change 44[class ^= " app-grid-column" ],
55[class ^= " nhsuk-grid-column" ] {
66 & [data-app-sticky-init ] {
7- @include nhsuk-media-query ($from : desktop) {
7+ @include nhsuk-media-query ($from : large - desktop) {
88 position : sticky ;
99 top : 0 ;
1010 }
1919.app-grid-column-patient-record {
2020 @include nhsuk-grid-column (one- quarter, $float : right , $at : large- desktop);
2121
22- padding-top : 12px ;
23-
2422 & [data-app-sticky-init ] {
25- @include nhsuk-media-query ($from : desktop) {
26- top : #{nhsuk-spacing (9 ) + nhsuk-spacing (3 )} ;
23+ @include nhsuk-media-query ($from : large - desktop) {
24+ top : #{nhsuk-spacing (9 ) + nhsuk-spacing (5 )} ;
2725 }
2826 }
2927}
Original file line number Diff line number Diff line change 11@forward " grid" ;
2+ @forward " main-wrapper" ;
Original file line number Diff line number Diff line change 1+ @use " ../../vendor/nhsuk-frontend" as * ;
2+
3+ .app-main-wrapper--xs {
4+ padding-top : nhsuk-spacing (3 );
5+ padding-bottom : nhsuk-spacing (3 );
6+ }
Original file line number Diff line number Diff line change @@ -581,6 +581,21 @@ export class Session {
581581 }
582582 }
583583
584+ /**
585+ * Get short name (without dates)
586+ *
587+ * @returns {string|undefined } Short name
588+ */
589+ get shortName ( ) {
590+ if ( this . clinic ) {
591+ return `${ this . programmeNames . titleCase } community clinic`
592+ }
593+
594+ if ( this . location ) {
595+ return `${ this . programmeNames . titleCase } session at ${ this . location . name } `
596+ }
597+ }
598+
584599 /**
585600 * Get address
586601 *
Original file line number Diff line number Diff line change 11{% extends " _layouts/default.njk" %}
22
33{% block main %}
4- <div class =" app-session-banner" >
4+ <div class =" app-session-banner" {% if stickyBanner %} data-module = " app-sticky " {% endif %} >
55 <div class =" nhsuk-width-container" >
66 {% block beforeContent %}{% endblock %}
77
8- <div class =" nhsuk-main-wrapper nhsuk -main-wrapper--s " >
8+ <div class =" nhsuk-main-wrapper app -main-wrapper--xs " >
99 {{ notificationBanner (success ) if success }}
1010 {{ notificationBanner (message ) if message }}
1111
1818 </p >
1919 {% endif %}
2020 </div >
21- </div >
22- </div >
2321
24- <div class =" app-sticky-navigation app-sticky-navigation--reverse" data-module =" app-sticky" >
25- <div class =" nhsuk-width-container" >
2622 {{ appSecondaryNavigation ({
2723 classes : " app-secondary-navigation--reverse" ,
2824 items : navigationItems
3127 </div >
3228
3329 <div class =" nhsuk-width-container" >
34- <main class =" nhsuk-main-wrapper" id =" maincontent" role =" main" >
30+ <main class =" nhsuk-main-wrapper nhsuk-main-wrapper--s " id =" maincontent" role =" main" >
3531 <form method =" post" novalidate data-validate >
3632 {% block content %}
3733 {% endblock %}
Original file line number Diff line number Diff line change 11{% extends " _layouts/session.njk" %}
22
3- {% set title = patient .fullName + " – " + __ (" patient.events.title" ) %}
3+ {% set title = patient .initials + " – " + session . shortName + " – " + __ (" patient.events.title" ) %}
44{% set heading = patientSession .patient .fullName %}
5+ {% set stickyBanner = true %}
56{% set view = " events" %}
67
78{% block beforeContent %}
Original file line number Diff line number Diff line change 11{% extends " _layouts/session.njk" %}
22
3- {% set title = patient .initials + " – " + session .location . name %}
3+ {% set title = patient .initials + " – " + session .shortName %}
44{% set heading = patientSession .patient .fullName %}
5+ {% set stickyBanner = true %}
56
67{% block beforeContent %}
78 {{ breadcrumb ({
89 classes : " nhsuk-breadcrumb--reverse" ,
910 items : [{
10- text : session .name ,
11+ text : session .shortName ,
1112 href : session .uri
1213 }, {
1314 text : __ (" session." + activity + " .label" ),
You can’t perform that action at this time.
0 commit comments