From 7303212dd2c1f62114f585ce3d8c52fdbd739c17 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 26 Jun 2016 15:20:20 -0400 Subject: [PATCH] Add back/forward buttons on mobile Closes #221. --- assets/images/icons.png | Bin 2752 -> 2752 bytes assets/images/icons@2x.png | Bin 6232 -> 6319 bytes assets/javascripts/lib/page.coffee | 12 ++++++ assets/javascripts/views/layout/mobile.coffee | 26 +++++++++++- assets/stylesheets/components/_mobile.scss | 37 ++++++++++++++---- assets/stylesheets/global/_classes.scss | 7 ++++ assets/stylesheets/global/_icons.scss | 5 ++- public/icons/ui/back/16.png | Bin 0 -> 157 bytes public/icons/ui/back/16@2x.png | Bin 0 -> 267 bytes views/app.erb | 6 ++- 10 files changed, 80 insertions(+), 13 deletions(-) create mode 100644 public/icons/ui/back/16.png create mode 100644 public/icons/ui/back/16@2x.png diff --git a/assets/images/icons.png b/assets/images/icons.png index 9df31e1c3443c18ed641f2803da335c2c45c263d..dcd73c9f2366390af08267593f6b38b0ee57973a 100644 GIT binary patch delta 2738 zcmV;j3QhIE6~GmcDu3GToNsJYRT{?cu%M)*3ba!CVTmM!{mL#09~9XxO-iAlZGo7y zmJV%pDn=8H*-cE?>|m)ah~g@0BGefD(qPgAV@e3LWwjs)Ls})V0-D&AW-zsGBO5?y z=k9aXXOhF|J#+5qoj)LblV9$+_uMmcpZC1yJ@2KX&Wxqk7Jq?v!2q}l&Vv15!Mz~9 z6pR8F41rz{=lKX&1F~Tu&;+_boOJP8$TavIcoQtNoq3A?32avS!r*82FV3*|V$cIz z4c)v)Yc3fB&w<&%kG;cjm74y|?C${f*4+1!6YX1Knt4h5H{iOY=NB+2IU%HVfWp^c z9WdDdxMaBJEPtaQwe326#%Vrv-r0R-wG)jMI?bQI=)8RTBCf}s=x3`Oy){YV3qTp2 za06@r3nV8rnH-?*;R1VAng!vO(E#K+&ADvyB=^_J}VZYA>IY#i;o<=9hGK# zBd?W76S$FmF6gpy0J#ZTG~;4Se5vdh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zXYcvX-+!_guXHf*bg)n^SbifjT^ zkx^t*)vgN|#X3+G8O6Fv8<1;GL#sJ+LdiKTuz#xO1R4OH7<0N2#3@Hk;DT0aPB#h$ z=sAG~xBx;G_yhKPHV%9QOW=|$@ikW|15(lkEVWqyCn&DX`XRnY zJsW1WfTc~4RKx%Q!vI0Xkq?SL&fH=86&wX7xC$5$DZ>EaN3G9(42tgp<22z5mk diff --git a/assets/images/icons@2x.png b/assets/images/icons@2x.png index e66a685d58ccedcc3952bf8c15d1e40711347314..ceef01d7528e2ad69880653d888966d978693eb3 100644 GIT binary patch literal 6319 zcmZvhc{tQx`1e1vkA3VCW=N>)`x3?)eZ?SaWMtn(D*G&!cG@f<6WNlI5M`OMFQX6< zVX|k*Sh8gM`F?-T^<2*%&mU*G&$-U~+}CxM*L|IH8)tcrgH@On000hiGh>^hl5mu$ zNcd4s_YNom0HN#V#s(K}jx1%f1@ha8wOL)7Un?GE7PtD`T?;+wKL|C%8o(~mC16GZ z+=1MrU_Q08#u~?MWbzkW97CLTgY#&s7KG)u8Sa}{kOLuXkV2NPYzK?J^D3JnJC9yH0%VE<5Pl4j* zQ!KKO3s|KWVsx0R6NU4IDw6{jXal!#Y##&^x%h}v3<;W>;A$*Ho3!JjN-u-ICCzOk zVj0@nx3L>rx)yFJ1Y2Qu^DCl8 z-x(6Pz_5qtMaQyNT@8?_j4fx0m|I_N%Fv&HPbYXxcpnVCZ~8DUzg)+8&PH{ZGuVB+ z80~wp$_^H#xOg5eKDe4rMG45sjcBCJq+5lpXDMVT@R9;Efm@X%aPQsP(xOBS-6!82 z;J$aw70QdRfTIg4a%R%yuKCdgKkW-J9dI6u3vwA8abJZv`#m9;um@Rb)E|A(ptV!7fSe^21m&iZ?7#143} zbzx$9t;J;%7Op$49KG{@bFa7@iNOA{c|9KxVuhPQsZWCNm~a{QyIU3-(vH2TPH{`(TX@}sI;1)UMe~tNnck6jD=o@)u=`r z*nN@hY~?X&^_3Do=!ri!tbR!~D~k06qBwLI!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vS83z-0hDQ@=#J1QkMWjhv=l*TE2X1-=P} z4=Vm|oNz6F=N!M!V(jgoX1$i{q7m@*mH+2Cm#I;EFY==~qhS_?6rbF3=yKxg2+=*} z+#hf&da3vZAE_paAywF;Le~M}qv5xigc{asbRPLl^S$LeA^KLp#kKI=!xBh!9F=He|(ip!D=q)tRJn)mj1WHOkx@426UM9fxiM6KJ-6Q*wDQGjFo?# zpB8%bdWl7*KMEN63ce~bl^Wj2sUcbg@=CX<*6n!KE8!*D(|BN09Y1Js*~8|FW)Rm0 zx9UJXp8yD> z8S-xrzfCj%g1i%yZpw-o!PK?e$G&#Frao!UhL^>hcY2p=E8zNgml0rx>i+H_X#Efp z!f+)7Hca0C*&gT!vUPC)*-EfD$tSje<0*v=Ek%fN5RWU+7AGi8;=%*JWLp56tTrfQ zMuZXZ-hn19PXsLEZD@qxbfP$ZO8w1N1}V>4jw!PUY@^tv2N1dks!sX!!&qMf z)RUS3OL|?c)HU?xo{|fQB_g@F>J(!g#u^NxUfne!I?H=0ofa)z+tkQQDz0kfbknb& z0dr}eUXuBWLgnT(!=26)WmFg+CMhPLYG$ZV_`t$?-RtbQ9R3qj{|DIyNjU%j diff --git a/assets/javascripts/lib/page.coffee b/assets/javascripts/lib/page.coffee index b311e51f..546f5f8d 100644 --- a/assets/javascripts/lib/page.coffee +++ b/assets/javascripts/lib/page.coffee @@ -61,6 +61,12 @@ page.dispatch = (context) -> next() return +page.canGoBack = -> + not Context.isIntialState(currentState) + +page.canGoForward = -> + not Context.isLastState(currentState) + currentPath = -> location.pathname + location.search + location.hash @@ -69,6 +75,12 @@ class Context @sessionId: Date.now() @stateId: 0 + @isIntialState: (state) -> + state.id == 0 + + @isLastState: (state) -> + state.id == @stateId - 1 + @isInitialPopState: (state) -> state.path is @initialPath and @stateId is 1 diff --git a/assets/javascripts/views/layout/mobile.coffee b/assets/javascripts/views/layout/mobile.coffee index aec6692f..1e1dda43 100644 --- a/assets/javascripts/views/layout/mobile.coffee +++ b/assets/javascripts/views/layout/mobile.coffee @@ -37,10 +37,16 @@ class app.views.Mobile extends app.View app.shortcuts.stop() $.on @body, 'click', @onClick - $.on $('._home-link'), 'click', @onClickHome - $.on $('._menu-link'), 'click', @onClickMenu + $.on $('._home-btn'), 'click', @onClickHome + $.on $('._menu-btn'), 'click', @onClickMenu $.on $('._search'), 'touchend', @onTapSearch + @back = $('._back-btn') + $.on @back, 'click', @onClickBack + + @forward = $('._forward-btn') + $.on @forward, 'click', @onClickForward + app.document.sidebar.search .on 'searching', @showSidebar .on 'clear', @hideSidebar @@ -76,6 +82,12 @@ class app.views.Mobile extends app.View @showSidebar() return + onClickBack: => + history.back() + + onClickForward: => + history.forward() + onClickHome: => app.shortcuts.trigger 'escape' @hideSidebar() @@ -90,4 +102,14 @@ class app.views.Mobile extends app.View afterRoute: => @hideSidebar() + + if page.canGoBack() + @back.removeAttribute('disabled') + else + @back.setAttribute('disabled', 'disabled') + + if page.canGoForward() + @forward.removeAttribute('disabled') + else + @forward.setAttribute('disabled', 'disabled') return diff --git a/assets/stylesheets/components/_mobile.scss b/assets/stylesheets/components/_mobile.scss index c93d87d6..e5d0bf67 100644 --- a/assets/stylesheets/components/_mobile.scss +++ b/assets/stylesheets/components/_mobile.scss @@ -34,7 +34,7 @@ } ._logo, ._nav { display: none; } - ._home-link, ._menu-link { display: block; } + ._mobile-btn { display: block; } ._search { float: none; @@ -149,12 +149,17 @@ // Header buttons // -%mobile-link { +._mobile-btn { display: none; position: relative; float: left; width: 2.5rem; height: 100%; + background: none; + border: 0; + @extend %hide-text; + + &[disabled] { opacity: .3; } &:before { position: absolute; @@ -165,15 +170,33 @@ } } -._home-link { - @extend %mobile-link; +._back-btn { + &:before { @extend %icon-back; } +} + +._forward-btn { + width: 2.25rem; + -webkit-transform: rotate(180deg); + transform: rotate(180deg); - &:before { @extend %icon-home; } + &:before { + margin-left: -.375rem; + @extend %icon-back; + } +} + +._home-btn { + float: right; + width: 2rem; + + &:before { + margin-left: -.375rem; + @extend %icon-home; + } } -._menu-link { +._menu-btn { float: right; - @extend %mobile-link; &:before { @extend %icon-menu; } } diff --git a/assets/stylesheets/global/_classes.scss b/assets/stylesheets/global/_classes.scss index 389300cf..a9da3305 100644 --- a/assets/stylesheets/global/_classes.scss +++ b/assets/stylesheets/global/_classes.scss @@ -14,6 +14,13 @@ user-select: none; } +%hide-text { + white-space: nowrap; + overflow: hidden; + color: transparent; + @extend %user-select-none; +} + // // Boxes // diff --git a/assets/stylesheets/global/_icons.scss b/assets/stylesheets/global/_icons.scss index a34bf645..f41cda73 100644 --- a/assets/stylesheets/global/_icons.scss +++ b/assets/stylesheets/global/_icons.scss @@ -37,8 +37,8 @@ %icon-clear { background-position: -3rem 0; } %icon-settings { background-position: 0 -1rem; } %icon-check { background-position: -1rem -1rem; } -%icon-menu { background-position: -2rem -1rem; } -%icon-home { background-position: -3rem -1rem; } +%icon-menu { background-position: -2rem -1rem; @extend %darkIconFix !optional; } +%icon-home { background-position: -3rem -1rem; @extend %darkIconFix !optional; } %icon-path { background-position: 0 -2rem; } %icon-search-white { background-position: -1rem -2rem; } %icon-dir-white { background-position: -2rem -2rem; } @@ -54,6 +54,7 @@ %icon-clipboard { background-position: 0 -5rem; } %icon-clipboard-white { background-position: -1rem -5rem; } %icon-close-white { background-position: -2rem -5rem; } +%icon-back { background-position: -3rem -5rem; @extend %darkIconFix !optional; } ._icon-http:before { background-position: -7rem 0; @extend %darkIconFix !optional; } ._icon-jquery:before { background-position: -8rem 0; @extend %darkIconFix !optional; } diff --git a/public/icons/ui/back/16.png b/public/icons/ui/back/16.png new file mode 100644 index 0000000000000000000000000000000000000000..5f86f40cbd7df8a4c870bdf659dcbd2bb98722c5 GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6QaoK8Ln;`P7wCC-cxdD%9MYUS zW5y5lkFG-cd@q+gIbzRwU&y(@b2(#ay(hk4Umpok@Ln;`PC5|b$8D)kZT9RRB zv~{_LTAbIP`9JIvE188QZwZSC=`(L_esEjE(P)cv4*TweYG&@vTa%v(>mAynKCgSS za$xnGm`AKTzI}d@Vb6cPt}*3p=cdl*59;>M(DBbYa#Cep>+L#C$HtK3-s*E4f7rUV z0TnENcx%4ePLF+T`J@u5a@Y9BlM-UL2(2ps P`i{ZV)z4*}Q$iB}D_Lk{ literal 0 HcmV?d00001 diff --git a/views/app.erb b/views/app.erb index c0ed5056..a86e2bcd 100644 --- a/views/app.erb +++ b/views/app.erb @@ -1,7 +1,9 @@
">
- - + + + +