1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-06 03:49:56 +02:00

changed to div layout and fixed up burgundy... still needs a lot of css work

This commit is contained in:
Karl 'vollmerk' Vollmer 2005-12-22 06:58:26 +00:00
parent dbf698e92a
commit 9758b4e300
11 changed files with 234 additions and 131 deletions

View file

@ -4,7 +4,9 @@
-------------------------------------------------------------------------- --------------------------------------------------------------------------
v.3.3.2-Alpha4 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 - Fixed a problem where downsampled songs wouldn't get recorded
in stats due to their diminished size in stats due to their diminished size
- Fixed column typo on Admin User page - Fixed column typo on Admin User page

View file

@ -79,6 +79,7 @@ function set_theme_colors($theme_name,$user_id) {
This could be dangerous but eah! This could be dangerous but eah!
*/ */
$theme = get_theme($theme_name); $theme = get_theme($theme_name);
$GLOBALS['theme'] = $theme;
if (!count($theme['color'])) { return false; } if (!count($theme['color'])) { return false; }
foreach ($theme['color'] as $key=>$color) { foreach ($theme['color'] as $key=>$color) {

View file

@ -289,6 +289,7 @@ flip_class(array('odd','even'));
/* Setup the Error Class */ /* Setup the Error Class */
$error = new Error(); $error = new Error();
$theme = get_theme(conf('theme_name'));
if (! preg_match('/update\.php/', $_SERVER['PHP_SELF'])) { if (! preg_match('/update\.php/', $_SERVER['PHP_SELF'])) {
$update = new Update(); $update = new Update();

View file

@ -1,5 +1,3 @@
</td> </div>
</tr>
</table>
</body> </body>
</html> </html>

View file

@ -35,17 +35,15 @@ $location = get_location();
<body> <body>
<script src="<?php echo conf('web_path'); ?>/lib/general.js" language="javascript" type="text/javascript"></script> <script src="<?php echo conf('web_path'); ?>/lib/general.js" language="javascript" type="text/javascript"></script>
<div id="maincontainer">
<table border="0" cellpadding="0" cellspacing="0" style="margin:0px;" width="100%" >
<!-- This is the topbar row --> <!-- This is the topbar row -->
<tr id="pageheader"> <div id="topbar">
<td colspan="2"> <div id="topbarleft">
<div style="float:left;margin-top:3px;">
<a href="http://www.ampache.org"> <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" /> <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> </a>
</div> </div>
<div style="float:right;"> <div id="topbarright">
<a href="http://www.ampache.org/index.php">Ampache v.<?php echo conf('version'); ?></a><br /> <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> <b><?php echo _("You are currently logged in as") . " " . $GLOBALS['user']->username; ?></b>
<br /> <br />
@ -58,14 +56,12 @@ $location = get_location();
</select> </select>
<input type="submit" value="<?php echo _("Go!"); ?>" class="button" /> <input type="submit" value="<?php echo _("Go!"); ?>" class="button" />
</form> </form>
</div> </div>
</td> </div>
</tr>
<!-- This is the row for body + sidebar --> <!-- This is the row for body + sidebar -->
<tr> <div id="sidebar">
<!-- This is the sidebar --> <!-- This is the sidebar -->
<td valign="top" class="sidebar">
<?php require_once(conf('prefix') . '/templates/sidebar.inc.php'); ?> <?php require_once(conf('prefix') . '/templates/sidebar.inc.php'); ?>
</td> </div>
<td width="100%" valign="top" style="padding-top:10px;padding-left:10px;"> <div id="content" width="100%" valign="top" style="padding-top:10px;padding-left:10px;">
<!-- Start Main Page --> <!-- Start Main Page -->

View file

@ -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" /> <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'); ?> <?php $GLOBALS['error']->print_error('keyword'); ?>
</td> </td>
<td>&nbsp;</td> <td colspan="2">&nbsp;</td>
</tr> </tr>
<tr class="<?php echo flip_class(); ?>"> <tr class="<?php echo flip_class(); ?>">
<td><?php echo _("Title"); ?></td> <td><?php echo _("Title"); ?></td>

View file

@ -27,7 +27,7 @@ $uploads = get_uploads();
if (count($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"> <tr class="table-header">
<td><?php echo _('Action'); ?></td> <td><?php echo _('Action'); ?></td>
<td><?php echo _('Status'); ?></td> <td><?php echo _('Status'); ?></td>

View file

@ -46,16 +46,33 @@ $browse_items[] = array('title'=>'Genre','url'=>'browse.php?action=genre','activ
<?php if ($GLOBALS['user']->has_access(100)) { ?> <?php if ($GLOBALS['user']->has_access(100)) { ?>
<li> <li>
<a href="<?php echo conf('web_path'); ?>/admin/index.php"><?php echo _("Admin"); ?></a> <a href="<?php echo conf('web_path'); ?>/admin/index.php"><?php echo _("Admin"); ?></a>
</li> <?php
<?php if ($location['section'] == 'admin') { show_submenu($admin_items); } ?> 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> <li>
<a href="<?php echo conf('web_path'); ?>/preferences.php"><?php echo _("Preferences"); ?></a> <a href="<?php echo conf('web_path'); ?>/preferences.php"><?php echo _("Preferences"); ?></a>
</li> </li>
<li> <li>
<a href="<?php echo conf('web_path'); ?>/browse.php"><?php echo _("Browse"); ?></a> <a href="<?php echo conf('web_path'); ?>/browse.php"><?php echo _("Browse"); ?></a>
</li> <?php
<?php if ($location['section'] == 'browse') { show_submenu($browse_items); } ?> 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']) { ?> <?php if ($GLOBALS['user']->prefs['upload']) { ?>
<li> <li>
<a href="<?php echo conf('web_path'); ?>/upload.php"><?php echo _("Upload"); ?></a> <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> <a href="<?php echo conf('web_path'); ?>/search.php"><?php echo _("Search"); ?></a>
</li> </li>
</ul> </ul>
<?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?>
<ul class="subnavside"> <ul class="subnavside">
<li class="subnavbutton"> <li class="subnavbutton">
<form name="sub_search" method="post" action="<?php echo conf('web_path'); ?>/search.php" enctype="multipart/form-data" style="Display:inline"> <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> </form>
</li> </li>
</ul> </ul>
<?php } ?>
<ul> <ul>
<li> <li>
<a href="<?php echo conf('web_path'); ?>/randomplay.php"><?php echo _("Random Play"); ?></a> <a href="<?php echo conf('web_path'); ?>/randomplay.php"><?php echo _("Random Play"); ?></a>
</li> </li>
</ul> </ul>
<?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?>
<ul class="subnavside"> <ul class="subnavside">
<li class="subnavbutton"> <li class="subnavbutton">
<form name="random" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ?>/song.php" style="Display:inline"> <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> </form>
</li> </li>
</ul> </ul>
<?php } ?>
<?php if (conf('use_auth')) { ?> <?php if (conf('use_auth')) { ?>
<ul><li><a href="<?php echo conf('web_path'); ?>/logout.php">Logout</a></li></ul> <ul><li><a href="<?php echo conf('web_path'); ?>/logout.php">Logout</a></li></ul>
<?php } ?> <?php } ?>

View file

@ -95,7 +95,6 @@
font-weight: bold; font-weight: bold;
background-color: <?php echo conf('base_color2') ?>; background-color: <?php echo conf('base_color2') ?>;
margin: 2px 2px 2px 2px; margin: 2px 2px 2px 2px;
cursor: pointer;
} }
select { select {
color: <?php echo conf('font_color2'); ?>; color: <?php echo conf('font_color2'); ?>;
@ -261,6 +260,7 @@
padding-left:1px; padding-left:1px;
padding-right:1px; padding-right:1px;
font-size: <?php echo conf('font_size') - 1; ?>px; font-size: <?php echo conf('font_size') - 1; ?>px;
cursor: pointer;
} }
.sidebar .sidebar
{ {
@ -273,42 +273,74 @@
width:160px; width:160px;
background: <?php echo conf('base_color2'); ?>; 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-left: 0px;
margin-top:0px;
float: left;
width: 170px;
} }
#navcontainer ul #sidebar ul
{ {
margin: 0; margin-left:0px;
padding: 0; margin-top:0px;
margin-bottom:0px;
margin-right: 10px;
padding: 0px;
list-style-type: none; list-style-type: none;
font-family: verdana, arial, Helvetica, sans-serif; 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; display: block;
padding: 5px 10px; padding: 5px 10px;
width: 140px;
color: #000; color: #000;
background-color: #666; background-color: #666;
text-decoration: none; text-decoration: none;
} }
#navcontainer a:hover #sidebar a:hover
{ {
color: #000; color: #000;
background-color: #ccc; background-color: #ccc;
text-decoration: none; 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; display: block;
padding: 5px 5px 5px 30px; padding: 5px 5px 5px 30px;
@ -318,11 +350,20 @@
text-decoration: none; text-decoration: none;
} }
#navcontainer ul ul a:hover #sidebar ul ul a:hover
{ {
color: #000; color: #000;
background-color: #ddd; background-color: #ddd;
text-decoration: none; text-decoration: none;
} }
#content
{
float: left;
margin-left:0px;
}
/**
* End Div Definitions
* This is the end of the main structure def's
*/
--> -->
</style> </style>

View file

@ -30,6 +30,10 @@
<!-- <!--
body body
{ {
padding-top: 0px;
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
background: <?php echo conf('bg_color1'); ?>; background: <?php echo conf('bg_color1'); ?>;
font-family: <?php echo conf('font') ?>; font-family: <?php echo conf('font') ?>;
font-size: <?php echo conf('font_size'); ?>px; font-size: <?php echo conf('font_size'); ?>px;
@ -90,110 +94,27 @@
font-size: <?php echo conf('font_size'); ?>px; font-size: <?php echo conf('font_size'); ?>px;
font-weight: bold; font-weight: bold;
background-color: <?php echo conf('base_color2') ?>; 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; margin: 2px 2px 2px 2px;
cursor: pointer;
} }
select { select {
color: <?php echo conf('font_color2'); ?>; color: <?php echo conf('font_color2'); ?>;
font-family: <?php echo conf('font')?>; font-family: <?php echo conf('font')?>;
font-size: <?php echo conf('font_size'); ?>px; font-size: <?php echo conf('font_size'); ?>px;
background-color: <?php echo conf('base_color2') ?>; background-color: <?php echo conf('base_color2'); ?>;
} }
textarea textarea
{ {
background-color: <?php echo conf('base_color2'); ?>;
color: <?php echo conf('font_color2') ?>; color: <?php echo conf('font_color2') ?>;
font-family: <?php echo conf('font')?>; font-family: <?php echo conf('font')?>;
font-size: <?php echo conf('font_size'); ?>px; font-size: <?php echo conf('font_size'); ?>px;
} }
.table-header .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; 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; 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 .header1
{ {
color: <?php echo conf('font_color2'); ?>; color: <?php echo conf('font_color2'); ?>;
@ -207,12 +128,6 @@ eat-x;
font-family: <?php echo conf('font'); ?>; font-family: <?php echo conf('font'); ?>;
font-size: <?php echo conf('font_size') + 2; ?>px; font-size: <?php echo conf('font_size') + 2; ?>px;
font-weight: 900; 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 .headrow
{ {
@ -267,5 +182,131 @@ eat-x;
font-size: <?php echo conf('font_size'); ?>px; font-size: <?php echo conf('font_size'); ?>px;
font-weight: normal; 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> </style>

View file

@ -25,6 +25,8 @@ author = "S1amson"
# DEFAULT: N/A # DEFAULT: N/A
#maintainer = "Ben Shields <foo@ampache.org>" #maintainer = "Ben Shields <foo@ampache.org>"
orientation = "horizontal"
# Theme Colors # Theme Colors
################### ###################
[color] [color]