diff --git a/frontend/forms.py b/frontend/forms.py index 20747ee3..71f8fa00 100644 --- a/frontend/forms.py +++ b/frontend/forms.py @@ -200,4 +200,23 @@ class EmailShareForm(forms.Form): # allows us to return user to original page by passing it as hidden form input # we can't rely on POST or GET since the emailshare view handles both # and may iterate several times as it catches user errors, losing URL info - next = forms.CharField(widget=forms.HiddenInput()) \ No newline at end of file + next = forms.CharField(widget=forms.HiddenInput()) + +class FeedbackForm(forms.Form): + sender = forms.EmailField(widget=forms.TextInput(attrs={'size':50})) + subject = forms.CharField(max_length=500, widget=forms.TextInput(attrs={'size':50})) + message = forms.CharField(widget=forms.Textarea()) + page = forms.CharField(widget=forms.HiddenInput()) + notarobot = forms.IntegerField(label="Please prove you're not a robot") + answer = forms.IntegerField(widget=forms.HiddenInput()) + num1 = forms.IntegerField(widget=forms.HiddenInput()) + num2 = forms.IntegerField(widget=forms.HiddenInput()) + + def clean(self): + cleaned_data = self.cleaned_data + notarobot = str(cleaned_data.get("notarobot")) + answer = str(cleaned_data.get("answer")) + if notarobot!=answer: + raise forms.ValidationError(_("Whoops, try that sum again.")) + + return cleaned_data diff --git a/frontend/templates/base.html b/frontend/templates/base.html index 7b2fbc16..8e1a7e6b 100644 --- a/frontend/templates/base.html +++ b/frontend/templates/base.html @@ -25,6 +25,9 @@ +
+

Feedback

+
diff --git a/frontend/templates/feedback.html b/frontend/templates/feedback.html new file mode 100644 index 00000000..d4b68f4f --- /dev/null +++ b/frontend/templates/feedback.html @@ -0,0 +1,31 @@ +{% extends "basedocumentation.html" %} + +{% block title %}Feedback{% endblock %} + +{% block doccontent %} + +

Love something? Hate something? Found something broken or confusing? We're so glad you're telling us!

+ + To: support@gluejar.com
+
+ {% csrf_token %} + {{ form.sender.label_tag }}
+ {{ form.sender.errors }} + {{ form.sender }}
+ {{ form.subject.label_tag }}
+ {{ form.subject.errors }} + {{ form.subject }}
+ {{ form.message.label_tag }}
+ {{ form.message.errors }} + {{ form.message }}
+ {{ form.notarobot.errors }} + {{ form.non_field_errors }} + Please prove you're not a robot. {{num1}} + {{num2}} = + {{ form.notarobot }}
+ {{ form.answer }} + {{ form.num1 }} + {{ form.num2 }} + {{ form.page }} + +
+{% endblock %} \ No newline at end of file diff --git a/frontend/templates/press.html b/frontend/templates/press.html new file mode 100644 index 00000000..e9f54457 --- /dev/null +++ b/frontend/templates/press.html @@ -0,0 +1,75 @@ +{% extends "basedocumentation.html" %} + +{% block doccontent %} +

Press

+
+
+ Overview
+ Press Coverage
+ Blog Coverage (Highlights)
+
+
+ Video
+ Newsletters
+ Logos & Icons
+
+
+ Additional press questions? Please email press@gluejar.com. +
+
+
+ Thanks for your interest! As of January 2011 Unglue.It is in alpha release. Things are mostly working but they're rough around the edges and may change without notice. +
+
+ +

Overview

+
+
What?
+
Unglue.It offers a win-win solution to readers, who want to read and share their favorite books conveniently, and rights holders, who want to be rewarded for their work.

+We run [TBA:link to wikipedia?]crowdfunding campaigns to raise money for specific, already-published books. When we reach a goal set by the rights holder, we pay them to unglue their work. They issue an electronic edition with a Creative Commons license. This license makes the edition free and legal for everyone to read, copy, and share, noncommercially, worldwide.
+
Why?
+
As ereaders proliferate, more and more people are enjoying the ereading experience. However, their favorite books may not be available as ebooks. They may come with DRM which makes them unreadable on certain devices, and difficult or impossible for individuals and libraries to lend. Or they may not be able to tell if they have the legal right to use the book as they'd like.

