Permalink
Browse files

a few UI tweaks for the site picker; added tracking for sites; add iO…

…S download link in main view
  • Loading branch information...
1 parent 6eba1f5 commit 53acac9d71e20b673b0f3f38f203459d6c7f75f3 Nirvana Tikku committed Mar 15, 2013
Showing with 18 additions and 4 deletions.
  1. +13 −3 css/website.less
  2. +2 −0 js/main.js
  3. +3 −1 templates/layout.html
View
@@ -107,9 +107,19 @@ h1 small { font-size:24px; letter-spacing:0px; }
.ui-stack-site { padding:2px 6px; .ui-site-icon { width:25px; height:25px; margin-right:8px; } }
img.ui-site-icon { width:50px; height:50px; vertical-align:middle; }
-.ui-sites-toggle { max-height: 330px; overflow-y: scroll; }
-.ui-site-toggle-list {
- &:hover { background:rgba(125,125,125,0.2); }
+.ui-sites-toggle { max-height: 330px; overflow-y: scroll;
+
+}
+.dropdown-menu { background-color:#111;
+ li > a {
+ color:#f0f0f0; cursor:pointer;
+ }
+}
+.ui-site-toggle-list { position:relative; height:100%;
+ .ui-site-selection-label { .transition(all 0.4s ease-in-out); font-size:10px; color:rgba(250,250,250,0.4); position:absolute; width:100%; top:3.5em; text-align:center; }
+ &:hover { background:rgba(125,125,125,0.2);
+ .ui-site-selection-label { opacity:0; }
+ }
}
.navbar-inverse .nav > li > a.ui-current-site { padding: 0px; margin:0px; margin-top: -5px; }
View
@@ -453,6 +453,7 @@ require(["stackComponents","app","moment","bootstrap","underscore"], function(co
});
App.view.sites.render();
App.view.sites.on("pick_site",function(site){
+ trackEvt("Site","Pick_Site",site);
App.router.routeTo("site/"+site.get("api_site_parameter"));
});
}).done(function(){
@@ -511,6 +512,7 @@ require(["stackComponents","app","moment","bootstrap","underscore"], function(co
});
}
this.app.set("site", this.app.sites.where({api_site_parameter:decodeURIComponent(site || StackAPI.DEFAULT_SITE)})[0]);
+ trackEvt("Site", "Route", site || StackAPI.DEFAULT_SITE);
this.tagsRoute(site, true);
},
tagsRoute: function(site, is_fresh_set){
View
@@ -76,9 +76,10 @@
<ul class="nav">
<li class="dropdown ui-site-toggle-list">
<a id="js-current-site" class="dropdown-toggle ui-current-site" data-toggle="dropdown" href="#"></a>
- <ul id="js-sites-toggle" class="dropdown-menu ui-sites-toggle" role="menu" aria-labelledby="dLabel">
+ <ul id="js-sites-toggle" class="dropdown-menu ui-sites-toggle" role="menu" aria-labelledby="Stack Exchange Sites">
</ul>
+ <span class='ui-site-selection-label'>pick a site</span>
</li>
<li>
<a href="#about" role="button" class="" data-toggle="modal">About</a>
@@ -95,6 +96,7 @@
</li>
</ul>
<div class="pull-right ui-user-info-container user-info-container">
+ <a style='margin-right:10px;' href='https://itunes.apple.com/us/app/stack-ed/id612500156'><img src="/img/appstore.png" width='135px' height='40px' style='margin-top:-5px;'></a>
{% if user %}
<div>
<span class="label label-inverse">

0 comments on commit 53acac9

Please sign in to comment.