desecrate the corporate element

master
an 2019-07-29 10:13:58 -04:00
parent c2528d615f
commit cb984ac6ce
77 changed files with 781 additions and 7256 deletions

View File

@ -1,72 +0,0 @@
assets:
@cat media/css/bootstrap.min.css \
media/css/blog-themes/pro-adams/style.css \
media/css/highlightjs-themes/tomorrow.css \
media/css/themes.css \
> media/css/pro.css
@cat media/css/bootstrap.min.css \
media/css/style.css \
media/css/themes.css \
media/css/chosen.css \
media/css/codemirror.css \
media/css/codemirror-themes/ambiance.css \
media/css/codemirror-themes/blackboard.css \
media/css/codemirror-themes/cobalt.css \
media/css/codemirror-themes/eclipse.css \
media/css/codemirror-themes/elegant.css \
media/css/codemirror-themes/erlang-dark.css \
media/css/codemirror-themes/lesser-dark.css \
media/css/codemirror-themes/monokai.css \
media/css/codemirror-themes/neat.css \
media/css/codemirror-themes/night.css \
media/css/codemirror-themes/rubyblue.css \
media/css/codemirror-themes/solarized.css \
media/css/codemirror-themes/twilight.css \
media/css/codemirror-themes/vibrant-ink.css \
media/css/codemirror-themes/xq-dark.css \
media/css/highlightjs-themes/tomorrow.css \
media/css/blog-themes/default/style.css \
> media/css/snipt.css
@cat media/js/src/account.js > media/js/src/account.min.js
@cat media/js/src/snipts.js > media/js/src/snipts.min.js
@cat media/js/src/jobs.js > media/js/src/jobs.min.js
@cat media/js/src/application.js > media/js/src/application.min.js
@cat media/js/src/team.js > media/js/src/team.min.js
@cat media/js/src/modules/site.js > media/js/src/modules/site.min.js
@cat media/js/src/modules/snipt.js > media/js/src/modules/snipt.min.js
@cat media/js/src/pro.js > media/js/src/pro.min.js
@cat media/js/libs/jquery.min.js \
media/js/libs/jquery-ui.min.js \
media/js/libs/angular.min.js \
media/js/libs/angular-route.min.js \
media/js/libs/underscore.js \
media/js/libs/json2.js \
media/js/libs/backbone.js \
media/js/libs/bootstrap.min.js \
media/js/plugins/jquery.hotkeys.js \
media/js/plugins/jquery.infieldlabel.js \
media/js/plugins/jquery.chosen.js \
media/js/src/application.min.js \
media/js/src/modules/site.min.js \
media/js/src/modules/snipt.min.js \
media/js/src/account.min.js \
media/js/src/snipts.min.js \
media/js/src/jobs.min.js \
media/js/src/team.min.js \
media/js/libs/codemirror.js \
media/js/libs/highlight.js \
> media/js/snipt-all.min.js
@cat media/js/libs/highlight.js \
media/js/src/pro.js \
> media/js/pro-all.min.js
deploy:
git push dokku
run:
~/.virtualenvs/snipt/bin/python manage.py runserver
sass:
sass media/css/style.scss > media/css/style.css
.PHONY: deploy run sass

View File

@ -3,9 +3,9 @@ from django.contrib import admin
class UserProfileAdmin(admin.ModelAdmin):
list_display = ("user", "is_pro", "stripe_id", "gittip_username", "teams_beta_seen")
list_display = ("user", "is_pro", "stripe_id", "teams_beta_seen")
list_filter = ["teams_beta_seen", "teams_beta_applied"]
search_fields = ("user__username", "gittip_username")
search_fields = ("user__username")
admin.site.register(UserProfile, UserProfileAdmin)

View File

@ -27,7 +27,6 @@ class Migration(migrations.Migration):
("teams_beta_applied", models.BooleanField(default=False)),
("pro_date", models.DateTimeField(null=True, blank=True)),
("stripe_id", models.CharField(max_length=100, null=True, blank=True)),
("has_gravatar", models.BooleanField(default=False)),
(
"list_view",
models.CharField(
@ -83,38 +82,6 @@ class Migration(migrations.Migration):
],
),
),
(
"gittip_username",
models.CharField(max_length=250, null=True, blank=True),
),
(
"disqus_shortname",
models.CharField(max_length=250, null=True, blank=True),
),
(
"google_analytics_tracking_id",
models.CharField(max_length=250, null=True, blank=True),
),
(
"gauges_site_id",
models.CharField(max_length=250, null=True, blank=True),
),
(
"google_ad_client",
models.CharField(max_length=250, null=True, blank=True),
),
(
"google_ad_slot",
models.CharField(max_length=250, null=True, blank=True),
),
(
"google_ad_width",
models.CharField(max_length=250, null=True, blank=True),
),
(
"google_ad_height",
models.CharField(max_length=250, null=True, blank=True),
),
("user", models.ForeignKey(to=settings.AUTH_USER_MODEL, unique=True)),
],
)

View File

@ -42,7 +42,6 @@ class UserProfile(models.Model):
teams_beta_applied = models.BooleanField(default=False)
pro_date = models.DateTimeField(blank=True, null=True)
stripe_id = models.CharField(max_length=100, null=True, blank=True)
has_gravatar = models.BooleanField(default=False)
list_view = models.CharField(
max_length=1, null=False, blank=False, default="N", choices=LIST_VIEW_CHOICES
)
@ -66,20 +65,6 @@ class UserProfile(models.Model):
choices=EDITOR_THEME_CHOICES,
)
# Services and Analytics
gittip_username = models.CharField(max_length=250, null=True, blank=True)
disqus_shortname = models.CharField(max_length=250, null=True, blank=True)
google_analytics_tracking_id = models.CharField(
max_length=250, null=True, blank=True
)
gauges_site_id = models.CharField(max_length=250, null=True, blank=True)
# Google Ads
google_ad_client = models.CharField(max_length=250, null=True, blank=True)
google_ad_slot = models.CharField(max_length=250, null=True, blank=True)
google_ad_width = models.CharField(max_length=250, null=True, blank=True)
google_ad_height = models.CharField(max_length=250, null=True, blank=True)
def get_blog_posts(self):
return Snipt.objects.filter(user=self.user, blog_post=True, public=True)

View File

@ -5,9 +5,9 @@
"snipt",
"code snippets"
],
"website": "https://snipt.net",
"repository": "https://github.com/nicksergeant/snipt",
"logo": "https://snipt.s3.amazonaws.com/logo.png",
"website": "https://p.greyserv.net",
"repository": "https://github.com/marrub--/snipt",
"logo": "https://p.greyserv.net/media/img/logo.png",
"success_url": "/",
"scripts": {
"postdeploy": "python manage.py migrate"

View File

@ -49,9 +49,6 @@
<li class="prompt">//</li>
<li><a href="/">blog</a></li>
{% block breadcrumb %}{% endblock %}
<li class="rss">
<a href="/?rss">RSS</a>
</li>
</ul>
</div>
</header>
@ -63,20 +60,9 @@
{{ sidebar.stylized|safe }}
</section>
{% endif %}
{% if blog_user.profile.google_ad_client %}
<div class="google-ads">
<script type="text/javascript">
google_ad_client = '{{ blog_user.profile.google_ad_client }}';
google_ad_slot = '{{ blog_user.profile.google_ad_slot }}';
google_ad_width = {{ blog_user.profile.google_ad_width }};
google_ad_height = {{ blog_user.profile.google_ad_height }};
</script>
<script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
{% endif %}
<nav class="footer {% if sidebar %}with-sidebar{% endif %}">
<ul class="powered">
<li class="snipt"><a href="https://snipt.net/blogging/">Blog powered by Snipt</a></li>
<li class="snipt"><a href="/blogging/">Blog powered by Snipt</a></li>
</ul>
</nav>
</aside>

View File

@ -18,22 +18,6 @@
{% with 'true' as detail %}
{% include "blogs/themes/default/snipt-list.html" %}
{% endwith %}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ blog_user.profile.disqus_shortname }}';
{% if debug %}
var disqus_developer = 1;
{% endif %}
var disqus_url = '{{ snipt.get_full_absolute_url }}{% if not snipt.public %}?key={{ snipt.key }}{% endif %}';
var disqus_title = '{{ snipt.title }}';
var disqus_identifier = {{ snipt.id }};
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</section>
{% endblock %}

View File

@ -1,18 +0,0 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="{% if request.blog_user.profile.get_primary_blog_domain and request.blog_user.profile.blog_domain != '' %}http://{{ request.blog_user.profile.blog_domain }}/?rss{% else %}https://{{ request.blog_user.username }}.snipt.net/?rss{% endif %}" rel="self" type="application/rss+xml" />
<description>{% firstof request.blog_user.profile.blog_title request.blog_user.username %}</description>
<title>{% firstof request.blog_user.profile.blog_title request.blog_user.username %}</title>
<link>{% if request.blog_user.profile.get_primary_blog_domain %}http://{{ request.blog_user.profile.blog_domain }}/?rss{% else %}https://{{ request.blog_user.username }}.snipt.net/?rss{% endif %}</link>
{% for snipt in snipts %}
<item>
<title>{{ snipt.title }}</title>
<link>{{ snipt.get_full_absolute_url }}</link>
<description><![CDATA[{{ snipt.stylized|safe }}]]></description>
<tags>{% for tag in snipt.tags.all %}{{ tag }}{% if not forloop.last %}, {% endif %}{% endfor %}</tags>
<pubDate>{{ snipt.created|date:"r" }}</pubDate>
<guid isPermaLink="false">snipt-net-{{ snipt.id }}</guid>
</item>
{% endfor %}
</channel>
</rss>

