#632030 by JohnAlbin: Merge Garland and Minnelli into one theme.
|
|
@ -44,7 +44,7 @@ function _drupal_maintenance_theme() {
|
|||
drupal_load('module', 'system');
|
||||
}
|
||||
|
||||
$custom_theme = variable_get('maintenance_theme', 'minnelli');
|
||||
$custom_theme = variable_get('maintenance_theme', 'garland');
|
||||
}
|
||||
|
||||
$themes = list_themes();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class MenuIncTestCase extends DrupalWebTestCase {
|
|||
// For a regular user, the fact that the site is in maintenance mode means
|
||||
// we expect the theme callback system to be bypassed entirely.
|
||||
$this->drupalGet('menu-test/theme-callback/use-admin-theme');
|
||||
$this->assertRaw('minnelli/minnelli.css', t("The maintenance theme's CSS appears on the page."));
|
||||
$this->assertRaw('garland/style.css', t("The maintenance theme's CSS appears on the page."));
|
||||
|
||||
// An administrator, however, should continue to see the requested theme.
|
||||
$admin_user = $this->drupalCreateUser(array('access site in maintenance mode'));
|
||||
|
|
|
|||
|
|
@ -307,8 +307,10 @@ function system_themes_page() {
|
|||
// There are two possible theme groups.
|
||||
$theme_group_titles = array(
|
||||
'enabled' => format_plural(count($theme_groups['enabled']), 'Enabled theme', 'Enabled themes'),
|
||||
'disabled' => format_plural(count($theme_groups['disabled']), 'Disabled theme', 'Disabled themes'),
|
||||
);
|
||||
if (!empty($theme_groups['disabled'])) {
|
||||
$theme_group_titles['disabled'] = format_plural(count($theme_groups['disabled']), 'Disabled theme', 'Disabled themes');
|
||||
};
|
||||
|
||||
uasort($theme_groups['enabled'], 'system_sort_themes');
|
||||
drupal_alter('system_themes_page', $theme_groups);
|
||||
|
|
|
|||
|
|
@ -2765,6 +2765,46 @@ function system_update_7045() {
|
|||
db_add_index('flood', 'purge', array('expiration'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Switch from the Minnelli theme if it is the default or admin theme.
|
||||
*/
|
||||
function system_update_7046() {
|
||||
if (variable_get('theme_default') == 'minnelli' || variable_get('admin_theme') == 'minnelli') {
|
||||
// Make sure Garland is enabled.
|
||||
db_update('system')
|
||||
->fields(array('status' => 1))
|
||||
->condition('type', 'theme')
|
||||
->condition('name', 'garland')
|
||||
->execute();
|
||||
if (variable_get('theme_default') != 'garland') {
|
||||
// If the default theme isn't Garland, transfer all of Minnelli's old
|
||||
// settings to Garland.
|
||||
$settings = variable_get('theme_minnelli_settings', array());
|
||||
// Set the theme setting width to "fixed" to match Minnelli's old layout.
|
||||
$settings['garland_width'] = 'fixed';
|
||||
variable_set('theme_garland_settings', $settings);
|
||||
// Remove Garland's color files since they won't match Minnelli's.
|
||||
foreach (variable_get('color_garland_files', array()) as $file) {
|
||||
@unlink($file);
|
||||
}
|
||||
if (isset($file) && $file = dirname($file)) {
|
||||
@rmdir($file);
|
||||
}
|
||||
variable_del('color_garland_palette');
|
||||
variable_del('color_garland_stylesheets');
|
||||
variable_del('color_garland_logo');
|
||||
variable_del('color_garland_files');
|
||||
variable_del('color_garland_screenshot');
|
||||
}
|
||||
if (variable_get('theme_default') == 'minnelli') {
|
||||
variable_set('theme_default', 'garland');
|
||||
}
|
||||
if (variable_get('admin_theme') == 'minnelli') {
|
||||
variable_set('admin_theme', 'garland');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "defgroup updates-6.x-to-7.x"
|
||||
* The next series of updates should start at 8000.
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ ini_set('session.cookie_lifetime', 2000000);
|
|||
* Remove the leading hash signs to enable.
|
||||
*/
|
||||
# $conf['site_name'] = 'My Drupal site';
|
||||
# $conf['theme_default'] = 'minnelli';
|
||||
# $conf['theme_default'] = 'garland';
|
||||
# $conf['anonymous'] = 'Visitor';
|
||||
|
||||
/**
|
||||
|
|
@ -262,7 +262,7 @@ ini_set('session.cookie_lifetime', 2000000);
|
|||
* theme. It is located inside 'modules/system/maintenance-page.tpl.php'.
|
||||
* Note: This setting does not apply to installation and update pages.
|
||||
*/
|
||||
# $conf['maintenance_theme'] = 'minnelli';
|
||||
# $conf['maintenance_theme'] = 'garland';
|
||||
|
||||
/**
|
||||
* reverse_proxy accepts a boolean value.
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 16 KiB |
|
|
@ -1,9 +1,10 @@
|
|||
; $Id$
|
||||
name = Garland
|
||||
description = Tableless, recolorable, multi-column, fluid width theme.
|
||||
description = A multi-column theme which can be configured to modify colors and switch between fixed and fluid width layouts.
|
||||
package = Core
|
||||
version = VERSION
|
||||
core = 7.x
|
||||
engine = phptemplate
|
||||
stylesheets[all][] = style.css
|
||||
stylesheets[print][] = print.css
|
||||
settings[garland_width] = fluid
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 29 KiB |
|
|
@ -1,75 +0,0 @@
|
|||
<?php
|
||||
// $Id$
|
||||
|
||||
$info = array(
|
||||
|
||||
// Pre-defined color schemes.
|
||||
'schemes' => array(
|
||||
'#0072b9,#027ac6,#2385c2,#5ab5ee,#494949' => t('Blue Lagoon (Default)'),
|
||||
'#464849,#2f416f,#2a2b2d,#5d6779,#494949' => t('Ash'),
|
||||
'#55c0e2,#000000,#085360,#007e94,#696969' => t('Aquamarine'),
|
||||
'#d5b048,#6c420e,#331900,#971702,#494949' => t('Belgian Chocolate'),
|
||||
'#3f3f3f,#336699,#6598cb,#6598cb,#000000' => t('Bluemarine'),
|
||||
'#d0cb9a,#917803,#efde01,#e6fb2d,#494949' => t('Citrus Blast'),
|
||||
'#0f005c,#434f8c,#4d91ff,#1a1575,#000000' => t('Cold Day'),
|
||||
'#c9c497,#0c7a00,#03961e,#7be000,#494949' => t('Greenbeam'),
|
||||
'#ffe23d,#a9290a,#fc6d1d,#a30f42,#494949' => t('Mediterrano'),
|
||||
'#788597,#3f728d,#a9adbc,#d4d4d4,#707070' => t('Mercury'),
|
||||
'#5b5fa9,#5b5faa,#0a2352,#9fa8d5,#494949' => t('Nocturnal'),
|
||||
'#7db323,#6a9915,#b5d52a,#7db323,#191a19' => t('Olivia'),
|
||||
'#12020b,#1b1a13,#f391c6,#f41063,#898080' => t('Pink Plastic'),
|
||||
'#b7a0ba,#c70000,#a1443a,#f21107,#515d52' => t('Shiny Tomato'),
|
||||
'#18583d,#1b5f42,#34775a,#52bf90,#2d2d2d' => t('Teal Top'),
|
||||
),
|
||||
|
||||
// Images to copy over.
|
||||
'copy' => array(
|
||||
'../images/menu-collapsed.gif',
|
||||
'../images/menu-collapsed-rtl.gif',
|
||||
'../images/menu-expanded.gif',
|
||||
'../images/menu-leaf.gif',
|
||||
),
|
||||
|
||||
// CSS files (excluding @import) to rewrite with new color scheme.
|
||||
'css' => array(
|
||||
'../style.css',
|
||||
),
|
||||
|
||||
// Coordinates of gradient (x, y, width, height).
|
||||
'gradient' => array(0, 37, 760, 121),
|
||||
|
||||
// Color areas to fill (x, y, width, height).
|
||||
'fill' => array(
|
||||
'base' => array(0, 0, 760, 568),
|
||||
'link' => array(107, 533, 41, 23),
|
||||
),
|
||||
|
||||
// Coordinates of all the theme slices (x, y, width, height)
|
||||
// with their filename as used in the stylesheet.
|
||||
'slices' => array(
|
||||
'../images/body.png' => array(0, 37, 1, 280),
|
||||
'../images/bg-bar.png' => array(202, 530, 76, 14),
|
||||
'../images/bg-bar-white.png' => array(202, 506, 76, 14),
|
||||
'../images/bg-tab.png' => array(107, 533, 41, 23),
|
||||
'../images/bg-navigation.png' => array(0, 0, 7, 37),
|
||||
'../images/bg-content-left.png' => array(40, 117, 50, 352),
|
||||
'../images/bg-content-right.png' => array(510, 117, 50, 352),
|
||||
'../images/bg-content.png' => array(299, 117, 7, 200),
|
||||
'../images/bg-navigation-item.png' => array(32, 37, 17, 12),
|
||||
'../images/bg-navigation-item-hover.png' => array(54, 37, 17, 12),
|
||||
'../images/gradient-inner.png' => array(646, 307, 112, 42),
|
||||
|
||||
'logo.png' => array(622, 51, 64, 73),
|
||||
'screenshot.png' => array(0, 37, 400, 240),
|
||||
),
|
||||
|
||||
// Reference color used for blending. Matches the base.png's colors.
|
||||
'blend_target' => '#ffffff',
|
||||
|
||||
// Preview files.
|
||||
'preview_image' => 'color/preview.png',
|
||||
'preview_css' => '../color/preview.css',
|
||||
|
||||
// Base file for image generation.
|
||||
'base_image' => 'color/base.png',
|
||||
);
|
||||
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
|
@ -1,14 +0,0 @@
|
|||
/* $Id$ */
|
||||
|
||||
body #wrapper #container {
|
||||
width: 560px;
|
||||
}
|
||||
|
||||
body.two-sidebars #wrapper #container {
|
||||
width: 980px;
|
||||
}
|
||||
|
||||
body.sidebar-first #wrapper #container,
|
||||
body.sidebar-second #wrapper #container {
|
||||
width: 770px;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
; $Id$
|
||||
name = Minnelli
|
||||
description = Tableless, recolorable, multi-column, fixed width theme.
|
||||
package = Core
|
||||
version = VERSION
|
||||
core = 7.x
|
||||
base theme = garland
|
||||
stylesheets[all][] = minnelli.css
|
||||
|
Before Width: | Height: | Size: 11 KiB |
|
|
@ -366,9 +366,24 @@ table .form-button, table .form-submit {
|
|||
background: #edf5fa url(images/body.png) repeat-x 50% 0;
|
||||
}
|
||||
|
||||
/* Set container widths when we are using the "fixed width" option. */
|
||||
#wrapper #container {
|
||||
width: 560px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
body.one-sidebar #wrapper #container {
|
||||
width: 770px;
|
||||
}
|
||||
|
||||
body.two-sidebars #wrapper #container {
|
||||
width: 980px;
|
||||
}
|
||||
|
||||
/* Unset container width when we are using the "fluid width" option. */
|
||||
body.fluid-width #wrapper #container {
|
||||
width: auto;
|
||||
max-width: 1270px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,26 @@ function garland_breadcrumb($variables) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override or insert variables into the maintenance page template.
|
||||
*/
|
||||
function garland_preprocess_maintenance_page(&$vars) {
|
||||
// Toggle fixed or fluid width.
|
||||
if (theme_get_setting('garland_width') == 'fluid') {
|
||||
$vars['classes_array'][] = 'fluid-width';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override or insert variables into the html template.
|
||||
*/
|
||||
function garland_preprocess_html(&$vars) {
|
||||
// Toggle fixed or fluid width.
|
||||
if (theme_get_setting('garland_width') == 'fluid') {
|
||||
$vars['classes_array'][] = 'fluid-width';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Override or insert variables into the html template.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
// $Id$
|
||||
|
||||
/**
|
||||
* Implement hook_form_system_theme_settings_alter().
|
||||
*
|
||||
* @param $form
|
||||
* The form.
|
||||
* @param $form_state
|
||||
* The form state.
|
||||
*/
|
||||
function garland_form_system_theme_settings_alter(&$form, $form_state) {
|
||||
$form['garland_width'] = array(
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Content width'),
|
||||
'#options' => array(
|
||||
'fluid' => t('Fluid width'),
|
||||
'fixed' => t('Fixed width'),
|
||||
),
|
||||
'#default_value' => theme_get_setting('garland_width'),
|
||||
'#description' => t('Specify whether the content will wrap to a fixed width or will fluidly expand to the width of the browser window.'),
|
||||
// Place this above the color scheme options.
|
||||
'#weight' => -2,
|
||||
);
|
||||
}
|
||||