Commit d02ed568 authored by Bryan Richter's avatar Bryan Richter

Merge branch 'release-0.1.2' into production

parents e9790e57 354e62ee
......@@ -61,6 +61,7 @@ import Handler.RepoFeed
import Handler.ResetPassword
import Handler.SnowdriftEvent
import Handler.ToU
import Handler.Trademarks
import Handler.User
import Handler.User.Comment
import Handler.Volunteer
......
......@@ -195,8 +195,8 @@ instance Yesod App where
.
$nothing
You are not logged in, and this page is not publicly visible. #
<a href="@{AuthR LoginR}">Log in or create an account #
or return to our #
<a href="@{AuthR LoginR}">Log in or create an account
\ or return to our #
<a href="@{HomeR}">main page
.
|]
......@@ -280,8 +280,8 @@ authBrowserIdFixed =
toWidget [hamlet|
$newline never
<figure>
<a href="javascript:persona_login()">
<img src="https://browserid.org/i/persona_sign_in_blue.png">
<a href="javascript:persona_login()">
<img src="https://browserid.org/i/persona_sign_in_blue.png">
|]
in (authBrowserId def) { apLogin = login }
......@@ -293,10 +293,13 @@ snowdriftAuthBrowserId =
let parentLogin = apLogin auth toMaster
[whamlet|
<div .text-center>
<strong>We support Mozilla Persona &mdash; a universal, secure log-in that doesn't track you!
<strong>
We support Mozilla Persona — a universal,
secure log-in that doesn't track you!
^{parentLogin}
<p>
The Persona sign-in button works for both new and existing accounts.
The Persona sign-in button works for
both new and existing accounts.
|]
in auth { apLogin = login }
......@@ -306,29 +309,43 @@ snowdriftAuthHashDB =
loginRoute = PluginR "hashdb" ["login"]
login toMaster =
[whamlet|
<div id="login">
<div .text-center>
<strong>We also offer a built-in system
<br>
<a href="@{UserCreateR}">
<button>click here to create a new account
<p> or log-in below:
<form .form-horizontal method="post" action="@{toMaster loginRoute}">
<div .form-group>
<label .col-sm-4 .control-label>
Handle:
<div .col-sm-8>
<input .form-control id="x" name="username" autofocus="" required>
<div .form-group>
<label .col-sm-4 .control-label>
Passphrase:
<div .col-sm-8>
<input .form-control type="password" name="password" required>
<div .form-group>
<div .col-sm-offset-4 .col-sm-8>
<input type="submit" value="Log in">
<a href="@{ResetPasswordR}" .text-nowrap>
forgot your password?
<div #login>
<div .text-center>
<strong>
We also offer a built-in system
<div #new-account-button>
<a href=@{UserCreateR}>
<button>click here to create a new account
<p> or log-in below:
<form .form-horizontal
method=post
action=@{toMaster loginRoute}>
<div .form-group>
<label .col-sm-4 .control-label
for=handle>
Handle:
<div .col-sm-8>
<input .form-control
id=handle
name=username
autofocus
required>
<div .form-group>
<label .col-sm-4 .control-label
for=password>
Passphrase:
<div .col-sm-8>
<input .form-control
id=password
type=password
name=password
required>
<div .form-group .text-center>
<div #login-button>
<button type=submit>
Log in
<a href=@{ResetPasswordR}>
forgot your password?
|]
in auth { apLogin = login }
......@@ -373,7 +390,7 @@ createUser ident passwd name email avatar nick = do
case uid_maybe of
Just user_id -> do
-- TODO refactor back to insertSelect when quoting issue is resolved
-- TODO: refactor back to insertSelect when quoting issue is resolved
--
-- insertSelect $ from $ \ p -> return $ TagColor <# (p ^. DefaultTagColorTag) <&> val user_id <&> (p ^. DefaultTagColorColor)
--
......@@ -392,7 +409,7 @@ createUser ident passwd name email avatar nick = do
"), and let us know any questions."
]
-- TODO: change snowdrift_id to the generated site-project id
-- TODO(mitchell): This notification doesn't get sent to the event channel. Is that okay?
-- TODO: This notification doesn't get sent to the event channel. Is that okay?
insert_ $ Notification now NotifWelcome user_id (Just snowdrift_id) notif_text False
return $ Just user_id
Nothing -> do
......@@ -452,7 +469,7 @@ addAlertEm level msg em = do
#{msg}
|] render
-- TODO(mitchell): don't export this
-- TODO: don't export this
addAlert :: Text -> Text -> Handler ()
addAlert level msg = do
render <- getUrlRenderParams
......
This diff is collapsed.
module Handler.Trademarks where
import Import
import Widgets.Doc
getTrademarksR :: Handler Html
getTrademarksR = defaultLayout $ do
snowdriftTitle "Trademarks"
renderDoc "Trademarks"
......@@ -128,6 +128,7 @@ entitiesMap :: Ord (Key t) => [Entity t] -> Map (Key t) t
entitiesMap = foldr (\(Entity k v) -> M.insert k v) mempty
-- allow easier creation of pretty bootstrap 3 forms. there has to be an easier way -_-
-- see SD-463
--fieldSettings :: forall master . SomeMessage master -> [(Text, Text)] -> FieldSettings master
--fieldSettings label attrs = FieldSettings label Nothing Nothing Nothing attrs
......
......@@ -67,44 +67,7 @@ pledgeField project_id = Field
hasValue = value `elem` list
otherValue = if hasValue then "" else show value
[whamlet|
$newline never
<fieldset>
$forall amount <- list
<input id="#{ident}-#{amount}" .radio-inline name="#{name}" *{attrs} type="radio" :req:required value="#{amount}" :amount == value:checked>
#{amount}
<div>
<input id="#{ident}-other" .radio-inline name="#{name}" *{attrs} type="radio" :req:required value="#{name}-other" :not hasValue:checked>other:&nbsp;
<input id="#{ident}-other-val" .form-inline style="width : 2.5em; text-align : center" name="#{name}-other" *{attrs} type="number" step="1" min="1" value="#{otherValue}">
|]
toWidget [julius|
(function () {
var button = document.getElementById("#{rawJS ident}-other");
var field = document.getElementById("#{rawJS ident}-other-val");
function setup_other_field() {
if(button.checked) {
field.disabled = false;
field.required = true;
} else {
field.disabled = true;
field.required = false;
field.value = "";
}
}
var buttons = document.getElementsByName("#{rawJS name}");
for(var i = 0; i < buttons.length; i++) {
buttons[i].onchange = setup_other_field;
}
setup_other_field();
})()
|]
$(widgetFile "pledge-field")
get_list = do
mlist <- lookupSession pledgeListKey
......
Snowdrift.coop
==============
[Snowdrift.coop](https://snowdrift.coop) is a non-profit, cooperative platform for funding Free/Libre/Open (FLO) works. Using a many-to-many matching pledge, we aim to empower the global community to better promote freedom-respecting projects of all sorts.
[Snowdrift.coop](https://snowdrift.coop) is a non-profit, cooperative platform
for funding Free/Libre/Open (FLO) works. Using a many-to-many matching pledge,
we aim to empower the global community to better promote freedom-respecting
projects of all sorts.
For the basic idea, see our [illustrated intro](https://snowdrift.coop/p/snowdrift/w/intro).
For the basic idea, see our
[illustrated intro](https://snowdrift.coop/p/snowdrift/w/en/intro).
Other pages on the site explain our [mission](https://snowdrift.coop/p/snowdrift/w/mission)
Other pages on the site explain our
[mission](https://snowdrift.coop/p/snowdrift/w/en/mission)
and include discussion and research on issues like
the [economics of FLO projects](https://snowdrift.coop/p/snowdrift/w/economics),
the [incentives behind donations](https://snowdrift.coop/p/snowdrift/w/psychology),
how our model departs from that of the other [600+ donation-style crowdfunding sites](https://snowdrift.coop/p/snowdrift/w/othercrowdfunding),
the
[economics of FLO projects](https://snowdrift.coop/p/snowdrift/w/en/economics),
the
[incentives behind donations](https://snowdrift.coop/p/snowdrift/w/en/psychology),
how our model departs from that of
[other funding sites](https://snowdrift.coop/p/snowdrift/w/en/othercrowdfunding),
and more.
As a work in progress, we are still clarifying the details and adjusting our presentation.
Contributing
===========
Our [how-to-help page](https://snowdrift.coop/p/snowdrift/w/how-to-help) includes further notes about the site and info about volunteering (including in non-programming ways).
We also have an in-progress, self-hosted [ticket system](http://snowdrift.coop/p/snowdrift/t).
Our [how-to-help page](https://snowdrift.coop/p/snowdrift/w/how-to-help)
includes further notes about the site and info about volunteering (including
in non-programming ways). We also have an in-progress, self-hosted
[ticket system](http://snowdrift.coop/p/snowdrift/t).
Snowdrift.coop is built in **Haskell** using the **[Yesod web framework](http://www.yesodweb.com/)**,
but even if you don't know any Haskell, you may still put your HTML/CSS/Javascript skills to work!
Snowdrift.coop is built with **Haskell** and the
**[Yesod web framework](http://www.yesodweb.com/)**,
but even if you don't yet know Haskell,
you may still put your HTML/CSS/Javascript skills to work!
We welcome contributions from developers of all skill levels.
Whatever your background, we're happy to answer questions or get any comments.
Hop on #snowdrift on [freenode.net](http://webchat.freenode.net/?channels=#snowdrift), and say hello!
Hop on #snowdrift at
[freenode.net](http://webchat.freenode.net/?channels=#snowdrift), and say hello!
Essential build instructions
----------------------------
Note: our code is mirrored at
[GitHub](https://github.com/snowdriftcoop/snowdrift) (which is popular but proprietary)
and [Gitorious](https://gitorious.org/snowdrift/snowdrift) (which is FLO, licensed AGPL, but less popular).
[Gitorious](https://gitorious.org/snowdrift/snowdrift)
(which is FLO, licensed AGPL, but is shutting down soon and we haven't finalized
our move to another FLO service yet) and
[GitHub](https://github.com/snowdriftcoop/snowdrift)
(which is popular but proprietary).
**You really should read our full [guide to our code](GUIDE.md)
which has step-by-step instructions that even a true beginner can follow.**
It also contains links for learning Haskell, comments about our development methods, and more.
It also contains links for learning Haskell, comments about development methods,
and more.
But for those experienced with Git, Haskell, PostgreSQL, and perhaps even Yesod,
here's quick and dirty minimal instructions to get started:
......@@ -49,7 +64,8 @@ here's quick and dirty minimal instructions to get started:
// update cabal, set PATH, etc. — see GUIDE.md for more detailed instructions
// Fork, clone and install
git clone [your remote address, e.g. git@gitorious.org:snowdrift/yourusername-snowdrift.git]
git clone [your remote address]
// your remote looks like git@gitorious.org:snowdrift/yourusername-snowdrift.git]
cd snowdrift
cabal sandbox init
cabal install --enable-tests -fdev
......@@ -63,8 +79,8 @@ Snowdrift Development
// To see the live site, point your browser to localhost:3000
//To rebuild after making changes run
// To rebuild after making changes run
cabal install -fdev
Read through GUIDE.md for thorough details and more about development, testing, and so on.
Read through GUIDE.md for thorough details about development, testing, and so on.
```
name: Snowdrift
version: 0.1.1
version: 0.1.2
license: OtherLicense
license-file: LICENSE
author: David L. L. Thomas
......@@ -99,6 +99,7 @@ library
Handler.ResetPassword
Handler.SnowdriftEvent
Handler.ToU
Handler.Trademarks
Handler.User
Handler.User.Comment
Handler.Utils
......
......@@ -14,6 +14,7 @@
/priv PrivacyR GET
/reset-password ResetPasswordR GET POST
/tou ToUR GET
/trademarks TrademarksR GET
/tutorial/markdown MarkdownTutorialR GET
/donate DonateR GET
......
......@@ -6,12 +6,13 @@ $newline never
\<!--[if gt IE 8]><!-->
<html .no-js lang="en"> <!--<![endif]-->
<head>
<link rel="shortcut icon" href="@{FaviconR}">
<link rel="shortcut icon" href=@{FaviconR}>
<meta charset="UTF-8">
<script>
/*
@licstart The following is the entire license notice for the JavaScript code in this page.
@licstart The following is the entire license notice for the
JavaScript code in this page.
Copyrights on the code are held by the respective authors,
see git commit history where not otherwise specified.
......@@ -31,7 +32,8 @@ $newline never
through which recipients can access the Corresponding Source.
@licend The above is the entire license notice for the JavaScript code in this page.
@licend The above is the entire license notice for the JavaScript
code in this page.
*/
<title>#{pageTitle pc}
......@@ -43,12 +45,14 @@ $newline never
^{pageHead pc}
\<!--[if lt IE 9]>
\<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
\<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js">
\</script>
\<![endif]-->
<script src=@{StaticR js_modernizr_js}>
<script>
document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/,'js');
document.documentElement.className
= document.documentElement.className.replace(/\bno-js\b/,'js');
function fixup_logo() {
var head = document.getElementById("head");
......@@ -70,20 +74,24 @@ $newline never
<footer>
<div .row>
<div .col-md-4>
Writings and images here are free to use and share under #
Aside from
<a href=@{TrademarksR}> trademarks
, writings and images here #
are free to use and share under #
<a rel="license" title="Creative Commons Attribution Share-Alike 4.0 International" href="https://creativecommons.org/licenses/by-sa/4.0">
CC&nbsp;BY-SA
<div .col-md-4>
This website's #
<a href="#{extraSourceRepo $ appExtra $ settings master}">source code
This site's #
<a href=#{extraSourceRepo $ appExtra $ settings master}>
source code
\ is free under the terms of the #
<a rel="license" title="Affero GPL version 3.0 or later" href="https://www.gnu.org/licenses/agpl">
<a rel="license" title="Affero GPL v3 or later" href="https://www.gnu.org/licenses/agpl">
GNU&nbsp;AGPLv3+
<div .col-md-4>
The #
<a href="/license/javascript" rel="jslicense">licenses for any JavaScript
\ we use are all free/libre/open also
All JavaScript on this site is #
<a href=@{JsLicenseR} rel="jslicense">
freely-licensed
$maybe analytics <- extraAnalytics $ appExtra $ settings master
<script>
......
......@@ -41,9 +41,6 @@ input[type=submit]:active, button:active
input[type=text], input[type=email]
width: 30em
input[type=number]
width: inherit
/* removes the seemingly problematic width: 100% from bootstrap */
.form-control
width: auto
......
<h1> Donate to Snowdrift.coop
<h1>Donate to Snowdrift.coop
<p>
Once we launch fully, we will raise funds via the same mechanims as all other projects.
For now, we gratefully accept any donations you care to send to help get us to the launch.
Once we launch, we will use the same funding mechanims as other projects.
For now, we gratefully accept donations to help get us to the launch.
<h2>Our current funding
<p>
We ran a
<a href="https://snowdrift.tilt.com">successful campaign
at the end of 2014, and the co-founders have continued to donate personally.
This support currently provides us a budget just barely enough to fund a couple (underpaid)
developers, cover legal expenses, and a few other misc. items.
Our
<a href=@{WikiR "snowdrift" LangEn "accounting"}> accounting page
provides details about our budget and how we use the funds.
We ran a
<a href="https://snowdrift.tilt.com">
successful campaign
at the end of 2014, and the co-founders have continued to donate personally
(and to volunteer substantial time without compensation).
Currently, we have a budget just barely enough to fund a couple (underpaid)
developers and cover some legal expenses along with a few other misc. items.
Our
<a href=@{WikiR "snowdrift" LangEn "accounting"}>
accounting page
provides details about our budget and how we use the funds.
<p>
Further donations will help us make faster progress and get launched in the best shape.
To donate, see the options below. Although this is not formally part of our fund-drive,
we can potentially provide comparable rewards still.
Please <a href=@{ProjectContactR "snowdrift"}>contact&nbsp;us</a> with any questions.
Although the formal fund-drive is over, we can still provide comparable
rewards for new donors. Please
<a href=@{ProjectContactR "snowdrift"}>
contact&nbsp;us
with any questions.
<hr>
<p>
<em>
Note: Snowdrift.coop is incorporated as a Michigan non-profit cooperative
but does not have federal tax-exempt status.
Unlike a 501(c)(3) charity, donations to us are not tax-deductible.
<em>
Note: Snowdrift.coop is incorporated as a Michigan non-profit cooperative
but does not have federal tax-exempt status.
Unlike a 501(c)(3) charity, donations to us are not tax-deductible.
<hr>
<figure>
<img alt="Paypal" src=@{StaticR img_external_PayPal_logo_gif}>
<form abframeid="iframe.0.4323007988200692" abineguid="E620BEBBFF4F4B1695F2E9204A329253" action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin: 0 auto;" target="_top"><input name="cmd" type="hidden" value="_s-xclick"> <input name="hosted_button_id" type="hidden" value="M24Z4DFEW4SQL"> <input alt="PayPal donation option" name="submit" src=@{StaticR img_external_paypal_donate_gif} type="image">
<img alt="Paypal" src=@{StaticR img_external_PayPal_logo_gif}>
<form
abframeid="iframe.0.4323007988200692"
abineguid="E620BEBBFF4F4B1695F2E9204A329253"
action="https://www.paypal.com/cgi-bin/webscr"
method="post"
style="margin: 0 auto;"
target="_top">
<input name="cmd" type="hidden" value="_s-xclick">
<input name="hosted_button_id" type="hidden" value="M24Z4DFEW4SQL">
<input
alt="PayPal donation option"
name="submit"
src=@{StaticR img_external_paypal_donate_gif}
type="image">
<p>
The Donate button above goes to an easy form,
but you can also log-in to Paypal and send funds directly to aaron@snowdrift.coop
(and if you donate that way and mark it as a gift, it will avoid costing us extra fees).
<strong>
Note: the button above is convenient and works with or without a
Paypal account, but using it costs us a 2.9% + $0.30 fee.
To skip the fee, log-in to Paypal and send funds to
aaron@snowdrift.coop funded by your bank or Paypal balance
(not by credit card or paypal credit) and marked as a gift.
<hr>
<figure>
<a href="https://www.dwolla.com/hub/snowdrift">
<img alt="Donate with Dwolla" src=@{StaticR img_external_dwolla_png}>
<a href="https://www.dwolla.com/hub/snowdrift">
<img alt="Donate with Dwolla" src=@{StaticR img_external_dwolla_png}>
<p>
Dwolla is U.S.-only and requires some set up and connecting a bank account
but charges no fee at all for donations under $10 and otherwise charges only 25&cent;.
Dwolla uses some proprietary JavaScript, but we like that they avoid credit cards and associated fees.
Dwolla is U.S.-only and requires some delay and set up with a bank account
but charges only 25¢ per transaction over $10 and no charge otherwise.
They use some proprietary JavaScript, but we like their rejection of credit
cards and associated fees.
<hr>
<figure>
<img alt="Bitcoin" src=@{StaticR img_external_Bitcoin_png} style="height: 4em">
<img alt="Bitcoin"
src=@{StaticR img_external_Bitcoin_png}
style="height: 4em">
<div .row>
<div .col-md-9 .col-md-offset-2 .col-lg-8>
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
<div .col-md-9 .col-md-offset-2 .col-lg-8>
<pre>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Please use this address to publicly contribute to Snowdrift.coop:
1Bty8tCJDYGK2f5v5g71oLfL2qPTNv<wbr />sDmB
Please use this address to publicly contribute to Snowdrift.coop:
1Bty8tCJDYGK2f5v5g71oLfL2qPTNv<wbr />sDmB
We prefer you use the above address to help us with transparency, but if
you would like us to generate an address specifically for your payment
we will do so on request.
We prefer you use the above address to help us with transparency, but if
you would like us to generate an address specifically for your payment
we will do so on request.
If you would like to be acknowledged or receive rewards, send us a
message identifying yourself signed with the address you used to pay.
If you would like to be acknowledged or receive rewards, send us a
message identifying yourself signed with the address you used to pay.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iF4EAREIAAYFAlSOQskACgkQuHM2OD<wbr />J01/<wbr />L2fQEApnLrKteMemNbVBFpsfbKu+Ea
NYxSl4UfcZw8V0U5gwQBAJspPE1wRz<wbr />89ed9RtsC11osgZdD47NZrhCAHR2Pz<wbr />lMD/
=lB8a
-----END PGP SIGNATURE-----
iF4EAREIAAYFAlSOQskACgkQuHM2OD<wbr />J01/<wbr />L2fQEApnLrKteMemNbVBFpsfbKu+Ea
NYxSl4UfcZw8V0U5gwQBAJspPE1wRz<wbr />89ed9RtsC11osgZdD47NZrhCAHR2Pz<wbr />lMD/
=lB8a
-----END PGP SIGNATURE-----
<hr>
<div .text-center>Thank you for your support!
.other-share-value
text-align: center
width: 4em
margin-left: .5em
$newline never
<fieldset>
$forall amount <- list
<input .radio-inline :req:required *{attrs}
type=radio
id=#{ident}-#{amount}
name=#{name}
value=#{amount}
:amount == value:checked>
#{amount}
<div>
<input .radio-inline *{attrs}
type=radio
id=#{ident}-other
name=#{name}
value=#{name}-other
:req:required :not hasValue:checked>
other:
<input .form-inline .other-share-value *{attrs} step=1 min=0
type=number
id=#{ident}-other-val
name=#{name}-other
value=#{otherValue}>
(function () {
var button = document.getElementById("#{rawJS ident}-other");
var field = document.getElementById("#{rawJS ident}-other-val");
function setup_other_field() {
if(button.checked) {
field.disabled = false;
field.required = true;
} else {
field.disabled = true;
field.required = false;
field.value = "";
}
}
var buttons = document.getElementsByName("#{rawJS name}");
for(var i = 0; i < buttons.length; i++) {
buttons[i].onchange = setup_other_field;
}
setup_other_field();
})();
<h1 .text-center> #{projectName project} general discussion
<p>
Note: see additional discussion alongside project
<a href=@{WikiPagesR (projectHandle project)}> wiki pages
and
<a href=@{ProjectBlogR $ projectHandle project}> blog posts
<div .page-toolbox>
<div .page-tool>
<a href=@{ProjectR project_handle}> back to main project page
$if has_comments
<div .page-tool>
<a href="@{ProjectR project_handle}"> back to main project page
$if has_comments
<div .page-tool>
<a href="@{NewProjectDiscussionR project_handle}"> new topic
<div .page-tool>
<a href="@{ProjectDiscussionR project_handle}?state=closed">
closed threads
<a href=@{NewProjectDiscussionR project_handle}> new topic
<div .page-tool>
<a href=@{ProjectDiscussionR project_handle}?state=closed>
closed threads
^{comment_forest}
$if not has_comments
$if isJust muser
<form action="@{NewProjectDiscussionR project_handle}" method="POST">
^{comment_form}
<input type="submit" name="mode" value="preview">
$else
<p>
There is no discussion here yet.
<a href=@{AuthR LoginR}>Sign in
to start a new topic.
$if isJust muser
<form action=@{NewProjectDiscussionR project_handle} method="POST">
^{comment_form}
<input type="submit" name="mode" value="preview">
$else
<p>
There is no discussion here yet.
<a href=@{AuthR LoginR}> Sign in
to start a new topic.
<div .page-toolbox>
<div .page-tool>
<a href="@{ProjectDiscussionR project_handle}"> back to full discussion
<a href=@{ProjectDiscussionR project_handle}> back to full discussion
^{widget}
......@@ -5,6 +5,7 @@
border-style: inset outset outset inset
border-width: medium
border-color: #4477bb
margin-bottom: 1em
.img-padding-r
padding-right: 3px
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment