From 9758b4e3007e3af2bc0a6f56ddd0a06e8ef40cad Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 22 Dec 2005 06:58:26 +0000 Subject: [PATCH] changed to div layout and fixed up burgundy... still needs a lot of css work --- docs/CHANGELOG | 4 +- lib/themes.php | 1 + modules/init.php | 1 + templates/footer.inc | 4 +- templates/header.inc | 22 ++- templates/show_search.inc | 2 +- templates/show_uploads.inc | 2 +- templates/sidebar.inc.php | 31 +++- templates/style.inc | 67 ++++++-- themes/burgundy/templates/style.inc | 229 ++++++++++++++++------------ themes/burgundy/theme.cfg.php | 2 + 11 files changed, 234 insertions(+), 131 deletions(-) diff --git a/docs/CHANGELOG b/docs/CHANGELOG index e65b1794..ea7c7b7b 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,7 +4,9 @@ -------------------------------------------------------------------------- v.3.3.2-Alpha4 - - Introduced initial new interface + - Updated Burgundy theme to take advantage of div format so that + it acts like the old 'horizontal' menu + - Introduced new 'vertical' interface that uses - Fixed a problem where downsampled songs wouldn't get recorded in stats due to their diminished size - Fixed column typo on Admin User page diff --git a/lib/themes.php b/lib/themes.php index dfe49292..bb6c180a 100644 --- a/lib/themes.php +++ b/lib/themes.php @@ -79,6 +79,7 @@ function set_theme_colors($theme_name,$user_id) { This could be dangerous but eah! */ $theme = get_theme($theme_name); + $GLOBALS['theme'] = $theme; if (!count($theme['color'])) { return false; } foreach ($theme['color'] as $key=>$color) { diff --git a/modules/init.php b/modules/init.php index adc87ac6..564fbc36 100644 --- a/modules/init.php +++ b/modules/init.php @@ -289,6 +289,7 @@ flip_class(array('odd','even')); /* Setup the Error Class */ $error = new Error(); +$theme = get_theme(conf('theme_name')); if (! preg_match('/update\.php/', $_SERVER['PHP_SELF'])) { $update = new Update(); diff --git a/templates/footer.inc b/templates/footer.inc index dd59cf83..eda86358 100644 --- a/templates/footer.inc +++ b/templates/footer.inc @@ -1,5 +1,3 @@ - - - + diff --git a/templates/header.inc b/templates/header.inc index 16ee615c..ad664142 100644 --- a/templates/header.inc +++ b/templates/header.inc @@ -35,17 +35,15 @@ $location = get_location(); - - +
-
- - + + - + - - + diff --git a/templates/show_uploads.inc b/templates/show_uploads.inc index 04d43dd3..bc1d74f8 100644 --- a/templates/show_uploads.inc +++ b/templates/show_uploads.inc @@ -27,7 +27,7 @@ $uploads = get_uploads(); if (count($uploads)) { ?> -
+ +
diff --git a/templates/show_search.inc b/templates/show_search.inc index ba0c9906..957480fe 100644 --- a/templates/show_search.inc +++ b/templates/show_search.inc @@ -60,7 +60,7 @@ $final_javascript .= " // END-->\n "; print_error('keyword'); ?>
  
+
diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php index f0b61d08..b71e1475 100644 --- a/templates/sidebar.inc.php +++ b/templates/sidebar.inc.php @@ -46,16 +46,33 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ has_access(100)) { ?>
  • -
  • - - + "; } + show_submenu($admin_items); + if ($GLOBALS['theme']['orientation'] != 'vertical') { echo "\t"; } + } // end if browse sub menu + else { + echo "\t"; + } + + } // end if access + ?>
  • -
  • - + "; } + show_submenu($browse_items); + if ($GLOBALS['theme']['orientation'] != 'vertical') { echo "\t"; } + } // end if browse sub menu + else { + echo "\t"; + } + ?> prefs['upload']) { ?>
  • @@ -73,6 +90,7 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ
  • + + + + diff --git a/templates/style.inc b/templates/style.inc index 92c7458b..32578840 100644 --- a/templates/style.inc +++ b/templates/style.inc @@ -95,7 +95,6 @@ font-weight: bold; background-color: ; margin: 2px 2px 2px 2px; - cursor: pointer; } select { color: ; @@ -261,6 +260,7 @@ padding-left:1px; padding-right:1px; font-size: px; + cursor: pointer; } .sidebar { @@ -273,42 +273,74 @@ width:160px; background: ; } - - #sidecontainer +/** + * Div Definitions + * These define how the page is layed out, be careful with these as changes to them + * can cause drastic layout changes + */ + #maincontrainer + { + margin: 0px; + } + #topbar + { + height: 80px; + background-color: #888888; + } + #topbarright + { + float: right; + } + #topbarleft + { + float: left; + } + #sidebar { + clear: both; + height: 100%; margin-left: 0px; + margin-top:0px; + float: left; + width: 170px; } - #navcontainer ul + #sidebar ul { - margin: 0; - padding: 0; + margin-left:0px; + margin-top:0px; + margin-bottom:0px; + margin-right: 10px; + padding: 0px; list-style-type: none; font-family: verdana, arial, Helvetica, sans-serif; } - #navcontainer li { margin: 0 0 1px 0; } + #sidebar li { + margin: 0 0 1px 0; + padding-top:0px; + padding-bottom:0px; + } - #navcontainer a, .navbutton + #sidebar a, .navbutton { display: block; padding: 5px 10px; - width: 140px; color: #000; background-color: #666; text-decoration: none; } - #navcontainer a:hover + #sidebar a:hover { color: #000; background-color: #ccc; text-decoration: none; } - #navcontainer ul ul li { margin: 0 0 1px 0; } + #sidebar ul ul li { margin: 0 0 1px 0; } - #navcontainer ul ul a, .subnavbutton + #sidebar ul ul a, .subnavbutton { display: block; padding: 5px 5px 5px 30px; @@ -318,11 +350,20 @@ text-decoration: none; } - #navcontainer ul ul a:hover + #sidebar ul ul a:hover { color: #000; background-color: #ddd; text-decoration: none; } + #content + { + float: left; + margin-left:0px; + } +/** + * End Div Definitions + * This is the end of the main structure def's + */ --> diff --git a/themes/burgundy/templates/style.inc b/themes/burgundy/templates/style.inc index e0d928e8..c0aed80e 100644 --- a/themes/burgundy/templates/style.inc +++ b/themes/burgundy/templates/style.inc @@ -30,6 +30,10 @@ diff --git a/themes/burgundy/theme.cfg.php b/themes/burgundy/theme.cfg.php index f6ca16b7..725527f4 100644 --- a/themes/burgundy/theme.cfg.php +++ b/themes/burgundy/theme.cfg.php @@ -25,6 +25,8 @@ author = "S1amson" # DEFAULT: N/A #maintainer = "Ben Shields " +orientation = "horizontal" + # Theme Colors ################### [color]