summaryrefslogtreecommitdiff
path: root/site/public/assets
diff options
context:
space:
mode:
Diffstat (limited to 'site/public/assets')
-rw-r--r--site/public/assets/javascripts/_env.js51
-rw-r--r--site/public/assets/style.css21
2 files changed, 50 insertions, 22 deletions
diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js
index b6b5785..f940389 100644
--- a/site/public/assets/javascripts/_env.js
+++ b/site/public/assets/javascripts/_env.js
@@ -184,19 +184,21 @@ environment.ready = function(){
toggle_menu()
}
})
- $(document).on("mouseenter", ".project", function(){
- var type = $(this).data("type")
- $(".entry").addClass("hover")
- $(this).addClass("hover")
- $(".top .cat").not("[data-type=" + type + "]").addClass("no-hover")
- $(".cat[data-type=" + type + "]").addClass("hover")
- })
- $(document).on("mouseleave", ".project", function(){
- var type = $(this).data("type")
- $(".entry").removeClass("hover")
- $(this).removeClass("hover")
- $(".cat").removeClass("hover").removeClass("no-hover")
- })
+ if (is_desktop) {
+ $(document).on("mouseenter", ".project", function(){
+ var type = $(this).data("type")
+ $(".entry").addClass("hover")
+ $(this).addClass("hover")
+ $(".top .cat").not("[data-type=" + type + "]").addClass("no-hover")
+ $(".cat[data-type=" + type + "]").addClass("hover")
+ })
+ $(document).on("mouseleave", ".project", function(){
+ var type = $(this).data("type")
+ $(".entry").removeClass("hover")
+ $(this).removeClass("hover")
+ $(".cat").removeClass("hover").removeClass("no-hover")
+ })
+ }
}
@@ -305,15 +307,17 @@ function load_index (e){
e && e.preventDefault()
// if (done_loading && window.location.hash == "#/index") return
// window.location.hash = "#/index"
- console.log("load index")
+ // console.log("load index")
$("nav a.active").removeClass("active")
- open_entry()
+ open_entry(true)
+
+ window.location.hash = "#"
$("#entry_container").removeClass("visible")
var $loader = $("<div>")
$loader.load("all .entry", function(){
- console.log("index did load")
+ $("body").addClass("menuActive")
display_entry($loader.children()[0])
})
}
@@ -328,8 +332,8 @@ function load_hash (hash) {
$menu.parent().prev(".cat").addClass('active')
$menu.trigger("click")
}
-function open_entry () {
- if (is_mobile) {
+function open_entry (entryIsAll) {
+ if (is_mobile && ! entryIsAll) {
$("body").removeClass("menuActive")
}
if (! entry_open) {
@@ -344,10 +348,17 @@ function open_entry () {
}
function display_entry ($el) {
var now = +new Date
+ console.log("Has all", $el, $($el).hasClass("all"))
+ if (is_mobile) {
+ $("body").toggleClass("menuActive", $($el).hasClass("all"))
+ $($el).find(".brady").remove()
+ }
setTimeout(function(){
$("#entry_container").empty().append($el)
$("#entry_container").removeClass("fade")
- build_gallery()
+ setTimeout(function(){
+ build_gallery()
+ })
if (is_mobile) {
$(".video").each(function(){
load_video( $(this) )
@@ -470,12 +481,14 @@ function build_gallery () {
})
gallery.on("cellSelect", function(){
+ if (! gallery.selectedElement) return
$caption.html( $(gallery.selectedElement).data("caption") )
videos.forEach(function(player){
player.api('pause')
})
})
gallery.on("settle", function(){
+ if (! gallery || ! gallery.selectedElement) { return }
$caption.html( $(gallery.selectedElement).data("caption") )
})
gallery.on("staticClick", function(e){
diff --git a/site/public/assets/style.css b/site/public/assets/style.css
index 5cd0b15..a11d905 100644
--- a/site/public/assets/style.css
+++ b/site/public/assets/style.css
@@ -491,7 +491,7 @@ nav .sub.active a {
background: #888;
cursor:pointer;
}
-.galnav span:hover {
+.desktop .galnav span:hover {
background:black;
}
.singleton .galnav { display: none }
@@ -829,7 +829,7 @@ nav .sub.active a {
position: relative;
display: inline-block;
}
-.brady a:hover:after {
+.desktop .brady a:hover:after {
content: 'SAY HELLO!';
position: absolute;
top: 40%;
@@ -1019,7 +1019,7 @@ nav .sub.active a {
height: 55vw;
}
.menuActive #entry_container {
- left:160px;
+ left:120px;
}
#scene {
-webkit-transition: left 0.2s;
@@ -1031,6 +1031,21 @@ nav .sub.active a {
body {
font-size: 18px;
}
+ nav {
+ font-size: 0.6em;
+ width: 120px;
+ }
+ .menuActive #entry_container .entry.all {
+ width:65%;
+ }
+ .menuActive .project {
+ height: 36vw;
+ text-transform: uppercase;
+ font-size:0.6em;
+ }
+ .menuActive .project span {
+ top: -18px;
+ }
}
.mobile .cell iframe {
width: 100%;