diff --git a/css/suitcase.css b/css/suitcase.css index ddc7b45..c2fe903 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -434,13 +434,12 @@ sup { vertical-align: super; } figure figcaption { color: #333333; } img { - height: auto; + height: auto !important; max-width: 100%; } /* Target only images in content */ .field-name-body img { - height: auto !important; max-width: calc(100% - 1rem); margin: 0.5rem; } @@ -1909,19 +1908,16 @@ ul.menu li { /* Field Name: Field Tags */ /* Field Name: Field Category */ -.field-name-field-tags .field-label, -.field-name-field-category .field-label { +.field-type-taxonomy-term-reference .field-label { margin-top: 2px; margin-bottom: 5px; } -.field-name-field-tags .field-item, -.field-name-field-category .field-item { +.field-type-taxonomy-term-reference .field-item { display: inline-block; } -.field-name-field-tags .field-item a, -.field-name-field-category .field-item a { +.field-type-taxonomy-term-reference .field-item a { display: inline-block; margin-right: 0.5em; margin-bottom: 0.5rem; @@ -1933,8 +1929,7 @@ ul.menu li { border: 1px solid #e2e2e2; transition: background 0.25s ease; } - .field-name-field-tags .field-item a:hover, - .field-name-field-category .field-item a:hover { + .field-type-taxonomy-term-reference .field-item a:hover { text-decoration: none; background: #f5f5f5; } @@ -2324,7 +2319,7 @@ h2.node-title { /* --- Month View --- */ -/* Big stick... */ +/* The td is required to override the powerful module selector */ .calendar-calendar .month-view .full td.single-day div.monthview, .calendar-calendar .week-view .full td.single-day div.weekview, .calendar-calendar .day-view .full td.single-day div.dayview { @@ -2332,15 +2327,23 @@ h2.node-title { border: 1px solid #ddd; } +/* The div is required to override the powerful module selector */ +.calendar-calendar .month-view .full div.single-day div.monthview, +.calendar-calendar .week-view .full div.single-day div.weekview, +.calendar-calendar .day-view .full div.single-day div.dayview { + background: #efefef; + border: 1px solid #ddd; +} + .calendar-calendar .month-view .full td.multi-day div.monthview, .calendar-calendar .week-view .full td.multi-day div.weekview, .calendar-calendar .day-view .full td.multi-day div.dayview { background: #006ba6; } -.multi-day .calendar.monthview a, -.multi-day .calendar.weekview a, -.multi-day .calendar.dayview a { +td.multi-day .calendar.monthview a, +td.multi-day .calendar.weekview a, +td.multi-day .calendar.dayview a { color: #fff; } diff --git a/preprocess/preprocess-region.inc b/preprocess/preprocess-region.inc index f511cd3..c7d63b1 100644 --- a/preprocess/preprocess-region.inc +++ b/preprocess/preprocess-region.inc @@ -18,6 +18,7 @@ function suitcase_interim_alpha_preprocess_region(&$vars) { // Get the level 1 url $vars['level_1_url'] = variable_get('suitcase_interim_config_level_1_url'); + $vars['wordmark_alt_text'] = theme_get_setting('suitcase_interim_config_isu_nameplate_alt_text'); $vars['suitcase_interim_config_level_2_url'] = variable_get('suitcase_interim_config_level_2_url'); @@ -33,7 +34,7 @@ function suitcase_interim_alpha_preprocess_region(&$vars) { $vars['suitcase_interim_config_header_type'] = variable_get('suitcase_interim_config_header_type', 1); // Get the uploaded wordmark if is exists and the header type allows - $vars['wordmark_image'] = (theme_get_setting('default_logo', 'suitcase_interim')) ? file_create_url(drupal_get_path('theme', 'suitcase_interim') . '/images/isu.svg') : file_create_url(theme_get_setting('logo_path', 'suitcase_interim')); + $vars['wordmark_image'] = (theme_get_setting('default_logo')) ? file_create_url(drupal_get_path('theme', 'suitcase_interim') . '/images/isu.svg') : file_create_url(theme_get_setting('logo_path')); } elseif ($vars['region'] == 'menu') { @@ -60,4 +61,4 @@ function suitcase_interim_alpha_preprocess_region(&$vars) { elseif (strpos($vars['region'], 'sidebar') === 0) { $vars['attributes_array']['role'] = 'complementary'; } -} \ No newline at end of file +} diff --git a/suitcase_interim.info b/suitcase_interim.info index 62bf3f3..2d68d8e 100644 --- a/suitcase_interim.info +++ b/suitcase_interim.info @@ -52,6 +52,7 @@ settings[toggle_secondary_menu] = '1' settings[default_logo] = '1' settings[logo_path] = 'sites/all/themes/suitcase_interim/images/isu.svg' settings[logo_upload] = '' +settings[suitcase_interim_config_isu_nameplate_alt_text] = 'Iowa State University' settings[default_favicon] = '0' settings[favicon_path] = 'sites/all/themes/suitcase_interim/images/favicon.ico' settings[favicon_upload] = '' diff --git a/template.php b/template.php index 1026854..1a3f649 100644 --- a/template.php +++ b/template.php @@ -349,7 +349,8 @@ function suitcase_interim_menu_link__menu_social($variables) { 'pinterest' => 'fa-pinterest-square', 'github' => 'fa-github-square', 'rss' => 'fa-rss-square', - 'snapchat' => 'fa-snapchat-square' + 'snapchat' => 'fa-snapchat-square', + 'flickr' => 'fa-flickr' ); $font_awesome_icon = ''; diff --git a/templates/form--system-theme-settings.tpl.php b/templates/form--system-theme-settings.tpl.php index 6eefbec..11e2525 100644 --- a/templates/form--system-theme-settings.tpl.php +++ b/templates/form--system-theme-settings.tpl.php @@ -5,7 +5,7 @@ */ ?>
- +
    diff --git a/templates/region--branding.tpl.php b/templates/region--branding.tpl.php index d3be6a0..7f67e63 100644 --- a/templates/region--branding.tpl.php +++ b/templates/region--branding.tpl.php @@ -3,10 +3,10 @@ - - Iowa State University + + <?php print $wordmark_alt_text; ?> - Iowa State University - <?php print $site_name; ?> + <?php print $wordmark_alt_text; ?> diff --git a/theme-settings.php b/theme-settings.php index e696e81..757c637 100644 --- a/theme-settings.php +++ b/theme-settings.php @@ -48,7 +48,7 @@ function suitcase_interim_form_system_theme_settings_alter(&$form, &$form_state) $form['suitcase_interim_config']['suitcase_interim_config_logo']['default_logo'] = array( '#type' => 'checkbox', '#title' => t('Use the default ISU wordmark'), - '#default_value' => theme_get_setting('default_logo', 'suitcase_interim'), + '#default_value' => theme_get_setting('default_logo'), '#tree' => FALSE, '#description' => t('Check here if you want to use the default ISU wordmark.') ); @@ -67,7 +67,7 @@ function suitcase_interim_form_system_theme_settings_alter(&$form, &$form_state) '#type' => 'textfield', '#title' => t('Path to custom wordmark'), '#description' => t('The path to the file you would like to use as your logo file instead of the ISU wordmark.'), - '#default_value' => theme_get_setting('logo_path', 'suitcase_interim'), + '#default_value' => theme_get_setting('logo_path'), ); $form['suitcase_interim_config']['suitcase_interim_config_logo']['settings']['logo_upload'] = array( @@ -85,6 +85,14 @@ function suitcase_interim_form_system_theme_settings_alter(&$form, &$form_state) '#weight' => 2, ); + $form['suitcase_interim_config']['suitcase_interim_config_logo']['settings']['suitcase_interim_config_isu_nameplate_alt_text'] = array( + '#type' => 'textfield', + '#title' => t('Wordmark Alt Text'), + '#description' => t('Alt text for the site\'s wordmark. Defaults to Iowa State University.'), + '#default_value' => variable_get('suitcase_interim_config_isu_nameplate_alt_text', 'Iowa State University'), + '#weight' => 3, + ); + $form['suitcase_interim_config']['suitcase_interim_config_logo']['suitcase_interim_config_level_2_url'] = array( '#type' => 'hidden', '#attributes' => array( @@ -174,6 +182,8 @@ function suitcase_interim_config_form_submit($form, &$form_state) { variable_set('suitcase_interim_config_isu_nameplate_display', $form_state['values']['suitcase_interim_config_isu_nameplate_display']); + variable_set('suitcase_interim_config_isu_nameplate_alt_text', $form_state['values']['suitcase_interim_config_isu_nameplate_alt_text']); + variable_set('suitcase_interim_config_show_advanced_settings', $form_state['values']['suitcase_interim_config_show_advanced_settings']); // Decide which level the site name should be set to @@ -258,7 +268,7 @@ function suitcase_interim_config_form_submit($form, &$form_state) { ); $menu_exists = (bool) db_query_range('SELECT 1 FROM {menu_custom} WHERE menu_name = :menu_name', 0, 1, array(':menu_name' => $menu['menu_name']))->fetchField(); - $link_exists = db_query_range('SELECT 1 FROM {menu_links} WHERE menu_name = :menu_name', 0, 1, array(':menu_name' => $menu['menu_name']))->fetchField(); + $link_exists = (bool) db_query_range('SELECT 1 FROM {menu_links} WHERE menu_name = :menu_name', 0, 1, array(':menu_name' => $menu['menu_name']))->fetchField(); if (!$menu_exists && !$link_exists) {