+When books have a clear, established legal license which promotes use, they can be read more widely, leading to enjoyment, scholarship, and innovation. By raising money to compensate authors and publishers up front, Unglue.It encourages the benefits of openness while ensuring sustainability for creators.
+
Who?
+
Unglue.It is a service of Gluejar, Inc. We are Eric Hellman, Amanda Mecke, Raymond Yee, and Andromeda Yelton. (TBA: include contractors?) We come from the worlds of entrepreneurship, linked data, physics, publishing, education, and library science, to name a few. You can learn more about us at our personal home pages (linked above) or the team page of our corporate site.
+
When?
+
Unglue.It is in alpha -- a limited release for testing purposes -- as of January 2011. If you sign up for our newsletter, we'll tell you the moment we're in beta. At that point we'll have active campaigns and be welcoming account signups from everyone.
+
Where?
+
Gluejar is a New Jersey corporation, but its employees and contractors live and work across North America. The best way to contact us is by email, press@gluejar.com.
+
What does it cost?
+
Unglue.It is free to join and explore. Supporters pay only if they choose to support campaigns, and the amount is up to them. Unglue.It takes a small percentage from successful campaigns, with the remainder going to the rights holders.
+
What's your technology?
+
Unglue.It is built using Python and the Django framework. [TBA: links] We use data from the Google Books, OpenLibrary, LibraryThing, and GoodReads APIs [TBA: public? "Open Library"]; we appreciate that they've made these APIs available, and we'll be returning the favor with our own API. We use the Less framework [TBA:link] to organize our CSS. We collaborate on our code at github[TBA: capitalization?] and deploy to Amazon EC2 [TBA: throw in "cloud" here somehow, look up what EC2 is exactly].
+
I have more questions...
+
Please consult our FAQ (sidebar at left); join the site and explore its features for yourself; or email us, press@gluejar.com.
+ +

Press Coverage

+

Blog Coverage (Highlights)

+

Video

+

Newsletters

+

Logos & Icons

+
+
+
+

(161 x 70)

+
+
+
+

(44 x 30)

+
+
+





+
+logos at +Low Resolution Logo (350 x 150) +Standard Resolution Logo (1400 x 600) +High Resolution Logo (5600 x 2400) + +black background and white background (color versions only) + +icons on black, dark grey, white; 1(?) p grey border, rounded corners (at some surprisingly large border radius), 48px square + +screencaps +look through mail for different sizes of icon and B&W -- ping stefan, ask if this looks like enough, & if not can he send more +
+{% endblock %} \ No newline at end of file diff --git a/frontend/templates/thanks.html b/frontend/templates/thanks.html new file mode 100644 index 00000000..7c3be620 --- /dev/null +++ b/frontend/templates/thanks.html @@ -0,0 +1,11 @@ +{% extends "basedocumentation.html" %} + +{% block title %}Feedback{% endblock %} + +{% block doccontent %} + +

Thanks for helping us make Unglue.It better!

+ +

