Browse Source

Update to top menus

pull/1/head
falkTX 10 years ago
parent
commit
e02efd2ed0
5 changed files with 62 additions and 23 deletions
  1. +4
    -4
      css/style.css
  2. BIN
      images/ico_chat.png
  3. BIN
      images/ico_forum.png
  4. BIN
      images/ico_soundcloud.png
  5. +58
    -19
      includes/header.php

+ 4
- 4
css/style.css View File

@@ -432,7 +432,7 @@ fieldset table {
background:none repeat scroll 0 0 transparent; background:none repeat scroll 0 0 transparent;
} }


#div_menuSoftware {
.div_menuDropdown {
position: absolute; position: absolute;
top: 30px; top: 30px;
left: 0px; left: 0px;
@@ -444,7 +444,7 @@ fieldset table {
z-index: 99; z-index: 99;
} }


#div_menuSoftware p {
.div_menuDropdown p {
color: #F0F0F0; color: #F0F0F0;
margin: 0 0 0 0; margin: 0 0 0 0;
padding-top: 4px; padding-top: 4px;
@@ -455,12 +455,12 @@ fieldset table {
border-top: 0px; border-top: 0px;
} }


#div_menuSoftware a {
.div_menuDropdown a {
color: #F0F0F0; color: #F0F0F0;
text-decoration: none; text-decoration: none;
} }


#div_menuSoftware a:hover, #div_menuSoftware a:focus {
.div_menuDropdown a:hover, .div_menuDropdown a:focus {
color: #6464E6; color: #6464E6;
} }




BIN
images/ico_chat.png View File

Before After
Width: 16  |  Height: 16  |  Size: 1.3KB

BIN
images/ico_forum.png View File

Before After
Width: 16  |  Height: 16  |  Size: 474B

BIN
images/ico_soundcloud.png View File

Before After
Width: 16  |  Height: 16  |  Size: 549B

+ 58
- 19
includes/header.php View File

@@ -1,12 +1,14 @@
<?php <?php
$SHOW_NOTE = TRUE; $SHOW_NOTE = TRUE;


/*
if (file_exists("/var/www/kxstudio/paste/")) if (file_exists("/var/www/kxstudio/paste/"))
{ {
$ROOT = "/kxstudio"; $ROOT = "/kxstudio";
$SHOW_NOTE = FALSE; $SHOW_NOTE = FALSE;
} }
else else
*/
{ {
$ROOT = ""; $ROOT = "";
$SHOW_NOTE = FALSE; $SHOW_NOTE = FALSE;
@@ -44,33 +46,54 @@ else
}); });
}); });
<?php } ?> <?php } ?>
function itemSoftwareClicked(event){
function closeAllMenus(){
var objSoftwareMenu = document.getElementById("div_menuSoftware");
var objRepositoriesMenu = document.getElementById("div_menuRepositories");
var objSupportMenu = document.getElementById("div_menuSupport");
var objCommunityMenu = document.getElementById("div_menuCommunity");

if (objSoftwareMenu.style.visibility == "visible")
objSoftwareMenu.style.visibility = "hidden";

if (objRepositoriesMenu.style.visibility == "visible")
objRepositoriesMenu.style.visibility = "hidden";

if (objSupportMenu.style.visibility == "visible")
objSupportMenu.style.visibility = "hidden";

if (objCommunityMenu.style.visibility == "visible")
objCommunityMenu.style.visibility = "hidden";
};

function menuItemClicked(event, menu, itemName){
event.stopPropagation(); event.stopPropagation();


var objSoftwareMenu = document.getElementById("div_menuSoftware");
closeAllMenus();


if (objSoftwareMenu.style.visibility != "visible")
{
var leftPos = document.getElementById("item-soft").getBoundingClientRect().left - 1;
objSoftwareMenu.style.left = "" + leftPos + "px";
objSoftwareMenu.style.visibility = "visible";
}
else
//if (menu.style.visibility != "visible")
{ {
objSoftwareMenu.style.visibility = "hidden";
var leftPos = document.getElementById(itemName).getBoundingClientRect().left - 1;
menu.style.left = "" + leftPos + "px";
menu.style.visibility = "visible";
} }
//else
//{
// menu.style.visibility = "hidden";
//}


return false; return false;
}; };


function bodyClicked(){ function bodyClicked(){
var objSoftwareMenu = document.getElementById("div_menuSoftware");

if (objSoftwareMenu.style.visibility == "visible")
objSoftwareMenu.style.visibility = "hidden";

closeAllMenus();
return true; return true;
}; };

function itemSoftwareClicked(event) { return menuItemClicked(event, document.getElementById("div_menuSoftware"), "item-soft"); };
function itemRepositoriesClicked(event){ return menuItemClicked(event, document.getElementById("div_menuRepositories"), "item-repos"); };
function itemSupportClicked(event) { return menuItemClicked(event, document.getElementById("div_menuSupport"), "item-support"); };
function itemCommunityClicked(event) { return menuItemClicked(event, document.getElementById("div_menuCommunity"), "item-community"); };

