Merge branch 'update' into master

pull/91/head
eshellman 2018-06-26 14:29:02 -05:00 committed by GitHub
commit 6f2391b0b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
406 changed files with 85270 additions and 1984 deletions

5
.gitignore vendored
View File

@ -6,11 +6,14 @@ settings/keys/*
*.dot *.dot
reports reports
ENV ENV
venv
.DS_Store .DS_Store
build build
deploy/last-update deploy/last-update
logs/* logs/*
cache/*
celerybeat.pid celerybeat.pid
celerybeat-schedule celerybeat-schedule
.gitignore~ .gitignore~
static/scss/*.css.map static/scss/**/*.css.map
*.retry

View File

@ -10,14 +10,14 @@ services:
env: env:
global: global:
- DJANGO_SETTINGS_MODULE=regluit.settings.travis - DJANGO_SETTINGS_MODULE=regluit.settings.travis
- PYTHONPATH=/home/travis/build/Gluejar/ - PYTHONPATH=/home/travis/build/EbookFoundation/
before_install: before_install:
- sudo mkdir /var/log/django - sudo mkdir /var/log/django
- sudo chmod 777 /var/log/django - sudo chmod 777 /var/log/django
- mkdir ~/build/Gluejar/regluit/settings/keys/ - mkdir ~/build/EbookFoundation/regluit/settings/keys/
- cp ~/build/Gluejar/regluit/settings/dummy/__init__.py ~/build/Gluejar/regluit/settings/keys/__init__.py - cp ~/build/EbookFoundation/regluit/settings/dummy/__init__.py ~/build/EbookFoundation/regluit/settings/keys/__init__.py
- openssl aes-256-cbc -K $encrypted_56eb2b7cc527_key -iv $encrypted_56eb2b7cc527_iv -in ~/build/Gluejar/regluit/test/travis-host.py.enc -out ~/build/Gluejar/regluit/settings/keys/host.py -d - openssl aes-256-cbc -K $encrypted_56eb2b7cc527_key -iv $encrypted_56eb2b7cc527_iv -in ~/build/EbookFoundation/regluit/test/travis-host.py.enc -out ~/build/EbookFoundation/regluit/settings/keys/host.py -d
install: install:
- pip install -r requirements_versioned.pip - pip install -r requirements_versioned.pip

View File

@ -12,7 +12,32 @@ The partitioning between these modules is not as clean as would be ideal. `payme
regluit was originally developed on Django 1.3 (python 2.7) and currently runs on Django 1.8. regluit was originally developed on Django 1.3 (python 2.7) and currently runs on Django 1.8.
Develop Development (Vagrant + Virtualbox)
-------
The recommended method for local development is to create a virtual machine with [Vagrant](https://www.vagrantup.com/) and [Virtualbox](https://www.virtualbox.org/wiki/Downloads).
With this method, the only requirements on the host machine are `virtualbox` and `vagrant`.
Vagrant will use the `ansible-local` provisioner, therefore installing python and ansible on the host machine is not necessary.
__Instructions for Ubuntu 16:__
1. Install virtualbox: `sudo apt-get install virtualbox`
2. Install vagrant: `sudo apt-get install vagrant`
3. Clone the `EbookFoundation/regluit` repository.
4. Navigate to the base directory of the cloned repo (where `Vagrantfile` is located).
5. Run `vagrant up` to create the VM, install dependencies, and start necessary services.
* Note: This step may take up to 15 minutes to complete.
6. Once the VM has been created, run `vagrant ssh` to log in to the virtual machine you just created. If provisioning was successful, you should see a success message upon login.
* If virtualenv doesn't activate upon login, you can do it manually by running `cd /opt/regluit && source venv/bin/activate`
7. Within the VM, run `./manage.py runserver 0.0.0.0:8000` to start the Django development server.
8. On your host machine, open your web browser of choice and navigate to `http://127.0.0.1:8000`
__Instructions for other platforms (Windows/OSX):__
* Steps are essentially the same, except for the installation of Vagrant and Virtualbox. Refer to each package's documentation for specific installation instructions.
_NOTE:_ If running Windows on your host machine, ensure you are running `vagrant up` from an elevated command prompt, e.g. right click on Command Prompt -> Run As Administrator.
Development (Host Machine)
------- -------
Here are some instructions for setting up regluit for development on Here are some instructions for setting up regluit for development on

56
Vagrantfile vendored Normal file
View File

@ -0,0 +1,56 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "ubuntu/xenial64"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
config.vm.box_check_update = false
# Setup specific for local machine
config.vm.define "regluit-local", primary: true do |local|
# Create a private network
local.vm.network "private_network", type: "dhcp"
local.vm.hostname = "regluit-local"
# VirtuaLBox provider settings for running locally with Oracle VirtualBox
# --uartmode1 disconnected is necessary to disable serial interface, which
# is known to cause issues with Ubuntu 16 VM's
local.vm.provider "virtualbox" do |vb|
vb.name = "regluit-local"
vb.memory = 1024
vb.cpus = 2
vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ]
end
end
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder ".", "/opt/regluit"
config.vm.network "forwarded_port", guest: 8000, host: 8000
# Provision node with Ansible running on the Vagrant host
# This requires you have Ansible installed locally
# Vagrant autogenerates an ansible inventory file to use
config.vm.provision "ansible_local" do |ansible|
ansible.playbook = "/opt/regluit/provisioning/setup-regluit.yml"
ansible.provisioning_path = "/opt/regluit"
ansible.verbose = true
ansible.install = true
end
config.vm.post_up_message = "Successfully created regluit-local VM. Run 'vagrant ssh' to log in and start the development server."
end

View File

@ -13,7 +13,8 @@ def convert_to_mobi(input_url, input_format="application/epub+zip"):
return a string with the output of mobigen computation return a string with the output of mobigen computation
""" """
if mobigen_url and mobigen_user_id and mobigen_password:
print 'settings ok'
# using verify=False since at the moment, using a self-signed SSL cert. # using verify=False since at the moment, using a self-signed SSL cert.
payload = requests.get(input_url).content payload = requests.get(input_url).content
@ -26,5 +27,6 @@ def convert_to_mobi(input_url, input_format="application/epub+zip"):
if r.status_code == 200: if r.status_code == 200:
return r.content return r.content
else: else:
print "{0}: {1}".format(r.status_code, r.content)
raise Exception("{0}: {1}".format(r.status_code, r.content)) raise Exception("{0}: {1}".format(r.status_code, r.content))

View File

@ -47,7 +47,8 @@ from regluit.payment.parameters import (
TRANSACTION_STATUS_FAILED, TRANSACTION_STATUS_FAILED,
TRANSACTION_STATUS_INCOMPLETE TRANSACTION_STATUS_INCOMPLETE
) )
from regluit.utils import crypto
from regluit.utils import encryption as crypto
from regluit.utils.localdatetime import date_today from regluit.utils.localdatetime import date_today
from regluit.core.parameters import ( from regluit.core.parameters import (

View File

@ -1115,7 +1115,6 @@ class EbookFile(models.Model):
asking=self.asking, asking=self.asking,
source=self.file.url source=self.file.url
) )
new_mobi_ebf.file.save(path_for_file(new_mobi_ebf, None), mobi_cf) new_mobi_ebf.file.save(path_for_file(new_mobi_ebf, None), mobi_cf)
new_mobi_ebf.save() new_mobi_ebf.save()
if self.ebook: if self.ebook:

View File

@ -999,7 +999,7 @@ class DownloadPageTest(TestCase):
anon_client = Client() anon_client = Client()
response = anon_client.get("/work/%s/download/" % w.id, follow=True) response = anon_client.get("/work/%s/download/" % w.id, follow=True)
self.assertContains(response, "/download_ebook/%s/"% eb1.id, count=11) self.assertContains(response, "/download_ebook/%s/"% eb1.id, count=11)
self.assertContains(response, "/download_ebook/%s/"% eb2.id, count=5) self.assertContains(response, "/download_ebook/%s/"% eb2.id, count=4)
self.assertTrue(eb1.edition.work.is_free) self.assertTrue(eb1.edition.work.is_free)
eb1.delete() eb1.delete()
self.assertTrue(eb2.edition.work.is_free) self.assertTrue(eb2.edition.work.is_free)

View File

