summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-12-22 06:58:26 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-12-22 06:58:26 +0000
commit9758b4e3007e3af2bc0a6f56ddd0a06e8ef40cad (patch)
tree75a670eeecfd74f5990e8842527b1584eb13d4d9
parentdbf698e92a1968d8f2b5dd6695e26fb884d2341c (diff)
downloadampache-9758b4e3007e3af2bc0a6f56ddd0a06e8ef40cad.tar.gz
ampache-9758b4e3007e3af2bc0a6f56ddd0a06e8ef40cad.tar.bz2
ampache-9758b4e3007e3af2bc0a6f56ddd0a06e8ef40cad.zip
changed to div layout and fixed up burgundy... still needs a lot of css work
-rwxr-xr-xdocs/CHANGELOG4
-rw-r--r--lib/themes.php1
-rw-r--r--modules/init.php1
-rw-r--r--templates/footer.inc4
-rw-r--r--templates/header.inc22
-rw-r--r--templates/show_search.inc2
-rw-r--r--templates/show_uploads.inc2
-rw-r--r--templates/sidebar.inc.php31
-rw-r--r--templates/style.inc67
-rw-r--r--themes/burgundy/templates/style.inc229
-rw-r--r--themes/burgundy/theme.cfg.php2
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 <divs>
- 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 @@
- </td>
-</tr>
-</table>
+ </div>
</body>
</html>
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();
<body>
<script src="<?php echo conf('web_path'); ?>/lib/general.js" language="javascript" type="text/javascript"></script>
-
-<table border="0" cellpadding="0" cellspacing="0" style="margin:0px;" width="100%" >
+<div id="maincontainer">
<!-- This is the topbar row -->
-<tr id="pageheader">
- <td colspan="2">
- <div style="float:left;margin-top:3px;">
+<div id="topbar">
+ <div id="topbarleft">
<a href="http://www.ampache.org">
<img class="pageheader" src="<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache.gif" border="0" title="Ampache: For the love of music" alt="Ampache: For the love of music" />
</a>
</div>
- <div style="float:right;">
+ <div id="topbarright">
<a href="http://www.ampache.org/index.php">Ampache v.<?php echo conf('version'); ?></a><br />
<b><?php echo _("You are currently logged in as") . " " . $GLOBALS['user']->username; ?></b>
<br />
@@ -58,14 +56,12 @@ $location = get_location();
</select>
<input type="submit" value="<?php echo _("Go!"); ?>" class="button" />
</form>
- </div>
- </td>
-</tr>
+ </div>
+</div>
<!-- This is the row for body + sidebar -->
-<tr>
+<div id="sidebar">
<!-- This is the sidebar -->
- <td valign="top" class="sidebar">
<?php require_once(conf('prefix') . '/templates/sidebar.inc.php'); ?>
- </td>
- <td width="100%" valign="top" style="padding-top:10px;padding-left:10px;">
+</div>
+ <div id="content" width="100%" valign="top" style="padding-top:10px;padding-left:10px;">
<!-- Start Main Page -->
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 </script>";
<input type="text" id="all_string" name="all_string" value="<?php echo scrub_out($_REQUEST['all_string']); ?>" disabled="disabled" />
<?php $GLOBALS['error']->print_error('keyword'); ?>
</td>
- <td>&nbsp;</td>
+ <td colspan="2">&nbsp;</td>
</tr>
<tr class="<?php echo flip_class(); ?>">
<td><?php echo _("Title"); ?></td>
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)) {
?>
-<table class="tabledata" cellspacing="0" cellpadding="0" border="1" align="center">
+<table class="tabledata" cellspacing="0" cellpadding="0" border="1">
<tr class="table-header">
<td><?php echo _('Action'); ?></td>
<td><?php echo _('Status'); ?></td>
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
<?php if ($GLOBALS['user']->has_access(100)) { ?>
<li>
<a href="<?php echo conf('web_path'); ?>/admin/index.php"><?php echo _("Admin"); ?></a>
- </li>
- <?php if ($location['section'] == 'admin') { show_submenu($admin_items); } ?>
- <? } ?>
+ <?php
+ if ($location['section'] == 'admin') {
+ if ($GLOBALS['theme']['orientation'] == 'vertical') { echo "\t</li>"; }
+ show_submenu($admin_items);
+ if ($GLOBALS['theme']['orientation'] != 'vertical') { echo "\t</li>"; }
+ } // end if browse sub menu
+ else {
+ echo "\t</li>";
+ }
+
+ } // end if access
+ ?>
<li>
<a href="<?php echo conf('web_path'); ?>/preferences.php"><?php echo _("Preferences"); ?></a>
</li>
<li>
<a href="<?php echo conf('web_path'); ?>/browse.php"><?php echo _("Browse"); ?></a>
- </li>
- <?php if ($location['section'] == 'browse') { show_submenu($browse_items); } ?>
+ <?php
+ if ($location['section'] == 'browse') {
+ if ($GLOBALS['theme']['orientation'] == 'vertical') { echo "\t</li>"; }
+ show_submenu($browse_items);
+ if ($GLOBALS['theme']['orientation'] != 'vertical') { echo "\t</li>"; }
+ } // end if browse sub menu
+ else {
+ echo "\t</li>";
+ }
+ ?>
<?php if ($GLOBALS['user']->prefs['upload']) { ?>
<li>
<a href="<?php echo conf('web_path'); ?>/upload.php"><?php echo _("Upload"); ?></a>
@@ -73,6 +90,7 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ
<a href="<?php echo conf('web_path'); ?>/search.php"><?php echo _("Search"); ?></a>
</li>
</ul>
+ <?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?>
<ul class="subnavside">
<li class="subnavbutton">
<form name="sub_search" method="post" action="<?php echo conf('web_path'); ?>/search.php" enctype="multipart/form-data" style="Display:inline">
@@ -85,11 +103,13 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ
</form>
</li>
</ul>
+ <?php } ?>
<ul>
<li>
<a href="<?php echo conf('web_path'); ?>/randomplay.php"><?php echo _("Random Play"); ?></a>
</li>
</ul>
+ <?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?>
<ul class="subnavside">
<li class="subnavbutton">
<form name="random" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ?>/song.php" style="Display:inline">
@@ -122,6 +142,7 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ
</form>
</li>
</ul>
+ <?php } ?>
<?php if (conf('use_auth')) { ?>
<ul><li><a href="<?php echo conf('web_path'); ?>/logout.php">Logout</a></li></ul>
<?php } ?>
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: <?php echo conf('base_color2') ?>;
margin: 2px 2px 2px 2px;
- cursor: pointer;
}
select {
color: <?php echo conf('font_color2'); ?>;
@@ -261,6 +260,7 @@
padding-left:1px;
padding-right:1px;
font-size: <?php echo conf('font_size') - 1; ?>px;
+ cursor: pointer;
}
.sidebar
{
@@ -273,42 +273,74 @@
width:160px;
background: <?php echo conf('base_color2'); ?>;
}
-
- #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
+ */
-->
</style>
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 @@
<!--
body
{
+ padding-top: 0px;
+ margin-top: 0px;
+ margin-left: 0px;
+ margin-right: 0px;
background: <?php echo conf('bg_color1'); ?>;
font-family: <?php echo conf('font') ?>;
font-size: <?php echo conf('font_size'); ?>px;
@@ -90,110 +94,27 @@
font-size: <?php echo conf('font_size'); ?>px;
font-weight: bold;
background-color: <?php echo conf('base_color2') ?>;
- border-style: solid;
- border-width: 1px;
- border-color: <?php echo conf('bg_color2'); ?>;
margin: 2px 2px 2px 2px;
+ cursor: pointer;
}
select {
color: <?php echo conf('font_color2'); ?>;
font-family: <?php echo conf('font')?>;
font-size: <?php echo conf('font_size'); ?>px;
- background-color: <?php echo conf('base_color2') ?>;
+ background-color: <?php echo conf('base_color2'); ?>;
}
textarea
- {
+ {
+ background-color: <?php echo conf('base_color2'); ?>;
color: <?php echo conf('font_color2') ?>;
font-family: <?php echo conf('font')?>;
font-size: <?php echo conf('font_size'); ?>px;
- }
+ }
.table-header
{
background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2')?> repeat-x;
vertical-align: top;
}
-/*************** Main Menu *****************/
- #mainmenu {
- float: left;
- width: 100%;
- margin: 0;
- padding: 0;
- list-style: none;
- border-top: 0px solid #000;
- border-bottom: 0px solid #000;
- border-right: 0px solid #000;
- border-left: 0px solid #000;
- background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2');?> repeat-x;
-peat-x;
- }
- #mainmenu li {
- float: left;
- margin: 0;
- padding: 0 10px 0 10px;
- border-right: 0px solid #000;
- display: inline;
- background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2');?> repeat-x;
-peat-x;
- }
- #mainmenu li.active {
- background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-dark-bg.gif) <?php echo conf('base_color2');?> rep
-eat-x;
- }
- #mainmenu a {
- text-decoration: none;
- }
- #mainmenu a:hover {
- color: #000;
- }
- #mainmenu a:active {
- color: #00a;
- }
-/*************** END Main Menu *************/
-/*************** Admin Menu *************/
- #adminmenu {
- float: left;
- width: 100%;
- margin: 0;
- padding: 0;
- list-style: none;
- border-bottom: 0px solid #000;
- border-right: 0px solid #000;
- border-left: 0px solid #000;
- border-top: 0px solid #000;
- background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2')?> repeat;
- }
- #adminmenu li {
- float: left;
- margin: 0;
- padding: 0 20px 0 20px;
- border-right: 0px solid #000;
- display: inline;
- background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2');?> repeat-x;
- }
- #adminmenu li.active {
- background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-dark-bg.gif) <?php echo conf('base_color2');?> repeat-x;
- }
- #adminmenu a {
- text-decoration: none;
- }
- #adminmenu a:hover {
- color: #000;
- }
- #adminmenu a:active {
- color: #000;
- }
-/*************** END Main Menu *************/
-/*************** Page Header *********************/
- #pageheader {
- background: <?php echo conf('bg_color1');?>;
- }
-/*************** END Page Header *****************/
- .navitem
- {
- background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2')?> repeat-x;
- vertical-align: top;
- text-align: center;
- }
.header1
{
color: <?php echo conf('font_color2'); ?>;
@@ -208,12 +129,6 @@ eat-x;
font-size: <?php echo conf('font_size') + 2; ?>px;
font-weight: 900;
}
- .active_navitem
- {
- background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-dark-bg.gif) <?php echo conf('bg_color1')?> repeat-x;
- vertical-align: top;
- text-align: center;
- }
.headrow
{
background:<?php echo conf('row_color1'); ?>;
@@ -267,5 +182,131 @@ eat-x;
font-size: <?php echo conf('font_size'); ?>px;
font-weight: normal;
}
+ .smallbutton
+ {
+ border:0px;
+ padding-left:1px;
+ padding-right:1px;
+ font-size: <?php echo conf('font_size') - 1; ?>px;
+ }
+ .sidebar
+ {
+ margin-left:0px;
+ margin-top:0px;
+ margin-right:0px;
+ padding-right:0px;
+ padding-top: 0px;
+ padding-left: 0px;
+ width:160px;
+ background: <?php echo conf('base_color2'); ?>;
+ }
+/**
+ * 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: <?php echo conf('bg_color1'); ?>;
+ }
+ #topbarright
+ {
+ float: right;
+ }
+ #topbarleft
+ {
+ float: left;
+ }
+ #sidebar
+ {
+ position: relative;
+ clear: right;
+ height: 100%;
+ margin-left: 0px;
+ float: left;
+ width: 100%;
+ list-style: none;
+ }
+
+ #sidebar ul
+ {
+ margin-left:0px;
+ margin-top:0px;
+ margin-bottom:0px;
+ margin-right: 3px;
+ padding: 0px;
+ list-style-type: none;
+ font-family: verdana, arial, Helvetica, sans-serif;
+ }
+
+ #sidebar li
+ {
+ float: left;
+ margin: 0;
+ margin-left:2px;
+ padding: 0 3px 0 0px;
+ display: inline;
+ }
+
+ #sidebar a, .navbutton
+ {
+ padding: 5px 5px;
+ color: <?php echo conf('font_color2'); ?>;
+ background-color: <?php echo conf('row_color3'); ?>;
+ text-decoration: none;
+ }
+
+ #sidebar a:hover
+ {
+ color: <?php echo conf('font_color1'); ?>;
+ background-color: <?php echo conf('row_color1'); ?>;
+ text-decoration: none;
+ }
+ #sidebar ul ul {
+ width: 100%;
+ position: absolute;
+ left: 0;
+ top: 20px;
+ margin: 0;
+ padding: 0;
+ white-space: nowrap;
+ }
+
+ #sidebar ul ul li {
+ padding: 2px;
+ margin: 0;
+ border: 0;
+ }
+
+ #sidebar ul ul a, .subnavbutton
+ {
+ display: block;
+ padding: 3px 3px 3px 3px;
+ color: <?php echo conf('font_color2'); ?>;
+ background-color: <?php echo conf('row_color2'); ?>;
+ text-decoration: none;
+ }
+
+ #sidebar ul ul a:hover
+ {
+ color: <?php echo conf('font_color1'); ?>;
+ background-color: <?php echo conf('row_color1'); ?>;
+ text-decoration: none;
+ }
+ #content
+ {
+ float: left;
+ margin-left:0px;
+ margin-top: 35px;
+ }
+/**
+ * End Div Definitions
+ * This is the end of the main structure def's
+ */
-->
</style>
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 <foo@ampache.org>"
+orientation = "horizontal"
+
# Theme Colors
###################
[color]