Skip to content

Commit d6c77fd

Browse files
committed
feat(intranet): Updates templates for new gc-intranet
1 parent 5b0d55b commit d6c77fd

File tree

43 files changed

+1767
-202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1767
-202
lines changed

css/style.css

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -121,29 +121,29 @@ html.js .ajax-new-content:empty {
121121
line-height: 0em; }
122122

123123
.gc-navseq * {
124-
font-weight: inherit!important;
125-
line-height: inherit!important; }
124+
font-weight: inherit !important;
125+
line-height: inherit !important; }
126126

127-
.gc-navseq>li,
128-
ul.gc-navseq-fa>li {
127+
.gc-navseq > li,
128+
ul.gc-navseq-fa > li {
129129
padding-bottom: 20px;
130130
padding-right: 20px;
131131
list-style: none;
132132
padding-left: 1.2em;
133133
border-left: 5px solid #26374a;
134134
position: relative; }
135135

136-
ul.gc-navseq-fa>li .fa-li {
136+
ul.gc-navseq-fa > li .fa-li {
137137
left: 0em;
138138
position: relative; }
139139

140140
ul.gc-navseq-fa {
141-
margin-left: 0.9em }
141+
margin-left: 0.9em; }
142142

143143
li .gc-navseq {
144144
margin-top: 16px; }
145145

146-
.gc-navseq>li>:first-child::before,
146+
.gc-navseq > li > :first-child::before,
147147
ul.gc-navseq-fa li span.fa-li {
148148
border-radius: 50%;
149149
border: 3px solid #26374a;
@@ -161,57 +161,60 @@ ul.gc-navseq-fa li span.fa-li {
161161
width: 1.3em;
162162
margin-left: -2.3em; }
163163

164-
ul.gc-navseq>li>:first-child::before {
164+
ul.gc-navseq > li > :first-child::before {
165165
height: 0.8em;
166166
width: 0.8em;
167167
margin-left: -2.05em;
168168
content: ""; }
169-
169+
170170
@-moz-document url-prefix() {
171-
ul.gc-navseq>li>:first-child::before {
172-
margin-left: -2.0em; } }
171+
ul.gc-navseq > li > :first-child::before {
172+
margin-left: -2.0em; } }
173173

174174
.gc-navseq li a::before {
175175
text-decoration: underline; }
176176

177-
ul.gc-navseq.noline>li {
177+
ul.gc-navseq.noline > li {
178178
border-left: 5px solid transparent; }
179179

180-
.gc-navseq>li:last-child,
181-
.gc-navseq>li.completed:last-child,
180+
.gc-navseq > li:last-child,
181+
.gc-navseq > li.completed:last-child,
182182
ul.gc-navseq-fa li:last-child {
183183
border-left: 5px solid transparent;
184184
padding-bottom: 0; }
185185

186-
ul.gc-navseq.noline>li>:first-child::before {
186+
ul.gc-navseq.noline > li > :first-child::before {
187187
margin-top: 0.2em; }
188188

189-
.gc-navseq li.active>:first-child::before,
189+
/*active*/
190+
.gc-navseq li.active > :first-child::before,
190191
.gc-navseq-fa li.active span.fa-li {
191192
background-color: #26374a;
192193
color: #fff; }
193194

195+
/*sub-steps*/
194196
.gc-navseq li ul {
195-
margin-top: 16px!important; }
197+
margin-top: 16px !important; }
196198

197-
ul.gc-navseq>li>a[href]:hover::before {
198-
width: 0.83em;
199-
height: 0.83em;
200-
margin-top: -0.1em;
201-
font-size: 1.2em;
202-
margin-left: -1.775em;
203-
line-height: 1.55; }
199+
/*Hover animation */
200+
ul.gc-navseq > li > a[href]:hover::before {
201+
width: 0.83em;
202+
height: 0.83em;
203+
margin-top: -0.1em;
204+
font-size: 1.2em;
205+
margin-left: -1.775em;
206+
line-height: 1.55; }
204207

205-
ul.gc-navseq.noline>li>a[href]:hover::before {
208+
ul.gc-navseq.noline > li > a[href]:hover::before {
206209
margin-top: 0.15em; }
207210

208-
.gc-navseq-fa>li>a[href]:hover span.fa-li {
211+
.gc-navseq-fa > li > a[href]:hover span.fa-li {
209212
width: 1.55em;
210213
height: 1.55em;
211214
margin-top: -0.05em;
212215
margin-left: -2.45em; }
213216

214-
.gc-navseq-fa>li>a[href]:hover span.fa-li::before {
217+
.gc-navseq-fa > li > a[href]:hover span.fa-li::before {
215218
margin-top: -0.1em; }
216219

217220
ul.gc-navseq > li ul.gc-navseq.noline > li.active::before {
@@ -228,48 +231,45 @@ section.gc-nav h1 {
228231
color: #555;
229232
border-bottom: none; }
230233

231-
@media all and (min-width:992px) {
234+
/*page structure desktop (new) */
235+
@media all and (min-width: 992px) {
232236
section.gc-nav nav {
233237
position: relative;
234238
width: 33.33%;
235239
left: 66.66%;
236240
float: left;
237241
padding-left: 15px;
238242
margin-bottom: 30px; }
239-
240243
section.gc-nav h1 {
241244
width: 66.66%;
242245
padding-right: 15px;
243246
margin-top: 20px;
244247
margin-bottom: -5px;
245248
font-weight: 200; }
246-
247249
section.gc-nav-section {
248250
position: relative;
249251
width: 66.66%;
250252
float: left;
251253
padding-right: 15px; }
252-
253254
section.gc-nav ~ section.gc-nav-section {
254255
right: 33.33%; }
255-
256256
section.gc-nav ~ section.gc-nav-section h1 {
257257
margin-top: 0px; }
258-
259258
section.gc-nav-section + .pagedetails {
260259
clear: both; } }
261260

262-
@media screen and (max-width:991px) {
261+
/*Vertical steps in mobile */
262+
@media screen and (max-width: 991px) {
263263
section.gc-nav {
264264
margin-top: 30px;
265265
border-right: 5px solid #26374a;
266266
border-top: 5px solid #26374a;
267267
border-radius: 0 6px 6px 0; }
268-
section.gc-nav nav>.gc-navseq {
268+
section.gc-nav nav > .gc-navseq {
269269
padding-top: 15px;
270270
margin-top: -18px;
271271
clear: both; }
272-
section.gc-nav nav>.gc-navseq > li:last-child {
272+
section.gc-nav nav > .gc-navseq > li:last-child {
273273
border-bottom: 5px solid #26374a;
274274
border-left: 5px solid #26374a;
275275
border-bottom-left-radius: 6px;
@@ -814,6 +814,12 @@ ol, ul {
814814
right: 0px;
815815
top: 0px; }
816816

817+
.theme-gc-intranet .bg-gctheme {
818+
background-color: #7f1322; }
819+
820+
.theme-gc-intranet .bg-gctheme.well.header-rwd {
821+
background-color: #7f1322; }
822+
817823
body {
818824
margin-top: 0px !important; }
819825
body.theme-gcwu-fegc.toolbar-tray-open {

sass/_overrides.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,13 @@ ol, ul {
127127
top: 0px;
128128
}
129129
}
130+
131+
// Fix homepage
132+
.theme-gc-intranet {
133+
.bg-gctheme {
134+
background-color: #7f1322;
135+
}
136+
.bg-gctheme.well.header-rwd {
137+
background-color: #7f1322;
138+
}
139+
}

src/Plugin/Form/SearchApiBlockForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function alterFormElement(Element $form, FormStateInterface $form_state,
2424
// @codingStandardsIgnoreEnd
2525
$wxt_active = $wxt->getLibraryName();
2626
$form->keys->setProperty('input_group_button', FALSE);
27-
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy') {
27+
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy' || $wxt_active == 'gc_intranet') {
2828
$form->submit_container->submit->addClass('btn-primary');
2929
$form->submit_container->submit->setProperty('icon', Bootstrap::glyphicon('search'));
3030
$form->actions->submit->setProperty('icon_only', FALSE);

src/Plugin/Form/SearchBlockForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function alterFormElement(Element $form, FormStateInterface $form_state,
2424
// @codingStandardsIgnoreEnd
2525
$wxt_active = $wxt->getLibraryName();
2626
$form->keys->setProperty('input_group_button', FALSE);
27-
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy') {
27+
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy' || $wxt_active == 'gc_intranet') {
2828
$form->submit_container->submit->addClass('btn-primary');
2929
$form->submit_container->submit->setProperty('icon', Bootstrap::glyphicon('search'));
3030
$form->actions->submit->setProperty('icon_only', FALSE);

src/Plugin/Form/SearchCanadaBlockForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function alterFormElement(Element $form, FormStateInterface $form_state,
2424
// @codingStandardsIgnoreEnd
2525
$wxt_active = $wxt->getLibraryName();
2626
$form->keys->setProperty('input_group_button', FALSE);
27-
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy') {
27+
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy' || $wxt_active == 'gc_intranet') {
2828
$form->submit_container->submit->addClass('btn-primary');
2929
$form->submit_container->submit->setProperty('icon', Bootstrap::glyphicon('search'));
3030
$form->actions->submit->setProperty('icon_only', FALSE);

src/Plugin/Preprocess/Block.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ public function preprocess(array &$variables, $hook, array $info) {
3434
if ($wxt_active == 'ogpl') {
3535
$variables['logo'] = $library_path . '/assets/logo.png';
3636
}
37-
elseif ($wxt_active == 'gc_intranet') {
37+
elseif ($wxt_active == 'gc_intranet_legacy') {
3838
$variables['logo_sttl_svg'] = $library_path . '/assets/wmms-intra.svg';
3939
}
4040
elseif ($wxt_active == 'gcwu_fegc') {
4141
$variables['logo_sttl_svg'] = $library_path . '/assets/wmms.svg';
4242
}
43-
elseif ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy') {
43+
elseif ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy' || $wxt_active == 'gc_intranet') {
4444
$variables['logo'] = $library_path . '/assets/sig-blk-' . $language . '.png';
4545
$variables['logo_svg'] = $library_path . '/assets/sig-blk-' . $language . '.svg';
4646
}
47-
elseif ($wxt_active == 'gc_intranet') {
47+
elseif ($wxt_active == 'gc_intranet_legacy') {
4848
$variables['logo_svg'] = $library_path . '/assets/sig-blk-' . $language . '.svg';
4949
}
5050
}

src/Plugin/Preprocess/Menu.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function preprocess(array &$variables, $hook, array $info) {
2828
$wxt = \Drupal::service('wxt_library.service_wxt');
2929
$wxt_active = $wxt->getLibraryName();
3030

31-
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy') {
31+
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy' || $wxt_active == 'gc_intranet') {
3232
// CDN handling.
3333
$gcweb_cdn = $this->theme->getSetting('wxt_gcweb_cdn');
3434
$gcweb_cdn_url = $this->theme->getSetting('wxt_gcweb_cdn_cmm');
@@ -58,7 +58,7 @@ public function preprocess(array &$variables, $hook, array $info) {
5858
$variables['library_path'] = $library_path;
5959

6060
// Footer Navigation (gcweb).
61-
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy') {
61+
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy' || $wxt_active == 'gc_intranet') {
6262
$variables['gcweb'] = [
6363
'feedback' => [
6464
'en' => 'http://www.canada.ca/en/contact/feedback.html',

src/Plugin/Preprocess/Page.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function preprocess(array &$variables, $hook, array $info) {
6060
}
6161

6262
// Footer Navigation (gcweb).
63-
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy' || $wxt_active == 'gcwu_fegc') {
63+
if ($wxt_active == 'gcweb' || $wxt_active == 'gcweb_legacy' || $wxt_active == 'gcwu_fegc' || $wxt_active == 'gc_intranet') {
6464
// CDN handling.
6565
$gcweb_cdn = $this->theme->getSetting('wxt_gcweb_cdn');
6666
$gcweb_cdn_url = $this->theme->getSetting('wxt_gcweb_cdn_cmm');
@@ -95,7 +95,7 @@ public function preprocess(array &$variables, $hook, array $info) {
9595
$variables['logo_bottom_svg'] = $library_path . '/assets/wmms-blk' . '.png';
9696
$variables['logo_bottom_svg'] = $library_path . '/assets/wmms-blk' . '.svg';
9797
}
98-
elseif ($wxt_active == 'gc_intranet') {
98+
elseif ($wxt_active == 'gc_intranet' || $wxt_active == 'gc_intranet_legacy') {
9999
$variables['logo_svg'] = $library_path . '/assets/sig-blk-' . $language . '.svg';
100100
}
101101

src/Plugin/Preprocess/Region.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function preprocessVariables(Variables $variables) {
3131
$variables->addClass(['container']);
3232
}
3333

34-
if ($wxt_active == 'gcweb') {
34+
if ($wxt_active == 'gcweb' || $wxt_active == 'gc_intranet') {
3535
if ($region === 'content_footer' && !empty($variables['content'])) {
3636
$variables->addClass(['pagedetails']);
3737
if (!empty($variables['is_front'])) {

templates/block/block--banner--gc-intranet--sitebranding.html.twig

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
*/
1717
#}
1818
{% block content %}
19-
<div id="wb-sttl" class="col-md-12">
20-
<a class="logo navbar-btn" href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">
21-
{% if site_name %}
22-
<span>{{ site_name }}</span>
23-
{% endif %}
24-
</a>
25-
<img id="wmms" src="{{ logo_sttl_svg }}" alt="{{ 'Symbol of the Government of Canada'|t }}" />
26-
</div>
19+
<a href="https://canada.ca/{{ language_prefix }}.html" property="url">
20+
<img id="header-logo" src='{{ logo_svg }}' alt="{{ 'Government of Canada'|t }}" property="logo" />
21+
<span class="wb-inv"> /
22+
<span lang="{{ language_opposite }}">{{ label_opposite }}</span>
23+
</span>
24+
</a>
25+
<meta property="name" content="{{ 'Government of Canada'|t }}">
26+
<meta property="areaServed" typeof="Country" content="Canada">
27+
<link property="logo" href="/libraries/theme-gcweb/assets/wmms-blk.svg">
2728
{% endblock %}

0 commit comments

Comments
 (0)