@ -292,7 +292,9 @@ class OfferForm(forms.ModelForm):
class CampaignPurchaseForm(forms.Form): class CampaignPurchaseForm(forms.Form):
anonymous = forms.BooleanField(required=False, label=_("Make this purchase anonymous, please")) anonymous = forms.BooleanField(required=False,
label_suffix='',
label=_("Make this purchase anonymous"))
offer_id = forms.IntegerField(required=False) offer_id = forms.IntegerField(required=False)
offer = None offer = None
library_id = forms.IntegerField(required=False) library_id = forms.IntegerField(required=False)
@ -357,7 +359,8 @@ class CampaignPurchaseForm(forms.Form):
class CampaignThanksForm(forms.Form): class CampaignThanksForm(forms.Form):
anonymous = forms.BooleanField( anonymous = forms.BooleanField(
required=False, required=False,
label=_("Make this contribution anonymous, please") label_suffix='',
label=_("Make this contribution anonymous")
) )
preapproval_amount = forms.DecimalField( preapproval_amount = forms.DecimalField(
required = True, required = True,
@ -391,7 +394,10 @@ class CampaignPledgeForm(forms.Form):
def amount(self): def amount(self):
return self.cleaned_data["preapproval_amount"] if self.cleaned_data else None return self.cleaned_data["preapproval_amount"] if self.cleaned_data else None
anonymous = forms.BooleanField(required=False, label=_("Make this support anonymous, please")) anonymous = forms.BooleanField(
required=False,
label_suffix='',
label=_("Make this support anonymous"))
ack_name = forms.CharField( ack_name = forms.CharField(
required=False, required=False,
max_length=64, max_length=64,

View File

@ -1,22 +1,28 @@
<!DOCTYPE html> <!DOCTYPE html>
{% load truncatechars %}{% load sass_tags %} {% load truncatechars %}{% load sass_tags %}
<html> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="referrer" content="origin" /> <meta name="referrer" content="origin" />
<title>unglue.it {% block title %}{% endblock %}</title> <title>unglue.it {% block title %}{% endblock %}</title>
<link REL="SHORTCUT ICON" HREF="/static/images/favicon.ico">
<meta name="twitter:card" content="summary" /> <meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@unglueit" /> <meta name="twitter:site" content="@unglueit" />
{% block extra_meta %}{% endblock %} {% block extra_meta %}{% endblock %}
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/sitewide4.scss' %}" /> <link type="text/css" rel="stylesheet" href="{% sass_src 'scss/sitewide4.scss' %}" />
<link REL="SHORTCUT ICON" HREF="/static/images/favicon.ico">
{% block extra_css %}{% endblock %} {% block extra_css %}{% endblock %}
<link href="{% sass_src 'scss/global.scss' %}" rel="stylesheet" type="text/css" />
<link href="{% sass_src 'scss/header.scss' %}" rel="stylesheet" type="text/css" />
<link type="text/css" rel="stylesheet" href="/static/css/font-awesome.min.css" />
<script type="text/javascript" src="{{ jquery_home }}"></script> <script type="text/javascript" src="{{ jquery_home }}"></script>
<script type="text/javascript" src="/static/js/jquery.cookie.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js"></script>
<script type="text/javascript" src="/static/js/sitewide1.js"></script>
<script type="text/javascript" src="/static/js/watermark_init.js"></script> <script type="text/javascript" src="/static/js/watermark_init.js"></script>
<script type="text/javascript" src="/static/js/watermark_change.js"></script> <script type="text/javascript" src="/static/js/watermark_change.js"></script>
<script defer type="text/javascript" src="/static/js/sitewide1.js"></script>
{% block extra_js %} {% block extra_js %}
{% endblock %} {% endblock %}
{% if show_langs %} {% if show_langs %}
@ -45,44 +51,47 @@
</div> </div>
</div> </div>
<div id="js-page-wrap"> <div id="page-wrapper">
<div id="js-header"> <div id="header">
<div class="js-main"> <div id="header-logo">
<div class="js-logo">
<a href="{% url 'landing' %}"><img src="/static/images/logo.png" alt="unglue.it" title="unglue.it"/></a> <a href="{% url 'landing' %}"><img src="/static/images/logo.png" alt="unglue.it" title="unglue.it"/></a>
</div> </div>
{% block search_box %} <div id="header-search-bar">
{% if not suppress_search_box %}
<div class="js-search">
<div class="js-search-inner">
<form action="{% url 'search' %}" method="get"> <form action="{% url 'search' %}" method="get">
<div class="inputalign"> <input role="search" type="text" placeholder="Search" id="nowatermark" size="25" onfocus="imgfocus()" onblur="imgblur(15)" class="inputbox" name="q" value="{{ q }}"></input>
<input type="text" id="nowatermark" size="25" onfocus="imgfocus()" onblur="imgblur(15)" class="inputbox" name="q" value="{{ q }}"> <i class="fa fa-search"></i>
<input type="submit" class="button">
</div>
</form> </form>
</div> </div>
</div> <div id="header-login">
{% endif %}
{% endblock %}
{% block signin %} {% block signin %}
{% if user.is_authenticated %} {% if user.is_authenticated %}
<div class="js-topmenu" id="authenticated"> <a href="{% url 'supporter' user %}#edit" class="notifications-badge-holder">
<ul class="menu"> <img class="user-avatar" src="{{ user.profile.avatar_url }}" height=36 width="36" alt="Avatar for {{ user.username }}" title="{{ user.username }}" />
<li>
<a class="notbutton" href="#"><span id="welcome">Hi, {{ user.username }} <i class="fa fa-chevron-down"> </i></span></a>
</li>
<li>{% block avatar %}
<img class="user-avatar" src="{{ user.profile.avatar_url }}" height=36 width="36" alt="Avatar for {{ user.username }}" title="{{ user.username }}" />{% endblock %}
{% if unseen_count %} {% if unseen_count %}
<a href="/notification"><span id="i_haz_notifications_badge">{{ unseen_count }}</span></a> <span class="notifications-badge unseen_count">{{ unseen_count }}</span>
{% endif %} {% endif %}
</li> </a>
</ul> {% else %}
<ul id="user_menu"> <a class="notbutton hijax" href="{% url 'superlogin' %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}"><span>Log In</span></a>
<li><a class="notbutton" href="{% url 'supporter' user %}">My Faves</a></li> <a class="button success" href="{% url 'registration_register' %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Sign Up</a>
{% endif %}
{% endblock %}
</div>
<div id="header-menu">
<label for="menu-drilldown-box" toggle-header-menu>
<i class="fa fa-bars"></i>
</label>
<div id="top-menu" style="visibility: hidden;">
<ul class="vertical menu drilldown" data-drilldown >
<label for="menu-drilldown-box">
<li toggle-header-menu><a href="#">Back</a></li>
</label>
{% if True or user.is_authenticated %}
<li> <li>
<a class="notbutton" href="/notification"><span>Notices</span> <a href="#">Account</a>
<ul class="menu vertical nested">
<li>
<a class="notbutton" href="/notification"><span>Notices: </span>
{% if unseen_count %} {% if unseen_count %}
<span id="i_haz_notifications" class="unseen_count">{{ unseen_count }}</span> <span id="i_haz_notifications" class="unseen_count">{{ unseen_count }}</span>
{% else %} {% else %}
@ -90,27 +99,27 @@
{% endif %} {% endif %}
</a> </a>
</li> </li>
<li><a class="notbutton" href="{% url 'supporter' user %}#edit" id="profile_edit"><span>Profile Settings</span></a></li> <li><a href="{% url 'supporter' user %}#edit">Profile Settings</a></li>
<li><a class="notbutton" href="{% url 'manage_account' %}"><span>Account &amp; Pledges</span></a></li>
{% if user.rights_holder.all %} {% if user.rights_holder.all %}
<li><a class="notbutton" href="{% url 'rightsholders' %}">Rights Holder Tools</a></li> <li><a class="notbutton" href="{% url 'rightsholders' %}">Rights Holder Tools</a></li>
{% endif %} {% endif %}
<li><a class="notbutton" href="{% url 'auth_logout' %}"><span>Sign Out</span></a></li> <li><a href="{% url 'auth_logout' %}">Sign out</a></li>
</ul>
</li>
{% endif %}
<li>
<a href="#">About Unglue.it</a>
<ul class="menu vertical nested">
<li><a href="{% url 'about' %}">Concept</a></li>
<li><a href="https://blog.unglue.it/">Blog</a></li>
<li><a href="{% url 'press' %}">Press</a></li>
<li><a href="http://eepurl.com/fKLfI">Newsletter</a></li>
</ul>
</li>
<li><a href="{% url 'faq' %}">FAQ</a></li>
<li><a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">Help</a></li>
</ul> </ul>
</div> </div>
{% else %}
<div class="js-topmenu">
<ul class="menu">
<li><a class="notbutton hijax" href="{% url 'superlogin' %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}"><span>Sign In</span></a></li>
{% if not suppress_search_box %}
{% if request.get_full_path != "/accounts/register/" %}
<li class="last"><a class="btn btn-signup" href="{% url 'registration_register' %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Sign Up <i class="fa fa-chevron-right"></i></a></li>
{% endif %}
{% endif %}
</ul>
</div>
{% endif %}
{% endblock %}
</div> </div>
</div> </div>
@ -119,10 +128,9 @@
{% block topsection %}{% endblock %} {% block topsection %}{% endblock %}
{% block content %}{% endblock %} {% block content %}{% endblock %}
</div>
{% block footer %} {% block footer %}
<div id="footer"> <div class="footer utilityheaders">
<div class="js-main">
<div class="column"> <div class="column">
<span>About Unglue.it</span> <span>About Unglue.it</span>
<ul> <ul>
@ -132,7 +140,7 @@
<li><a href="http://eepurl.com/fKLfI">Newsletter</a></li> <li><a href="http://eepurl.com/fKLfI">Newsletter</a></li>
</ul> </ul>
</div> </div>
<div class="column"> <div class="column show-for-medium">
<span>Your account</span> <span>Your account</span>
<ul> <ul>
{% if user.is_authenticated %} {% if user.is_authenticated %}
@ -160,15 +168,16 @@
<li><a href="{% url 'libraries' %}">Unglue.it for Libraries</a> <li><a href="{% url 'libraries' %}">Unglue.it for Libraries</a>
</ul> </ul>
</div> </div>
<div class="column"> <div class="column show-for-medium">
<span>Contact</span> <span>Contact</span>
<ul> <ul>
<li> <a href="mailto:info@ebookfoundation.org"><i class="fa fa-envelope fa-2x"></i></a> <a href="https://twitter.com/unglueit"><i class="fa fa-twitter fa-2x"></i></a> <a href="https://facebook.com/unglueit"><i class="fa fa-facebook fa-2x"></i></a></li> <li> <a href="mailto:info@ebookfoundation.org"><i class="fa fa-envelope fa-2x"></i></a> <a href="https://twitter.com/unglueit"><i class="fa fa-twitter fa-2x"></i></a> <a href="https://facebook.com/unglueit"><i class="fa fa-facebook fa-2x"></i></a></li>
</ul> </ul>
</div> </div>
</div> </div>
</div>
{% endblock %} {% endblock %}
</div>
{% block counter %} {% block counter %}
{% if show_google_analytics %} {% if show_google_analytics %}
<script type="text/javascript"> <script type="text/javascript">
@ -186,7 +195,6 @@
</script> </script>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
<script type="text/javascript" src="/static/scss/foundation/dist/js/foundation.js"></script>
</body> </body>
</html> </html>

View File

@ -8,7 +8,7 @@
{% block extra_extra_head %} {% block extra_extra_head %}
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/landingpage4.scss' %}" /> <link type="text/css" rel="stylesheet" href="{% sass_src 'scss/landingpage4.scss' %}" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/book_panel2.scss' %}" /> <link type="text/css" rel="stylesheet" href="{% sass_src 'scss/book_panel2.scss' %}" />
<script type="text/javascript" src="/static/js/greenpanel.js"></script> <link type="text/css" rel="stylesheet" href="{% sass_src 'scss/faq.scss' %}" />
{% endblock %} {% endblock %}
@ -21,27 +21,14 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="main-container"> <div class="faq-container">
<div class="js-main"> <div class="faq-menu">
<div id="js-leftcol">
{% include "faqmenu.html" %} {% include "faqmenu.html" %}
{% block subnav %}{% endblock %} {% block subnav %}{% endblock %}
</div> </div>
<div id="js-maincol-fr" class="have-right doc"> <div class="faq-main doc">
<div class="js-maincol-inner">
<div id="content-block">
<div id="js-main-container">
<div class="js-main-container-inner">
{% block doccontent %} {% block doccontent %}
{% endblock %} {% endblock %}
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>

View File

@ -54,7 +54,9 @@
{% include "book_panel_addbutton.html" %} {% include "book_panel_addbutton.html" %}
</div> </div>
<div class="white_text bottom_button" > <div class="white_text bottom_button" >
{% if purchased %} {% if work.epubfiles %}
<a href="{% url 'read' workid %}" class="hijax"><span class="read_itbutton button_text"><span>Read it Now</span></span></a>
{% elif purchased %}
<a href="{% url 'download' workid %}" class="hijax"><span class="read_itbutton button_text"><span>Read it Now</span></span></a> <a href="{% url 'download' workid %}" class="hijax"><span class="read_itbutton button_text"><span>Read it Now</span></span></a>
{% elif borrowed %} {% elif borrowed %}
<a href="{% url 'download' workid %}" class="hijax"><span class="read_itbutton button_text"><span>Read it Now</span></span></a> <a href="{% url 'download' workid %}" class="hijax"><span class="read_itbutton button_text"><span>Read it Now</span></span></a>
@ -227,7 +229,7 @@
</div> </div>
{% elif request.user.is_anonymous %} {% elif request.user.is_anonymous %}
<div class="listview panelfront side1 create-account"> <div class="listview panelfront side1 create-account">
<span title="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}">Login to Fave</span> <span class="hide-for-small-only" title="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}">Login to Fave</span>
</div> </div>
{% elif work in wishlist %} {% elif work in wishlist %}
{% if supporter == request.user %} {% if supporter == request.user %}
@ -258,7 +260,7 @@
</div> </div>
{% endif %} {% endif %}
<div class="listview panelfront side1 booklist-status"> <div class="listview panelfront side1 booklist-status hide-for-small-only">
{% if status == "ACTIVE" %} {% if status == "ACTIVE" %}
{% if work.last_campaign.type == 1 %} {% if work.last_campaign.type == 1 %}
<div class="booklist-status-label">{{ work.percent_of_goal }}%</div> <div class="booklist-status-label">{{ work.percent_of_goal }}%</div>
@ -297,8 +299,7 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
<div class="listview panelfront side1 icons"> <div class="listview panelfront side1 icons hide-for-small-only">
{% comment %} {% comment %}
For status icons, we should display... For status icons, we should display...
If there is an ebook: options to get it If there is an ebook: options to get it
@ -307,7 +308,19 @@
Otherwise: number of wishes Otherwise: number of wishes
{% endcomment %} {% endcomment %}
{% if purchased or borrowed or first_ebook %} {% if purchased or borrowed or first_ebook %}
<a href="{% url 'download' workid %}" class="hijax" title="Download this work"><div class="read_itbutton"><span>Read it Now</span></div></a> {% if work.epubfiles %}
<a href="{% url 'read' workid %}" class="hijax">
<span class="read_itbutton button_text">
<span>Read it Now</span>
</span>
</a>
{% else %}
<a href="{% url 'download' workid %}" class="hijax" title="Download this work">
<div class="read_itbutton">
<span>Read it Now</span>
</div>
</a>
{% endif %}
{% elif borrowable %} {% elif borrowable %}
<a href="{% url 'borrow' workid %}?library={{library}}" class="hijax" title="Borrow this work"><div class="read_itbutton"><span>Borrow It</span></div></a> <a href="{% url 'borrow' workid %}?library={{library}}" class="hijax" title="Borrow this work"><div class="read_itbutton"><span>Borrow It</span></div></a>
{% elif in_library %} {% elif in_library %}

View File

@ -17,7 +17,6 @@ location.hash = "#2";
</script> </script>
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="{{ jquery_ui_home }}"></script> <script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/toggle.js"></script> <script type="text/javascript" src="/static/js/toggle.js"></script>
{% endblock %} {% endblock %}
{% block topsection %} {% block topsection %}

View File

@ -14,7 +14,6 @@
{% block extra_head %} {% block extra_head %}
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="{{ jquery_ui_home }}"></script> <script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/toggle.js"></script> <script type="text/javascript" src="/static/js/toggle.js"></script>
<script type="text/javascript" src="/static/js/hijax_unglued.js"></script> <script type="text/javascript" src="/static/js/hijax_unglued.js"></script>
<script type="text/javascript" src="/static/js/tabs.js"></script> <script type="text/javascript" src="/static/js/tabs.js"></script>

View File

@ -10,7 +10,6 @@
{% block extra_head %} {% block extra_head %}
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="{{ jquery_ui_home }}"></script> <script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/toggle.js"></script> <script type="text/javascript" src="/static/js/toggle.js"></script>
<script type="text/javascript" src="/static/js/tabs.js"></script> <script type="text/javascript" src="/static/js/tabs.js"></script>
{% endblock %} {% endblock %}

View File

@ -21,132 +21,84 @@ $j(document).ready(function() {
</script> </script>
{% endblock %} {% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/download.scss' %}" />
{% endblock %}
{% block avatar %} {% block avatar %}
<img class="user-avatar" src="/static/images/header/avatar.png" height=36 width="36" alt="private" title="private" /> <img class="user-avatar" src="/static/images/header/avatar.png" height=36 width="36" alt="private" title="private" />
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div class="download_container"> <div class="download_container">
<div id="lightbox_content"> <div id="download_content">
<span id="dropboxjs" data-app-key="{{ dropbox_key }}"></span> <span id="dropboxjs" data-app-key="{{ dropbox_key }}"></span>
{% if show_beg %} {% if show_beg %}
{% if work.last_campaign.ask_money %} {% if work.last_campaign.ask_money %}
<div class="border" style="padding: 10px; min-height: 18em"> <div class="rh_ask">
<div id="askblock"> {{ work.last_campaign.description|safe }}
<div>Please help us thank the creators for making <a href="{% url 'work' work.id %}">{{ work.title }}</a> free. The amount is up to you.</div> <div class="clearfix"></div>
</div>
<div id="askblock" class="card">
<div>Say thank you for making <a href="{% url 'work' work.id %}">{{ work.title }}</a> free.</div>
<form class="askform" method="POST" action="{% url 'thank' work.id %}#"> <form class="askform" method="POST" action="{% url 'thank' work.id %}#">
{% csrf_token %} {% csrf_token %}
{{ form.non_field_errors }} {{ form.non_field_errors }}
<div class="contrib_amount">Amount: {{ form.preapproval_amount.errors }}${{ form.preapproval_amount }}</div> <div class="input-group">
<div style="text-align: center;"><input name="pledge" type="submit" value="Say Thank You" id="contribsubmit" class="loader-gif" /></div> {{ form.preapproval_amount.errors }}
<div id="anoncontribbox"><I>{{ form.anonymous.label_tag }}</I> {{ form.anonymous.errors }}{{ form.anonymous }}</div> <span class="input-group-label">$</span>
<input class="input-group-field" type="number" min="0.99" max="1999.99" step="1.00"
id="id_preapproval_amount" name="preapproval_amount"
value="{{ form.preapproval_amount.value }}">
<div class="input-group-button">
<input name="pledge" type="submit" class="button loader-gif" value="Say Thanks" id="contribsubmit">
</div>
</div>
<div id="anoncontribbox">
{{ form.anonymous.errors }}{{ form.anonymous }}
<i class="inline-block">{{ form.anonymous.label_tag }}</i>
</div>
{% if request.user.credit.available > 0 %} {% if request.user.credit.available > 0 %}
<div > You have an available credit of ${{ request.user.credit.available|intcomma }} which will be applied to your contribution.</div> <div > You have an available credit of ${{ request.user.credit.available|intcomma }} which will be applied to your contribution.</div>
{% endif %} {% endif %}
</form> </form>
</div> </div>
<div class="rh_ask">
{{ work.last_campaign.description|safe }}
</div>
</div>
{% else %} {% else %}
<div class="border" style="padding: 10px">
<div class="rh_ask"> <div class="rh_ask">
{{ work.last_campaign.description|safe }} {{ work.last_campaign.description|safe }}
</div> <div class="clearfix"></div>
</div> </div>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if user_license.thanked %} {% if user_license.thanked %}
<div style="text-align: center; padding: 20px;"> <div>
<div style="background: #edf3f4; padding: 10px; width:35%; display: inline; ">
You have supported this free book! You have supported this free book!
</div> </div>
</div>
{% endif %} {% endif %}
{% if lib_thanked %} {% if lib_thanked %}
<div style="text-align: center; padding: 20px;"> <div>
<div style="background: #edf3f4; padding: 10px; width:35%; display: inline; ">
Your library has supported this free book! Your library has supported this free book!
</div> </div>
</div>
{% endif %} {% endif %}
{% if amount %} {% if amount %}
<div style="text-align: center; padding: 20px;"> <div>
<div style="background: #edf3f4; padding: 10px; width:35%; display: inline; ">
Your contribution of ${{amount}} is confirmed. Your contribution of ${{amount}} is confirmed.
{% if request.session.receipt %} {% if request.session.receipt %}
A confirmation is being sent to {{ request.session.receipt }}. A confirmation is being sent to {{ request.session.receipt }}.
{% endif %} {% endif %}
</div> </div>
</div>
{% endif %} {% endif %}
{% if source %} {% if source %}
{% else %} {% else %}
<div class="border"> <div class="download-body">
<h2 style="width:60%">Downloads for <I><a href="{% url 'work' work.id %}">{{ work.title }}</a></i></h2> <h1 class="h2">Downloads for <I><a href="{% url 'work' work.id %}">{{ work.title }}</a></i></h1>
<div class="sharing ebook_download_container">
<h3 class="jsmod-title"><span>Share</span></h3>
<ul class="social menu">
{% with site.domain as domain %}
<a href="https://www.facebook.com/sharer.php?u=https://{{ site.domain }}{% url 'work' work.id|urlencode:"" %}"><li class="facebook first"><span>Facebook</span></li></a>
<a href="https://twitter.com/intent/tweet?url=https://{{ site.domain }}{% url 'work' work.id|urlencode:"" %}&amp;text=I%27m%20enjoying%20{{ work.title|urlencode }}%2C%20a%20free%2C%20non%2DDRM%20ebook%2E%20You%20can%20too%21"><li class="twitter"><span>Twitter</span></li></a>
{% endwith %}
{% if request.user.is_authenticated %}<a href="{% url 'emailshare' 'downloaded' %}?next={% url 'work' work.id %}"><li class="email"><span>Email</span></li></a>{% endif %}
<a id="embed2"><li class="embed"><span>Embed</span></li></a>
<div id="widgetcode2">Copy/paste this into your site:<br /><textarea rows="7" cols="22">&lt;iframe src="https://{{ request.META.HTTP_HOST }}/api/widget/{{ work.first_isbn_13 }}/" width="152" height="325" frameborder="0"&gt;&lt;/iframe&gt;</textarea></div>
</ul>
</div>
{% if xfer_url or can_kindle %}
<div class="one_click clearfix">
<h3>One-click options</h3>
{% if mac_ibooks and xfer_url %}
<div id="mac_ibooks" title="{{ work.id }}" >
<div class="btn_support mac_ibooks"><a href="{{ xfer_url }}">Load to iBooks</a></div>
</div>
{% endif %}
{% if can_kindle %}
<div id="kindle_div">
{% if request.user.is_authenticated and request.user.profile.kindle_email %}
<div class="yes_js">
<div id="kindle" class="btn_support authenticated" title="{{ work.id }}" >
<a>Send to Kindle</a>
</div>
</div>
<div class="no_js">
<form method="POST" class="btn_support" action="{% url 'send_to_kindle' work.id 0 %}">
<input type="submit" value="Send to Kindle">
</form>
</div>
{% else %}
<div class="btn_support kindle {% if request.user.is_anonymous %}modify{% endif %}">
<a href="{% url 'kindle_config_download' work.id %}">Set up Kindle </a>
</div>
{% endif %}
</div>
{% endif %}
{% if xfer_url %}
{% if iOS %}
<div id="marvin" title="{{ work.id }}" >
<div class="btn_support marvin"><a href="marvinhttp://{{ xfer_url|urlencode }}">Load to Marvin</a></div>
</div>
{% endif %}
{% endif %}
{% if can_kindle %}{% if not request.user.is_authenticated %}
<div style="clear:left"> You'll need an unglue.it account to <i>Send to Kindle</i>.</div>
{% endif %}{% endif %}
</div>
{% endif %}
<div class="ebook_download_container"> <div class="ebook_download_container">
{% if testmode %} {% if testmode %}
<i>Download links for uploaded files will appear here when campaign is launched.</i> <i>Download links for uploaded files will appear here when campaign is launched.</i>
{% endif %} {% endif %}
{% if unglued_ebooks or other_ebooks or acq %} {% if unglued_ebooks or other_ebooks or acq %}
{% if unglued_ebooks %} {% if unglued_ebooks %}
<h3>Download the unglued edition</h3> <h2 class="h4">Download the unglued edition</h2>
<div class="ebook_download"> <div class="ebook_download">
{% for ebook in unglued_ebooks %} {% for ebook in unglued_ebooks %}
<a href="{% url 'download_ebook' ebook.id %}"> <a href="{% url 'download_ebook' ebook.id %}">
@ -162,25 +114,40 @@ $j(document).ready(function() {
{% endif %} {% endif %}
{% if other_ebooks %} {% if other_ebooks %}
{% if unglued_ebook %} {% if unglued_ebook %}
<h4>Download other freely available editions</h4> <h2 class="h4">Download other freely available editions</h2>
{% else %} {% else %}
<h4>Download freely available editions</h4> <h2 class="h4">Download freely available editions</h2>
{% endif %} {% endif %}
<div class="ebook_download"> <div class="ebook_download">
{% for ebook in other_ebooks %} {% for ebook in other_ebooks %}
<a href="{% url 'download_ebook' ebook.id %}"> <div class="download_option flexible card">
<img src="{{ ebook.rights_badge }}" alt="{{ ebook.rights}}" title="{{ ebook.rights}}" /></a> <a href="{% url 'download_ebook' ebook.id %}" class="download-label h4">
<a href="{% url 'download_ebook' ebook.id %}"><img src="/static/images/{{ ebook.format }}32.png" height="32" alt="{{ ebook.format }} at {{ebook.provider}}" title="{{ ebook.format }} at {{ebook.provider}}" /></a> <span class="hide-for-medium" >
<a href="{% url 'download_ebook' ebook.id %}">{{ ebook.format }} {% if ebook.version_label %} ({{ ebook.version_label }}) {% endif %} at {{ ebook.provider }}</a> {{ebook.format}}:
{% if ebook.is_direct %}<a class="dropbox-saver" href="{{ ebook.download_url }}" data-filename="unglueit-{{ work.id }}.{{ ebook.format }}"></a>{% endif %} </span>
<img class="hide-for-small-only" src="/static/images/{{ ebook.format }}32.png" height="32" alt="{{ ebook.format }} at {{ebook.provider}}" title="{{ ebook.format }} at {{ebook.provider}}" />
{% if not forloop.last %}<br /><br />{% endif %} <span class="hide-for-small-only" >
{{ ebook.format }} {% if ebook.version_label %} ({{ ebook.version_label }}) {% endif %} at {{ ebook.provider }}
</span>
</a>
<a href="{% url 'download_ebook' ebook.id %}" class="download-centered hide-for-medium">
<i class="fa fa-download fa-2x" title="Download {{ebook.format}}"></i>
</a>
{% if ebook.is_direct %}
<span class="dropbox_download_option download-centered" >
<a class="dropbox-saver download-centered" href="{{ ebook.download_url }}" data-filename="unglueit-{{ work.id }}.{{ ebook.format }}"></a>
</span>
<span class="download-centered hide-for-small-only">
<img src="{{ ebook.rights_badge }}" class="" alt="{{ ebook.rights}}" title="{{ ebook.rights}}" />
</span>
{% endif %}
</div>
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
{% if acq %} {% if acq %}
{% if work.last_campaign.type == 2 %} {% if work.last_campaign.type == 2 %}
<h3>Download your ebook{% if acq.lib_acq %}{% if acq.on_reserve %}, on reserve for you at{% else %}, on loan to you at{% endif %} {{ acq.lib_acq.user.library }}{% endif %}</h3> <h2 class="h4">Download your ebook{% if acq.lib_acq %}{% if acq.on_reserve %}, on reserve for you at{% else %}, on loan to you at{% endif %} {{ acq.lib_acq.user.library }}{% endif %}</h2>
<div class="ebook_download"> <div class="ebook_download">
<a href="{{ formats.epub }}"><img src="/static/images/epub32.png" height="32" alt="epub" title="epub" /></a> <a href="{{ formats.epub }}"><img src="/static/images/epub32.png" height="32" alt="epub" title="epub" /></a>
<a href="{{ formats.epub }}">EPUB</a> (for iBooks, Nook, Kobo) <a href="{{ formats.epub }}">EPUB</a> (for iBooks, Nook, Kobo)
@ -193,20 +160,60 @@ $j(document).ready(function() {
{% endif %} {% endif %}
{% endif %} {% endif %}
{% else %} {% else %}
<div class="border"> <div class="card">
<p id="content-block">There are no freely available downloads of <I>{{ work.title }}</I> right now. {% if not work in request.user.wishlist.works.all %}Would you like there to be? <a class="add-wishlist"><span class="work_id" id="w{{ work.id }}">Add this book to your wishlist.</span></a>{% else %}Ask your friends to add it to their favorites!{% endif %}</p> <p id="content-block">There are no freely available downloads of <I>{{ work.title }}</I> right now. {% if not work in request.user.wishlist.works.all %}Would you like there to be? <a class="add-wishlist"><span class="work_id" id="w{{ work.id }}">Add this book to your wishlist.</span></a>{% else %}Ask your friends to add it to their favorites!{% endif %}</p>
<p>If you know of a Creative-Commons-licensed or US public domain edition of this book, you can add it through the <a href="{% url 'work' work.id %}?tab=4">More... tab of the book page</a>.</p> <p>If you know of a Creative-Commons-licensed or US public domain edition of this book, you can add it through the <a href="{% url 'work' work.id %}?tab=4">More... tab of the book page</a>.</p>
</div> </div>
</div> </div>
{% endif %} {% endif %}
{% if xfer_url or can_kindle %}
<div class="one_click clearfix">
<h2 class="h4">One-click options</h2>
{% if mac_ibooks and xfer_url %}
<div id="mac_ibooks" title="{{ work.id }}" >
<div class="btn_support mac_ibooks"><a href="{{ xfer_url }}">Load to iBooks</a></div>
</div>
{% endif %}
{% if can_kindle %}
<div id="kindle_div">
{% if request.user.is_authenticated and request.user.profile.kindle_email %}
<div class="yes_js">
<div id="kindle" class="authenticated" title="{{ work.id }}" >
<a class="button success" >Send to Kindle</a>
</div>
</div>
<div class="no_js">
<form method="POST" action="{% url 'send_to_kindle' work.id 0 %}">
<input class="button success" type="submit" value="Send to Kindle">
</form>
</div>
{% else %}
<a class="button secondary" href="{% url 'kindle_config_download' work.id %}">Set up Send to Kindle </a>
{% endif %}
</div>
{% endif %}
{% if xfer_url %}
{% if iOS %}
<div id="marvin" title="{{ work.id }}" >
<a class="button success" href="marvinhttp://{{ xfer_url|urlencode }}">Load to Marvin</a>
</div>
{% endif %}
{% endif %}
{% if can_kindle %}{% if not request.user.is_authenticated %}
<div> You'll need an unglue.it account to <i>Send to Kindle</i>.</div>
{% endif %}{% endif %}
</div>
{% endif %}
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
{% if unglued_ebooks or other_ebooks or acq %} {% if unglued_ebooks or other_ebooks or acq %}
<div class="border"> <h2 class="h4">Need Instructions?</h2>
<h3>Need instructions?</h3> <ul class="accordion flex_ul" data-accordion data-allow-all-closed="true" data-multi-expand="true">
<div class="instructions"> <li class="accordion-item {% if iOS_app %}is-active{% endif %}" data-accordion-item style="order: {% if iOS_app %} 0 {% else %} 1 {% endif %}">
<div id="iOS_app_div"{% if iOS_app %} class="active"{% endif %}> <a href="#" class="accordion-title">iOS App</a>
<div class="accordion-content" data-tab-content>
<p> <p>
Looks like you're using an embedded browser inside an iOS app. (Maybe you followed a link in Twitter or Facebook?) Looks like you're using an embedded browser inside an iOS app. (Maybe you followed a link in Twitter or Facebook?)
</p> </p>
@ -227,25 +234,27 @@ $j(document).ready(function() {
Not on iOS? Try the instructions for <a class="android other_instructions">Android</a>, <a class="desktop other_instructions">desktop computers</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>. Not on iOS? Try the instructions for <a class="android other_instructions">Android</a>, <a class="desktop other_instructions">desktop computers</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
</p> </p>
</div> </div>
</li>
<div id="ios_div"{% if iOS %}{% if not iOS_app %} class="active"{% endif %}{% endif %}> <li class="accordion-item {% if iOS_app %}{% if not iOS_app %}is-active{% endif %}{% endif %}" data-accordion-item style="order: {% if iOS_app %}{% if not iOS_app %} 0 {% else %} 2 {% endif %} {% else %} 2 {% endif %}">
<a href="#" class="accordion-title">iOS</a>
<div class="accordion-content" data-tab-content>
<h4>iOS devices</h4> <h4>iOS devices</h4>
{% if formats.epub %} {% if formats.epub %}
<p> <p>
You may already have an app which reads ebooks. Download the <a href="{{ formats.epub }}">epub file</a> and see if you're offered an option for opening the file. If so, you're done! If not... You may already have an app which reads ebooks. Download the <a href="{{ formats.epub }}">epub file</a> and see if you're offered an option for opening the file. If so, you're done! If not...
</p> </p>
<p class="ebook_download logo"><img src="/static/images/ibooks_logo.jpg" alt="iBooks Logo" />iBooks</p> <p class="logo"><img src="/static/images/ibooks_logo.jpg" alt="iBooks Logo" />iBooks</p>
<ul> <ul>
<li><a href="https://itunes.apple.com/us/app/ibooks/id364709193?mt=8">Download the free iBooks app</a> from the App Store.</li> <li><a href="https://itunes.apple.com/us/app/ibooks/id364709193?mt=8">Download the free iBooks app</a> from the App Store.</li>
<li>Download the <a href="{{ formats.epub }}">epub file</a>.</li> <li>Download the <a href="{{ formats.epub }}">epub file</a>.</li>
<li>You will be given the option of opening the file in iBooks.</li> <li>You will be given the option of opening the file in iBooks.</li>
</ul> </ul>
<p class="ebook_download logo"><img src="/static/images/marvin_logo.jpg" alt="Marvin Logo" />Marvin is a great way to read ebooks. </p> <p class="logo"><img src="/static/images/marvin_logo.jpg" alt="Marvin Logo" />Marvin is a great way to read ebooks. </p>
<ul> <ul>
<li><a href="https://itunes.apple.com/us/app/marvin-ebook-reader-for-epub/id667361209?ls=1&mt=8">Install Marvin</a> from the App Store.</li> <li><a href="https://itunes.apple.com/us/app/marvin-ebook-reader-for-epub/id667361209?ls=1&mt=8">Install Marvin</a> from the App Store.</li>
<li>Click the "Load to Marvin" button above.</li> <li>Click the "Load to Marvin" button above.</li>
</ul> </ul>
<p class="ebook_download logo"><img src="/static/images/aldiko_logo.png" alt="Aldiko Logo" />So is Aldiko.</p> <p class="logo"><img src="/static/images/aldiko_logo.png" alt="Aldiko Logo" />So is Aldiko.</p>
<ul> <ul>
<li><a href="http://www.aldiko.com/">Download the free Aldiko app.</a></li> <li><a href="http://www.aldiko.com/">Download the free Aldiko app.</a></li>
@ -257,7 +266,7 @@ $j(document).ready(function() {
<p> <p>
You may already have an app which reads ebooks. Download the <a href="{{ formats.pdf }}">pdf file</a> and see if you're offered an option for opening the file. If so, you're done! If not... You may already have an app which reads ebooks. Download the <a href="{{ formats.pdf }}">pdf file</a> and see if you're offered an option for opening the file. If so, you're done! If not...
</p> </p>
<p class="ebook_download logo"><img src="/static/images/ibooks_logo.jpg" alt="iBooks Logo" />iBooks</p> <p class="logo"><img src="/static/images/ibooks_logo.jpg" alt="iBooks Logo" />iBooks</p>
<ul> <ul>
<li><a href="https://itunes.apple.com/us/app/ibooks/id364709193?mt=8">Download the free iBooks app</a> from the App Store.</li> <li><a href="https://itunes.apple.com/us/app/ibooks/id364709193?mt=8">Download the free iBooks app</a> from the App Store.</li>
<li>Download the <a href="{{ formats.pdf }}">pdf file</a>.</li> <li>Download the <a href="{{ formats.pdf }}">pdf file</a>.</li>
@ -280,14 +289,16 @@ $j(document).ready(function() {
Not on iOS? Try the instructions for <a class="android other_instructions">Android</a>, <a class="desktop other_instructions">desktop computers</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>. Not on iOS? Try the instructions for <a class="android other_instructions">Android</a>, <a class="desktop other_instructions">desktop computers</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
</p> </p>
</div> </div>
</li>
<div id="android_div"{% if android %} class="active"{% endif %}> <li class="accordion-item {% if android %}is-active{% endif %}" data-accordion-item style="order: {% if android %} 0 {% else %} 3 {% endif %}">
<a href="#" class="accordion-title">Android</a>
<div class="accordion-content" data-tab-content>
<h4>Android devices</h4> <h4>Android devices</h4>
{% if formats.epub %} {% if formats.epub %}
<p> <p>
You may already have an app which reads ebooks. Download the <a href="{{ formats.epub }}">epub file</a> and see if you're offered an option for opening the file. If so, you're done! If not... You may already have an app which reads ebooks. Download the <a href="{{ formats.epub }}">epub file</a> and see if you're offered an option for opening the file. If so, you're done! If not...
</p> </p>
<p class="ebook_download logo"><img src="/static/images/aldiko_logo.png" alt="Aldiko Logo" />Aldiko</p> <p class="logo"><img src="/static/images/aldiko_logo.png" alt="Aldiko Logo" />Aldiko</p>
<ul> <ul>
<li><a href="http://www.aldiko.com/">Download the free Aldiko app.</a></li> <li><a href="http://www.aldiko.com/">Download the free Aldiko app.</a></li>
@ -298,7 +309,7 @@ $j(document).ready(function() {
<p> <p>
You may already have an app which reads ebooks. Download the <a href="{{ formats.pdf }}">pdf file</a> and see if you're offered an option for opening the file. If so, you're done! If not... You may already have an app which reads ebooks. Download the <a href="{{ formats.pdf }}">pdf file</a> and see if you're offered an option for opening the file. If so, you're done! If not...
</p> </p>
<p class="ebook_download logo"><img src="/static/images/aldiko_logo.png" alt="Aldiko Logo" />Aldiko</p> <p class="logo"><img src="/static/images/aldiko_logo.png" alt="Aldiko Logo" />Aldiko</p>
<ul> <ul>
<li><a href="http://www.aldiko.com/">Download the free Aldiko app.</a></li> <li><a href="http://www.aldiko.com/">Download the free Aldiko app.</a></li>
@ -322,8 +333,10 @@ $j(document).ready(function() {
Not on Android? Try the instructions for <a class="ios other_instructions">iPhone/iPad</a>, <a class="desktop other_instructions">desktop computers</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>. Not on Android? Try the instructions for <a class="ios other_instructions">iPhone/iPad</a>, <a class="desktop other_instructions">desktop computers</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
</p> </p>
</div> </div>
</li>
<div id="desktop_div"{% if desktop %} class="active"{% endif %}> <li class="accordion-item {% if desktop %}is-active{% endif %}" data-accordion-item style="order: {% if desktop %} 0 {% else %} 4 {% endif %}">
<a href="#" class="accordion-title">Desktop</a>
<div class="accordion-content" data-tab-content>
<h4>Reading on a {% if mac_ibooks %}Mac{% else %}PC, Mac, or Linux{% endif %}</h4> <h4>Reading on a {% if mac_ibooks %}Mac{% else %}PC, Mac, or Linux{% endif %}</h4>
{% if formats.pdf %} {% if formats.pdf %}
<p> <p>
@ -331,13 +344,13 @@ $j(document).ready(function() {
</p> </p>
{% elif formats.epub %} {% elif formats.epub %}
{% if mac_ibooks %} {% if mac_ibooks %}
<p class="ebook_download logo"><img src="/static/images/ibooks_logo.jpg" alt="iBooks Logo" />iBooks</p> <p class="logo"><img src="/static/images/ibooks_logo.jpg" alt="iBooks Logo" />iBooks</p>
<ul> <ul>
<li>The iBooks app is pre-installed with your system software.</li> <li>The iBooks app is pre-installed with your system software.</li>
<li>Download the <a href="{{ formats.epub }}">epub file</a>. You should be offered the choice to open it in iBooks</li> <li>Download the <a href="{{ formats.epub }}">epub file</a>. You should be offered the choice to open it in iBooks</li>
</ul> </ul>
{% endif %} {% endif %}
<p class="ebook_download logo"><img src="/static/images/calibre_logo.png" alt="Calibre Logo" />Calibre</p> <p class="logo"><img src="/static/images/calibre_logo.png" alt="Calibre Logo" />Calibre</p>
<ul> <ul>
<li><a href="http://calibre-ebook.com/download">Download the free Calibre app.</a></li> <li><a href="http://calibre-ebook.com/download">Download the free Calibre app.</a></li>
<li>Download the <a href="{{ formats.epub }}">epub file</a>.</li> <li>Download the <a href="{{ formats.epub }}">epub file</a>.</li>
@ -345,7 +358,7 @@ $j(document).ready(function() {
<li>You can <a href="http://blog.marvinapp.com/post/53438723356">use a Calibre plugin</a> to manage files on reader apps. <li>You can <a href="http://blog.marvinapp.com/post/53438723356">use a Calibre plugin</a> to manage files on reader apps.
</ul> </ul>
{% elif formats.mobi %} {% elif formats.mobi %}
<p class="ebook_download logo"><img src="/static/images/calibre_logo.png" alt="Calibre Logo" />Calibre</p> <p class="logo"><img src="/static/images/calibre_logo.png" alt="Calibre Logo" />Calibre</p>
<ul> <ul>
<li><a href="http://calibre-ebook.com/download">Download the free Calibre app.</a></li> <li><a href="http://calibre-ebook.com/download">Download the free Calibre app.</a></li>
<li>Download the <a href="{{ formats.mobi }}">mobi file</a>.</li> <li>Download the <a href="{{ formats.mobi }}">mobi file</a>.</li>
@ -365,8 +378,10 @@ $j(document).ready(function() {
Not on a desktop computer, or want to "side-load" ebooks onto a device or app? Try the instructions for <a class="ios other_instructions">iPhone/iPad</a>, <a class="android other_instructions">Android</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>. Not on a desktop computer, or want to "side-load" ebooks onto a device or app? Try the instructions for <a class="ios other_instructions">iPhone/iPad</a>, <a class="android other_instructions">Android</a>, or <a class="ereader other_instructions">ereaders (Kindle, Nook, Kobo, etc.)</a>.
</p> </p>
</div> </div>
</li>
<div id="ereader_div"{% if desktop %} class="active"{% endif %}> <li class="accordion-item {% if desktop %}is-active{% endif %}" data-accordion-item style="order: {% if desktop %} 0 {% else %} 5 {% endif %}">
<a href="#" class="accordion-title">E-Readers</a>
<div class="accordion-content" data-tab-content>
<h4>Ereaders (Kindle, Nook, Kobo, etc.)</h4> <h4>Ereaders (Kindle, Nook, Kobo, etc.)</h4>
{% if formats.mobi or formats.pdf or formats.epub %} {% if formats.mobi or formats.pdf or formats.epub %}
@ -402,22 +417,29 @@ $j(document).ready(function() {
Not using an ereader? Try the instructions for <a class="ios other_instructions">iPhone/iPad</a>, <a class="android other_instructions">Android</a>, or <a class="desktop other_instructions">desktop computers</a>. Not using an ereader? Try the instructions for <a class="ios other_instructions">iPhone/iPad</a>, <a class="android other_instructions">Android</a>, or <a class="desktop other_instructions">desktop computers</a>.
</p> </p>
</div> </div>
<div id="ereader_div" class="active"> </li>
<li class="accordion-item {% if desktop %}is-active{% endif %}" data-accordion-item style="order: {% if desktop %} 0 {% else %} 6 {% endif %}">
<a href="#" class="accordion-title">Dropbox</a>
<div class="accordion-content" data-tab-content>
<h4>Dropbox</h4> <h4>Dropbox</h4>
<p class="other_instructions_paragraph"> Dropbox is a good way to share your ebooks between desktop, tablet and smartphone. If you see a dropbox button above, click it to load your books into your dropbox folder. Then load the file into your reader application on your device. <p class="other_instructions_paragraph"> Dropbox is a good way to share your ebooks between desktop, tablet and smartphone. If you see a dropbox button above, click it to load your books into your dropbox folder. Then load the file into your reader application on your device.
</p> </p>
</div> </div>
</div> </li>
</ul>
<br /> <div class="download_footer card">
<h4>Need more help?</h4> <h4>Need more help?</h4>
<p><a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">Ask us a question!</a></p> <p><a href="{% url 'feedback' %}?page={{request.build_absolute_uri|urlencode:""}}">Ask us a question!</a></p>
<div> <div>
<a href="http://www.defectivebydesign.org/drm-free"><img src="/static/images/DRM-free150.png" alt="DefectiveByDesign.org" border="0" align="middle" /></a> All downloads from Unglue.it are DRM free. Hooray! <a href="https://www.defectivebydesign.org/drm-free">
<img src="/static/images/DRM-free150.png" alt="DefectiveByDesign.org" border="0" align="middle" />
</a>
<span>
All downloads from Unglue.it are DRM free. Hooray!
</span>
</div> </div>
</div> </div>
{% else %}
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>

View File

@ -14,7 +14,6 @@
{% block extra_head %} {% block extra_head %}
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="{{ jquery_ui_home }}"></script> <script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/toggle.js"></script> <script type="text/javascript" src="/static/js/toggle.js"></script>
<script type="text/javascript" src="/static/js/hijax_unglued.js"></script> <script type="text/javascript" src="/static/js/hijax_unglued.js"></script>
<script type="text/javascript" src="/static/js/tabs.js"></script> <script type="text/javascript" src="/static/js/tabs.js"></script>

View File

@ -20,7 +20,7 @@ Read the ebook now, help to make if available to all in the future. The eBook wa
<ol> <ol>
<li>an initial ungluing date some time in the future, and </li> <li>an initial ungluing date some time in the future, and </li>
<li>a revenue goal</li> <li>a revenue goal</li>
</ol> When an ebook license is purchased, the ungluing date is recalculated according to these formulae:<pre> </ol> When an ebook license is purchased, the ungluing date is recalculated according to these formulae:<pre class="long-formula">
(days per dollar) = [(initial ungluing date) - (launch date)] / (campaign goal) (days per dollar) = [(initial ungluing date) - (launch date)] / (campaign goal)
(current ungluing date) = (initial ungluing date) - (gross revenue)*(days per dollar) (current ungluing date) = (initial ungluing date) - (gross revenue)*(days per dollar)

View File

@ -1,7 +1,7 @@
<div class="jsmodule"> <div class="">
<h3 class="jsmod-title"><span>FAQs</span></h3> <h3 class="jsmod-title"><span>FAQs</span></h3>
<div class="jsmod-content"> <div class="jsmod-content">
<ul class="menu level1"> <ul class="faq-toplevel-nav vertical menu">
<li class="first parent"> <li class="first parent">
<a href="/faq/"><span>All</span></a> <a href="/faq/"><span>All</span></a>
@ -9,7 +9,7 @@
<li class="parent {% if location != 'basics' %}collapse{% endif %}"> <li class="parent {% if location != 'basics' %}collapse{% endif %}">
<a href="{% url 'faq_location' 'basics' %}"><span>About the site</span></a> <a href="{% url 'faq_location' 'basics' %}"><span>About the site</span></a>
<ul class="menu level2"> <ul class="nested vertical menu">
<li class="first"><a href="{% url 'faq_sublocation' 'basics' 'howitworks' %}"><span>About Unglue.it</span></a></li> <li class="first"><a href="{% url 'faq_sublocation' 'basics' 'howitworks' %}"><span>About Unglue.it</span></a></li>
<li><a href="{% url 'faq_sublocation' 'basics' 'account' %}"><span>Your Account</span></a></li> <li><a href="{% url 'faq_sublocation' 'basics' 'account' %}"><span>Your Account</span></a></li>
<li class="last"><a href="{% url 'faq_sublocation' 'basics' 'company' %}"><span>The Organization</span></a></li> <li class="last"><a href="{% url 'faq_sublocation' 'basics' 'company' %}"><span>The Organization</span></a></li>
@ -18,7 +18,7 @@
<li class="parent {% if location != 'unglued_ebooks' %}collapse{% endif %}"> <li class="parent {% if location != 'unglued_ebooks' %}collapse{% endif %}">
<a href="{% url 'faq_location' 'unglued_ebooks' %}"><span>Unglued Ebooks</span></a> <a href="{% url 'faq_location' 'unglued_ebooks' %}"><span>Unglued Ebooks</span></a>
<ul class="menu level2"> <ul class="nested vertical menu">
<li class="first"><a href="{% url 'faq_sublocation' 'unglued_ebooks' 'general' %}"><span>General Questions</span></a></li> <li class="first"><a href="{% url 'faq_sublocation' 'unglued_ebooks' 'general' %}"><span>General Questions</span></a></li>
<li><a href="{% url 'faq_sublocation' 'unglued_ebooks' 'using' %}"><span>Using Your Unglued Ebook</span></a></li> <li><a href="{% url 'faq_sublocation' 'unglued_ebooks' 'using' %}"><span>Using Your Unglued Ebook</span></a></li>
<li class="last"><a href="{% url 'faq_sublocation' 'unglued_ebooks' 'copyright' %}"><span>Ungluing and Copyright</span></a></li> <li class="last"><a href="{% url 'faq_sublocation' 'unglued_ebooks' 'copyright' %}"><span>Ungluing and Copyright</span></a></li>
@ -27,7 +27,7 @@
<li class="parent {% if location != 'campaigns' %}collapse{% endif %}"> <li class="parent {% if location != 'campaigns' %}collapse{% endif %}">
<a href="{% url 'faq_location' 'campaigns' %}"><span>Campaigns</span></a> <a href="{% url 'faq_location' 'campaigns' %}"><span>Campaigns</span></a>
<ul class="menu level2"> <ul class="nested vertical menu">
<li class="first"><a href="{% url 'faq_sublocation' 'campaigns' 't4u' %}"><span>Thanks-for-Ungluing Campaigns</span></a></li> <li class="first"><a href="{% url 'faq_sublocation' 'campaigns' 't4u' %}"><span>Thanks-for-Ungluing Campaigns</span></a></li>
<li><a href="{% url 'faq_sublocation' 'campaigns' 'b2u' %}"><span>Buy-to-Unglue Campaigns</span></a></li> <li><a href="{% url 'faq_sublocation' 'campaigns' 'b2u' %}"><span>Buy-to-Unglue Campaigns</span></a></li>
<li><a href="{% url 'faq_sublocation' 'campaigns' 'supporting' %}"><span>Pledge Campaigns</span></a></li> <li><a href="{% url 'faq_sublocation' 'campaigns' 'supporting' %}"><span>Pledge Campaigns</span></a></li>
@ -38,7 +38,7 @@
<li class="parent {% if location != 'rightsholders' and 'smashwords' not in request.path %}collapse{% endif %}"> <li class="parent {% if location != 'rightsholders' and 'smashwords' not in request.path %}collapse{% endif %}">
<a href="{% url 'faq_location' 'rightsholders' %}"><span>For Rights Holders</span></a> <a href="{% url 'faq_location' 'rightsholders' %}"><span>For Rights Holders</span></a>
<ul class="menu level2"> <ul class="nested vertical menu">
<li class="first"><a href="{% url 'faq_sublocation' 'rightsholders' 'authorization' %}"><span>Becoming Authorized</span></a></li> <li class="first"><a href="{% url 'faq_sublocation' 'rightsholders' 'authorization' %}"><span>Becoming Authorized</span></a></li>
<li><a href="{% url 'faq_sublocation' 'rightsholders' 'claiming' %}"><span>Claiming Works</span></a></li> <li><a href="{% url 'faq_sublocation' 'rightsholders' 'claiming' %}"><span>Claiming Works</span></a></li>
<li><a href="{% url 'faq_sublocation' 'rightsholders' 'campaigns' %}"><span>Running Campaigns</span></a></li> <li><a href="{% url 'faq_sublocation' 'rightsholders' 'campaigns' %}"><span>Running Campaigns</span></a></li>

View File

@ -13,8 +13,11 @@
{% block extra_css %} {% block extra_css %}
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/home.scss' %}" />
<!--
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/landingpage4.scss' %}" /> <link type="text/css" rel="stylesheet" href="{% sass_src 'scss/landingpage4.scss' %}" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/searchandbrowse2.scss' %}" /> <link type="text/css" rel="stylesheet" href="{% sass_src 'scss/searchandbrowse2.scss' %}" /> -->
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/book_panel2.scss' %}" /> <link type="text/css" rel="stylesheet" href="{% sass_src 'scss/book_panel2.scss' %}" />
{% endblock %} {% endblock %}
{% block extra_js %} {% block extra_js %}
@ -35,7 +38,6 @@ function put_un_in_cookie2(){
<script type="text/javascript" src="/static/js/definitions.js"></script> <script type="text/javascript" src="/static/js/definitions.js"></script>
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/highlight_signup.js"></script> <script type="text/javascript" src="/static/js/highlight_signup.js"></script>
<script type="text/javascript" src="/static/js/expand.js"></script> <script type="text/javascript" src="/static/js/expand.js"></script>
<meta name="google-site-verification" content="wFZncBw5tNpwRVyR08NZFNr7WXqv5X1BkEga2fpUNOo" /> <meta name="google-site-verification" content="wFZncBw5tNpwRVyR08NZFNr7WXqv5X1BkEga2fpUNOo" />
@ -47,7 +49,7 @@ function put_un_in_cookie2(){
{% block content %} {% block content %}
<div id="main-container" class="main-container-fl"> <div id="main-container" class="main-container-fl">
<div class="js-main" id="content-block"> <div class="js-main-container" id="content-block">
<div id="js-maincol-fl"> <div id="js-maincol-fl">
<div id="js-main-container"> <div id="js-main-container">
<h3 class="featured_books">Today's Featured Free eBook</h3> <h3 class="featured_books">Today's Featured Free eBook</h3>
@ -68,7 +70,7 @@ function put_un_in_cookie2(){
</div> </div>
</div> </div>
<div class="book-detail-info" style="float:left;"> <div class="book-detail-info" style="float:left;">
<div style="width: 520px;float: left;"> <div style="float: left;">
<div class="book-name" style="font-size:larger; margin-bottom:10px"><a href="{% url 'work' featured.id %}">{{ work.title }}</a></div> <div class="book-name" style="font-size:larger; margin-bottom:10px"><a href="{% url 'work' featured.id %}">{{ work.title }}</a></div>
<div> <div>
<div class="pubinfo"> <div class="pubinfo">
@ -84,7 +86,7 @@ function put_un_in_cookie2(){
{% endif %} {% endif %}
<span>{{ work.publication_date }}</span> <span>{{ work.publication_date }}</span>
</div> </div>
<div class="book-description" style="max-height:200px;overflow:scroll"> {{ work.description|safe }}</div> <div class="book-description" style="max-height:200px;"> {{ work.description|safe }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -95,6 +97,7 @@ function put_un_in_cookie2(){
<div class="spacer"></div> <div class="spacer"></div>
<h3 class="featured_books">Your Recent Faves</h3> <h3 class="featured_books">Your Recent Faves</h3>
<div> <div>
<div class="book_container">
{% for work in faves %} {% for work in faves %}
{% with work.googlebooks_id as googlebooks_id %} {% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %} {% include "book_panel.html" %}
@ -102,12 +105,15 @@ function put_un_in_cookie2(){
{% endfor %} {% endfor %}
<a class="more_featured_books" href="{% url 'supporter' request.user %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> <a class="more_featured_books" href="{% url 'supporter' request.user %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div> </div>
<a class="more_featured_books_mobile button success" href="{% url 'supporter' request.user %}">See More</a>
</div>
{% endif %} {% endif %}
{% if top_pledge %} {% if top_pledge %}
<div class="spacer"></div> <div class="spacer"></div>
<h3 class="featured_books">Pledge to Make These eBooks Free</h3> <h3 class="featured_books">Pledge to Make These eBooks Free</h3>
<div> <div class="book-list">
<div class="book_container">
{% for campaign in top_pledge %} {% for campaign in top_pledge %}
{% with campaign.work as work %} {% with campaign.work as work %}
{% with work.googlebooks_id as googlebooks_id %} {% with work.googlebooks_id as googlebooks_id %}
@ -116,10 +122,13 @@ function put_un_in_cookie2(){
{% endfor %} {% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 'pledge' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> <a class="more_featured_books" href="{% url 'campaign_list' 'pledge' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div> </div>
</div>
<a class="more_featured_books_mobile button success" href="{% url 'campaign_list' 'pledge' %}">See More</a>
{% endif %} {% endif %}
<div class="spacer"></div> <div class="spacer"></div>
<h3 class="featured_books">Read These Free Licensed eBooks</h3> <h3 class="featured_books">Read These Free Licensed eBooks</h3>
<div> <div class="book-list">
<div class="book_container">
{% for work in cc_books %} {% for work in cc_books %}
{% with work.googlebooks_id as googlebooks_id %} {% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %} {% include "book_panel.html" %}
@ -127,10 +136,13 @@ function put_un_in_cookie2(){
{% endfor %} {% endfor %}
<a class="more_featured_books" href="{% url 'cc_list' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> <a class="more_featured_books" href="{% url 'cc_list' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div> </div>
<a class="button success more_featured_books_mobile" href="{% url 'cc_list' %}">See More</a>
</div>
<div class="spacer"></div> <div class="spacer"></div>
{% if top_b2u %} {% if top_b2u %}
<h3 class="featured_books">Buy and Read These eBooks to Make Them Free</h3> <h3 class="featured_books">Buy and Read These eBooks to Make Them Free</h3>
<div> <div class="book-list">
<div class="book_container">
{% for campaign in top_b2u %} {% for campaign in top_b2u %}
{% with campaign.work as work %} {% with campaign.work as work %}
{% with work.googlebooks_id as googlebooks_id %} {% with work.googlebooks_id as googlebooks_id %}
@ -139,11 +151,14 @@ function put_un_in_cookie2(){
{% endfor %} {% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 'b2u' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> <a class="more_featured_books" href="{% url 'campaign_list' 'b2u' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div> </div>
</div>
<a class="more_featured_books_mobile button success" href="{% url 'campaign_list' 'b2u' %}">See More</a>
{% endif %} {% endif %}
<div class="spacer"></div> <div class="spacer"></div>
{% if top_t4u %} {% if top_t4u %}
<h3 class="featured_books">Read These Free eBooks and Thank the Creators</h3> <h3 class="featured_books">Read These Free eBooks and Thank the Creators</h3>
<div> <div class="book-list">
<div class="book_container">
{% for campaign in top_t4u %} {% for campaign in top_t4u %}
{% with campaign.work as work %} {% with campaign.work as work %}
{% with work.googlebooks_id as googlebooks_id %} {% with work.googlebooks_id as googlebooks_id %}
@ -152,10 +167,13 @@ function put_un_in_cookie2(){
{% endfor %} {% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 't4u' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> <a class="more_featured_books" href="{% url 'campaign_list' 't4u' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div> </div>
</div>
<a class="more_featured_books_mobile button success" href="{% url 'campaign_list' 't4u' %}">See More</a>
{% endif %} {% endif %}
<div class="spacer"></div> <div class="spacer"></div>
<h3 class="featured_books">Read These Unglued eBooks - You've Made Them Free</h3> <h3 class="featured_books">Read These Unglued eBooks - You've Made Them Free</h3>
<div> <div class="book-list">
<div class="book_container">
{% for work in unglued_books %} {% for work in unglued_books %}
{% with work.googlebooks_id as googlebooks_id %} {% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %} {% include "book_panel.html" %}
@ -163,6 +181,8 @@ function put_un_in_cookie2(){
{% endfor %} {% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 'unglued' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> <a class="more_featured_books" href="{% url 'campaign_list' 'unglued' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div> </div>
</div>
<a class="more_featured_books_mobile button success" href="{% url 'campaign_list' 'unglued' %}">See More</a>
<div class="spacer"></div> <div class="spacer"></div>
</div> </div>
@ -189,7 +209,7 @@ function put_un_in_cookie2(){
<label>Password (again):</label> <label>Password (again):</label>
<input id="id_password2_main" type="password" class="required" name="password2" size="30" /> <input id="id_password2_main" type="password" class="required" name="password2" size="30" />
</div> </div>
<div class="button"> <div class="sidebar_button">
<input type="submit" class="signup" value="Sign Up Now" onclick="this.disabled=true,this.form.submit();" /> <input type="submit" class="signup" value="Sign Up Now" onclick="this.disabled=true,this.form.submit();" />
</div> </div>
<div class="google_signup" style="padding-bottom: 10px;"> <div class="google_signup" style="padding-bottom: 10px;">
@ -202,6 +222,7 @@ function put_un_in_cookie2(){
</div> </div>
</div> </div>
{% endif %} {% endif %}
<div class="jsmodule"> <div class="jsmodule">
<h3 class="module-title">Donate!</h3> <h3 class="module-title">Donate!</h3>
<div class="jsmod-content"> <div class="jsmod-content">
@ -209,21 +230,13 @@ function put_un_in_cookie2(){
<form class="askform" method="POST" action="{% url 'newdonation' %}"> <form class="askform" method="POST" action="{% url 'newdonation' %}">
<div class="donate_amount"> <div class="donate_amount">
<label>Amount ($): </label><input id="amount" max="20000.00" min="1.00" name="amount" step="0.01" type="number" value="10.00" class="donate"></div> <label>Amount ($): </label><input id="amount" max="20000.00" min="1.00" name="amount" step="0.01" type="number" value="10.00" class="donate"></div>
<div class="button"> <div class="sidebar_button">
<input name="pledge" type="submit" value="Donate" id="donatesubmit" class="donate" /> <input name="pledge" type="submit" value="Donate" id="donatesubmit" class="donate" />
</div> </div>
</form> </form>
</div> </div>
</div> </div>
<div class="jsmodule"> <div class="jsmodule latest-ungluing">
<h3 class="module-title">News</h3>
<div class="jsmod-content">
<a href="https://blog.unglue.it/2018/01/24/unglue-it-has-resumed-crowdfunding/">Unglue.it has resumed crowdfunding</a>
</div>
</div>
<div class="jsmodule">
<h3 class="module-title">Latest Ungluing</h3> <h3 class="module-title">Latest Ungluing</h3>
<div class="jsmod-content"> <div class="jsmod-content">
<ul class="ungluingwhat"> <ul class="ungluingwhat">
@ -236,7 +249,7 @@ function put_un_in_cookie2(){
{% if event.2 == "pledge" %} {% if event.2 == "pledge" %}
{% if object.user%} {% if object.user%}
<span class="user-avatar"> <span class="user-avatar">
<a href="{% url 'supporter' object.user.username %}"><img src="{{ object.user.profile.avatar_url }}" width="43" height="43" title="{{ object.user.username }}" alt="Avatar for {{ object.user.username }}" /></a> <a href="{% url 'supporter' object.user.username %}"><img src="{{ object.user.profile.avatar_url }}" title="{{ object.user.username }}" alt="Avatar for {{ object.user.username }}" /></a>
</span> </span>
<span class="user-book-info"> <span class="user-book-info">
<a href="{% url 'supporter' object.user.username %}">{{ object.user.username }}</a><br /> <a href="{% url 'supporter' object.user.username %}">{{ object.user.username }}</a><br />
@ -251,7 +264,7 @@ function put_un_in_cookie2(){
</span> </span>
{% else %} {% else %}
<span class="user-avatar"> <span class="user-avatar">
<img src="/static/images/header/anonuser.png" width="43" height="43" title="Anonymous User" alt="Avatar for Anonymous User" /> <img src="/static/images/header/anonuser.png" title="Anonymous User" alt="Avatar for Anonymous User" />
</span> </span>
<span class="user-book-info"> <span class="user-book-info">
Anonymous User<br /> Anonymous User<br />
@ -261,7 +274,7 @@ function put_un_in_cookie2(){
{% endif %} {% endif %}
{% elif event.2 == "comment" %} {% elif event.2 == "comment" %}
<span class="user-avatar"> <span class="user-avatar">
<a href="{% url 'supporter' object.user.username %}"><img src="{{ object.user.profile.avatar_url }}" width="43" height="43" title="{{ object.user.username }}" alt="Avatar for {{ object.user.username }}" /></a> <a href="{% url 'supporter' object.user.username %}"><img src="{{ object.user.profile.avatar_url }}" title="{{ object.user.username }}" alt="Avatar for {{ object.user.username }}" /></a>
</span> </span>
<span class="user-book-info"> <span class="user-book-info">
<a href="{% url 'supporter' object.user.username %}">{{ object.user.username }}</a><br /> <a href="{% url 'supporter' object.user.username %}">{{ object.user.username }}</a><br />
@ -270,7 +283,7 @@ function put_un_in_cookie2(){
</span> </span>
{% elif event.2 == "wish" %} {% elif event.2 == "wish" %}
<span class="user-avatar"> <span class="user-avatar">
<a href="{% url 'supporter' object.wishlist.user.username %}"><img src="{{ object.wishlist.user.profile.avatar_url }}" width="43" height="43" title="{{ object.wishlist.user.username }}" alt="Avatar for {{ object.wishlist.user.username }}" /></a> <a href="{% url 'supporter' object.wishlist.user.username %}"><img src="{{ object.wishlist.user.profile.avatar_url }}" title="{{ object.wishlist.user.username }}" alt="Avatar for {{ object.wishlist.user.username }}" /></a>
</span> </span>
<span class="user-book-info"> <span class="user-book-info">
<a href="{% url 'supporter' object.wishlist.user.username %}">{{ object.wishlist.user.username }}</a><br /> <a href="{% url 'supporter' object.wishlist.user.username %}">{{ object.wishlist.user.username }}</a><br />
@ -292,19 +305,6 @@ function put_un_in_cookie2(){
</div> </div>
</div> </div>
</div> </div>
<h3 class="featured_books">As seen on</h3>
<ul id="as_seen_on">
<li><a href="http://boingboing.net/2012/06/28/release-a-deadly-monster-a-dr.html"><img alt="boingboing" src="{{ STATIC_URL }}images/press_logos/boingboing_logo.png"></a></li>
<li><a href="http://www.zeit.de/digital/internet/2012-07/unglue-ebook-creative-commons"><img alt="die zeit" src="{{ STATIC_URL }}images/press_logos/die_zeit_logo.png"></a></li>
<li><a href="http://www.huffingtonpost.com/2012/05/21/unglueit-free-ebooks-crowdfunding_n_1532644.html"><img alt="huffington post" src="{{ STATIC_URL }}images/press_logos/huffington_post_logo.png"></a></li>
<li><a href="http://techcrunch.com/2014/05/06/unglue-it-sets-books-free-after-authors-get-paid/"><img alt="techcrunch" src="{{ STATIC_URL }}images/press_logos/techcrunch_logo.png"></a></li>
<li><a href="http://www.thedigitalshift.com/2014/02/ebooks/buy-unglue-ebook-crowdfunding-model-goes-beta/"><img alt="library journal" src="{{ STATIC_URL }}images/press_logos/library_journal_logo.png"></a></li>
<li><a href="http://www.networkworld.com/community/node/85329"><img alt="networkworld" src="{{ STATIC_URL }}images/press_logos/networkworld_logo.png"></a></li>
</ul>
<div class="speech_bubble"><span>For readers its a gold mine of great books they can have a say in bringing to market.</span></div>
</div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -16,131 +16,6 @@
</div> </div>
</div> </div>
</div> </div>
<div {%if request.user.is_authenticated or hide_learn_more %}id="user-block-hide" {% endif %}class="user-block-hide learnmore_block ">
<h1 style="text-align: center;padding-top: 1em;width: 70%; line-height: 1.2em;">Find over 10,000 <i>free</i> ebooks here.<br />Help us make more ebooks <i>free</i>!</h1>
<div class="quicktour panelview" >
<div class="panelview panelfront side1" >
<span style="color: #8ac3d7; " class="makeaskgive">MAKE</span>
<div class="qtbutton make"><i class="fa fa-heart-o"></i>&nbsp;<i class="fa fa-heart-o"></i>&nbsp;<i class="fa fa-heart-o"></i></div>
</div>
<div class="panelview panelback side2" >
<span class="highlight">Creators</span> make ebooks in EPUB, MOBI, and PDF.<br />
<span class="highlight">Ungluers</span> love them for doing it.<br />
</div>
</div>
<div class="arrow"><i class="fa fa-arrow-right"></i></div>
<div class="quicktour panelview" >
<div class="panelview panelfront side1">
<span style="color: #8dc63f; " class="makeaskgive">GIVE</span>
<a title="Download this work" class="qtbutton qtreadittext"><div class="read_itbutton qtreadit"><span>Read it Now</span></div></a>
</div>
<div class="panelview panelback side2" >
<span class="highlight">Creators</span> apply <a href="https://creativecommons.org/">Creative Commons</a> licenses to ebooks.<br />
<span class="highlight">Ungluers</span> read them at home, at a library, anywhere.<br />
</div>
</div>
<div class="arrow"><i class="fa fa-arrow-right"></i></div>
<div class="quicktour panelview" >
<div class="panelview panelfront side1">
<span style="color: #e18551; " class="makeaskgive">ASK</span>
<input name="pledge" type="submit" value="Say Thank You" class="qtbutton" style="
left: 42px;
">
</div>
<div class="panelview panelback side2" >
<span class="highlight">Creators</span> ask downloaders to contribute what they choose.<br />
<span class="highlight">Ungluers</span> say thank you with their support.
</div>
</div>
<div class="quicktour last">
<div class="programlink">
<a href="{% url 'faq_sublocation' 'campaigns' 't4u' %}">"Thanks for Ungluing"</a>
</div>
</div>
<div class="learnmore_row"></div>
<div class="quicktour panelview" >
<div class="panelview panelfront side1" >
<span style="color: #8ac3d7; " class="makeaskgive">MAKE</span>
<div class="qtbutton make"><i class="fa fa-heart-o"></i>&nbsp;<i class="fa fa-heart-o"></i>&nbsp;<i class="fa fa-heart-o"></i></div>
</div>
<div class="panelview panelback side2" >
<span class="highlight">Creators</span> make ebooks in EPUB.<br />
<span class="highlight">Ungluers</span> love them for doing it.<br />
</div>
</div>
<div class="arrow"><i class="fa fa-arrow-right"></i></div>
<div class="quicktour panelview" >
<div class="panelview panelfront side1">
<span style="color: #e18551; " class="makeaskgive">ASK</span>
<input name="pledge" type="submit" value="Purchase" class="qtbutton" style="
left: 84px;
">
</div>
<div class="panelview panelback side2" >
<span class="highlight">Creators</span> set a funding goal and a per-copy price.<br />
<span class="highlight">Ungluers</span> purchase the ebook to advance the campaign.
</div>
</div>
<div class="arrow"><i class="fa fa-arrow-right"></i></div>
<div class="quicktour panelview" >
<div class="panelview panelfront side1">
<span style="color: #8dc63f; " class="makeaskgive">GIVE</span>
<a title="Download this work" class="qtbutton qtreadittext"><div class="read_itbutton qtreadit"><span>Read it Now</span></div></a>
</div>
<div class="panelview panelback side2" >
When the funding goal is met, <a href="https://creativecommons.org/">Creative Commons</a> licenses are automatically applied.<br />
</div>
</div>
<div class="quicktour last">
<div class="programlink">
<a href="{% url 'faq_sublocation' 'campaigns' 'b2u' %}">"Buy to Unglue"</a>
</div>
</div>
<div class="learnmore_row"></div>
<div class="quicktour panelview" >
<div class="panelview panelfront side1">
<span style="color: #e18551; " class="makeaskgive">ASK</span>
<input name="pledge" type="submit" value="Pledge" class="qtbutton" style="
left: 100px;
">
</div>
<div class="panelview panelback side2" >
<span class="highlight">Creators</span> set a funding goal and rewards for supporters.<br />
<span class="highlight">Ungluers</span> pledge to support the campaign.
</div>
</div>
<div class="arrow"><i class="fa fa-arrow-right"></i></div>
<div class="quicktour panelview" >
<div class="panelview panelfront side1" >
<span style="color: #8ac3d7; " class="makeaskgive">MAKE</span>
<div class="qtbutton make"><i class="fa fa-heart-o"></i>&nbsp;<i class="fa fa-heart-o"></i>&nbsp;<i class="fa fa-heart-o"></i></div>
</div>
<div class="panelview panelback side2" >
When the campaign succeeds, We collect <span class="highlight">Ungluer</span> pledges.<br />
The ebook is <span class="highlight">created</span> and rewards are distributed.
</div>
</div>
<div class="arrow"><i class="fa fa-arrow-right"></i></div>
<div class="quicktour panelview" >
<div class="panelview panelfront side1">
<span style="color: #8dc63f; " class="makeaskgive">GIVE</span>
<a title="Download this work" class="qtbutton qtreadittext"><div class="read_itbutton qtreadit"><span>Read it Now</span></div></a>
</div>
<div class="panelview panelback side2" >
<a href="https://creativecommons.org/">Creative Commons</a> licenses are applied.<br />
<span class="highlight">Ungluers</span> read them at home, at a library, anywhere.<br />
</div>
</div>
<div class="quicktour last">
<div class="programlink">
<a href="{% url 'faq_sublocation' 'campaigns' 'supporting' %}">"Pledge to Unglue"</a>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -14,7 +14,6 @@
{% block extra_js %} {% block extra_js %}
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="{{ jquery_ui_home }}"></script> <script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/import_books.js"></script> <script type="text/javascript" src="/static/js/import_books.js"></script>
<script type="text/javascript" src="/static/js/counter.js"></script> <script type="text/javascript" src="/static/js/counter.js"></script>

View File

@ -12,7 +12,6 @@
<script src="/static/js/slides.min.jquery.js"></script> <script src="/static/js/slides.min.jquery.js"></script>
<script src="/static/js/slideshow.js"></script> <script src="/static/js/slideshow.js"></script>
<script src="/static/js/greenpanel.js"></script>
<!-- toggle to panelview state instead of listview default --> <!-- toggle to panelview state instead of listview default -->
<script type="text/javascript"> <script type="text/javascript">
@ -22,7 +21,6 @@
</script> </script>
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/embed.js"></script> <script type="text/javascript" src="/static/js/embed.js"></script>
{% endblock %} {% endblock %}

View File

@ -0,0 +1,123 @@
{% load sass_tags %}
<!DOCTYPE html>
<head>
<title>Read {{ work.title }} online at unglue.it</title>
<meta property="og:title" content="{{ work.title }}" />
<meta property="og:type" content="book" />
<meta property="og:url" content="https://unglue.it{% url 'work' work.id %}" />
<meta property="og:image" content="{{ work.cover_image_thumbnail }}" />
<meta property="og:site_name" content="Unglue.it" />
{% for author in work.relators %}
<meta property="book:author" content="{{ author.name }}" />
{% endfor %}
{% if work.first_isbn_13 %}
<meta property="book:isbn" content="{{ work.first_isbn_13 }}" />
{% endif %}
<link type="text/css" rel="stylesheet" href="/static/css/reader/normalize.css" />
<link type="text/css" rel="stylesheet" href="/static/css/reader/main.css" />
<link type="text/css" rel="stylesheet" href="/static/css/reader/popup.css" />
<link type="text/css" rel="stylesheet" href="/static/css/reader/annotations.css" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/read.scss' %}" />
<script src="/static/js/reader/libs/jquery.min.js"></script>
<script src="/static/js/reader/libs/zip.min.js"></script>
<script>
"use strict";
document.onreadystatechange = function () {
if (document.readyState == "complete") {
EPUBJS.filePath = "/static/js/reader/libs/";
EPUBJS.cssPath = window.location.href.replace(window.location.hash, '').replace('index.html', '') + "css/";
// fileStorage.filePath = EPUBJS.filePath;
window.reader = ePubReader("{{url}}", {restore: true});
}
};
</script>
<!-- File Storage -->
<script src="/static/js/reader/libs/localforage.min.js"></script>
<!-- Full Screen -->
<script src="/static/js/reader/libs/screenfull.min.js"></script>
<!-- Render -->
<script src="/static/js/reader/epub.min.js"></script>
<!-- Hooks -->
<script src="/static/js/reader/hooks.min.js"></script>
<!-- Reader -->
<script src="/static/js/reader/reader.min.js"></script>
</head>
{% with work.id as work_id %}
<body>
<div id="sidebar">
<div id="panels">
<input id="searchBox" placeholder="search" type="search">
<a id="show-Search" class="show_view icon-search" data-view="Search">Search</a>
<a id="show-Toc" class="show_view icon-list-1 active" data-view="Toc">TOC</a>
<a id="show-Bookmarks" class="show_view icon-bookmark" data-view="Bookmarks">Bookmarks</a>
<a id="show-Notes" class="show_view icon-edit" data-view="Notes">Notes</a>
</div>
<div id="tocView" class="view">
</div>
<div id="searchView" class="view">
<ul id="searchResults"></ul>
</div>
<div id="bookmarksView" class="view">
<ul id="bookmarks"></ul>
</div>
<div id="notesView" class="view">
<div id="new-note">
<textarea id="note-text"></textarea>
<button id="note-anchor">Anchor</button>
</div>
<ol id="notes"></ol>
</div>
</div>
<div id="main">
<div id="titlebar">
<div id="opener">
<a id="slider" class="icon-menu">Menu</a>
</div>
<div id="metainfo">
<span id="book-title"></span>
<span id="title-seperator">&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span id="chapter-title"></span>
</div>
<div id="title-controls">
<a id="bookmark" class="icon-bookmark-empty">Bookmark</a>
<a id="setting" class="icon-cog">Settings</a>
<a id="fullscreen" class="icon-resize-full">Fullscreen</a>
</div>
</div>
<div id="divider"></div>
<div id="prev" class="arrow"></div>
<div id="viewer"></div>
<div id="next" class="arrow"></div>
<div id="loader"><img src="/static/images/reader/loader.gif"></div>
</div>
<div class="modal md-effect-1" id="settings-modal">
<div class="md-content">
<h3>Settings</h3>
<div>
<p>
<input type="checkbox" id="sidebarReflow" name="sidebarReflow">Reflow text when sidebars are open.
</p>
</div>
<div class="closer icon-cancel-circled"></div>
</div>
</div>
<div class="overlay"></div>
</body>
{% endwith %}

View File

@ -2,7 +2,6 @@
{% block title %}Log in to Unglue.it{% endblock %} {% block title %}Log in to Unglue.it{% endblock %}
{% block doccontent %} {% block doccontent %}
<div id="lightbox_content">
{% if form.errors %} {% if form.errors %}
{% for error in form.non_field_errors %} {% for error in form.non_field_errors %}
@ -16,7 +15,6 @@ Make sure the username box has your <b>username, not your email</b> -- some brow
<p> <p>
We've sent your book to your Kindle. Happy reading! We've sent your book to your Kindle. Happy reading!
</p> </p>
<p> <p>
In the future you can send yourself unglued ebooks with one click. Log in, or sign up, and we'll add your Kindle email to your profile so you never have to enter it again. In the future you can send yourself unglued ebooks with one click. Log in, or sign up, and we'll add your Kindle email to your profile so you never have to enter it again.
</p> </p>
@ -31,14 +29,19 @@ Make sure the username box has your <b>username, not your email</b> -- some brow
<a href="{% url 'libraryauth_password_reset' %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Forgot</a> your password? <a href="{% url 'registration_register' %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Need an account</a>? <a href="/faq/basics/account">Other questions</a>? <a href="{% url 'libraryauth_password_reset' %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Forgot</a> your password? <a href="{% url 'registration_register' %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}">Need an account</a>? <a href="/faq/basics/account">Other questions</a>?
<br /><br /> <div class="google-signup">
<a class="btn btn-social btn-google-plus" href="{% url 'social:begin' "google-oauth2" %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}" >
<a class="btn btn-social btn-google-plus" href="{% url 'social:begin' "google-oauth2" %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}" ><i class="fa fa-google"></i>Sign in with Google</a> <i class="fa fa-google"></i>
<a class="btn btn-social btn-yahoo" href="{% url 'social:begin' "yahoo" %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}" ><i class="fa fa-yahoo"></i>Sign in with Yahoo!</a> Sign in with Google
</a>
<a class="btn btn-social btn-yahoo" href="{% url 'social:begin' "yahoo" %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}{{ request.get_full_path|urlencode}}{% endif %}" >
<i class="fa fa-yahoo"></i>
Sign in with Yahoo!
</a>
</div>
{% else %} {% else %}
<div> <div>
You are already logged in as <a href="{% url 'supporter' user %}">{{ user.username }}</a>. You are already logged in as <a href="{% url 'supporter' user %}">{{ user.username }}</a>.
</div> </div>
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}

View File

@ -4,8 +4,7 @@
{{ form.username }} {{ form.username }}
{{ form.password.label_tag }} {{ form.password.label_tag }}
{{ form.password }} {{ form.password }}
<br /> <input type="submit" name="submit" class="button success float-center" value="Sign in"/>
<input type="submit" name="submit" value="Sign in with Password" />
<input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}/{% endif %}" /> <input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}/{% endif %}" />
</form> </form>

View File

@ -34,18 +34,15 @@ $j(document).ready(function() {
{% block extra_head %} {% block extra_head %}
<link href="{% sass_src 'scss/documentation2.scss' %}" rel="stylesheet" type="text/css" /> <link href="{% sass_src 'scss/documentation2.scss' %}" rel="stylesheet" type="text/css" />
{% block extra_extra_head %} {% block extra_extra_head %}
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/registration2.scss' %}" /> <link type="text/css" rel="stylesheet" href="{% sass_src 'scss/registration.scss' %}" />
{% endblock %} {% endblock %}
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<div id="registration"> <div class="registration">
<div id="login_centerer"> <div class="registration-content login-border">
<div id="login">
{% block doccontent %} {% block doccontent %}
{% endblock %} {% endblock %}
</div> </div>
</div> </div>
</div>
<div class="spacer"></div>
{% endblock %} {% endblock %}

View File

@ -1,6 +1,7 @@
{% extends "registration/registration_base.html" %} {% extends "registration/registration_base.html" %}
{% block title %}Register for an account{% endblock %} {% block title %}Register for an account{% endblock %}
{% block extra_js %} {% block extra_js %}
{{ block.super }} {{ block.super }}
<script type="text/javascript"> <script type="text/javascript">
@ -10,6 +11,8 @@ function put_un_in_cookie(){
} }
</script> </script>
{% endblock %} {% endblock %}
{% block doccontent %} {% block doccontent %}
{% if not user.is_authenticated %} {% if not user.is_authenticated %}
@ -20,14 +23,20 @@ function put_un_in_cookie(){
<div>{{ form.email.label }}: {{ form.email.errors }}<br />{{ form.email }}</div> <div>{{ form.email.label }}: {{ form.email.errors }}<br />{{ form.email }}</div>
<div>{{ form.password1.label }}: {{ form.password1.errors }}<br />{{ form.password1 }}</div> <div>{{ form.password1.label }}: {{ form.password1.errors }}<br />{{ form.password1 }}</div>
<div>{{ form.password2.label }}: {{ form.password2.errors }}<br />{{ form.password2 }}</div> <div>{{ form.password2.label }}: {{ form.password2.errors }}<br />{{ form.password2 }}</div>
<input type="submit" value="Send activation email" onclick="this.disabled=true,this.form.submit();" /> <input type="submit" class="button success float-center" value="Send activation email" onclick="this.disabled=true,this.form.submit();" />
</form> </form>
<div class="google_signup"> <div class="google-signup">
<h3>...or</h3> <span class="linetext-outer"><span class="linetext-inner" >or</span></span>
<a class="btn btn-social btn-google-plus" href="{% url 'social:begin' "google-oauth2" %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}/next/{% endif %}" ><i class="fa fa-google"></i>Sign in with Google</a> <a class="btn btn-social btn-google-plus" href="{% url 'social:begin' "google-oauth2" %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}/next/{% endif %}" >
<a class="btn btn-social btn-yahoo" href="{% url 'social:begin' "yahoo" %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}/next/{% endif %}" ><i class="fa fa-yahoo"></i>Sign in with Yahoo!</a> <i class="fa fa-google"></i>
Sign in with Google
</a>
<a class="btn btn-social btn-yahoo" href="{% url 'social:begin' "yahoo" %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}/next/{% endif %}" >
<i class="fa fa-yahoo"></i>
Sign in with Yahoo!
</a>
</div> </div>
{% else %} {% else %}
<div> <div>
@ -35,6 +44,4 @@ You are already logged in as <a href="{% url 'supporter' user %}">{{ user.userna
</div> </div>
{% endif %} {% endif %}
</div>
{% endblock %} {% endblock %}

View File

@ -2,19 +2,32 @@
{% block title %}Welcome to Unglue.It{% endblock %} {% block title %}Welcome to Unglue.It{% endblock %}
{% block extra_css %}
<style>
#header #header-search-bar { visibility: hidden; }
</style>
{% endblock %}
{% block doccontent %} {% block doccontent %}
<div id="welcomesearch">
<p>Welcome, {{user.username}}!</p><p id="link-to-next"></p> <div class="registration">
<div class="registration-content">
<h1>Welcome, {{user.username}}!</h1>
<h2>
<label>Search and add free-licenced books! </label> <label>Search and add free-licenced books! </label>
</h2>
<div id="header-search-bar">
<form action="{% url 'search' %}" method="get"> <form action="{% url 'search' %}" method="get">
<input type="text" onfocus="imgfocus()" onblur="imgblur(0)" size="25" class="inputbox" name="q" value="{{ q }}"> <input role="search" type="text" placeholder="Search" id="welcomesearch" size="25" onfocus="imgfocus()" onblur="imgblur(15)" class="inputbox" name="q" value="{{ q }}"></input>
<input type="submit" class="greenbutton" value="Search"> <i class="fa fa-search"></i>
</form> </form>
</div> </div>
<br /> <br />
<div class="welcomealternatives"> <div class="welcomealternatives">
Or you can <a href="{% url 'edit_user' %}">change your username</a> &#151; <a href="{% url 'work_list' 'popular' %}">see the site's favorite books</a> &#151; <a href="{% url 'feedback' %}">send us feedback</a> &#151; <a href="{% url 'notification_notice_settings' %}">manage your contact preferences</a> Or you can <a href="{% url 'edit_user' %}">change your username</a> &#151; <a href="{% url 'work_list' 'popular' %}">see the site's favorite books</a> &#151; <a href="{% url 'feedback' %}">send us feedback</a> &#151; <a href="{% url 'notification_notice_settings' %}">manage your contact preferences</a>
</div> </div>
</div>
</div>
{% endblock %} {% endblock %}

View File

@ -13,7 +13,6 @@
{% endblock %} {% endblock %}
{% block extra_head %} {% block extra_head %}
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/toggle.js"></script> <script type="text/javascript" src="/static/js/toggle.js"></script>
<script type="text/javascript"> <script type="text/javascript">
(function($){ (function($){

View File

@ -14,7 +14,6 @@
{% block extra_js %} {% block extra_js %}
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="{{ jquery_ui_home }}"></script> <script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/import_books.js"></script> <script type="text/javascript" src="/static/js/import_books.js"></script>
<script type="text/javascript" src="/static/js/counter.js"></script> <script type="text/javascript" src="/static/js/counter.js"></script>

View File

@ -14,7 +14,6 @@
{% block extra_head %} {% block extra_head %}
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="{{ jquery_ui_home }}"></script> <script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/toggle.js"></script> <script type="text/javascript" src="/static/js/toggle.js"></script>
<script type="text/javascript" src="/static/js/hijax_unglued.js"></script> <script type="text/javascript" src="/static/js/hijax_unglued.js"></script>
<script type="text/javascript" src="/static/js/tabs.js"></script> <script type="text/javascript" src="/static/js/tabs.js"></script>

View File

@ -5,7 +5,6 @@
{% load lib_acqs %} {% load lib_acqs %}
{% load purchased %} {% load purchased %}
{% load sass_tags %} {% load sass_tags %}
{% block title %}&#151; {% block title %}&#151;
{% if work.is_free %} {% if work.is_free %}
{{ work.title }} is a Free eBook. {% for fmt in work.formats %}[{{ fmt }}]{% endfor %} {{ work.title }} is a Free eBook. {% for fmt in work.formats %}[{{ fmt }}]{% endfor %}
@ -24,87 +23,37 @@
{% endblock %} {% endblock %}
{% block extra_css %} {% block extra_css %}
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/campaign2.scss' %}" /> <link type="text/css" rel="stylesheet" href="{% sass_src 'scss/campaign2.scss' %}" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/bookview.scss' %}" />
{% if user.is_staff or user in work.last_campaign.managers.all %} {% if user.is_staff or user in work.last_campaign.managers.all %}
<link rel="stylesheet" href="/static/css/ui-lightness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen"> <link rel="stylesheet" href="/static/css/ui-lightness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen">
{{ kwform.media.css }} {{ kwform.media.css }}
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block extra_js %}
<script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="/static/js/tabs4.js"></script>
<script type="text/javascript" src="/static/js/widgets.js"></script>
<script type="text/javascript" src="/static/js/counter.js"></script>
<script type="text/javascript" src="/static/js/embed.js"></script>
{% if user.is_staff or user in work.last_campaign.managers.all %}
{{ kwform.media.js }}
{% endif %}
<!-- needed for DeGruyter seed description hack
makes template vars accessible in JS
-->
<script type="text/javascript">
var numWishers = {{ wishers }};
{% if request.user.id in work.last_campaign.supporters %}
var isSupporter = true;
{% else %}
var isSupporter = false;
{% endif %}
</script>
{% endblock %}
{% block topsection %}
{% if work.last_campaign.status == 'ACTIVE' %}
{% if request.user in work.last_campaign.managers.all %}
<div class="launch_top pale">Hi, {{ request.user.username }}. Since you're a manager for this campaign, you can <a href="{% url 'manage_campaign' id=work.last_campaign.id %}">edit this campaign</a>.</div>
{% endif %}
{% elif not work.user_with_rights %}
{% if request.user.rights_holder.all %}
<div class="launch_top pale">Hi, {{ request.user.username }}. Since you're an authorized Unglue.it rights holder, if you own the worldwide electronic rights to this work, you may claim it through the More... tab. Need help? Check out the <a href="{% url 'rightsholders' %}">rights holder tools page</a>.</div>
{% endif %}
{% elif request.user == work.user_with_rights %}
{% if work.last_campaign.status != 'SUCCESSFUL' %}
<div class="launch_top pale">Hi, {{ request.user.username }}. Since you're a rights holder for this work, you can <a href="{% url 'rightsholders' %}">launch a campaign</a>.</div>
{% endif %}
{% endif %}
{% endblock %}
{% block content %} {% block content %}
{% purchased %}
{% lib_acqs %}
{% with work.last_campaign_status as status %}
{% with work.id as work_id %} {% with work.id as work_id %}
<div id="main-container" itemscope itemtype="http://schema.org/Book"> <div class="wrapper">
<div class="js-main"> <div class="bookImage">
<div id="js-leftcol">
{% include "explore.html" %}
</div>
<div id="js-maincol">
<div class="js-maincol-inner">
<div id="content-block">
<div class="book-detail">
{% if work.uses_google_cover %} {% if work.uses_google_cover %}
<div class="book-cover" id="book-detail-img">
<a href="{{ work.googlebooks_url }}"> <a href="{{ work.googlebooks_url }}">
<img src="{{ work.cover_image_thumbnail }}" alt="Find {{ work.title }} at Google Books" title="Find {{ work.title }} at Google Books" width="131" height="192" /></a> <img src="{{ work.cover_image_thumbnail }}" alt="Find {{ work.title }} at Google Books" title="Find {{ work.title }} at Google Books" width="131" height="192" />
</div> </a>
{% else %} {% else %}
<div id="book-detail-img" class="book-cover" >
<img itemprop="image" src="{{ work.cover_image_thumbnail }}" alt="{{ work.title }}" title="{{ work.title }}" width="131" height="192" /> <img itemprop="image" src="{{ work.cover_image_thumbnail }}" alt="{{ work.title }}" title="{{ work.title }}" width="131" height="192" />
</div>
{% endif %} {% endif %}
<div class="book-detail-info"> </div>
<div class="layout"> <div class="bookDescription">
<h2 class="book-name" itemprop="name">{{ work.title }}</h2>
<div>
<div class="pubinfo"> <div class="pubinfo">
<h2 class="book-name" itemprop="name">{{ work.title }}</h2>
<h3 class="book-author"> <h3 class="book-author">
<span itemprop="author"><a href="{% url 'search' %}?q={{ work.relators.0.author.name|urlencode }}&amp;ty=au" >{{ work.relators.0.name }}</a></span>{% if work.authors.count == 2 %} <span itemprop="author">
and <span itemprop="author"><a href="{% url 'search' %}?q={{ work.relators.1.author.name|urlencode }}&amp;ty=au" >{{ work.relators.1.name }}</a></span> <a href="{% url 'search' %}?q={{ work.relators.0.author.name|urlencode }}&amp;ty=au" />
{% endif %}{% if work.relators.count > 2 %}{% for author in work.relators %}{% if not forloop.first %}, <span itemprop="author"><a href="{% url 'search' %}?q={{ author.author.name|urlencode }}&amp;ty=au" >{{ author.name }}</a></span>{% endif %}{% endfor %} {{ work.relators.0.name }}
</a>
</span>
{% if work.authors.count == 2 %}
and <span itemprop="author"><a href="{% url 'search' %}?q={{ work.relators.1.author.name|urlencode }}&amp;ty=au" />{{ work.relators.1.name }}</a></span>
{% endif %}{% if work.relators.count > 2 %}{% for author in work.relators %}{% if not forloop.first %}, <span itemprop="author"><a href="{% url 'search' %}?q={{ author.author.name|urlencode }}&amp;ty=au" />{{ author.name }}</a></span>{% endif %}{% endfor %}
{% endif %} {% endif %}
</h3> </h3>
<h3 class="book-year"> <h3 class="book-year">
@ -116,165 +65,6 @@
<meta itemprop="typicalAgeRange" content="work.age_range" /> <meta itemprop="typicalAgeRange" content="work.age_range" />
</h3> </h3>
</div> </div>
</div>
</div>
{% if status == 'ACTIVE' %}
{% if work.last_campaign.type != 3 %}
<div class="thermometer" title="{{ work.percent_of_goal }}% of goal">
<div class="cover" style="width: {{ cover_width }}%;">
</div>
<span>{{ work.percent_of_goal }}% of goal</span>
</div>
{% endif %}
<div class="pledged-info noborder">
<div class="campaign-status-info">
{% if work.last_campaign.type == 1 %}
<span>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</span> pledged
{% endif %}
{% if work.last_campaign.type == 2 %}
current ungluing date:
{% endif %}
{% if work.last_campaign.type == 3 %}
<span>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</span> of thanks from
{% endif %}
</div>
<div class="campaign-status-info explainer">
{% if work.last_campaign.type == 1 %}
<span>${{ work.last_campaign.target|floatformat:0|intcomma }}</span> goal
{% endif %}
{% if work.last_campaign.type == 2 %}
<span class="current_cc_date ">{{ work.last_campaign.cc_date|date:"M j, Y" }}</span>
<span class="explanation">After {{ work.last_campaign.cc_date|date:"M j, Y" }} this book will be available for free to anyone, anywhere. Every purchase before then brings that date closer.</span>
{% endif %}
{% if work.last_campaign.type != 3 %}
</div>
<div class="campaign-status-info">
{% endif %}
{% if work.last_campaign.supporters_count == 1 %}
<span>1</span> ungluer
{% else %}
<span>{{ work.last_campaign.supporters_count }}</span> ungluers
{% endif %}
{% if work.last_campaign.type == 3 %}
<br />
{% if work.last_campaign.anon_count == 1 %}
<span>1</span> other
{% else %}
<span>{{ work.last_campaign.anon_count }}</span> others
{% endif %}
{% endif %}
</div>
{% if work.last_campaign.type == 2 %}
<div class="campaign-status-info">
{% if work.lib_acqs.count == 1 %}
<span>1</span> copy in a library
{% else %}
<span>{{ work.lib_acqs.count }}</span> in libraries
{% endif %}
</div>
{% endif %}
{% if work.last_campaign.type != 3 %}
<div class="campaign-status-info explainer">
{% if work.last_campaign.type == 1 %}
<span>{{ work.last_campaign.countdown }}</span> to go
{% else %}
<span>${{ work.last_campaign.left|floatformat:0|intcomma }}</span> to go
<span class="explanation">${{ work.last_campaign.left|floatformat:0|intcomma }} is the amount it would take to make this ebook free to the world tomorrow.</span>
{% endif %}
</div>
{% endif %}
</div>
{% else %}
{% if status == 'SUCCESSFUL' %}
<div class="thermometer successful">
This campaign succeeded on {{ work.last_campaign.success_date|date:"M j, Y" }}.
</div>
<div class="pledged-info noborder">
<div class="campaign-status-info">
{% if work.last_campaign.supporters_count == 1 %}
<span>1</span> ungluer
{% else %}
<span>{{ work.last_campaign.supporters_count }}</span> ungluers
{% endif %}
</div>
<div class="campaign-status-info">
<span>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</span> raised
</div>
<div class="campaign-status-info">
<span>${{ work.last_campaign.target|floatformat:0|intcomma }}</span> goal
</div>
<div class="campaign-status-info">
<span>Unglued!</span>
</div>
</div>
{% endif %}
<div class="pledged-info">
{% if wishers == 1 %}
1 Ungluer has
{% else %}
{{ wishers }} Ungluers have
{% endif %} Faved this Work
</div>
{% endif %}
<div class="find-book">
<label>Learn more at...</label>
<div class="find-link">
{% if work.googlebooks_id %}
<a id="find-google" href="{{ work.googlebooks_url }}"><img src="/static/images/supporter_icons/googlebooks_square.png" title="Find on Google Books" alt="Find on Google Books" /></a>
{% endif %}
{% if work.first_oclc %}
<a rel="nofollow" id="find-oclc" href="https://www.worldcat.org/oclc/{{ work.first_oclc }}"><img src="/static/images/supporter_icons/worldcat_square.png" title="Find on Worldcat" alt="Find on Worldcat" /></a>
{% endif %}
<a rel="nofollow" class="find-openlibrary" href="{% url 'work_openlibrary' work_id %}"><img src="/static/images/supporter_icons/openlibrary_square.png" title="Find on OpenLibrary" alt="Find on OpenLibrary" /></a>
<a rel="nofollow" class="find-goodreads" href="{% url 'work_goodreads' work_id %}"><img src="/static/images/supporter_icons/goodreads_square.png" title="Find on GoodReads" alt="Find on GoodReads" /></a>
<a rel="nofollow" class="find-librarything" href="{% url 'work_librarything' work_id %}"><img src="/static/images/supporter_icons/librarything_square.png" title="Find on LibraryThing" alt="Find on LibraryThing" /></a>
</div>
</div>
<div class="btn_wishlist" id="wishlist_actions">
{% if request.user.is_anonymous %}
<div class="create-account">
<span title="{% url 'work' work_id %}">Login to Fave</span>
</div>
{% elif request.user.id in work.last_campaign.supporters %}
<div class="add-wishlist">
<span class="on-wishlist">Faved!</span>
</div>
{% elif work in request.user.wishlist.works.all %}
<div class="remove-wishlist-workpage">
<span id="w{{ work_id }}">Remove from My Faves</span>
</div>
{% else %}
<div class="add-wishlist">
<span class="work_id" id="w{{ work_id }}">Add to My Faves</span>
</div>
{% endif %}
</div>
</div>
</div>
{% get_comment_count for work as comment_count %}
{% if action == 'editions' %}
<div class="content-block-heading" id="tabs">
<ul class="tabs">
<li class="tabs1"><a href="{% url 'work' work.id %}?tab=1">{% if status == 'ACTIVE' %}Campaign{% else %}Description{% endif %}</a></li>
<li class="tabs2"><a href="{% url 'work' work.id %}?tab=2">Comments {% if comment_count > 0 %}({{ comment_count }}){% endif %}</a></li>
<li class="tabs3" id="supporters"><a href="{% url 'work' work.id %}?tab=3">Ungluers {% if wishers > 0 %}<br />({{ wishers }}){% endif %}</a></li>
<li class="tabs4 active"><a href="#">Editions</a></li>
</ul>
</div>
{% else %}
<div class="content-block-heading" id="tabs">
<ul class="tabs">
<li class="tabs1 {% if activetab == '1' %}active{% endif %}"><a href="#">{% if status == 'ACTIVE' %}Campaign{% else %}Description{% endif %}</a></li>
<li class="tabs2 {% if activetab == '2' %}active{% endif %}"><a href="#">Comments {% if comment_count > 0 %}({{ comment_count }}){% endif %}</a></li>
<li class="tabs3 {% if activetab == '3' %}active{% endif %}" id="supporters"><a href="#">Ungluers {% if wishers > 0 %}<br />({{ wishers }}){% endif %}</a></li>
<li class="tabs4 {% if activetab == '4' %}active{% endif %}"><a href="#">More...</a></li>
</ul>
</div>
{% endif %}
<div id="content-block-content">
<div id="tabs-1" class="tabs {% if activetab == '1' %}active{% endif %}">
<div class="tabs-content">
<div itemprop="description"> <div itemprop="description">
{% if status == 'ACTIVE' %} {% if status == 'ACTIVE' %}
{% if work.last_campaign.type != 3 %} {% if work.last_campaign.type != 3 %}
@ -287,93 +77,8 @@
{% else %} {% else %}
{{ work.last_campaign.description|safe }} {{ work.last_campaign.description|safe }}
{% endif %} {% endif %}
</div>
<div> <div class="description-more-content">
{% for work_rel in work.works_related_to.all %}
{% if work_rel.from_work.language != 'xx' and work.language != 'xx' %}
<p>
This work is a {{ work_rel.relation }} of <a href="{% url 'work' work_rel.from_work.id %}">{{ work_rel.from_work }}</a>.
</p>
{% endif %}
{% endfor %}
{% for work_rel in work.works_related_from.all %}
{% if work.language != 'xx' and work_rel.to_work.language != 'xx' %}
<p>
<a href="{% url 'work' work_rel.to_work.id %}">{{ work_rel.to_work }}</a> is a {{ work_rel.relation }} of this work.
</p>
{% endif %}
{% endfor %}
{% if work.doab %}
<p>
This book is included in <a href="http://www.doabooks.org/doab?func=search&amp;query=rid%3A{{ work.doab }}">DOAB</a>.
</p>
{% endif %}
{% if work.gtbg %}
<p>
This book is included in <a href="https://www.gutenberg.org/ebooks/{{ work.gtbg }}">Project Gutenberg</a>.
</p>
{% endif %}
</div>
</div>
</div>
<div id="tabs-2" class="tabs {% if activetab == '2' %}active{% endif %}">
<h3>Why {% if work.ebooks.all %}read{% else %}unglue{% endif %} this book? Have your say.</h3>
<div class="tabs-content">
{% render_comment_list for work %}
{% if user.is_authenticated %}
{% render_comment_form for work %}
{% else %}
<p>You must be <a href="{% url 'superlogin' %}?next={{ request.get_full_path|urlencode }}">logged in</a> to comment.</p>
{% endif %}
</div>
</div>
<div id="tabs-3" class="tabs {% if activetab == '3' %}active{% endif %}">
<div class="tabs-content">
{% if request.user.is_staff or request.user in work.last_campaign.managers.all %}
<form id="contact_form" method="POST" action="#" >
{% csrf_token %}
<input type="hidden" name="work" value="{{ work.id }}" />
{% for wish in work.wishes.all reversed %}
{% with wish.wishlist.user as supporter %}
<div class="work_supporter_wide">
<a href="{% url 'supporter' supporter %}">
<span class="work_supporter_avatar">
<img class="user-avatar" src="{{ supporter.profile.avatar_url }}" height="50" width="50" alt="Avatar for {{ supporter }}" title="{{ supporter }}" />
</span>
</a>
<div class="show_supporter_contact_form" >
<img src="/static/images/icons/email.png" alt="email" title="contact supporter" />
</div>
<div class="info_for_managers">
{{ supporter }}<br />
Wished: {{ wish.created }}<br />
{% if supporter.id in work.last_campaign.supporters %}Pledged!</br />{% endif %}
{% if supporter in work.last_campaign.ungluers.all %}Supported!</br />{% endif %}
</div>
</div>
<div class="supporter_contact_form" ></div>
<input class="supporter_contact_form" type="submit" name="msg_{{supporter.id}}" value="Send Message to {{ supporter.username }}" />
{% endwith %}
{% endfor %}
</form>
{% else %}
{% for wish in work.wishes.all reversed %}
{% with wish.wishlist.user as supporter %}
<div class="work_supporter_nocomment" itemscope itemtype="http://schema.org/Person">
<a itemprop="url" href="{% url 'supporter' supporter %}">
<span class="work_supporter_avatar">
<img class="user-avatar" src="{{ supporter.profile.avatar_url }}" height="50" width="50" alt="Avatar for {{ supporter }}" title="{{ supporter }}" />
</span>
<span class="work_supporter_name">{{ supporter }}</span>
</a>
</div>
{% endwith %}
{% endfor %}
{% endif %}
</div>
</div>
<div id="tabs-4" class="tabs {% if activetab == '4' %}active{% endif %}">
<div class="tabs-content">
{% if action == 'display' %} {% if action == 'display' %}
{% if status == 'ACTIVE' %} {% if status == 'ACTIVE' %}
{% if work.last_campaign.type == 1 %} {% if work.last_campaign.type == 1 %}
@ -435,7 +140,7 @@
{% if request.user.rights_holder.all.count %} {% if request.user.rights_holder.all.count %}
Is this work yours? Claim it: <br /><br /> Is this work yours? Claim it: <br /><br />
<form method="POST" action="{% url 'claim' %}"> <form method="GET" action="{% url 'claim' %}">
{% csrf_token %} {% csrf_token %}
{{ claimform.user }} {{ claimform.user }}
{{ claimform.work }} {{ claimform.work }}
@ -468,76 +173,75 @@
{% if user.is_staff %} {% if user.is_staff %}
<h4>Related Works</h4> <h4>Related Works</h4>
<div><a href="{% url 'merge' work_id %}">Merge other works into this one</a></div> <div><a href="{% url 'merge' work_id %}">Merge other works into this one</a></div>
{% endif %} {% endif %}
<h4>Keywords</h4>
{% if work.subjects.all.count > 0 %}
<ul id="kw_list">
{% for subject in work.subjects.all %}
<li itemprop="keywords">{{ subject.name }}
{% if user.is_staff or user in work.last_campaign.managers.all %}
<span class="deletebutton" data="{{ subject.name }}">x</span>
{% endif %} {% endif %}
</li> </div>
{% endfor %} </div>
</ul> </div>
<div class="bookSidebar">
{% if has_online_book %}
<div class="bookRead">
<a href="{% url 'read' work_id %}">
<button class="button expanded success">Read</button>
</a>
</div>
{% endif %}
<div class="bookDownload">
<a href="{% url 'download' work_id %}">
<button class="button expanded success">Download</button>
</a>
</div>
<div class="bookDonate">
<a href="{% url 'download' work_id %}">
<button class="button expanded success">Donate</button>
</a>
</div>
<div class="book-sidebar-item">
<div class="btn_wishlist" id="wishlist_actions">
{% if request.user.is_anonymous %}
<div class="create-account">
<span title="{% url 'work' work_id %}"><a href="{% url 'superlogin' %}?next={{ request.get_full_path|urlencode }}">Login to Fave</a></span>
</div>
{% elif request.user.id in work.last_campaign.supporters %}
<div class="add-wishlist">
<span class="on-wishlist">Faved!</span>
</div>
{% elif work in request.user.wishlist.works.all %}
<div class="remove-wishlist-workpage">
<span id="w{{ work_id }}">Remove from My Faves</span>
</div>
{% else %} {% else %}
No keywords yet. <div class="add-wishlist">
<ul id="kw_list"></ul> <span class="work_id" id="w{{ work_id }}">Add to My Faves</span>
</div>
{% endif %} {% endif %}
{% if user_can_edit_work %} </div>
<form method="POST" id="kw_add_form">{% csrf_token %} </div>
{{ kwform.add_kw }}<input type="hidden" name="kw_add" value="true"> <input type="submit" name="kw_add_fake" value="add keyword" id="kw_add_form_submit" /> <div class="book-sidebar-item">
</form> <a rel="nofollow" class="find-goodreads" href="{% url 'work_goodreads' work_id %}">
{% endif %} <img src="/static/images/supporter_icons/goodreads_square.png" title="Find on GoodReads" alt="Find on GoodReads" />
{% endif %} <span>GoodReads</span>
{% with doi=work.doi http_id=work.http_id %} </a>
{% if doi or http_id %} </div>
<h4>Links</h4> <div class="book-sidebar-item">
{% if doi %} <a rel="nofollow" class="find-librarything" href="{% url 'work_librarything' work_id %}">
DOI: <a href="https://doi.org/{{ doi }}">{{ doi }}</a><br /> <img src="/static/images/supporter_icons/librarything_square.png" title="Find on LibraryThing" alt="Find on LibraryThing" />
{% endif %} <span>LibraryThing</span>
{% if http_id %} </a>
web: <a href="{{ http_id }}">{{ http_id }}</a><br /> </div>
{% endif %} <div class="book-sidebar-explore">
{% endif %} {% include "explore.html" %}
{% endwith %} </div>
<h4>Editions</h4> </div>
{% if alert %} <div class="bookComments">
<div class="yikes"><br />{{ alert }}</div> <h2>Comments</h2>
{% endif %} {% render_comment_list for work %}
{% if user_can_edit_work %} {% if user.is_authenticated %}
<div><a href="{% url 'new_edition' work_id edition.id %}">Create a new edition for this work</a><br /><br /></div> {% render_comment_form for work %}
{% endif %}
{% if action == 'editions' %}
{% include 'split.html' %}
{% else %} {% else %}
{% with work.preferred_edition as edition %} <p>You must be <a href="{% url 'superlogin' %}?next={{ request.get_full_path|urlencode }}">logged in</a> to comment.</p>
{% include 'edition_display.html' %}
{% endwith %}
{% if not campaign %}
{% for edition in editions %}
{% if edition != work.preferred_edition %}
{% include 'edition_display.html' %}
{% endif %} {% endif %}
{% endfor %}
{% endif %}
<div><a href="{% url 'work_editions' work_id %}">All editions for this work.</a></div>
{% endif %}
</div> </div>
</div> </div>
</div>
</div>
</div>
</div>
<div id="js-rightcol">
{% include 'work_action.html' %}
</div>
</div>
</div>
{% endwith %}
{% endwith %} {% endwith %}
{% endblock %} {% endblock %}

View File

@ -14,7 +14,6 @@
{% block extra_head %} {% block extra_head %}
<script type="text/javascript" src="/static/js/wishlist.js"></script> <script type="text/javascript" src="/static/js/wishlist.js"></script>
<script type="text/javascript" src="{{ jquery_ui_home }}"></script> <script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
<script type="text/javascript" src="/static/js/toggle.js"></script> <script type="text/javascript" src="/static/js/toggle.js"></script>
<script type="text/javascript" src="/static/js/tabs.js"></script> <script type="text/javascript" src="/static/js/tabs.js"></script>
{% endblock %} {% endblock %}

View File

@ -90,6 +90,7 @@ urlpatterns = [
url(r"^work/(?P<work_id>\d+)/librarything/$", views.work_librarything, name="work_librarything"), url(r"^work/(?P<work_id>\d+)/librarything/$", views.work_librarything, name="work_librarything"),
url(r"^work/(?P<work_id>\d+)/goodreads/$", views.work_goodreads, name="work_goodreads"), url(r"^work/(?P<work_id>\d+)/goodreads/$", views.work_goodreads, name="work_goodreads"),
url(r"^work/(?P<work_id>\d+)/openlibrary/$", views.work_openlibrary, name="work_openlibrary"), url(r"^work/(?P<work_id>\d+)/openlibrary/$", views.work_openlibrary, name="work_openlibrary"),
url(r"^read/(?P<work_id>\d+)/$", views.read, name="read"),
url(r"^new_edition/(?P<work_id>)(?P<edition_id>)$", views.edit_edition, name="new_edition"), url(r"^new_edition/(?P<work_id>)(?P<edition_id>)$", views.edit_edition, name="new_edition"),
url(r"^new_edition/(?P<work_id>\d*)/(?P<edition_id>\d*)$", views.edit_edition, name="new_edition"), url(r"^new_edition/(?P<work_id>\d*)/(?P<edition_id>\d*)$", views.edit_edition, name="new_edition"),
url(r"^manage_ebooks/(?P<edition_id>\d*)$", views.manage_ebooks, name="manage_ebooks"), url(r"^manage_ebooks/(?P<edition_id>\d*)$", views.manage_ebooks, name="manage_ebooks"),

View File

@ -298,6 +298,18 @@ def stub(request):
def acks(request, work): def acks(request, work):
return render(request, 'front_matter.html', {'campaign': work.last_campaign()}) return render(request, 'front_matter.html', {'campaign': work.last_campaign()})
def read(request, work_id):
work = safe_get_work(work_id)
try:
ebook_id = work.first_epub().id
url = get_object_or_404(models.Ebook, id=ebook_id).url
except (ValueError, AttributeError):
raise Http404
return render(request, 'read.html', {
'work': work,
'url': url,
})
def work(request, work_id, action='display'): def work(request, work_id, action='display'):
work = safe_get_work(work_id) work = safe_get_work(work_id)
alert = '' alert = ''
@ -411,7 +423,8 @@ def work(request, work_id, action='display'):
'cover_width': cover_width_number, 'cover_width': cover_width_number,
'action': action, 'action': action,
'formset': formset, 'formset': formset,
'kwform': SubjectSelectForm() 'kwform': SubjectSelectForm(),
'has_online_book': work.first_epub() != None,
}) })
def edition_uploads(request, edition_id): def edition_uploads(request, edition_id):

View File

@ -40,7 +40,7 @@ MEDIA_ROOT = ''
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
# set once instead of in all the templates # set once instead of in all the templates
JQUERY_HOME = "/static/js/jquery-1.7.1.min.js" JQUERY_HOME = "/static/js/jquery-1.12.4.min.js"
JQUERY_UI_HOME = "/static/js/jquery-ui-1.8.16.custom.min.js" JQUERY_UI_HOME = "/static/js/jquery-ui-1.8.16.custom.min.js"
CKEDITOR_UPLOAD_PATH = '' CKEDITOR_UPLOAD_PATH = ''
@ -184,6 +184,10 @@ INSTALLED_APPS = (
SASS_PROCESSOR_INCLUDE_DIRS = [ SASS_PROCESSOR_INCLUDE_DIRS = [
os.path.join(PROJECT_DIR, 'static', 'scss'), os.path.join(PROJECT_DIR, 'static', 'scss'),
os.path.join('static', 'scss'),
os.path.join(PROJECT_DIR, 'static', 'scss', 'foundation', 'scss'),
os.path.join('static', 'scss', 'foundation', 'scss'),
# static/scss/foundation/scss/foundation.scss
] ]
SASS_PROCESSOR_AUTO_INCLUDE = False SASS_PROCESSOR_AUTO_INCLUDE = False
@ -491,4 +495,3 @@ if AWS_SECRET_ACCESS_KEY:
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
else: else:
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'

25
setup.py Normal file
View File

@ -0,0 +1,25 @@
import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='regluit',
version='3.0.0',
description='Web application for Unglue.it',
author='Free Ebook Foundation',
author_email='info@ebookfoundation.org',
url='https://unglue.it',
packages=find_packages(exclude=[
'bookdata',
'deploy'
'logs',
'selenium',
'static',
'vagrant',
]),
)

5
start.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
django-admin.py celeryd --loglevel=INFO &
django-admin.py celerybeat -l INFO &
django-admin.py runserver 0.0.0.0:8000

View File

@ -0,0 +1,3 @@
.annotator-adder {
width: 80px;
}

817
static/css/reader/main.css Executable file
View File

@ -0,0 +1,817 @@
@font-face {
font-family: 'fontello';
src: url('../../fonts/fontello.eot?60518104');
src: url('../../fonts/fontello.eot?60518104#iefix') format('embedded-opentype'),
url('../../fonts/fontello.woff?60518104') format('woff'),
url('../../fonts/fontello.ttf?60518104') format('truetype'),
url('../../fonts/fontello.svg?60518104#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
body {
background: #4e4e4e;
overflow: hidden;
}
#main {
/* height: 500px; */
position: absolute;
width: 100%;
height: 100%;
right: 0;
/* left: 40px; */
/* -webkit-transform: translate(40px, 0);
-moz-transform: translate(40px, 0); */
/* border-radius: 5px 0px 0px 5px; */
border-radius: 5px;
background: #fff;
overflow: hidden;
-webkit-transition: -webkit-transform .4s, width .2s;
-moz-transition: -webkit-transform .4s, width .2s;
-ms-transition: -webkit-transform .4s, width .2s;
-moz-box-shadow: inset 0 0 50px rgba(0,0,0,.1);
-webkit-box-shadow: inset 0 0 50px rgba(0,0,0,.1);
-ms-box-shadow: inset 0 0 50px rgba(0,0,0,.1);
box-shadow: inset 0 0 50px rgba(0,0,0,.1);
}
#titlebar {
height: 8%;
min-height: 20px;
padding: 10px;
/* margin: 0 50px 0 50px; */
position: relative;
color: #4f4f4f;
font-weight: 100;
font-family: Georgia, "Times New Roman", Times, serif;
opacity: .5;
text-align: center;
-webkit-transition: opacity .5s;
-moz-transition: opacity .5s;
-ms-transition: opacity .5s;
z-index: 10;
}
#titlebar:hover {
opacity: 1;
}
#titlebar a {
width: 18px;
height: 19px;
line-height: 20px;
overflow: hidden;
display: inline-block;
opacity: .5;
padding: 4px;
border-radius: 4px;
}
#titlebar a::before {
visibility: visible;
}
#titlebar a:hover {
opacity: .8;
border: 1px rgba(0,0,0,.2) solid;
padding: 3px;
}
#titlebar a:active {
opacity: 1;
color: rgba(0,0,0,.6);
/* margin: 1px -1px -1px 1px; */
-moz-box-shadow: inset 0 0 6px rgba(155,155,155,.8);
-webkit-box-shadow: inset 0 0 6px rgba(155,155,155,.8);
-ms-box-shadow: inset 0 0 6px rgba(155,155,155,.8);
box-shadow: inset 0 0 6px rgba(155,155,155,.8);
}
#book-title {
font-weight: 600;
}
#title-seperator {
display: none;
}
#viewer {
width: 80%;
height: 80%;
/* margin-left: 10%; */
margin: 0 auto;
max-width: 1250px;
z-index: 2;
position: relative;
overflow: hidden;
}
#viewer iframe {
border: none;
}
#prev {
left: 40px;
}
#next {
right: 40px;
}
.arrow {
position: absolute;
top: 50%;
margin-top: -32px;
font-size: 64px;
color: #E2E2E2;
font-family: arial, sans-serif;
font-weight: bold;
cursor: pointer;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.arrow:hover {
color: #777;
}
.arrow:active,
.arrow.active {
color: #000;
}
#sidebar {
background: #6b6b6b;
position: absolute;
/* left: -260px; */
/* -webkit-transform: translate(-260px, 0);
-moz-transform: translate(-260px, 0); */
top: 0;
min-width: 300px;
width: 25%;
height: 100%;
-webkit-transition: -webkit-transform .5s;
-moz-transition: -moz-transform .5s;
-ms-transition: -moz-transform .5s;
overflow: hidden;
}
#sidebar.open {
/* left: 0; */
/* -webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0); */
}
#main.closed {
/* left: 300px; */
-webkit-transform: translate(300px, 0);
-moz-transform: translate(300px, 0);
-ms-transform: translate(300px, 0);
}
#main.single {
width: 75%;
}
#main.single #viewer {
/* width: 60%;
margin-left: 20%; */
}
#panels {
background: #4e4e4e;
position: absolute;
left: 0;
top: 0;
width: 100%;
padding: 13px 0;
height: 14px;
-moz-box-shadow: 0px 1px 3px rgba(0,0,0,.6);
-webkit-box-shadow: 0px 1px 3px rgba(0,0,0,.6);
-ms-box-shadow: 0px 1px 3px rgba(0,0,0,.6);
box-shadow: 0px 1px 3px rgba(0,0,0,.6);
}
#opener {
/* padding: 10px 10px; */
float: left;
}
/* #opener #slider {
width: 25px;
} */
#metainfo {
display: inline-block;
text-align: center;
max-width: 80%;
}
#title-controls {
float: right;
}
#panels a {
visibility: hidden;
width: 18px;
height: 20px;
overflow: hidden;
display: inline-block;
color: #ccc;
margin-left: 6px;
}
#panels a::before {
visibility: visible;
}
#panels a:hover {
color: #AAA;
}
#panels a:active {
color: #AAA;
margin: 1px 0 -1px 6px;
}
#panels a.active,
#panels a.active:hover {
color: #AAA;
}
#searchBox {
width: 165px;
float: left;
margin-left: 10px;
margin-top: -1px;
/*
border-radius: 5px;
background: #9b9b9b;
float: left;
margin-left: 5px;
margin-top: -5px;
padding: 3px 10px;
color: #000;
border: none;
outline: none; */
}
input::-webkit-input-placeholder {
color: #454545;
}
input:-moz-placeholder {
color: #454545;
}
input:-ms-placeholder {
color: #454545;
}
#divider {
position: absolute;
width: 1px;
border-right: 1px #000 solid;
height: 80%;
z-index: 1;
left: 50%;
margin-left: -1px;
top: 10%;
opacity: .15;
box-shadow: -2px 0 15px rgba(0, 0, 0, 1);
display: none;
}
#divider.show {
display: block;
}
#loader {
position: absolute;
z-index: 10;
left: 50%;
top: 50%;
margin: -33px 0 0 -33px;
}
#tocView,
#bookmarksView {
overflow-x: hidden;
overflow-y: hidden;
min-width: 300px;
width: 25%;
height: 100%;
visibility: hidden;
-webkit-transition: visibility 0 ease .5s;
-moz-transition: visibility 0 ease .5s;
-ms-transition: visibility 0 ease .5s;
}
#sidebar.open #tocView,
#sidebar.open #bookmarksView {
overflow-y: auto;
visibility: visible;
-webkit-transition: visibility 0 ease 0;
-moz-transition: visibility 0 ease 0;
-ms-transition: visibility 0 ease 0;
}
#sidebar.open #tocView {
display: block;
}
#tocView > ul,
#bookmarksView > ul {
margin-top: 15px;
margin-bottom: 50px;
padding-left: 20px;
display: block;
}
#tocView li,
#bookmarksView li {
margin-bottom:10px;
width: 225px;
font-family: Georgia, "Times New Roman", Times, serif;
list-style: none;
text-transform: capitalize;
}
#tocView li:active,
#tocView li.currentChapter
{
list-style: none;
}
.list_item a {
color: #AAA;
text-decoration: none;
}
.list_item a.chapter {
font-size: 1em;
}
.list_item a.section {
font-size: .8em;
}
.list_item.currentChapter > a,
.list_item a:hover {
color: #f1f1f1
}
/* #tocView li.openChapter > a, */
.list_item a:hover {
color: #E2E2E2;
}
.list_item ul {
padding-left:10px;
margin-top: 8px;
display: none;
}
.list_item.currentChapter > ul,
.list_item.openChapter > ul {
display: block;
}
#tocView.hidden {
display: none;
}
.toc_toggle {
display: inline-block;
width: 14px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.toc_toggle:before {
content: '▸';
color: #fff;
margin-right: -4px;
}
.currentChapter > .toc_toggle:before,
.openChapter > .toc_toggle:before {
content: '▾';
}
.view {
width: 300px;
height: 100%;
display: none;
padding-top: 50px;
overflow-y: auto;
}
#searchResults {
margin-bottom: 50px;
padding-left: 20px;
display: block;
}
#searchResults li {
margin-bottom:10px;
width: 225px;
font-family: Georgia, "Times New Roman", Times, serif;
list-style: none;
}
#searchResults a {
color: #AAA;
text-decoration: none;
}
#searchResults p {
text-decoration: none;
font-size: 12px;
line-height: 16px;
}
#searchResults p .match {
background: #ccc;
color: #000;
}
#searchResults li > p {
color: #AAA;
}
#searchResults li a:hover {
color: #E2E2E2;
}
#searchView.shown {
display: block;
overflow-y: scroll;
}
#notes {
padding: 0 0 0 34px;
}
#notes li {
color: #eee;
font-size: 12px;
width: 240px;
border-top: 1px #fff solid;
padding-top: 6px;
margin-bottom: 6px;
}
#notes li a {
color: #fff;
display: inline-block;
margin-left: 6px;
}
#notes li a:hover {
text-decoration: underline;
}
#notes li img {
max-width: 240px;
}
#note-text {
display: block;
width: 260px;
height: 80px;
margin: 0 auto;
padding: 5px;
border-radius: 5px;
}
#note-text[disabled], #note-text[disabled="disabled"]{
opacity: .5;
}
#note-anchor {
margin-left: 218px;
margin-top: 5px;
}
#settingsPanel {
display:none;
}
#settingsPanel h3 {
color:#f1f1f1;
font-family:Georgia, "Times New Roman", Times, serif;
margin-bottom:10px;
}
#settingsPanel ul {
margin-top:60px;
list-style-type:none;
}
#settingsPanel li {
font-size:1em;
color:#f1f1f1;
}
#settingsPanel .xsmall { font-size:x-small; }
#settingsPanel .small { font-size:small; }
#settingsPanel .medium { font-size:medium; }
#settingsPanel .large { font-size:large; }
#settingsPanel .xlarge { font-size:x-large; }
.highlight { background-color: yellow }
.modal {
position: fixed;
top: 50%;
left: 50%;
width: 50%;
width: 630px;
height: auto;
z-index: 2000;
visibility: hidden;
margin-left: -320px;
margin-top: -160px;
}
.overlay {
position: fixed;
width: 100%;
height: 100%;
visibility: hidden;
top: 0;
left: 0;
z-index: 1000;
opacity: 0;
background: rgba(255,255,255,0.8);
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-ms-transition: all 0.3s;
transition: all 0.3s;
}
.md-show {
visibility: visible;
}
.md-show ~ .overlay {
opacity: 1;
visibility: visible;
}
/* Content styles */
.md-content {
color: #fff;
background: #6b6b6b;
position: relative;
border-radius: 3px;
margin: 0 auto;
height: 320px;
}
.md-content h3 {
margin: 0;
padding: 6px;
text-align: center;
font-size: 22px;
font-weight: 300;
opacity: 0.8;
background: rgba(0,0,0,0.1);
border-radius: 3px 3px 0 0;
}
.md-content > div {
padding: 15px 40px 30px;
margin: 0;
font-weight: 300;
font-size: 14px;
}
.md-content > div p {
margin: 0;
padding: 10px 0;
}
.md-content > div ul {
margin: 0;
padding: 0 0 30px 20px;
}
.md-content > div ul li {
padding: 5px 0;
}
.md-content button {
display: block;
margin: 0 auto;
font-size: 0.8em;
}
/* Effect 1: Fade in and scale up */
.md-effect-1 .md-content {
-webkit-transform: scale(0.7);
-moz-transform: scale(0.7);
-ms-transform: scale(0.7);
transform: scale(0.7);
opacity: 0;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-ms-transition: all 0.3s;
transition: all 0.3s;
}
.md-show.md-effect-1 .md-content {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
opacity: 1;
}
.md-content > .closer {
font-size: 18px;
position: absolute;
right: 0;
top: 0;
font-size: 24px;
padding: 4px;
}
@media only screen and (max-width: 1040px) {
#viewer{
width: 50%;
margin-left: 25%;
}
#divider,
#divider.show {
display: none;
}
}
@media only screen and (max-width: 900px) {
#viewer{
width: 60%;
margin-left: 20%;
}
#prev {
left: 20px;
}
#next {
right: 20px;
}
}
@media only screen and (max-width: 550px) {
#viewer{
width: 80%;
margin-left: 10%;
}
#prev {
left: 0;
}
#next {
right: 0;
}
.arrow {
height: 100%;
top: 45px;
width: 10%;
text-indent: -10000px;
}
#main {
-webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0);
-ms-transform: translate(0, 0);
-webkit-transition: -webkit-transform .3s;
-moz-transition: -moz-transform .3s;
-ms-transition: -moz-transform .3s;
}
#main.closed {
-webkit-transform: translate(260px, 0);
-moz-transform: translate(260px, 0);
-ms-transform: translate(260px, 0);
}
#titlebar {
/* font-size: 16px; */
/* margin: 0 50px 0 50px; */
}
#metainfo {
font-size: 10px;
}
#tocView {
width: 260px;
}
#tocView li {
font-size: 12px;
}
#tocView > ul{
padding-left: 10px;
}
}
/* For iPad portrait layouts only */
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: portrait) {
#viewer iframe {
width: 460px;
height: 740px;
}
}
/*For iPad landscape layouts only */
@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation: landscape) {
#viewer iframe {
width: 460px;
height: 415px;
}
}
/* For iPhone portrait layouts only */
@media only screen and (max-device-width: 480px) and (orientation: portrait) {
#viewer {
width: 256px;
height: 432px;
}
#viewer iframe {
width: 256px;
height: 432px;
}
}
/* For iPhone landscape layouts only */
@media only screen and (max-device-width: 480px) and (orientation: landscape) {
#viewer iframe {
width: 256px;
height: 124px;
}
}
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "fontello";
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* you can be more comfortable with increased icons size */
font-size: 112%;
}
.icon-search:before { content: '\e807'; } /* '' */
.icon-resize-full-1:before { content: '\e804'; } /* '' */
.icon-cancel-circled2:before { content: '\e80f'; } /* '' */
.icon-link:before { content: '\e80d'; } /* '' */
.icon-bookmark:before { content: '\e805'; } /* '' */
.icon-bookmark-empty:before { content: '\e806'; } /* '' */
.icon-download-cloud:before { content: '\e811'; } /* '' */
.icon-edit:before { content: '\e814'; } /* '' */
.icon-menu:before { content: '\e802'; } /* '' */
.icon-cog:before { content: '\e813'; } /* '' */
.icon-resize-full:before { content: '\e812'; } /* '' */
.icon-cancel-circled:before { content: '\e80e'; } /* '' */
.icon-up-dir:before { content: '\e80c'; } /* '' */
.icon-right-dir:before { content: '\e80b'; } /* '' */
.icon-angle-right:before { content: '\e809'; } /* '' */
.icon-angle-down:before { content: '\e80a'; } /* '' */
.icon-right:before { content: '\e815'; } /* '' */
.icon-list-1:before { content: '\e803'; } /* '' */
.icon-list-numbered:before { content: '\e801'; } /* '' */
.icon-columns:before { content: '\e810'; } /* '' */
.icon-list:before { content: '\e800'; } /* '' */
.icon-resize-small:before { content: '\e808'; } /* '' */

