bringing all the lightboxes under the hijax.js system

pull/1/head
Andromeda Yelton 2012-08-27 15:35:29 -04:00
parent af8bb1ab6d
commit 48e20a7cdd
19 changed files with 461 additions and 20 deletions

View File

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<div id="lightbox_content">
<p>
Do you have a <b>book you love so much</b> you'd like to give it to the world? These are the books that <span class="ungluer"></span> is helping to give to the world, right now.
</p>
<p>
<span class="ungluer"></span> wants everyone to be able to read these books -- for free, on their favorite devices, worldwide -- but also wants the book's creators to be paid. Traditionally, readers pay each time they buy a book. But what if it worked more like public radio? What if creators got enough money to cover their costs and make their efforts worthwhile, and then the book were free to all? That's what Unglue.it does. Creators decide what fee makes sense to them, and then, through campaigns at Unglue.it, people everywhere chip in -- people like <span class="ungluer"></span>.
</p>
<p>
These books have active campaigns running, right now. Ungluers like <span class="ungluer"></span> are pledging to unglue them, with no risk; their credit cards will only be charged if the campaign succeeds. And when that happens, these books will be free for you, and everyone else, to read and share.
</p>
<p>
What if your favorite book were on this list?
</p>
<p class="last">
What if you could <b>unglue it</b>?
</p>
{% include "about_lightbox_footer.html" %}
</div>
{% endblock %}

View File

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<div id="lightbox_content">
<p>
Do you have a <b>book you love so much</b> you'd like to give it to the world? At Unglue.it, you can.
</p>
<p>
We want everyone to be able to read beloved books -- for free, on their favorite devices, worldwide. We also want the book creators to be paid. Traditionally, readers pay each time they buy a book. But what if it worked more like public radio? What if creators got enough money to cover their costs and make their efforts worthwhile, and then the book were free to all? That's what Unglue.it does. Creators decide what fee makes sense to them, and then, through campaigns at Unglue.it, people everywhere chip in -- people like you.
</p>
<p>
If <span class="ungluer"></span>'s favorite books had ungluing campaigns running right now, you'd see them here. Ungluers like <span class="ungluer"></span> could pledge to unglue them, with no risk; their credit cards are only be charged when campaigns succeed. And when that happens, the books become free for you, and everyone else, to read and share.
</p>
<p>
What if your favorite book were on this list?
</p>
<p class="last">
What if you could <b>unglue it</b>?
</p>
{% include "about_lightbox_footer.html" %}
</div>
{% endblock %}

View File

@ -0,0 +1,8 @@
<div class="right_border"><a href="{{ faqurl }}">Read the FAQ</a></div>
<div class="right_border"><a href="{% url faq_location 'rightsholders' %}">Read the FAQ for authors and publishers</a></div>
<div class="right_border"><a href="{% url press %}">Our press coverage</a></div>
{% if not user.is_authenticated %}
<div class="signuptoday"><a href="{% url registration_register %}">Sign up today</a></div>
{% else %}
<div class="signuptoday"><a href="{% url campaign_list 'ending' %}">Our campaigns</a></div>
{% endif %}

View File

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<div id="lightbox_content">
<p>
<b>What if you could</b> give a book to everyone on earth? Get an ebook and read it on any device, in any format, forever? Give an ebook to your library, for them to share? Own DRM-free ebooks, legally? Read free ebooks, and know their creators had been fairly paid?
</p>
<p>
At Unglue.it, you can pledge toward creating ebooks that will be legally free, worldwide. These books have already been traditionally published, but they're stuck: legal restrictions keep you from being able to enjoy and share them.
</p>
<p>
Unglue.it gets them unstuck. Authors and publishers decide what amount lets them freely share their books with the world while still making a living. We raise that fee here through crowdfunding: people like you chipping in. When campaigns succeed, the rights holders get paid, and they issue a free electronic edition under a <a href="http://creativecommons.org">Creative Commons</a> license.
</p>
<p>
What if you could give your favorite book to the world?
</p>
<p class="last">
What if you could <b>unglue it</b>?
</p>
{% include "about_lightbox_footer.html" %}
</div>
{% endblock %}

