From 15367a8b54673ce35fcfc1f330a9c25052998e07 Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Fri, 19 Oct 2012 12:01:18 -0400 Subject: [PATCH 1/9] syntax error --- static/css/supporter_layout.css | 2 +- static/less/supporter_layout.less | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/static/css/supporter_layout.css b/static/css/supporter_layout.css index 1c32475d..e12f0fb1 100644 --- a/static/css/supporter_layout.css +++ b/static/css/supporter_layout.css @@ -203,7 +203,7 @@ img.user-avatar { } .user-badges img { vertical-align: text-bottom; - border: 1px solid #D4D4D4; + border: 1px solid #d4d4d4; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; diff --git a/static/less/supporter_layout.less b/static/less/supporter_layout.less index 1c2132a3..bb8b59d7 100644 --- a/static/less/supporter_layout.less +++ b/static/less/supporter_layout.less @@ -131,7 +131,6 @@ img.user-avatar { vertical-align:text-bottom; border:1px solid #d4d4d4; .one-border-radius(5px); - } } } From 11aac359e6d67ffab40c96c08f54f37d242d108f Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Fri, 19 Oct 2012 12:01:28 -0400 Subject: [PATCH 2/9] adding drop-down menu --- frontend/templates/base.html | 117 +++++++++++++++++++++-------------- static/css/sitewide.css | 42 +++++++++++-- static/less/sitewide.less | 46 ++++++++++++-- 3 files changed, 150 insertions(+), 55 deletions(-) diff --git a/frontend/templates/base.html b/frontend/templates/base.html index 8c286c43..ef96eecc 100644 --- a/frontend/templates/base.html +++ b/frontend/templates/base.html @@ -37,6 +37,15 @@ }); {% endif %} + {% block extra_head %} {% endblock %} @@ -72,30 +81,45 @@ {% endif %} -
- -
+ {% if user.is_authenticated %} +
+ +
+ {% else %} +
+ +
+ {% endif %} @@ -118,43 +142,44 @@
About Unglue.it
Your account
Contact
diff --git a/static/css/sitewide.css b/static/css/sitewide.css index 05b2aa32..2d01ebce 100644 --- a/static/css/sitewide.css +++ b/static/css/sitewide.css @@ -610,11 +610,38 @@ ul.menu { } .js-topmenu { float: right; - padding-top: 25px; + margin-top: 25px; +} +.js-topmenu#authenticated:hover, +.js-topmenu#authenticated.highlight { + background: #d6dde0; + cursor: pointer; + position: relative; +} +.js-topmenu ul#user_menu { + display: none; + z-index: 100; + position: absolute; + top: 36px; + left: 0; + padding: 0; + overflow: visible; +} +.js-topmenu ul#user_menu li { + border-top: 1px solid white; + list-style-type: none; + float: none; + background: #d6dde0; + padding: 0 10px; +} +.js-topmenu ul#user_menu li:hover { + background: #8dc63f; +} +.js-topmenu ul#user_menu li:hover a { + color: white; } .js-topmenu ul li { float: left; - padding: 0 10px; position: relative; z-index: 50; } @@ -651,8 +678,12 @@ ul.menu { font-weight: bold; font-size: 13px; letter-spacing: -0.05em; - overflow: auto; - max-width: 240px; + padding: 0 10px; + margin-right: 5px; +} +.js-topmenu ul li img { + padding: 0; + margin: 0; } .js-topmenu ul li #unseen_count div { border: solid 2px; @@ -679,6 +710,9 @@ ul.menu { background-color: #d6dde0; color: #edf3f4; } +.js-topmenu ul li.last { + padding-left: 20px; +} .js-topmenu ul li.last a { background: url("/static/images/bg.png") right top no-repeat; } diff --git a/static/less/sitewide.less b/static/less/sitewide.less index c03259f0..6e96032b 100644 --- a/static/less/sitewide.less +++ b/static/less/sitewide.less @@ -265,12 +265,42 @@ ul.menu{ .js-topmenu { float:right; - padding-top:25px; + margin-top:25px; + + &#authenticated:hover, &#authenticated.highlight { + background: @blue-grey; + cursor: pointer; + position: relative; + } ul { + &#user_menu { + display: none; + z-index: 100; + position: absolute; + top: 36px; + left: 0; + padding: 0; + overflow: visible; + + li { + border-top: 1px solid white; + list-style-type: none; + float: none; + background: @blue-grey; + padding: 0 10px; + + &:hover { + background: @call-to-action; + a { + color: white; + } + } + } + } + li { float:left; - padding:0 10px; position: relative; z-index: 50; @@ -282,9 +312,13 @@ ul.menu{ span#welcome { color:@green; .header-text; - overflow:auto; - //emergency backstop to prevent usernames too long for truncate filter to force header into content area - max-width: 240px; + padding: 0 10px; + margin-right: 5px; + } + + img { + padding: 0; + margin: 0; } #unseen_count { @@ -314,6 +348,8 @@ ul.menu{ } &.last { + padding-left: 20px; + a { background: url(@background-header) right top no-repeat; From 1bf4743667d77703f84a91251e09e08e7975f119 Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Fri, 19 Oct 2012 12:19:56 -0400 Subject: [PATCH 3/9] making notifications prettier --- frontend/templates/base.html | 15 ++++++---- static/css/sitewide.css | 55 +++++++++++++++++++---------------- static/less/sitewide.less | 56 +++++++++++++++++++----------------- 3 files changed, 69 insertions(+), 57 deletions(-) diff --git a/frontend/templates/base.html b/frontend/templates/base.html index ef96eecc..bc6f7830 100644 --- a/frontend/templates/base.html +++ b/frontend/templates/base.html @@ -89,17 +89,20 @@
  • {% comment %} - {% if unseen_count %} -
    {{ unseen_count }}
    - {% else %} -
    0
    - {% endif %} {% endcomment %} {% if supporter.profile.pic_url %} Picture of {{ supporter }} diff --git a/static/css/sitewide.css b/static/css/sitewide.css index 2d01ebce..14f93fb4 100644 --- a/static/css/sitewide.css +++ b/static/css/sitewide.css @@ -640,6 +640,11 @@ ul.menu { .js-topmenu ul#user_menu li:hover a { color: white; } +.js-topmenu ul#user_menu li:hover #i_haz_notifications { + border-color: white; + background-color: white; + color: #3d4e53; +} .js-topmenu ul li { float: left; position: relative; @@ -685,31 +690,6 @@ ul.menu { padding: 0; margin: 0; } -.js-topmenu ul li #unseen_count div { - border: solid 2px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; - padding: 3px; - line-height: 16px; - width: 16px; - cursor: pointer; - text-align: center; - margin-left: -10px; -} -.js-topmenu ul li #unseen_count div#i_haz_notifications { - background-color: #8dc63f; - color: white; - border-color: #8dc63f; -} -.js-topmenu ul li #unseen_count div#no_notifications_for_you { - border-color: #d6dde0; - background-color: #d6dde0; - color: #edf3f4; -} .js-topmenu ul li.last { padding-left: 20px; } @@ -729,6 +709,31 @@ ul.menu { padding: 0 5px 0 15px; color: white; } +.js-topmenu ul .unseen_count { + border: solid 2px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + padding: 3px; + line-height: 16px; + width: 16px; + cursor: pointer; + text-align: center; + margin-left: 10px; +} +.js-topmenu ul .unseen_count#i_haz_notifications { + background-color: #8dc63f; + color: white; + border-color: #8dc63f; +} +.js-topmenu ul .unseen_count#no_notifications_for_you { + border-color: #edf3f4; + background-color: #edf3f4; + color: #3d4e53; +} .js-search { float: left; padding-top: 25px; diff --git a/static/less/sitewide.less b/static/less/sitewide.less index 6e96032b..e03b4ea8 100644 --- a/static/less/sitewide.less +++ b/static/less/sitewide.less @@ -295,6 +295,13 @@ ul.menu{ a { color: white; } + + #i_haz_notifications { + border-color: white; + background-color: white; + color: @text-blue; + } + } } } @@ -321,32 +328,6 @@ ul.menu{ margin: 0; } - #unseen_count { - - div { - border: solid 2px; - .one-border-radius(5px); - padding: 3px; - line-height: 16px; - width: 16px; - cursor: pointer; - text-align: center; - margin-left: -10px; - - &#i_haz_notifications { - background-color: @call-to-action; - color: white; - border-color: @call-to-action; - } - - &#no_notifications_for_you { - border-color: @blue-grey; - background-color: @blue-grey; - color: @pale-blue; - } - } - } - &.last { padding-left: 20px; @@ -365,6 +346,29 @@ ul.menu{ } } } + + .unseen_count { + border: solid 2px; + .one-border-radius(5px); + padding: 3px; + line-height: 16px; + width: 16px; + cursor: pointer; + text-align: center; + margin-left: 10px; + + &#i_haz_notifications { + background-color: @call-to-action; + color: white; + border-color: @call-to-action; + } + + &#no_notifications_for_you { + border-color: @pale-blue; + background-color: @pale-blue; + color: @text-blue; + } + } } } From 09d5b00e50e1e5bb91a53d97507e07a9cea52348 Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Fri, 19 Oct 2012 12:26:11 -0400 Subject: [PATCH 4/9] highlight editing area if #edit is in url --- frontend/templates/supporter.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/templates/supporter.html b/frontend/templates/supporter.html index d89b2c06..d50db393 100644 --- a/frontend/templates/supporter.html +++ b/frontend/templates/supporter.html @@ -21,7 +21,13 @@ From 104992612b4af1eb82fa1d63ee3cb7e5fb8924d0 Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Fri, 19 Oct 2012 15:01:06 -0400 Subject: [PATCH 6/9] first pass at making things visually distinct if there are notifications --- frontend/templates/base.html | 4 +--- static/css/sitewide.css | 12 ++++++++++++ static/images/menu_bar_down_arrow.png | Bin 0 -> 427 bytes static/images/menu_bar_up_arrow.png | Bin 0 -> 432 bytes static/less/sitewide.less | 13 +++++++++++-- 5 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 static/images/menu_bar_down_arrow.png create mode 100644 static/images/menu_bar_up_arrow.png diff --git a/frontend/templates/base.html b/frontend/templates/base.html index 2ff10a74..739da2da 100644 --- a/frontend/templates/base.html +++ b/frontend/templates/base.html @@ -85,7 +85,7 @@