summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-08 04:57:19 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-01-08 04:57:19 +0000
commit2bb59dfa45f008846305c62962616bd3fff3884d (patch)
treeea27d68aac0318246c3a857924c736e96fdeb4a3
parenta3b348ff76a133966173db3cc7a741f342ac5c63 (diff)
downloadampache-2bb59dfa45f008846305c62962616bd3fff3884d.tar.gz
ampache-2bb59dfa45f008846305c62962616bd3fff3884d.tar.bz2
ampache-2bb59dfa45f008846305c62962616bd3fff3884d.zip
tweaks from sigger
-rw-r--r--templates/header.inc1
-rw-r--r--templates/menustyle.inc128
-rw-r--r--templates/show_mpdpl.inc4
-rw-r--r--templates/style.inc119
-rw-r--r--themes/burgundy/templates/style.inc8
-rw-r--r--themes/burgundy/theme.cfg.php2
-rw-r--r--themes/classic/theme.cfg.php12
-rw-r--r--themes/greyblock/templates/style.inc98
8 files changed, 161 insertions, 211 deletions
diff --git a/templates/header.inc b/templates/header.inc
index 91700508..5f7eed74 100644
--- a/templates/header.inc
+++ b/templates/header.inc
@@ -29,6 +29,7 @@ $location = get_location();
<head>
<link rel="shortcut icon" href="<?php echo conf('web_path'); ?>/favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo conf('site_charset'); ?>" />
+<?php show_template('menustyle'); ?>
<?php show_template('style'); ?>
<title><?php echo conf('site_title'); ?> - <?php echo $location['title']; ?></title>
</head>
diff --git a/templates/menustyle.inc b/templates/menustyle.inc
new file mode 100644
index 00000000..06139325
--- /dev/null
+++ b/templates/menustyle.inc
@@ -0,0 +1,128 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2006 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/*!
+ @header Style File
+ @discussion this is the css that handles the menu mojo (#sidebar, etc) and the
+ outer layer of layout (#maincontainer, #topbar, #content, etc
+*/
+?>
+<style type="text/css">
+<!--
+/**
+ * Div Definitions
+ * These define how the page is laid out, be careful with these as changes to them
+ * can cause drastic layout changes
+ */
+ #maincontainer
+ {
+ margin: 0px;
+ }
+ #topbar
+ {
+ height: 80px;
+ padding-top:10px;
+ padding-left:10px;
+ background-color: <?php echo conf('bg_color1'); ?>;
+ }
+ #topbarright
+ {
+ float: right;
+ }
+ #topbarleft
+ {
+ float: left;
+ }
+ .nodisplay { display: none;}
+ .display {}
+ #mpdpl td {
+ padding: 0px 2px 0px 2px;
+ text-align: left;
+ }
+/**
+ * End Div Definitions
+ * This is the end of the main structure def's
+ */
+
+/**
+ * Experimental for menus (Thx Sigger)
+ * TO DO: Fill in 1px border around menus & submenu items
+ * Make padding appply to the li, not just an a. Moving paddng: to li throws off the dropdown menu alignment.
+ */
+ #content {
+/* float: left; /* use for horizontal menu; comment out otherwise */
+ margin-left:0px;
+ }
+ #sidebar {
+ clear: both;
+ height: 100%;
+ margin: 0;
+ float: left;
+ padding: 0;
+ list-style: none;
+ border: 1px solid #000;
+ line-height: 1.0;
+ }
+ #sidebar ul {
+ margin: 0px;
+ list-style: none;
+ padding: 0px;
+ font-family: verdana, arial, Helvetica, sans-serif;
+ line-height: 1.0;
+ }
+ #sidebar li {
+ margin: 0;
+ display: block;
+ border-bottom: 1px solid white;
+ border-left: 1px solid white;
+ border-right: 1px solid white;
+/* float: left; /* use for horizontal menu; comment out otherwise */
+ padding: 5px 0px 5px 10px;
+ width: 12em;
+ background-color: <?php echo conf('row_color2'); ?>;
+ }
+ #sidebar a, .navbutton {
+ display: block; /*Not sure why this is neccesary, but it is for IE*/
+ text-decoration: none;
+ }
+ #sidebar li:hover, #sidebar li.sfhover {
+ color: <?php echo conf('font_color2'); ?>;
+ background-color: <?php echo conf('row_color3'); ?>;
+ }
+ #sidebar li:active {
+ background-color: <?php echo conf('row_color1'); ?>;
+ }
+ #sidebar li ul {
+ float: left;
+ position: absolute;
+ width: 9em;
+ margin: -1.5em 0 0 9em; /* for vertical menu; comment out otherwise */
+/* margin: 0.5em 0 0 -1.1em; /* for horizontal menu; comment out otherwise */
+
+ left: -999em; /* this -999em puts the submenu item way off to the left until it's called back by a hover (below) */
+ }
+ #sidebar li:hover ul, #sidebar li.sfhover ul {
+ left: auto; /* this calls the submenu back when the parent li is hovered. */
+ }
+
+-->
+</style>
diff --git a/templates/show_mpdpl.inc b/templates/show_mpdpl.inc
index 42c0c23d..199e425f 100644
--- a/templates/show_mpdpl.inc
+++ b/templates/show_mpdpl.inc
@@ -39,7 +39,7 @@ $myMpd = init_mpd();
<form name="songs" action="<?php echo conf('web_path')."/amp-mpd.php"; ?>" method="post" enctype="multipart/form-data">
<table id= "mpdpl" border="0" cellpadding="0" cellspacing="1" width="100%" class="tabledata">
<tr>
- <td align="center" class="table-header">
+ <td style="text-align:center" class="table-header">
<b><?php echo _("MPD Server Playlist"); ?></b>
<!-- <i>
[<a title="<?php echo _("Refresh the Playlist Window"); ?>" href="<?php echo $_SERVER['PHP_SELF']; ?>">refresh</a>]
@@ -58,7 +58,7 @@ $myMpd = init_mpd();
<td <?php echo $nopad ?>>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr class="table-header">
- <th><a href="#" onclick="check_songs(); return false;">Select</a> - <a href="#" onclick="invert_songs(); return false;">Invert</a></th>
+ <th><a href="#" onclick="check_songs(); return false;">Select</a>/<br><a href="#" onclick="invert_songs(); return false;">Invert</a></th>
<th align="left"><?php echo _("Song title"); ?></th>
<th align="left"><?php echo _("Artist"); ?></th>
<th align="left"><?php echo _("Album"); ?></th>
diff --git a/templates/style.inc b/templates/style.inc
index 5c7ea2d2..0019e87b 100644
--- a/templates/style.inc
+++ b/templates/style.inc
@@ -80,13 +80,13 @@
{
/* there really isn't anything for this */
}
- .nodisplay { display: none;}
- .display {}
.npsong
{
background: #FFFF66;
font-weight: bold;
}
+ .nodisplay { display: none;}
+ .display {}
#mpdpl td {
padding: 0px 2px 0px 2px;
text-align: left;
@@ -208,117 +208,10 @@
font-size: <?php echo conf('font_size') - 1; ?>px;
cursor: pointer;
}
- .sidebar
- {
- margin-left:0px;
- margin-top:0px;
- margin-right:0px;
- padding-right:0px;
- padding-top: 0px;
- padding-left: 0px;
- 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
- */
- #maincontainer
- {
- margin: 0px;
- }
- #topbar
- {
- height: 80px;
- padding-top:10px;
- padding-left:10px;
- background-color: <?php echo conf('bg_color1'); ?>;
- }
- #topbarright
- {
- float: right;
- }
- #topbarleft
- {
- float: left;
- }
- #navcontainer ul li
- {
- float:left;
- width:100%;
- }
-
- .subnavbutton
- {
- background-color: <?php echo conf('row_color1'); ?>;
- text-align:center;
- text-decoration: none;
- color: <?php echo conf('font_color2'); ?>;
- }
+/* These three lines make a menu vertical */
+ #content { float: none; }
+ #sidebar li { float: none; }
+ #sidebar li ul { margin: -1.5em 0 0 9em; }
- #content
- {
- margin-left:0px;
- }
-/**
- * Experimental for menus (Thx Sigger)
- * TO DO: Fill in 1px border around menus & submenu items
- * Make padding appply to the li, not just an a. Moving paddng: to li throws off the dropdown menu alignment.
- */
- #sidebar {
- clear: both;
- height: 100%;
- margin: 0;
- float: left;
- /* width: 110px; /* this controls the width of the sidebar. horizontal menu needs more width */
- padding: 0;
- list-style: none;
- border: 1px solid #000;
- line-height: 1.0;
- }
- #sidebar ul {
- margin: 0px;
- list-style: none;
- padding: 0px;
- font-family: verdana, arial, Helvetica, sans-serif;
- line-height: 1.0;
- }
- #sidebar li {
-/* margin: 0 0 1px 0; */
- margin: 0;
- display: block;
- border-bottom: 1px solid white;
- border-left: 1px solid white;
- border-right: 1px solid white;
- padding: 5px 0px 5px 10px;
- width: 10em;
- background-color: <?php echo conf('row_color2'); ?>;
- }
- #sidebar a, .navbutton {
- display: block; /*Not sure why this is neccesary, but it is for IE*/
- text-decoration: none;
- }
- #sidebar li:hover, #sidebar li.sfhover {
- color: <?php echo conf('font_color2'); ?>;
- background-color: <?php echo conf('row_color3'); ?>;
- }
- #sidebar li:active {
- background-color: <?php echo conf('row_color1'); ?>;
- }
- #sidebar li ul {
- float: left;
- position: absolute;
- width: 12em;
- margin: -1.5em 0 0 10em;
-/* -2em 0 0 10em for vertical menu puts the submenu back up and to the right of the hovered menu item by "the right amount"*/
- left: -999em; /* this puts the submenu item way off to the left until it's called back by a hover (below) */
- }
- #sidebar li:hover ul, #sidebar li.sfhover ul {
- left: auto; /* this calls the submenu back when the parent li is hovered. */
- }
-/**
- * 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 c0aed80e..da89d7fc 100644
--- a/themes/burgundy/templates/style.inc
+++ b/themes/burgundy/templates/style.inc
@@ -200,11 +200,15 @@
width:160px;
background: <?php echo conf('base_color2'); ?>;
}
+/* These three lines make a menu horizontal */
+ #content { float: left; }
+ #sidebar li { float: left; }
+ #sidebar li ul { margin: 0.5em 0 0 -1.1em; }
/**
* 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;
@@ -304,7 +308,7 @@
margin-left:0px;
margin-top: 35px;
}
-/**
+
* End Div Definitions
* This is the end of the main structure def's
*/
diff --git a/themes/burgundy/theme.cfg.php b/themes/burgundy/theme.cfg.php
index bf93db81..c7246a0d 100644
--- a/themes/burgundy/theme.cfg.php
+++ b/themes/burgundy/theme.cfg.php
@@ -39,7 +39,7 @@ orientation = "horizontal"
# If this is set to simple the sub menu's will only be shown when you're on one of the
# respective pages. If you want to make the menu's something like the classic theme
# comment this out
-submenu = "simple"
+# submenu = "simple"
# Theme Colors
###################
diff --git a/themes/classic/theme.cfg.php b/themes/classic/theme.cfg.php
index 123f99d7..3597c20e 100644
--- a/themes/classic/theme.cfg.php
+++ b/themes/classic/theme.cfg.php
@@ -25,6 +25,18 @@ name = "Classic Ampache"
# DEFAULT: N/A
#maintainer = "Ben Shields <foo@ampache.org>"
+# Orientation
+# This was added as of 3.3.2-Alpha4, this tells Ampache if this theme
+# uses vertical or horizontal orientation of the menu, if this is a horizontal
+# theme then it will not show the quick search and quick random play forms
+orientation = "vertical"
+
+# Submenu
+# If this is set to simple the sub menu's will only be shown when you're on one of the
+# respective pages. If you want to make the menu's something like the classic theme
+# comment this out
+submenu = "simple"
+
# Theme Colors
###################
[color]
diff --git a/themes/greyblock/templates/style.inc b/themes/greyblock/templates/style.inc
index a79297c6..204c074e 100644
--- a/themes/greyblock/templates/style.inc
+++ b/themes/greyblock/templates/style.inc
@@ -27,24 +27,6 @@
*/
?>
-<script type="text/javascript" language="javascript">
-<!-- Begin Suckerfish hover menu JS
-// function needed for IE. attaches mouseover/out events to give/remove css class .sfhover (fake hover)
-sfHover = function(navlist) {
-var sfEls = document.getElementById("navlist").getElementsByTagName("LI");
-for (var i=0; i <sfEls.length; i++) {
- sfEls[i].onmouseover=function() {
- this.className+=" sfhover";
- }
- sfEls[i].onmouseout=function() {
- this.className=this.className.replace(new RegExp("sfhover\\b"), "");
- }
-} // end for
-} // end function for sfHover
-if (window.attachEvent) window.attachEvent("onload", sfHover);
-// End Suckerfish hover menu JS-->
-</script>
-
<style type="text/css">
<!--
body
@@ -223,11 +205,15 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
padding-left: 0px;
background: <?php echo conf('base_color2'); ?>;
}
+/* These three lines make a menu vertical */
+ #content { float: none; }
+ #sidebar li { float: none; }
+ #sidebar li ul { margin: -1.5em 0 0 9em; }
/**
* Div Definitions
* These define how the page is layed out, be careful with these as changes to them
* can cause drastic layout changes
- */
+
#maincontainer
{
margin: 0px;
@@ -247,80 +233,6 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
{
float: left;
}
- #navcontainer ul li
- {
- float:left;
- width:100%;
- }
-
- .subnavbutton
- {
- background-color: <?php echo conf('row_color1'); ?>;
- text-align:center;
- text-decoration: none;
- color: <?php echo conf('font_color2'); ?>;
- }
-
- #content
- {
- margin-left:0px;
- }
-/**
- * Experimental for menus (Thx Sigger)
- * TO DO: Fill in 1px border around menus & submenu items
- * Make padding appply to the li, not just an a. Moving paddng: to li throws off the dropdown menu alignment.
- */
- #sidebar {
- clear: both;
- height: 100%;
- margin: 0;
- float: left;
- /* width: 110px; /* this controls the width of the sidebar. horizontal menu needs more width */
- padding: 0;
- list-style: none;
- border: 1px solid #000;
- line-height: 1;
- }
- #sidebar ul {
- margin: 0px;
- list-style: none;
- padding: 0px;
- font-family: verdana, arial, Helvetica, sans-serif;
- line-height: 1;
- }
- #sidebar li {
-/* margin: 0 0 1px 0; */
- margin: 0;
- display: block;
- border-bottom: 1px solid white;
- border-left: 1px solid white;
- border-right: 1px solid white;
- padding: 5px 0px 5px 10px;
- width: 10em;
- background-color: <?php echo conf('row_color2'); ?>;
- }
- #sidebar a, .navbutton {
- display: block; /*Not sure why this is neccesary, but it is for IE*/
- text-decoration: none;
- }
- #sidebar li:hover, #sidebar li.sfhover {
- color: <?php echo conf('font_color2'); ?>;
- background-color: <?php echo conf('row_color3'); ?>;
- }
- #sidebar li:active {
- background-color: <?php echo conf('row_color1'); ?>;
- }
- #sidebar li ul {
- float: left;
- position: absolute;
- width: 12em;
- margin: -1.5em 0 0 10em;
-/* -2em 0 0 10em for vertical menu puts the submenu back up and to the right of the hovered menu item by "the right amount"*/
- left: -999em; /* this puts the submenu item way off to the left until it's called back by a hover (below) */
- }
- #sidebar li:hover ul, #sidebar li.sfhover ul {
- left: auto; /* this calls the submenu back when the parent li is hovered. */
- }
/**
* End Div Definitions
* This is the end of the main structure def's