View File

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<div id="lightbox_content">
<p>
Imagine if <b>you could give your favorite book</b> to everyone on earth. Imagine if they all had a copy that they could read anywhere, anytime, on their favorite devices, with no DRM. That they could share with their friends, freely and legally. And imagine that your favorite book's creators still got paid.
</p>
<p>
It's possible! Here's a set of books that <span class="ungluer"></span> has given to you. All of these books are either in the public domain (in the United States, and possibly other countries as well), or they've been released to the world under a <a href="https://creativecommons.org/">Creative Commons</a> license. This means you're free to read, copy, and share them. Under some licenses, you're also free to remix them into new creative works.
</p>
<p>
Some of these books have been in the public domain all along. But others were unglued. What's that mean? First, book creators decided what amount what would make it worth their while to issue their books under Creative Commons licenses. Next, they ran pledge campaigns on Unglue.it, and anyone who wanted to give this book to the world -- including <span class="ungluer"></span> -- chipped in. When the campaign succeeded, we paid the book creators, and they issued a freely available ebook. You're free to read it now. Go ahead!
</p>
<p>
Now imagine, what if your favorite book were on this list?
</p>
<p class="last">
What if you could <b>unglue it</b>?
</p>
{% include "about_lightbox_footer.html" %}
</div>
{% endblock %}

View File

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<div id="lightbox_content">
<p>
Imagine if <b>you could give your favorite book</b> to everyone on earth. Imagine if they all had a copy that they could read anywhere, anytime, on their favorite devices, with no DRM. That they could share with their friends, freely and legally. And imagine that your favorite book's creators still got paid.
</p>
<p>
It's possible! You are free to read, copy, and share books that are in the public domain or have been released to the world under a <a href="https://creativecommons.org/">Creative Commons</a> license. Under some licenses, you're also free to remix them into new creative works.
</p>
<p>
Here at Unglue.it, we help you pay creators to unglue their books. What's that mean? First, book creators say what amount would make it worth their while to issue their books under Creative Commons licenses. Next, they run pledge campaigns on Unglue.it, and anyone who wants to give their book to the world chips in. When the campaign succeeds, we pay the book creators, and they issue a freely available ebook. When books <span class="ungluer"></span> loves are unglued, you'll see them here.
</p>
<p>
Now imagine, what if your favorite book were on this list?
</p>
<p class="last">
What if you could <b>unglue it</b>?
</p>
{% include "about_lightbox_footer.html" %}
</div>
{% endblock %}

View File

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<div id="lightbox_content">
<p>
Do you have a <b>book you love so much</b> you'd like to give it to the world? These are the books that <span class="ungluer"></span> wants to give to the world.
</p>
<p>
Of course, <span class="ungluer"></span> can't do that, because books are stuck. Copyright and ebook licensing often make it illegal for individuals, and even libraries, to share digital books. DRM makes sharing hard. At Unglue.it, we respect copyright and pay book creators, while enabling book lovers to share their favorite books with everyone.
</p>
<p>
In short, we get books unstuck. Authors and publishers decide what amount lets them freely share their books with the world while still making a living. We raise that fee here through crowdfunding: people like you and <span class="ungluer"></span> chipping in. When campaigns succeed, the rights holders get paid, and they issue a free electronic edition under a <a href="http://creativecommons.org">Creative Commons</a> license. It's like public radio: once donors have covered the station's costs, its programs are free to all.
</p>
<p>
What if your favorite book could be free to the world?
</p>
<p class="last">
What if you could <b>unglue it</b>?
</p>
{% include "about_lightbox_footer.html" %}
</div>
{% endblock %}

