Skip to content

Commit 9cc32c8

Browse files
authored
Fixing header menu styling and console error (#886)
* Fixing header menu styling and console error * Fixing html error * Fixing menu text
1 parent a515bc4 commit 9cc32c8

File tree

3 files changed

+28
-18
lines changed

3 files changed

+28
-18
lines changed

public/gcweb/cdtsfixes.css

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,25 +144,32 @@
144144
padding-top: 6px;
145145
font-size: 23px;
146146
margin-left: 20px;
147+
margin-right: 15px;
147148
vertical-align: sub;
148149
}
149150

150151
.cdts-menu-label{
151152
display: inline-block !important;
152-
width: 154px;
153+
width: 260px;
153154
text-align: initial !important;
154155
font-size: 18px;
155156
line-height: 20px;
156157
color: #26374A;
157158
font-weight: bold;
158-
margin-left: 15px;
159-
padding-left: 0 !important;
160-
padding-right: 0 !important;
159+
padding: 0 !important;
160+
margin: 8px 0 8px 0;
161161
}
162162
.cdts-menu-label:hover, .cdts-menu-label:visited{
163163
color: #26374A;
164164
}
165165

166+
.cdts-menu-chevron{
167+
float: right;
168+
margin-top: 12px;
169+
margin-right: 20px;
170+
font-size: 12px;
171+
}
172+
166173
.cdts-menu-chevron-up{
167174
display: none;
168175
}
@@ -209,6 +216,10 @@
209216

210217
.wb-menu .sm-open .cdts-menu-chevron-up{
211218
display: inline;
219+
float: right;
220+
margin-top: 12px;
221+
margin-right: 20px;
222+
font-size: 12px;
212223
}
213224

214225
.wb-menu .sm-open .cdts-menu-chevron{
@@ -237,13 +248,11 @@
237248

238249
.cdts-menu-chevron-up{
239250
float: right;
240-
padding-top: 18px;
241251
margin-right: 20px;
242252
}
243253

244254
.cdts-menu-chevron{
245255
float: right;
246-
padding-top: 18px;
247256
margin-right: 20px;
248257
}
249258

@@ -252,13 +261,13 @@
252261
}
253262

254263
.cdts-menu-label{
255-
width: 76%;
264+
width: 100%;
256265
}
257266
}
258267

259268
@media (max-width: 480px) {
260269
.cdts-menu-label{
261-
width: 65%;
270+
width: 100%;
262271
}
263272
}
264273

src/gcweb/appTop.ejs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,17 @@
111111
<a class="app-name" href="<%- item.href %>"><%= item.text%></a>
112112
<%_ } -%>
113113
</section>
114-
<%_ if (pr.headerMenu != null) {
114+
<%_ if (pr.headerMenu != null && pr.menuPath == null && pr.menuLinks == null) {
115115
const item=pr.headerMenu[0]; -%>
116-
<nav id="cdts-header-menu" class="cdts-menu-rectangle wb-menu" typeof="SiteNavigationElement" aria-labelledby="appNavMenu">
116+
<div class="cdts-hidden" aria-hidden="true">
117+
<ul><li id="wb-glb-mn"><a href="#mb-pnl"></a><h2><^- msg('Menu') ^></h2></li></ul>
118+
<div id="mb-pnl"></div>
119+
</div>
120+
<nav id="cdts-header-menu" data-trgt="mb-pnl" class="cdts-menu-rectangle wb-menu" typeof="SiteNavigationElement" aria-labelledby="appNavMenu">
117121
<h2 class="wb-inv" id="appNavMenu"><^- msg('Header navigation menu') ^></h2>
118122
<ul class="list-inline menu" role="menubar">
119123
<li role="none" class="cdts-menu-list-width">
120-
<span class="glyphicon glyphicon-user cdts-menu-icon"></span>
121-
<a href="#" class="cdts-menu-label item" role="menuitem" aria-haspopup="true"><%= (pr.headerMenu.text == null)? ' <^- msg('Account') ^>': pr.headerMenu.text %></a>
122-
<span class="glyphicon glyphicon-chevron-down cdts-menu-chevron"></span>
123-
<span class="glyphicon glyphicon-chevron-up cdts-menu-chevron-up"></span>
124+
<a href="#" class="cdts-menu-label item" role="menuitem" aria-haspopup="true"><span class="glyphicon glyphicon-user cdts-menu-icon"></span><%= (pr.headerMenu.text == null)? ' <^- msg('Account') ^>': pr.headerMenu.text %><span class="glyphicon glyphicon-chevron-down cdts-menu-chevron"></span><span class="glyphicon glyphicon-chevron-up cdts-menu-chevron-up"></span></a>
124125
<%_ if (pr.headerMenu.links != null) { -%>
125126
<ul class="sm list-unstyled cdts-menu-list" role="menu">
126127
<%_ for (var hiddenIndex=0; hiddenIndex<pr.headerMenu.links.length; hiddenIndex++) {

src/gcweb/wet-messages.en.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@
9797
"source": "Name of Web application",
9898
"target": null
9999
},
100+
"57f5f5efbc5990f5230aa95359042338b856707b": {
101+
"source": "Menu",
102+
"target": null
103+
},
100104
"c6dc33865459206f14516ae374ff8dee59ab2595": {
101105
"source": "Header navigation menu",
102106
"target": null
@@ -125,10 +129,6 @@
125129
"source": "and search",
126130
"target": null
127131
},
128-
"57f5f5efbc5990f5230aa95359042338b856707b": {
129-
"source": "Menu",
130-
"target": null
131-
},
132132
"11b5a68a90c1de36a7f61d1b289fa4a9e547c19a": {
133133
"source": "Main navigation menu",
134134
"target": null

0 commit comments

Comments
 (0)