diff --git a/sites/all/themes/playbox_theme/css/logo-bling.css b/sites/all/themes/playbox_theme/css/logo-bling.css new file mode 100644 index 000000000..003025849 --- /dev/null +++ b/sites/all/themes/playbox_theme/css/logo-bling.css @@ -0,0 +1,92 @@ +/** +* Created on : May 24, 2016, 4:36:44 PM +* Author : Reed Bertolette reed@bertopro.com +* inspired & +* thanks to : http://tympanus.net/codrops/2012/08/08/circle-hover-effects-with-css-transitions/ +*/ + +.ch-grid { + margin: 20px 0 0 0; + padding: 0; + list-style: none; + display: block; + text-align: center; + width: 100%; +} + +.ch-grid:after, +.ch-item:before { + content: ''; + display: table; +} + +.ch-grid:after { + clear: both; +} + +.ch-grid li { + width: 150px; + height: 150px; + display: inline-block; + margin: 20px; +} + +.ch-item { + width: 100%; + height: 100%; + border-radius: 50%; + overflow: hidden; + position: relative; + cursor: default; +} + +.ch-img-1 { + /* background-image added dynamically in custom.js */ + background-color: transparent; + background-repeat: no-repeat; + background-position: center; +} + +.ch-info { + position: absolute; + background: rgba(63,147,147, 0.8); + width: inherit; + height: inherit; + border-radius: 50%; + overflow: hidden; + opacity: 0; + transition: all 0.4s ease-in-out; + transform: scale(0); +} + +.ch-info p { + /* background-image added dynamically in custom.js */ + background-color: transparent; + background-repeat: no-repeat; + background-position: center; + display: block; + color: rgba(255,255,255,0.7); + font-style: normal; + font-weight: 700; + text-transform: uppercase; + font-size: 9px; + letter-spacing: 1px; + padding-top: 4px; + font-family: 'Titillium Web', Arial, sans-serif; + width: 150px; + height: 150px; + text-indent: -9999px; + cursor: pointer; + padding-top: 10px; +} + +.ch-item:hover { + box-shadow: + inset 0 0 0 1px rgba(255,255,255,0.1), + 0 1px 2px rgba(0,0,0,0.1); +} + +.ch-item:hover .ch-info { + transform: scale(1); + opacity: 1; +} diff --git a/sites/all/themes/playbox_theme/js/custom.js b/sites/all/themes/playbox_theme/js/custom.js index c4ae38a8c..ddd94004a 100644 --- a/sites/all/themes/playbox_theme/js/custom.js +++ b/sites/all/themes/playbox_theme/js/custom.js @@ -107,6 +107,23 @@ Disco Party Time! ==============================================*/ $( document ).ready(function(){ + + // add some css settings based on dynamic logo settings + $('.ch-img-1').css('background-image', 'url(' + Drupal.settings.logo_white + ')'); + $('.ch-info p').css('background-image', 'url(' + Drupal.settings.logo + ')'); + + // added for logo_bling + $('#logo-hover').click(function(){ + $(this).hide( "slow", function() { + if (window.location.pathname != Drupal.settings.basePath){ + window.location.href = Drupal.settings.basePath; + } else { + $(this).css('text-indent', 0).html('You are home').show(); + } + }); + }); + + //If disco mode is enabled, periodically swap colors if(Drupal.settings.playboxadmin.disco == 1){ var default_color = Drupal.settings.playboxadmin.default_color; diff --git a/sites/all/themes/playbox_theme/playbox_theme.info b/sites/all/themes/playbox_theme/playbox_theme.info index 0f0da4021..ebcd0ed23 100644 --- a/sites/all/themes/playbox_theme/playbox_theme.info +++ b/sites/all/themes/playbox_theme/playbox_theme.info @@ -11,6 +11,7 @@ stylesheets[all][] = css/styles.css stylesheets[all][] = css/syntax.css stylesheets[all][] = css/meflat-blue.css stylesheets[all][] = css/tweaks.css +stylesheets[all][] = css/logo-bling.css scripts[] = js/jquery.easypiechart.js scripts[] = js/modernizr.min.js @@ -42,3 +43,5 @@ fonts[google_fonts_api][] = "Titillium Web&subset=latin#900" fonts[google_fonts_api][] = "Titillium Web&subset=latin#italic" fonts[google_fonts_api][] = "Titillium Web&subset=latin#regular" +settings[logo_white] = /sites/all/themes/playbox_theme/logo-white.svg + diff --git a/sites/all/themes/playbox_theme/template.php b/sites/all/themes/playbox_theme/template.php index d0bc72f67..86c5347ff 100644 --- a/sites/all/themes/playbox_theme/template.php +++ b/sites/all/themes/playbox_theme/template.php @@ -95,7 +95,8 @@ function playbox_theme_process_page(&$variables) { // Check if we're to always print the page title, even on panelized pages. $variables['always_show_page_title'] = theme_get_setting('always_show_page_title') ? TRUE : FALSE; - // Add in the path for the white logo that we will need on larger screens. - $path = url(path_to_theme() . '/logo-white.svg'); - $variables['logo_white'] = $path; + // Add js variable for path for the logo & alt logo that we will need on larger screens & alt screens. + drupal_add_js('jQuery.extend(Drupal.settings, { "logo_white": "' . theme_get_setting('logo_white') . '" });', 'inline'); + drupal_add_js('jQuery.extend(Drupal.settings, { "logo": "' . theme_get_setting('logo') . '" });', 'inline'); + } diff --git a/sites/all/themes/playbox_theme/templates/core/page.tpl.php b/sites/all/themes/playbox_theme/templates/core/page.tpl.php index a7f9c0184..32eaab1c4 100644 --- a/sites/all/themes/playbox_theme/templates/core/page.tpl.php +++ b/sites/all/themes/playbox_theme/templates/core/page.tpl.php @@ -158,11 +158,20 @@
- -
+ + + + + + 'textfield', + '#title' => t('Alternate logo'), + '#default_value' => theme_get_setting('logo_white'), + '#description' => t("Path to the version of the logo to be used for larger screens and logo_bling."), + ); +} \ No newline at end of file