From 0819c77312b812fa6879f819c840c32a9c6a23ff Mon Sep 17 00:00:00 2001 From: Andromeda Yelton Date: Wed, 12 Jun 2013 14:05:30 -0400 Subject: [PATCH] rewiring to remove buttons --- frontend/templates/download.html | 121 ++++++++++++++------------ static/js/download_page.js | 1 + static/less/enhanced_download.less | 2 +- static/less/enhanced_download_ie.less | 2 +- static/less/sitewide4.less | 26 ++---- 5 files changed, 75 insertions(+), 77 deletions(-) diff --git a/frontend/templates/download.html b/frontend/templates/download.html index 24571791..8c2714e2 100644 --- a/frontend/templates/download.html +++ b/frontend/templates/download.html @@ -74,52 +74,19 @@ $j(document).ready(function() { {% if unglued_ebooks or other_ebooks %}

Need instructions?

-
- - {% if readmill_epub_url %} -
- Readmill -
- {% endif %} - {% if kindle_ebook_id %} - - {% endif %} - -
- Android -
- -
- Ereader -
+
+
+

+ Looks like you're using an embedded browser in an iOS app (maybe you followed a link in Twitter or Facebook?). +

+

+ Embedded browsers don't always know how to handle ebooks. We recommend downloading the epub file using Safari. +

+
+ +
-
-
-

Try this first

-

You may already have an app which reads ebooks (most likely epub or pdf). If so, downloading it on your phone or tablet, or downloading and opening it on your desktop, will give you the option of reading it in that app. You're done!

-
- - {% if readmill_epub_url %} -
-

Readmill users

-

- If you're a Readmill member, you can send unglued ebooks to your iPad with one click. Here you go: -

-
-

- If you're not, Readmill is a reading app designed for beauty, sharing, and conversation. You can learn more and get Readmill here. -

-
- {% endif %} {% if kindle_ebook_id %}

Send to Kindle

@@ -139,9 +106,14 @@ $j(document).ready(function() {

If your Kindle email has changed, you can add the new one to Unglue.it here.

{% else %} -

- Make sure you've added kindle@gluejar.com to your approved personal document list under Personal Document Settings at your Amazon Manage Your Kindle page. Then, enter your Kindle address below. -

+
    +
  • + Add kindle@gluejar.com to your approved personal document list under Personal Document Settings at your Amazon Manage Your Kindle page. +
  • +
  • + Then, enter your Kindle address below. +
  • +
@@ -165,40 +137,57 @@ $j(document).ready(function() { {% endif %}
{% endif %} -
+

iOS devices

+

+ You may already have an app which reads ebooks. Download the epub or pdf and see if you're offered an option for opening the file. If so, you're done! If not... +

- {% comment %}test{% endcomment %}
  • Download the free iBooks app from the App Store.
  • -
  • Download your book (epub or pdf format) from this page using your device's web browser.
  • +
  • Download your book (epub or pdf format)
  • You will be given the option of opening the file in iBooks.
+

+ Not on iOS? Try the instructions for Android, desktop computers, or ereaders (Kindle, Nook, Kobo, etc.). +

-
+

Android devices

+

+ You may already have an app which reads ebooks. Download the epub or pdf and see if you're offered an option for opening the file. If so, you're done! If not... +

  • Download the free Aldiko app.
  • -
  • Download your book (epub or pdf format) from this page using your device's web browser.
  • +
  • Download your book (epub or pdf format).
  • When the download is complete, tap it in your notifications menu. It will be added to Aldiko, ready to read next time you open the app.
+

+ Not on Android? Try the instructions for iPhone/iPad, desktop computers, or ereaders (Kindle, Nook, Kobo, etc.). +

-
+

PC, Mac, or Linux

+

+ You may already have an app which reads ebooks. Download the pdf and see if you're offered an option for opening the file. If so, you're done! If not... +

  • Download the free Calibre app.
  • -
  • Download your book (any format) from this page using your device's web browser.
  • +
  • Download your book (any format).
  • Open the ebook file in Calibre.
+

+ Not on a desktop computer? Try the instructions for iPhone/iPad, Android, or ereaders (Kindle, Nook, Kobo, etc.). +

-
-

Ereaders

+
+

Ereaders (Kindle, Nook, Kobo, etc.)

  • Kindle: download the mobi or pdf format ebook to a laptop or desktop computer. All other ereaders: download the epub or pdf format ebook to a laptop or desktop computer.
  • @@ -207,8 +196,28 @@ $j(document).ready(function() {
  • Eject your device from the Finder or Explorer and disconnect the USB.
  • You may need to reboot your device to see the new book.
+

+ Not using an ereader? Try the instructions for iPhone/iPad, Android, or desktop computers. +

+ + {% comment %} + will need to deal with readmill handling later + + {% if readmill_epub_url %} +
+

Readmill users

+

+ If you're a Readmill member, you can send unglued ebooks to your iPad with one click. Here you go: +

+
+

+ If you're not, Readmill is a reading app designed for beauty, sharing, and conversation. You can learn more and get Readmill here. +

+
+ {% endif %} + {% endcomment %} {% comment %} If we're going to be providing mobi as the norm, let's not bother with these instructions. diff --git a/static/js/download_page.js b/static/js/download_page.js index 39cd047f..3d510932 100644 --- a/static/js/download_page.js +++ b/static/js/download_page.js @@ -26,5 +26,6 @@ $j(document).on('click', '#kindle.authenticated', function() { kindle_ebook_id = classes[0]; $j.post('/send_to_kindle/' + kindle_ebook_id + '/1/', function(data) { $j('#kindle_div').html(data); + return false; }); }); \ No newline at end of file diff --git a/static/less/enhanced_download.less b/static/less/enhanced_download.less index ec0b43fb..f4202300 100644 --- a/static/less/enhanced_download.less +++ b/static/less/enhanced_download.less @@ -2,7 +2,7 @@ display: inherit; } -.instructions > div:not(#trythis_div), .instructions h4 { +.instructions > div:not(.active), .instructions h4 { display: none; } diff --git a/static/less/enhanced_download_ie.less b/static/less/enhanced_download_ie.less index aadf83af..fb541d28 100644 --- a/static/less/enhanced_download_ie.less +++ b/static/less/enhanced_download_ie.less @@ -15,6 +15,6 @@ } /* the not selector doesn't work in IE <= 8 */ -#trythis_div { +.active { display: inherit; } \ No newline at end of file diff --git a/static/less/sitewide4.less b/static/less/sitewide4.less index 6ca12c15..41c6b179 100644 --- a/static/less/sitewide4.less +++ b/static/less/sitewide4.less @@ -902,23 +902,6 @@ li.checked { } /* download page */ -.buttons { - display: none; - border-bottom: solid 2px @blue-grey; - margin-bottom: 10px; - - .btn_support { - float: left; - width: auto; - - a { - width: auto; - padding: 14.25px; - font-size: @font-size-larger; - } - } -} - .instructions { h4 { border-top: solid @blue-grey 1px; @@ -927,10 +910,15 @@ li.checked { } > div { - padding-left: 2em; - padding-right: 2em; + padding-left: 1%; + padding-right: 1%; font-size: @font-size-larger; line-height: @font-size-larger*1.5; + width: 98%; + + &.active { + float: left; + } } }