View File

@ -37,10 +37,6 @@
</style>
{% endif %}
{% if has_snipts and not detail %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ request.path }}?rss{% if not public %}&api_key={{ request.user.api_key.key }}{% endif %}" />
{% endif %}
<!--[if IE]>
<style type="text/css">
.group {
@ -50,12 +46,8 @@
</style>
<![endif]-->
<!--[if lt IE 9]>
<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/jquery.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/jquery-ui.min.js"></script>
</head>
@ -66,9 +58,6 @@
<div class="right-y ruler"></div>
{% block header %}
<header class="main">
<a href="/" class="logo">
<span class="avatar" style="background-image: url('https://secure.gravatar.com/avatar/{{ blog_user.email|md5 }}?s=80');"></span>
</a>
<div class="bio">
<a class="name" href="/">
{% if blog_user.profile.blog_title %}
@ -91,17 +80,6 @@
{% if sidebar %}
{{ sidebar.stylized|safe }}
{% endif %}
{% if blog_user.profile.google_ad_client %}
<div class="google-ads">
<script type="text/javascript">
google_ad_client = '{{ blog_user.profile.google_ad_client }}';
google_ad_slot = '{{ blog_user.profile.google_ad_slot }}';
google_ad_width = {{ blog_user.profile.google_ad_width }};
google_ad_height = {{ blog_user.profile.google_ad_height }};
</script>
<script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
{% endif %}
{% if snipts %}
<section class="module snipts">
<h1>Recent blog posts</h1>

View File

@ -10,16 +10,4 @@
{% include "blogs/themes/pro-adams/snipt-list.html" %}
{% endfor %}
{% paginate %}
<script type="text/javascript">
var disqus_shortname = '{{ blog_user.profile.disqus_shortname }}';
{% if debug %}
var disqus_developer = 1;
{% endif %}
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'https://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
{% endblock %}

View File

@ -34,23 +34,6 @@
{{ snipt.stylized|truncatewords_html:100|safe }}
{% endif %}
{% endif %}
{% if detail %}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ firstof blog_user.profile.disqus_shortname }}';
{% if debug %}
var disqus_developer = 1;
{% endif %}
var disqus_url = '{{ snipt.get_full_absolute_url }}{% if not snipt.public %}?key={{ snipt.key }}{% endif %}';
var disqus_title = '{{ snipt.title }}';
var disqus_identifier = {{ snipt.id }};
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
{% endif %}
</div>
</div>
</article>

View File

@ -52,10 +52,6 @@ def blog_list(request, username_or_custom_slug=None):
"snipts": snipts,
}
if "rss" in request.GET:
context["snipts"] = context["snipts"][:20]
return rss(request, context)
template = THEME_CHOICES[request.blog_user.profile.blog_theme]
template = "{}/list.html".format(template)
@ -126,11 +122,3 @@ def blog_post(request, username_or_custom_slug):
return render(request, template, context)
def rss(request, context):
return render(
request,
"blogs/themes/default/rss.xml",
context,
content_type="application/rss+xml",
)

View File