Would you like to go back to the page you were on? + +{% endblock %} \ No newline at end of file diff --git a/frontend/urls.py b/frontend/urls.py index 471402a5..125d7dc5 100644 --- a/frontend/urls.py +++ b/frontend/urls.py @@ -59,4 +59,8 @@ urlpatterns = patterns( url('^500testing/$', direct_to_template, {'template': '500.html'}), url('^robots.txt$', direct_to_template, {'template': 'robots.txt'}), url(r"^emailshare/$", "emailshare", name="emailshare"), + url(r"^feedback/$", "feedback", name="feedback"), + url(r"^feedback/thanks/$", TemplateView.as_view(template_name="thanks.html")), + url(r"^press/$", TemplateView.as_view(template_name="press.html"), + name="press"), ) diff --git a/frontend/views.py b/frontend/views.py index eeb026c9..4d9274f3 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -4,6 +4,7 @@ import json import urllib import logging import datetime +from random import randint from re import sub from itertools import islice from decimal import Decimal as D @@ -39,7 +40,7 @@ from regluit.core.search import gluejar_search from regluit.core.goodreads import GoodreadsClient from regluit.frontend.forms import UserData, ProfileForm, CampaignPledgeForm, GoodreadsShelfLoadingForm from regluit.frontend.forms import RightsHolderForm, UserClaimForm, LibraryThingForm, OpenCampaignForm -from regluit.frontend.forms import ManageCampaignForm, DonateForm, CampaignAdminForm, EmailShareForm +from regluit.frontend.forms import ManageCampaignForm, DonateForm, CampaignAdminForm, EmailShareForm, FeedbackForm from regluit.payment.manager import PaymentManager from regluit.payment.parameters import TARGET_TYPE_CAMPAIGN, TARGET_TYPE_DONATION from regluit.payment.paypal import Preapproval, IPN_PAY_STATUS_ACTIVE, IPN_PAY_STATUS_INCOMPLETE, IPN_PAY_STATUS_COMPLETED, IPN_PAY_STATUS_CANCELED @@ -1080,3 +1081,39 @@ def emailshare(request): form = EmailShareForm(initial={'next':next, 'message':"I'm ungluing books at unglue.it. Here's one of my favorites: "+next, "sender":sender}) return render(request, "emailshare.html", {'form':form}) + +def feedback(request): + num1 = randint(0,10) + num2 = randint(0,10) + sum = num1 + num2 + + if request.method == 'POST': + form=FeedbackForm(request.POST) + if form.is_valid(): + subject = form.cleaned_data['subject'] + message = form.cleaned_data['message'] + sender = form.cleaned_data['sender'] + recipient = 'support@gluejar.com' + page = form.cleaned_data['page'] + message = "<<>>"+message + send_mail(subject, message, sender, [recipient]) + + return render(request, "thanks.html", {"page":page}) + + else: + num1 = request.POST['num1'] + num2 = request.POST['num2'] + + else: + if request.user.is_authenticated(): + sender=user.email; + else: + sender='' + try: + page = request.GET['page'] + except: + page='/' + form = FeedbackForm(initial={"sender":sender, "subject": "Feedback on page "+page, "page":page, "num1":num1, "num2":num2, "answer":sum}) + + return render(request, "feedback.html", {'form':form, 'num1':num1, 'num2':num2}) + diff --git a/static/css/documentation.css b/static/css/documentation.css index e5b28990..109b086d 100644 --- a/static/css/documentation.css +++ b/static/css/documentation.css @@ -188,6 +188,7 @@ dt { } dd { margin: 0; + padding-bottom: 7px; } .doc ol li { margin-bottom: 7px; @@ -198,3 +199,36 @@ dd { .collapse ul { display: none; } +/* items on press page */ +.presstoc { + overflow: auto; + clear: both; + padding-bottom: 10px; +} +.presstoc div { + float: left; + padding-right: 15px; +} +.presstoc div.pressemail { + border: solid 2px #3d4e53; + padding: 5px; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; +} +.pressimages { + clear: both; +} +.pressimages .outer { + clear: both; +} +.pressimages .outer div { + float: left; + width: 25%; + padding-bottom: 10px; + display: table-cell; + margin: auto 0; +} diff --git a/static/css/landingpage.css b/static/css/landingpage.css index 890a208c..3835a4cf 100644 --- a/static/css/landingpage.css +++ b/static/css/landingpage.css @@ -141,14 +141,19 @@ height: 24px; line-height: 24px; width: 24px; - -moz-border-radius: 12px 12px 12px 12px; - -webkit-border-radius: 12px 12px 12px 12px; - border-radius: 12px 12px 12px 12px; - -moz-border-radius: 12px 12px 12px 12px; - -webkit-border-radius: 12px 12px 12px 12px; - border-radius: 12px 12px 12px 12px; - border: solid 4px #3d4e53; + -moz-border-radius: 24px 24px 24px 24px; + -webkit-border-radius: 24px 24px 24px 24px; + border-radius: 24px 24px 24px 24px; + -moz-border-radius: 24px 24px 24px 24px; + -webkit-border-radius: 24px 24px 24px 24px; + border-radius: 24px 24px 24px 24px; + -moz-box-shadow: -1px 1px #3d4e53; + -webkit-box-shadow: -1px 1px #3d4e53; + box-shadow: -1px 1px #3d4e53; + border: solid 3px white; text-align: center; + color: white; + background: #3d4e53; font-size: 17px; z-index: 5000; margin-top: -12px; diff --git a/static/css/sitewide.css b/static/css/sitewide.css index e698c547..fd8fedd7 100644 --- a/static/css/sitewide.css +++ b/static/css/sitewide.css @@ -35,6 +35,42 @@ body { font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Arial, Helvetica, sans-serif; color: #3d4e53; } +#feedback { + /* remove after alpha? */ + + position: fixed; + top: 50%; + left: 0; + z-index: 500; +} +#feedback p { + /* see http://scottgale.com/blog/css-vertical-text/2010/03/01/ */ + + writing-mode: tb-rl; + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + white-space: nowrap; + display: block; + bottom: 0; + width: 160px; + height: 26px; + -moz-border-radius: 32px 32px 32px 32px; + -webkit-border-radius: 32px 32px 32px 32px; + border-radius: 32px 32px 32px 32px; + background: #8dc63f; + margin-bottom: 0; + text-align: center; + margin-left: -67px; +} +#feedback p a { + color: white; + font-size: 24px; + font-weight: normal; +} +#feedback p a:hover { + color: #3d4e53; +} a { font-weight: bold; font-size: 13px; diff --git a/static/less/documentation.less b/static/less/documentation.less index bd814b15..8c476b21 100644 --- a/static/less/documentation.less +++ b/static/less/documentation.less @@ -124,6 +124,7 @@ dt { dd { margin: 0; + padding-bottom: 7px; } .doc ol li { @@ -136,4 +137,36 @@ dd { .collapse ul { display: none; +} + +/* items on press page */ +.presstoc { + div { + float: left; + padding-right: 15px; + + &.pressemail { + border: solid 2px @text-blue; + padding: 5px; + .border-radius(7px, 7px, 7px, 7px); + } + } + overflow: auto; + clear: both; + padding-bottom: 10px; +} + +.pressimages { + .outer { + clear: both; + + div { + float: left; + width: 25%; + padding-bottom: 10px; + display: table-cell; + margin: auto 0; + } + } + clear: both; } \ No newline at end of file diff --git a/static/less/landingpage.less b/static/less/landingpage.less index 4125eadd..bd04be30 100644 --- a/static/less/landingpage.less +++ b/static/less/landingpage.less @@ -92,9 +92,14 @@ float: right; .height(24px); width: 24px; - .border-radius(12px, 12px, 12px, 12px); - border: solid 4px @text-blue; + .border-radius(24px, 24px, 24px, 24px); + -moz-box-shadow: -1px 1px @text-blue; + -webkit-box-shadow: -1px 1px @text-blue; + box-shadow: -1px 1px @text-blue; + border: solid 3px white; text-align: center; + color: white; + background: @text-blue; font-size: 17px; z-index:5000; margin-top: -12px; diff --git a/static/less/sitewide.less b/static/less/sitewide.less index d6039d62..eb1990b0 100644 --- a/static/less/sitewide.less +++ b/static/less/sitewide.less @@ -32,6 +32,41 @@ body{ color:@text-blue; } +#feedback { + /* remove after alpha? */ + position: fixed; + top: 50%; + left: 0; + z-index:500; + + p { + /* see http://scottgale.com/blog/css-vertical-text/2010/03/01/ */ + a { + color:white; + font-size:24px; + font-weight:normal; + + &:hover { + color: @text-blue; + } + } + writing-mode:tb-rl; + -webkit-transform:rotate(90deg); + -moz-transform:rotate(90deg); + -o-transform: rotate(90deg); + white-space:nowrap; + display:block; + bottom:0; + width:160px; + height:26px; + .border-radius(32px, 32px, 32px, 32px); + background: @call-to-action; + margin-bottom: 0; + text-align: center; + margin-left: -67px; + } +} + a { font-weight:bold; font-size:13px;