forked from rigoneri/syte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update from source
- Loading branch information
Showing
78 changed files
with
1,502 additions
and
393 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.pyc | ||
.DS_Store | ||
personal_syte_settings.py |
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,24 @@ | ||
- All JS behavior is kicked off by the call to fetchBlogPosts() (syte/static/js/components/blog-posts.js) | ||
|
||
- This function is added with JQuery after page finishes loading. | ||
|
||
- fetchBlogPosts() handles: | ||
|
||
- Setting up the handlebars template 'environment', etc. | ||
- Then calls setupLinks() | ||
|
||
- setupLinks() is main entry point for the supported services | ||
|
||
- This attaches behavior to the click event of all 'a' tags. | ||
- Each click event will determine if it's a link for one of the supported | ||
services. | ||
- If the click is for a supported service: | ||
|
||
- All other service modal dialogs are hidden and the setup* function | ||
for the specified service is called. | ||
|
||
- The setup* function for the service is in charge of: | ||
|
||
- Querying server-side endpoint for the service and populating | ||
handlebar.js context with json returned. | ||
- Rendering template for service with handlebar.js |
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,21 @@ | ||
Basic steps to add support for a particular service: | ||
|
||
1. Add information to | ||
[README](https://github.com/rigoneri/syte/blob/master/README.md) | ||
2. Add setting to turn service on/off | ||
in [syte_settings.py](https://github.com/rigoneri/syte/blob/master/syte/syte_settings.py) | ||
3. Add above setting to site_pages context processor in | ||
[context_processor.py](https://github.com/rigoneri/syte/blob/master/syte/context_processor.py) | ||
4. Add a new django view for the particular service to get info and return json. | ||
- For example [twitter.py](https://github.com/rigoneri/syte/blob/master/syte/views/twitter.py) or [dribbble.py](https://github.com/rigoneri/syte/blob/master/syte/views/dribbble.py) | ||
5. Add above view to [urls.py](https://github.com/rigoneri/syte/blob/master/syte/urls.py) | ||
6. Write js file/function to query django view and add to | ||
[js components](https://github.com/rigoneri/syte/tree/master/syte/static/js/components) | ||
7. Add hook/call to main javascript integration point | ||
[links.js](https://github.com/rigoneri/syte/tree/master/syte/static/js/components/links.js) | ||
8. Add above js to list of js to | ||
[compress.py](https://github.com/rigoneri/syte/blob/master/syte/compress.py) | ||
9. Add link for service to | ||
[base view template](https://github.com/rigoneri/syte/blob/master/syte/templates/base.html) | ||
10. Add html template to | ||
[templates directory](https://github.com/rigoneri/syte/tree/master/syte/static/templates) to be rendered js file/function that queries django view for service. |
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,24 @@ | ||
List of services to add integration for: | ||
|
||
- Twitter [DONE] | ||
- Github [DONE] | ||
- Dribbble [DONE] | ||
- Instagram [DONE] | ||
- Tumblr [DONE] | ||
- Wordpress | ||
- Foursquare [DONE] | ||
- Youtube | ||
- Netflix | ||
- Flickr | ||
- Picasa | ||
- Last.fm [DONE] | ||
- Rdio | ||
- Spotify | ||
- Soundcloud [DONE] | ||
- Etsy | ||
- Fitbit | ||
- Bitbucket [DONE] | ||
|
||
List taken from [Syte's Unexpected Traction and Numbers](http://rigoneri.com/post/25804668500) |
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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import os | ||
import sys | ||
|
||
|
||
if __name__ == "__main__": | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "syte.settings") | ||
|
||
from django.core.management import execute_from_command_line | ||
|
||
execute_from_command_line(sys.argv) | ||
execute_from_command_line(sys.argv) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
Django==1.4 | ||
certifi==0.0.8 | ||
chardet==1.0.1 | ||
httplib2==0.7.4 | ||
oauthlib==0.1.3 | ||
pyasn1==0.1.3 | ||
requests==0.12.1 | ||
rsa==3.0.1 | ||
wsgiref==0.1.2 | ||
psycopg2==2.4.5 | ||
gunicorn==0.14.2 | ||
<<<<<<< HEAD | ||
-e git://github.com/brosner/python-oauth2.git#egg=oauth2 | ||
pybars==0.0.1 | ||
pybars==0.0.1 | ||
======= | ||
pybars==0.0.1 | ||
rauth==0.4.14 | ||
>>>>>>> upstream/master |
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
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -27,6 +27,3 @@ var spin_opts = { | |
className: 'spinner', | ||
zIndex: 2e9 | ||
}; | ||
|
||
|
||
|
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,45 @@ | ||
|
||
function setupBitbucket(url, el) { | ||
var href = el.href; | ||
|
||
if ($('#bitbucket-profile').length > 0) { | ||
window.location = href; | ||
return; | ||
} | ||
|
||
var params = url.attr('path').split('/').filter(function(w) { | ||
if (w.length) | ||
return true; | ||
return false; | ||
}) | ||
|
||
if (params.length == 1) { | ||
var username = params[0]; | ||
|
||
var spinner = new Spinner(spin_opts).spin(); | ||
$('#bitbucket-link').append(spinner.el); | ||
|
||
require(["json!/bitbucket/" + username, "text!templates/bitbucket-profile.html"], | ||
function(bitbucket_data, bitbucket_view) { | ||
if (bitbucket_data.error || bitbucket_data.length == 0) { | ||
window.location = href; | ||
return; | ||
} | ||
|
||
var template = Handlebars.compile(bitbucket_view); | ||
bitbucket_data.user.followers = numberWithCommas(bitbucket_data.user.followers) | ||
|
||
$(template(bitbucket_data)).modal().on('hidden', function () { | ||
$(this).remove(); | ||
adjustSelection('home'); | ||
}) | ||
|
||
spinner.stop(); | ||
|
||
}); | ||
|
||
return; | ||
} | ||
|
||
window.location = href; | ||
} |
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
Oops, something went wrong.