505
static/css/reader/normalize.css vendored Executable file
View File

@ -0,0 +1,505 @@
/*! normalize.css v1.0.1 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/*
* Corrects `block` display not defined in IE 6/7/8/9 and Firefox 3.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block;
}
/*
* Corrects `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
*/
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
/*
* Prevents modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/*
* Addresses styling for `hidden` attribute not present in IE 7/8/9, Firefox 3,
* and Safari 4.
* Known issue: no IE 6 support.
*/
[hidden] {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/*
* 1. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using
* `em` units.
* 2. Prevents iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-size: 100%; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
/*
* Addresses `font-family` inconsistency between `textarea` and other form
* elements.
*/
html,
button,
input,
select,
textarea {
font-family: sans-serif;
}
/*
* Addresses margins handled incorrectly in IE 6/7.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/*
* Addresses `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/*
* Improves readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/*
* Addresses font sizes and margins set differently in IE 6/7.
* Addresses font sizes within `section` and `article` in Firefox 4+, Safari 5,
* and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
h3 {
font-size: 1.17em;
margin: 1em 0;
}
h4 {
font-size: 1em;
margin: 1.33em 0;
}
h5 {
font-size: 0.83em;
margin: 1.67em 0;
}
h6 {
font-size: 0.75em;
margin: 2.33em 0;
}
/*
* Addresses styling not present in IE 7/8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/*
* Addresses style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
blockquote {
margin: 1em 40px;
}
/*
* Addresses styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/*
* Addresses styling not present in IE 6/7/8/9.
*/
mark {
background: #ff0;
color: #000;
}
/*
* Addresses margins set differently in IE 6/7.
*/
p,
pre {
margin: 1em 0;
}
/*
* Corrects font family set oddly in IE 6, Safari 4/5, and Chrome.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em;
}
/*
* Improves readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/*
* Addresses CSS quotes not supported in IE 6/7.
*/
q {
quotes: none;
}
/*
* Addresses `quotes` property not supported in Safari 4.
*/
q:before,
q:after {
content: '';
content: none;
}
/*
* Addresses inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/*
* Prevents `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Lists
========================================================================== */
/*
* Addresses margins set differently in IE 6/7.
*/
dl,
menu,
ol,
ul {
margin: 1em 0;
}
dd {
margin: 0 0 0 40px;
}
/*
* Addresses paddings set differently in IE 6/7.
*/
menu,
ol,
ul {
padding: 0 0 0 40px;
}
/*
* Corrects list images handled incorrectly in IE 7.
*/
nav ul,
nav ol {
list-style: none;
list-style-image: none;
}
/* ==========================================================================
Embedded content
========================================================================== */
/*
* 1. Removes border when inside `a` element in IE 6/7/8/9 and Firefox 3.
* 2. Improves image quality when scaled in IE 7.
*/
img {
border: 0; /* 1 */
-ms-interpolation-mode: bicubic; /* 2 */
}
/*
* Corrects overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/*
* Addresses margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/*
* Corrects margin displayed oddly in IE 6/7.
*/
form {
margin: 0;
}
/*
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/*
* 1. Corrects color not being inherited in IE 6/7/8/9.
* 2. Corrects text not wrapping in Firefox 3.
* 3. Corrects alignment displayed oddly in IE 6/7.
*/
legend {
border: 0; /* 1 */
padding: 0;
white-space: normal; /* 2 */
*margin-left: -7px; /* 3 */
}
/*
* 1. Corrects font size not being inherited in all browsers.
* 2. Addresses margins set differently in IE 6/7, Firefox 3+, Safari 5,
* and Chrome.
* 3. Improves appearance and consistency in all browsers.
*/
button,
input,
select,
textarea {
font-size: 100%; /* 1 */
margin: 0; /* 2 */
vertical-align: baseline; /* 3 */
*vertical-align: middle; /* 3 */
}
/*
* Addresses Firefox 3+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
button,
input {
line-height: normal;
}
/*
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Corrects inability to style clickable `input` types in iOS.
* 3. Improves usability and consistency of cursor style between image-type
* `input` and others.
* 4. Removes inner spacing in IE 7 without affecting normal text inputs.
* Known issue: inner spacing remains in IE 6.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
*overflow: visible; /* 4 */
}
/*
* Re-set default cursor for disabled elements.
*/
button[disabled],
input[disabled] {
cursor: default;
}
/*
* 1. Addresses box sizing set to content-box in IE 8/9.
* 2. Removes excess padding in IE 8/9.
* 3. Removes excess padding in IE 7.
* Known issue: excess padding remains in IE 6.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
*height: 13px; /* 3 */
*width: 13px; /* 3 */
}
/*
* 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
/*
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
*/
/*
* Removes inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
/* input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
} */
/*
* Removes inner padding and border in Firefox 3+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/*
* 1. Removes default vertical scrollbar in IE 6/7/8/9.
* 2. Improves readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/*
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}

View File

@ -0,0 +1,96 @@
/* http://davidwalsh.name/css-tooltips */
/* base CSS element */
.popup {
background: #eee;
border: 1px solid #ccc;
padding: 10px;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
position: fixed;
max-width: 300px;
font-size: 12px;
display: none;
margin-left: 2px;
margin-top: 30px;
}
.popup.above {
margin-top: -10px;
}
.popup.left {
margin-left: -20px;
}
.popup.right {
margin-left: 40px;
}
.pop_content {
max-height: 225px;
overflow-y: auto;
}
.pop_content > p {
margin-top: 0;
}
/* below */
.popup:before {
position: absolute;
display: inline-block;
border-bottom: 10px solid #eee;
border-right: 10px solid transparent;
border-left: 10px solid transparent;
border-bottom-color: rgba(0, 0, 0, 0.2);
left: 50%;
top: -10px;
margin-left: -6px;
content: '';
}
.popup:after {
position: absolute;
display: inline-block;
border-bottom: 9px solid #eee;
border-right: 9px solid transparent;
border-left: 9px solid transparent;
left: 50%;
top: -9px;
margin-left: -5px;
content: '';
}
/* above */
.popup.above:before {
border-bottom: none;
border-top: 10px solid #eee;
border-top-color: rgba(0, 0, 0, 0.2);
top: 100%;
}
.popup.above:after {
border-bottom: none;
border-top: 9px solid #eee;
top: 100%;
}
.popup.left:before,
.popup.left:after
{
left: 20px;
}
.popup.right:before,
.popup.right:after
{
left: auto;
right: 20px;
}
.popup.show, .popup.on {
display: block;
}

