Skip to content

Commit

Permalink
Simplified menu logic and fixed errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanhogan committed Sep 22, 2015
1 parent 4556d1d commit 6ec97c1
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 58 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [![WikiPadia](http://res.cloudinary.com/rowanhogan/image/upload/c_scale,w_240/v1442544833/logo_sadlam.png)](http://wikipadia.xyz)
# [![WikiPadia](https://res.cloudinary.com/rowanhogan/image/upload/c_scale,w_400/v1442937094/logo-01_indiff.png)](http://wikipadia.xyz)

_WikiPadia_ is a beautiful, customisable Wikipedia reader. It was specifically built for leisurely, late-night reading on an iPad.

Expand Down
Binary file modified app/images/app-icons/apple-touch-icon-114x114.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/images/app-icons/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/images/app-icons/apple-touch-icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/images/app-icons/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/images/app-icons/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/images/app-icons/apple-touch-icon-57x57.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/images/app-icons/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/images/app-icons/apple-touch-icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/images/app-icons/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/images/favicon.ico
Binary file not shown.
44 changes: 0 additions & 44 deletions app/images/logo.svg

This file was deleted.

2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h3>Options</h3>

<div class="container push">
<div id="content">
<h1 class='logo'>Wik<em>i<span>P</span>adia</em></h1>
<h1 class='logo'>Wik<em>i<span>P</span>ad</em>ia</h1>

<form class="search-form" type="POST">
<input type='search' placeholder="Search to get started...">
Expand Down
15 changes: 6 additions & 9 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

var $ = require('jquery');
var bigSlide = require('../../node_modules/bigslide/dist/bigSlide.js');
var attachFastClick = require('fastclick');
var handleNewPage = require('./components/handleNewPage');
var handleTheme = require('./components/handleTheme');
var eventHandlers = require('./components/eventHandlers')
Expand All @@ -11,7 +10,9 @@ if (window.location.hostname.split('.').length > 2) {
var lang = 'en';
}

$(function() {
(function() {
attachFastClick(document.body);

var htmlEl = document.body.parentElement;

if (window.location.search.length) {
Expand All @@ -29,12 +30,8 @@ $(function() {

if (localStorage.getItem('customStyles')) {
var styles = localStorage.getItem('customStyles');
document.getElementById('custom-styles').innerHTML(styles);
document.getElementById('custom-styles').innerHTML = styles;
document.getElementById('custom-styles-input').value = styles;
}

$('.menu-link').bigSlide({
side: 'right',
menuWidth: '22em'
});
});
})();
9 changes: 9 additions & 0 deletions app/scripts/components/eventHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ $(document).on('change', '#theme-changer', function(e) {
var theme = $(this).val();
handleTheme(theme);
});

$(document).on('click', '#menu-toggle', function(e) {
e.preventDefault();

$(this).toggleClass('active');
$('body').toggleClass('sidebar-active');
});


28 changes: 26 additions & 2 deletions app/styles/_app.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

.logo {
margin: .5em 0 .75em;
line-height: 1em;
Expand All @@ -17,7 +16,6 @@
color: #222;
font-style: normal;
}

}

input, textarea, button, select {
Expand Down Expand Up @@ -130,6 +128,14 @@ textarea {
z-index: 100;
max-width: 100%;
overflow: auto;
display: none;
position: fixed;
top: 0;
right: 0;
bottom: 0;
width: $sidebar-width;
max-width: 100%;
transform: translateX($sidebar-width);

h3 {
margin-top: 0;
Expand Down Expand Up @@ -162,6 +168,24 @@ textarea {
input, button, select {
border: 0;
}

@media screen {
display: block;
}
}

#menu, .push {
transition: transform 300ms ease;
}

.sidebar-active {
#menu {
transform: translateX(0);
}

.push {
transform: translateX(-#{$sidebar-width});
}
}

.search-form {
Expand Down
2 changes: 2 additions & 0 deletions app/styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
$serif-stack: "Cardo", "Crimson Text", "PT Serif", "Lora", serif;
$sans-stack: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;

$sidebar-width: 18em;

@import "default";
@import "content";
@import "app";
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"vinyl-source-stream": "^1.1.0"
},
"dependencies": {
"bigslide": "^0.9.1",
"fastclick": "^1.0.6",
"jquery": "^2.1.4"
}
Expand Down

0 comments on commit 6ec97c1

Please sign in to comment.