Commit bcbc4daa authored by Chris Shantz's avatar Chris Shantz
Browse files

Merge branch '1.0.x' into prod/1.0.x

parents 57e9a31b 4dc10d52
......@@ -32,3 +32,101 @@ kbd > kbd {
background: #575757;
color: #ffffff;
}
/*list types*/
ul {
list-style-type: disc;
margin: 0 0 1rem;
padding: 0 0 0 1.5rem; }
[dir='rtl'] ul {
padding: 0 1.5rem 0 0; }
ul ul {
list-style-type: circle;
margin: 0.5rem 0 0; }
ul ul li > ul {
list-style-type: disc; }
.disc {
list-style: disc; }
.disc ul {
list-style-type: disc; }
.disc ul li > ul {
list-style-type: disc; }
.square {
list-style: square; }
.square ul {
list-style-type: square; }
.square ul li > ul {
list-style-type: square; }
.circle {
list-style-type: circle; }
.circle ul {
list-style-type: circle; }
.circle ul li > ul {
list-style-type: circle; }
ol {
margin: 0 0 1rem;
padding: 0 0 0 1.5rem; }
[dir='rtl'] ol {
padding: 0 1.5rem 0 0; }
ol ol {
list-style-type: lower-alpha;
margin: 0.5rem 0 0; }
ol ol li ol {
list-style-type: lower-roman; }
.lower-alpha {
list-style-type: lower-alpha; }
.lower-alpha li ol {
list-style-type: lower-alpha; }
.upper-alpha {
list-style-type: upper-alpha; }
.upper-alpha li ol {
list-style-type: upper-alpha; }
.lower-roman {
list-style-type: lower-roman; }
.lower-roman li ol {
list-style-type: lower-roman; }
.upper-roman {
list-style-type: upper-roman; }
.upper-roman li ol {
list-style-type: upper-roman; }
.decimal {
list-style: decimal outside none;
margin: 0;
padding: 0 0 1rem 1rem; }
.decimal li {
counter-increment: item;
display: table;
margin: 0.5rem 0; }
.decimal li::before {
content: counters(item, ".") ". ";
display: table-cell;
padding-right: 0.6rem; }
.decimal li li {
margin: 0.5rem 0; }
.decimal li li li::before {
content: counters(item, ".") " "; }
.decimal li ol {
counter-reset: item;
list-style: square outside none;
list-style-type: none;
margin: 0;
padding: 0; }
li {
margin-bottom: 0.5rem;
padding-left: 0.5rem; }
li:last-child {
margin-bottom: 0; }
li > *:last-child {
margin-bottom: 0; }
@media print {
li {
page-break-inside: avoid; } }
......@@ -81,6 +81,10 @@
]
%}
{% if ical %}
{% set node_data = node_data | merge({'ical': ical}) %}
{% endif %}
{% if uw_content_moderation_form and node.nid.value == uw_content_moderation_form['#mods'].nid %}
{{ uw_content_moderation_form }}
{% endif %}
......
......@@ -81,6 +81,8 @@
'attachment_after': attachment_after,
'dom_id': dom_id,
'exp_col_all': exp_col_all,
'rss': view.rss,
'ical': view.ical,
} %}
{% if (view.current_display == 'services_in_category_page') or (view.current_display == 'catalog_a_z_page') %}
......
......@@ -35,10 +35,15 @@ function uw_fdsu_theme_resp_preprocess_html(&$variables) {
$variables['attributes']['class'][] = theme_get_setting('wcms_colour_scheme', 'uw_fdsu_theme_resp') ? theme_get_setting('wcms_colour_scheme', 'uw_fdsu_theme_resp') : 'org-default';
$variables['uw_admin_page'] = \Drupal::service('uw_cfg_common.uw_analytics')->administrationPage();
// Add the fav icons.
_uw_fdsu_theme_resp_add_favicons($variables);
// Get the route name.
$route_name = \Drupal::routeMatch()->getRouteName();
// Perform actions based on the route.
switch ($route_name) {
// Add Javascript only on the user login page.
case 'user.login':
$variables['#attached']['library'][] = 'uw_fdsu_theme_resp/user.login';
......@@ -50,12 +55,48 @@ function uw_fdsu_theme_resp_preprocess_html(&$variables) {
$variables['head_title']['title'] = t('Reference author:') . ' ' . $variables['head_title']['title'];
break;
// Teh header/page title on keywords listing page browser
// The header/page title on keywords listing page browser
// tab shows "Reference keyword: " in front of the keyword.
case 'entity.bibcite_keyword.canonical':
$variables['head_title']['title'] = t('Reference keyword:') . ' ' . $variables['head_title']['title'];
break;
// Adding the alternate link to listing pages.
case 'view.uw_view_blogs.blog_page':
case 'view.uw_view_events.event_page':
case 'view.uw_view_news_items.news_page':
// Get the alternate link based on the route.
switch ($route_name) {
case 'view.uw_view_blogs.blog_page':
$link = _uw_fdsu_theme_resp_get_alternate_link(
'uw_view_blogs',
'uw_public_blog_feed',
'Blogs feed'
);
break;
case 'view.uw_view_events.event_page':
$link = _uw_fdsu_theme_resp_get_alternate_link(
'uw_view_events',
'uw_public_event_feed',
'Events feed'
);
break;
case 'view.uw_view_news_items.news_page':
$link = _uw_fdsu_theme_resp_get_alternate_link(
'uw_view_news_items',
'uw_public_news_feed',
'News feed'
);
break;
}
// Add the alternate link to the page.
$variables['#attached']['html_head_link'][] = $link;
break;
}
// Get the current path.
......@@ -72,6 +113,37 @@ function uw_fdsu_theme_resp_preprocess_html(&$variables) {
}
}
/**
* Function to get the alternate link.
*
* @param string $view_machine_name
* The machine name of the view.
* @param string $view_display_name
* The display name of the view.
* @param string $title
* The title of the alternate link.
*/
function _uw_fdsu_theme_resp_get_alternate_link(
string $view_machine_name,
string $view_display_name,
string $title
) {
// Get the URL to RSS feed.
$url = Url::fromRoute('view.' . $view_machine_name . '.' . $view_display_name);
$url->setOptions(['query' => \Drupal::request()->query->all()]);
// Return the link for the alternate.
return [
[
'rel' => 'alternate',
'href' => $url->toString(),
'title' => $title,
'type' => 'application/rss+xml',
],
];
}
/**
* Implements hook_preprocess_responsive_image().
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment