Skip to content

Commit

Permalink
added dropdown menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike committed Sep 6, 2013
1 parent 26c931c commit 09bfa27
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 26 deletions.
4 changes: 3 additions & 1 deletion comments.php
Expand Up @@ -34,7 +34,9 @@
<!-- If comments are open, but there are no comments. -->

<?php else : // comments are closed ?>
<p>Comments are closed.</p>
<?php if(!is_page()): ?>
<p>Comments are closed.</p>
<?php endif; ?>

<?php endif; ?>

Expand Down
5 changes: 2 additions & 3 deletions index.php
Expand Up @@ -24,14 +24,12 @@
<div class="postmetadata">
<?php the_tags('Tags: ', ', ', '<br />'); ?>
Entries: <?php the_category(', ') ?>

</div>

<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
</div>
<?php endwhile; ?>
</div>

<?php wp_link_pages(); ?>


<?php else : ?>
Expand All @@ -45,6 +43,7 @@
</div>
</div>
<div id="pageination-container">

<div class="nav-previous alignleft"><?php next_posts_link( 'Older posts' ); ?></div>
<div class="nav-next alignright"><?php previous_posts_link( 'Newer posts' ); ?></div>
</div>
Expand Down
18 changes: 18 additions & 0 deletions js/main.js
@@ -1,6 +1,7 @@
var slides = new Array();
var slideSelect = new Array();
var currentPage = 1;
var menuChain = new Array();

function SizeElements()
{
Expand Down Expand Up @@ -86,6 +87,22 @@ function pageUpdate()
}

jQuery(document).ready(function () {

jQuery(".menu li").each(function(element){
if(jQuery(this).find(".sub-menu").length > 0)
{
jQuery("#"+this.id + ", #" + this.id + ">.sub-menu").on("mouseenter",{submenu:jQuery("#"+this.id + ">.sub-menu")},function(event){
event.data.submenu.css("display","block");

});

jQuery("#"+this.id + " , #" + this.id + ">.sub-menu").on("mouseleave",{submenu:jQuery("#"+this.id + ">.sub-menu")},function(event){
event.data.submenu.css("display","none");
});
}

});

SizeElements();
SetUpSlide();

Expand All @@ -108,6 +125,7 @@ jQuery(".comment-reply-link").on('click',function(){
});



});

jQuery(window).resize(function () {
Expand Down
7 changes: 1 addition & 6 deletions page.php
Expand Up @@ -13,14 +13,9 @@

<div class="entry">
<?php the_content(); ?>

</div>

<div class="postmetadata">
<?php the_tags('Tags: ', ', ', '<br />'); ?>
Entries: <?php the_category(', ') ?>
</div>


</div>
<?php comments_template(); ?>

Expand Down
3 changes: 1 addition & 2 deletions single.php
Expand Up @@ -22,8 +22,7 @@
<?php the_tags('Tags: ', ', ', '<br />'); ?>
Entries: <?php the_category(', ') ?>
</div>


<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>

</div>

Expand Down
56 changes: 42 additions & 14 deletions style.css
Expand Up @@ -64,12 +64,13 @@ a:hover {
blockquote { }
blockquote p { }

ul, ol { margin: 0 0 10px 0; }
ul, ol { margin: 0 0 10px 10px; }


.entry {
padding-left: 20px;
padding: 20px 0px 20px 20px;
color: #E2E2E2;
overflow: hidden;
}
.entry a { }
.entry a:hover { }
Expand Down Expand Up @@ -189,7 +190,7 @@ padding-bottom: 10px;
ol.commentlist li.comment div.comment-meta ,ol.commentlist li.comment p ,ol.commentlist li.comment div.reply{
display: block;
font-size: 10px;
width:calc(100% - 90px);
width:calc(100% - 130px);
float: right;
}
ol.commentlist li.comment div.comment-meta a {
Expand All @@ -199,7 +200,7 @@ ol.commentlist li.comment div.comment-meta a {
ol.commentlist li.comment .comment-body p {
font-size: 17px;
color: rgb(252, 252, 252);
width:calc(100% - 100px);
width:calc(100% - 140px);
}
ol.commentlist li.comment ul { }
ol.commentlist li.comment div.reply ,ol.commentlist li.comment div.reply a{
Expand Down Expand Up @@ -372,7 +373,7 @@ margin: 10px;
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2b2b2b', endColorstr='#2b2b2b',GradientType=1 ); /* IE6-9 */

box-shadow: 0px 0px 30px #0f0f0f;
padding: 5px 10px;
padding: 0px 10px;
margin: 25px 0px;
}

Expand Down Expand Up @@ -402,28 +403,47 @@ margin: 10px;
}
.menu ul{
margin: 0px;
padding-left: 20px;

}
.sub-menu{
position: absolute;
left: 100%;
top: 0%;
background: #2b2b2b;
width: 100%;
display: none;
}

.menu>li>ul{
left: 0%;
top: 100%;
margin-top: 0px;
}
.menu ul li a{


.menu>li>a{
font-size:14px;
text-decoration: none;
padding: 0px 10px;
text-shadow: 2px 2px 0px #000000;
color: #8e8e8e;
transition: color .2s;
-webkit-transition: color .2s;
}
.menu ul li a:hover{
.menu>li>a:hover{
color: white;
}

.current_page_item a{
color: white !important;
}
.menu ul li{
.menu li{
display: block;
position: relative;
padding: 5px 10px;
}


#header{
padding: 0px 20px;
}
Expand Down Expand Up @@ -678,6 +698,11 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', end

/* WordPress Core-------------------------------------------------------------- */

img.alignnone{
width: 100%;
height: auto;
}

.sticky{

}
Expand Down Expand Up @@ -763,15 +788,16 @@ a img.aligncenter {
line-height: 17px;
margin: 0;
padding: 0 4px 5px;
color: #242323;
}



@media screen and (min-width:600px) {
.menu ul li{
.menu>li{
display: inline-block;
}
.menu ul li a{
.menu>li>a{
font-size: 15px;
}
#title img{
Expand All @@ -788,6 +814,8 @@ a img.aligncenter {
}
#main{
padding: 20px 20px 50px 20px;
-ms-word-wrap: break-word;
word-wrap: break-word;
}

.threeSplit {
Expand Down Expand Up @@ -821,7 +849,7 @@ a img.aligncenter {
}

@media screen and (min-width: 890px) {
.menu ul li a{
.menu>li>a{
font-size: 20px;
}
#contentContainer{
Expand All @@ -836,8 +864,8 @@ a img.aligncenter {
}
}
@media screen and (min-width: 1080px) {
.menu ul li a{
font-size: 29px;
.menu>li>a{
font-size: 25px;
}
#page {
width:1080px;
Expand Down

0 comments on commit 09bfa27

Please sign in to comment.