</script> </script>
<?php if ($PAGE_TYPE == "DONATIONS") { ?> <?php if ($PAGE_TYPE == "DONATIONS") { ?>
<script type="text/javascript"> <script type="text/javascript">
@@ -123,11 +146,26 @@ else
<body class="mediawiki ltr ns-0 ns-subject skin-bentofluid" style="min-width:1080px" onClick="return bodyClicked();"> <body class="mediawiki ltr ns-0 ns-subject skin-bentofluid" style="min-width:1080px" onClick="return bodyClicked();">
<?php } ?> <?php } ?>
<!-- Software sub menu --> <!-- Software sub menu -->
<div id="div_menuSoftware">
<div id="div_menuSoftware" class="div_menuDropdown">
<p><a href="<?php echo $ROOT; ?>/Applications"><img src="<?php echo $ROOT; ?>/images/ico_cadence.png" alt=""/> &nbsp; Applications</a></p> <p><a href="<?php echo $ROOT; ?>/Applications"><img src="<?php echo $ROOT; ?>/images/ico_cadence.png" alt=""/> &nbsp; Applications</a></p>
<!-- <div></div> -->
<p><a href="<?php echo $ROOT; ?>/Plugins"><img src="<?php echo $ROOT; ?>/images/ico_distrho.png" alt=""/> &nbsp; Plugins</a></p> <p><a href="<?php echo $ROOT; ?>/Plugins"><img src="<?php echo $ROOT; ?>/images/ico_distrho.png" alt=""/> &nbsp; Plugins</a></p>
</div> </div>
<!-- Repositories sub menu -->
<div id="div_menuRepositories" class="div_menuDropdown">
<p><a href="<?php echo $ROOT; ?>/Repositories">About</a></p>
<p><a href="<?php echo $ROOT; ?>/Repositories:Applications">Applications (in Repo)</a></p>
<p><a href="<?php echo $ROOT; ?>/Repositories:Plugins">Plugins (in Repo)</a></p>
</div>
<!-- Support sub menu -->
<div id="div_menuSupport" class="div_menuDropdown">
<p><a href="<?php echo $ROOT; ?>/Documentation">Documentation</a></p>
</div>
<!-- Community sub menu -->
<div id="div_menuCommunity" class="div_menuDropdown">
<p><a href="http://webchat.freenode.net/?channels=#kxstudio,#opensourcemusicians"><img src="<?php echo $ROOT; ?>/images/ico_chat.png" class="external" rel="nofollow" target="_blank" alt=""/> &nbsp; Chat</a></p>
<p><a href="http://linuxmusicians.com/viewforum.php?f=47"><img src="<?php echo $ROOT; ?>/images/ico_forum.png" class="external" rel="nofollow" target="_blank" alt=""/> &nbsp; Forum</a></p>
<p><a href="https://soundcloud.com/groups/kxstudio"><img src="<?php echo $ROOT; ?>/images/ico_soundcloud.png" class="external" rel="nofollow" target="_blank" alt=""/> &nbsp; Songs</a></p>
</div>


<!-- Top link --> <!-- Top link -->
<a name="Top" id="Top"></a> <a name="Top" id="Top"></a>
@@ -142,8 +180,9 @@ else
<ul id="global-navigation"> <ul id="global-navigation">
<li id="item-news"><a href="<?php echo $ROOT; ?>/News">News</a></li> <li id="item-news"><a href="<?php echo $ROOT; ?>/News">News</a></li>
<li id="item-soft"><a href="#" onClick="return itemSoftwareClicked(event);">Software &#9660;</a></li> <li id="item-soft"><a href="#" onClick="return itemSoftwareClicked(event);">Software &#9660;</a></li>
<li id="item-repos"><a href="<?php echo $ROOT; ?>/Repositories">Repositories</a></li>
<li id="item-docs"><a href="<?php echo $ROOT; ?>/Documentation">Documentation</a></li>
<li id="item-repos"><a href="#" onClick="return itemRepositoriesClicked(event);">Repositories &#9660;</a></li>
<li id="item-support"><a href="#" onClick="return itemSupportClicked(event);">Support &#9660;</a></li>
<li id="item-community"><a href="#" onClick="return itemCommunityClicked(event);">Community &#9660;</a></li>
<li id="item-donate"><a href="<?php echo $ROOT; ?>/Donations">Donations</a></li> <li id="item-donate"><a href="<?php echo $ROOT; ?>/Donations">Donations</a></li>
<li id="item-downloads"><a href="<?php echo $ROOT; ?>/Downloads">Downloads</a></li> <li id="item-downloads"><a href="<?php echo $ROOT; ?>/Downloads">Downloads</a></li>
<li id="item-paste"><a href="<?php echo $ROOT; ?>/Paste">Paste</a></li> <li id="item-paste"><a href="<?php echo $ROOT; ?>/Paste">Paste</a></li>


Loading…
Cancel
Save