View File

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<div id="lightbox_content">
<p>
Do you have a <b>book you love so much</b> you'd like to give it to the world?
</p>
<p>
We all do, but we can't, because books are stuck. Copyright and ebook licensing often make it illegal for individuals, and even libraries, to share digital books. DRM makes sharing hard. At Unglue.it, we respect copyright and pay book creators, while enabling book lovers to share their favorite books with everyone.
</p>
<p>
In short, we get books unstuck. Authors and publishers decide what amount lets them freely share their books with the world while still making a living. We raise that fee here through crowdfunding: people like you and <span class="ungluer"></span> chipping in. When campaigns succeed, book creators get paid, and they issue a free electronic edition under a <a href="http://creativecommons.org">Creative Commons</a> license. It's like public radio: once donors have covered the station's costs, its programs are free to all.
</p>
<p>
<span class="ungluer"></span> hasn't nominated any favorite books yet, but you can. What if your favorite book could be free to the world?
</p>
<p class="last">
What if you could <b>unglue it</b>?
</p>
{% include "about_lightbox_footer.html" %}
</div>
{% endblock %}

View File

@ -22,7 +22,7 @@
{% block base_js %}
<script type="text/javascript" src="{{ jquery_home }}"></script>
{% endblock %}
<script type="text/javascript" src="/static/js/expand_about.js"></script>
<script type="text/javascript" src="/static/js/hijax.js"></script>
{% block extra_js %}
{% endblock %}
<script type="text/javascript" src="/static/js/watermark_init.js"></script>
@ -50,16 +50,8 @@
<div id="about_expandable">
<div id="about_collapser" class="collapser_x">X</div>
<div id="lightbox">
<!-- content will be inserted here by expand_about.js -->
<!-- content will be inserted here by hijax.js -->
</div>
<div class="right_border"><a href="{{ faqurl }}">Read the FAQ</a></div>
<div class="right_border"><a href="{% url faq_location 'rightsholders' %}">Read the FAQ for authors and publishers</a></div>
<div class="right_border"><a href="{% url press %}">Our press coverage</a></div>
{% if not user.is_authenticated %}
<div class="signuptoday"><a href="{% url registration_register %}">Sign up today</a></div>
{% else %}
<div class="signuptoday"><a href="{% url campaign_list 'ending' %}">Our campaigns</a></div>
{% endif %}
</div>
<div id="js-page-wrap">
@ -97,7 +89,7 @@
{% else %}
<li class="first"><a href="{% url auth_login %}?next={% firstof request.path '/' %}"><span>Sign In</span></a></li>
{% endif %}
<li class="about_expander" id="about_main"><a href="#"><span>About</span></a></li>
<li><a href="/about/main/" class="hijax"><span>About</span></a></li>
<li><a href="{{ landingurl }}"><span>Home</span></a></li>
{% if not user.is_authenticated %}
<li class="last" id="expander"><a href="{% url registration_register %}"><span>sign up</span></a></li>

View File

@ -15,6 +15,7 @@
{% block content %}
<div class="download_container">
<div id="lightbox_content">
<h2>Downloads for {{ work.title }}</h2>
{% if unglued_ebook %}
<div class="unglued">
@ -50,7 +51,7 @@
<p class="ebook_download logo"><img src="/static/images/aldiko_logo.png">Aldiko</p>
<ul>
<li><a href="http://calibre-ebook.com/download">Download the free Aldiko app.</a></li>
<li><a href="http://www.aldiko.com/download.html">Download the free Aldiko app.</a></li>
<li>Download your book from this page using your device's web browser.</li>
<li>You can read HTML files right in the browser. For other formats, you will be given the option of opening the file in Aldiko.</li>
</ul>
@ -123,6 +124,7 @@ i canNOT list all the possibilities. need to have a help email.
<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">Rights tab of the book page</a>.</p>
{% endif %}
</div>
</div>
{% endblock %}
{% endwith %}

View File

