Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better menus #789

Merged
merged 2 commits into from
Jan 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion css/cssmenu.css.dd
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Ddoc
}
/* Sub menu */
#cssmenu ul ul {
display: none;
/*display: none;*/
background: $(submenu_bg);
border-right: 1px solid $(submenu_border);
border-left: 1px solid $(submenu_border);
Expand All @@ -126,6 +126,9 @@ Ddoc
background: -webkit-linear-gradient($(submenu_bg_li) 0%, $(submenu_bg_li2) 100%);
background: linear-gradient($(submenu_bg_li) 0%, $(submenu_bg_li2) 100%);
}
#cssmenu ul ul > li.active {
background: $(submenu_bg_li_active);
}
#cssmenu ul ul li:last-child {
border-bottom: none;
}
Expand All @@ -142,6 +145,12 @@ Ddoc
left: 10px;
color: $(submenu_highlight);
}
#cssmenu ul ul li.active a:after {
content: "►";
position: absolute;
right: 10px;
color: $(submenu_highlight);
}
#cssmenu ul ul a:hover {
color: $(submenu_highlight);
}
Expand Down Expand Up @@ -179,5 +188,6 @@ submenu_a=#676767
submenu_bg=#fff
submenu_bg_li=#f7f7f7
submenu_bg_li2=#ececec
submenu_bg_li_active=#d7b7b7
submenu_border=#a2a194
_=
10 changes: 10 additions & 0 deletions js/cssmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ $( document ).ready(function() {
var menu_ul = $('#cssmenu > ul > li > ul');
menu_ul.hide();

$('#cssmenu > ul > li > ul > li > a').each(function(){
if ($(this)[0].href == window.location.href) {
var p = $(this).parent();
p.addClass('active');
p = p.parent();
p.addClass('active');
p.show();
}
});

$('#cssmenu > ul > li > a').click(function() {
$('#cssmenu li').removeClass('active');
$(this).closest('li').addClass('active');
Expand Down
1 change: 1 addition & 0 deletions latex.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ _=*****************************************************************************
_=Macros for LaTeX generation. The following section is ordered alphabeticaly.
_=*****************************************************************************

A=\ref{$1}{$+}
AMP=\&
ASMCODE=\lstinline{$0}
_=
Expand Down
4 changes: 2 additions & 2 deletions std_navbar-2.066.1.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ $(DIVID cssmenu, $(UL
$(LIBITEM std, zlib)
)
$(MENU_W_SUBMENU $(T tt, etc))
$(ITEMIZE
$(ITEMIZE
$(LIBITEM etc, c, curl),
$(LIBITEM etc, c, sqlite),
$(LIBITEM etc, c, sqlite3),
$(LIBITEM etc, c, zlib)
)
$(MENU_W_SUBMENU $(T TT, core))
Expand Down
4 changes: 2 additions & 2 deletions std_navbar-prerelease.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ $(DIVID cssmenu, $(UL
$(LIBITEM std, zlib)
)
$(MENU_W_SUBMENU $(T tt, etc))
$(ITEMIZE
$(ITEMIZE
$(LIBITEM etc, c, curl),
$(LIBITEM etc, c, sqlite),
$(LIBITEM etc, c, sqlite3),
$(LIBITEM etc, c, zlib)
)
$(MENU_W_SUBMENU $(T TT, core))
Expand Down