BIN
static/fonts/fontello.eot Normal file

Binary file not shown.

33
static/fonts/fontello.svg Normal file
View File

@ -0,0 +1,33 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2013 by original authors @ fontello.com</metadata>
<defs>
<font id="fontello" horiz-adv-x="1000" >
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="search" unicode="&#xe807;" d="m643 386q0 103-74 176t-176 74t-177-74t-73-176t73-177t177-73t176 73t74 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69q-80 0-153 31t-125 84t-84 125t-31 153t31 152t84 126t125 84t153 31t152-31t126-84t84-126t31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
<glyph glyph-name="resize-full-1" unicode="&#xe804;" d="m784 111l127 128l0-336l-335 0l128 130l-128 127l79 79z m-431 686l-129-127l128-127l-80-80l-126 128l-128-129l0 335l335 0z m0-637l-129-127l129-130l-335 0l0 336l128-128l128 128z m558 637l0-335l-127 129l-128-128l-79 80l127 127l-128 127l335 0z" horiz-adv-x="928" />
<glyph glyph-name="cancel-circled2" unicode="&#xe80f;" d="m612 248l-81-82q-6-5-13-5t-13 5l-76 77l-77-77q-5-5-13-5t-13 5l-81 82q-6 5-6 13t6 13l76 76l-76 76q-6 6-6 13t6 13l81 82q6 5 13 5t13-5l77-77l76 77q6 5 13 5t13-5l81-82q6-5 6-13t-6-13l-76-76l76-76q6-6 6-13t-6-13z m120 102q0 83-41 152t-110 111t-152 41t-153-41t-110-111t-41-152t41-152t110-111t153-41t152 41t110 111t41 152z m125 0q0-117-57-215t-156-156t-215-58t-216 58t-155 156t-58 215t58 215t155 156t216 58t215-58t156-156t57-215z" horiz-adv-x="857.1" />
<glyph glyph-name="link" unicode="&#xe80d;" d="m812 171q0 23-15 38l-116 116q-16 16-38 16q-24 0-40-18q1-1 10-10t12-12t9-11t7-14t2-15q0-23-16-38t-38-16q-8 0-15 2t-14 7t-11 9t-12 12t-10 10q-19-17-19-40q0-23 16-38l115-116q15-15 38-15q22 0 38 15l82 81q15 16 15 37z m-392 394q0 22-15 38l-115 115q-16 16-38 16q-22 0-38-15l-82-82q-16-15-16-37q0-22 16-38l116-116q15-15 38-15q23 0 40 17q-2 2-11 11t-12 12t-8 10t-7 14t-2 16q0 22 15 38t38 15q9 0 16-2t14-7t10-8t12-12t11-11q18 17 18 41z m500-394q0-67-48-113l-82-81q-46-47-113-47q-68 0-114 48l-115 115q-46 47-46 114q0 68 49 116l-49 49q-48-49-116-49q-67 0-114 47l-116 116q-47 47-47 114t47 113l82 82q47 46 114 46q67 0 114-47l114-116q47-46 47-113q0-69-49-117l49-49q48 49 116 49q67 0 114-47l116-116q47-47 47-114z" horiz-adv-x="928.6" />
<glyph glyph-name="bookmark" unicode="&#xe805;" d="m650 779q12 0 24-5q19-8 29-23t11-35v-719q0-19-11-35t-29-23q-10-4-24-4q-27 0-47 18l-246 236l-246-236q-20-19-46-19q-13 0-25 5q-18 7-29 23t-11 35v719q0 19 11 35t29 23q12 5 25 5h585z" horiz-adv-x="714.3" />
<glyph glyph-name="bookmark-empty" unicode="&#xe806;" d="m643 707h-572v-693l237 227l49 47l50-47l236-227v693z m7 72q12 0 24-5q19-8 29-23t11-35v-719q0-19-11-35t-29-23q-10-4-24-4q-27 0-47 18l-246 236l-246-236q-20-19-46-19q-13 0-25 5q-18 7-29 23t-11 35v719q0 19 11 35t29 23q12 5 25 5h585z" horiz-adv-x="714.3" />
<glyph glyph-name="download-cloud" unicode="&#xe811;" d="m714 332q0 8-5 13t-13 5h-125v196q0 8-5 13t-12 5h-108q-7 0-12-5t-5-13v-196h-125q-8 0-13-5t-5-13q0-8 5-13l196-196q5-5 13-5t13 5l196 196q5 6 5 13z m357-125q0-89-62-151t-152-63h-607q-103 0-177 73t-73 177q0 72 39 134t105 92q-1 17-1 24q0 118 84 202t202 84q87 0 159-49t105-129q40 35 93 35q59 0 101-42t42-101q0-43-23-77q72-17 119-76t46-133z" horiz-adv-x="1071.4" />
<glyph glyph-name="edit" unicode="&#xe814;" d="m496 189l64 65l-85 85l-64-65v-31h53v-54h32z m245 402q-9 9-18 0l-196-196q-9-9 0-18t18 0l196 196q9 9 0 18z m45-331v-106q0-67-47-114t-114-47h-464q-67 0-114 47t-47 114v464q0 66 47 113t114 48h464q35 0 65-14q9-4 10-13q2-10-5-16l-27-28q-8-8-18-4q-13 3-25 3h-464q-37 0-63-26t-27-63v-464q0-37 27-63t63-27h464q37 0 63 27t26 63v70q0 7 5 12l36 36q8 8 20 4t11-16z m-54 411l161-160l-375-375h-161v160z m248-73l-51-52l-161 161l51 51q16 16 38 16t38-16l85-84q16-16 16-38t-16-38z" horiz-adv-x="1000" />
<glyph glyph-name="menu" unicode="&#xe802;" d="m857 100v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 25t25 11h785q15 0 26-11t10-25z m0 286v-72q0-14-10-25t-26-10h-785q-15 0-25 10t-11 25v72q0 14 11 25t25 10h785q15 0 26-10t10-25z m0 285v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 26t25 10h785q15 0 26-10t10-26z" horiz-adv-x="857.1" />
<glyph glyph-name="cog" unicode="&#xe813;" d="m571 350q0 59-41 101t-101 42t-101-42t-42-101t42-101t101-42t101 42t41 101z m286 61v-124q0-7-4-13t-11-7l-104-16q-10-30-21-51q19-27 59-77q6-6 6-13t-5-13q-15-21-55-61t-53-39q-7 0-14 5l-77 60q-25-13-51-21q-9-76-16-104q-4-16-20-16h-124q-8 0-14 5t-6 12l-16 103q-27 9-50 21l-79-60q-6-5-14-5q-8 0-14 6q-70 64-92 94q-4 5-4 13q0 6 5 12q8 12 28 37t30 40q-15 28-23 55l-102 15q-7 1-11 7t-5 13v124q0 7 5 13t10 7l104 16q8 25 22 51q-23 32-60 77q-6 7-6 14q0 5 5 12q15 20 55 60t53 40q7 0 15-5l77-60q24 13 50 21q9 76 17 104q3 15 20 15h124q7 0 13-4t7-12l15-103q28-9 50-21l80 60q5 5 13 5q7 0 14-5q72-67 92-95q4-5 4-13q0-6-4-12q-9-12-29-38t-30-39q14-28 23-55l102-15q7-1 12-7t4-13z" horiz-adv-x="857.1" />
<glyph glyph-name="resize-full" unicode="&#xe812;" d="m421 261q0-8-5-13l-185-185l80-81q10-10 10-25t-10-25t-25-11h-250q-15 0-25 11t-11 25v250q0 15 11 25t25 11t25-11l80-80l185 185q6 6 13 6t13-6l64-63q5-6 5-13z m436 482v-250q0-15-10-25t-26-11t-25 11l-80 80l-185-185q-6-6-13-6t-13 6l-64 63q-5 6-5 13t5 13l186 185l-81 81q-10 10-10 25t10 25t25 11h250q15 0 26-11t10-25z" horiz-adv-x="857.1" />
<glyph glyph-name="cancel-circled" unicode="&#xe80e;" d="m641 224q0 14-10 25l-101 101l101 101q10 11 10 25q0 15-10 26l-51 50q-10 11-25 11q-15 0-25-11l-101-101l-101 101q-11 11-26 11q-15 0-25-11l-50-50q-11-11-11-26q0-14 11-25l101-101l-101-101q-11-11-11-25q0-15 11-26l50-50q10-11 25-11q15 0 26 11l101 101l101-101q10-11 25-11q15 0 25 11l51 50q10 11 10 26z m216 126q0-117-57-215t-156-156t-215-58t-216 58t-155 156t-58 215t58 215t155 156t216 58t215-58t156-156t57-215z" horiz-adv-x="857.1" />
<glyph glyph-name="up-dir" unicode="&#xe80c;" d="m571 171q0-14-10-25t-25-10h-500q-15 0-25 10t-11 25t11 26l250 250q10 10 25 10t25-10l250-250q10-11 10-26z" horiz-adv-x="571.4" />
<glyph glyph-name="right-dir" unicode="&#xe80b;" d="m321 350q0-14-10-25l-250-250q-11-11-25-11t-25 11t-11 25v500q0 15 11 25t25 11t25-11l250-250q10-10 10-25z" horiz-adv-x="357.1" />
<glyph glyph-name="angle-right" unicode="&#xe809;" d="m332 314q0-7-6-13l-260-260q-5-5-12-5t-13 5l-28 28q-6 6-6 13t6 13l219 219l-219 220q-6 5-6 12t6 13l28 28q5 6 13 6t12-6l260-260q6-5 6-13z" horiz-adv-x="357.1" />
<glyph glyph-name="angle-down" unicode="&#xe80a;" d="m600 439q0-7-6-13l-260-260q-5-5-13-5t-12 5l-260 260q-6 6-6 13t6 13l27 28q6 6 13 6t13-6l219-219l220 219q5 6 13 6t12-6l28-28q6-5 6-13z" horiz-adv-x="642.9" />
<glyph glyph-name="right" unicode="&#xe815;" d="m1000 404v-108q0-7-5-12t-13-5h-696v-125q0-12-11-17t-19 3l-215 196q-5 5-5 12q0 8 5 14l215 197q9 8 19 4q11-5 11-17v-125h696q8 0 13-5t5-12z" horiz-adv-x="1000" />
<glyph glyph-name="list-1" unicode="&#xe803;" d="m143 118v-107q0-7-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 12t13 6h107q7 0 13-6t5-12z m0 214v-107q0-7-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 13t13 5h107q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-107q-7 0-13 6t-5 12v107q0 8 5 13t13 5h107q7 0 13-5t5-13z m857-428v-107q0-7-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 12t12 6h750q7 0 13-6t5-12z m-857 643v-107q0-8-5-13t-13-5h-107q-7 0-13 5t-5 13v107q0 7 5 12t13 6h107q7 0 13-6t5-12z m857-429v-107q0-7-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 13t12 5h750q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-750q-7 0-12 6t-6 12v107q0 8 6 13t12 5h750q7 0 13-5t5-13z m0 215v-107q0-8-5-13t-13-5h-750q-7 0-12 5t-6 13v107q0 7 6 12t12 6h750q7 0 13-6t5-12z" horiz-adv-x="1000" />
<glyph glyph-name="list-numbered" unicode="&#xe801;" d="m213-54q0-45-31-70t-75-26q-60 0-96 37l31 49q28-25 60-25q16 0 28 8t12 24q0 35-59 31l-14 31q4 6 18 24t24 31t20 21v1q-9 0-27-1t-27 0v-30h-59v85h186v-49l-53-65q28-6 45-27t17-49z m1 350v-89h-202q-4 20-4 30q0 29 14 52t31 38t37 27t31 24t14 25q0 14-9 22t-22 7q-25 0-45-32l-47 33q13 28 40 44t59 16q40 0 68-23t28-63q0-28-19-51t-42-36t-42-28t-20-30h71v34h59z m786-178v-107q0-8-5-13t-13-5h-678q-8 0-13 5t-5 13v107q0 8 5 13t13 5h678q7 0 13-6t5-12z m-786 502v-56h-187v56h60q0 22 0 68t1 67v7h-1q-5-10-28-30l-40 42l76 71h59v-225h60z m786-216v-108q0-7-5-12t-13-5h-678q-8 0-13 5t-5 12v108q0 7 5 12t13 5h678q7 0 13-5t5-12z m0 285v-107q0-7-5-12t-13-6h-678q-8 0-13 6t-5 12v107q0 8 5 13t13 5h678q7 0 13-5t5-13z" horiz-adv-x="1000" />
<glyph glyph-name="columns" unicode="&#xe810;" d="m89-7h340v643h-358v-625q0-8 6-13t12-5z m768 18v625h-357v-643h339q8 0 13 5t5 13z m72 678v-678q0-37-27-63t-63-27h-750q-36 0-63 27t-26 63v678q0 37 26 63t63 27h750q37 0 63-27t27-63z" horiz-adv-x="928.6" />
<glyph glyph-name="list" unicode="&#xe800;" d="m100 200q20 0 35-15t15-35t-15-35t-35-15l-50 0q-20 0-35 15t-15 35t14 35t36 15l50 0z m0 200q20 0 35-15t15-35t-15-35t-35-15l-50 0q-20 0-35 15t-15 35t14 35t36 15l50 0z m0 200q20 0 35-15t15-35t-15-35t-35-15l-50 0q-20 0-35 15t-15 35t14 35t36 15l50 0z m200-100q-20 0-35 15t-15 35t15 35t35 15l350 0q22 0 36-15t14-35t-15-35t-35-15l-350 0z m350-100q22 0 36-15t14-35t-15-35t-35-15l-350 0q-20 0-35 15t-15 35t15 35t35 15l350 0z m0-200q22 0 36-15t14-35t-15-35t-35-15l-350 0q-20 0-35 15t-15 35t15 35t35 15l350 0z" horiz-adv-x="700" />
<glyph glyph-name="resize-small" unicode="&#xe808;" d="m429 314v-250q0-14-11-25t-25-10t-25 10l-81 81l-185-186q-5-5-13-5t-13 5l-63 64q-6 5-6 13t6 13l185 185l-80 80q-11 11-11 25t11 25t25 11h250q14 0 25-11t11-25z m421 375q0-7-6-13l-185-185l80-80q11-11 11-25t-11-25t-25-11h-250q-14 0-25 11t-10 25v250q0 14 10 25t25 10t25-10l81-81l185 186q6 5 13 5t13-5l63-64q6-5 6-13z" horiz-adv-x="857.1" />
</font>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
static/fonts/fontello.ttf Normal file