@ -321,23 +321,23 @@ there's no tab for seeing ALL my books, only the filters! huh.
{% if request.user.is_anonymous %}
<div class="tabs-1 anon_about">
{% if works_unglued %}
{{ supporter }} is sharing these books with you. <a href="#" class="about_expander" id="about_unglued">Find out how.</a>
{{ supporter }} is sharing these books with you. <a href="/about/unglued/" class="hijax">Find out how.</a>
{% else %}
{{ supporter }} isn't sharing any books with the world yet. <a href="#" class="about_expander" id="about_unglued_empty">Find out how you can.</a>
{{ supporter }} isn't sharing any books with the world yet. <a href="/about/unglued_empty/" class="hijax">Find out how you can.</a>
{% endif %}
</div>
<div class="tabs-2 anon_about">
{% if works_active %}
{{ supporter }} is giving these books to you. <a href="#" class="about_expander" id="about_active">Find out how.</a>
{{ supporter }} is giving these books to you. <a href="/about/active/" class="hijax">Find out how.</a>
{% else %}
{{ supporter }} isn't giving any books to the world right now. <a href="#" class="about_expander" id="about_active_empty">Find out how you can.</a>
{{ supporter }} isn't giving any books to the world right now. <a href="/about/active_empty" class="hijax">Find out how you can.</a>
{% endif %}
</div>
<div class="tabs-3 anon_about">
{% if works_wished %}
{{ supporter }} wants to give these books to you. <a href="#" class="about_expander" id="about_wishlist">Find out how.</a>
{{ supporter }} wants to give these books to you. <a href="/about/wishlist/" class="hijax">Find out how.</a>
{% else %}
{{ supporter }} hasn't decided which books to give the world yet. <a href="#" class="about_expander" id="about_wishlist_empty">Learn more.</a>
{{ supporter }} hasn't decided which books to give the world yet. <a href="/about/wishlist_empty/" class="hijax">Learn more.</a>
{% endif %}
</div>
{% endif %}

View File

@ -15,6 +15,7 @@
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
<script type="text/javascript" src="/static/js/counter.js"></script>
<script type="text/javascript" src="/static/js/embed.js"></script>
<script type="text/javascript" src="/static/js/hijax.js"></script>
<script>
var $j = jQuery.noConflict();
@ -127,7 +128,7 @@ $j(document).ready(function(){
{% else %}
{% if work.first_ebook %}
<div class="btn_support">
<a href="{% url download work_id %}" id="ebookDownload" class="fakeinput">Download</a>
<a href="{% url download work_id %}" class="fakeinput hijax">Download</a>
</div>
{% endif %}
{% endif %}

View File

@ -75,7 +75,8 @@ urlpatterns = patterns(
url(r"^info/(?P<template_name>[\w\.]*)$", InfoPageView.as_view()),
url(r"^info/languages/(?P<template_name>[\w\.]*)$", InfoLangView.as_view()),
url(r'^supporter/(?P<supporter>[^/]+)/feed/$', SupporterWishlistFeed()),
url(r'^campaign_archive.js/$', "campaign_archive_js", name='campaign_archive_js'),
url(r'^campaign_archive.js/$', "campaign_archive_js", name="campaign_archive_js"),
url(r"^about/(?P<facet>\w*)/$", "about", name="about"),
)
if settings.DEBUG:

View File

@ -2075,3 +2075,7 @@ def download(request, work_id):
})
return render(request, "download.html", context)
def about(request, facet):
template = "about_" + facet + ".html"
return render(request, template)

View File