@ -1 +1,128 @@
body.blog-site article.snipt div.group div.container{width:718px}body.blog-site article.snipt div.group div.container header{min-height:0}body.blog-site article.snipt div.group div.container header h1{margin:11px 15px}body.blog-site article.snipt footer ul.attrs li.tweet{margin-right:30px}body.blog-site section.main div.ruler{z-index:50}body.blog-site section.main aside.main nav.footer{margin-right:0}body.blog-site section.main aside.main nav.footer ul.powered{border-top:1px solid #DDDDDD;padding-top:30px}body.blog-site section.main aside.main nav.footer ul.powered li{background:transparent url("https://snipt.s3.amazonaws.com/img/favicon.png") top left no-repeat}body.blog-site section.main aside.main nav.footer ul.powered li a{border:none;color:#3E6B73;display:inline-block;font-style:italic}body.blog-site section.main aside.main nav.footer ul.powered li a:hover{border-bottom:1px solid #333;color:#333}body.blog-site section.main aside.main nav.footer.with-sidebar{margin-top:30px}body.blog-site section.main aside.main section.sidebar{margin-bottom:30px;margin-left:15px}body.blog-site section.main aside.main section.sidebar p{line-height:16px;margin-bottom:15px}body.blog-site section.main aside.main section.sidebar a:hover{text-decoration:none}body.blog-site header.main{background:transparent url("https://snipt.s3.amazonaws.com/img/blog-header-bg.png") top left repeat;height:auto}body.blog-site header.main div.inner{height:auto}body.blog-site header.main div.inner h1{float:none;position:static}body.blog-site header.main div.inner h1 a{background:none;border-bottom:2px solid transparent;color:#2A535C;font:normal 30px "Helvetica Neue",Helvetica,Arial,"Liberation Sans",FreeSans,sans-serif;height:auto;letter-spacing:-1px;line-height:30px;margin:17px 0 17px 16px;text-decoration:none;text-indent:0;text-shadow:none;width:auto;-webkit-transition:border .08s linear;-moz-transition:border .08s linear;-o-transition:border .08s linear;transition:border .08s linear}body.blog-site header.main div.inner h1 a:hover{border-bottom:2px solid #3A5E67}body.blog-site header.sub div.inner{z-index:51}body.blog-detail section.main div.inner{width:718px}body.blog-detail section.main div.inner section.snipts article.snipt{margin-bottom:0}body.blog-detail section.main div.inner section.snipts article.snipt div.container{width:100%}body.blog-detail section.main div.inner section.snipts article.snipt div.container h1 a{white-space:normal}body.blog-detail section.main div.inner section.snipts article.snipt div.container section.code{height:auto}body.blog-detail section.main div.inner section.snipts article.snipt div.container section.code td.code div.highlight pre{width:683px}body.blog-detail section.main div.inner section.snipts article.snipt footer ul.attrs li.tweet{margin-right:116px}body.blog-detail div#disqus_thread{width:704px}body.blog-detail div#disqus_thread #dsq-content{margin-top:-38px}body.blog-list article.snipt div.container section.code td.code div.highlight pre{width:683px}
body.blog-site article.snipt div.group div.container {
width: 718px
}
body.blog-site article.snipt div.group div.container header {
min-height: 0
}
body.blog-site article.snipt div.group div.container header h1 {
margin: 11px 15px
}
body.blog-site section.main div.ruler {
z-index: 50
}
body.blog-site section.main aside.main nav.footer {
margin-right: 0
}
body.blog-site section.main aside.main nav.footer ul.powered {
border-top: 1px solid #DDDDDD;
padding-top: 30px
}
body.blog-site section.main aside.main nav.footer ul.powered li {
background: transparent url("https://snipt.s3.amazonaws.com/img/favicon.png") top left no-repeat
}
body.blog-site section.main aside.main nav.footer ul.powered li a {
border: none;
color: #3E6B73;
display: inline-block;
font-style: italic
}
body.blog-site section.main aside.main nav.footer ul.powered li a:hover {
border-bottom: 1px solid #333;
color: #333
}
body.blog-site section.main aside.main nav.footer.with-sidebar {
margin-top: 30px
}
body.blog-site section.main aside.main section.sidebar {
margin-bottom: 30px;
margin-left: 15px
}
body.blog-site section.main aside.main section.sidebar p {
line-height: 16px;
margin-bottom: 15px
}
body.blog-site section.main aside.main section.sidebar a:hover {
text-decoration: none
}
body.blog-site header.main {
background: transparent url("https://snipt.s3.amazonaws.com/img/blog-header-bg.png") top left repeat;
height: auto
}
body.blog-site header.main div.inner {
height: auto
}
body.blog-site header.main div.inner h1 {
float: none;
position: static
}
body.blog-site header.main div.inner h1 a {
background: none;
border-bottom: 2px solid transparent;
color: #2A535C;
font: normal 30px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
height: auto;
letter-spacing: -1px;
line-height: 30px;
margin: 17px 0 17px 16px;
text-decoration: none;
text-indent: 0;
text-shadow: none;
width: auto;
-webkit-transition: border .08s linear;
-moz-transition: border .08s linear;
-o-transition: border .08s linear;
transition: border .08s linear
}
body.blog-site header.main div.inner h1 a:hover {
border-bottom: 2px solid #3A5E67
}
body.blog-site header.sub div.inner {
z-index: 51
}
body.blog-detail section.main div.inner {
width: 718px
}
body.blog-detail section.main div.inner section.snipts article.snipt {
margin-bottom: 0
}
body.blog-detail section.main div.inner section.snipts article.snipt div.container {
width: 100%
}
body.blog-detail section.main div.inner section.snipts article.snipt div.container h1 a {
white-space: normal
}
body.blog-detail section.main div.inner section.snipts article.snipt div.container section.code {
height: auto
}
body.blog-detail section.main div.inner section.snipts article.snipt div.container section.code td.code div.highlight pre {
width: 683px
}
body.blog-list article.snipt div.container section.code td.code div.highlight pre {
width: 683px
}

View File

@ -1,185 +0,0 @@
$Helvetica: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
body.blog-site {
article.snipt {
div.group {
div.container {
width: 718px;
header {
min-height: 0;
h1 {
margin: 11px 15px;
}
}
}
}
footer {
ul.attrs {
li.tweet {
margin-right: 30px;
}
}
}
}
section.main {
div.ruler {
z-index: 50;
}
aside.main {
nav.footer {
margin-right: 0;
ul.powered {
border-top: 1px solid #DDDDDD;
padding-top: 30px;
li {
background: transparent url('https://snipt.s3.amazonaws.com/img/favicon.png') top left no-repeat;
a {
border: none;
color: #3E6B73;
display: inline-block;
font-style: italic;
&:hover {
border-bottom: 1px solid #333;
color: #333;
}
}
}
}
&.with-sidebar {
margin-top: 30px;
}
}
section.sidebar {
margin-bottom: 30px;
margin-left: 15px;
p {
line-height: 16px;
margin-bottom: 15px;
}
a {
&:hover {
text-decoration: none;
}
}
}
}
}
header.main {
background: transparent url('https://snipt.s3.amazonaws.com/img/blog-header-bg.png') top left repeat;
height: auto;
div.inner {
height: auto;
h1 {
float: none;
position: static;
a {
background: none;
border-bottom: 2px solid transparent;
color: #2A535C;
font: normal 30px $Helvetica;
height: auto;
letter-spacing: -1px;
line-height: 30px;
margin: 17px 0 17px 16px;
text-decoration: none;
text-indent: 0;
text-shadow: none;
width: auto;
-webkit-transition: border .08s linear;
-moz-transition: border .08s linear;
-o-transition: border .08s linear;
transition: border .08s linear;
&:hover {
border-bottom: 2px solid #3A5E67;
}
}
}
}
}
header.sub {
div.inner {
z-index: 51;
}
}
section.ad {
div.carbonad {
div#azcarbon {
}
}
}
}
body.blog-detail {
section.main {
div.inner {
width: 718px;
section.snipts {
article.snipt {
margin-bottom: 0;
div.container {
width: 100%;
h1 {
a {
white-space: normal;
}
}
section.code {
height: auto;
td.code {
div.highlight {
pre {
width: 683px;
}
}
}
}
}
footer {
ul.attrs {
li.tweet {
margin-right: 116px;
}
}
}
}
}
}
}
div#disqus_thread {
width: 704px;
#dsq-content {
margin-top: -38px;
}
}
}
body.blog-list {
article.snipt {
div.container {
section.code {
td.code {
div.highlight {
pre {
width: 683px;
}
}
}
}
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,564 +0,0 @@
@charset "UTF-8";
// Fonts
$Helvetica: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif;
$Consolas: Consolas, Menlo, "Courier New", monospace;
// Mixins
@mixin border-radius($radius: 5px) {
-webkit-background-clip: padding-box;
-webkit-border-radius: $radius;
-moz-background-clip: padding-box;
-moz-border-radius: $radius;
border-radius: $radius;
background-clip: padding-box;
}
@mixin box-shadow($horizontal: 0px, $vertical: 1px, $blur: 2px, $color: #CCC) {
-webkit-box-shadow: $horizontal $vertical $blur $color;
-moz-box-shadow: $horizontal $vertical $blur $color;
box-shadow: $horizontal $vertical $blur $color;
}
@mixin inset-box-shadow($horizontal: 0px, $vertical: 1px, $blur: 2px, $color: #CCC) {
-webkit-box-shadow: inset $horizontal $vertical $blur $color;
-moz-box-shadow: inset $horizontal $vertical $blur $color;
box-shadow: inset $horizontal $vertical $blur $color;
}
@mixin multi-color-border($top, $sides, $bottom) {
border-top: 1px solid $top;
border-left: 1px solid $sides;
border-right: 1px solid $sides;
border-bottom: 1px solid $bottom;
}
@mixin multi-border-radius($topLeft: 5px, $topRight: 5px, $bottomRight: 5px, $bottomLeft: 5px) {
-webkit-border-top-left-radius: $topLeft;
-webkit-border-top-right-radius: $topRight;
-webkit-border-bottom-right-radius: $bottomRight;
-webkit-border-bottom-left-radius: $bottomLeft;
-moz-border-radius-topleft: $topLeft;
-moz-border-radius-topright: $topRight;
-moz-border-radius-bottomright: $bottomRight;
-moz-border-radius-bottomleft: $bottomLeft;
border-top-left-radius: $topLeft;
border-top-right-radius: $topRight;
border-bottom-right-radius: $bottomRight;
border-bottom-left-radius: $bottomLeft;
}
@mixin vertical-gradient($start: #000, $stop: #FFF) { background: ($start);
background: -webkit-gradient(linear, left top, left bottom, from($start), to($stop));
background: -moz-linear-gradient(center top, $start 0%, $stop 100%);
background: -moz-gradient(center top, $start 0%, $stop 100%);
}
@mixin vertical-gradient-with-image($image, $start: #000, $stop: #FFF) {
background: ($start + $stop) / 2 $image;
background: $image, -webkit-gradient(linear, left top, left bottom, from($start), to($stop));
background: $image, -moz-linear-gradient(center top, $start 0%, $stop 100%);
background: $image, -moz-gradient(center top, $start 0%, $stop 100%);
}
@mixin opacity($op) {
-khtml-opacity: $op;
-moz-opacity: $op;
opacity: $op;
}
// Page
html, body {
background: #FFF;
}
body {
color: #666;
font: normal 14px/16px $Helvetica;
text-rendering: optimizeLegibility;
}
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
// Utils
.group:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.hidden {
display: none;
}
// Global
div.frame {
margin: 0 auto;
position: relative;
width: 980px;
div.ruler {
background: #EAEAEA;
height: 100%;
position: fixed;
top: 0;
width: 1px;
z-index: 49;
}
div.left-y {
margin-left: 40px;
}
div.right-y {
margin-left: 760px;
}
}
header.main {
padding: 20px 0 55px 0;
position: relative;
z-index: 50;
a.logo {
display: inline-block;
span.avatar {
background: white;
display: inline-block;
height: 80px;
width: 80px;
@include border-radius(80px);
-webkit-box-shadow: 0 0 0px 1px white, 0 0 10px 0px rgba(0, 0, 0, .6);
-moz-box-shadow: 0 0 0px 1px white, 0 0 10px 0px rgba(0, 0, 0, .6);
box-shadow: 0 0 0px 1px white, 0 0 10px 0px rgba(0, 0, 0, .6);
-webkit-transition: box-shadow .05s linear;
-moz-transition: box-shadow .05s linear;
-o-transition: box-shadow .05s linear;
transition: box-shadow .05s linear;
}
&:hover {
span.avatar {
-webkit-box-shadow: 0 0 0px 1px white, 0 0 15px 0px rgba(0, 0, 0, 1);
-moz-box-shadow: 0 0 0px 1px white, 0 0 15px 0px rgba(0, 0, 0, 1);
box-shadow: 0 0 0px 1px white, 0 0 15px 0px rgba(0, 0, 0, 1);
}
}
}
div.bio {
display: inline-block;
margin: 9px 0 0 12px;
vertical-align: top;
a.name {
color: #666;
font: 500 18px $Helvetica;
text-decoration: none;
-webkit-transition: color .05s linear;
-moz-transition: color .05s linear;
-o-transition: color .05s linear;
transition: color .05s linear;
&:hover {
color: black;
}
}
p {
color: #B7B7B7;
font: 500 12px $Helvetica;
line-height: 18px;
margin: 0;
max-width: 340px;
a {
color: #B7B7B7;
font-weight: bold;
text-decoration: underline;
-webkit-transition: color .05s linear;
-moz-transition: color .05s linear;
-o-transition: color .05s linear;
transition: color .05s linear;
&:hover {
color: #666;
}
}
&:first-of-type {
margin-top: 1px;
}
}
}
}
section.main {
section.content {
float: left;
width: 760px;
div.gutter {
float: left;
width: 80px;
}
div.content-inner {
float: right;
margin-left: 16px;
margin-right: 55px;
width: 609px;
}
}
aside.main {
float: right;
padding-left: 20px;
width: 220px;
h1, h2 {
color: #666;
font: bold 12px $Helvetica;
margin-bottom: 10px;
&:first-of-type {
margin-top: 3px;
}
}
p {
color: #999;
font: normal 12px $Helvetica;
line-height: 18px;
margin-bottom: 20px;
}
ul {
margin-bottom: 20px;
margin-left: 0;
li {
list-style-type: none;
margin: 0;
a {
color: #999;
display: block;
font: normal 12px $Helvetica;
line-height: 18px;
max-width: 220px;
overflow: hidden;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
&:before {
background: #EEE;
content: "";
display: inline-block;
margin-right: 10px;
height: 9px;
width: 9px;
@include border-radius;
}
&:hover {
color: #666;
&:before {
background: #CCC;
}
}
&.more {
font-size: 10px;
margin-left: 19px;
margin-top: 5px;
&:after {
content: " »";
}
&:before {
display: none;
}
}
}
}
}
}
}
div.pagination {
clear: left;
margin-bottom: 55px;
margin-left: 40px;
text-align: center;
a {
color: #666;
}
}
article {
margin: 40px 0;
div.gutter {
a {
time {
background: #FFF;
border: 1px solid #EAEAEA;
display: block;
height: auto;
margin-top: -14px;
position: relative;
width: auto;
z-index: 51;
@include border-radius(3px);
span {
display: block;
text-align: center;
&.id {
background: #F9F9F9;
border-bottom: 1px solid #EAEAEA;
color: #CCC;
font: normal 11px $Helvetica;
padding: 2px 0;
}
&.mon-day {
color: #999;
font: normal 17px $Helvetica;
letter-spacing: -1px;
padding-top: 10px;
text-transform: uppercase;
}
&.year {
color: #999;
font: normal 12px $Helvetica;
letter-spacing: -1px;
padding-bottom: 10px;
text-transform: uppercase;
}
}
&:after {
background: transparent url('https://snipt.s3.amazonaws.com/img/date-arrow.gif') top left no-repeat;
content: "";
display: block;
height: 11px;
position: absolute;
right: -6px;
top: 22px;
width: 6px;
}
}
&:hover {
text-decoration: none;
}
}
}
h1 {
font-size: 20px;
line-height: normal;
margin-bottom: 20px;
margin-top: 0;
padding-top: 1px;
a {
color: #666;
font: 500 20px $Helvetica;
text-decoration: none;
-webkit-transition: color .05s linear;
-moz-transition: color .05s linear;
-o-transition: color .05s linear;
transition: color .05s linear;
&:hover {
color: #000;
text-decoration: none;
}
}
}
div.post-content {
color: #666;
font: normal 14px/22px $Helvetica;
max-height: 150px;
position: relative;
overflow: hidden;
p {
margin: 20px 0;
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
a {
color: #666;
&:hover {
color: #000;
}
}
li {
line-height: 20px;
margin: 10px 0;
p:first-of-type {
margin-bottom: 0;
}
}
table.highlighttable {
height: 100%;
}
td {
padding: 0;
vertical-align: top;
&.linenos {
display: none;
}
}
div.highlight, div.markdown {
pre {
background: #F7F7F7;
border: 1px solid #EAEAEA;
font: normal 12px/16px $Consolas;
margin: 0;
overflow-x: auto;
padding: 10px;
white-space: pre;
word-wrap: normal;
width: 609px;
@include border-radius(5px);
&::-webkit-scrollbar {
background: #F7F7F7;
height: 16px;
width: 16px;
-webkit-appearance: none;
@include border-radius(5px);
}
&::-webkit-scrollbar-thumb {
border: 4px solid #F7F7F7;
border-radius: 16px;
background-color: #C7C7C7;
}
}
}
div.markdown {
h1, h2, h3, h4, h5, h6 {
border-top: 1px dashed #CCC;
margin-bottom: 20px;
padding-top: 30px;
position: relative;
a {
color: #0088CC;
text-decoration: none;
}
&:before {
background: #0088CC;
border: 4px solid #EAEAEA;
content: "";
display: block;
height: 20px;
left: -70px;
position: absolute;
top: 27px;
width: 20px;
z-index: 51;
@include border-radius(20px);
}
}
h1 {
font-size: 20px;
padding-top: 28px;
}
h2 {
font-size: 18px;
padding-top: 19px;
}
h3 {
font-size: 16px;
padding-top: 20px;
}
h4 {
font-size: 14px;
padding-top: 31px;
}
h5 {
font-size: 14px;
padding-top: 31px;
}
h6 {
font-size: 14px;
padding-top: 31px;
}
p {
strong {
font-weight: bold;
}
}
a {
text-decoration: underline;
}
pre {
margin: 20px 0;
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
ul {
margin-bottom: 20px;
}
img {
border: 1px solid #D7D7D7;
margin-bottom: 10px;
@include border-radius(3px);
@include box-shadow(0, 1px, 10px, #D7D7D7);
}
}
&:after {
bottom: 0;
content: "";
height: 60px;
left: 0;
position: absolute;
width: 100%;
@include vertical-gradient(rgba(255, 255, 255, 0), white);
}
}
&:first-of-type {
margin-top: 0;
}
&.detail {
div.post-content {
overflow: visible;
max-height: none;
&:after {
display: none;
}
}
}
}
div#disqus_thread {
margin-top: 20px;
* {
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
#dsq-content {
#dsq-sort-by {
display: none;
}
.dsq-comment-text {
color: #666;
}
h3 {
display: none;
}
.dsq-textarea-wrapper {
overflow: hidden;
}
}
#dsq-footer {
display: none;
}
button.dsq-button {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
}

View File

@ -401,15 +401,6 @@ header.sub div.inner ul.bcrumb li.normal a {
margin-right: 15px;
padding-left: 15px;
}
header.sub div.inner ul.bcrumb li.rss {
float: right;
}
header.sub div.inner ul.bcrumb li.rss a {
background: transparent url("../img/rss-icon.png") center left no-repeat;
display: inline-block;
margin-right: 15px;
padding-left: 15px;
}
header.sub div.inner ul.bcrumb .prompt {
color: #999999;
font: bold 12px Consolas, Menlo, "Courier New", monospace;
@ -541,26 +532,6 @@ section.main aside.main section.ad.wide-sky {
border-radius: 5px;
background-clip: padding-box;
}
section.main aside.main div.go-pro {
background: #FBFBFB;
border: 1px solid #E8E8E8;
margin: 0 0 30px 15px;
text-align: center;
padding: 18px 0;
text-shadow: 0 1px 0 blue;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-topleft: 0;
-moz-border-radius-topright: 0;
-moz-border-radius-bottomright: 5px;
-moz-border-radius-bottomleft: 5px;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
section.main aside.main section.tags {
margin: 0 0 30px 15px;
}
@ -650,9 +621,6 @@ section.main aside.main nav.footer ul li a.active span {
section.main aside.main nav.footer ul li.api {
padding-top: 1px;
}
section.main aside.main nav.footer ul li.twitter {
background: transparent url("../img/twitter-icon.png") 4px 7px no-repeat;
}
section.main aside.main nav.footer ul li.pro {
background: transparent url("../img/upgrade-icon.png") 2px 7px no-repeat;
}
@ -668,28 +636,6 @@ section.main aside.main nav.footer ul li.blog {
section.main aside.main nav.footer ul li.roadmap {
background: transparent url("../img/roadmap-icon.png") 2px 7px no-repeat;
}
section.main aside.main div.linode {
background: transparent url("../img/linode.png") top left no-repeat;
background-size: 100%;
clear: both;
float: left;
margin-bottom: 30px;
margin-left: 17px;
padding-bottom: 20px;
position: relative;
width: 153px;
}
section.main aside.main div.linode a {
display: block;
height: 68px;
color: #989898;
}
section.main aside.main div.linode a span {
font: bold 11px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
left: 40px;
position: absolute;
top: 0px;
}
section.main aside.main section.tag-detail {
margin: -12px 0 30px 15px;
}
@ -848,10 +794,6 @@ section.code div.markdown pre {
min-height: 0;
margin: 20px 0 !important;
}
section.code div.markdown iframe.twitter-tweet {
margin: 20px 0 !important;
width: 100%;
}
footer.snipt-attrs {
clear: both;
@ -905,28 +847,6 @@ footer.snipt-attrs ul.attrs li.author span.pro a {
footer.snipt-attrs ul.attrs li.author span.pro a:hover {
text-decoration: underline;
}
footer.snipt-attrs ul.attrs li.author span.gittip a {
background: #DFF0D8;
border: 1px solid #CBDDBB;
color: #468847;
font: bold 10px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
margin-left: 5px;
padding: 0 3px;
text-transform: uppercase;
-webkit-background-clip: padding-box;
-webkit-border-radius: 3px;
-moz-background-clip: padding-box;
-moz-border-radius: 3px;
border-radius: 3px;
background-clip: padding-box;
}
footer.snipt-attrs ul.attrs li.author span.gittip a span {
font-family: Consolas, Menlo, "Courier New", monospace;
}
footer.snipt-attrs ul.attrs li.author span.gittip a:hover {
background: #E6F7DF;
text-decoration: none;
}
footer.snipt-attrs ul.attrs li.comments {
background: transparent url("../img/comments-icon.png") 0 2px no-repeat;
}
@ -943,15 +863,6 @@ footer.snipt-attrs ul.attrs li.report-spam {
footer.snipt-attrs ul.attrs li.report-spam a {
color: #eaa4a6;
}
footer.snipt-attrs ul.attrs li.tweet {
background: none;
margin: -1px 0 0 0;
padding: 0;
vertical-align: -6px;
}
footer.snipt-attrs ul.attrs li.tweet a {
color: transparent;
}
article.snipt {
margin: 30px 0;
@ -1443,34 +1354,6 @@ div.modal .modal-header h4 {
margin: 0;
}
div#disqus_thread {
margin-bottom: 0;
margin-left: 15px;
width: 97%;
}
div#disqus_thread #dsq-content {
margin-top: -44px;
}
div#disqus_thread #dsq-content #dsq-global-toolbar {
margin-bottom: 18px;
margin-top: 0;
}
div#disqus_thread #dsq-content #dsq-sort-by {
display: none;
}
div#disqus_thread #dsq-content .dsq-comment-text {
color: #666;
}
div#disqus_thread #dsq-content h3 {
display: none;
}
div#disqus_thread #dsq-content .dsq-textarea-wrapper {
overflow: hidden;
}
div#disqus_thread #dsq-footer {
display: none;
}
div#keyboard-shortcuts table {
margin-bottom: 0;
}
@ -1548,30 +1431,6 @@ div.profile a.pro {
div.profile a.pro:hover {
background: #D8D8D8;
}
div.profile a.gittip {
background: #DFF0D8;
clear: left;
color: #468847;
display: block;
font: bold 11px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
margin: 0 10px 10px 10px;
padding: 4px 0;
text-align: center;
text-transform: uppercase;
-webkit-background-clip: padding-box;
-webkit-border-radius: 3px;
-moz-background-clip: padding-box;
-moz-border-radius: 3px;
border-radius: 3px;
background-clip: padding-box;
-webkit-box-shadow: 0 0 3px #B4C4A6;
-moz-box-shadow: 0 0 3px #B4C4A6;
box-shadow: 0 0 3px #B4C4A6;
}
div.profile a.gittip:hover {
background: #E6F7DF;
text-decoration: none;
}
div.profile.team-settings {
margin-top: -20px;
}
@ -1643,18 +1502,6 @@ div.site-notice a {
text-decoration: underline;
}
a.go-pro {
background: transparent url("../img/showroom-ad.jpg") top left no-repeat;
border: 1px solid #DDDDDD;
border-left: 0;
border-right: 0;
color: #797979;
display: block;
height: 75px;
margin: 30px 0;
width: 749px;
}
div.get-support {
bottom: 20px;
right: 20px;
@ -2088,10 +1935,6 @@ body.snipt-page section.main aside.api-info.immediate-help p {
body.snipt-page section.main aside.main nav.footer {
float: left;
}
body.snipt-page div#disqus_thread {
width: 97%;
}
body.signup form.form-horizontal {
padding: 0;
padding-bottom: 20px;
@ -2184,14 +2027,6 @@ body.static form.form-horizontal fieldset {
body.static form.form-horizontal fieldset legend {
margin: 0;
}
body.static div#disqus_thread {
margin-left: 20px;
width: 96%;
}
body.static div#disqus_thread div#dsq-content {
margin-top: 23px;
}
div.info {
background: #415A63 url("../img/homepage-header-bg.jpg") top center no-repeat;
color: white;
@ -2521,20 +2356,6 @@ body.editing section.main div.inner section.snipts article.editing aside div.edi
body.editing div.rochester-made {
width: 840px;
}
body.editing div.site-notice, body.editing a.go-pro {
margin-right: 100px;
}
body.editing div.showroom-container {
background: transparent url("http://showroom.is/static/img/background.jpg") top left repeat;
border: 1px solid #DDDDDD;
border-left: 0;
margin: 30px 0;
}
body.editing div.showroom-container a.go-pro {
border: 0;
margin: 0 auto;
}
html.homepage {
background: white;
}
@ -2861,11 +2682,6 @@ body.jobs section.jobs ul li a img {
height: 39px;
margin-right: 10px;
}
body.jobs div.job-twitter {
margin-bottom: 15px;
margin-left: 15px;
text-align: center;
}
body.jobs div.post-job {
background: white;
border: 1px solid #DDDDDD;

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -89,14 +89,6 @@ if (typeof angular !== 'undefined') {
'blog_title',
'blog_theme',
'blog_domain',
'gittip_username',
'disqus_shortname',
'google_analytics_tracking_id',
'gauges_site_id',
'google_ad_client',
'google_ad_slot',
'google_ad_width',
'google_ad_height'
];
$scope.section = 'Blogging';

View File

@ -49,162 +49,6 @@ jQuery(function($) {
}
}
app.controller('AppController', function($scope) {
$scope.ads = [
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://showroom.is/?from=snipt',
image: 'https://snipt.s3.amazonaws.com/img/logo-showroom.png',
company: 'Showroom.is',
title: 'New-car research for the modern web.'
},
{
url: 'http://bruce-springsteen-the-e-street-band.gigs.is/?from=snipt',
image: 'http://cdn.chairnerd.com/images/performers-landscape/bruce-springsteen-bf99a8/4275/huge.jpg',
company: 'Gigs.is',
title: 'Bruce Springsteen & The E Street Band on tour.'
},
{
url: 'http://beyonce.gigs.is/?from=snipt',
image: 'http://cdn.chairnerd.com/images/performers-landscape/beyonce-b28ec9/37/huge.jpg',
company: 'Gigs.is',
title: 'Beyonce on tour. View current tour dates on:'
},
{
url: 'http://paul-mccartney.gigs.is/?from=snipt',
image: 'http://cdn.chairnerd.com/images/performers-landscape/paul-mccartney-0ab8df/1408/huge.jpg',
company: 'Gigs.is',
title: 'Paul McCartney on tour. View current tour dates on:'
},
{
url: 'http://rolling-stones.gigs.is/?from=snipt',
image: 'http://cdn.chairnerd.com/images/performers-landscape/rolling-stones-73ab94/2597/huge.jpg',
company: 'Gigs.is',
title: 'Rolling Stones on tour. View current tour dates on:'
},
{
url: 'http://justin-timberlake.gigs.is/?from=snipt',
image: 'http://cdn.chairnerd.com/images/performers-landscape/justin-timberlake-c30b82/1019/huge.jpg',
company: 'Gigs.is',
title: 'Justin Timberlake on tour. View current tour dates on:'
},
{
url: 'http://billy-joel.gigs.is/?from=snipt',
image: 'http://cdn.chairnerd.com/images/performers-landscape/billy-joel-254023/303/huge.jpg',
company: 'Gigs.is',
title: 'Billy Joel on tour. View current tour dates on:'
},
{
url: 'http://taylor-swift.gigs.is/?from=snipt',
image: 'http://cdn.chairnerd.com/images/performers-landscape/taylor-swift-1cdf83/35/huge.jpg',
company: 'Gigs.is',
title: 'Taylor Swift on tour. View current tour dates on:'
},
{
url: 'http://one-direction.gigs.is/?from=snipt',
image: 'http://cdn.chairnerd.com/images/performers-landscape/one-direction-a22937/12586/huge.jpg',
company: 'Gigs.is',
title: 'One Direction on tour. View current tour dates on:'
},
{
url: 'http://george-strait.gigs.is/?from=snipt',
image: 'http://cdn.chairnerd.com/images/performers-landscape/george-strait-92a4b8/780/huge.jpg',
company: 'Gigs.is',
title: 'George Strait on tour. View current tour dates on:'
},
{
url: 'http://pearl-jam.gigs.is/?from=snipt',
image: 'http://cdn.chairnerd.com/images/performers-landscape/pearl-jam-fb4480/1416/huge.jpg',
company: 'Gigs.is',
title: 'Pearl Jam on tour. View current tour dates on:'
}
];
var randomIndex = Math.floor(Math.random() * (($scope.ads.length - 1) - 0 + 1)) + 0;
$scope.randomAd = $scope.ads[randomIndex];
});
app.controller('AppController', function($scope) {});
}).call(this);

View File

@ -22,55 +22,3 @@
</div>
</div>
</div>
<div class="def" data-title="Services">
<div class="control-group" ng-class="{error: errors.disqus_shortname}">
<label class="control-label" for="id_disqus_shortname">Disqus shortname:</label>
<div class="controls">
<input id="id_disqus_shortname" type="text" ng-model="user.disqus_shortname" maxlength="250">
<span class="help-block">If you have your own <a href="http://disqus.com/">Disqus</a> account that you'd like to use for your blog comments, enter your shortname here.</span>
</div>
</div>
</div>
<div class="def" data-title="Analytics">
<div class="control-group" ng-class="{error: errors.google_analytics_tracking_id}">
<label class="control-label" for="id_google_analytics_tracking_id">Google Analytics tracking ID:</label>
<div class="controls">
<input id="id_google_analytics_tracking_id" type="text" ng-model="user.google_analytics_tracking_id" maxlength="250">
<span class="help-block">If you'd like to track visits to your blog site with <a href="http://analytics.google.com">Google Analytics</a>, enter your tracking ID here.</span>
</div>
</div>
<div class="control-group" ng-class="{error: errors.gauges_site_id}">
<label class="control-label" for="id_gauges_site_id">Gauges site ID:</label>
<div class="controls">
<input id="id_gauges_site_id" type="text" ng-model="user.gauges_site_id" maxlength="250">
<span class="help-block">If you'd like to track visits to your blog site with <a href="http://get.gaug.es/">Gauges</a>, enter your site ID here.</span>
</div>
</div>
</div>
<div class="def" data-title="Google AdSense">
<div class="control-group" ng-class="{error: errors.google_ad_client}">
<label class="control-label" for="id_google_ad_client">Google Ads: "google_ad_client"</label>
<div class="controls">
<input id="id_google_ad_client" type="text" ng-model="user.google_ad_client" maxlength="250">
<span class="help-block">If you'd like to run Google Ads in your blog's sidebar, enter your client ID here, as well as the following three fields.</span>
</div>
</div>
<div class="control-group" ng-class="{error: errors.google_ad_slot}">
<label class="control-label" for="id_google_ad_slot">Google Ads: "google_ad_slot"</label>
<div class="controls">
<input id="id_google_ad_slot" type="text" ng-model="user.google_ad_slot" maxlength="250">
</div>
</div>
<div class="control-group" ng-class="{error: errors.google_ad_width}">
<label class="control-label" for="id_google_ad_width">Google Ads: "google_ad_width"</label>
<div class="controls">
<input id="id_google_ad_width" type="text" ng-model="user.google_ad_width" maxlength="250">
</div>
</div>
<div class="control-group" ng-class="{error: errors.google_ad_height}">
<label class="control-label" for="id_google_ad_height">Google Ads: "google_ad_height"</label>
<div class="controls">
<input id="id_google_ad_height" type="text" ng-model="user.google_ad_height" maxlength="250">
</div>
</div>
</div>

View File

@ -100,38 +100,11 @@
$('input#id_username').focus();
}
// Populate any GitTip widgets.
if (window.gittip_username) {
this.$aside_main.html(this.$aside_main.html().replace(
/\[\[.*gittip.*\]\]/,
'<iframe style="border: 0; margin: 0; padding: 0;" src="https://www.gittip.com/' + window.gittip_username + '/widget.html" width="48pt" height="22pt"></iframe>')
);
$('iframe', this.$aside_main).parent('p').prev('p').css('margin-bottom', '10px');
}
// Highlight any Markdown code.
$('div.markdown pre code').each(function(i, e) {
hljs.highlightBlock(e);
});
// Populate any embedded tweets.
var $embeddedTweets = $('div.embedded-tweet');
if ($embeddedTweets.length) {
$.each($embeddedTweets, function() {
var $tweetPlaceholder = $(this);
var tweetID = $tweetPlaceholder.attr('data-tweet-id');
$.ajax({
url: 'https://api.twitter.com/1/statuses/oembed.json?id=' + tweetID + '&align=center',
dataType: 'jsonp',
type: 'get',
success: function(resp) {
$tweetPlaceholder.replaceWith($(resp.html));
}
});
});
}
window.ui_halted = false;
},
events: {

View File

@ -1,198 +0,0 @@
(function(Site) {
var Snipt = snipt.module('snipt');
Backbone.oldSync = Backbone.sync;
Backbone.Model.prototype.idAttribute = 'resource_uri';
var addSlash = function(str) {
return str + ((str.length > 0 && str.charAt(str.length - 1) === '/') ? '' : '/');
};
Backbone.sync = function(method, model, options) {
options.headers = _.extend({
'Authorization': 'ApiKey ' + window.user + ':' + window.api_key
}, options.headers);
return Backbone.oldSync(method, model, options);
};
Backbone.Model.prototype.url = function() {
var url = this.id;
if (!url) {
url = this.urlRoot;
url = url || this.collection && (_.isFunction(this.collection.url) ? this.collection.url() : this.collection.url);
if (url && this.has('id')) {
url = addSlash(url) + this.get('id');
}
}
url = url && addSlash(url);
if (typeof url === 'undefined') {
url = '/api/private/snipt/';
this.unset('id', {'silent': true});
this.unset('user', {'silent': true});
}
return url || null;
};
Site.SiteView = Backbone.View.extend({
el: 'body',
initialize: function(opts) {
this.$body = $(this.el);
this.$html = $('html');
this.$html_body = this.$body.add(this.$html);
this.$aside_main = $('aside.main', this.$body);
this.$aside_nav = $('aside.nav', this.$body);
this.$teams_nav = $('li.teams-nav', this.$body);
this.$add_snipt = $('li.add-snipt', this.$body);
this.$aside_nav_ul = $('ul', this.$aside_nav);
this.$search_form = $('form.search', this.$body);
this.$search_query = $('input#search-query', this.$body);
this.$search_page_query = $('input.search-query', this.$body);
this.$search_queries = this.$search_query.add(this.$search_page_query);
this.$snipts = $('section#snipts article.snipt', this.$body);
this.$modals = $('div.modal', this.$snipts);
this.$main_edit = $('section#main-edit');
this.$main = $('section#main');
this.$keyboard_shortcuts = $('#keyboard-shortcuts', this.$body);
this.keyboardShortcuts();
this.inFieldLabels();
var SniptListView = Snipt.SniptListView;
this.snipt_list = new SniptListView({ 'snipts': this.$snipts });
var that = this;
this.$body.click(function() {
if (!window.ui_halted && !window.from_modal && window.$selected) {
window.$selected.trigger('deselect');
}
if (window.from_modal) {
window.from_modal = false;
}
that.$aside_nav.removeClass('open');
that.$teams_nav.removeClass('open');
that.$add_snipt.removeClass('open');
});
this.$aside_nav_ul.click(function(e) {
e.stopPropagation();
});
$search_queries = this.$search_queries;
$search_queries.focus(function() {
if (window.$selected) {
$selected.trigger('deselect');
}
});
this.$body.on('click', 'a.close', function() {
$(this).parent().parent().modal('hide');
window.ui_halted = false;
return false;
});
this.$keyboard_shortcuts.on('hidden', function() {
window.ui_halted = false;
});
if (this.$body.hasClass('login')) {
$('input#id_username').focus();
}
// Populate any GitTip widgets.
if (window.gittip_username) {
this.$aside_main.html(this.$aside_main.html().replace(
/\[\[.*gittip.*\]\]/,
'<iframe style="border: 0; margin: 0; padding: 0;" src="https://www.gittip.com/' + window.gittip_username + '/widget.html" width="48pt" height="22pt"></iframe>')
);
$('iframe', this.$aside_main).parent('p').prev('p').css('margin-bottom', '10px');
}
// Highlight any Markdown code.
$('div.markdown pre code').each(function(i, e) {
hljs.highlightBlock(e);
});
// Populate any embedded tweets.
var $embeddedTweets = $('div.embedded-tweet');
if ($embeddedTweets.length) {
$.each($embeddedTweets, function() {
var $tweetPlaceholder = $(this);
var tweetID = $tweetPlaceholder.attr('data-tweet-id');
$.ajax({
url: 'https://api.twitter.com/1/statuses/oembed.json?id=' + tweetID + '&align=center',
dataType: 'jsonp',
type: 'get',
success: function(resp) {
$tweetPlaceholder.replaceWith($(resp.html));
}
});
});
}
window.ui_halted = false;
},
events: {
'showKeyboardShortcuts': 'showKeyboardShortcuts',
'click a.mini-profile': 'toggleMiniProfile',
'click a.teams-nav': 'toggleTeamsNav'
},
keyboardShortcuts: function() {
var $body = this.$body;
var that = this;
$search_queries = this.$search_queries;
$search_page_query = this.$search_page_query;
$search_query = this.$search_query;
$document = $(document);
$document.bind('keydown', '/', function(e) {
if (!window.ui_halted) {
e.preventDefault();
if ($body.hasClass('search')) {
$search_page_query.focus();
} else {
$search_query.focus();
}
}
});
$document.bind('keydown', 'Ctrl+h', function(e) {
if (!window.ui_halted) {
window.ui_halted = true;
$body.trigger('showKeyboardShortcuts');
} else {
if (that.$keyboard_shortcuts.is(':visible')) {
that.$keyboard_shortcuts.modal('hide');
}
}
});
this.$search_queries.bind('keydown', 'esc', function(e) {
if (!window.ui_halted) {
e.preventDefault();
this.blur();
}
});
},
showKeyboardShortcuts: function() {
this.$keyboard_shortcuts.modal('toggle');
},
toggleMiniProfile: function(e) {
this.$aside_nav.toggleClass('open');
return false;
},
toggleTeamsNav: function(e) {
this.$teams_nav.toggleClass('open');
return false;
},
inFieldLabels: function () {
$('div.infield label', this.$body).inFieldLabels({
fadeDuration: 200
});
}
});
})(snipt.module('site'));

View File

@ -368,24 +368,6 @@
}
return false;
},
initEmbeddedTweets: function() {
var $embeddedTweets = $('div.embedded-tweet');
if ($embeddedTweets.length) {
$.each($embeddedTweets, function() {
var $tweetPlaceholder = $(this);
var tweetID = $tweetPlaceholder.attr('data-tweet-id');
$.ajax({
url: 'https://api.twitter.com/1/statuses/oembed.json?id=' + tweetID + '&align=center',
dataType: 'jsonp',
type: 'get',
success: function(resp) {
$tweetPlaceholder.replaceWith($(resp.html));
}
});
});
}
},
initLineNumbers: function() {
var lines = $('span.special', this.$el);
var that = this;
@ -446,7 +428,6 @@
this.initLocalVars();
this.initLineNumbers();
this.initEmbeddedTweets();
if (this.model.get('blog_post') === true) {
this.$el.addClass('blog-post');

View File

@ -5,15 +5,6 @@ $(function() {
// Convert "View more" links into nicer links.
$('a:contains("View more")', $aside).addClass('more');
// Populate any GitTip widgets.
if (window.gittip_username) {
$aside.html($aside.html().replace(
/\[\[.*gittip.*\]\]/,
'<iframe style="border: 0; margin: 0; padding: 0;" src="https://www.gittip.com/' + window.gittip_username + '/widget.html" width="48pt" height="22pt"></iframe>')
);
$('iframe', $aside).parent('p').prev('p').css('margin-bottom', '10px');
}
// Highlight any Markdown code.
$('div.markdown pre code').each(function(i, e) {
hljs.highlightBlock(e);

68
resources.sh Normal file
View File

@ -0,0 +1,68 @@
#!/usr/bin/env sh
cat \
media/css/bootstrap.min.css \
media/css/blog-themes/pro-adams/style.css \
media/css/highlightjs-themes/tomorrow.css \
media/css/themes.css \
> media/css/pro.css
cat \
media/css/bootstrap.min.css \
media/css/style.css \
media/css/themes.css \
media/css/chosen.css \
media/css/codemirror.css \
media/css/codemirror-themes/ambiance.css \
media/css/codemirror-themes/blackboard.css \
media/css/codemirror-themes/cobalt.css \
media/css/codemirror-themes/eclipse.css \
media/css/codemirror-themes/elegant.css \
media/css/codemirror-themes/erlang-dark.css \
media/css/codemirror-themes/lesser-dark.css \
media/css/codemirror-themes/monokai.css \
media/css/codemirror-themes/neat.css \
media/css/codemirror-themes/night.css \
media/css/codemirror-themes/rubyblue.css \
media/css/codemirror-themes/solarized.css \
media/css/codemirror-themes/twilight.css \
media/css/codemirror-themes/vibrant-ink.css \
media/css/codemirror-themes/xq-dark.css \
media/css/highlightjs-themes/tomorrow.css \
media/css/blog-themes/default/style.css \
> media/css/snipt.css
cat media/js/src/account.js > media/js/src/account.min.js
cat media/js/src/snipts.js > media/js/src/snipts.min.js
cat media/js/src/jobs.js > media/js/src/jobs.min.js
cat media/js/src/application.js > media/js/src/application.min.js
cat media/js/src/team.js > media/js/src/team.min.js
cat media/js/src/modules/site.js > media/js/src/modules/site.min.js
cat media/js/src/modules/snipt.js > media/js/src/modules/snipt.min.js
cat media/js/src/pro.js > media/js/src/pro.min.js
cat \
media/js/libs/jquery.min.js \
media/js/libs/jquery-ui.min.js \
media/js/libs/angular.min.js \
media/js/libs/angular-route.min.js \
media/js/libs/underscore.js \
media/js/libs/json2.js \
media/js/libs/backbone.js \
media/js/libs/bootstrap.min.js \
media/js/plugins/jquery.hotkeys.js \
media/js/plugins/jquery.infieldlabel.js \
media/js/plugins/jquery.chosen.js \
media/js/src/application.min.js \
media/js/src/modules/site.min.js \
media/js/src/modules/snipt.min.js \
media/js/src/account.min.js \
media/js/src/snipts.min.js \
media/js/src/jobs.min.js \
media/js/src/team.min.js \
media/js/libs/codemirror.min.js \
media/js/libs/highlight.js \
> media/js/snipt-all.min.js
cat \
media/js/libs/highlight.js \
media/js/src/pro.js \
> media/js/pro-all.min.js
## EOF

View File

@ -1,7 +1,7 @@
CSRF_COOKIE_SECURE = False
DEBUG = True
DEBUG = False
POSTMARK_API_KEY = ''
SECRET_KEY = 'changeme'
SECRET_KEY = 'hackme'
SESSION_COOKIE_SECURE = False
STRIPE_SECRET_KEY = ''
USE_HTTPS = False
@ -13,6 +13,6 @@ DATABASES = {
'USER': 'snipt',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': ''
'PORT': '5432'
}
}

View File

@ -29,7 +29,7 @@ def get_snipts(api_key, from_username, url=None, snipts=[]):
class Command(BaseCommand):
help = u"Import snipts from snipt.net."
help = u"Import snipts from another instance of snipt."
def add_arguments(self, parser):
parser.add_argument("api_key", nargs="+", type=str)

View File

@ -124,15 +124,6 @@ class Snipt(models.Model):
),
)
# Tweet embeds
for match in re.findall("\[\[tweet-(\d+)\]\]", self.stylized):
self.stylized = self.stylized.replace(
"[[tweet-{}]]".format(str(match)),
'<div class="embedded-tweet" data-tweet-id="{}"></div>'.format(
str(match)
),
)
# Parse Snipt usernames
for match in re.findall('@(\w+) ', self.stylized):

View File

@ -53,7 +53,6 @@
<footer class="snipt-attrs">
<ul class="attrs">
<li class="author">
<span class="avatar" style="background-image: url('https://secure.gravatar.com/avatar/{{ secure_view.user.email|md5 }}?s=15&amp;d=https://snipt.s3.amazonaws.com/img/author-icon.png');"></span>
<a href="{{ secure_view.user.get_absolute_url }}">{{ secure_view.user.username }} ({{ secure_view.user.email }})</a>
</li>
<li class="created" title="{{ secure_view.created|date:"Y-m-d\TH:i:s" }}">{{ secure_view.created|naturaltime }}</li>
@ -69,7 +68,6 @@
<footer class="snipt-attrs">
<ul class="attrs">
<li class="author">
<span class="avatar" style="background-image: url('https://secure.gravatar.com/avatar/{{ log_entry.user.email|md5 }}?s=15&amp;d=https://snipt.s3.amazonaws.com/img/author-icon.png');"></span>
<a href="{{ log_entry.user.get_absolute_url }}">{{ log_entry.user.username }}</a>
</li>
<li class="created" title="{{ log_entry.created|date:"Y-m-d\TH:i:s" }}">{{ log_entry.created|naturaltime }}</li>

View File

@ -9,9 +9,6 @@
{% if tag %}
<li><span class="prompt">/</span> <a href="/public/tag/{{ tag.slug }}/">{{ tag.name }}</a></li>
{% endif %}
<li class="rss">
<a href="{{ request.path }}?rss">RSS</a>
</li>
{% if has_snipts %}
<li class="compact">
<a ng-click="$root.account.list_view = 'C'" href>Compact</a>

View File

@ -12,9 +12,6 @@
{% if favorites %}
<li><span class="prompt">/</span> <a href="/{{ user.username }}/favorites/">Favorited snipts</a></li>
{% endif %}
<li class="rss">
<a href="{{ request.path }}?rss">RSS</a>
</li>
{% if snipts %}
<li class="compact">
<a ng-click="$root.account.list_view = 'C'" href>Compact</a>

View File

@ -68,7 +68,6 @@
<footer class="snipt-attrs">
<ul class="attrs">
<li class="author">
<span class="avatar" style="background-image: url('https://secure.gravatar.com/avatar/<%= snipt.user.email_md5 %>?s=15&d=https://snipt.s3.amazonaws.com/img/author-icon.png');"></span>
<a href="<%= snipt.user.absolute_url %>">
<%= snipt.user.username %>
</a>

View File

@ -187,7 +187,6 @@
<ul class="attrs">
{% block author %}
<li class="author">
<span class="avatar" style="background-image: url('https://secure.gravatar.com/avatar/{{ snipt.user.email|md5 }}?s=15&amp;d=https://snipt.s3.amazonaws.com/img/author-icon.png');"></span>
<a href="{{ snipt.user.get_absolute_url }}">{{ snipt.user.username }}</a>
{% if snipt.user.profile.is_a_team %}
<span class="pro"><a href="/for-teams/">Team</a></span>
@ -211,11 +210,6 @@
<a target="_blank" href="/report-spam/{{ snipt.id }}/">Report Spam</a>
</li>
{% endif %}
{% if detail and snipt.public %}
<li class="tweet">
<a href="https://twitter.com/share" class="twitter-share-button" data-dnt="true" data-count="none" data-url="{{ snipt.get_full_absolute_url }}" data-text="&ldquo;{{ snipt.title }}&rdquo; on @sniptapp">Tweet</a>
</li>
{% endif %}
</ul>
</footer>
<div class="modal hide copy-modal">

View File

@ -8,17 +8,6 @@ urlpatterns = [
views.redirect_snipt,
name="redirect-snipt",
),
url(r"^(?P<username>[^/]+)/feed/$", views.redirect_user_feed, name="redirect-feed"),
url(
r"^public/tag/(?P<tag_slug>[^/]+)/feed/$",
views.redirect_public_tag_feed,
name="redirect-public-tag-feed",
),
url(
r"^(?P<username>[^/]+)/tag/(?P<tag_slug>[^/]+)/feed/$",
views.redirect_user_tag_feed,
name="redirect-user-tag-feed",
),
url(r"^public/$", views.list_public, name="list-public"),
url(
r"^public/tag/(?P<tag_slug>[^/]+)/$", views.list_public, name="list-public-tag"

View File

@ -128,10 +128,6 @@ def blog_posts(request, username):
"user": user,
}
if "rss" in request.GET:
context["snipts"] = context["snipts"][:20]
return rss(request, context)
return context
@ -165,10 +161,6 @@ def favorites(request, username):
"user": request.user,
}
if "rss" in request.GET:
context["snipts"] = context["snipts"][:20]
return rss(request, context)
return context
@ -188,10 +180,6 @@ def list_public(request, tag_slug=None):
context = {"has_snipts": True, "public": True, "snipts": snipts, "tag": tag}
if "rss" in request.GET:
context["snipts"] = context["snipts"][:20]
return rss(request, context)
return context
@ -252,10 +240,6 @@ def list_user(request, username_or_custom_slug, tag_slug=None):
"users_for_full_page": ["robertbanh"],
}
if "rss" in request.GET:
context["snipts"] = context["snipts"][:20]
return rss(request, context)
return context
@ -286,11 +270,6 @@ def raw(request, snipt_key, lexer=None):
request, "snipts/raw.html", {"snipt": snipt}, content_type=content_type
)
def rss(request, context):
return render(request, "rss.xml", context, content_type="application/rss+xml")
# @never_cache
# def search(
# request,
@ -377,19 +356,6 @@ def redirect_snipt(request, snipt_key, lexer=None):
snipt = get_object_or_404(Snipt, key=snipt_key)
return HttpResponseRedirect(snipt.get_absolute_url())
def redirect_public_tag_feed(request, tag_slug):
return HttpResponseRedirect("/public/tag/{}/?rss".format(tag_slug))
def redirect_user_feed(request, username):
user = get_object_or_404(User, username=username)
return HttpResponseRedirect(user.get_absolute_url() + "?rss")
def redirect_user_tag_feed(request, username, tag_slug):
return HttpResponseRedirect(u"/{}/tag/{}/?rss".format(username, tag_slug))
def report_spam(request, snipt_id):
if not request.user.is_authenticated():
return HttpResponseForbidden()

View File

@ -46,7 +46,6 @@
/>
<ul ng-cloak ng-if="users.length">
<li ng-repeat="user in users" class="user">
<img src="https://secure.gravatar.com/avatar/{[{ user.email_md5 }]}?s=26" />
<a href="/{[{ user.username }]}/"><span>{[{ user.username }]}</span></a>
<a class="btn btn-small" href="/{{ team.slug }}/members/add/{[{ user.username }]}/">Add &raquo;</a>
</li>
@ -57,7 +56,6 @@
<ul class="member-list">
{% for member in team.members.all %}
<li class="user">
<img src="https://secure.gravatar.com/avatar/{{ member.email|md5 }}?s=26" />
<a href="/{{ member.username }}/"><span>{{ member.username }}</span></a>
{% if team.owner == request.user %}
<a class="btn btn-small" href="/{{ team.slug }}/members/remove/{{ member.username }}/">Remove &raquo;</a>

View File

@ -1,3 +1,3 @@
500: Server Error<br />
<br />
We've been notified. Follow http://twitter.com/snipt for updates.
We've been notified. Follow Satan for updates.

View File

@ -1,20 +1 @@
{% if not debug %}
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-514462-44']);
_gaq.push(['_trackPageview']);
{% if blog_user.profile.google_analytics_tracking_id %}
_gaq.push(['b._setAccount', '{{ blog_user.profile.google_analytics_tracking_id }}']);
_gaq.push(['b._trackPageview']);
{% endif %}
(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>
{% endif %}
<!-- Death to advertisers. -->

View File

@ -9,7 +9,6 @@
<title>{% block page-title %}Snipt{% endblock %} - Code snippet app for teams and individuals.</title>
<meta charset="utf-8" />
<meta name="google-site-verification" content="BantFMmY6nSP8wFvb_SDKwYZo08HglaCpNMXQqTyOuk" />
{% block page-description %}
<meta name="description" content="Code snippet app for teams and individuals." />
@ -46,10 +45,6 @@
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/snipt.css?131" />
{% endif %}
{% if has_snipts and not detail %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ request.path }}?rss{% if not public %}&amp;api_key={{ request.user.api_key.key }}{% endif %}" />
{% endif %}
{% block css %}{% endblock %}
<!--[if IE]>
@ -61,10 +56,6 @@
</style>
<![endif]-->
<!--[if lt IE 9]>
<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body class="{% block body-class %}{% endblock %} is-pro" ng-controller="AppController">
@ -138,7 +129,6 @@
{% if request.user.is_authenticated %}
<aside class="nav">
<a href="#" class="mini-profile">
<span class="avatar" style="background-image: url('https://secure.gravatar.com/avatar/{{ request.user.email|md5 }}?s=35');"></span>
<span class="info">
<span class="username">{{ request.user.username }}</span>
<i class="icon-cog icon-white"></i>
@ -374,9 +364,6 @@
<script type="text/javascript" src="{{ STATIC_URL }}js/snipt-all.min.js?79"></script>
{% endif %}
{% if has_snipts and detail %}
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
{% endif %}
{% block snipt-templates %}
<div class="hidden" id="templates">
{% include 'snipts/snipt-js-template.html' %}

View File

@ -26,7 +26,7 @@
<ul>
{% if request.user.is_authenticated %}
<li>
<a href="/{{ request.user.username }}/">My snipts</a>
<a href="/{{ request.user.username }}/">Dashboard</a>
</li>
{% endif %}
<li>
@ -42,8 +42,9 @@
</div>
<div class="row">
<div class="sub span12">
<h2>Code snippets for teams and individuals.</h2>
<h3>Store, share, blog, learn.</h3>
<h2>Code cippets cor ceams cand cindividuals.</h2>
<h3>Store, share, store, share, store, share, store, share,
store, share, store, share,♯#3★★⁂]\\\ LEARN</h3>
</div>
</div>
</div>
@ -54,58 +55,7 @@
<div class="container">
<div class="row">
<div class="span12">
<h4>{{ users_count|intcomma }} coders in over 120 countries have stored {{ snipts_count|intcomma }} snipts, in 145 languages.</h4>
</div>
</div>
</div>
{% if request.user.is_authenticated %}
<a href="/{{ request.user.username }}/" class="button">My snipts</a>
{% else %}
<a href="/signup/" class="button">Sign up</a>
{% endif %}
<div class="faces group">
<div class="inner">
{% for coder in coders %}
<a href="/{{ coder.username }}/" title="{{ coder.username }}">
<img alt="{{ coder.username }}" title="{{ coder.username }}" src="https://secure.gravatar.com/avatar/{{ coder.email_md5 }}?s=50" />
</a>
{% endfor %}
</div>
</div>
</section>
<section class="features">
<div class="container">
<div class="row">
<header class="span4 offset4">
<h1>For teams or individuals</h1>
</header>
</div>
<div class="feature row share">
<div class="inner">
<h2>Team accounts</h2>
<p>
Create a <a href="/for-teams/">Team</a> account and allow your team members to create and
edit private and public code snippets. Search through all your team's snippets, and
view detailed diffs of changes to each snippet.
</p>
</div>
</div>
<div class="feature row blog">
<div class="inner">
<h2>Personal accounts</h2>
<p>
Individuals can post public and <code>private</code> snippets, making them perfect
for storing and organizing code you never want to forget.
</p>
</div>
</div>
<div class="feature row store" style="margin-bottom: 200px;">
<div class="inner">
<h2>Code-focused blogs</h2>
<p>
<a href="/blogging/">A full blog in seconds</a>: mark a snipt as "Blog Post", and it'll
appear on <code>{your-username}.snipt.net</code>. Markdown support built-in. Your domain, or ours.
</p>
<h4>666 coders in over 69 countries have stored {{ snipts_count|intcomma }} snipts, in 420 languages.</h4>
</div>
</div>
</div>

View File

@ -2,9 +2,6 @@
{% if user.profile.is_a_team %}
<div class="profile group">
<a href="/{{ user.username }}/">
<img src="https://secure.gravatar.com/avatar/{{ user.email|md5 }}?s=300" alt="{{ user.username }}" title="{{ user.username }}" />
</a>
<div class="meta">
<div class="username" title="{{ user.username }}">
<a href="">
@ -51,9 +48,6 @@
{% endif %}
{% else %}
<div class="profile group">
<a href="/{{ user.username }}/">
<img src="https://secure.gravatar.com/avatar/{{ user.email|md5 }}?s=300" alt="{{ user.username }}" title="{{ user.username }}" />
</a>
<div class="meta">
<div class="username" title="{{ user.username }}">
<a href="">

View File

@ -1,24 +0,0 @@
{% load truncate_lines %}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="https://snipt.net{{ request.get_full_path }}" rel="self" type="application/rss+xml" />
<description>{% if public and not public_user %}Public snipts{% else %}Snipts by {{ user.username }}{% endif %}{% if tag %} tagged with "{{ tag }}"{% endif %}</description>
<title>/ {% if public and not public_user %}public{% else %}{{ user.username }}{% endif %}{% if tag %} / {{ tag }}{% endif %} - Snipt</title>
<link>https://snipt.net{{ request.path }}</link>
{% for snipt in snipts %}
<item>
<title>{{ snipt.title }}</title>
<link>{{ snipt.get_full_absolute_url }}</link>
{% if snipt.line_count > 300 %}
<description><![CDATA[{{ snipt.code|truncate_lines }}]]></description>
{% else %}
<description><![CDATA[{{ snipt.code }}]]></description>
{% endif %}
<tags>{% for tag in snipt.tags.all %}{{ tag }}{% if not forloop.last %}, {% endif %}{% endfor %}</tags>
<pubDate>{{ snipt.created|date:"r" }}</pubDate>
<guid isPermaLink="false">snipt-net-{{ snipt.id }}</guid>
</item>
{% endfor %}
</channel>
</rss>

View File

@ -17,28 +17,8 @@ def homepage(request):
if request.blog_user:
return blog_list(request)
coders = []
users_with_gravatars = User.objects.filter(
userprofile__in=UserProfile.objects.filter(has_gravatar=True)
).order_by('?')
for user in users_with_gravatars:
public_snipts_count = Snipt.objects.filter(
user=user, public=True).values('pk').count()
if public_snipts_count:
user.email_md5 = hashlib.md5(user.email.lower().encode('utf-8')) \
.hexdigest()
coders.append(user)
if len(coders) == 35:
break
return {
'coders': coders,
'snipts_count': Snipt.objects.all().count(),
'users_count': User.objects.all().count(),
}