add client side social integration, use webassets
2
syte/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
*.swp
|
|
||||||
*.pyc
|
|
||||||
@@ -1,13 +1,59 @@
|
|||||||
Syte theme for Pelican
|
Syte theme for Pelican
|
||||||
======================
|
======================
|
||||||
|
|
||||||
This theme is based on [Syte][syte] and is for Pelican. Right now, its a bit messy. But I'll clean this up later.
|
This theme is based on [Syte][syte] and is for Pelican. It has been instanciated by [samrat][samrat] and continued by [arnaudbos][arnaudbos].
|
||||||
|
|
||||||
Anyway, you can [see this theme in action here][samrat].
|
You can [see this theme in action here][sneakernet].
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
To try this out, clone this repo and in your `settings.py`, set `THEME = /path/to/syte-pelican` and `MEDIA_URL= /path/to/syte-pelican/static`.
|
Settings
|
||||||
|
--------
|
||||||
|
|
||||||
|
This theme uses the SOCIAL setting from Pelican and build social integration on top of it with JavaScript calls.
|
||||||
|
All these settings are optional, not using them will simply not enable the social integration and the links will remain just links.
|
||||||
|
|
||||||
|
#### HTML (OPTIONAL)
|
||||||
|
|
||||||
|
* ABOUT = u'Describe yourself or your site here, this will go right under the site name'
|
||||||
|
* SITE_DESCRIPTION = u'Used in HTML meta tag for description'
|
||||||
|
* SITE_KEYWORDS = u'Used in the HTML meta tag for keywords'
|
||||||
|
|
||||||
|
###### Not so optional
|
||||||
|
|
||||||
|
Pelican-syte uses the webassets module integrated into Pelican, so you will also need to install it ( `pip install webassets` ) and add the `WEBASSETS = True` setting.
|
||||||
|
|
||||||
|
#### Links
|
||||||
|
|
||||||
|
* DISPLAY_HOME_ON_MENU = True (If you still want to display a 'Home' link, note that the site name is already a link to the home page)
|
||||||
|
* GOOGLE_PLUSONE = True (If you want a Google +1 button aside the Tweet button on each article)
|
||||||
|
* CONTACT = u'your@email.com' (Pretty explicit)
|
||||||
|
|
||||||
|
#### Social integration
|
||||||
|
|
||||||
|
###### Github integration
|
||||||
|
|
||||||
|
* GITHUB_INTEGRATION_ENABLED = True (If you want to integrate Github)
|
||||||
|
* GITHUB_USERNAME = 'your_username' (Needed if GITHUB_INTEGRATION_ENABLED is set to True)
|
||||||
|
|
||||||
|
###### Google integration
|
||||||
|
|
||||||
|
* GPLUS_INTEGRATION_ENABLED = True (If you want to integrate Google+)
|
||||||
|
* GPLUS_USERNAME = 'your_username|identifier' (Needed if GPLUS_INTEGRATION_ENABLED is set to True)
|
||||||
|
* GPLUS_API_ACCESS = 'your_api_access_key' (Needed if GPLUS_INTEGRATION_ENABLED is set to True)
|
||||||
|
|
||||||
|
###### Twitter+ integration
|
||||||
|
|
||||||
|
* TWITTER_INTEGRATION_ENABLED = True (If you want to integrate Twitter)
|
||||||
|
* TWITTER_USERNAME = 'your_username' (Needed if TWITTER_INTEGRATION_ENABLED is set to True)
|
||||||
|
|
||||||
|
###### Instagram integration
|
||||||
|
|
||||||
|
* INSTAGRAM_INTEGRATION_ENABLED = True (If you want to integrate Instagram)
|
||||||
|
* INSTAGRAM_USERNAME = 'your_username' (Needed if INSTAGRAM_INTEGRATION_ENABLED is set to True)
|
||||||
|
* INSTAGRAM_API_ACCESS = 'your_api_access_key' (Needed if INSTAGRAM_INTEGRATION_ENABLED is set to True)
|
||||||
|
|
||||||
[syte]: http://rigoneri.github.com/syte/
|
[syte]: http://rigoneri.github.com/syte/
|
||||||
[samrat]: http://samrat.github.com
|
[samrat]: http://samrat.github.com
|
||||||
|
[arnaudbos]: http://github.com/arnaudbos/
|
||||||
|
[sneakernet]: http://www.sneakernet.fr/
|
||||||
|
|||||||
@@ -1,91 +0,0 @@
|
|||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import subprocess
|
|
||||||
import shlex
|
|
||||||
import traceback
|
|
||||||
|
|
||||||
path_to_here = os.path.abspath(os.path.dirname(__file__))
|
|
||||||
path_before_site = path_to_here[0:path_to_here.rfind('syte')]
|
|
||||||
sys.path.append(path_before_site)
|
|
||||||
|
|
||||||
#os.environ['DJANGO_SETTINGS_MODULE'] = 'syte.settings'
|
|
||||||
|
|
||||||
#from django.conf import settings
|
|
||||||
import settings
|
|
||||||
|
|
||||||
def compress_statics():
|
|
||||||
try:
|
|
||||||
#This won't work on windows.
|
|
||||||
subprocess.check_call(shlex.split('mkdir -p static/css static/js/min'))
|
|
||||||
except Exception:
|
|
||||||
print 'Make sure to create "syte > static > css" and "syte > static > js > min" before compressing statics.'
|
|
||||||
|
|
||||||
compress_styles()
|
|
||||||
compress_js()
|
|
||||||
|
|
||||||
def compress_styles():
|
|
||||||
less_path = 'static/less/styles.less'
|
|
||||||
css_path = 'static/css/'
|
|
||||||
|
|
||||||
try:
|
|
||||||
subprocess.check_call(shlex.split('lessc {0} {1}styles.min.css -yui-compress'.format(less_path, css_path)))
|
|
||||||
print 'CSS Styles Generated: styles.min.css'
|
|
||||||
except Exception:
|
|
||||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
|
||||||
stack_trace = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
|
||||||
print stack_trace
|
|
||||||
|
|
||||||
def compress_js():
|
|
||||||
js_files = [
|
|
||||||
'libs/jquery.url.js',
|
|
||||||
'libs/require.js',
|
|
||||||
'libs/handlebars.js',
|
|
||||||
'libs/moment.min.js',
|
|
||||||
'libs/bootstrap-modal.js',
|
|
||||||
'libs/spin.min.js',
|
|
||||||
'libs/prettify.js',
|
|
||||||
|
|
||||||
'components/base.js',
|
|
||||||
'components/mobile.js',
|
|
||||||
'components/blog-posts.js',
|
|
||||||
'components/links.js',
|
|
||||||
]
|
|
||||||
|
|
||||||
if settings.TWITTER_INTEGRATION_ENABLED:
|
|
||||||
js_files.append('components/twitter.js')
|
|
||||||
|
|
||||||
if settings.GITHUB_INTEGRATION_ENABLED:
|
|
||||||
js_files.append('components/github.js')
|
|
||||||
|
|
||||||
if settings.DRIBBBLE_INTEGRATION_ENABLED:
|
|
||||||
js_files.append('components/dribbble.js')
|
|
||||||
|
|
||||||
if settings.INSTAGRAM_INTEGRATION_ENABLED:
|
|
||||||
js_files.append('components/instagram.js')
|
|
||||||
|
|
||||||
if settings.DISQUS_INTEGRATION_ENABLED:
|
|
||||||
js_files.append('components/disqus.js')
|
|
||||||
|
|
||||||
combined = ''
|
|
||||||
for js in js_files:
|
|
||||||
f = open('static/js/' + js, 'r')
|
|
||||||
combined += f.read()
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
f = open('static/js/combined.js', 'w')
|
|
||||||
f.write(combined)
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
try:
|
|
||||||
subprocess.check_call(shlex.split('uglifyjs -o static/js/min/scripts.min.js static/js/combined.js'))
|
|
||||||
subprocess.check_call(shlex.split('rm -f static/js/combined.js'))
|
|
||||||
print 'JavaScript Combined and Minified: scripts.min.js'
|
|
||||||
except Exception:
|
|
||||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
|
||||||
stack_trace = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
|
||||||
print stack_trace
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
compress_statics()
|
|
||||||
sys.exit()
|
|
||||||
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 215 KiB |
9
syte/static/css/less-1.1.5.min.js
vendored
63
syte/static/css/pygments.css
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/* HIGHLIGHT*/
|
||||||
|
.highlight .hll { background-color: #ffffcc }
|
||||||
|
.highlight { background: #f0f0f0; }
|
||||||
|
.highlight .c { color: #60a0b0; font-style: italic } /* Comment */
|
||||||
|
.highlight .err { border: 1px solid #FF0000 } /* Error */
|
||||||
|
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
|
||||||
|
.highlight .o { color: #666666 } /* Operator */
|
||||||
|
.highlight .cm { color: #60a0b0; font-style: italic } /* Comment.Multiline */
|
||||||
|
.highlight .cp { color: #007020 } /* Comment.Preproc */
|
||||||
|
.highlight .c1 { color: #60a0b0; font-style: italic } /* Comment.Single */
|
||||||
|
.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
|
||||||
|
.highlight .gd { color: #A00000 } /* Generic.Deleted */
|
||||||
|
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||||
|
.highlight .gr { color: #FF0000 } /* Generic.Error */
|
||||||
|
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||||
|
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||||
|
.highlight .go { color: #808080 } /* Generic.Output */
|
||||||
|
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
|
||||||
|
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||||
|
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||||
|
.highlight .gt { color: #0040D0 } /* Generic.Traceback */
|
||||||
|
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
|
||||||
|
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
|
||||||
|
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
|
||||||
|
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
|
||||||
|
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
|
||||||
|
.highlight .kt { color: #902000 } /* Keyword.Type */
|
||||||
|
.highlight .m { color: #40a070 } /* Literal.Number */
|
||||||
|
.highlight .s { color: #4070a0 } /* Literal.String */
|
||||||
|
.highlight .na { color: #4070a0 } /* Name.Attribute */
|
||||||
|
.highlight .nb { color: #007020 } /* Name.Builtin */
|
||||||
|
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
|
||||||
|
.highlight .no { color: #60add5 } /* Name.Constant */
|
||||||
|
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
|
||||||
|
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
|
||||||
|
.highlight .ne { color: #007020 } /* Name.Exception */
|
||||||
|
.highlight .nf { color: #06287e } /* Name.Function */
|
||||||
|
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
|
||||||
|
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
|
||||||
|
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
|
||||||
|
.highlight .nv { color: #bb60d5 } /* Name.Variable */
|
||||||
|
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
|
||||||
|
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||||
|
.highlight .mf { color: #40a070 } /* Literal.Number.Float */
|
||||||
|
.highlight .mh { color: #40a070 } /* Literal.Number.Hex */
|
||||||
|
.highlight .mi { color: #40a070 } /* Literal.Number.Integer */
|
||||||
|
.highlight .mo { color: #40a070 } /* Literal.Number.Oct */
|
||||||
|
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
|
||||||
|
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
|
||||||
|
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
|
||||||
|
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
|
||||||
|
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
|
||||||
|
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
|
||||||
|
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
|
||||||
|
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
|
||||||
|
.highlight .sr { color: #235388 } /* Literal.String.Regex */
|
||||||
|
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
|
||||||
|
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
|
||||||
|
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
|
||||||
|
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
|
||||||
|
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
|
||||||
|
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
|
||||||
|
.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */
|
||||||
1413
syte/static/css/styles.css
Normal file
1
syte/static/css/styles.min.css
vendored
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
syte/static/imgs/ico-plusoners copy.png
Normal file
|
After Width: | Height: | Size: 398 B |
BIN
syte/static/imgs/ico-plusoners.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
syte/static/imgs/ico-resharers copy.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
syte/static/imgs/ico-resharers.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 17 KiB |
48
syte/static/js/common.js
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
Set of functions common for other script in this theme
|
||||||
|
*/
|
||||||
|
function adjustSelection(e) {
|
||||||
|
$(".main-nav").children("li").removeClass("sel"), $("#" + e).parent().addClass("sel")
|
||||||
|
}
|
||||||
|
|
||||||
|
function numberWithCommas(e) {
|
||||||
|
return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
|
||||||
|
}
|
||||||
|
|
||||||
|
function prepare_link(event, element) {
|
||||||
|
event.preventDefault(), event.stopPropagation();
|
||||||
|
return $.url(element.href.replace("/#!",""));
|
||||||
|
}
|
||||||
|
|
||||||
|
function remove_modal() {
|
||||||
|
$("div[id$=-profile]").modal('hide');
|
||||||
|
$(".modal-backdrop").modal('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
var spin_opts = {
|
||||||
|
lines: 9,
|
||||||
|
length: 5,
|
||||||
|
width: 2,
|
||||||
|
radius: 4,
|
||||||
|
rotate: 9,
|
||||||
|
color: "#4c4c4c",
|
||||||
|
speed: 1.5,
|
||||||
|
trail: 40,
|
||||||
|
shadow: !1,
|
||||||
|
hwaccel: !1,
|
||||||
|
className: "spinner",
|
||||||
|
zIndex: 2e9
|
||||||
|
}
|
||||||
|
|
||||||
|
var isMobileView = !1
|
||||||
|
if (typeof window.matchMedia != "undefined") {
|
||||||
|
var mediaQuery = window.matchMedia("(max-width:799px)");
|
||||||
|
mediaQuery.matches && (isMobileView = !0)
|
||||||
|
}
|
||||||
|
$(function () {
|
||||||
|
$("#mobile-nav-btn")
|
||||||
|
.click(function () {
|
||||||
|
$(".main-section")
|
||||||
|
.toggleClass("nav-opened")
|
||||||
|
})
|
||||||
|
});
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
//Global configs and functions shared between js
|
|
||||||
|
|
||||||
function numberWithCommas(x) {
|
|
||||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
||||||
}
|
|
||||||
|
|
||||||
require.config({
|
|
||||||
baseUrl: "/static/",
|
|
||||||
paths: {
|
|
||||||
"text": "js/libs/text",
|
|
||||||
"json": "js/libs/json"
|
|
||||||
},
|
|
||||||
waitSeconds: 15
|
|
||||||
});
|
|
||||||
|
|
||||||
var spin_opts = {
|
|
||||||
lines: 9,
|
|
||||||
length: 5,
|
|
||||||
width: 2,
|
|
||||||
radius: 4,
|
|
||||||
rotate: 9,
|
|
||||||
color: '#4c4c4c',
|
|
||||||
speed: 1.5,
|
|
||||||
trail: 40,
|
|
||||||
shadow: false,
|
|
||||||
hwaccel: false,
|
|
||||||
className: 'spinner',
|
|
||||||
zIndex: 2e9
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,143 +0,0 @@
|
|||||||
|
|
||||||
function fetchBlogPosts(post, tag) {
|
|
||||||
var blog_fetch_url = '/blog.json';
|
|
||||||
|
|
||||||
if (post)
|
|
||||||
blog_fetch_url = '/post/' + post;
|
|
||||||
else if (tag)
|
|
||||||
blog_fetch_url = '/tags/' + tag;
|
|
||||||
|
|
||||||
$.getJSON(blog_fetch_url, function(blog_posts) {
|
|
||||||
require(["text!templates/blog-post-text.html",
|
|
||||||
"text!templates/blog-post-photo.html",
|
|
||||||
"text!templates/blog-post-link.html",
|
|
||||||
"text!templates/blog-post-video.html",
|
|
||||||
"text!templates/blog-post-audio.html",
|
|
||||||
"text!templates/blog-post-quote.html"],
|
|
||||||
|
|
||||||
function(text_post_template, photo_post_template,
|
|
||||||
link_post_template, video_post_template, audio_post_template,
|
|
||||||
quote_post_template) {
|
|
||||||
|
|
||||||
var text_template = Handlebars.compile(text_post_template);
|
|
||||||
var photo_template = Handlebars.compile(photo_post_template);
|
|
||||||
var link_template = Handlebars.compile(link_post_template);
|
|
||||||
var video_template = Handlebars.compile(video_post_template);
|
|
||||||
var audio_template = Handlebars.compile(audio_post_template);
|
|
||||||
var quote_template = Handlebars.compile(quote_post_template);
|
|
||||||
|
|
||||||
$('.loading').remove();
|
|
||||||
$.each(blog_posts.response.posts, function(i, p) {
|
|
||||||
p.formated_date = moment(p.date).format('MMMM DD, YYYY')
|
|
||||||
|
|
||||||
if (p.type == 'text')
|
|
||||||
$('#blog-posts').append(text_template(p));
|
|
||||||
else if (p.type == 'photo')
|
|
||||||
$('#blog-posts').append(photo_template(p));
|
|
||||||
else if (p.type == 'link')
|
|
||||||
$('#blog-posts').append(link_template(p));
|
|
||||||
else if (p.type == 'video')
|
|
||||||
$('#blog-posts').append(video_template(p));
|
|
||||||
else if (p.type == 'audio')
|
|
||||||
$('#blog-posts').append(audio_template(p));
|
|
||||||
else if (p.type == 'quote')
|
|
||||||
$('#blog-posts').append(quote_template(p));
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
setupLinks();
|
|
||||||
adjustBlogHeaders();
|
|
||||||
prettyPrint();
|
|
||||||
setTimeout(setupBlogHeaderScroll, 1000);
|
|
||||||
adjustSelection('home-link');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function adjustBlogHeaders() {
|
|
||||||
if(isMobileView)
|
|
||||||
return;
|
|
||||||
|
|
||||||
$('.blog-section article hgroup').each(function(i, e) {
|
|
||||||
$(e).find('h3 a').css({
|
|
||||||
'margin-top': '-' + ($(e).height() + 100) + 'px'
|
|
||||||
}).addClass('adjusted');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function setupBlogHeaderScroll() {
|
|
||||||
|
|
||||||
if(isMobileView)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var previousTarget,
|
|
||||||
activeTarget,
|
|
||||||
$window = $(window),
|
|
||||||
offsets = [],
|
|
||||||
targets = [],
|
|
||||||
$posts = $('.blog-section article hgroup h3 a').each(function() {
|
|
||||||
if (this.hash) {
|
|
||||||
targets.push(this.hash);
|
|
||||||
offsets.push($(this.hash).offset().top);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function processScroll(e) {
|
|
||||||
var scrollTop = $window.scrollTop(),
|
|
||||||
i = offsets.length;
|
|
||||||
|
|
||||||
for (i; i--;) {
|
|
||||||
if (activeTarget != targets[i] && scrollTop > offsets[i] && (!offsets[i + 1] || scrollTop < offsets[i + 1])) {
|
|
||||||
|
|
||||||
var hgroup = $(activeTarget).find("hgroup");
|
|
||||||
var margintop = '';
|
|
||||||
if (hgroup.length) {
|
|
||||||
margintop = '-' + ($(hgroup[0]).height() + 100) + 'px';
|
|
||||||
}
|
|
||||||
|
|
||||||
//set current target to be absolute
|
|
||||||
$("h3 a[href=" + activeTarget + "]").removeClass("active").css({
|
|
||||||
position: "absolute",
|
|
||||||
top: "auto",
|
|
||||||
'margin-top': margintop
|
|
||||||
});
|
|
||||||
|
|
||||||
//set new target to be fixed
|
|
||||||
activeTarget = targets[i];
|
|
||||||
$("h3 a[href=" + activeTarget + "]").attr('style', '').addClass("active");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (activeTarget && activeTarget != targets[i] && scrollTop + 50 >= offsets[i] && (!offsets[i + 1] || scrollTop + 50 <= offsets[i + 1])) {
|
|
||||||
|
|
||||||
// if it's close to the new target scroll the current target up
|
|
||||||
$("h3 a[href=" + activeTarget + "]")
|
|
||||||
.removeClass("active")
|
|
||||||
.css({
|
|
||||||
position: "absolute",
|
|
||||||
top: ($(activeTarget).outerHeight(true) + $(activeTarget).offset().top - 50) + "px",
|
|
||||||
bottom: "auto"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (activeTarget == targets[i] && scrollTop > offsets[i] - 50 && (!offsets[i + 1] || scrollTop <= offsets[i + 1] - 50)) {
|
|
||||||
// if the current target is not fixed make it fixed.
|
|
||||||
if (!$("h3 a[href=" + activeTarget + "]").hasClass("active")) {
|
|
||||||
$("h3 a[href=" + activeTarget + "]").attr('style', '').addClass("active");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$posts.click(function(e) {
|
|
||||||
if (!this.hash)
|
|
||||||
return;
|
|
||||||
$('html, body').stop().animate({
|
|
||||||
scrollTop: $(this.hash).offset().top
|
|
||||||
}, 500, 'linear');
|
|
||||||
|
|
||||||
processScroll();
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
|
||||||
|
|
||||||
$window.scroll(processScroll).trigger("scroll");
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
|
|
||||||
function setupDribbble(url, el) {
|
|
||||||
var href = el.href;
|
|
||||||
|
|
||||||
if ($('#dribbble-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();
|
|
||||||
$('#dribbble-link').append(spinner.el);
|
|
||||||
|
|
||||||
require(["json!/dribbble/" + username, "text!templates/dribbble-view.html"],
|
|
||||||
function(dribbble_data, dribbble_view) {
|
|
||||||
if (dribbble_data.message || dribbble_data.length == 0) {
|
|
||||||
window.location = href;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var template = Handlebars.compile(dribbble_view);
|
|
||||||
|
|
||||||
var user = dribbble_data.shots[0].player;
|
|
||||||
user.following_count = numberWithCommas(user.following_count);
|
|
||||||
user.followers_count = numberWithCommas(user.followers_count);
|
|
||||||
user.likes_count = numberWithCommas(user.likes_count);
|
|
||||||
|
|
||||||
var template_data = {
|
|
||||||
"user": user,
|
|
||||||
"shots": dribbble_data.shots
|
|
||||||
}
|
|
||||||
|
|
||||||
$(template(template_data)).modal().on('hidden', function () {
|
|
||||||
$(this).remove();
|
|
||||||
adjustSelection('home-link');
|
|
||||||
})
|
|
||||||
|
|
||||||
spinner.stop();
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location = href;
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
|
|
||||||
function setupGithub(url, el) {
|
|
||||||
var href = el.href;
|
|
||||||
|
|
||||||
if ($('#github-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();
|
|
||||||
$('#github-link').append(spinner.el);
|
|
||||||
|
|
||||||
require(["json!/github/" + username, "text!templates/github-view.html"],
|
|
||||||
function(github_data, github_view) {
|
|
||||||
if (github_data.error || github_data.length == 0) {
|
|
||||||
window.location = href;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var template = Handlebars.compile(github_view);
|
|
||||||
github_data.user.following_count = numberWithCommas(github_data.user.following_count)
|
|
||||||
github_data.user.followers_count = numberWithCommas(github_data.user.followers_count)
|
|
||||||
|
|
||||||
$(template(github_data)).modal().on('hidden', function () {
|
|
||||||
$(this).remove();
|
|
||||||
adjustSelection('home-link');
|
|
||||||
})
|
|
||||||
|
|
||||||
spinner.stop();
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location = href;
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
|
|
||||||
function setupInstagram(el) {
|
|
||||||
var href = el.href;
|
|
||||||
|
|
||||||
if($('#instagram-profile').length > 0) {
|
|
||||||
window.location = href;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var spinner = new Spinner(spin_opts).spin();
|
|
||||||
$('#instagram-link').append(spinner.el);
|
|
||||||
|
|
||||||
require(["json!/instagram/",
|
|
||||||
"text!templates/instagram-view.html",
|
|
||||||
"text!templates/instagram-view-more.html"],
|
|
||||||
function(instagram_data, instagram_view, instagram_view_more) {
|
|
||||||
if (instagram_data.media == 0){
|
|
||||||
window.location = href;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var template = Handlebars.compile(instagram_view);
|
|
||||||
|
|
||||||
var user_counts = instagram_data.user['counts'];
|
|
||||||
user_counts.media = numberWithCommas(user_counts.media);
|
|
||||||
user_counts.followed_by = numberWithCommas(user_counts.followed_by);
|
|
||||||
user_counts.follows = numberWithCommas(user_counts.follows);
|
|
||||||
|
|
||||||
$.each(instagram_data.media, function(i, p) {
|
|
||||||
p.formated_date = moment.unix(parseInt(p.created_time)).fromNow();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(template(instagram_data)).modal().on('hidden', function () {
|
|
||||||
$(this).remove();
|
|
||||||
adjustSelection('home-link');
|
|
||||||
})
|
|
||||||
|
|
||||||
var more_template = Handlebars.compile(instagram_view_more);
|
|
||||||
|
|
||||||
$('#load-more-pics').click(function(e) {
|
|
||||||
next = $(this).attr('data-control-next');
|
|
||||||
|
|
||||||
var spinner = new Spinner(spin_opts).spin();
|
|
||||||
$('#load-more-pics').append(spinner.el);
|
|
||||||
|
|
||||||
$.getJSON('/instagram/' + next, function(data) {
|
|
||||||
|
|
||||||
$.each(data.media, function(i, p) {
|
|
||||||
p.formated_date = moment.unix(parseInt(p.created_time)).fromNow();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.instagram .profile-shots').append(more_template(data));
|
|
||||||
|
|
||||||
if (data.pagination && data.pagination['next_max_id'])
|
|
||||||
$('#load-more-pics').attr('data-control-next', data.pagination['next_max_id']);
|
|
||||||
else
|
|
||||||
$('#load-more-pics').remove();
|
|
||||||
|
|
||||||
spinner.stop();
|
|
||||||
});
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
spinner.stop();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
|
|
||||||
function setupLinks() {
|
|
||||||
|
|
||||||
$('a').click(function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
|
|
||||||
var url = $.url(this.href.replace('/#!', ''));
|
|
||||||
|
|
||||||
if (this.id == 'home-link' && window.location.pathname == '/') {
|
|
||||||
$('#github-profile').remove();
|
|
||||||
$('#dribbble-profile').remove();
|
|
||||||
$('#twitter-profile').remove();
|
|
||||||
$('#instagram-profile').remove();
|
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
adjustSelection('home-link');
|
|
||||||
}
|
|
||||||
else if(this.id == 'instagram-link' && instagram_integration_enabled) {
|
|
||||||
$('#github-profile').remove();
|
|
||||||
$('#dribbble-profile').remove();
|
|
||||||
$('#twitter-profile').remove();
|
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
adjustSelection('instagram-link');
|
|
||||||
|
|
||||||
setupInstagram(this);
|
|
||||||
}
|
|
||||||
else if (twitter_integration_enabled && (url.attr('host') == 'twitter.com' || url.attr('host') == 'www.twitter.com')) {
|
|
||||||
|
|
||||||
$('#github-profile').remove();
|
|
||||||
$('#dribbble-profile').remove();
|
|
||||||
$('#instagram-profile').remove();
|
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
adjustSelection('twitter-link');
|
|
||||||
|
|
||||||
setupTwitter(url, this);
|
|
||||||
}
|
|
||||||
else if (github_integration_enabled && (url.attr('host') == 'github.com' || url.attr('host') == 'www.github.com')) {
|
|
||||||
|
|
||||||
$('#twitter-profile').remove();
|
|
||||||
$('#dribbble-profile').remove();
|
|
||||||
$('#instagram-profile').remove();
|
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
adjustSelection('github-link');
|
|
||||||
|
|
||||||
setupGithub(url, this);
|
|
||||||
}
|
|
||||||
else if (dribbble_integration_enabled && (url.attr('host') == 'dribbble.com' || url.attr('host') == 'www.dribbble.com')) {
|
|
||||||
|
|
||||||
$('#twitter-profile').remove();
|
|
||||||
$('#github-profile').remove();
|
|
||||||
$('#instagram-profile').remove();
|
|
||||||
$('.modal-backdrop').remove();
|
|
||||||
adjustSelection('dribbble-link');
|
|
||||||
|
|
||||||
setupDribbble(url, this);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
window.location = this.href;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function adjustSelection(el) {
|
|
||||||
$('.main-nav').children('li').removeClass('sel');
|
|
||||||
$('#' + el).parent().addClass('sel');
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
|
|
||||||
var isMobileView = false;
|
|
||||||
var mediaQuery = window.matchMedia("(max-width:600px)");
|
|
||||||
|
|
||||||
if (mediaQuery.matches) {
|
|
||||||
isMobileView = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
$('#mobile-nav-btn').click(function() {
|
|
||||||
$('.main-section').toggleClass('nav-opened');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
|
|
||||||
function setupTwitter(url, el) {
|
|
||||||
var href = el.href;
|
|
||||||
|
|
||||||
if ($('#twitter-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();
|
|
||||||
$('#twitter-link').append(spinner.el);
|
|
||||||
|
|
||||||
require(["json!/twitter/" + username, "text!templates/twitter-view.html"],
|
|
||||||
function(twitter_data, twitter_view) {
|
|
||||||
if (twitter_data.error || twitter_data.length == 0) {
|
|
||||||
window.location = href;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var template = Handlebars.compile(twitter_view);
|
|
||||||
|
|
||||||
var tweets = [];
|
|
||||||
$.each(twitter_data, function(i, t) {
|
|
||||||
if (i > 3)
|
|
||||||
return;
|
|
||||||
|
|
||||||
//'ddd MMM DD HH:mm:ss ZZ YYYY'
|
|
||||||
t.formated_date = moment(t.created_at).fromNow();
|
|
||||||
t.f_text = twitterLinkify(t.text);
|
|
||||||
tweets.push(t);
|
|
||||||
});
|
|
||||||
|
|
||||||
var user = twitter_data[0].user;
|
|
||||||
user.statuses_count = numberWithCommas(user.statuses_count);
|
|
||||||
user.friends_count = numberWithCommas(user.friends_count);
|
|
||||||
user.followers_count = numberWithCommas(user.followers_count);
|
|
||||||
user.f_description = twitterLinkify(user.description);
|
|
||||||
|
|
||||||
var template_data = {
|
|
||||||
"user": user,
|
|
||||||
"tweets": tweets
|
|
||||||
}
|
|
||||||
|
|
||||||
$(template(template_data)).modal().on('hidden', function () {
|
|
||||||
$(this).remove();
|
|
||||||
adjustSelection('home-link');
|
|
||||||
})
|
|
||||||
|
|
||||||
spinner.stop();
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location = href;
|
|
||||||
}
|
|
||||||
|
|
||||||
function twitterLinkify(text) {
|
|
||||||
text = text.replace(/(https?:\/\/\S+)/gi, function (s) {
|
|
||||||
return '<a href="' + s + '">' + s + '</a>';
|
|
||||||
});
|
|
||||||
|
|
||||||
text = text.replace(/(^|) @(\w+)/gi, function (s) {
|
|
||||||
return '<a href="http://twitter.com/' + s + '">' + s + '</a>';
|
|
||||||
});
|
|
||||||
|
|
||||||
text = text.replace(/(^|) #(\w+)/gi, function (s) {
|
|
||||||
return '<a href="http://search.twitter.com/search?q=' + s.replace(/#/,'%23') + '">' + s + '</a>';
|
|
||||||
});
|
|
||||||
|
|
||||||
return text;
|
|
||||||
}
|
|
||||||
|
|
||||||
92
syte/static/js/libs/github.js
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
UI functions dedicated to the Github modal panel
|
||||||
|
*/
|
||||||
|
|
||||||
|
var github_api_user = 'https://api.github.com/users/';
|
||||||
|
var github_api_repos = '/repos';
|
||||||
|
|
||||||
|
var spinner = (new Spinner(spin_opts)).spin();
|
||||||
|
var template = null;
|
||||||
|
var url = null;
|
||||||
|
var github_data = {};
|
||||||
|
|
||||||
|
$('a[id^="Github-link"]').click(function (e)
|
||||||
|
{
|
||||||
|
var url = prepare_link(e, this);
|
||||||
|
adjustSelection("Github-link");
|
||||||
|
remove_modal();
|
||||||
|
showGithub(url, this);
|
||||||
|
});
|
||||||
|
|
||||||
|
function showGithub(e, t) {
|
||||||
|
url = t.href;
|
||||||
|
var github_profile = $("#github-profile");
|
||||||
|
if (github_profile.length > 0) {
|
||||||
|
github_profile.modal('show');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#Github-link").append(spinner.el);
|
||||||
|
|
||||||
|
$.get('/theme/templates/github-view.html', function(data) {
|
||||||
|
// Request succeeded, data contains HTML template, we can load data
|
||||||
|
template = Handlebars.compile(data);
|
||||||
|
var user_url = github_api_user+github_username;
|
||||||
|
|
||||||
|
try {
|
||||||
|
$.ajax({
|
||||||
|
url: user_url,
|
||||||
|
dataType: "jsonp",
|
||||||
|
jsonpCallback: "readGithubData",
|
||||||
|
error: function(s, statusCode, errorThrown) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.error(function() {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function readGithubData(user) {
|
||||||
|
try {
|
||||||
|
github_data['user'] = user.data
|
||||||
|
|
||||||
|
var repos_url = github_api_user+github_username+github_api_repos;
|
||||||
|
$.ajax({
|
||||||
|
url: repos_url,
|
||||||
|
dataType: "jsonp",
|
||||||
|
jsonpCallback: "readRepositories",
|
||||||
|
error: function(s, statusCode, errorThrown) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function readRepositories(repos) {
|
||||||
|
try {
|
||||||
|
github_data['repositories'] = repos.data
|
||||||
|
|
||||||
|
var html = template(github_data);
|
||||||
|
$('body').append(html);
|
||||||
|
$("#github-profile").modal();
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
86
syte/static/js/libs/google+.js
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
UI functions dedicated to the Google+ modal panel
|
||||||
|
*/
|
||||||
|
|
||||||
|
var gplus_api_user = 'https://www.googleapis.com/plus/v1/people/';
|
||||||
|
var gplus_api_posts = '/activities/public?maxResults=20';
|
||||||
|
var gplus_api_access = 'key='
|
||||||
|
|
||||||
|
var url = null;
|
||||||
|
|
||||||
|
$('a[id^="Google-link"]').click(function (e)
|
||||||
|
{
|
||||||
|
var url = prepare_link(e, this);
|
||||||
|
adjustSelection("Google-link");
|
||||||
|
remove_modal();
|
||||||
|
showGoogle(url, this);
|
||||||
|
});
|
||||||
|
|
||||||
|
function showGoogle(e, t) {
|
||||||
|
url = t.href;
|
||||||
|
var google_profile = $("#google-profile");
|
||||||
|
if (google_profile.length > 0) {
|
||||||
|
google_profile.modal('show');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var spinner = (new Spinner(spin_opts)).spin();
|
||||||
|
|
||||||
|
$("#Google-link").append(spinner.el);
|
||||||
|
|
||||||
|
$.get('/theme/templates/google-view.html', function(data) {
|
||||||
|
// Request succeeded, data contains HTML template, we can load data
|
||||||
|
var template = Handlebars.compile(data);
|
||||||
|
var google_data = {};
|
||||||
|
var user_url = gplus_api_user+google_username+'?'+gplus_api_access+google_accesskey;
|
||||||
|
|
||||||
|
try {
|
||||||
|
$.get(user_url, function(user) {
|
||||||
|
google_data['user'] = user
|
||||||
|
|
||||||
|
var posts_url = gplus_api_user+google_username+gplus_api_posts+'&'+gplus_api_access+google_accesskey;
|
||||||
|
$.get(posts_url, function(data) {
|
||||||
|
var posts = data.items;
|
||||||
|
var index = 0;
|
||||||
|
while(index < posts.length) {
|
||||||
|
var post = posts[index];
|
||||||
|
if(post.title == "") {
|
||||||
|
posts.splice(index,1)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
post.published = moment(post.published).fromNow();
|
||||||
|
post.plusoners = numberWithCommas(post.object.plusoners.totalItems);
|
||||||
|
post.resharers = numberWithCommas(post.object.resharers.totalItems);
|
||||||
|
if(typeof post.placeName !== "undefined" && post.placeName != "") {
|
||||||
|
post.title = post.title+" (@"+post.placeName+")";
|
||||||
|
}
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
google_data['posts'] = posts
|
||||||
|
|
||||||
|
var html = template(google_data);
|
||||||
|
$('body').append(html);
|
||||||
|
$("#google-profile").modal();
|
||||||
|
spinner.stop();
|
||||||
|
})
|
||||||
|
.error(function() {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.error(function() {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.error(function() {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
103
syte/static/js/libs/instagram.js
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
/*
|
||||||
|
UI functions dedicated to the Instagram modal panel
|
||||||
|
*/
|
||||||
|
|
||||||
|
var instagram_api_user = 'https://api.instagram.com/v1/users/';
|
||||||
|
var instagram_api_media = '/media/recent';
|
||||||
|
var instagram_api_token = '/?access_token=';
|
||||||
|
|
||||||
|
var url = null;
|
||||||
|
var spinner = (new Spinner(spin_opts)).spin();
|
||||||
|
var template = null;
|
||||||
|
var instagram_data = {};
|
||||||
|
|
||||||
|
$('a[id^="Instagram-link"]').click(function (e)
|
||||||
|
{
|
||||||
|
var url = prepare_link(e, this);
|
||||||
|
adjustSelection("Instagram-link");
|
||||||
|
remove_modal();
|
||||||
|
showInstagram(url, this);
|
||||||
|
});
|
||||||
|
|
||||||
|
function showInstagram(e, t) {
|
||||||
|
url = t.href;
|
||||||
|
var instagram_profile = $("#instagram-profile");
|
||||||
|
if (instagram_profile.length > 0) {
|
||||||
|
instagram_profile.modal('show');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#Instagram-link").append(spinner.el);
|
||||||
|
|
||||||
|
$.get('/theme/templates/instagram-view.html', function(data) {
|
||||||
|
// Request succeeded, data contains HTML template, we can load data
|
||||||
|
template = Handlebars.compile(data);
|
||||||
|
var user_url = instagram_api_user+instagram_username+instagram_api_token+instagram_accesskey;
|
||||||
|
|
||||||
|
try {
|
||||||
|
$.ajax({
|
||||||
|
url: user_url,
|
||||||
|
dataType: "jsonp",
|
||||||
|
jsonpCallback: "readInstagramData",
|
||||||
|
error: function(s, statusCode, errorThrown) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.error(function() {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function readInstagramData(result) {
|
||||||
|
try {
|
||||||
|
var user = result.data;
|
||||||
|
user.media = numberWithCommas( user.counts.media );
|
||||||
|
user.followed_by = numberWithCommas( user.counts.followed_by );
|
||||||
|
user.follows = numberWithCommas( user.counts.follows );
|
||||||
|
user.url = url;
|
||||||
|
instagram_data['user'] = user
|
||||||
|
|
||||||
|
var posts_url = instagram_api_user+instagram_username+instagram_api_media+instagram_api_token+instagram_accesskey;
|
||||||
|
$.ajax({
|
||||||
|
url: posts_url,
|
||||||
|
dataType: "jsonp",
|
||||||
|
jsonpCallback: "readPictures",
|
||||||
|
error: function(s, statusCode, errorThrown) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function readPictures(result) {
|
||||||
|
try {
|
||||||
|
var posts = result.data;
|
||||||
|
for(var index = 0; index < posts.length; index++) {
|
||||||
|
var post = posts[index];
|
||||||
|
post.formated_date = moment.unix( parseInt( post.created_time ) ).fromNow();
|
||||||
|
}
|
||||||
|
instagram_data['media'] = posts
|
||||||
|
|
||||||
|
var html = template(instagram_data);
|
||||||
|
$('body').append(html);
|
||||||
|
$("#instagram-profile").modal();
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
4
syte/static/js/libs/jquery-1.7.2.min.js
vendored
Normal file
112
syte/static/js/libs/twitter.js
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
UI functions dedicated to the Twitter modal panel
|
||||||
|
*/
|
||||||
|
|
||||||
|
var twitter_api_user = 'https://twitter.com/users/';
|
||||||
|
var twitter_api_timeline = 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name=';
|
||||||
|
var twitter_api_json = '.json';
|
||||||
|
|
||||||
|
var spinner = (new Spinner(spin_opts)).spin();
|
||||||
|
var template = null;
|
||||||
|
var url = null;
|
||||||
|
var twitter_data = {};
|
||||||
|
|
||||||
|
$('a[id^="Twitter-link"]').click(function (e)
|
||||||
|
{
|
||||||
|
var url = prepare_link(e, this);
|
||||||
|
adjustSelection("Twitter-link");
|
||||||
|
remove_modal();
|
||||||
|
showTwitter(url, this);
|
||||||
|
});
|
||||||
|
|
||||||
|
function showTwitter(e, t) {
|
||||||
|
url = t.href;
|
||||||
|
var twitter_profile = $("#twitter-profile");
|
||||||
|
if (twitter_profile.length > 0) {
|
||||||
|
twitter_profile.modal('show');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#Twitter-link").append(spinner.el);
|
||||||
|
|
||||||
|
$.get('/theme/templates/twitter-view.html', function(data) {
|
||||||
|
// Request succeeded, data contains HTML template, we can load data
|
||||||
|
template = Handlebars.compile(data);
|
||||||
|
var user_url = twitter_api_user+twitter_username+twitter_api_json;
|
||||||
|
|
||||||
|
try {
|
||||||
|
$.ajax({
|
||||||
|
url: user_url,
|
||||||
|
dataType: "jsonp",
|
||||||
|
jsonpCallback: "readTwitterData",
|
||||||
|
error: function(s, statusCode, errorThrown) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.error(function() {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function readTwitterData(user) {
|
||||||
|
try {
|
||||||
|
user.statuses_count = numberWithCommas(user.statuses_count);
|
||||||
|
user.friends_count = numberWithCommas(user.friends_count);
|
||||||
|
user.followers_count = numberWithCommas(user.followers_count);
|
||||||
|
user.description = twitterLinkify(user.description);
|
||||||
|
twitter_data['user'] = user
|
||||||
|
|
||||||
|
var tweets_url = twitter_api_timeline+twitter_username;
|
||||||
|
$.ajax({
|
||||||
|
url: tweets_url,
|
||||||
|
dataType: "jsonp",
|
||||||
|
jsonpCallback: "readTweets",
|
||||||
|
error: function(s, statusCode, errorThrown) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function readTweets(tweets) {
|
||||||
|
try {
|
||||||
|
for(var index = 0 ; index < tweets.length ; index++) {
|
||||||
|
var tweet = tweets[index];
|
||||||
|
tweet.formated_date = moment(tweet.created_at).fromNow();
|
||||||
|
tweet.text = twitterLinkify(tweet.text);
|
||||||
|
}
|
||||||
|
twitter_data['tweets'] = tweets
|
||||||
|
|
||||||
|
var html = template(twitter_data);
|
||||||
|
$('body').append(html);
|
||||||
|
$("#twitter-profile").modal();
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
window.location.href = url;
|
||||||
|
spinner.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function twitterLinkify(e) {
|
||||||
|
return e = e.replace(/(https?:\/\/\S+)/gi, function (e) {
|
||||||
|
return '<a href="' + e + '">' + e + "</a>"
|
||||||
|
}), e = e.replace(/(^|) @(\w+)/gi, function (e) {
|
||||||
|
return '<a href="http://twitter.com/' + e + '">' + e + "</a>"
|
||||||
|
}), e = e.replace(/(^|) #(\w+)/gi, function (e) {
|
||||||
|
return '<a href="http://search.twitter.com/search?q=' + e.replace(/#/, "%23") + '">' + e + "</a>"
|
||||||
|
}), e
|
||||||
|
}
|
||||||
8
syte/static/js/min/scripts.min.js
vendored
@@ -1,68 +0,0 @@
|
|||||||
|
|
||||||
body {
|
|
||||||
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
|
|
||||||
font-size: 15px;
|
|
||||||
color: @text-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
::selection, ::-moz-selection {
|
|
||||||
background: @adjacent-color;
|
|
||||||
color: #fff;
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, .h1 { font-size: 30px; line-height: 35px; font-weight: 500; }
|
|
||||||
h2, .h2 { font-size: 24px; line-height: 30px; font-weight: 500; }
|
|
||||||
h3, .h3 { font-size: 18px; line-height: 25px; font-weight: 500; }
|
|
||||||
h4, .h4 { font-size: 16px; line-height: 20px; font-weight: 500; }
|
|
||||||
h5, .h5 { font-size: 16px; line-height: 20px; font-weight: 500; }
|
|
||||||
h6, .h6 { font-size: 14px; line-height: 20px; font-weight: 500; }
|
|
||||||
|
|
||||||
ul { margin: 0 0 15px 15px; }
|
|
||||||
ol { margin: 0 0 15px 20px;}
|
|
||||||
li { margin-bottom: 5px;
|
|
||||||
ul, ol { margin-bottom: 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
dl {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
dt { font-weight: bold; }
|
|
||||||
dd { margin: 0 0 5px 10px; }
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
line-height: 25px;
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: @link-color;
|
|
||||||
text-decoration: none;
|
|
||||||
border-bottom: 1px solid @text-color;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: @adjacent-color;
|
|
||||||
border-bottom: 1px solid @adjacent-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.no-border {border-bottom: 0;}
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
|
||||||
margin-top: 20px 0;
|
|
||||||
padding: 0 0 0 20px;
|
|
||||||
border-left: 5px solid @adjacent-color;
|
|
||||||
|
|
||||||
p:first-child {
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.descr {
|
|
||||||
display: block;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 20px;
|
|
||||||
color: #7f7e7e;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
//Button
|
|
||||||
.btn {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 4px 10px 4px;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 18px;
|
|
||||||
color: #333;
|
|
||||||
text-align: center;
|
|
||||||
text-shadow: 0 1px 1px rgba(255,255,255,.75);
|
|
||||||
vertical-align: middle;
|
|
||||||
cursor: pointer;
|
|
||||||
.gradient(#fff, darken(#fff, 10%));
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-bottom-color: darken(#ccc, 10%);
|
|
||||||
.border-radius(4px);
|
|
||||||
.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn:hover {
|
|
||||||
color: #333;
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: darken(#fff, 10%);
|
|
||||||
background-position: 0 -15px;
|
|
||||||
border-bottom-color: darken(#ccc, 10%);
|
|
||||||
|
|
||||||
.transition(background-position .1s linear);
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
|
|
||||||
code, pre {
|
|
||||||
padding: 0 3px 2px;
|
|
||||||
color: #333;
|
|
||||||
|
|
||||||
.font-monospace();
|
|
||||||
.border-radius(3px);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Inline code
|
|
||||||
code {
|
|
||||||
padding: 2px 4px;
|
|
||||||
color: @adjacent-color;
|
|
||||||
background-color: #f7f7f9;
|
|
||||||
border: 1px solid #e1e1e8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reset-code() {
|
|
||||||
padding: 0;
|
|
||||||
color: inherit;
|
|
||||||
background-color: transparent;
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Blocks of code
|
|
||||||
pre {
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
margin: 0 0 9px;
|
|
||||||
word-break: break-all;
|
|
||||||
word-wrap: break-word;
|
|
||||||
white-space: pre;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
|
|
||||||
border: 1px solid #ccc; // IE8-
|
|
||||||
border: 1px solid rgba(0,0,0,.15);
|
|
||||||
.border-radius(4px);
|
|
||||||
|
|
||||||
&.prettyprint { margin-bottom: 20px; }
|
|
||||||
|
|
||||||
code {
|
|
||||||
.reset-code();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pre-scrollable {
|
|
||||||
max-height: 340px;
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote code {
|
|
||||||
.reset-code();
|
|
||||||
}
|
|
||||||
|
|
||||||
//Pretty print
|
|
||||||
.com { color: #93a1a1; }
|
|
||||||
.lit { color: #195f91; }
|
|
||||||
.pun, .opn, .clo { color: #93a1a1; }
|
|
||||||
.fun { color: #dc322f; }
|
|
||||||
.str, .atv { color: #da3f47; }
|
|
||||||
.kwd, .linenums .tag { color: #1e347b; }
|
|
||||||
.typ, .atn, .dec, .var { color: teal; }
|
|
||||||
.pln { color: #48484c; }
|
|
||||||
|
|
||||||
.prettyprint {
|
|
||||||
padding: 8px;
|
|
||||||
background-color: #f7f7f9;
|
|
||||||
border: 1px solid #e1e1e8;
|
|
||||||
}
|
|
||||||
.prettyprint.linenums {
|
|
||||||
@linenums-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
|
|
||||||
.box-shadow(@linenums-shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
ol.linenums {
|
|
||||||
margin: 0 0 0 33px; /* IE indents via margin-left */
|
|
||||||
|
|
||||||
li {
|
|
||||||
padding-left: 12px;
|
|
||||||
color: #bebec5;
|
|
||||||
line-height: 18px;
|
|
||||||
text-shadow: 0 1px 0 #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
9
syte/static/less/less-1.1.5.min.js
vendored
@@ -1,250 +0,0 @@
|
|||||||
/* mixins.less
|
|
||||||
* CSS Reset and base mixinis for LESS based development.
|
|
||||||
* Inspired by bootstrap.less initially created by Mark Dotto
|
|
||||||
* https://github.com/markdotto/preboot.less
|
|
||||||
**/
|
|
||||||
|
|
||||||
// Clearfix for clearing floats
|
|
||||||
.clearfix() {
|
|
||||||
zoom: 1;
|
|
||||||
&:before, &:after {display: table; content: "";}
|
|
||||||
&:after {clear: both;}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Center-align a block level element
|
|
||||||
.center-block() {
|
|
||||||
display: block;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sizing Shortcuts
|
|
||||||
.size(@width: 5px, @height: 5px) {
|
|
||||||
height: @height; width: @width;
|
|
||||||
}
|
|
||||||
|
|
||||||
.square(@size: 5px) {
|
|
||||||
.size(@size, @size);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fonts
|
|
||||||
.font(@weight: normal, @size: 14px, @lineHeight: 20px) {
|
|
||||||
font-size: @size;
|
|
||||||
font-weight: @weight;
|
|
||||||
line-height: @lineHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
.font-sans-serif(@weight: normal, @size: 14px, @lineHeight: 20px) {
|
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
||||||
.font(@weight, @size, @lineHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
.font-serif(@weight: normal, @size: 14px, @lineHeight: 20px) {
|
|
||||||
font-family: "Georgia", Times New Roman, Times, serif;
|
|
||||||
.font(@weight, @size, @lineHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
.font-monospace(@weight: normal, @size: 12px, @lineHeight: 20px) {
|
|
||||||
font-family: "Monaco", Courier New, monospace;
|
|
||||||
.font(@weight, @size, @lineHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Border Radius
|
|
||||||
.border-radius(@radius: 5px) {
|
|
||||||
-webkit-border-radius: @radius;
|
|
||||||
-moz-border-radius: @radius;
|
|
||||||
border-radius: @radius;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Box Shadows
|
|
||||||
.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) {
|
|
||||||
-webkit-box-shadow: @shadow;
|
|
||||||
-moz-box-shadow: @shadow;
|
|
||||||
box-shadow: @shadow;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reset-box-shadow() {
|
|
||||||
-webkit-box-shadow: 0 0 0;
|
|
||||||
-moz-box-shadow: 0 0 0;
|
|
||||||
box-shadow: 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Transitions
|
|
||||||
.transition(@transition) {
|
|
||||||
-webkit-transition: @transition;
|
|
||||||
-moz-transition: @transition;
|
|
||||||
-o-transition: @transition;
|
|
||||||
transition: @transition;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rotate(@rotation) {
|
|
||||||
-webkit-transform: rotate(@rotation);
|
|
||||||
-moz-transform: rotate(@rotation);
|
|
||||||
-ms-transform: rotate(@rotation);
|
|
||||||
-o-transform: rotate(@rotation);
|
|
||||||
transform: rotate(@rotation);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Background Clipping
|
|
||||||
.background-clip(@clip) {
|
|
||||||
-webkit-background-clip: @clip;
|
|
||||||
-moz-background-clip: @clip;
|
|
||||||
background-clip: @clip;
|
|
||||||
}
|
|
||||||
|
|
||||||
// CSS3 Content Columns
|
|
||||||
.content-columns(@columnCount, @columnGap: 20px) {
|
|
||||||
-webkit-column-count: @columnCount;
|
|
||||||
-webkit-column-gap: @columnGap;
|
|
||||||
-moz-column-count: @columnCount;
|
|
||||||
-moz-column-gap: @columnGap;
|
|
||||||
column-count: @columnCount;
|
|
||||||
column-gap: @columnGap;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add a transparency value to a background
|
|
||||||
.alpha-background(@color: @white, @alpha: 1) {
|
|
||||||
background-color: @color;
|
|
||||||
background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add a transparency value to a border
|
|
||||||
.alpha-border(@color: @white, @alpha: 1) {
|
|
||||||
border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Gradients
|
|
||||||
.gradient(@startColor: #555, @endColor: #333) {
|
|
||||||
background-color: @endColor;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); // Konqueror
|
|
||||||
background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
|
|
||||||
background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10
|
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
|
|
||||||
background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
|
|
||||||
background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
|
|
||||||
background-image: linear-gradient(top, @startColor, @endColor); // The standard
|
|
||||||
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
|
|
||||||
}
|
|
||||||
|
|
||||||
.horizontal-gradient(@startColor: #555, @endColor: #333) {
|
|
||||||
background-color: @endColor;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
background-image: -khtml-gradient(linear, left top, right top, from(@startColor), to(@endColor)); // Konqueror
|
|
||||||
background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
|
|
||||||
background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10
|
|
||||||
background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
|
|
||||||
background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
|
|
||||||
background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
|
|
||||||
background-image: linear-gradient(left, @startColor, @endColor); // Le standard
|
|
||||||
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE9 and down
|
|
||||||
}
|
|
||||||
|
|
||||||
.directional-gradient(@startColor: #555, @endColor: #333, @deg: 45deg) {
|
|
||||||
background-color: @endColor;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+
|
|
||||||
background-image: -ms-linear-gradient(@deg, @startColor, @endColor); // IE10
|
|
||||||
background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+
|
|
||||||
background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10
|
|
||||||
background-image: linear-gradient(@deg, @startColor, @endColor); // The standard
|
|
||||||
}
|
|
||||||
|
|
||||||
.vertical-gradient-3(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
|
|
||||||
background-color: @endColor;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
|
|
||||||
background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-image: -ms-linear-gradient(@startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-image: -o-linear-gradient(@startColor, @midColor @colorStop, @endColor);
|
|
||||||
background-image: linear-gradient(@startColor, @midColor @colorStop, @endColor);
|
|
||||||
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down, gets no color-stop at all for proper fallback
|
|
||||||
}
|
|
||||||
|
|
||||||
.reset-ie-gradient() {
|
|
||||||
filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Opacity
|
|
||||||
.opacity(@opacity: 100) {
|
|
||||||
filter: e(%("alpha(opacity=%d)", @opacity));
|
|
||||||
-khtml-opacity: @opacity / 100;
|
|
||||||
-moz-opacity: @opacity / 100;
|
|
||||||
opacity: @opacity / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Word spacing wrap
|
|
||||||
.break-word() {
|
|
||||||
white-space: pre-wrap;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
// PATTERN ANIMATIONS
|
|
||||||
// ------------------
|
|
||||||
.fade {
|
|
||||||
.transition(opacity .15s linear);
|
|
||||||
opacity: 0;
|
|
||||||
&.in {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-select(@select) {
|
|
||||||
-webkit-user-select: @select;
|
|
||||||
-khtml-user-select: @select;
|
|
||||||
-moz-user-select: @select;
|
|
||||||
-o-user-select: @select;
|
|
||||||
user-select: @select;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Arrows
|
|
||||||
.arrow-top(@arrow-size: 5px, @arrow-color: #000, @arrow-location: 50%) {
|
|
||||||
bottom: 0;
|
|
||||||
left: @arrow-location;
|
|
||||||
margin-left: -@arrow-size;
|
|
||||||
border-left: @arrow-size solid transparent;
|
|
||||||
border-right: @arrow-size solid transparent;
|
|
||||||
border-top: @arrow-size solid @arrow-color;
|
|
||||||
position: absolute;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.arrow-right(@arrow-size: 5px, @arrow-color: #000, @arrow-location: 50%) {
|
|
||||||
top: @arrow-location;
|
|
||||||
left: 0;
|
|
||||||
margin-top: -@arrow-size;
|
|
||||||
border-top: @arrow-size solid transparent;
|
|
||||||
border-bottom: @arrow-size solid transparent;
|
|
||||||
border-right: @arrow-size solid @arrow-color;
|
|
||||||
position: absolute;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.arrow-bottom(@arrow-size: 5px, @arrow-color: #000, @arrow-location: 50%) {
|
|
||||||
top: 0;
|
|
||||||
left: @arrow-location;
|
|
||||||
margin-left: -@arrow-size;
|
|
||||||
border-left: @arrow-size solid transparent;
|
|
||||||
border-right: @arrow-size solid transparent;
|
|
||||||
border-bottom: @arrow-size solid @arrow-color;
|
|
||||||
position: absolute;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.arrow-left(@arrow-size: 5px, @arrow-color: #000, @arrow-location: 50%) {
|
|
||||||
top: @arrow-location;
|
|
||||||
right: 0;
|
|
||||||
margin-top: -@arrow-size;
|
|
||||||
border-top: @arrow-size solid transparent;
|
|
||||||
border-bottom: @arrow-size solid transparent;
|
|
||||||
border-left: @arrow-size solid @arrow-color;
|
|
||||||
position: absolute;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
//Modals
|
|
||||||
.modal-backdrop {
|
|
||||||
position: fixed;
|
|
||||||
z-index: 1000;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
background: #000;
|
|
||||||
|
|
||||||
&.fade, &.fade-large {
|
|
||||||
.transition(e('opacity .2s linear'));
|
|
||||||
.opacity(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-backdrop, .modal-backdrop.fade.in {
|
|
||||||
.opacity(50);
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 240px;
|
|
||||||
z-index: 1050;
|
|
||||||
overflow: auto;
|
|
||||||
width: 400px;
|
|
||||||
height: 100%;
|
|
||||||
background-color: #fff;
|
|
||||||
border-right: 1px solid @text-color;
|
|
||||||
.box-shadow(0 0 7px rgba(0,0,0,0.5));
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal {
|
|
||||||
&.fade-large {
|
|
||||||
width: 700px;
|
|
||||||
.transition(e('left .4s ease-out'));
|
|
||||||
left: -1100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.fade {
|
|
||||||
.transition(e('left .4s ease-out'));
|
|
||||||
left: -700px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.fade.in, &.fade-large.in { left: 240px; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.close {
|
|
||||||
float: right;
|
|
||||||
font-size: 26px;
|
|
||||||
line-height: 30px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #000;
|
|
||||||
background-color: #fff;
|
|
||||||
text-shadow: 0 1px 0 rgba(255,255,255,1);
|
|
||||||
|
|
||||||
.opacity(20);
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: #000;
|
|
||||||
text-decoration: none;
|
|
||||||
cursor: pointer;
|
|
||||||
.opacity(40);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,354 +0,0 @@
|
|||||||
//Profiles
|
|
||||||
.profile {
|
|
||||||
background: #E9E9E9 url('/static/imgs/b.png');
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-info {
|
|
||||||
position: relative;
|
|
||||||
padding: 15px;
|
|
||||||
background: #fff;
|
|
||||||
|
|
||||||
.close { line-height: 20px; }
|
|
||||||
.btn {
|
|
||||||
position: absolute;
|
|
||||||
right: 17px;
|
|
||||||
bottom: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-avatar {
|
|
||||||
display: inline-block;
|
|
||||||
float: left;
|
|
||||||
border-bottom: 0;
|
|
||||||
|
|
||||||
img {
|
|
||||||
.square(52px);
|
|
||||||
border: 2px solid @adjacent-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-avatar:hover {
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-name {
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
margin: 0 0 10px 10px;
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: 22px;
|
|
||||||
line-height: 30px;
|
|
||||||
|
|
||||||
& a {
|
|
||||||
font-weight: 500;
|
|
||||||
color: @text-color;
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 20px;
|
|
||||||
|
|
||||||
& a {
|
|
||||||
color: #777;
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 a:hover, h3 a:hover
|
|
||||||
{ color: @adjacent-color; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-description {
|
|
||||||
clear: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 18px;
|
|
||||||
font-style: italic;
|
|
||||||
color: #777;
|
|
||||||
margin: 0;
|
|
||||||
padding: 5px 0;
|
|
||||||
|
|
||||||
a { border-bottom: 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-location-url {
|
|
||||||
clear: left;
|
|
||||||
margin: 0;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 18px;
|
|
||||||
color: #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
.divider {
|
|
||||||
padding: 0 4px;
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
a { border-bottom:0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-stats {
|
|
||||||
margin: 0;
|
|
||||||
list-style: none;
|
|
||||||
overflow: hidden;
|
|
||||||
border-top: 1px solid #C2C2C2;
|
|
||||||
border-bottom: 1px solid #C2C2C2;
|
|
||||||
background: #fff;
|
|
||||||
|
|
||||||
li {
|
|
||||||
display: inline;
|
|
||||||
|
|
||||||
a, span {
|
|
||||||
float: left;
|
|
||||||
padding: 7px 15px;
|
|
||||||
color: #777;
|
|
||||||
font-size: 10px;
|
|
||||||
line-height: 16px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
border-left: 1px solid #C2C2C2;
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
strong {
|
|
||||||
display: block;
|
|
||||||
color: @text-color;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover, a:hover strong {
|
|
||||||
color: @adjacent-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
li:first-child span {
|
|
||||||
border-left: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-info-footer {
|
|
||||||
padding: 10px 15px;
|
|
||||||
border-bottom: 1px solid #c2c2c2;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Profile Icons
|
|
||||||
.profile-icons(@bgicon) {
|
|
||||||
display: inline-block;
|
|
||||||
background: @bgicon;
|
|
||||||
margin-left: 10px;
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-watchers {
|
|
||||||
.profile-icons(~"url('/static/imgs/ico-watchers.png') no-repeat");
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-forks {
|
|
||||||
.profile-icons(~"url('/static/imgs/ico-forks.png') no-repeat");
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-comments {
|
|
||||||
.profile-icons(~"url('/static/imgs/ico-comments.png') no-repeat");
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-likes {
|
|
||||||
.profile-icons(~"url('/static/imgs/ico-likes.png') no-repeat");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//Twitter Profile
|
|
||||||
.profile.twitter {
|
|
||||||
overflow:hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-tweets {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0;
|
|
||||||
background: #fff;
|
|
||||||
|
|
||||||
li {
|
|
||||||
padding: 10px 15px;
|
|
||||||
border-bottom: 1px solid #C2C2C2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tweet-title {
|
|
||||||
border-bottom: 0;
|
|
||||||
position: relative;
|
|
||||||
padding-left: 45px;
|
|
||||||
|
|
||||||
img {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
border: 2px solid @adjacent-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
color: #777;
|
|
||||||
font-size: 13px;
|
|
||||||
padding-left: 3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tweet-title:hover {
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tweet-text {
|
|
||||||
color: #777;
|
|
||||||
margin:0;
|
|
||||||
padding: 3px 0;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 18px;
|
|
||||||
margin-left: 45px;
|
|
||||||
|
|
||||||
a { border-bottom: 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.tweet-date {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 18px;
|
|
||||||
margin-left: 45px;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Github Profile
|
|
||||||
.profile-repos {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0;
|
|
||||||
background: #fff;
|
|
||||||
|
|
||||||
li {
|
|
||||||
padding: 10px 15px;
|
|
||||||
border-bottom: 1px solid #C2C2C2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-repo-name {
|
|
||||||
border-bottom: 0;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
.profile-repo-name:hover {
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-repo-text {
|
|
||||||
color: #777;
|
|
||||||
margin:0;
|
|
||||||
padding: 5px 0;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-repo-stats {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 18px;
|
|
||||||
|
|
||||||
li {
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
//ie7 inline-block hack
|
|
||||||
zoom: 1;
|
|
||||||
*display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
border-bottom: 0;
|
|
||||||
color: @adjacent-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Dribbble & Instagram Profiles
|
|
||||||
.profile-shots {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 15px 0;
|
|
||||||
|
|
||||||
> li {
|
|
||||||
float: left;
|
|
||||||
width: 300px;
|
|
||||||
padding: 10px;
|
|
||||||
margin: 0 0px 20px 20px;
|
|
||||||
background: #fff;
|
|
||||||
|
|
||||||
.box-shadow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-shot {
|
|
||||||
border-bottom: 0;
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 300px;
|
|
||||||
height: 225px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.profile-shot:hover {
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-shot-title {
|
|
||||||
display: block;
|
|
||||||
padding: 5px 0;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 18px;
|
|
||||||
color: @alternate-text-color;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-shot-stats {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 18px;
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin-bottom: 0;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
//ie7 inline-block hack
|
|
||||||
zoom: 1;
|
|
||||||
*display: inline;
|
|
||||||
}
|
|
||||||
li:first-child a, li:first-child span {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
border-bottom: 0;
|
|
||||||
color: @adjacent-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-shot-date {
|
|
||||||
float: right;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.instagram .profile-shot img {
|
|
||||||
width: 300px;
|
|
||||||
height: 300px;
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
html, body {margin: 0; padding: 0;}
|
|
||||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, cite, code, del, dfn, em, img, q, s, samp, small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset, form, label, legend, button, table, caption, tbody, tfoot, thead, tr, th, td {margin: 0; padding: 0; border: 0; font-weight: normal; font-style: normal; font-size: 100%; font-family: inherit;}
|
|
||||||
strong, b {font-weight: bold;}
|
|
||||||
em, i {font-style:italic;}
|
|
||||||
body {line-height: 1;}
|
|
||||||
table {border-collapse: collapse; border-spacing: 0;}
|
|
||||||
q:before, q:after, blockquote:before, blockquote:after {content: "";}
|
|
||||||
html {overflow-y: scroll; font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;}
|
|
||||||
a:focus {outline: thin dotted;}
|
|
||||||
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section {display: block;}
|
|
||||||
audio, canvas, video {display: inline-block; *display: inline; *zoom: 1;}
|
|
||||||
audio:not([controls]) {display: none;}
|
|
||||||
sub, sup {font-size: 75%; line-height: 0; position: relative; vertical-align: baseline;}
|
|
||||||
sup {top: -0.5em;}
|
|
||||||
sub {bottom: -0.25em;}
|
|
||||||
img {border: 0; -ms-interpolation-mode: bicubic;}
|
|
||||||
button, input, select, textarea {font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle;}
|
|
||||||
button, input {line-height: normal; *overflow: visible;}
|
|
||||||
button::-moz-focus-inner, input::-moz-focus-inner {border: 0;padding: 0;}
|
|
||||||
button, input[type="button"], input[type="reset"], input[type="submit"] {cursor: pointer; -webkit-appearance: button;}
|
|
||||||
input[type="search"] {-webkit-appearance: textfield; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box;}
|
|
||||||
input[type="search"]::-webkit-search-decoration {-webkit-appearance: none;}
|
|
||||||
textarea {overflow: auto; vertical-align: top;}
|
|
||||||
|
|
||||||
@@ -1,165 +0,0 @@
|
|||||||
@media (max-width: 600px) {
|
|
||||||
|
|
||||||
body {
|
|
||||||
background: #E9E9E9 url('/static/imgs/b.png');
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-nav {
|
|
||||||
display: block;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
height: 45px;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 3000;
|
|
||||||
|
|
||||||
background: #E9E9E9 url('/static/imgs/b.png');
|
|
||||||
border-top: 3px solid @adjacent-color;
|
|
||||||
.box-shadow();
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
float: right;
|
|
||||||
padding: 10px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
border-bottom: 0;
|
|
||||||
font-weight: bold;
|
|
||||||
color: @text-color;
|
|
||||||
text-shadow: 0 1px 1px #f9f9f9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-btn {
|
|
||||||
float: left;
|
|
||||||
padding: 7px 10px 4px;
|
|
||||||
margin: 8px 10px;
|
|
||||||
.gradient(#404040, #333);
|
|
||||||
.border-radius(4px);
|
|
||||||
.box-shadow(0 1px 1px #f9f9f9);
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-btn-bar {
|
|
||||||
display: block;
|
|
||||||
width: 18px;
|
|
||||||
height: 2px;
|
|
||||||
margin-bottom: 3px;
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
|
|
||||||
.border-radius(1px);
|
|
||||||
.box-shadow(0 1px 0 rgba(0, 0, 0, 0.25));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
header.main-header {
|
|
||||||
position: absolute;
|
|
||||||
|
|
||||||
|
|
||||||
hgroup {
|
|
||||||
.picture a { margin: 60px 0 10px 10px; }
|
|
||||||
h1 {
|
|
||||||
font-size: 18px;
|
|
||||||
margin: 0 10px;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
margin: 0 10px 10px 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
nav {
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fork-me {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section {
|
|
||||||
margin: 45px 0 0 0;
|
|
||||||
position: relative;
|
|
||||||
min-height: 500px;
|
|
||||||
left: 0;
|
|
||||||
z-index: 2000;
|
|
||||||
background-color: #fff;
|
|
||||||
|
|
||||||
.box-shadow();
|
|
||||||
.transition(e('left .3s ease-out'));
|
|
||||||
|
|
||||||
&.nav-opened {
|
|
||||||
left: 240px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.blog-section {
|
|
||||||
|
|
||||||
hgroup {
|
|
||||||
h2, h1 { .h2; margin: 10px 0 5px 0; }
|
|
||||||
|
|
||||||
h3 a {
|
|
||||||
position: static;
|
|
||||||
margin: 0;
|
|
||||||
padding: 5px 0;
|
|
||||||
border: 0;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
article {
|
|
||||||
width: 95%;
|
|
||||||
padding: 10px 10px 30px;
|
|
||||||
border-bottom: 1px solid #C2C2C2;
|
|
||||||
|
|
||||||
img { max-width: 300px; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.loading {
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-backdrop {
|
|
||||||
z-index: 3500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 1500px;
|
|
||||||
z-index: 4000;
|
|
||||||
top: 45px;
|
|
||||||
|
|
||||||
&.fade-large { width: 100%; }
|
|
||||||
|
|
||||||
&.fade.in, &.fade-large.in { left: 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile.twitter, .profile.github, .profile.dribbble, .profile.instagram {
|
|
||||||
overflow: scroll;
|
|
||||||
}
|
|
||||||
|
|
||||||
.profile-info .btn {
|
|
||||||
position: static;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shots-likes-received, .shots-likes-given { display: none; }
|
|
||||||
|
|
||||||
.profile-shots { padding: 10px 0;
|
|
||||||
|
|
||||||
> li {
|
|
||||||
margin: 0 0 20px 10px;
|
|
||||||
width: 280px;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 280px;
|
|
||||||
height: 210px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.instagram .profile-shot img {
|
|
||||||
width: 280px;
|
|
||||||
height: 280px;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,253 +0,0 @@
|
|||||||
@import 'reset.less';
|
|
||||||
@import 'mixins.less';
|
|
||||||
|
|
||||||
@import 'variables.less';
|
|
||||||
|
|
||||||
@import 'base.less';
|
|
||||||
@import 'buttons.less';
|
|
||||||
@import 'modals.less';
|
|
||||||
@import 'profiles.less';
|
|
||||||
@import 'code.less';
|
|
||||||
|
|
||||||
|
|
||||||
// Specific styles
|
|
||||||
.main-header {
|
|
||||||
position: fixed;
|
|
||||||
z-index: 1100;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 240px;
|
|
||||||
height: 100%;
|
|
||||||
min-height: 700px;
|
|
||||||
float: left;
|
|
||||||
border-right: 1px solid #c2c2c2;
|
|
||||||
background: #E9E9E9 url('/static/imgs/b.png');
|
|
||||||
|
|
||||||
|
|
||||||
hgroup {
|
|
||||||
.picture a {
|
|
||||||
display: inline-block;
|
|
||||||
.square(84px);
|
|
||||||
margin: 60px 35px 20px 35px;
|
|
||||||
border: 3px solid @adjacent-color;
|
|
||||||
background: #00000 url('https://twimg0-a.akamaihd.net/profile_images/1149409097/20101018060848_samrat94_6HR8FZ5V2JQDPU34ENIKCWBL0STAMO91XG7Y.jpg');
|
|
||||||
|
|
||||||
@pic-shadow:0 1px 1px #f9f9f9, inset 0 0 6px #000000;
|
|
||||||
.box-shadow(@pic-shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 24px;
|
|
||||||
margin: 0 35px;
|
|
||||||
text-shadow: 0 1px 1px #f9f9f9;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
margin: 10px 35px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: normal;
|
|
||||||
line-height: 25px;
|
|
||||||
color: @alternate-text-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
nav {
|
|
||||||
margin: 65px 0;
|
|
||||||
|
|
||||||
ul { border-top: 1px solid #d2d2d2; list-style: none; margin-left: 0; }
|
|
||||||
li { margin-bottom: 0; }
|
|
||||||
a, a:hover { border-bottom: 1px solid #d2d2d2; }
|
|
||||||
a {
|
|
||||||
position: relative;
|
|
||||||
padding: 15px 30px;
|
|
||||||
color: @text-color;
|
|
||||||
display: block;
|
|
||||||
font-weight: 500;
|
|
||||||
text-shadow: 0 1px 1px #f9f9f9;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #fff;
|
|
||||||
background: @adjacent-color;
|
|
||||||
border-right: 0;
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
.sel { border-right: 6px solid @adjacent-color; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinner {
|
|
||||||
position: absolute !important;
|
|
||||||
right: 30px;
|
|
||||||
top: 23px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fork-me {
|
|
||||||
position: absolute;
|
|
||||||
left: 30px;
|
|
||||||
bottom: 20px;
|
|
||||||
font-size: 13px;
|
|
||||||
color: @alternate-text-color;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.fork-me:hover {
|
|
||||||
color: @adjacent-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
margin-left: 241px;
|
|
||||||
padding: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section h3.date {
|
|
||||||
width: 100%;
|
|
||||||
display: block;
|
|
||||||
margin-left: -34px;
|
|
||||||
padding: 20px 35px 30px 75px;
|
|
||||||
border-bottom: 1px solid #C2C2C2;
|
|
||||||
border-top: 1px solid #C2C2C2;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
.alpha-background(#ffffff, 0.8);
|
|
||||||
color: @adjacent-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.button_accent {
|
|
||||||
margin:40px 50px;
|
|
||||||
padding:10px 20px;
|
|
||||||
display:inline-block;
|
|
||||||
border:3px solid @adjacent-color;
|
|
||||||
border-radius:70px;
|
|
||||||
-moz-border-radius:70px;
|
|
||||||
-webkit-border-radius:70px;
|
|
||||||
text-transform:uppercase;
|
|
||||||
color:@adjacent-color;
|
|
||||||
font-size:17px;
|
|
||||||
font-weight:400;}
|
|
||||||
|
|
||||||
a.button_accent:link{color:#0e94ec;}
|
|
||||||
a.button_accent:hover{color:#ffffff;
|
|
||||||
background-color:@adjacent-color;
|
|
||||||
outline:0;}
|
|
||||||
a.button_accent:active{
|
|
||||||
color:#ffffff;
|
|
||||||
background-color:#333399;
|
|
||||||
outline:0;}
|
|
||||||
|
|
||||||
.blog-section {
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
hgroup {
|
|
||||||
h2, h1 { .h1; line-height: 40px; margin: 50px 0 25px 0;}
|
|
||||||
h2 a {
|
|
||||||
border-bottom: 0;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
h3 a {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 a.active {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
bottom: auto;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
article {
|
|
||||||
width: 700px;
|
|
||||||
overflow: hidden;
|
|
||||||
line-height: 25px;
|
|
||||||
padding: 5px 35px 50px 34px;
|
|
||||||
|
|
||||||
img {
|
|
||||||
padding: 2px;
|
|
||||||
border: 1px solid #C2C2C2;
|
|
||||||
margin: 0px 15px 5px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.img-link {
|
|
||||||
border-bottom: 0;
|
|
||||||
|
|
||||||
&:hover img { border-color: @adjacent-color; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
padding-top: 10px;
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
float: left;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 28px;
|
|
||||||
padding: 0px 15px 0px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tags {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0;
|
|
||||||
|
|
||||||
li {
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
//ie7 inline-block hack
|
|
||||||
zoom: 1;
|
|
||||||
*display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
padding: 3px 10px;
|
|
||||||
font-size: 13px;
|
|
||||||
text-shadow: 0 1px 1px #F9F9F9;
|
|
||||||
background: #E9E9E9;
|
|
||||||
border: 1px solid #C2C2C2;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
background: @adjacent-color;
|
|
||||||
color: #fff;
|
|
||||||
text-shadow: none;
|
|
||||||
border: 1px solid @adjacent-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-nav {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.load-more-button {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0 20px 50px 20px;
|
|
||||||
padding: 10px 30px;
|
|
||||||
background-color: @adjacent-color;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
border: 1px solid @adjacent-color;
|
|
||||||
background: #fff;
|
|
||||||
color: @adjacent-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinner {
|
|
||||||
left: 140px;
|
|
||||||
top: -8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
|
||||||
|
|
||||||
header.main-header {
|
|
||||||
hgroup .picture a, nav { margin-top: 30px; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.blog-section article {
|
|
||||||
width: 400px;
|
|
||||||
|
|
||||||
img { max-width: 400px; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@import 'styles-mobile.less';
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
//variables
|
|
||||||
@adjacent-color: #333366;
|
|
||||||
|
|
||||||
@text-color: #404040;
|
|
||||||
@alternate-text-color: #4b4b4b;
|
|
||||||
@link-color: #000000;
|
|
||||||
@@ -1,252 +0,0 @@
|
|||||||
@import 'reset.less';
|
|
||||||
@import 'mixins.less';
|
|
||||||
|
|
||||||
@import 'variables.less';
|
|
||||||
|
|
||||||
@import 'base.less';
|
|
||||||
@import 'buttons.less';
|
|
||||||
@import 'modals.less';
|
|
||||||
@import 'profiles.less';
|
|
||||||
@import 'code.less';
|
|
||||||
|
|
||||||
|
|
||||||
// Specific styles
|
|
||||||
.main-header {
|
|
||||||
position: fixed;
|
|
||||||
z-index: 1100;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 240px;
|
|
||||||
height: 100%;
|
|
||||||
min-height: 700px;
|
|
||||||
float: left;
|
|
||||||
border-right: 1px solid #c2c2c2;
|
|
||||||
background: #E9E9E9 url('/static/imgs/b.png');
|
|
||||||
|
|
||||||
|
|
||||||
hgroup {
|
|
||||||
.picture a {
|
|
||||||
display: inline-block;
|
|
||||||
.square(84px);
|
|
||||||
margin: 60px 35px 20px 35px;
|
|
||||||
border: 3px solid @adjacent-color;
|
|
||||||
background: #00000 url('/static/imgs/pic.png');
|
|
||||||
|
|
||||||
@pic-shadow:0 1px 1px #f9f9f9, inset 0 0 6px #000000;
|
|
||||||
.box-shadow(@pic-shadow);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 24px;
|
|
||||||
margin: 0 35px;
|
|
||||||
text-shadow: 0 1px 1px #f9f9f9;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
margin: 10px 35px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: normal;
|
|
||||||
line-height: 25px;
|
|
||||||
color: @alternate-text-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
nav {
|
|
||||||
margin: 65px 0;
|
|
||||||
|
|
||||||
ul { border-top: 1px solid #d2d2d2; list-style: none; margin-left: 0; }
|
|
||||||
li { margin-bottom: 0; }
|
|
||||||
a, a:hover { border-bottom: 1px solid #d2d2d2; }
|
|
||||||
a {
|
|
||||||
position: relative;
|
|
||||||
padding: 15px 30px;
|
|
||||||
color: @text-color;
|
|
||||||
display: block;
|
|
||||||
font-weight: 500;
|
|
||||||
text-shadow: 0 1px 1px #f9f9f9;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: #fff;
|
|
||||||
background: @adjacent-color;
|
|
||||||
border-right: 0;
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
.sel { border-right: 6px solid @adjacent-color; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinner {
|
|
||||||
position: absolute !important;
|
|
||||||
right: 30px;
|
|
||||||
top: 23px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fork-me {
|
|
||||||
position: absolute;
|
|
||||||
left: 30px;
|
|
||||||
bottom: 20px;
|
|
||||||
font-size: 13px;
|
|
||||||
color: @alternate-text-color;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.fork-me:hover {
|
|
||||||
color: @adjacent-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
margin-left: 241px;
|
|
||||||
padding: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-section h3.date {
|
|
||||||
width: 100%;
|
|
||||||
display: block;
|
|
||||||
margin-left: -34px;
|
|
||||||
padding: 20px 35px 30px 75px;
|
|
||||||
border-bottom: 1px solid #C2C2C2;
|
|
||||||
border-top: 1px solid #C2C2C2;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
.alpha-background(#ffffff, 0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
a.button_accent {
|
|
||||||
margin:40px 50px;
|
|
||||||
padding:10px 20px;
|
|
||||||
display:inline-block;
|
|
||||||
border:3px solid @adjacent-color;
|
|
||||||
border-radius:70px;
|
|
||||||
-moz-border-radius:70px;
|
|
||||||
-webkit-border-radius:70px;
|
|
||||||
text-transform:uppercase;
|
|
||||||
color:#000000;
|
|
||||||
font-size:17px;
|
|
||||||
font-weight:400;}
|
|
||||||
|
|
||||||
a.button_accent:link{color:#0e94ec;}
|
|
||||||
a.button_accent:hover{color:#ffffff;
|
|
||||||
background-color:@adjacent-color;
|
|
||||||
outline:0;}
|
|
||||||
a.button_accent:active{
|
|
||||||
color:#ffffff;
|
|
||||||
background-color:#0e94ec;
|
|
||||||
outline:0;}
|
|
||||||
|
|
||||||
.blog-section {
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
hgroup {
|
|
||||||
h2, h1 { .h1; line-height: 40px; margin: 50px 0 25px 0;}
|
|
||||||
h2 a {
|
|
||||||
border-bottom: 0;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
h3 a {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 a.active {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
bottom: auto;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
article {
|
|
||||||
width: 700px;
|
|
||||||
overflow: hidden;
|
|
||||||
line-height: 25px;
|
|
||||||
padding: 5px 35px 50px 34px;
|
|
||||||
|
|
||||||
img {
|
|
||||||
padding: 2px;
|
|
||||||
border: 1px solid #C2C2C2;
|
|
||||||
margin: 0px 15px 5px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.img-link {
|
|
||||||
border-bottom: 0;
|
|
||||||
|
|
||||||
&:hover img { border-color: @adjacent-color; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
padding-top: 10px;
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
float: left;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 28px;
|
|
||||||
padding: 0px 15px 0px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tags {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0;
|
|
||||||
|
|
||||||
li {
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
//ie7 inline-block hack
|
|
||||||
zoom: 1;
|
|
||||||
*display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
padding: 3px 10px;
|
|
||||||
font-size: 13px;
|
|
||||||
text-shadow: 0 1px 1px #F9F9F9;
|
|
||||||
background: #E9E9E9;
|
|
||||||
border: 1px solid #C2C2C2;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
background: @adjacent-color;
|
|
||||||
color: #fff;
|
|
||||||
text-shadow: none;
|
|
||||||
border: 1px solid @adjacent-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mobile-nav {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.load-more-button {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0 20px 50px 20px;
|
|
||||||
padding: 10px 30px;
|
|
||||||
background-color: @adjacent-color;
|
|
||||||
color: #fff;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
border: 1px solid @adjacent-color;
|
|
||||||
background: #fff;
|
|
||||||
color: @adjacent-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinner {
|
|
||||||
left: 140px;
|
|
||||||
top: -8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
|
||||||
|
|
||||||
header.main-header {
|
|
||||||
hgroup .picture a, nav { margin-top: 30px; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.blog-section article {
|
|
||||||
width: 400px;
|
|
||||||
|
|
||||||
img { max-width: 400px; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@import 'styles-mobile.less';
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
{% block pagetitle %}500 Oops{% endblock %}
|
|
||||||
{% block main_section %}
|
|
||||||
<section class="main-section">
|
|
||||||
<article>
|
|
||||||
<h2>Oops!</h2>
|
|
||||||
<p>An error occurred. Please try again later.</p>
|
|
||||||
</article>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<article id="{{ id }}">
|
|
||||||
<hgroup>
|
|
||||||
<h2><a href="/post/{{ id }}">{{ artist }} - {{ track_name }}</a></h2>
|
|
||||||
<h3><a href="#{{ id }}">{{ formated_date }}</a></h3>
|
|
||||||
</hgroup>
|
|
||||||
{{{ player }}}
|
|
||||||
{{#if caption}}
|
|
||||||
{{{ caption }}}
|
|
||||||
{{/if}}
|
|
||||||
{{#if tags }}
|
|
||||||
<footer>
|
|
||||||
<h4>Tags</h4>
|
|
||||||
<ul class="tags">
|
|
||||||
{{#each tags}}
|
|
||||||
<li><a href="/tags/{{ this }}">{{ this }}</a></li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</footer>
|
|
||||||
{{/if}}
|
|
||||||
</article>
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
<article id="{{ id }}">
|
|
||||||
<hgroup>
|
|
||||||
<h2><a href="{{url}}">Link: {{title}}</a></h2>
|
|
||||||
<h3><a href="#{{ id }}">{{ formated_date }}</a></h3>
|
|
||||||
</hgroup>
|
|
||||||
{{{ description }}}
|
|
||||||
{{#if tags}}
|
|
||||||
<footer>
|
|
||||||
<h4>Tags</h4>
|
|
||||||
<ul class="tags">
|
|
||||||
{{#each tags}}
|
|
||||||
<li><a href="/tags/{{ this }}">{{ this }}</a></li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</footer>
|
|
||||||
{{/if}}
|
|
||||||
</article>
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
<article id="{{ id }}">
|
|
||||||
<hgroup>
|
|
||||||
<h2><a href="/post/{{ id }}">Photo</a></h2>
|
|
||||||
<h3><a href="#{{ id }}">{{ formated_date }}</a></h3>
|
|
||||||
</hgroup>
|
|
||||||
{{#each photos}}
|
|
||||||
{{#with original_size}}
|
|
||||||
<p><img src="{{url}}" /></p>
|
|
||||||
{{/with}}
|
|
||||||
{{#if caption}}
|
|
||||||
{{{ caption }}}
|
|
||||||
{{/if}}
|
|
||||||
{{/each}}
|
|
||||||
{{#if caption}}
|
|
||||||
{{{ caption }}}
|
|
||||||
{{/if}}
|
|
||||||
{{#if tags }}
|
|
||||||
<footer>
|
|
||||||
<h4>Tags</h4>
|
|
||||||
<ul class="tags">
|
|
||||||
{{#each tags}}
|
|
||||||
<li><a href="/tags/{{ this }}">{{ this }}</a></li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</footer>
|
|
||||||
{{/if}}
|
|
||||||
</article>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<article id="{{ id }}">
|
|
||||||
<hgroup>
|
|
||||||
<h2><a href="/post/{{ id }}">Quote</a></h2>
|
|
||||||
<h3><a href="#{{ id }}">{{ formated_date }}</a></h3>
|
|
||||||
</hgroup>
|
|
||||||
<blockquote>
|
|
||||||
{{text}}
|
|
||||||
</blockquote>
|
|
||||||
{{#if source}}
|
|
||||||
<p>{{{ source }}}</p>
|
|
||||||
{{/if}}
|
|
||||||
{{#if tags }}
|
|
||||||
<footer>
|
|
||||||
<h4>Tags</h4>
|
|
||||||
<ul class="tags">
|
|
||||||
{{#each tags}}
|
|
||||||
<li><a href="/tags/{{ this }}">{{ this }}</a></li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</footer>
|
|
||||||
{{/if}}
|
|
||||||
</article>
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
<article id="{{ id }}">
|
|
||||||
<hgroup>
|
|
||||||
<h2><a href="/post/{{ id }}">{{ title }} </a></h2>
|
|
||||||
<h3><a href="#{{ id }}">{{ formated_date }}</a></h3>
|
|
||||||
</hgroup>
|
|
||||||
{{{ body }}}
|
|
||||||
{{#if tags}}
|
|
||||||
<footer>
|
|
||||||
<h4>Tags</h4>
|
|
||||||
<ul class="tags">
|
|
||||||
{{#each tags}}
|
|
||||||
<li><a href="/tags/{{ this }}">{{ this }}</a></li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</footer>
|
|
||||||
{{/if}}
|
|
||||||
</article>
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<article id="{{ id }}">
|
|
||||||
<hgroup>
|
|
||||||
<h2><a href="/post/{{ id }}">Video</a></h2>
|
|
||||||
<h3><a href="#{{ id }}">{{ formated_date }}</a></h3>
|
|
||||||
</hgroup>
|
|
||||||
<p>
|
|
||||||
<a href="{{ permalink_url }}" class="no-border"><img src="{{ thumbnail_url }}" /></a>
|
|
||||||
</p>
|
|
||||||
{{#if tags }}
|
|
||||||
<footer>
|
|
||||||
<h4>Tags</h4>
|
|
||||||
<ul class="tags">
|
|
||||||
{{#each tags}}
|
|
||||||
<li><a href="/tags/{{ this }}">{{ this }}</a></li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</footer>
|
|
||||||
{{/if}}
|
|
||||||
</article>
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
<div class="profile dribbble modal fade-large" id="dribbble-profile">
|
|
||||||
{{#with user}}
|
|
||||||
<div class="profile-info">
|
|
||||||
<button class="close" data-dismiss="modal">×</button>
|
|
||||||
<a href="http://dribbble.com/{{ username }}" class="profile-avatar">
|
|
||||||
<img src="{{ avatar_url }}" alt="{{name}}" />
|
|
||||||
</a>
|
|
||||||
<div class="profile-name">
|
|
||||||
<h2><a href="http://dribbble.com/{{ username }}">{{ name }}</a></h2>
|
|
||||||
<h3><a href="http://dribbble.com/{{ username }}">@{{ username}}</a></h3>
|
|
||||||
</div>
|
|
||||||
<p class="profile-location-url">
|
|
||||||
{{#if location }}
|
|
||||||
<span>{{ location }}</span>
|
|
||||||
<span class="divider">·</span>
|
|
||||||
{{/if}}
|
|
||||||
{{#if website_url }}
|
|
||||||
<span><a href="{{ website_url }}">{{ website_url }}</a></span>
|
|
||||||
{{/if}}
|
|
||||||
</p>
|
|
||||||
<a href="http://dribbble.com/{{ username }}" class="btn">Follow on Dribbble</a>
|
|
||||||
</div>
|
|
||||||
<ul class="profile-stats">
|
|
||||||
<li><a href="http://dribbble.com/{{ username }}"><strong>{{ shots_count }}</strong> shots</a></li>
|
|
||||||
<li><a href="http://dribbble.com/{{ username }}" class="shots-likes-received"><strong>{{ likes_received_count }}</strong> likes received</a></li>
|
|
||||||
<li><a href="http://dribbble.com/{{ username }}" class="shots-likes-given"><strong>{{ likes_count }}</strong> likes given</a></li>
|
|
||||||
<li><a href="http://dribbble.com/{{ username }}/following"><strong>{{ following_count }}</strong> following</a></li>
|
|
||||||
<li><a href="http://dribbble.com/{{ username }}/followers"><strong>{{ followers_count }}</strong> followers</a></li>
|
|
||||||
</ul>
|
|
||||||
{{/with}}
|
|
||||||
<ul class="profile-shots">
|
|
||||||
{{#each shots}}
|
|
||||||
<li>
|
|
||||||
<a href="{{ url }}" class="profile-shot">
|
|
||||||
<img src="{{ image_url }}" alt="{{ title }}" />
|
|
||||||
</a>
|
|
||||||
<span class="profile-shot-title">{{ title }}</span>
|
|
||||||
<ul class="profile-shot-stats">
|
|
||||||
<li><a href="" class="profile-watchers">{{ views_count }}</a></li>
|
|
||||||
<li><a href="" class="profile-comments">{{ comments_count }}</a></li>
|
|
||||||
<li><a href="" class="profile-likes">{{ likes_count }}</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
@@ -20,9 +20,9 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<ul class="profile-stats">
|
<ul class="profile-stats">
|
||||||
<li><a href="http://github.com/{{ login }}"><strong>{{ public_repo_count }}</strong> repos</a></li>
|
<li><a href="http://github.com/{{ login }}"><strong>{{ public_repos }}</strong> repos</a></li>
|
||||||
<li><a href="http://github.com/{{ login }}/following"><strong>{{ following_count }}</strong> following</a></li>
|
<li><a href="http://github.com/{{ login }}/following"><strong>{{ following }}</strong> following</a></li>
|
||||||
<li><a href="http://github.com/{{ login }}/followers"><strong>{{ followers_count }}</strong> followers</a></li>
|
<li><a href="http://github.com/{{ login }}/followers"><strong>{{ followers }}</strong> followers</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="profile-info-footer">
|
<div class="profile-info-footer">
|
||||||
<a href="http://github.com/{{ login }}" class="btn">Follow on Github</a>
|
<a href="http://github.com/{{ login }}" class="btn">Follow on Github</a>
|
||||||
@@ -31,14 +31,14 @@
|
|||||||
<ul class="profile-repos">
|
<ul class="profile-repos">
|
||||||
{{#each repositories}}
|
{{#each repositories}}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ url }}" class="profile-repo-name">{{ name }}</a>
|
<a href="{{ html_url }}" class="profile-repo-name">{{ name }}</a>
|
||||||
<p class="profile-repo-text">
|
<p class="profile-repo-text">
|
||||||
{{ description }}
|
{{ description }}
|
||||||
</p>
|
</p>
|
||||||
<ul class="profile-repo-stats">
|
<ul class="profile-repo-stats">
|
||||||
<li>{{ language }}</li>
|
<li>{{ language }}</li>
|
||||||
<li><a href="{{ url }}/watchers" class="profile-watchers">{{ watchers }}</a></li>
|
<li><a href="{{ html_url }}/watchers" class="profile-watchers">{{ watchers }}</a></li>
|
||||||
<li><a href="{{ url }}/network" class="profile-forks">{{ forks }}</a></li>
|
<li><a href="{{ html_url }}/network" class="profile-forks">{{ forks }}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
46
syte/static/templates/google-view.html
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<div class="profile google modal fade" id="google-profile">
|
||||||
|
{{#with user}}
|
||||||
|
<div class="profile-info">
|
||||||
|
<button class="close" data-dismiss="modal">×</button>
|
||||||
|
<a href="{{ url }}" class="profile-avatar">
|
||||||
|
<img src="{{ image.url }}" alt="{{ displayName }}" />
|
||||||
|
</a>
|
||||||
|
<div class="profile-name">
|
||||||
|
<h2><a href="{{ url }}">{{ displayName }}</a></h2>
|
||||||
|
</div>
|
||||||
|
{{#if tagline}}
|
||||||
|
<p class="profile-description">{{{ tagline }}}</p>
|
||||||
|
{{/if}}
|
||||||
|
<p class="profile-location-url">
|
||||||
|
{{#if placesLived }}
|
||||||
|
<span>{{ placesLived.0.value }}</span>
|
||||||
|
<span class="divider">·</span>
|
||||||
|
{{/if}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<ul class="profile-stats">
|
||||||
|
</ul>
|
||||||
|
<div class="profile-info-footer">
|
||||||
|
<a href="{{ url }}" class="btn">Follow on Google+</a>
|
||||||
|
</div>
|
||||||
|
{{/with}}
|
||||||
|
<ul class="profile-tweets">
|
||||||
|
{{#each posts}}
|
||||||
|
<li>
|
||||||
|
<a href="{{ url }}" class="tweet-title">
|
||||||
|
<img src="{{ actor.image.url }}" alt="{{ actor.displayName }}" />
|
||||||
|
<strong>{{ actor.displayName }}</strong>
|
||||||
|
</a>
|
||||||
|
<p class="tweet-text">
|
||||||
|
{{{ title }}}
|
||||||
|
</p>
|
||||||
|
<ul class="profile-repo-stats tweet-date" style="padding-left: 30px; font-size: 12px;">
|
||||||
|
<li>{{ published }}</li>
|
||||||
|
<li><a class="profile-plusoners">{{ plusoners }}</a></li>
|
||||||
|
<li><a class="profile-resharers">{{ resharers }}</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{{#each media}}
|
|
||||||
<li>
|
|
||||||
<a href="{{ link }}" class="profile-shot">
|
|
||||||
{{#with images}}
|
|
||||||
{{#with low_resolution }}
|
|
||||||
<img src="{{ url }}" alt="Instagram Picture" />
|
|
||||||
{{/with}}
|
|
||||||
{{/with}}
|
|
||||||
</a>
|
|
||||||
<span class="profile-shot-title">
|
|
||||||
{{#if caption}}
|
|
||||||
{{#with caption}}
|
|
||||||
{{ text }}
|
|
||||||
{{/with}}
|
|
||||||
{{else}}
|
|
||||||
Untitled
|
|
||||||
{{/if}}
|
|
||||||
</span>
|
|
||||||
<ul class="profile-shot-stats">
|
|
||||||
{{#with likes}}<li><span class="profile-likes">{{ count }}</span></li>{{/with}}
|
|
||||||
<li class="profile-shot-date">{{ formated_date }}</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
|
|
||||||
@@ -22,6 +22,9 @@
|
|||||||
<li><span><strong>{{ followed_by }}</strong> followers</span></li>
|
<li><span><strong>{{ followed_by }}</strong> followers</span></li>
|
||||||
{{/with}}
|
{{/with}}
|
||||||
</ul>
|
</ul>
|
||||||
|
<div class="profile-info-footer">
|
||||||
|
<a href="{{ url }}" class="btn">Follow on Instagram</a>
|
||||||
|
</div>
|
||||||
{{/with}}
|
{{/with}}
|
||||||
<ul class="profile-shots">
|
<ul class="profile-shots">
|
||||||
{{#each media}}
|
{{#each media}}
|
||||||
@@ -49,10 +52,5 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
{{#if pagination}}
|
|
||||||
{{#with pagination}}
|
|
||||||
<button class="load-more-button" id="load-more-pics" data-control-next="{{ next_max_id }}">Load more...</button>
|
|
||||||
{{/with}}
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<h2><a href="http://twitter.com/#!/{{ screen_name }}">{{ name }}</a></h2>
|
<h2><a href="http://twitter.com/#!/{{ screen_name }}">{{ name }}</a></h2>
|
||||||
<h3><a href="http://twitter.com/#!/{{ screen_name }}">@{{ screen_name}}</a></h3>
|
<h3><a href="http://twitter.com/#!/{{ screen_name }}">@{{ screen_name}}</a></h3>
|
||||||
</div>
|
</div>
|
||||||
<p class="profile-description">{{{ f_description }}}</p>
|
<p class="profile-description">{{{ description }}}</p>
|
||||||
<p class="profile-location-url">
|
<p class="profile-location-url">
|
||||||
{{#if location }}
|
{{#if location }}
|
||||||
<span>{{ location }}</span>
|
<span>{{ location }}</span>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{{/with}}
|
{{/with}}
|
||||||
<p class="tweet-text">
|
<p class="tweet-text">
|
||||||
{{{ f_text }}}
|
{{{ text }}}
|
||||||
</p>
|
</p>
|
||||||
<p class="tweet-date">
|
<p class="tweet-date">
|
||||||
{{ formated_date }}
|
{{ formated_date }}
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
{% block pagetitle %}404 Not Found{% endblock %}
|
|
||||||
{% block main_section %}
|
|
||||||
<section class="main-section">
|
|
||||||
<article>
|
|
||||||
<h2>The page you are looking for was not found.</h2>
|
|
||||||
<p>Please use the links on the left to navigate to your desired destination.</p>
|
|
||||||
</article>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
{% if GOOGLE_ANALYTICS %}
|
{% if GOOGLE_ANALYTICS %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
var _gaq = _gaq || [];
|
||||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
_gaq.push(['_setAccount', '{{GOOGLE_ANALYTICS}}']);
|
||||||
|
_gaq.push(['_trackPageview']);
|
||||||
|
(function() {
|
||||||
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||||
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||||
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||||
|
})();
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript">
|
{% endif %}
|
||||||
try {
|
|
||||||
var pageTracker = _gat._getTracker("{{GOOGLE_ANALYTICS}}");
|
|
||||||
pageTracker._trackPageview();
|
|
||||||
} catch(err) {}</script>
|
|
||||||
{% endif %}
|
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
|
{% import 'translations.html' as translations with context %}
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}{{article.title}} | Samrat Man Singh{% endblock %}
|
|
||||||
|
{% block title %}{{article.title}}{% endblock %}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
{% if GOOGLE_PLUSONE %}
|
||||||
|
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block main_section %}
|
{% block main_section %}
|
||||||
<section class="main-section blog-section" id="blog-posts">
|
<section class="main-section blog-section" id="blog-posts">
|
||||||
<h3 class="date">{{article.locale_date}}</h3>
|
<h3 class="date">{{article.locale_date}}</h3>
|
||||||
@@ -8,15 +17,11 @@
|
|||||||
|
|
||||||
<h2><a href="{{SITEURL}}/{{article.url}}">{{article.title}}</a></h2>
|
<h2><a href="{{SITEURL}}/{{article.url}}">{{article.title}}</a></h2>
|
||||||
{% include "twitter.html" %}
|
{% include "twitter.html" %}
|
||||||
<a href="http://news.ycombinator.com/submit" class="hn-share-button">Vote on HN</a>
|
{% include "google_plusone.html" %}
|
||||||
<!--<script type="text/javascript" src="http://hnapiwrapper.herokuapp.com/static/js/button.js"></script>-->
|
{{ translations.translate(article) }}
|
||||||
{% include "hacker_news.html" %}
|
|
||||||
</hgroup>
|
</hgroup>
|
||||||
{{article.content}}
|
{{article.content}}
|
||||||
|
|
||||||
<p>
|
|
||||||
If you liked this post, you should <a href="http://twitter.com/samratmansingh">follow me on Twitter.</a>
|
|
||||||
</p>
|
|
||||||
<br/>
|
<br/>
|
||||||
<footer>
|
<footer>
|
||||||
{% if article.tags %}
|
{% if article.tags %}
|
||||||
|
|||||||
@@ -1,34 +1,48 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
{% block head %}
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="description" content="Personal website and blog of Samrat Man Singh. Follow him at @samratmansingh" />
|
<meta name="description" content="{{ SITE_DESCRIPTION }}" />
|
||||||
<meta name="keywords" content="Samrat Man Singh, python, flask, computers, technology, nepal" />
|
<meta name="keywords" content="{{ SITE_KEYWORDS }}" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>{% block title %}{{SITENAME}}{% endblock %}</title>
|
<title>{% block title %}{{SITENAME}}{% endblock %}</title>
|
||||||
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{SITEURL}}/{{ MEDIA_URL }}css/styles.min.css" type="text/css" media="screen, projection">
|
{% assets filters="cssmin", output="css/styles.min.css", "css/styles.css", "css/pygments.css" %}
|
||||||
|
<link rel="stylesheet" href="{{ ASSET_URL }}">
|
||||||
|
{% endassets %}
|
||||||
|
|
||||||
|
<link rel="shortcut icon" type="image/png" href="{{ GRAVATAR }}" />
|
||||||
|
{% block head %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
{% endblock %}
|
|
||||||
<body>
|
<body>
|
||||||
<header class="main-header">
|
<header class="main-header">
|
||||||
|
{% include 'github.html' %}
|
||||||
<hgroup>
|
<hgroup>
|
||||||
<div class="picture">
|
<div>
|
||||||
<a href="/" rel="home"></a>
|
<img src="{{ GRAVATAR }}" style="margin-left: 34px; margin-top: 30px;">
|
||||||
</div>
|
</div>
|
||||||
<h1>{{ SITENAME }}</h1>
|
<h1><a href="/" id="home-link">{{ SITENAME }}</a></h1>
|
||||||
<h2>18 year-old from Nepal interested in computers and technology.</h2>
|
<h2>{{ ABOUT }}</h2>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="main-nav">
|
<ul class="main-nav">
|
||||||
<li><a href="/" id="home-link">Home</a></li>
|
{% if DISPLAY_HOME_ON_MENU %}
|
||||||
<li><a href="http://twitter.com/#!/samratmansingh" id="twitter-link">Twitter</a></li>
|
<li><a href="{{ SITEURL }}/">Home</a></li>
|
||||||
<li><a href="http://github.com/samrat" id="github-link">Github</a></li>
|
{% endif %}
|
||||||
<li><a href="http://feeds.feedburner.com/SamratManSingh" id="github-link">Feed</a></li>
|
|
||||||
<li><a href="mailto:samratmansingh@gmail.com?subject=Hello" id="contact-link">Contact</a></li>
|
{% if DISPLAY_PAGES_ON_MENU %}
|
||||||
|
{% for current_page in PAGES %}
|
||||||
|
<li><a href="{{ SITEURL }}/{{ current_page.url }}">{{ current_page.title }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% for title, url in SOCIAL %}
|
||||||
|
<li><a href="{{ url }}" id="{{ title }}-link">{{ title }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<li><a href="{{ SITEURL }}/{{ FEED_RSS }}" id="feed-link">Feed</a></li>
|
||||||
|
<li><a href="mailto:{{ CONTACT }}?subject=Hello" id="contact-link">Contact</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<a href="http://pelican.notmyidea.org" class="fork-me">Powered by Pelican.</a>
|
<a href="http://pelican.notmyidea.org" class="fork-me">Powered by Pelican.</a>
|
||||||
@@ -41,19 +55,49 @@
|
|||||||
<span class="nav-btn-bar"></span>
|
<span class="nav-btn-bar"></span>
|
||||||
<span class="nav-btn-bar"></span>
|
<span class="nav-btn-bar"></span>
|
||||||
</span>
|
</span>
|
||||||
<h3><a href="/">samrat.github.com</a></h3>
|
<h3>
|
||||||
|
<a href="{{ SITEURL }}/" id="mobile-title">{{ SITEURL }}</a>
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
/*<![CDATA[*/
|
|
||||||
var twitter_integration_enabled = {% if TWITTER_INTEGRATION_ENABLED %}true{% else %}false{% endif %},
|
|
||||||
github_integration_enabled = {% if GITHUB_INTEGRATION_ENABLED %}true{% else %}false{% endif %},
|
|
||||||
dribbble_integration_enabled = {% if DRIBBBLE_INTEGRATION_ENABLED %}true{% else %}false{% endif %},
|
|
||||||
instagram_integration_enabled = {% if INSTAGRAM_INTEGRATION_ENABLED %}true{% else %}false{% endif %};
|
|
||||||
/*]]>*/
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="{{ SITEURL }}/{{ MEDIA_URL }}js/min/scripts.min.js"></script>
|
{% assets filters="rjsmin", output="gen/packed.js", "js/libs/jquery-1.7.2.min.js", "js/libs/jquery.url.js", "js/libs/bootstrap-modal.js", "js/libs/handlebars.js", "js/libs/spin.min.js", "js/libs/moment.min.js", "js/common.js", "js/libs/github.js", "js/libs/google+.js", "js/libs/twitter.js", "js/libs/instagram.js" %}
|
||||||
|
<script src="{{ ASSET_URL }}"></script>
|
||||||
|
{% endassets %}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Function to get the Maximam value in Array
|
||||||
|
Array.max = function( array ) {
|
||||||
|
return Math.max.apply( Math, array );
|
||||||
|
};
|
||||||
|
|
||||||
|
var heights = [];
|
||||||
|
heights.push($('.main-header').height());
|
||||||
|
heights.push($('.main-section').height());
|
||||||
|
heights.push($(window).height());
|
||||||
|
|
||||||
|
var max_height = Array.max(heights);
|
||||||
|
$('.main-header').height(max_height+80);
|
||||||
|
|
||||||
|
$('#mobile-title').text(window.location.hostname);
|
||||||
|
|
||||||
|
{% if GITHUB_INTEGRATION_ENABLED %}
|
||||||
|
var github_username = '{{ GITHUB_USERNAME }}';
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if GPLUS_INTEGRATION_ENABLED %}
|
||||||
|
var google_username = '{{ GPLUS_USERNAME }}';
|
||||||
|
var google_accesskey = '{{ GPLUS_API_ACCESS }}';
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if TWITTER_INTEGRATION_ENABLED %}
|
||||||
|
var twitter_username = '{{ TWITTER_USERNAME }}';
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if INSTAGRAM_INTEGRATION_ENABLED %}
|
||||||
|
var instagram_username = '{{ INSTAGRAM_USERNAME }}';
|
||||||
|
var instagram_accesskey = '{{ INSTAGRAM_API_ACCESS }}';
|
||||||
|
{% endif %}
|
||||||
|
</script>
|
||||||
|
|
||||||
{% include "analytics.html" %}
|
{% include "analytics.html" %}
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
5
syte/templates/github.html
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{% if GITHUB_URL %}
|
||||||
|
<a href="{{ GITHUB_URL }}">
|
||||||
|
<img style="position: absolute; top: 0; left: 128px; border: 0; height: 119px;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" />
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
3
syte/templates/google_plusone.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{% if GOOGLE_PLUSONE %}
|
||||||
|
<g:plusone size="medium"></g:plusone>
|
||||||
|
{% endif %}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<script>
|
|
||||||
(function() {
|
|
||||||
var hn = document.createElement('script'); hn.type = 'text/javascript';
|
|
||||||
hn.async = true; hn.src = 'http://hnbutton.appspot.com/static/hn.js';
|
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(hn, s);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<h2><a href="{{article.url}}" title="Permalink to {{article.title}}">{{article.title}}</a></h2>
|
<h2><a href="{{article.url}}" title="Permalink to {{article.title}}">{{article.title}}</a></h2>
|
||||||
|
|
||||||
</hgroup>
|
</hgroup>
|
||||||
{{article.content}}
|
{{article.summary}}
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
{% extends 'base.html' %}
|
|
||||||
{% block pagetitle %}Instagram Auth{% endblock %}
|
|
||||||
{% block main_section %}
|
|
||||||
<section class="main-section">
|
|
||||||
<article>
|
|
||||||
{% if error %}
|
|
||||||
<h2>Unable to get Access Token</h2>
|
|
||||||
<p>{{ error }}</p>
|
|
||||||
{% else %}
|
|
||||||
<h2>Instagram Access Token</h2>
|
|
||||||
<p>Go to your syte_settings.py and enter the token under <code>INSTAGRAM_ACCESS_TOKEN</code> and the user id under <code>INSTAGRAM_USER_ID</code>.</p>
|
|
||||||
<dl>
|
|
||||||
<dt>User Name</dt><dd> {{ user_name }}</dd>
|
|
||||||
<dt>User ID</dt><dd>{{ user_id }}</dd>
|
|
||||||
<dt>Access Token</dt><dd>{{ token }}</dd>
|
|
||||||
</dl>
|
|
||||||
{% endif %}
|
|
||||||
</article>
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
11
syte/templates/page.html
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{% import 'translations.html' as translations with context %}
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block title %}{{ page.title }}{% endblock %}
|
||||||
|
{% block main_section %}
|
||||||
|
<section class="main-section">
|
||||||
|
<h1 class="entry-title">{{ page.title }}</h1>
|
||||||
|
{{ translations.translate(page, 'pages') }}
|
||||||
|
<br /><br />
|
||||||
|
{{ page.content }}
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}Posts tagged '{{tag}}' | Samrat Man Singh {% endblock %}
|
{% block title %}Posts tagged '{{tag}}' | {{ SITENAME }} {% endblock %}
|
||||||
{% block main_section %}
|
{% block main_section %}
|
||||||
<section class="main-section blog-section" id="blog-posts">
|
<section class="main-section blog-section" id="blog-posts">
|
||||||
{% for article in articles[:5] %}
|
{% for article in articles[:5] %}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<h2><a href="{{article.url}}" title="Permalink to {{article.title}}">{{article.title}}</a></h2>
|
<h2><a href="{{article.url}}" title="Permalink to {{article.title}}">{{article.title}}</a></h2>
|
||||||
|
|
||||||
</hgroup>
|
</hgroup>
|
||||||
{{article.content}}
|
{{article.summary}}
|
||||||
</article>
|
</article>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
16
syte/templates/translations.html
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<!-- Takes a content (page, article,...) and translate it if possible-->
|
||||||
|
{% macro translate(content, sub_destination=None) -%}
|
||||||
|
{% if content.translations %}
|
||||||
|
Also available in:
|
||||||
|
{% for translation in content.translations %}
|
||||||
|
{% if sub_destination %}
|
||||||
|
{% if sub_destination.endswith('/') %}
|
||||||
|
sub_destination = sub_destination[:-1]
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{ SITEURL }}/{{ sub_destination }}/{{ translation.url }}">{{ translation.lang }}</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{%- endmacro %}
|
||||||