Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 10 commits
  • 9 files changed
  • 0 commit comments
  • 2 contributors
View
BIN  images/BackArrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/NextArrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/home.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  images/settings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
12 js/read.js
@@ -51,14 +51,13 @@ define(["jquery",
}
view.frontPage = pageNumber === 1;
view.title = book.title;
- view.textColor = state.get('textColor');
- view.pageColor = state.get('pageColor');
view.ID = book.ID;
var newContent;
var N = book.pages.length;
if (pageNumber <= N) {
view.author = book.author;
view.pageNumber = pageNumber;
+ view.backto = encodeURI(book.link);
view.image = book.pages[Math.max(1, pageNumber-1)];
view.caption = view.image.text;
if (pageNumber === 1) {
@@ -83,7 +82,7 @@ define(["jquery",
var $oldPage = page.getInactive('thr-book-page');
$oldPage.addClass('thr-colors');
$oldPage.empty().append('<div class="content-wrap">' + newContent + '</div>');
- $def.resolve($oldPage);
+ $def.resolve($oldPage, {title: book.title, colors: true});
});
return $def;
}
@@ -122,12 +121,11 @@ define(["jquery",
console.log('configureBook', url, slug, pageNumber);
var $page = $(this);
scalePicture($page);
- $page.find('.thr-pic').fadeIn(1000);
-
+ $page.find('.thr-pic').fadeIn(200);
}
- route.add('render', /^\/\d+\/\d+\/\d+\/([^\/]+)\/(?:(\d+)\/(\?rating=\d)?)?$/, renderBook);
- route.add('init', /^\/\d+\/\d+\/\d+\/([^\/]+)\/(?:(\d+)\/(\?rating=\d)?)?$/, configureBook);
+ route.add('render', /^\/\d+\/\d+\/\d+\/([^\/]+)\/(?:(\d+)\/)?(?:\?.*)?$/, renderBook);
+ route.add('init', /^\/\d+\/\d+\/\d+\/([^\/]+)\/(?:(\d+)\/)?(?:\?.*)?$/, configureBook);
return {};
});
View
3  reading-controls.php
@@ -10,8 +10,9 @@
// get the id if any
$ID = getGet('id', '', '/[0-9]+/');
+$backto = getGet('backto', '/');
$settingsFormData = setFormFromState($Templates['readingForm']);
-$settingsFormData['action'] = history(1);
+$settingsFormData['action'] = parse_url($backto, PHP_URL_PATH);
$view = array();
$view['settingsForm'] = template_render('form', $settingsFormData);
$view['ID'] = $ID;
View
1  single-book.php
@@ -32,6 +32,7 @@
if ($pageNumber <= $N) {
$view['author'] = $book['author'];
$view['pageNumber'] = $pageNumber;
+ $view['backto'] = urlencode($book['link']);
$view['image'] = $book['pages'][max(1, $pageNumber-1)];
$view['caption'] = $view['image']['text'];
if ($pageNumber == 1) {
View
140 style.scss
@@ -8,6 +8,7 @@ Version: 1
*/
@import "reset";
+@import url(http://fonts.googleapis.com/css?family=Terminal+Dosis:400,700);
/* new Linux- and Windows-friendly sans-serif font stack: http://mky.be/fontstack */
body {
@@ -46,9 +47,11 @@ mark {background-color: #fcd700; color: #000; font-style: italic; font-weight: b
top: 0px;
left: 0px;
img {
- width: 3em;
- height: 3em;
- opacity: 0.3;
+ width: 2em;
+ height: 2em;
+ margin-top:.5em;
+ margin-left:.5em;
+ opacity: 0.8;
&:hover {
opacity: 1;
}
@@ -60,9 +63,11 @@ mark {background-color: #fcd700; color: #000; font-style: italic; font-weight: b
top: 0px;
right: 0px;
img {
- width: 3em;
- height: 3em;
- opacity: 0.3;
+ width: 2em;
+ height: 2em;
+ margin-top:.5em;
+ margin-right:.5em;
+ opacity: 0.8;
&:hover {
opacity: 1;
}
@@ -71,17 +76,25 @@ mark {background-color: #fcd700; color: #000; font-style: italic; font-weight: b
.content-wrap {
width: 48em;
- margin: 0px auto;
+ margin-left:auto;
+ margin-right:auto;
+ //position:relative; // why do we need this?
}
.page-wrap {
width: 100%;
- //height: 100%;
display: none;
margin: 0;
padding: 0;
}
+.find-page{
+ background:url('http://subtlepatterns.com/patterns/furley_bg.png');
+ .description {
+ display: none;
+ }
+}
+
.active-page {
display: block;
}
@@ -93,13 +106,21 @@ mark {background-color: #fcd700; color: #000; font-style: italic; font-weight: b
display: block;
margin: 0px auto;
text-align: center;
- //opacity: 0.5;
+ background:rgb(51,51,51);
+ border-top: 0.25em solid #3399FF;
+ height:3em;
h1 {
- font-size: 1.3em;
+ font-size: 1.8em;
+ height:1.7em;
a {
text-decoration: none;
+ color:#999;
+ font-family: 'Terminal Dosis', sans-serif;
+ font-weight:400;
+ height:1.7em;
+ line-height:1.7em;
}
}
.description {
@@ -174,8 +195,22 @@ h2 {
}
.searchForm {
- margin-top: 0.2em;
text-align: center;
+ width:100%;
+ padding-top:0.2em;
+ padding-bottom:0.2em;
+ select{
+ width:7em;
+ }
+
+ [name=search]{
+ width:12em;
+ border-radius: 0.5em;
+ border:1px solid grey;
+ padding-left: 0.25em;
+ padding-right: 0.25em;
+ }
+
}
.searchShowButton {
@@ -198,18 +233,24 @@ h2 {
.thr-book-list {
display: block;
text-align: center;
- margin-left: 0.3em;
+ margin-left: 1em;
li {
width: 11em;
height: 11em;
- border: 1px solid black;
+ border: 1px solid grey;
margin: 0.2em;
float: left;
text-align: center;
position: relative;
line-height: 1em;
overflow: hidden;
+ //background:white;
+ border-radius: 0.25em;
+ //-webkit-box-shadow: 0.2em 0.2em 0.25em 2px #aaaaaa;
+ //-moz-box-shadow: 0.1em 0.1em 0.1em 2px #aaaaaa;
+ box-shadow: 0.1em 0.1em 0.0em 2px #aaaaaa;
+
}
h2 {
@@ -269,30 +310,30 @@ h2 {
}
.thr-find-next, .thr-find-back {
- background-color: #eeeeee;
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #cccccc));
- background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
- background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
- background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
- background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
- background-image: linear-gradient(top, #eeeeee, #cccccc);
- border: 1px solid grey;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- -ms-border-radius: 3px;
- -o-border-radius: 3px;
- border-radius: 3px;
- color: #333;
- font: bold 1em "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
- padding: 0.5em 0;
- text-align: center;
- text-shadow: 0 1px 0 #eee;
- width: 11em;
- text-decoration:none;
+ background-color: #eeeeee;
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #cccccc));
+ background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
+ background-image: linear-gradient(top, #eeeeee, #cccccc);
+ border: 1px solid grey;
+ -webkit-border-radius: 0.25em;
+ -moz-border-radius: 0.25em;
+ -ms-border-radius: 0.25em;
+ -o-border-radius: 0.25em;
+ border-radius: 0.25em;
+ color: #333;
+ font: bold 1em "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
+ padding: 0.5em 0;
+ text-align: center;
+ text-shadow: 0 1px 0 #eee;
+ width: 11em;
+ text-decoration:none;
}
.thr-find-next:hover, .thr-find-back:hover {
- background-color: #dddddd;
+ background-color: #dddddd;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dddddd), color-stop(100%, #bbbbbb));
background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
@@ -303,34 +344,32 @@ h2 {
border-bottom: 1px solid #999;
cursor: pointer;
text-shadow: 0 1px 0 #ddd;
- color:#333;
+ color:#333;
}
.thr-find-next:active, .thr-find-back:hover:active {
- border: 1px solid #aaa;
+ border: 1px solid #aaa;
border-bottom: 1px solid #888;
- -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
- -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
- box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
+ -webkit-box-shadow: inset 0 0 0.25em 2px #aaaaaa, 0 1px 0 0 #eeeeee;
+ -moz-box-shadow: inset 0 0 0.25em 2px #aaaaaa, 0 1px 0 0 #eeeeee;
+ box-shadow: inset 0 0 0.25em 2px #aaaaaa, 0 1px 0 0 #eeeeee;
}
.thr-find-next {
float: right;
- margin: 1em 2em 0 0;
+ margin: 1em 1.2em 0 0;
}
.thr-find-back {
float: left;
- margin: 1em 0 0 0.5em;
+ margin: 1em 0 0 1em;
}
.thr-back-link {
- position: absolute;
left: 0px;
bottom: 0px;
}
.thr-next-link {
- position: absolute;
right: 0px;
bottom: 0px;
}
@@ -339,8 +378,8 @@ h2 {
height: 4em;
display: block;
text-decoration: none;
- border: 2px solid red;
- position: absolute;
+ border: 2px solid; // red;
+ position: absolute; // fixed works fine but isn't supported before ios5?
bottom: 0;
font-size: 1em;
@@ -365,6 +404,10 @@ h2 {
text-align: center;
height: 100%;
+ .content-wrap {
+ width: auto;
+ height: 100%;
+ }
h1 {
font-size: 2em;
height: 2.5em;
@@ -499,6 +542,9 @@ h2 {
.content-wrap {
width: 38em;
}
+ .thr-book-list {
+ margin-left: 2em;
+ }
}
/* iPad portrait */
@@ -553,6 +599,6 @@ and (orientation: landscape) {
.myThumbnail {
width: 12%;
- max-width: 150px;
- min-width: 75px;
+ max-width: 10em;
+ min-width: 5em;
}
View
8 templates/bookPage.mustache
@@ -2,7 +2,7 @@
<img src="/theme/images/home.png" alt="home" />
</a>
{{#frontPage}}
- <a href="/reading-controls/?id={{ID}}" class="thr-settings-icon" title="_(Settings|icon explanatory text)">
+ <a href="/reading-controls/?id={{ID}}&backto={{backto}}" class="thr-settings-icon" title="_(Settings|icon explanatory text)">
<img src="/theme/images/settings.png" alt="settings" />
</a>
<h1>{{title}}</h1>
@@ -13,7 +13,7 @@
{{/frontPage}}
<div class="thr-pic-box">
{{#image}}
- <img src="{{url}}" class="thr-pic" style="width:{{pw}}%; height:{{ph}}%; padding-top: {{pm}}%"
+ <img src="{{url}}" class="thr-pic" style="width:{{pw}}%; height:{{ph}}%; padding-top: {{pm}}%"
data-width="{{width}}" data-height="{{height}}" />
{{/image}}
</div>
@@ -21,8 +21,8 @@
{{^frontPage}}
<p class="thr-caption">{{caption}}</p>
{{/frontPage}}
- <a class="thr-back-link" data-role="back" href="{{backLink}}">
+ <a class="thr-back-link thr-colors" href="{{backLink}}">
<img src="/theme/images/BackArrow.png" />_(Go back|button label)</a>
- <a class="thr-next-link" href="{{nextLink}}">
+ <a class="thr-next-link thr-colors" href="{{nextLink}}">
<img src="/theme/images/NextArrow.png" />_(Next page|button label)</a>
{{{audio}}}

No commit comments for this range

Something went wrong with that request. Please try again.