Binary file not shown.

BIN
static/fonts/fontello.woff Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -1,14 +0,0 @@
var $j = jQuery.noConflict();
$j().ready(function(){
var contentblock = $j('#content-block, .user-block-hide');
contentblock.on('mouseenter', '.panelview', function() {
$j(this).children('.panelfront').removeClass('side1').addClass('side2');
$j(this).children('.panelback').removeClass('side2').addClass('side1');
});
contentblock.on('mouseleave', '.panelview', function() {
$j(this).children('.panelback').removeClass('side1').addClass('side2');
$j(this).children('.panelfront').removeClass('side2').addClass('side1');
});
});

5
static/js/jquery-1.12.4.min.js vendored Normal file

File diff suppressed because one or more lines are too long

8
static/js/reader/epub.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
static/js/reader/hooks.min.js vendored Normal file
View File

@ -0,0 +1 @@
EPUBJS.Hooks.register("beforeChapterDisplay").endnotes=function(a,b){var c=b.contents.querySelectorAll("a[href]"),d=Array.prototype.slice.call(c),e=EPUBJS.core.folder(location.pathname),f=(EPUBJS.cssPath,{});EPUBJS.core.addCss(EPUBJS.cssPath+"popup.css",!1,b.render.document.head),d.forEach(function(a){function c(){var c,h,n=b.height,o=b.width,p=225;m||(c=j.cloneNode(!0),m=c.querySelector("p")),f[i]||(f[i]=document.createElement("div"),f[i].setAttribute("class","popup"),pop_content=document.createElement("div"),f[i].appendChild(pop_content),pop_content.appendChild(m),pop_content.setAttribute("class","pop_content"),b.render.document.body.appendChild(f[i]),f[i].addEventListener("mouseover",d,!1),f[i].addEventListener("mouseout",e,!1),b.on("renderer:pageChanged",g,this),b.on("renderer:pageChanged",e,this)),c=f[i],h=a.getBoundingClientRect(),k=h.left,l=h.top,c.classList.add("show"),popRect=c.getBoundingClientRect(),c.style.left=k-popRect.width/2+"px",c.style.top=l+"px",p>n/2.5&&(p=n/2.5,pop_content.style.maxHeight=p+"px"),popRect.height+l>=n-25?(c.style.top=l-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),k-popRect.width<=0?(c.style.left=k+"px",c.classList.add("left")):c.classList.remove("left"),k+popRect.width/2>=o?(c.style.left=k-300+"px",popRect=c.getBoundingClientRect(),c.style.left=k-popRect.width+"px",popRect.height+l>=n-25?(c.style.top=l-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),c.classList.add("right")):c.classList.remove("right")}function d(){f[i].classList.add("on")}function e(){f[i].classList.remove("on")}function g(){setTimeout(function(){f[i].classList.remove("show")},100)}var h,i,j,k,l,m;"noteref"==a.getAttribute("epub:type")&&(h=a.getAttribute("href"),i=h.replace("#",""),j=b.render.document.getElementById(i),a.addEventListener("mouseover",c,!1),a.addEventListener("mouseout",g,!1))}),a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").mathml=function(a,b){if(b.currentChapter.manifestProperties.indexOf("mathml")!==-1){b.render.iframe.contentWindow.mathmlCallback=a;var c=document.createElement("script");c.type="text/x-mathjax-config",c.innerHTML=' MathJax.Hub.Register.StartupHook("End",function () { window.mathmlCallback(); }); MathJax.Hub.Config({jax: ["input/TeX","input/MathML","output/SVG"],extensions: ["tex2jax.js","mml2jax.js","MathEvents.js"],TeX: {extensions: ["noErrors.js","noUndefined.js","autoload-all.js"]},MathMenu: {showRenderer: false},menuSettings: {zoom: "Click"},messageStyle: "none"}); ',b.doc.body.appendChild(c),EPUBJS.core.addScript("http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",null,b.doc.head)}else a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").smartimages=function(a,b){var c=b.contents.querySelectorAll("img"),d=Array.prototype.slice.call(c),e=b.height;if("reflowable"!=b.layoutSettings.layout)return void a();d.forEach(function(a){var c=function(){var c,d=a.getBoundingClientRect(),f=d.height,g=d.top,h=a.getAttribute("data-height"),i=h||f,j=Number(getComputedStyle(a,"").fontSize.match(/(\d*(\.\d*)?)px/)[1]),k=j?j/2:0;e=b.contents.clientHeight,g<0&&(g=0),a.style.maxWidth="100%",i+g>=e?(g<e/2?(c=e-g-k,a.style.maxHeight=c+"px",a.style.width="auto"):(i>e&&(a.style.maxHeight=e+"px",a.style.width="auto",d=a.getBoundingClientRect(),i=d.height),a.style.display="block",a.style.WebkitColumnBreakBefore="always",a.style.breakBefore="column"),a.setAttribute("data-height",c)):(a.style.removeProperty("max-height"),a.style.removeProperty("margin-top"))},d=function(){b.off("renderer:resized",c),b.off("renderer:chapterUnload",this)};a.addEventListener("load",c,!1),b.on("renderer:resized",c),b.on("renderer:chapterUnload",d),c()}),a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").transculsions=function(a,b){var c=b.contents.querySelectorAll("[transclusion]");Array.prototype.slice.call(c).forEach(function(a){function c(){j=g,k=h,j>chapter.colWidth&&(d=chapter.colWidth/j,j=chapter.colWidth,k*=d),f.width=j,f.height=k}var d,e=a.getAttribute("ref"),f=document.createElement("iframe"),g=a.getAttribute("width"),h=a.getAttribute("height"),i=a.parentNode,j=g,k=h;c(),b.listenUntil("renderer:resized","renderer:chapterUnloaded",c),f.src=e,i.replaceChild(f,a)}),a&&a()};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,14 @@
EPUBJS.Hooks.register("beforeChapterDisplay").highlight = function(callback, renderer){
// EPUBJS.core.addScript("js/libs/jquery.highlight.js", null, renderer.doc.head);
var s = document.createElement("style");
s.innerHTML =".highlight { background: yellow; font-weight: normal; }";
renderer.render.document.head.appendChild(s);
if(callback) callback();
}

4
static/js/reader/libs/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,145 @@
/*!
* screenfull
* v2.0.0 - 2014-12-22
* (c) Sindre Sorhus; MIT License
*/
(function () {
'use strict';
var isCommonjs = typeof module !== 'undefined' && module.exports;
var keyboardAllowed = typeof Element !== 'undefined' && 'ALLOW_KEYBOARD_INPUT' in Element;
var fn = (function () {
var val;
var valLength;
var fnMap = [
[
'requestFullscreen',
'exitFullscreen',
'fullscreenElement',
'fullscreenEnabled',
'fullscreenchange',
'fullscreenerror'
],
// new WebKit
[
'webkitRequestFullscreen',
'webkitExitFullscreen',
'webkitFullscreenElement',
'webkitFullscreenEnabled',
'webkitfullscreenchange',
'webkitfullscreenerror'
],
// old WebKit (Safari 5.1)
[
'webkitRequestFullScreen',
'webkitCancelFullScreen',
'webkitCurrentFullScreenElement',
'webkitCancelFullScreen',
'webkitfullscreenchange',
'webkitfullscreenerror'
],
[
'mozRequestFullScreen',
'mozCancelFullScreen',
'mozFullScreenElement',
'mozFullScreenEnabled',
'mozfullscreenchange',
'mozfullscreenerror'
],
[
'msRequestFullscreen',
'msExitFullscreen',
'msFullscreenElement',
'msFullscreenEnabled',
'MSFullscreenChange',
'MSFullscreenError'
]
];
var i = 0;
var l = fnMap.length;
var ret = {};
for (; i < l; i++) {
val = fnMap[i];
if (val && val[1] in document) {
for (i = 0, valLength = val.length; i < valLength; i++) {
ret[fnMap[0][i]] = val[i];
}
return ret;
}
}
return false;
})();
var screenfull = {
request: function (elem) {
var request = fn.requestFullscreen;
elem = elem || document.documentElement;
// Work around Safari 5.1 bug: reports support for
// keyboard in fullscreen even though it doesn't.
// Browser sniffing, since the alternative with
// setTimeout is even worse.
if (/5\.1[\.\d]* Safari/.test(navigator.userAgent)) {
elem[request]();
} else {
elem[request](keyboardAllowed && Element.ALLOW_KEYBOARD_INPUT);
}
},
exit: function () {
document[fn.exitFullscreen]();
},
toggle: function (elem) {
if (this.isFullscreen) {
this.exit();
} else {
this.request(elem);
}
},
raw: fn
};
if (!fn) {
if (isCommonjs) {
module.exports = false;
} else {
window.screenfull = false;
}
return;
}
Object.defineProperties(screenfull, {
isFullscreen: {
get: function () {
return !!document[fn.fullscreenElement];
}
},
element: {
enumerable: true,
get: function () {
return document[fn.fullscreenElement];
}
},
enabled: {
enumerable: true,
get: function () {
// Coerce to boolean in case of old WebKit
return !!document[fn.fullscreenEnabled];
}
}
});
if (isCommonjs) {
module.exports = screenfull;
} else {
window.screenfull = screenfull;
}
})();

View File

@ -0,0 +1,7 @@
/*!
* screenfull
* v1.1.0 - 2013-09-06
* https://github.com/sindresorhus/screenfull.js
* (c) Sindre Sorhus; MIT License
*/
!function(a,b){"use strict";var c="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,d=function(){for(var a,c,d=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenchange","MSFullscreenerror"]],e=0,f=d.length,g={};f>e;e++)if(a=d[e],a&&a[1]in b){for(e=0,c=a.length;c>e;e++)g[d[0][e]]=a[e];return g}return!1}(),e={request:function(a){var e=d.requestFullscreen;a=a||b.documentElement,/5\.1[\.\d]* Safari/.test(navigator.userAgent)?a[e]():a[e](c&&Element.ALLOW_KEYBOARD_INPUT)},exit:function(){b[d.exitFullscreen]()},toggle:function(a){this.isFullscreen?this.exit():this.request(a)},onchange:function(){},onerror:function(){},raw:d};return d?(Object.defineProperties(e,{isFullscreen:{get:function(){return!!b[d.fullscreenElement]}},element:{enumerable:!0,get:function(){return b[d.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return!!b[d.fullscreenEnabled]}}}),b.addEventListener(d.fullscreenchange,function(a){e.onchange.call(e,a)}),b.addEventListener(d.fullscreenerror,function(a){e.onerror.call(e,a)}),a.screenfull=e,void 0):(a.screenfull=!1,void 0)}(window,document);

