1313
1414else
1515{*@
16- @if (Model .ShowMyAccount )
17- {
18- <a class =" nhsuk-account__login--link" asp-controller =" Myaccount" asp-action =" Index" >My account </a >
19- }
20- @if (Model .ShowSignOut )
21- {
22- <a class =" nhsuk-account__login--link" asp-controller =" Home" asp-action =" Logout" >Log out </a >
23- }
24- <div class =" nhsuk-header__mobile-break" ></div >
25- @if (Model .ShowSearch )
26- {
27- <button class =" nhsuk-header__search-toggle" id =" toggle-search" aria-controls =" search" aria-label =" Open search" >
28- <svg class =" nhsuk-icon nhsuk-icon__search" xmlns =" http://www.w3.org/2000/svg" viewBox =" 0 0 24 24" aria-hidden =" true" focusable =" false" width =" 27" height =" 27" >
29- <path d =" M19.71 18.29l-4.11-4.1a7 7 0 1 0-1.41 1.41l4.1 4.11a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zM5 10a5 5 0 1 1 5 5 5 5 0 0 1-5-5z" ></path >
16+
17+ @if (Model .ShowMyAccount || Model .ShowSignOut )
18+ {
19+ <div class =" nhsuk-account__myaccount" >
20+ <div class =" nhsuk-account__icon-wrapper" >
21+ <svg xmlns =" http://www.w3.org/2000/svg" width =" 26" height =" 26" viewBox =" 0 0 26 26" fill =" none" >
22+ <g clip-path =" url(#clip0_5102_1890)" >
23+ <path d =" M12.9984 14.7859C10.4797 14.7859 8.36719 12.7547 8.36719 10.1547C8.36719 7.55469 10.3984 5.52344 12.9984 5.52344C15.5172 5.52344 17.6297 7.55469 17.6297 10.1547C17.6297 12.7547 15.5172 14.7859 12.9984 14.7859Z" fill =" white" />
24+ <path d =" M13 0C5.85 0 0 5.85 0 13C0 20.15 5.85 26 13 26C20.15 26 26 20.15 26 13C26 5.85 20.15 0 13 0ZM19.5813 22.3438V21.125C19.5813 18.2812 17.55 16.0063 14.95 16.0063H11.05C8.53125 15.925 6.5 18.2812 6.5 21.125V22.425C1.3 18.7688 0 11.6188 3.65625 6.5C7.3125 1.38125 14.3812 0 19.5 3.65625C24.6187 7.3125 26 14.3812 22.3438 19.5C21.6125 20.6375 20.6375 21.6125 19.5813 22.3438Z" fill =" white" />
25+ </g >
26+ <defs >
27+ <clipPath id =" clip0_5102_1890" >
28+ <rect width =" 26" height =" 26" fill =" white" />
29+ </clipPath >
30+ </defs >
3031 </svg >
31- <span class =" nhsuk-u-visually-hidden" >Search </span >
32- </button >
33- }
32+
33+ @if (Model .NotificationCount > 0 )
34+ {
35+ <div class =" nhsuk-header__notification-dot-mobile" >@NotificationDisplay() </div >
36+ }
37+ </div >
38+
39+ <div class =" nhsuk-account__links" >
40+ @if (Model .ShowMyAccount )
41+ {
42+ <a class =" nhsuk-account__login--link" asp-controller =" Myaccount" asp-action =" Index" >My account </a >
43+ }
44+ @if (Model .ShowSignOut )
45+ {
46+ <a class =" nhsuk-account__login--link" asp-controller =" Home" asp-action =" Logout" >Log out </a >
47+ }
48+ </div >
49+ </div >
50+ }
51+ <div class =" nhsuk-header__mobile-break" ></div >
52+ @if (Model .ShowSearch )
53+ {
54+ <button class =" nhsuk-header__search-toggle" id =" toggle-search" aria-controls =" search" aria-label =" Open search" >
55+ <svg class =" nhsuk-icon nhsuk-icon__search" xmlns =" http://www.w3.org/2000/svg" viewBox =" 0 0 24 24" aria-hidden =" true" focusable =" false" width =" 27" height =" 27" >
56+ <path d =" M19.71 18.29l-4.11-4.1a7 7 0 1 0-1.41 1.41l4.1 4.11a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zM5 10a5 5 0 1 1 5 5 5 5 0 0 1-5-5z" ></path >
57+ </svg >
58+ <span class =" nhsuk-u-visually-hidden" >Search </span >
59+ </button >
60+ }
3461@* } *@
3562
3663<!-- end Mobile nav -->
64+ @functions {
65+ public string NotificationDisplay ()
66+ {
67+ if (Model .NotificationCount < 1 )
68+ {
69+ return " " ;
70+ }
71+
72+ var returnString = Model .NotificationCount .ToString ();
73+
74+ if (Model .NotificationCount > 9 )
75+ {
76+ returnString = " 9+" ;
77+ }
78+
79+ return returnString ;
80+
81+ }
82+ }
0 commit comments