-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add donation links #96
Open
CylonicRaider
wants to merge
9
commits into
euphoria-io:master
Choose a base branch
from
CylonicRaider:donation-links
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f535468
Add donation link to static pages
CylonicRaider 3086961
Add donation banner to rooms
CylonicRaider 0e86ac6
Dismiss donation notice globally
CylonicRaider 57d9d5b
Do not show donation notice on first visit
CylonicRaider a82966e
Open URL on donation notice click
CylonicRaider a6dbf5c
Refactor static pages to use HEIM_DONATION_URL
CylonicRaider 5f5643e
Add fancy logo to front page donation button
CylonicRaider 50185fd
Fix donation banner bugs
CylonicRaider 392be76
Tweak donation link styles
CylonicRaider File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import _ from 'lodash' | ||
import Reflux from 'reflux' | ||
|
||
import storage from './storage' | ||
import actions from '../actions' | ||
|
||
|
||
const store = module.exports.store = Reflux.createStore({ | ||
init() { | ||
this.state = { | ||
eligible: null, | ||
url: process.env.HEIM_DONATION_URL || null, | ||
} | ||
this.listenTo(storage.load, this.onStorageLoad) | ||
this.listenTo(actions.sendMessage, this.onMessageSend) | ||
if (storage.store.state !== null) this.onStorageLoad() | ||
}, | ||
|
||
getInitialState() { | ||
return this.state | ||
}, | ||
|
||
onStorageLoad() { | ||
this.state.eligible = _.get(storage.store.state, 'sentMessage', false) | ||
this.trigger(this.state) | ||
}, | ||
|
||
onMessageSend() { | ||
storage.set('sentMessage', true) | ||
// Will show banner on next load | ||
}, | ||
|
||
_setURL(value) { | ||
this.state.url = value | ||
this.trigger(this.state) | ||
}, | ||
}) | ||
|
||
module.exports.openWindow = function openWindow() { | ||
if (store.state.url) window.open(store.state.url) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,9 @@ import React from 'react' | |
import heimURL from '../../lib/heimURL' | ||
|
||
|
||
export default function Footer() { | ||
export default function Footer(props) { | ||
const donationURL = (props.noDonation) ? null : process.env.HEIM_DONATION_URL | ||
|
||
return ( | ||
<footer> | ||
<div className="container"> | ||
|
@@ -17,7 +19,13 @@ export default function Footer() { | |
<a href="https://github.com/euphoria-io/heim"><span className="long">source </span>code</a> | ||
<a href="http://andeuphoria.tumblr.com/">blog</a> | ||
<a href="mailto:[email protected]">contact</a> | ||
{donationURL && <span className="spacer" />} | ||
{donationURL && <a href={donationURL}>support us!</a>} | ||
</div> | ||
</footer> | ||
) | ||
} | ||
|
||
Footer.propTypes = { | ||
noDonation: React.PropTypes.bool, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link looks better with font-weight: bold and color: #333 (or something like that).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pure black color could be considered a subtle form of highlighting... if the main text above were off-black. Will do.