Skip to content
Snippets Groups Projects
Commit 9e5e4845 authored by Igor Biki's avatar Igor Biki
Browse files

ISTWCMS-4719: Adding global message parts to fdsu theme.

parent 9b9a4b63
No related branches found
No related tags found
1 merge request!22Feature/istwcms 4719 ibiki global message
#global-message {
color: white;
background-color: rgb(205, 20, 67);
text-align: center;
padding: 16px;
}
#global-message a {
color: white;
}
#global-message a:hover, #global-message a:focus {
border-bottom: 2px solid white;
}
#global-message * {
margin: 0;
padding: 0;
}
......@@ -18,5 +18,6 @@
'classes': classes,
'nav_items': main_menu,
'secondary_items': secondary_menu,
'home_link': home_link
'home_link': home_link,
'global_message': global_message
}%}
......@@ -10,6 +10,7 @@ dependencies:
libraries:
- 'uw_fdsu_theme_resp/global'
- 'uw_fdsu_theme_resp/uw_ckeditor'
- 'uw_fdsu_theme_resp/global-message'
# Libraries override allows you to remove libraries added by other projects.
# libraries-override:
......
......@@ -13,3 +13,7 @@ uw_ckeditor:
css:
theme:
css/uw_ckeditor.css: {}
global-message:
css:
theme:
css/global-message.css: {}
......@@ -84,6 +84,17 @@ function uw_fdsu_theme_resp_preprocess_region(&$variables) {
$variables['site_name'] = $config->get('name');
$variables['faculty'] = theme_get_setting('wcms_colour_scheme', 'uw_fdsu_theme_resp') ? theme_get_setting('wcms_colour_scheme', 'uw_fdsu_theme_resp') : 'org-default';
// Global message content.
$global_message = file_get_contents('https://uwaterloo.ca/global-message.html');
// If there is something to display, make sure to include css file, and
// pass message as render array, then use render twig filter to avoid using
// raw twig filter. Trimming message before sending to template, this
// will remove any empty lines/spaces that message may have.
if (!empty($global_message)) {
$variables['global_message'] = ['#markup' => trim($global_message)];
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment