[gnome-devel-docs/gnome3-hig] expand the menu if a page is current within it.
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-devel-docs/gnome3-hig] expand the menu if a page is current within it.
- Date: Thu, 19 Jan 2012 20:31:03 +0000 (UTC)
commit 5e6853065de53292f037d318b6f4d234812bd6be
Author: Jakub Steiner <jimmac gmail com>
Date: Thu Jan 19 21:30:45 2012 +0100
expand the menu if a page is current within it.
hig3/site/javascripts/hig.js | 3 ++-
hig3/src/pages/basics-appmenu.haml | 1 +
hig3/src/stylesheets/hig.scss | 12 +++++++++++-
3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/hig3/site/javascripts/hig.js b/hig3/site/javascripts/hig.js
index 6ab8bd9..5cf481a 100644
--- a/hig3/site/javascripts/hig.js
+++ b/hig3/site/javascripts/hig.js
@@ -33,7 +33,8 @@ $(document).ready(function () {
var $items = $(".sidebar .collapsed>li>a");
$items.expander();
- $(window).resize(positionFooter).resize();
+ //expand menu if the page is active
+ $items.siblings("ul").find('li.current').parents('li').find('a').click();
//preventFOUT();
});
diff --git a/hig3/src/pages/basics-appmenu.haml b/hig3/src/pages/basics-appmenu.haml
new file mode 100644
index 0000000..633c906
--- /dev/null
+++ b/hig3/src/pages/basics-appmenu.haml
@@ -0,0 +1 @@
+%h1 Application Menu
diff --git a/hig3/src/stylesheets/hig.scss b/hig3/src/stylesheets/hig.scss
index 9cc1e00..89f4180 100644
--- a/hig3/src/stylesheets/hig.scss
+++ b/hig3/src/stylesheets/hig.scss
@@ -134,7 +134,8 @@ h1 { font-size: 200%; }
}
&>a {
display: block;
- color: black;
+ color: #666;
+ font-weight: bold;
padding-left: 24px;
cursor: pointer;
&:hover {
@@ -153,6 +154,15 @@ h1 { font-size: 200%; }
padding-left: 24px;
color: $c-link;
}
+ &.current {
+ a {
+ cursor: default;
+ color: black;
+ &:hover {
+ text-decoration: none;
+ }
+ }
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]