14
static/js/reader/libs/zip.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,80 @@
// Hypothesis Customized embedding
// This hypothesis config function returns a new constructor which modifies
// annotator for a better integration. Below we create our own EpubAnnotationSidebar
// Constructor, customizing the show and hide function to take acount for the reader UI.
window.hypothesisConfig = function() {
var Annotator = window.Annotator;
var $main = $("#main");
function EpubAnnotationSidebar(elem, options) {
options = {
server: true,
origin: true,
showHighlights: true,
Toolbar: {container: '#annotation-controls'}
}
Annotator.Host.call(this, elem, options);
}
EpubAnnotationSidebar.prototype = Object.create(Annotator.Host.prototype);
EpubAnnotationSidebar.prototype.show = function() {
this.frame.css({
'margin-left': (-1 * this.frame.width()) + "px"
});
this.frame.removeClass('annotator-collapsed');
if (!$main.hasClass('single')) {
$main.addClass("single");
this.toolbar.find('[name=sidebar-toggle]').removeClass('h-icon-chevron-left').addClass('h-icon-chevron-right');
this.setVisibleHighlights(true);
}
};
EpubAnnotationSidebar.prototype.hide = function() {
this.frame.css({
'margin-left': ''
});
this.frame.addClass('annotator-collapsed');
if ($main.hasClass('single')) {
$main.removeClass("single");
this.toolbar.find('[name=sidebar-toggle]').removeClass('h-icon-chevron-right').addClass('h-icon-chevron-left');
this.setVisibleHighlights(false);
}
};
return {
constructor: EpubAnnotationSidebar,
}
};
// This is the Epub.js plugin. Annotations are updated on location change.
EPUBJS.reader.plugins.HypothesisController = function (Book) {
var reader = this;
var $main = $("#main");
var updateAnnotations = function () {
var annotator = Book.renderer.render.window.annotator;
if (annotator && annotator.constructor.$) {
var annotations = getVisibleAnnotations(annotator.constructor.$);
annotator.showAnnotations(annotations)
}
};
var getVisibleAnnotations = function ($) {
var width = Book.renderer.render.iframe.clientWidth;
return $('.annotator-hl').map(function() {
var $this = $(this),
left = this.getBoundingClientRect().left;
if (left >= 0 && left <= width) {
return $this.data('annotation');
}
}).get();
};
Book.on("renderer:locationChanged", updateAnnotations);
return {}
};

