Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
angelamnr committed Oct 2, 2017
2 parents eba4a9c + fae1a4d commit 472078c
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 24 deletions.
31 changes: 17 additions & 14 deletions css/suitcase.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down Expand Up @@ -2324,23 +2319,31 @@ 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 {
background: #efefef;
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;
}

Expand Down
5 changes: 3 additions & 2 deletions preprocess/preprocess-region.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -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') {
Expand All @@ -60,4 +61,4 @@ function suitcase_interim_alpha_preprocess_region(&$vars) {
elseif (strpos($vars['region'], 'sidebar') === 0) {
$vars['attributes_array']['role'] = 'complementary';
}
}
}
1 change: 1 addition & 0 deletions suitcase_interim.info
Original file line number Diff line number Diff line change
Expand Up @@ -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] = ''
Expand Down
3 changes: 2 additions & 1 deletion template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down
2 changes: 1 addition & 1 deletion templates/form--system-theme-settings.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
?>
<div id="suitcase-interim-header-preview">
<?php $wordmark_path = (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')); ?>
<?php $wordmark_path = (theme_get_setting('default_logo', variable_get('theme_default'))) ? file_create_url(drupal_get_path('theme', 'suitcase_interim') . '/images/isu.svg') : file_create_url(theme_get_setting('logo_path', variable_get('theme_default'))); ?>
<div class="container-12 clearfix">
<div class="grid-6 suitcase-interim-vertical-tabs clearfix">
<ul class="suitcase-interim-vertical-tabs-list">
Expand Down
6 changes: 3 additions & 3 deletions templates/region--branding.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<?php if ($site_name || $site_slogan): ?>

<?php if ($show_isu_nameplate): ?>
<?php if (theme_get_setting('default_logo', 'suitcase_interim')): ?>
<a id="isu_header_wordmark" href="<?php print $level_1_url; ?>" title="Iowa State University Homepage"><img src="<?php print $wordmark_image; ?>" alt="Iowa State University"></a>
<?php if (theme_get_setting('default_logo')): ?>
<a id="isu_header_wordmark" href="<?php print $level_1_url; ?>" title="Iowa State University Homepage"><img src="<?php print $wordmark_image; ?>" alt="<?php print $wordmark_alt_text; ?>"></a>
<?php else: ?>
<a id="isu_header_wordmark" href="<?php print $level_1_url; ?>" title="<?php print $site_name; ?>"><img src="<?php print $wordmark_image; ?>" alt="Iowa State University - <?php print $site_name; ?>"></a>
<a id="isu_header_wordmark" href="<?php print $level_1_url; ?>" title="<?php print $site_name; ?>"><img src="<?php print $wordmark_image; ?>" alt="<?php print $wordmark_alt_text; ?>"></a>
<?php endif; ?>
<?php endif; ?>

Expand Down
16 changes: 13 additions & 3 deletions theme-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
);
Expand All @@ -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(
Expand All @@ -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(
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {

Expand Down

0 comments on commit 472078c

Please sign in to comment.