@ -18,6 +18,9 @@
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border-radius: 7px;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border-radius: 7px;
padding: 1px;
color: #fff;
margin: 0 8px 0 0;
@ -29,6 +32,9 @@
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
text-align: center;
display: inline-block;
}
@ -46,6 +52,8 @@
padding: 14px 0;
}
.google_signup_div div {
height: 24px;
line-height: 24px;
height: 24px;
line-height: 24px;
float: left;
@ -60,10 +68,15 @@
width: auto;
height: 36px;
line-height: 36px;
height: 36px;
line-height: 36px;
background: #8dc63f;
-moz-border-radius: 32px;
-webkit-border-radius: 32px;
border-radius: 32px;
-moz-border-radius: 32px;
-webkit-border-radius: 32px;
border-radius: 32px;
color: white;
cursor: pointer;
font-size: 13px;
@ -73,6 +86,9 @@
margin: 5px 0;
}
.errors {
-moz-border-radius: 16px 16px 0 0;
-webkit-border-radius: 16px 16px 0 0;
border-radius: 16px 16px 0 0;
-moz-border-radius: 16px 16px 0 0;
-webkit-border-radius: 16px 16px 0 0;
border-radius: 16px 16px 0 0;
@ -146,6 +162,9 @@ ul.tabs li a {
-moz-border-radius: 7px 7px 0 0;
-webkit-border-radius: 7px 7px 0 0;
border-radius: 7px 7px 0 0;
-moz-border-radius: 7px 7px 0 0;
-webkit-border-radius: 7px 7px 0 0;
border-radius: 7px 7px 0 0;
background: #d6dde0;
color: #3d4e53;
}
@ -175,6 +194,8 @@ ul.tabs li.active a {
#book-detail-img img {
padding: 5px;
border: solid 5px #EDF3F4;
padding: 5px;
border: solid 5px #EDF3F4;
}
.book-detail-info {
float: left;
@ -248,6 +269,9 @@ ul.tabs li.active a {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.book-detail-info .pledged-info {
padding: 0;
@ -264,6 +288,169 @@ ul.tabs li.active a {
height: 25px;
margin-top: -12px;
}
/* variables and mixins used in multiple less files go here */
.header-text {
height: 36px;
line-height: 36px;
display: block;
text-decoration: none;
font-weight: bold;
font-size: 13px;
letter-spacing: -0.05em;
}
.panelborders {
border-width: 1px 0px;
border-style: solid none;
border-color: #FFFFFF;
}
.roundedspan {
border: 1px solid #d4d4d4;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border-radius: 7px;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border-radius: 7px;
padding: 1px;
color: #fff;
margin: 0 8px 0 0;
display: inline-block;
}
.roundedspan > span {
padding: 7px 7px;
min-width: 15px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
text-align: center;
display: inline-block;
}
.roundedspan > span .hovertext {
display: none;
}
.roundedspan > span:hover .hovertext {
display: inline;
}
.mediaborder {
padding: 5px;
border: solid 5px #EDF3F4;
}
.google_signup_div {
padding: 14px 0;
}
.google_signup_div div {
height: 24px;
line-height: 24px;
height: 24px;
line-height: 24px;
float: left;
padding-left: 5px;
}
.google_signup_div img {
float: left;
height: 24px;
width: 24px;
}
.actionbuttons {
width: auto;
height: 36px;
line-height: 36px;
height: 36px;
line-height: 36px;
background: #8dc63f;
-moz-border-radius: 32px;
-webkit-border-radius: 32px;
border-radius: 32px;
-moz-border-radius: 32px;
-webkit-border-radius: 32px;
border-radius: 32px;
color: white;
cursor: pointer;
font-size: 13px;
font-weight: bold;
padding: 0 15px;
border: none;
margin: 5px 0;
}
.errors {
-moz-border-radius: 16px 16px 0 0;
-webkit-border-radius: 16px 16px 0 0;
border-radius: 16px 16px 0 0;
-moz-border-radius: 16px 16px 0 0;
-webkit-border-radius: 16px 16px 0 0;
border-radius: 16px 16px 0 0;
border: solid #e35351 3px;
clear: both;
width: 90%;
height: auto;
line-height: 16px;
padding: 7px 0;
font-weight: bold;
font-size: 13px;
text-align: center;
}
.errors li {
list-style: none;
border: none;
}
.download_container {
width: 50%;
margin: auto;
}
#lightbox a {
color: #6994a3;
}
.ebook_download {
margin-bottom: 15px;
}
.ebook_download a {
margin: auto 5px auto 0;
font-size: 15px;
}
.ebook_download img {
vertical-align: middle;
}
.logo {
font-size: 15px;
}
.logo img {
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border-radius: 7px;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
border-radius: 7px;
height: 50px;
width: 50px;
margin-right: 5px;
}
.unglued {
border: solid 2px #8dc63f;
margin-left: -2px;
padding: 5px;
}
.unglued h3 {
margin-top: 5px;
}
a.add-wishlist .on-wishlist,
a.success,
a.success:hover {
text-decoration: none;
color: #3d4e53;
}
ul {
padding-left: 50px;
}
ul li {
margin-bottom: 4px;
}
a.success,
a.success:hover {
cursor: default;
}
/* Common elements of share links -- just swap in the background image */
/* Page layout */
#js-page-wrap {
@ -278,6 +465,9 @@ ul.tabs li.active a {
}
#js-leftcol .jsmodule.rounded .jsmod-content,
.pledge.jsmodule.rounded .jsmod-content {
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
@ -415,6 +605,8 @@ div#content-block-content a {
div#content-block-content #tabs-1 img {
padding: 5px;
border: solid 5px #EDF3F4;
padding: 5px;
border: solid 5px #EDF3F4;
}
div#content-block-content #tabs-3 {
margin-left: -5px;
@ -425,6 +617,8 @@ div#content-block-content #tabs-3 {
.tabs-content iframe {
padding: 5px;
border: solid 5px #EDF3F4;
padding: 5px;
border: solid 5px #EDF3F4;
}
.tabs-content form {
margin-left: -5px;
@ -443,8 +637,13 @@ div#content-block-content #tabs-3 {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
.work_supporter_name {
height: 50px;
line-height: 50px;
height: 50px;
line-height: 50px;
float: left;
@ -515,6 +714,9 @@ div#content-block-content #tabs-3 {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
padding: 10px;
height: auto;
font-style: normal;
@ -529,6 +731,8 @@ div#content-block-content #tabs-3 {
font-style: normal;
height: 22px;
line-height: 22px;
height: 22px;
line-height: 22px;
}
#js-rightcol .jsmodule,
#pledge-rightcol .jsmodule {
@ -546,6 +750,9 @@ div#content-block-content #tabs-3 {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
padding: 10px;
}
/* Right column - sharing */
@ -560,6 +767,9 @@ ul.social li {
-moz-border-radius: 0px;
-webkit-border-radius: 0px;
border-radius: 0px;
-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;
@ -619,6 +829,9 @@ ul.social li.embed:hover span {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
padding: 10px;
}
/* Right column - support tiers */

View File

@ -94,6 +94,9 @@
width: 50%;
margin: auto;
}
#lightbox a {
color: #6994a3;
}
.ebook_download {
margin-bottom: 15px;
}

51
static/js/hijax.js Normal file
View File

@ -0,0 +1,51 @@
// hijack a link with class "hijax" to show its content in a lightbox instead
// allows for ajaxy presentation of things like download links in a way that
// degrades gracefully for non-js users
var $j = jQuery.noConflict();
$j(document).ready(function() {
$j("a.hijax").click(function(event) {
event.preventDefault();
$j("#lightbox").load( $j(this).attr("href") + " #lightbox_content");
// fade-out rest of page elements on expand
$j('#js-topsection').css({"opacity": "0.07"});
$j('.launch_top').css({"opacity": "0.07"});
$j('.preview').css({"opacity": "0.07"});
$j('#main-container').css({"opacity": "0.07"});
$j('#js-rightcol').css({"opacity": "0.07"});
$j('#js-header').css({"opacity": "0.07"});
$j('#js-header a').css({"cursor": "default"});
$j('#footer').css({"opacity": "0.07"});
$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
$j('#about_collapser').click(function(){
$j('#js-topsection').fadeTo("slow", 1);
$j('.launch_top').fadeTo("slow", 1);
$j('.preview').fadeTo("slow", 1);
$j('#main-container').fadeTo("slow", 1);
$j('#js-rightcol').fadeTo("slow", 1);
$j('#js-header').fadeTo("slow", 1);
$j('#js-header a').css({"cursor": "pointer"});
$j('#footer').fadeTo("slow", 1);
$j('#about_expandable').css({"display": "none"});
});
});

View File

@ -1,6 +1,7 @@
@import "variables.less";
@import "campaign_tabs.less";
@import "book_detail.less";
@import "download.less";
/* Common elements of share links -- just swap in the background image */
.shareclass(@sharewhere) {

View File

@ -5,6 +5,10 @@
margin: auto;
}
#lightbox a {
color: @medium-blue;
}
.ebook_download {
a {
margin: auto 5px auto 0;