View File

@ -0,0 +1,125 @@
EPUBJS.reader.search = {};
// Search Server -- https://github.com/futurepress/epubjs-search
EPUBJS.reader.search.SERVER = "https://pacific-cliffs-3579.herokuapp.com";
EPUBJS.reader.search.request = function(q, callback) {
var fetch = $.ajax({
dataType: "json",
url: EPUBJS.reader.search.SERVER + "/search?q=" + encodeURIComponent(q)
});
fetch.fail(function(err) {
console.error(err);
});
fetch.done(function(results) {
callback(results);
});
};
EPUBJS.reader.plugins.SearchController = function(Book) {
var reader = this;
var $searchBox = $("#searchBox"),
$searchResults = $("#searchResults"),
$searchView = $("#searchView"),
iframeDoc;
var searchShown = false;
var onShow = function() {
query();
searchShown = true;
$searchView.addClass("shown");
};
var onHide = function() {
searchShown = false;
$searchView.removeClass("shown");
};
var query = function() {
var q = $searchBox.val();
if(q == '') {
return;
}
$searchResults.empty();
$searchResults.append("<li><p>Searching...</p></li>");
EPUBJS.reader.search.request(q, function(data) {
var results = data.results;
$searchResults.empty();
if(iframeDoc) {
$(iframeDoc).find('body').unhighlight();
}
if(results.length == 0) {
$searchResults.append("<li><p>No Results Found</p></li>");
return;
}
iframeDoc = $("#viewer iframe")[0].contentDocument;
$(iframeDoc).find('body').highlight(q, { element: 'span' });
results.forEach(function(result) {
var $li = $("<li></li>");
var $item = $("<a href='"+result.href+"' data-cfi='"+result.cfi+"'><span>"+result.title+"</span><p>"+result.highlight+"</p></a>");
$item.on("click", function(e) {
var $this = $(this),
cfi = $this.data("cfi");
e.preventDefault();
Book.gotoCfi(cfi+"/1:0");
Book.on("renderer:chapterDisplayed", function() {
iframeDoc = $("#viewer iframe")[0].contentDocument;
$(iframeDoc).find('body').highlight(q, { element: 'span' });
})
});
$li.append($item);
$searchResults.append($li);
});
});
};
$searchBox.on("search", function(e) {
var q = $searchBox.val();
//-- SearchBox is empty or cleared
if(q == '') {
$searchResults.empty();
if(reader.SidebarController.getActivePanel() == "Search") {
reader.SidebarController.changePanelTo("Toc");
}
$(iframeDoc).find('body').unhighlight();
iframeDoc = false;
return;
}
reader.SidebarController.changePanelTo("Search");
e.preventDefault();
});
return {
"show" : onShow,
"hide" : onHide
};
};

1
static/js/reader/reader.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -11,57 +11,6 @@ $j(document).ready(function() {
var isDownload =$j(this).attr("href").indexOf("download"); var isDownload =$j(this).attr("href").indexOf("download");
var vars = $j(this).attr("href").split("next="); var vars = $j(this).attr("href").split("next=");
$j("#lightbox").load($j(this).attr("href") + " #lightbox_content", function() {
// centering divs of dynamic width: shockingly hard. make sure lightbox is centered on load.
var hijaxWidth = $j('#about_expandable').width() + 28;
var windowWidth = $j(document).width();
var marginWidth = (windowWidth - hijaxWidth)/2;
$j('#about_expandable').css({'margin-left': marginWidth, 'margin-right': marginWidth});
// position div vertically relative to top of viewport, to ensure visibility
// regardless of where on the page the user clicked to activate it
var marginTop = window.pageYOffset;
$j('#about_expandable').css({'margin-top': marginTop});
if (isDownload !== -1) {
$j.getScript('/static/js/download_page.js');
if(typeof(Dropbox) != "undefined"){
Dropbox._dropinsjs_loaded=false;
}
$j.getScript('https://www.dropbox.com/static/api/2/dropins.js');
$j.cookie('next', work_page, {path: '/'});
}
else {
//need to push next cookie for sign-in links
if (vars.length>1){
next=vars[1];
if(next!='') {
next = next.replace(/[\x22\x27\x3c\x3e]/g,'');
$j.cookie('next', next, {path: '/'});
}
}
}
// fade-out rest of page elements on expand
$j('#feedback, #js-page-wrap, #footer').css({"opacity": "0.07"});
$j('#about_expandable').css({'position': 'absolute'});
$j('#about_expandable').fadeTo("slow", 1);
// if we're on a supporter page, personalize our about box
// by writing the supporter's name in
if ($j(location).attr('pathname').slice(0,11) == '/supporter/') {
var ungluer = $j(location).attr('pathname').slice(11, -1);
if (ungluer != null) {
// span.ungluer doesn't exist until the ajax call so we
// can't bind to the DOM on document ready; need to use
// the ajaxComplete event
$j('#lightbox').ajaxComplete(function() {
$j('#lightbox span.ungluer').replaceWith(ungluer);
});
}
}
});
}); });
// fade-in normal page elements on collapse // fade-in normal page elements on collapse
@ -82,4 +31,26 @@ $j(document).ready(function() {
$j('#i_haz_notifications_badge').click(function() { $j('#i_haz_notifications_badge').click(function() {
event.stopPropagation(); event.stopPropagation();
}); });
$j('[toggle-header-menu]').click(function () {toggleVisibility('#top-menu')})
function toggleVisibility(selector) {
var element = document.querySelector(selector);
element.style.visibility = element.style.visibility === 'hidden' ? 'visible' : 'hidden';
}
// Initialize foundation
document.querySelectorAll('[data-drilldown]').forEach(element => {
new Foundation.Drilldown($j(element), {});
});
document.querySelectorAll('[data-dropdown-menu]').forEach(element => {
new Foundation.DropdownMenu($j(element), {});
});
document.querySelectorAll('[data-accordion]').forEach(element => {
console.log(element);
new Foundation.Accordion($j(element), {'data-multi-expand': true});
});
}); });

View File

@ -103,7 +103,6 @@
float: left; float: left;
width: 50%; width: 50%;
margin-top: $font-size-default; margin-top: $font-size-default;
span { span {
font-size: $font-size-larger; font-size: $font-size-larger;
color: $medium-blue; color: $medium-blue;
@ -130,6 +129,7 @@
background: -o-linear-gradient(left, $greener-than-alert, $call-to-action); background: -o-linear-gradient(left, $greener-than-alert, $call-to-action);
background: linear-gradient(left, $greener-than-alert, $call-to-action); background: linear-gradient(left, $greener-than-alert, $call-to-action);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$alert', endColorstr='$call-to-action'); /* IE6 & IE7 */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$alert', endColorstr='$call-to-action'); /* IE6 & IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='$alert', endColorstr='$call-to-action')"; /* IE8+ */ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='$alert', endColorstr='$call-to-action')"; /* IE8+ */

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,5 @@
@import "variables.scss"; @import "variables.scss";
@import "foundation";
/* Cross-browser language */ /* Cross-browser language */
@mixin opacity($op) @mixin opacity($op)
@ -28,28 +29,29 @@
div.book-list.listview{ div.book-list.listview{
clear:both; clear:both;
display:block; display: flex;
vertical-align: middle; vertical-align: middle;
align-items: center;
@include height(43px); @include height(43px);
margin:0 5px 0 0; margin:0 5px 0 0;
padding:7px 0; padding:7px 0;
position: relative; position: relative;
& > div {
padding: 10px;
}
/* row is a container for divs with individual content elements */ /* row is a container for divs with individual content elements */
/* these elements are styled differently to create list and panel views */ /* these elements are styled differently to create list and panel views */
div { div {
&.unglue-this { &.unglue-this {
float: left;
} }
&.book-thumb { &.book-thumb {
margin-right: 5px;
float: left;
} }
&.book-name { &.book-name {
width:235px; flex: 1;
margin-right:10px; max-width: 300px;
background:url("#{$image-base}booklist/booklist-vline.png") right center no-repeat; padding: 0 7px;
float: left;
.title { .title {
display:block; display:block;
@ -77,28 +79,15 @@ div.book-list.listview{
margin-top: -1px; margin-top: -1px;
padding-right: 15px; padding-right: 15px;
border: 1px solid $blue-grey; border: 1px solid $blue-grey;
@include border-radius(0, 10px, 10px, 0); @include border-radius(10px);
border-left: none; border-left: none;
} }
&.listview { &.listview {
z-index:100;
// z-index only works on positioned elements, so if you
// do not include this the absolutely positioned add-wishlist
// div stacks above it! crazytown.
position: absolute;
left: 42px;
} }
} }
&.add-wishlist, &.remove-wishlist, &.on-wishlist, &.create-account, &.pledge { &.add-wishlist, &.remove-wishlist, &.on-wishlist, &.create-account, &.pledge {
margin-right: 10px;
padding-right: 10px;
width: 136px;
background:url("#{$image-base}booklist/booklist-vline.png") right center no-repeat;
//position: absolute;
margin-left:255px;
float:left;
span { span {
font-weight:normal; font-weight:normal;
@ -134,9 +123,6 @@ div.book-list.listview{
} }
&.booklist-status { &.booklist-status {
//width: 110px;
margin-right:85px;
float: left;
} }
} }
} }
@ -302,9 +288,9 @@ ul.navigation li a:hover, ul.navigation li.active a {
} }
.listview.icons { .listview.icons {
position: absolute; flex: 1;
right: 31px; display: flex;
justify-content: flex-end;
.booklist-status-img { .booklist-status-img {
@include one-border-radius(4px); @include one-border-radius(4px);
background-color: #fff; background-color: #fff;
@ -324,6 +310,12 @@ ul.navigation li a:hover, ul.navigation li.active a {
} }
} }
@include breakpoint(medium up) {
.book-name {
flex: 100%;
}
}
div#content-block-content { div#content-block-content {
padding-bottom: 10px; padding-bottom: 10px;
} }
@ -354,7 +346,6 @@ div#libtools {
} }
#facet_block div { #facet_block div {
background:url($background-header) 100% -223px no-repeat;
padding: 7px 7px 15px 7px; padding: 7px 7px 15px 7px;
p { p {
padding: 0 10px 0 10px; padding: 0 10px 0 10px;

File diff suppressed because one or more lines are too long

View File

@ -190,15 +190,16 @@ span.grey {
} }
/* switch to/from hover state when jquery swaps class names */ /* switch to/from hover state when jquery swaps class names */
div.panelview.side1 {
display: visible;
}
div.panelview.side2 { div.panelview.side2 {
display: none; visibility: hidden;
} }
div.panelview:hover .side2 {
visibility: visible !important;
z-index: 1;
}
/* styling of hover state */ /* styling of hover state */
.panelback { .panelback {
position: relative; position: relative;

3
static/scss/bookview.css Normal file
View File

@ -0,0 +1,3 @@
.panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF}.panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF}@media screen and (max-width: 39.9375em){.wrapper{display:flex;flex-direction:column}.pubinfo{display:flex;flex-direction:column;align-items:center}.wrapper{margin:10px}.bookImage{order:0;display:flex;justify-content:center}.bookSidebar{order:1;flex-direction:row;flex-wrap:wrap}.book-sidebar-item{flex:auto;display:flex;justify-content:center}.book-sidebar-item span{display:none}.bookRead{flex:100%}.bookDownload{flex:100%}.bookDonate{flex:100%}.bookDescription{order:2}.bookComments{order:3;margin-top:15px}}@supports not (grid-template-rows: auto){.wrapper{display:flex;flex-direction:column}.pubinfo{display:flex;flex-direction:column;align-items:center}.wrapper{margin:10px}.bookImage{order:0;display:flex;justify-content:center}.bookSidebar{order:1;flex-direction:row;flex-wrap:wrap}.book-sidebar-item{flex:auto;display:flex;justify-content:center}.book-sidebar-item span{display:none}.bookRead{flex:100%}.bookDownload{flex:100%}.bookDonate{flex:100%}.bookDescription{order:2}.bookComments{order:3;margin-top:15px}}@supports (grid-template-rows: auto){@media print, screen and (min-width: 40em){.wrapper{display:grid;grid-template-columns:fit-content 1fr 20%;grid-template-rows:auto auto;grid-template-areas:"bookImage bookDescription bookSidebar" ". bookComments .";margin-left:auto;margin-right:auto;max-width:1000px}.bookDescription{padding-right:15px}.bookSidebar{flex-direction:column;margin-top:66px}}}.bookImage{grid-area:bookImage;padding:15px}.bookImage img{padding:5px;border:solid 5px #eee}.bookImage div{float:right}.bookDescription{grid-area:bookDescription}.bookSidebar{display:flex;grid-area:bookSidebar}.book-sidebar-item{margin-bottom:16px}.bookComments{grid-area:bookComments}.btn_wishlist span{text-align:right}.btn_wishlist div{float:none}.description-more-content{padding-top:20px}
/*# sourceMappingURL=../../../../../../static/scss/bookview.css.map */

183
static/scss/bookview.scss Normal file
View File

@ -0,0 +1,183 @@
@import 'variables';
@import 'settings';
@import 'foundation';
@mixin mobile() {
.wrapper {
display: flex;
flex-direction: column;
}
.pubinfo {
display: flex;
flex-direction: column;
align-items: center;
}
.wrapper {
margin: 10px;
}
.bookImage {
order: 0;
display: flex;
justify-content: center;
}
.bookSidebar {
order: 1;
flex-direction: row;
flex-wrap: wrap;
}
.book-sidebar-item {
flex: auto;
display: flex;
justify-content: center;
}
.book-sidebar-item span {
display: none;
}
.book-sidebar-explore {
display: none;
}
.bookRead {
flex: 100%;
}
.bookDownload {
flex: 100%;
}
.bookDonate {
flex: 100%;
}
.bookDescription {
order: 2;
}
.bookComments {
order: 3;
margin-top: 15px;
}
}
@include breakpoint (small down) {
@include mobile();
}
@supports not (grid-template-rows: auto) {
@include mobile();
}
@supports (grid-template-rows: auto) {
@include breakpoint (medium) {
.wrapper {
display: grid;
grid-template-columns: fit-content 1fr 20%;
grid-template-rows: auto auto;
grid-template-areas: "bookImage bookDescription bookSidebar"
". bookComments .";
margin-left: auto;
margin-right: auto;
max-width: 1000px;
}
.bookDescription {
padding-right: 15px;
}
.bookSidebar {
flex-direction: column;
margin-top: 66px;
}
}
}
.bookImage {
grid-area: bookImage;
padding: 15px;
img {
padding: 5px;
border: solid 5px $gray-lighter;
}
}
.bookImage div {
float:right;
}
.bookDescription {
grid-area: bookDescription;
}
.bookSidebar {
display: flex;
grid-area: bookSidebar;
}
.book-sidebar-item {
margin-bottom: 16px;
}
.bookComments {
grid-area: bookComments;
}
.btn_wishlist span{
text-align: right;
}
//TODO remove me
.btn_wishlist div{
float: none;
}
.description-more-content {
padding-top: 20px;
}
.book-sidebar-explore {
width: 150px;
.jsmodule {
margin: 0;
padding: 0;
h3 {
background-color: $pale-blue;
border-radius: 0;
height: auto;
span {
text-align: center;
padding: 4px;
}
margin-bottom: 4px;
}
.menu {
li {
> span {
display: none;
}
a {
padding: 0;
padding-bottom: 4px;
}
a:hover {
text-decoration: underline;
}
}
.level3 {
padding-left: 10px;
}
}
}
}

File diff suppressed because one or more lines are too long

1
static/scss/colors.scss Normal file
View File

@ -0,0 +1 @@
$pale-blue: #EDF3F4;

View File

@ -1,3 +0,0 @@
.panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF}.comments{clear:both;padding:5px;margin:0 5px 8px 0;width:95%}.comments.row1{background:#f6f9f9}.comments.row2{background:#fff}.comments div{float:left}.comments div img{margin:0 5px}.comments .image img{height:100px}.comments:after{content:".";display:block;height:0;clear:both;visibility:hidden}.comments .nonavatar{width:620px}.comments .nonavatar span{padding-right:5px}.comments .nonavatar span.text:before{content:"\201C";font-size:15px;font-weight:bold}.comments .nonavatar span.text:after{content:"\201D";font-size:15px;font-weight:bold}.comments .avatar{float:right;margin:0 auto;padding-top:5px}.official{border:3px #B8DDE0 solid;margin-top:3px;margin-bottom:5px;padding-left:2px}
/*# sourceMappingURL=../../../../../static/scss/comments.css.map */

File diff suppressed because one or more lines are too long

View File

@ -41,7 +41,6 @@ body {
.doc h2 { .doc h2 {
margin:20px 0; margin:20px 0;
color:$text-blue; color:$text-blue;
font-size: $font-size-larger;
font-weight: bold; font-weight: bold;
} }

3
static/scss/download.css Normal file
View File

@ -0,0 +1,3 @@
.panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF}.panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF}ul.social a:hover{text-decoration:none}ul.social li{padding:5px 0 5px 30px !important;height:28px;line-height:28px !important;margin:0 !important;-moz-border-radius:0px;-webkit-border-radius:0px;border-radius:0px}ul.social li.facebook{background:url("/static/images/icons/facebook.png") 10px center no-repeat;cursor:pointer}ul.social li.facebook span{padding-left:10px}ul.social li.facebook:hover{background:#8dc63f url("/static/images/icons/facebook-hover.png") 10px center no-repeat}ul.social li.facebook:hover span{color:#fff}ul.social li.twitter{background:url("/static/images/icons/twitter.png") 10px center no-repeat;cursor:pointer}ul.social li.twitter span{padding-left:10px}ul.social li.twitter:hover{background:#8dc63f url("/static/images/icons/twitter-hover.png") 10px center no-repeat}ul.social li.twitter:hover span{color:#fff}ul.social li.email{background:url("/static/images/icons/email.png") 10px center no-repeat;cursor:pointer}ul.social li.email span{padding-left:10px}ul.social li.email:hover{background:#8dc63f url("/static/images/icons/email-hover.png") 10px center no-repeat}ul.social li.email:hover span{color:#fff}ul.social li.embed{background:url("/static/images/icons/embed.png") 10px center no-repeat;cursor:pointer}ul.social li.embed span{padding-left:10px}ul.social li.embed:hover{background:#8dc63f url("/static/images/icons/embed-hover.png") 10px center no-repeat}ul.social li.embed:hover span{color:#fff}.panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF}.download-body{width:100%}.border{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:solid 2px #d6dde0;margin:5px auto;padding-right:5px;padding-left:5px}.sharing{float:right;padding:0.5% !important;width:23% !important;min-width:105px}.sharing ul{padding:0.5% !important}.sharing .jsmod-title{-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;height:auto}.sharing .jsmod-title span{padding:5% !important;color:white !important;font-style:normal}#widgetcode2{display:none;border:1px solid #d6dde0;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;padding:10px}#widgetcode2 textarea{max-width:90%}.btn_support.kindle{height:40px}.btn_support.kindle a{width:auto;font-size:15px}.download_option.flexible{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;padding:7px 5px}.download_option.flexible i{vertical-align:middle}.download_option.flexible .h4{margin-bottom:0px}.ebook_download{display:flex;flex-direction:column}.flex_ul{display:flex;flex-direction:column}.askform{max-width:400px}.download_footer{padding:15px}.download_container{margin:0px 10px}.dropbox_download_option{min-width:122px}.download_option>*{flex:1}.download-centered{display:flex;justify-content:center}@media print, screen and (min-width: 40em){.download_container{width:75%;margin:auto}#download_content{display:flex;flex-direction:row;flex-wrap:wrap}#download_content .rh_ask,#download_content #askblock{padding:15px;flex:1 0 50%}.download-label{display:flex;flex-direction:row;align-items:center}}
/*# sourceMappingURL=../../../../../../static/scss/download.css.map */

View File

@ -1,85 +1,11 @@
@import "variables.scss"; @import "variables.scss";
@import "social_share.scss"; @import "social_share.scss";
@import 'settings';
@import 'foundation';
.download_container {
width: 75%;
margin: auto;
}
#lightbox_content a { .download-body {
color: $medium-blue; width: 100%;
}
#lightbox_content .signuptoday a {
color: white;
}
#lightbox_content h2, #lightbox_content h3, #lightbox_content h4 {
margin-top: 15px;
}
#lightbox_content h2 a {
font-size: $font-size-larger*1.25;
}
#lightbox_content .ebook_download {
a {
margin: auto 5px auto 0;
font-size: $font-size-larger;
}
img {
vertical-align: middle;
}
}
#lightbox_content .logo {
img {
@include one-border-radius(7px);
height: 50px;
width: 50px;
margin-right: 5px;
}
font-size: $font-size-larger;
}
#lightbox_content .one_click, #lightbox_content .ebook_download_container {
@include one-border-radius(5px);
margin-left: -.25%;
padding: 0.5%;
padding-bottom: 15px;
margin-bottom: 5px;
width: 74%;
h3 {
margin-top: 5px;
}
}
#lightbox_content .one_click {
border: solid 2px $call-to-action;
}
#lightbox_content .ebook_download_container {
border: solid 2px $blue-grey;
}
#lightbox_content a.add-wishlist .on-wishlist, #lightbox_content a.success, a.success:hover {
text-decoration: none;
color: $text-blue;
}
#lightbox_content a.success, a.success:hover {
cursor: default;
}
#lightbox_content ul {
padding-left: 50px;
li {
margin-bottom: 4px;
}
} }
.border { .border {
@ -131,3 +57,85 @@
font-size: $font-size-larger; font-size: $font-size-larger;
} }
} }
//
.download_option.flexible {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
padding: 7px 5px;
i {
vertical-align: middle;
}
.h4 {
margin-bottom: 0px;
}
}
.ebook_download {
display: flex;
flex-direction: column;
}
.flex_ul {
display: flex;
flex-direction: column;
}
.askform {
max-width: 400px;
}
.download_footer {
padding: 15px;
}
.download_container {
margin: 0px 10px;
}
.dropbox_download_option {
min-width: 122px;
}
.download_option > * {
flex: 1;
}
.download-centered {
display: flex;
justify-content: center;
}
@include breakpoint (medium) {
.download_container {
width: 75%;
margin: auto;
}
#download_content {
display: flex;
flex-direction: row;
flex-wrap: wrap;
.rh_ask, #askblock {
padding: 15px;
flex: 1 0 50%;
}
}
.download-label {
display: flex;
flex-direction: row;
align-items: center;
}
}

