Comments (3)
@sc0ttwad3 hope I understood your question correctly:
The sidebar is hidden/shown by clicking the hamburger icon, what the hamburger icon actually does is simply check a checkbox like you wrote. Going back in the browser will keep the checkbox checked in most modern browsers.
If you want to close the menu upon clicking a link you might want to do something like this in JS for toggling the open/closed state of the checkbox/sidebar:
var element = document.getElementById('sidebar-checkbox');
// toggling the open/close state
element.checked = !element.checked;
// or simply closing the sidebar
element.checked = false;
from lanyon.
Thanks for the snippet, I actually ended up doing something very similar to
handle that -- albeit I over-engineered the problem -- and much prefer the
economy of your solution! I also modified/animated the hamburger icon by
adapting the method described here:
http://www.elijahmanor.com/css-animated-hamburger-icon/
Thx.
On Mon, Apr 21, 2014 at 11:50 PM, Matias Singers
[email protected]:
@sc0ttwad3 https://github.com/sc0ttwad3 hope I understood your question
correctly:The sidebar is hidden/shown by clicking the hamburger icon, what the
hamburger icon actually does is simply check a checkbox like you wrote.
Going back in the browser will keep the checkbox checked in most modern
browsers.If you want to close the menu upon clicking a link you might want to do
something like this in JS for toggling the open/closed state of the
checkbox/sidebar:var element = document.getElementById('sidebar-checkbox');// toggling the open/close stateelement.checked = !element.checked;
// or simply closing the sidebarelement.checked = false;—
Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-41001432
.
from lanyon.
Yeah it's by design to work as-is. This should be a no-JS interaction to start.
from lanyon.
Related Issues (20)
- Confirm absolute_url vs relative_url when mixed with url
- Static assets can't be found when using theme as remote theme on GH Pages HOT 1
- Display posts title and meta only on the home page HOT 3
- Sidebar in overlay mode briefly becomes transparent when closing HOT 3
- 404 error on /public/js/script.js
- Relate posts in a better way HOT 1
- I found `{{ post.excerpt }}` and it does what I wanted. Thanks anyway!
- [Question] Just wanna ask if theme support Google Analytics? HOT 1
- Links zu older Posts returning github domain HOT 1
- Don't include file on sidebar HOT 1
- Home on sidebar
- Switch order of "Older" and "Newer" navigational buttons HOT 1
- Best way to show posts in excerpt view on index.html (Home)
- change the "Open an issue" link to lanyon instead of poole
- SASS version
- Layout Does Not Appear Responsive On Small Viewports
- Support Remote Theme
- Style not rendered when hosting on Github Pages [#237] HOT 2
- NoMethodError HOT 1
- GitHub pages setup feedback HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lanyon.