diff --git a/css/suitcase.css b/css/suitcase.css index 55e08d2..daf29f7 100644 --- a/css/suitcase.css +++ b/css/suitcase.css @@ -141,6 +141,9 @@ ul.right { text-align: right; } ul.hlist > li { float: left; } +.pane-content ul, +.pane-content ol { padding-left: 40px; } + /* --------------------- */ /* Description Lists */ @@ -299,8 +302,6 @@ input[type="submit"] { /* ## FIGURES and IMAGES /* -------------------- */ -figure figcaption { color: #818a91; } - figure .insert-default-image-styling + figcaption { margin: 0 10px; } @@ -308,12 +309,49 @@ figure .insert-default-image-styling + figcaption { .region-content img { height: auto !important; max-width: 100%; + margin: 0.5rem; } a img:focus { border: 2px #F1BE48; } +/* CK Editor Enhanced Images */ + +figure.image { + display: table; + margin: 0; +} + +figure.image img { + max-width: 100%; + display: block; + margin: 0; +} + +figure.image figcaption { + display: table-caption; + caption-side: bottom; + padding: 0.5rem; + color: #333; + font-size: 0.85rem; + font-weight: 500; + border: 1px solid #ddd; + border-top: 0; + background-color: #eee; +} + +figure.image br { + display: none; +} + +figure.image.floated-left { margin: 0.25rem 1rem 0.25rem 0; } + +figure.image.floated-right { margin: 0.25rem 0 0.25rem 1rem; } + +figure.image.floated-left img, +figure.image.floated-right img { margin: 0; } + /* -------------------- */ /* ## UTILITY /* -------------------- */ @@ -807,6 +845,14 @@ nav.navigation .secondary-menu>li a.active-trail { text-decoration: underline; } +/* ------------------- */ +/* Footer Menus */ + +#section-footer ul.menu a { + color: #333; + text-decoration: none; +} + /* -------------------- */ /* ## CARETS /* -------------------- */ @@ -1238,6 +1284,8 @@ nav.navigation .secondary-menu>li a.active-trail { /* ## PANELS /* -------------------- */ +.panel-pane { clear: both; } + .panel-pane-nostyle { padding: 0; box-shadow: none; @@ -1256,6 +1304,8 @@ nav.navigation .secondary-menu>li a.active-trail { .panel-panel .pane-content p { padding: 0; } +.pane-content .item-list ul { padding-left: 0; } + .panel-panel .pane-content .views-row { padding: 0; } /* Enable overflow on front panel panes @@ -1287,17 +1337,6 @@ nav.navigation .secondary-menu>li a.active-trail { overflow: hidden; } -.panel-pane .views-field-title a.facetapi-active, -.panel-pane .pane-content .item-list li a.facetapi-active, -.region-sidebar-first .block .content .item-list li a.facetapi-active, -.region-sidebar-second .block .content .item-list li a.facetapi-active { - display: inline; - margin-right: 12px; - padding: 0; - vertical-align: text-bottom; - background: none; -} - .panel-pane .views-field-created > .field-content { color: #555555; } .panel-pane .views-field { margin-bottom: 5px; } @@ -1312,13 +1351,12 @@ nav.navigation .secondary-menu>li a.active-trail { float: left; } -.panel-pane .view-events .views-field-when-tiny-left .date-display-single { - color: #777777; +span.date-display-single { + color: #555555; } -.panel-pane .view-events .views-field-title { - font-size: 14px; - font-weight: 700; +.panel-pane .view-events .views-field-when-tiny-left .date-display-single { + color: #777777; } .panel-panel .pane-content > p { padding: 0 10px; } @@ -1372,15 +1410,8 @@ nav.navigation .secondary-menu>li a.active-trail { word-break: break-word; } - .front .panel-pane > h2.pane-title { display: block; } -.front .panel-pane .pane-content .item-list li { - margin-top: 8px; - padding-bottom: 8px; - border-bottom: 1px solid #eeeeee; -} - .front .item-list { display: block; } .front .view-about-front-page .field-content li { @@ -1739,6 +1770,127 @@ footer.submitted > span .placeholder { white-space: nowrap; } +/* -------------------- */ +/* ## FACETS TAGS +/* -------------------- */ + +.block-facetapi .content .item-list ul ul { + margin-top: 0; + margin-left: 1rem; +} + +/* All items */ +.block-facetapi .content .item-list li a, +.block-facetapi .content .item-list li a.facetapi-active { + display: block; + position: relative; + padding: 0.25rem 0.5rem; + padding-left: 2rem; + border-radius: 3px; + margin-right: 0.25rem; + text-decoration: none !important; + font-size: 0.95rem; + color: #333; + transition: all 100ms ease; +} + + /* Hover */ + .block-facetapi .content .item-list li a:hover { + color: #ffffff; + background: #7A99AC; + border-color: #7A99AC; + } + +/* Indicators */ +.block-facetapi .content .item-list ul li a:before { + content: ''; + position: absolute; + top: 0.45rem; left: 0.5rem; + height: 1rem; + width: 1rem; + margin-right: 5px; + padding-top: 2px; + font-size: 0.75rem; + line-height: 1; + text-align: center; + border: 1px solid #ddd; + border-radius: 2px; +} + +.block-facetapi .content .item-list ul li a.facetapi-active:before, +.block-facetapi .content .item-list ul li a:hover:before { + content: '✓'; +} + +.block-facetapi .content .item-list ul li a.facetapi-active:hover:before { + content: '✕'; +} + +/* Just tags */ +.block-facetapi .content .item-list .facetapi-facet-im-field-tags li a:not(.facetapi-active) { + display: inline-block; + padding-left: 0.5rem; + border: 1px solid #ddd; +} + +.block-facetapi .content .item-list .facetapi-facet-im-field-tags li a:not(.facetapi-active):before { + display: none; +} + +.block-facetapi .content .item-list .facetapi-facet-im-field-tags li { + float: left; +} + +/* Active */ +.block-facetapi .content .item-list .facetapi-facet-im-field-tags li a.facetapi-active, +.block-facetapi .content .item-list li a.facetapi-active { + color: #ffffff; + font-weight: 700; + background: #7A99AC; + border-color: #7A99AC; +} + + /* Hover */ + .block-facetapi .content .item-list li a.facetapi-active:hover { + color: #000; + background: #eee; + border-color: #ddd; + } + +.facetapi-x { + display: none; +} + +/* Show More/Less */ + +.block-facetapi .content .item-list .facetapi-facet-im-field-tags:after { + content: ''; + display: block; + clear: both; +} + +a.facetapi-limit-link { + display: inline-block; + padding: 0.25rem 0.5rem; + color: #000; + font-size: 0.9rem; + text-decoration: none; + background: #ddd; + border-radius: 3px; +} + +a.facetapi-limit-link:hover { + background: #ccc; + text-decoration: none; +} + +a.facetapi-limit-link:not(.open):after { + content: ' +'; +} +a.facetapi-limit-link.open:after { + content: ' -'; +} + /* -------------------- */ /* ## FACETS SIDEBAR diff --git a/js/suitcase_image_floats.js b/js/suitcase_image_floats.js new file mode 100644 index 0000000..1c391ca --- /dev/null +++ b/js/suitcase_image_floats.js @@ -0,0 +1,32 @@ +/** + * Function for adding the appropriate margins to floated images + * And floated images with captions. + */ + +(function($) { + $(document).ready( function() { + $('figure.image') + .filter(function() { + return $(this).css('float') == 'left'; + }) + .addClass('floated-left'); + + $('figure.image') + .filter(function() { + return $(this).css('float') =='right'; + }) + .addClass('floated-right'); + + $('.content img') + .filter(function() { + return $(this).css('float') == 'left'; + }) + .addClass('floated-left'); + + $('.content img') + .filter(function() { + return $(this).css('float') == 'right'; + }) + .addClass('floated-right'); + }); +})(jQuery); diff --git a/suitcase_interim.info b/suitcase_interim.info index d3fa290..cc0ac12 100644 --- a/suitcase_interim.info +++ b/suitcase_interim.info @@ -4,7 +4,7 @@ core = '7.x' engine = 'phptemplate' screenshot = 'screenshot.png' base theme = 'omega' -version = '1.0,1' +version = '1.0.2' plugins[panels][layouts] = panels/layouts regions[page_top] = 'Page Top' regions[page_bottom] = 'Page Bottom' @@ -88,6 +88,7 @@ settings[alpha_libraries][suitcase_sticky_menu] = 'suitcase_sticky_menu' settings[alpha_libraries][suitcase_gridheight] = 'suitcase_gridheight' settings[alpha_libraries][suitcase_jquery_smart_menu] = 'suitcase_jquery_smart_menu' settings[alpha_libraries][suitcase_smart_menu_init] = 'suitcase_smart_menu_init' +settings[alpha_libraries][suitcase_image_floats] = 'suitcase_image_floats' settings[alpha_css][alpha-reset.css] = 'alpha-reset.css' settings[alpha_css][alpha-mobile.css] = 'alpha-mobile.css' settings[alpha_css][alpha-alpha.css] = 'alpha-alpha.css' @@ -407,3 +408,7 @@ libraries[suitcase_smart_menu_init][name] = 'Suitcase SmartMenu Init' libraries[suitcase_smart_menu_init][description] = 'Initializes jQuery SmartMenus for Suitcase' libraries[suitcase_smart_menu_init][js][0][file] = 'suitcase_smart_menu.js' libraries[suitcase_smart_menu_init][js][0][options][weight] = '-10' +libraries[suitcase_image_floats][name] = 'Suitcase Image Floats' +libraries[suitcase_image_floats][description] = 'Provides a javascript library that adds a class to floated images' +libraries[suitcase_image_floats][js][0][file] = 'suitcase_image_floats.js' +libraries[suitcase_image_floats][js][0][options][weight] = '30' diff --git a/template.php b/template.php index 2770193..c99fe70 100644 --- a/template.php +++ b/template.php @@ -26,7 +26,7 @@ function suitcase_interim_theme($existing, $type, $theme, $path) { } function suitcase_interim_facetapi_deactivate_widget($variables) { - return ' ×'; + return '×'; } /* @@ -261,3 +261,113 @@ function suitcase_interim_date_display_range($variables) { // Add remaining message and return. return $output . $show_remaining_days; } + +/** + * Implements theme_facetapi_link_active(). + * + * Modified version of theme_facetapi_link_active + * + * ------------------------------------------------------------------------- + * + * Returns HTML for an active facet item. + * + * @param $variables + * An associative array containing the keys 'text', 'path', and 'options'. See + * the l() function for information about these variables. + * + * @see l() + * + * @ingroup themeable + * + * ------------------------------------------------------------------------- + * + * Modifications: + * + * - Includes the tag name in the link text instead of appending after the link + * + */ +function suitcase_interim_facetapi_link_active($variables) { + + // Sanitizes the link text if necessary. + $sanitize = empty($variables['options']['html']); + $link_text = ($sanitize) ? check_plain($variables['text']) : $variables['text']; + + // Theme function variables fro accessible markup. + // @see http://drupal.org/node/1316580 + $accessible_vars = array( + 'text' => $variables['text'], + 'active' => TRUE, + ); + + // Builds link, passes through t() which gives us the ability to change the + // position of the widget on a per-language basis. + $replacements = array( + '!facetapi_deactivate_widget' => theme('facetapi_deactivate_widget', $variables), + '!facetapi_accessible_markup' => theme('facetapi_accessible_markup', $accessible_vars), + ); + $variables['text'] = t('!facetapi_deactivate_widget !facetapi_accessible_markup', $replacements) . $link_text; + $variables['options']['html'] = TRUE; + return theme_link($variables); +} + +/* + * Implements theme_menu_link() + * + * Modified version of theme_menu_link + * + * ------------------------------------------------------------------------- + * + * Returns HTML for a menu link and submenu. + * + * @param $variables + * An associative array containing: + * - element: Structured array data for a menu link. + * + * @ingroup themeable + * + * ------------------------------------------------------------------------- + * + * Modifications: + * + * - Prepends a font awesome icon for known social media websites to the link text + * + */ +function suitcase_interim_menu_link__menu_social($variables) { + + $element = $variables['element']; + + $sub_menu = ''; + if ($element['#below']) { + $sub_menu = drupal_render($element['#below']); + } + + $font_awesome_icons = array( + 'facebook' => 'fa-facebook-official', + 'twitter' => 'fa-twitter-square', + 'youtube' => 'fa-youtube-square', + 'instagram' => 'fa-instagram', + 'pinterest' => 'fa-pinterest-square', + 'github' => 'fa-github-square', + 'rss' => 'fa-rss-square' + ); + + $font_awesome_icon = ''; + + foreach ($font_awesome_icons as $pattern => $icon) { + if (strpos($element['#href'], $pattern) !== FALSE) { + $font_awesome_icon = $icon; + break; + } + } + + if (!empty($font_awesome_icon)) { + $element['#title'] = ' ' . $element['#title']; + $element['#localized_options']['html'] = TRUE; + } + + + $output = l($element['#title'], $element['#href'], $element['#localized_options']); + + return '