View File

@ -1,3 +1,3 @@
.buttons,.yes_js,.other_instructions_paragraph{display:inherit}.instructions>div:not(.active){display:none}.no_js{display:none !important}.active{display:inherit !important} .buttons,.yes_js,.other_instructions_paragraph{display:inherit}.instructions>div:not(.active){display:none}.no_js{display:none !important}.active{display:inherit !important}
/*# sourceMappingURL=../../../../../static/scss/enhanced_download.css.map */ /*# sourceMappingURL=../../../../../../../static/scss/enhanced_download.css.map */

View File

@ -1,3 +1,3 @@
.yes_js,.other_instructions_paragraph{display:inherit}.instructions>div{display:none}.no_js{display:none !important}.active{display:inherit !important} .yes_js,.other_instructions_paragraph{display:inherit}.instructions>div{display:none}.no_js{display:none !important}.active{display:inherit !important}
/*# sourceMappingURL=../../../../../static/scss/enhanced_download_ie.css.map */ /*# sourceMappingURL=../../../../../../../static/scss/enhanced_download_ie.css.map */

3
static/scss/faq.css Normal file
View File

@ -0,0 +1,3 @@
.panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF}.panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF}.faq-container{display:flex;flex-direction:column;margin:0 auto;max-width:1024px}.faq-menu{min-width:200px}.faq-main{padding:0 25px;max-width:100vw}.faq-toplevel-nav{width:fit-content;margin:0 auto}.faq-toplevel-nav li{width:fit-content}.long-formula{white-space:pre-wrap}@media print, screen and (min-width: 40em){.faq-container{flex-direction:row}.faq-toplevel-nav>li>a,.faq-toplevel-nav>li>span{border-bottom:1px solid #edf3f4}}
/*# sourceMappingURL=../../../../../../static/scss/faq.css.map */

45
static/scss/faq.scss Normal file
View File

@ -0,0 +1,45 @@
@import 'variables';
@import 'settings';
@import 'foundation';
.faq-container {
display: flex;
flex-direction: column;
margin: 0 auto;
max-width: 1024px;
}
.faq-menu {
min-width: 200px;
}
.faq-main {
padding: 0 25px;
max-width: 100vw;
}
.faq-toplevel-nav {
width: fit-content;
margin: 0 auto;
li {
width: fit-content;
}
}
.long-formula {
white-space: pre-wrap;
}
@include breakpoint (medium) {
.faq-container {
flex-direction: row;
}
.faq-toplevel-nav {
& > li > a, & > li > span {
border-bottom:1px solid $pale-blue;
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,13 @@
{
"plugins": [
"transform-es2015-arrow-functions",
"transform-es2015-block-scoped-functions",
"transform-es2015-block-scoping",
"transform-es2015-classes",
"transform-es2015-destructuring",
"transform-es2015-template-literals",
"transform-es2015-parameters",
"transform-es2015-shorthand-properties",
"transform-es2015-spread"
]
}

View File

@ -0,0 +1,4 @@
{
"directory": "bower_components",
"modules": false
}

View File

@ -0,0 +1,12 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

View File

@ -0,0 +1,65 @@
{
"ecmaVersion": 6,
"env": {
"browser": true,
"builtin": true,
"es6": true,
"jasmine": true,
"jquery": true,
"mocha": true,
"node": true
},
"globals": {
"Foundation": true
},
"parserOptions": {
"ecmaFeatures": {
"impliedStrict": true,
"jsx": false
},
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
"block-scoped-var": 2,
"camelcase": 2,
"comma-style": [2, "last"],
"curly": [0, "all"],
"dot-notation": [
2,
{
"allowKeywords": true
}
],
"eqeqeq": [2, "allow-null"],
"guard-for-in": 2,
"new-cap": 2,
"no-bitwise": 2,
"no-caller": 2,
"no-cond-assign": [2, "except-parens"],
"no-debugger": 2,
"no-empty": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-parens": 1,
"no-irregular-whitespace": 2,
"no-iterator": 2,
"no-loop-func": 2,
"no-multi-str": 2,
"no-new": 2,
"no-plusplus": 0,
"no-proto": 2,
"no-script-url": 2,
"no-sequences": 2,
"no-shadow": 1,
"no-undef": 2,
"no-unused-vars": 1,
"no-with": 2,
"quotes": 0,
"radix" : 2,
"semi": [0, "never"],
"strict": [1, "global"],
"valid-typeof": 2,
"wrap-iife": [2, "inside"]
}
}

57
static/scss/foundation/.gitignore vendored Normal file
View File

@ -0,0 +1,57 @@
*.DS_Store
*.gem
*.orig
*.rbc
*.rbenv-version
*.ruby-version
*.scssc
*.sublime-*
*.swp
*.swo
.bundle
.config
.grunt
.idea
.sass-cache/*
.yardoc
_build
.customizer
bower_components
bundle
build/*
/docs2/public/*
_yardoc
coverage
docs/public/*
InstalledFiles
lib/bundler/man
marketing/.sass-cache/*
node_modules
pkg
rdoc
spec/reports
npm-debug.log
_debug.json
*.orig
node_modules
docs/public/*
*.scssc
*.rbenv-version
*.ruby-version
/docs2/public/*
.settings
.project
test/scss/output-test
test/tmp
test/version_tmp
tmp
testing/_build
test/javascript/js-tests.js
pizza/
data.json
npm-debug.log
foundation-docs
vendor

View File

@ -0,0 +1,3 @@
{
"esversion": 6
}

View File

@ -0,0 +1,20 @@
.sass-cache
_build
bower_components
config
docs
gulp
lib
spec
bower.json
composer.json
CONTRIBUTING.md
gulpfile.js
meteor-README.md
package.js
sache.json
test
.editorconfig
.versions
.babelrc
yarn.lock

View File

@ -0,0 +1,409 @@
# The following scss-lint Linters are not yet supported by sass-lint:
# ElsePlacement, PropertyCount, SelectorDepth, UnnecessaryParentReference
#
# The following settings/values are unsupported by sass-lint:
# Linter Indentation, option "allow_non_nested_indentation"
# Linter Indentation, option "character"
# Linter PropertySortOrder, option "separate_groups"
# Linter SpaceBeforeBrace, option "allow_single_line_padding"
files:
include: 'scss/**/*.scss'
options:
formatter: stylish
merge-default-rules: false
rules:
border-zero:
- 1
- convention: '0'
brace-style:
- 1
- style: stroustrup
- allow-single-line: true
class-name-format:
- 1
- convention: '([a-z0-9]+-?)+'
clean-import-paths:
- 1
- filename-extension: false
leading-underscore: false
empty-line-between-blocks:
- 1
- ignore-single-line-rulesets: true
extends-before-declarations: 1
extends-before-mixins: 1
final-newline:
- 1
- include: true
force-attribute-nesting: 1
force-element-nesting: 1
force-pseudo-nesting: 1
function-name-format:
- 1
- allow-leading-underscore: true
convention: hyphenatedlowercase
hex-length:
- 1
- style: short
hex-notation:
- 1
- style: lowercase
id-name-format:
- 1
- convention: '([a-z0-9]+-?)+'
indentation:
- 1
- size: 2
leading-zero:
- 1
- include: true
mixin-name-format:
- 1
- allow-leading-underscore: true
convention: hyphenatedlowercase
mixins-before-declarations: 1
nesting-depth:
- 1
- max-depth: 3
no-color-keywords: 1
no-color-literals: 1
no-css-comments: 0
no-debug: 1
no-duplicate-properties: 1
no-empty-rulesets: 1
no-ids: 1
no-important: 0
no-invalid-hex: 1
no-mergeable-selectors: 1
no-misspelled-properties:
- 1
- extra-properties: []
no-qualifying-elements:
- 1
- allow-element-with-attribute: false
allow-element-with-class: false
allow-element-with-id: false
no-trailing-zero: 1
no-url-protocols: 1
no-vendor-prefixes:
- 1
- ignore-non-standard: true
placeholder-in-extend: 1
placeholder-name-format:
- 1
- convention: '([a-z0-9]+-?)+'
property-sort-order:
- 1
-
ignore-custom-properties: true
order:
# Specific - CSS property order
# https://gist.github.com/ncoden/d42f55df7c7970f548a02cd3468f9c86
# Position
- 'position'
- 'top'
- 'right'
- 'bottom'
- 'left'
- 'z-index'
# Disposition
- 'display'
- 'flex'
- 'flex-basis'
- 'flex-direction'
- 'flex-flow'
- 'flex-grow'
- 'flex-shrink'
- 'flex-wrap'
- 'justify-content'
- 'order'
- 'box-align'
- 'box-flex'
- 'box-orient'
- 'box-pack'
- 'align-content'
- 'align-items'
- 'align-self'
- 'columns'
- 'column-gap'
- 'column-fill'
- 'column-rule'
- 'column-span'
- 'column-count'
- 'column-width'
- 'vertical-align'
- 'float'
- 'clear'
# Dimension
- 'box-sizing'
- 'width'
- 'min-width'
- 'max-width'
- 'height'
- 'min-height'
- 'max-height'
- 'margin'
- 'margin-top'
- 'margin-right'
- 'margin-bottom'
- 'margin-left'
- 'margin-collapse'
- 'margin-top-collapse'
- 'margin-right-collapse'
- 'margin-bottom-collapse'
- 'margin-left-collapse'
- 'padding'
- 'padding-top'
- 'padding-right'
- 'padding-bottom'
- 'padding-left'
# Global appearance
- 'appearance'
- 'opacity'
- 'filter'
- 'visibility'
- 'size'
- 'resize'
- 'zoom'
- 'transform'
- 'transform-box'
- 'transform-origin'
- 'transform-style'
# Border
- 'outline'
- 'outline-color'
- 'outline-offset'
- 'outline-style'
- 'outline-width'
- 'border'
- 'border-top'
- 'border-right'
- 'border-bottom'
- 'border-left'
- 'border-width'
- 'border-top-width'
- 'border-right-width'
- 'border-bottom-width'
- 'border-left-width'
- 'border-style'
- 'border-top-style'
- 'border-right-style'
- 'border-bottom-style'
- 'border-left-style'
- 'border-radius'
- 'border-top-left-radius'
- 'border-top-right-radius'
- 'border-bottom-right-radius'
- 'border-bottom-left-radius'
- 'border-radius-topleft'
- 'border-radius-topright'
- 'border-radius-bottomright'
- 'border-radius-bottomleft'
- 'border-color'
- 'border-top-color'
- 'border-right-color'
- 'border-bottom-color'
- 'border-left-color'
- 'border-collapse'
- 'border-spacing'
# Background
- 'background'
- 'background-image'
- 'background-color'
- 'background-attachment'
- 'background-clip'
- 'background-origin'
- 'background-position'
- 'background-repeat'
- 'background-size'
# Shadow
- 'box-shadow'
# Animation
- 'animation'
- 'animation-delay'
- 'animation-duration'
- 'animation-iteration-count'
- 'animation-name'
- 'animation-play-state'
- 'animation-timing-function'
- 'animation-fill-mode'
- 'transition'
- 'transition-delay'
- 'transition-duration'
- 'transition-property'
- 'transition-timing-function'
# Content
- 'content'
- 'list-style'
- 'list-style-image'
- 'list-style-position'
- 'list-style-type'
- 'overflow'
- 'overflow-x'
- 'overflow-y'
- 'clip'
# Text
- 'font'
- 'font-family'
- 'font-size'
- 'font-smoothing'
- 'osx-font-smoothing'
- 'font-style'
- 'font-variant'
- 'font-weight'
- 'src'
- 'word-spacing'
- 'letter-spacing'
- 'line-height'
- 'color'
- 'direction'
- 'text-align'
- 'text-decoration'
- 'text-indent'
- 'text-overflow'
- 'text-rendering'
- 'text-size-adjust'
- 'text-shadow'
- 'text-transform'
- 'white-space'
- 'word-break'
- 'word-wrap'
- 'hyphens'
- 'quotes'
# Divers
- 'pointer-events'
- 'cursor'
- 'backface-visibility'
- 'caption-side'
- 'empty-cells'
- 'table-layout'
- 'user-select'
- 'interpolation-mode'
- 'marks'
- 'page'
- 'set-link-source'
- 'unicode-bidi'
- 'speak'
quotes:
- 1
- style: single
shorthand-values: 1
single-line-per-selector: 0
space-after-bang:
- 1
- include: false
space-after-colon:
- 1
- include: true
space-after-comma: 1
space-before-bang:
- 1
- include: true
space-before-brace:
- 1
- include: true
space-before-colon: 1
space-between-parens:
- 1
- include: false
trailing-semicolon: 1
url-quotes: 1
variable-for-property:
- 0
- properties: []
variable-name-format:
- 1
- allow-leading-underscore: true
convention: hyphenatedlowercase
zero-unit: 1

View File

@ -0,0 +1,9 @@
language: node_js
node_js:
- "6"
install:
- npm install -g bower browserstack-runner
- npm install
script: npm run test:ci
notifications:
email: false

View File

@ -0,0 +1,14 @@
babel-compiler@6.6.4
babel-runtime@0.1.8
caching-compiler@1.0.4
ecmascript@0.4.3
ecmascript-runtime@0.2.10
fourseven:scss@4.5.4
jquery@1.11.8
meteor@1.1.14
modules@0.6.1
modules-runtime@0.6.3
promise@0.6.7
random@1.0.9
underscore@1.0.8
zurb:foundation-sites@6.3.0

View File

@ -0,0 +1,55 @@
# Foundation Contributing Guidelines
Although Foundation is maintained by ZURB, its also a community effort. Whether its bug fixing, feature development, or contributions to the ecosystem, designers and developers from all over the world help make Foundation the most advanced framework in the world.
A select group of our contributors have been dubbed *Yetinauts*. They have direct write access to the codebase and support the core Foundation team on the development of the framework. Are you interested in making your mark on the Foundation framework? Whether youre just submitting bugs or helping us write new features, there are many ways to contribute to Foundation.
## Terms
- The **community** is anyone commenting on issues or opening pull requests. That includes you!
- A **Yetinaut** is anyone with write access to the repository.
- The **Core Team** is anyone on the Foundation Team.
## Issues
Open an issue for any problem you have with the framework. If there's anything missing from your issue, such as extra context, a code sample, etc. a team member will ask for more info in the comments.
Support requests are generally better suited for the [Foundation Forum](http://foundation.zurb.com/forum), while GitHub is more appropriate for bugs. If you arent sure if your issue is a bug or not, dont worry! Post your problem on GitHub and the team will help you along. Every participant is expected to follow the project's [Code of Conduct](code-of-conduct.md) so please be courteous and respectful.
## Contributions
All new features and bug fixes should be submitted as pull requests, so the community can review and discuss them. Core Team members can commit directly to the repository for very small changes, but should generally also submit new code as a pull request.
When you submit a pull request, @mention a few people youd like to help you review it. Once those people have signed off on it, the pull request can be merged! Core Team members will handle the merge itself.
## Git Workflow
Foundation uses a git workflow close to [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/). The workflow relies on three branches:
- **`master`**: The stable branch. It only contains the latest stable version released. Pull requests for docs improvements can be opened on it.
- **`develop`**: The developing branch is used to prepare the next minor/major version. It always contains all the new features and bug fixes previously made, and constitutes the most up-to-date version of Foundation. Almost every pull request should be opened on this branch. When a new version is released, it is merged on `master`, a support branch is created, and `develop` now targets the next version.
- **`support/*`**: Support branches are used to support the previous versions (i.e. `support/6.3` for `v6.3.0`) and prepare patches (i.e. `v6.3.1`). When a bug fix is compatible with supported versions, it is also merged on their support branches and patch versions can be released. If a fix is not compatible with `develop`, a pull request can be opened on the latest compatible and supported version.
This git workflow was adopted as of `v6.3`, so `v6.2` and previous versions are not supported.
## Coding Standards
If you aren't sure how a feature should be implemented, we recommend checking out our [standards document](https://github.com/zurb/foundation-standards), which outlines every aspect of writing framework features, from Sass to JavaScript.
## Becoming a Yetinaut
Want to join our crack team of Yetinauts? The Core Team is inviting active community members to become Yetinauts on a case-by-case basis. If you want to become a contributor, engage the community on the Foundation Forum, help us close issues on GitHub, and review pull requests from other contributors.
If youve made substantial contributions to a Foundation framework and havent heard from us yet, you can reach out at foundation@zurb.com.
Contributors are expected to:
- Engage the community on GitHub by responding to and tagging issues.
- Write pull requests to address bugs and feature requests.
- Help in reviewing pull requests from users, contributors, and the Core Team.
- Follow the guidelines outlined in this document.
Here are some example contributions from some of our awesome team members:
- Colin Marshall converted our Sass unit tests to a newer test runner called True.
- Andy Cochran reworked the CSS for button groups to fix issues with stacking and border radii.
- designerno1 developed the Equalize by Row feature for the Equalizer plugin.

View File

@ -0,0 +1,22 @@
Copyright (c) 2011-2018 ZURB, Inc.
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,57 @@
# [Foundation for Sites](http://foundation.zurb.com)
[![Build Status](https://travis-ci.org/zurb/foundation-sites.svg?branch=develop)](https://travis-ci.org/zurb/foundation-sites)
[![npm version](https://badge.fury.io/js/foundation-sites.svg)](https://badge.fury.io/js/foundation-sites)
[![Bower version](https://badge.fury.io/bo/foundation-sites.svg)](https://badge.fury.io/bo/foundation-sites)
[![Gem Version](https://badge.fury.io/rb/foundation-rails.svg)](https://badge.fury.io/rb/foundation-rails)
[![CDNJS](https://img.shields.io/cdnjs/v/foundation.svg)](https://cdnjs.com/libraries/foundation)
[![dependencies Status](https://david-dm.org/zurb/foundation-sites/status.svg)](https://david-dm.org/zurb/foundation-sites)
[![devDependencies Status](https://david-dm.org/zurb/foundation-sites/dev-status.svg)](https://david-dm.org/zurb/foundation-sites?type=dev)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/zurb/foundation-sites?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
Foundation is the most advanced responsive front-end framework in the world. Quickly go from prototype to production, building sites or apps that work on any kind of device with Foundation. Includes a fully customizable, responsive grid, a large library of Sass mixins, commonly used JavaScript plugins, and full accessibility support.
## Getting Started
The quickest way to get started is with the [basic CSS download](http://foundation.zurb.com/sites/download/). You can get versions with every component, essential ones only, or a custom build.
If you're a Sass user, we have two starter project templates, the [Basic Template](https://github.com/zurb/foundation-sites-template) and the [ZURB Template](https://github.com/zurb/foundation-zurb-template). You can install them by manually downloading them from GitHub, or using the [Foundation CLI](https://github.com/zurb/foundation-cli).
Lastly, if you're rolling your own setup, you can install Foundation through a variety of [package managers](http://foundation.zurb.com/sites/docs/installation.html#package-managers).
## Documentation
The documentation can be found at <https://foundation.zurb.com/sites/docs>. To run the documentation locally on your machine, you need [Node.js](https://nodejs.org/en/) installed on your computer. (Your Node.js version must be **4.0** or higher.)
Run these commands to set up the documentation:
```bash
git clone https://github.com/zurb/foundation-sites
cd foundation-sites
npm install
```
Then run `npm start` to compile the documentation. When it finishes, a new browser window will open pointing to a BrowserSync server displaying the documentation.
## Training
Want the guided tour to Foundation from the team that built it? The ZURB team offers comprehensive training courses for developers of all skill levels. If you're new to Foundation, check out the [Introduction to Foundation Course](http://zurb.com/university/foundation-intro?utm_source=Github%20Repo&utm_medium=website&utm_campaign=readme&utm_content=readme%20training%20link) to kickstart your skills, amplify your productivity, and get a comprehensive overview of everything Foundation has to offer. More Advanced users should check out the [Advanced Foundation Course](http://zurb.com/university/advanced-foundation-training?utm_source=Github%20Repo&utm_medium=website&utm_campaign=readme&utm_content=readme%20training%20link) to learn the Advanced skills that ZURB uses to deliver quality client work in short timeframes.
## Testing
Foundation has three kinds of tests: JavaScript, Sass, and visual regression. Refer to our [testing guide](https://github.com/zurb/foundation-sites/wiki/Testing-Guide) for more details.
These commands will run the various tests:
- `npm run test:sass`
- `npm run test:javascript:phantomjs`
- `npm run test:visual`
Testing Supported By<br/>
<img width="160" src="http://foundation.zurb.com/sites/docs/assets/img/logos/browser-stack.svg" alt="BrowserStack"/>
## Contributing
Check out our [contributing guide](http://foundation.zurb.com/develop/contribute.html) to learn how you can contribute to Foundation. You can also browse the [Help Wanted](https://github.com/zurb/foundation-sites/labels/help%20wanted) tag in our issue tracker to find things to do.
Copyright (c) 2018 ZURB, Inc.

View File

@ -0,0 +1,3 @@
@import 'normalize/variables';
@import 'normalize/vertical-rhythm';
@import 'normalize/normalize-mixin';

View File

@ -0,0 +1,11 @@
// Import Now
//
// If you import this module directly, it will immediately output all the CSS
// needed to normalize default HTML elements across all browsers.
//
// ```
// @import "normalize/import-now";
// ```
@import '../normalize';
@include normalize();

View File

@ -0,0 +1,676 @@
// Helper function for the normalize() mixin.
@function _normalize-include($section, $exclude: null) {
// Initialize the global variables needed by this function.
@if not global_variable_exists(_normalize-include) {
$_normalize-include: () !global;
$_normalize-exclude: () !global;
}
// Since we are given 2 parameters, set the global variables.
@if $exclude != null {
$include: $section;
// Sass doesn't have static variables, so the work-around is to stuff these
// values into global variables so we can access them in future calls.
$_normalize-include: if(type-of($include) == 'list', $include, ($include)) !global;
$_normalize-exclude: if(type-of($exclude) == 'list', $exclude, ($exclude)) !global;
@return true;
}
// Check if $section is in the $include list.
@if index($_normalize-include, $section) {
@return true;
}
// If $include is set to (all), make sure $section is not in $exclude.
@else if not index($_normalize-exclude, $section) and index($_normalize-include, all) {
@return true;
}
@return false;
}
@mixin normalize($include: (all), $exclude: ()) {
// Initialize the helper function by passing it this mixin's parameters.
$init: _normalize-include($include, $exclude);
// If we've customized any font variables, we'll need extra properties.
@if $base-font-size != 16px
or $base-line-height != 24px
or $base-unit != 'em'
or $h1-font-size != 2 * $base-font-size
or $h2-font-size != 1.5 * $base-font-size
or $h3-font-size != 1.17 * $base-font-size
or $h4-font-size != 1 * $base-font-size
or $h5-font-size != 0.83 * $base-font-size
or $h6-font-size != 0.67 * $base-font-size {
$normalize-vertical-rhythm: true !global;
}
/*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */
@if _normalize-include(document) {
/* Document
========================================================================== */
/**
* 1. Change the default font family in all browsers (opinionated).
* 2. Correct the line height in all browsers.
* 3. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
font-family: $base-font-family; /* 1 */
@if $normalize-vertical-rhythm {
// Correct old browser bug that prevented accessible resizing of text
// when root font-size is set with px or em.
font-size: ($base-font-size / 16px) * 100%;
line-height: ($base-line-height / $base-font-size) * 1em; /* 2 */
}
@else {
line-height: 1.15; /* 2 */
}
-ms-text-size-adjust: 100%; /* 3 */
-webkit-text-size-adjust: 100%; /* 3 */
}
}
@if _normalize-include(sections) {
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
@include normalize-font-size($h1-font-size);
@if $normalize-vertical-rhythm {
@include normalize-line-height($h1-font-size);
}
@if $normalize-vertical-rhythm {
/* Set 1 unit of vertical rhythm on the top and bottom margins. */
@include normalize-margin(1 0, $h1-font-size);
}
@else {
margin: 0.67em 0;
}
}
@if $normalize-vertical-rhythm {
h2 {
@include normalize-font-size($h2-font-size);
@include normalize-line-height($h2-font-size);
@include normalize-margin(1 0, $h2-font-size);
}
h3 {
@include normalize-font-size($h3-font-size);
@include normalize-line-height($h3-font-size);
@include normalize-margin(1 0, $h3-font-size);
}
h4 {
@include normalize-font-size($h4-font-size);
@include normalize-line-height($h4-font-size);
@include normalize-margin(1 0, $h4-font-size);
}
h5 {
@include normalize-font-size($h5-font-size);
@include normalize-line-height($h5-font-size);
@include normalize-margin(1 0, $h5-font-size);
}
h6 {
@include normalize-font-size($h6-font-size);
@include normalize-line-height($h6-font-size);
@include normalize-margin(1 0, $h6-font-size);
}
}
}
@if _normalize-include(grouping) {
/* Grouping content
========================================================================== */
@if $normalize-vertical-rhythm {
/**
* Set 1 unit of vertical rhythm on the top and bottom margin.
*/
blockquote {
@include normalize-margin(1 $indent-amount);
}
dl,
ol,
ul {
@include normalize-margin(1 0);
}
/**
* Turn off margins on nested lists.
*/
ol,
ul {
ol,
ul {
margin: 0;
}
}
dd {
margin: 0 0 0 $indent-amount;
}
ol,
ul {
padding: 0 0 0 $indent-amount;
}
}
/**
* Add the correct display in IE 9-.
*/
figcaption,
figure {
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
@if $normalize-vertical-rhythm {
@include normalize-margin(1 $indent-amount);
}
@else {
margin: 1em $indent-amount;
}
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* Add the correct display in IE.
*/
main {
display: block;
}
@if $normalize-vertical-rhythm {
/**
* Set 1 unit of vertical rhythm on the top and bottom margin.
*/
p,
pre {
@include normalize-margin(1 0);
}
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
}
@if _normalize-include(links) {
/* Links
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
}
@if _normalize-include(text) {
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
}
@if _normalize-include(embedded) {
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
}
@if _normalize-include(forms) {
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: $base-font-family; /* 1 */
font-size: 100%; /* 1 */
@if $normalize-vertical-rhythm {
line-height: ($base-line-height / $base-font-size) * 1em; /* 1 */
}
@else {
line-height: 1.15; /* 1 */
}
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
*/
button {
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
/**
* Remove the inner border and padding in Firefox.
*/
&::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
&:-moz-focusring {
outline: 1px dotted ButtonText;
}
}
/**
* Show the overflow in Edge.
*/
input {
overflow: visible;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
&::-webkit-search-cancel-button,
&::-webkit-search-decoration {
-webkit-appearance: none;
}
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
color: inherit; /* 2 */
white-space: normal; /* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
}
@if _normalize-include(interactive) {
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/*
* Add the correct display in IE 9-.
*/
menu {
display: block;
@if $normalize-vertical-rhythm {
/*
* 1. Set 1 unit of vertical rhythm on the top and bottom margin.
* 2. Set consistent space for the list style image.
*/
@include normalize-margin(1 0); /* 1 */
padding: 0 0 0 $indent-amount; /* 2 */
/**
* Turn off margins on nested lists.
*/
menu &,
ol &,
ul & {
margin: 0;
}
}
}
}
@if _normalize-include(scripting) {
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
}
@if _normalize-include(hidden) {
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}
}
}

Some files were not shown because too many files have changed in this diff Show More