diff --git a/blogs/middleware.py b/blogs/middleware.py
index a7068bb..391e823 100644
--- a/blogs/middleware.py
+++ b/blogs/middleware.py
@@ -1,8 +1,33 @@
+from django.shortcuts import get_object_or_404
+from django.contrib.auth.models import User
-class SubdomainMiddleware:
+
+class BlogMiddleware:
def process_request(self, request):
- request.subdomain = None
+ request.blog_user = None
+
host = request.META.get('HTTP_HOST', '')
host_s = host.replace('www.', '').split('.')
- if len(host_s) > 2:
- request.subdomain = ''.join(host_s[:-2])
+
+ if host != 'snipt.net' and host != 'snipt.localhost':
+ # nick.snipt.net or nicksergeant.com or blog.nicksergeant.com
+
+ if len(host_s) > 2:
+ # nick.snipt.net or blog.nicksergeant.com
+
+ if host_s[1] == 'snipt':
+ # nick.snipt.net or nick.snipt.localhost
+
+ blog_user = ''.join(host_s[:-2]).replace('-', '_')
+ request.blog_user = get_object_or_404(User, username__iexact=blog_user)
+ else:
+ # blog.nicksergeant.com
+
+ # Get user for that domain
+ pass
+ else:
+ # nicksergeant.com
+
+ # Get user for that domain
+ pass
+ pass
diff --git a/blogs/templates/blogs/homepage.html b/blogs/templates/blogs/homepage.html
deleted file mode 100644
index 1edb2b1..0000000
--- a/blogs/templates/blogs/homepage.html
+++ /dev/null
@@ -1,38 +0,0 @@
-{% extends "blogs/base.html" %}
-
-{% load compress pagination_tags %}
-
-{% block js %}
- {{ block.super }}
- window.detail = false;
-{% endblock %}
-
-{% block body-class %}{{ block.super }} blog-homepage{% endblock %}
-
-{% block css %}
- {% compress css %}
-
-
- {% endcompress %}
-{% endblock %}
-
-{% block main %}
-
-
- {% if homepage.lexer == 'markdown' %}
-
- {{ homepage.stylized|safe }}
-
- {% else %}
- {{ homepage.stylized|safe }}
- {% endif %}
-
-{% endblock %}
diff --git a/blogs/templates/blogs/base.html b/blogs/templates/blogs/themes/default/base.html
similarity index 69%
rename from blogs/templates/blogs/base.html
rename to blogs/templates/blogs/themes/default/base.html
index 2db681b..ab2953c 100644
--- a/blogs/templates/blogs/base.html
+++ b/blogs/templates/blogs/themes/default/base.html
@@ -14,7 +14,7 @@
{% block css %}
{% compress css %}
-
+
{% endcompress %}
@@ -26,5 +26,20 @@
{% block sub-header %}{% endblock %}
{% block rochester-made %}{% endblock %}
{% block aside %}{% endblock %}
-{% block header %}{% endblock %}
{% block keyboard-shortcuts %}{% endblock %}
+{% block header %}{% endblock %}
+
+{% block main %}
+
+
+ {% block content %}{% endblock %}
+
+{% endblock %}
diff --git a/blogs/templates/blogs/themes/default/homepage.html b/blogs/templates/blogs/themes/default/homepage.html
new file mode 100644
index 0000000..27bd4d8
--- /dev/null
+++ b/blogs/templates/blogs/themes/default/homepage.html
@@ -0,0 +1,20 @@
+{% extends "blogs/themes/default/base.html" %}
+
+{% load compress pagination_tags %}
+
+{% block js %}
+ {{ block.super }}
+ window.detail = false;
+{% endblock %}
+
+{% block body-class %}{{ block.super }} blog-homepage{% endblock %}
+
+{% block content %}
+ {% if homepage.lexer == 'markdown' %}
+
{% autopaginate snipts 10 %}
{% for snipt in snipts %}
- {% include "blogs/snipt-list.html" %}
+ {% include "blogs/themes/default/snipt-list.html" %}
{% empty %}
{{ user.username }} has no public blog posts.
diff --git a/blogs/templates/blogs/snipt-list.html b/blogs/templates/blogs/themes/default/snipt-list.html
similarity index 100%
rename from blogs/templates/blogs/snipt-list.html
rename to blogs/templates/blogs/themes/default/snipt-list.html
diff --git a/blogs/urls.py b/blogs/urls.py
new file mode 100644
index 0000000..de88a75
--- /dev/null
+++ b/blogs/urls.py
@@ -0,0 +1,6 @@
+from django.conf.urls.defaults import *
+
+urlpatterns = patterns('',
+ url(r'^$', views.blog_homepage, name='blog-homepage'),
+ url(r'^blog/$', views.blog, name='blog'),
+)
diff --git a/blogs/views.py b/blogs/views.py
index 68e5755..9c58d90 100644
--- a/blogs/views.py
+++ b/blogs/views.py
@@ -1,29 +1,33 @@
-from django.shortcuts import get_object_or_404, render_to_response
-from django.contrib.auth.models import User
+from django.shortcuts import render_to_response
from django.template import RequestContext
from annoying.decorators import render_to
from snipts.models import Snipt
-@render_to('blogs/homepage.html')
-def blog_homepage(request, user, homepage):
+@render_to('blogs/themes/default/homepage.html')
+def blog_homepage(request):
+
+ try:
+ homepage = Snipt.objects.get(user=request.blog_user, title__iexact='Homepage', blog_post=True, public=True)
+ except Snipt.DoesNotExist:
+ return blog_list(request)
context = {
'homepage': homepage,
- 'user': user,
+ 'blog_user': request.blog_user,
}
return context
-@render_to('blogs/list.html')
-def blog_list(request, user):
+@render_to('blogs/themes/default/list.html')
+def blog_list(request):
- snipts = Snipt.objects.filter(user=user, blog_post=True, public=True).order_by('-created').exclude(title__iexact='Homepage')
+ snipts = Snipt.objects.filter(user=request.blog_user, blog_post=True, public=True).order_by('-created').exclude(title__iexact='Homepage')
context = {
'snipts': snipts,
- 'user': user,
+ 'blog_user': request.blog_user,
}
if 'rss' in request.GET:
diff --git a/media/css/blog-themes/default/style.scss b/media/css/blog-themes/default/style.scss
new file mode 100644
index 0000000..a4c10ce
--- /dev/null
+++ b/media/css/blog-themes/default/style.scss
@@ -0,0 +1,145 @@
+body.blog-site {
+ margin: 0;
+
+ section.frame {
+ margin: 0 auto;
+ padding-top: 50px;
+ width: 500px;
+ }
+ h1.blog-title {
+ font-size: 34px;
+ margin-bottom: 50px;
+ margin-top: 0;
+
+ a {
+ color: #0094AF;
+ font-weight: normal;
+ text-decoration: none;
+ }
+ }
+ header.main {
+ background: none;
+ border-bottom: 0;
+ height: auto;
+ margin: 0 auto;
+ width: 940px;
+
+ h1 {
+ margin: 0;
+ padding: 29px 0 0 15px;
+ }
+ }
+}
+// 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 + $stop) / 2;
+ 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%);
+}
+
+// Page
+html, body {
+ background: #F5F2F3 url('/static/images/bg.gif') top left repeat;
+}
+body {
+ color: #666;
+ font: normal 14px/16px $Helvetica;
+ text-rendering: optimizeLegibility;
+
+ li {
+ line-height: normal;
+ }
+}
+
+// Utils
+.group:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+.hidden {
+ display: none;
+}
+
+body {
+ color: #B3B3B3;
+ font: normal 17px/24px $Helvetica;
+
+ h1.blog-title {
+ line-height: 24px;
+ }
+}
+body.blog-homepage {
+ padding-bottom: 39px;
+
+ p {
+ font: normal 17px/24px $Helvetica;
+ margin: 17px 0;
+ }
+ li {
+ line-height: 24px;
+ margin: 5px 15px;
+ }
+ img {
+ display: block;
+ margin: 53px auto 0 auto;
+ }
+ a {
+ color: #898989;
+
+ &:hover {
+ color: #292929;
+ text-decoration: none;
+ }
+ }
+}
diff --git a/media/css/style.css b/media/css/style.css
index 7db53fe..f905276 100644
--- a/media/css/style.css
+++ b/media/css/style.css
@@ -1,1268 +1,3 @@
-html, body {
- background: #f5f2f3 url("/static/images/bg.gif") top left repeat;
-}
-
-body {
- color: #666;
- font: normal 14px/16px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- text-rendering: optimizeLegibility;
-}
-body li {
- line-height: normal;
-}
-
-.group:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
-
-.hidden {
- display: none;
-}
-
-header.main {
- background: #12343d url("/static/images/header-bg.gif") top left repeat-x;
- border-bottom: 1px solid #DDDDDD;
- height: 66px;
- position: relative;
- z-index: 50;
-}
-header.main div.inner {
- border-left: 1px solid rgba(229, 229, 229, 0.25);
- height: 65px;
- margin: 0 auto;
- position: relative;
- width: 939px;
-}
-header.main div.inner div.shadey {
- background: transparent url("/static/images/header-inner-bg.png") top left no-repeat;
- height: 65px;
- left: -157px;
- position: absolute;
- top: 0;
- width: 432px;
- z-index: 49;
-}
-header.main div.inner h1 {
- float: left;
- position: relative;
- z-index: 50;
-}
-header.main div.inner h1 a {
- background: transparent url("/static/images/logo.png") top left no-repeat;
- display: block;
- float: left;
- height: 35px;
- margin: 16px 0 0 16px;
- text-indent: -1000em;
- width: 87px;
-}
-header.main div.inner h1 a:focus {
- outline: none;
-}
-header.main div.inner form.search {
- float: left;
- padding: 17px 0 0 20px;
- position: relative;
- z-index: 50;
-}
-header.main div.inner form.search input {
- background: #17484f url("/static/images/search-icon.png") top left no-repeat;
- background: rgba(43, 82, 93, 0.5) url("/static/images/search-icon.png") 8px center no-repeat;
- border: 1px solid #3A5E67;
- color: #FFF;
- font: normal 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- height: auto;
- margin: 0;
- padding: 7px 7px 7px 28px;
- width: 154px;
- -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: inset 0 1px 0px #1d4249;
- -moz-box-shadow: inset 0 1px 0px #1d4249;
- box-shadow: inset 0 1px 0px #1d4249;
-}
-header.main div.inner form.search input:focus {
- border-color: #62D5E1;
-}
-header.main div.inner form.search input::-webkit-input-placeholder {
- color: #72979C;
-}
-header.main div.inner form.search input:-moz-placeholder {
- color: #72979C;
-}
-header.main div.inner nav.public {
- float: left;
-}
-header.main div.inner nav.public ul {
- margin: 0;
- padding: 17px 0 0 20px;
-}
-header.main div.inner nav.public ul li {
- display: block;
- float: left;
-}
-header.main div.inner nav.public ul li a {
- border-bottom: 2px solid transparent;
- color: #FFF;
- display: block;
- float: left;
- font: 500 14px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- padding: 7px;
- padding-bottom: 4px;
- margin-right: 16px;
- text-decoration: none;
- -webkit-transition: border .08s linear;
- -moz-transition: border .08s linear;
- -o-transition: border .08s linear;
- transition: border .08s linear;
-}
-header.main div.inner nav.public ul li a:hover {
- border-bottom: 2px solid #3A5E67;
-}
-header.main div.inner nav.public ul li a.active {
- border-bottom: 2px solid #85D2DD;
-}
-header.main div.inner nav.public ul li button#add-snipt {
- margin-top: -3px;
- padding: 9px 12px;
-}
-header.main div.inner nav.public ul li button#add-snipt i {
- margin-left: 5px;
-}
-header.main div.inner aside.nav {
- border-left: 1px solid rgba(229, 229, 229, 0.25);
- float: right;
- height: 65px;
- margin: 0;
- width: 189px;
-}
-header.main div.inner aside.nav ul {
- margin: 0;
-}
-header.main div.inner aside.nav ul li {
- list-style-type: none;
-}
-
-header.sub {
- background: #7f7f7f;
- background: -webkit-gradient(linear, left top, left bottom, from(#ececec), to(#dbdbdb));
- background: -moz-linear-gradient(center top, #ececec 0%, #dbdbdb 100%);
- background: -moz-gradient(center top, #ececec 0%, #dbdbdb 100%);
-}
-header.sub div.inner {
- border-left: 1px solid #d0d0d0;
- margin: 0 auto;
- position: relative;
- width: 939px;
- z-index: 49;
-}
-header.sub div.inner ul.bcrumb {
- border-right: 1px solid #d0d0d0;
- float: left;
- margin: 0;
- padding-left: 16px;
- width: 733px;
-}
-header.sub div.inner ul.bcrumb li {
- display: inline-block;
- line-height: normal;
- max-width: 490px;
- overflow: hidden;
- padding: 2px 0 4px 0;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-header.sub div.inner ul.bcrumb li a {
- color: #999999;
- font: bold 12px Consolas, Menlo, "Courier New", monospace;
- text-decoration: none;
- text-shadow: 0 1px 0 #FFF;
-}
-header.sub div.inner ul.bcrumb li a:hover {
- text-decoration: underline;
-}
-header.sub div.inner ul.bcrumb li.rss {
- float: right;
-}
-header.sub div.inner ul.bcrumb li.rss a {
- background: transparent url("/static/images/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;
- margin-right: 3px;
- text-shadow: 0 1px 0 #FFF;
-}
-header.sub div.inner ul.bcrumb span.prompt {
- margin-left: 3px;
-}
-header.sub div.inner div.shortcuts {
- color: #999999;
- float: right;
- font: bold 12px Consolas, Menlo, "Courier New", monospace;
- padding-top: 4px;
- text-shadow: 0 1px 0 #FFF;
-}
-
-section.main {
- height: 100%;
- margin: 0 auto;
- position: relative;
- width: 940px;
-}
-section.main div.ruler {
- background: #DDDDDD;
- height: 100%;
- position: fixed;
- top: 0;
- width: 1px;
- z-index: 48;
-}
-section.main div.left-y {
- margin-left: 0;
-}
-section.main div.right-y {
- margin-left: 750px;
-}
-section.main div.inner {
- float: left;
- margin-left: 1px;
- width: 749px;
-}
-section.main aside.main {
- float: right;
- padding-top: 30px;
- width: 190px;
-}
-section.main aside.main section.ad {
- height: 209px;
- margin-bottom: 28px;
-}
-section.main aside.main section.ad div.asset {
- background: #FFF;
- border: 1px solid #DDDDDD;
- margin: 0 15px 6px;
- padding: 15px 14px;
- width: 130px;
- -webkit-background-clip: padding-box;
- -webkit-border-radius: 4px;
- -moz-background-clip: padding-box;
- -moz-border-radius: 4px;
- border-radius: 4px;
- background-clip: padding-box;
-}
-section.main aside.main section.ad div.asset a {
- color: #939393;
- display: block;
- font: normal 11px/12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- text-decoration: none;
-}
-section.main aside.main section.ad div.asset a img {
- display: block;
- margin-bottom: 10px;
-}
-section.main aside.main section.ad div.asset a:hover {
- color: #666;
- text-decoration: none;
-}
-section.main aside.main section.ad div.meta {
- color: #939393;
- font: normal 11px/12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin: 0 15px;
- text-align: center;
- text-transform: uppercase;
-}
-section.main aside.main section.ad div.meta a {
- color: #CCC;
- text-decoration: none;
-}
-section.main aside.main section.ad div.meta a:hover {
- text-decoration: underline;
-}
-section.main aside.main section.ad.coffee {
- margin-bottom: 27px;
-}
-section.main aside.main section.ad.coffee p {
- display: block !important;
- height: auto !important;
- margin: 7px 0 0 0;
-}
-section.main aside.main section.ad.coffee > div {
- height: auto !important;
- margin-bottom: 0 !important;
-}
-section.main aside.main section.ad.coffee > div div:nth-child(1) {
- margin-bottom: 6px !important;
-}
-section.main aside.main section.ad.coffee > div div:nth-child(2) {
- font: normal 11px/12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- height: 12px;
- margin: 0 !important;
-}
-section.main aside.main section.tags {
- margin: 0 0 45px 15px;
-}
-section.main aside.main section.tags h1 {
- background: transparent url("/static/images/tags-icon.png") 0 0 no-repeat;
- color: #3BAAF3;
- font: bold 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- padding-bottom: 5px;
- padding-left: 22px;
-}
-section.main aside.main section.tags ul {
- margin: 0 0 15px 0;
-}
-section.main aside.main section.tags ul li {
- list-style-type: none;
- margin: 6px 0 6px 22px;
-}
-section.main aside.main section.tags a {
- border-bottom: 1px solid #5AB6F4;
- color: #5AB6F4;
- font: normal 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- text-decoration: none;
-}
-section.main aside.main section.tags a:hover {
- border-bottom: 1px solid #2B6E9B;
- color: #2B6E9B;
-}
-section.main aside.main section.tags a.view-all {
- font-weight: bold;
- margin: 0 0 0 22px;
-}
-section.main aside.main section.tags a.active {
- border-bottom: 1px solid #2B6E9B;
- color: #2B6E9B;
-}
-section.main aside.main nav.footer {
- margin: 0 15px 32px;
-}
-section.main aside.main nav.footer ul {
- margin: 0;
-}
-section.main aside.main nav.footer ul li {
- background: transparent url("/static/images/api-icon.png") center left no-repeat;
- list-style-type: none;
- margin: 6px 0 6px 0;
- padding-left: 22px;
-}
-section.main aside.main nav.footer ul li a {
- border-bottom: 1px solid #999;
- color: #999;
- font: bold 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- text-decoration: none;
-}
-section.main aside.main nav.footer ul li a:hover {
- border-bottom: 1px solid #333;
- color: #333;
-}
-section.main aside.main nav.footer ul li a.active {
- border-bottom: 1px solid #333;
- color: #333;
-}
-section.main aside.main nav.footer ul li.twitter {
- background: transparent url("/static/images/twitter-icon.png") 4px center no-repeat;
-}
-section.main aside.main nav.footer ul li.pro {
- background: transparent url("/static/images/upgrade-icon.png") 2px center no-repeat;
-}
-section.main aside.main nav.footer ul li.groups {
- background: transparent url("/static/images/groups-icon.png") 2px center no-repeat;
-}
-section.main aside.main nav.footer ul li:first-of-type {
- margin-top: 0;
-}
-section.main aside.main nav.footer ul li.blog {
- background: transparent url("/static/images/blog-icon.png") 3px center no-repeat;
-}
-section.main aside.main nav.footer ul li.roadmap {
- background: transparent url("/static/images/roadmap-icon.png") 2px center no-repeat;
-}
-section.main div.rochester-made {
- margin: 50px 0 30px 0;
- text-align: center;
-}
-
-section.main-edit div.inner {
- float: none;
- width: 100%;
-}
-
-article.snipt {
- margin: 30px 0;
- position: relative;
-}
-article.snipt div.number {
- color: #CCC;
- font: normal 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- left: -115px;
- position: absolute;
- text-align: right;
- top: 4px;
- width: 100px;
-}
-article.snipt div.container {
- background: #FFF;
- border: 1px solid #DDD;
- border-left: 0;
- float: left;
- position: relative;
- width: 618px;
-}
-article.snipt div.container div.ruler {
- background: #DDD;
- height: 1px;
- left: -3000px;
- position: absolute;
- top: auto;
- width: 3000px;
-}
-article.snipt div.container div.top-x {
- top: -1px;
-}
-article.snipt div.container div.bottom-x {
- bottom: -1px;
-}
-article.snipt div.container header {
- border-bottom: 1px solid #F1F1EE;
- min-height: 58px;
- -webkit-box-shadow: inset 0 -1px 0 white;
- -moz-box-shadow: inset 0 -1px 0 white;
- box-shadow: inset 0 -1px 0 white;
- background: #7f7f7f;
- background: -webkit-gradient(linear, left top, left bottom, from(white), to(#fffaf2));
- background: -moz-linear-gradient(center top, white 0%, #fffaf2 100%);
- background: -moz-gradient(center top, white 0%, #fffaf2 100%);
-}
-article.snipt div.container header h1 {
- clear: left;
- font: bold 16px/20px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin: 8px 15px 10px 15px;
-}
-article.snipt div.container header h1 a {
- color: #666;
- display: block;
- overflow: hidden;
- text-overflow: ellipsis;
- text-decoration: none;
- white-space: nowrap;
- -webkit-transition: color .08s linear;
- -moz-transition: color .08s linear;
- -o-transition: color .08s linear;
- transition: color .08s linear;
-}
-article.snipt div.container header h1 a:hover {
- color: #3BAAF3;
-}
-article.snipt div.container header h2 {
- border: 1px solid #E9E9E9;
- border-top: 0;
- color: #73BBC5;
- display: inline-block;
- font: normal 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin-left: 15px;
- padding: 3px 8px 2px 8px;
-}
-article.snipt div.container section.code {
- height: 200px;
- overflow: hidden;
- position: relative;
- z-index: 51;
-}
-article.snipt div.container section.code div.highlight pre {
- background: transparent;
- border: none;
- font: normal 12px/16px Consolas, Menlo, "Courier New", monospace;
- font-weight: normal !important;
- overflow-x: auto;
- margin: 0 15px;
- min-height: 173px;
- padding: 13px 0;
-}
-article.snipt div.container section.code div.markdown pre {
- min-height: 0;
- margin: 20px 0 !important;
-}
-article.snipt div.container section.code a.expand {
- background: white url("/static/images/expand.png") 15px 18px no-repeat;
- border-top: 1px solid #F1F1EE;
- bottom: 0;
- color: #999999;
- display: block;
- font: bold 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- padding: 15px 40px 15px 40px;
- position: absolute;
- text-decoration: none;
- text-transform: uppercase;
- width: 100%;
- -webkit-box-shadow: 0 -25px 25px white;
- -moz-box-shadow: 0 -25px 25px white;
- box-shadow: 0 -25px 25px white;
-}
-article.snipt div.container section.code a.expand span.collapse {
- display: none;
-}
-article.snipt div.container section.code a.expand span.lines {
- font: normal 10px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin-left: 5px;
- vertical-align: 1px;
-}
-article.snipt div.container section.code a.expand:hover {
- color: #3BAAF3;
- font-weight: bold;
-}
-article.snipt div.container section.code a.expand:focus {
- outline: none;
-}
-article.snipt div.container section.code textarea.raw {
- display: none;
-}
-article.snipt div.container section.code div.markdown {
- margin: 0 15px;
- min-height: 173px;
- padding: 13px 0 4px 0;
-}
-article.snipt div.container section.emacs a.expand, article.snipt div.container section.default a.expand {
- -webkit-box-shadow: 0 -25px 25px #f8f8f8;
- -moz-box-shadow: 0 -25px 25px #f8f8f8;
- box-shadow: 0 -25px 25px #f8f8f8;
-}
-article.snipt div.container section.friendly a.expand {
- -webkit-box-shadow: 0 -25px 25px #f0f0f0;
- -moz-box-shadow: 0 -25px 25px #f0f0f0;
- box-shadow: 0 -25px 25px #f0f0f0;
-}
-article.snipt div.container section.fruity a.expand {
- -webkit-box-shadow: 0 -25px 25px #111111;
- -moz-box-shadow: 0 -25px 25px #111111;
- box-shadow: 0 -25px 25px #111111;
-}
-article.snipt div.container section.manni a.expand {
- -webkit-box-shadow: 0 -25px 25px #f0f3f3;
- -moz-box-shadow: 0 -25px 25px #f0f3f3;
- box-shadow: 0 -25px 25px #f0f3f3;
-}
-article.snipt div.container section.monokai a.expand {
- -webkit-box-shadow: 0 -25px 25px #272822;
- -moz-box-shadow: 0 -25px 25px #272822;
- box-shadow: 0 -25px 25px #272822;
-}
-article.snipt div.container section.native a.expand {
- -webkit-box-shadow: 0 -25px 25px #202020;
- -moz-box-shadow: 0 -25px 25px #202020;
- box-shadow: 0 -25px 25px #202020;
-}
-article.snipt div.container section.perldoc a.expand {
- -webkit-box-shadow: 0 -25px 25px #eeeedd;
- -moz-box-shadow: 0 -25px 25px #eeeedd;
- box-shadow: 0 -25px 25px #eeeedd;
-}
-article.snipt div.container section.tango a.expand {
- -webkit-box-shadow: 0 -25px 25px #f8f8f8;
- -moz-box-shadow: 0 -25px 25px #f8f8f8;
- box-shadow: 0 -25px 25px #f8f8f8;
-}
-article.snipt div.container:after {
- background: transparent url("/static/images/snipt-drop-shadow.png") top left no-repeat;
- bottom: -15px;
- content: "";
- display: block;
- height: 15px;
- position: absolute;
- right: 0px;
- width: 318px;
- z-index: 51;
-}
-article.snipt div.container div.markdown h1, article.snipt div.container div.markdown h2, article.snipt div.container div.markdown h3, article.snipt div.container div.markdown h4, article.snipt div.container div.markdown h5, article.snipt div.container div.markdown h6 {
- margin-bottom: 9px;
-}
-article.snipt div.container div.markdown li {
- font-size: 13px;
- margin: 9px 0;
-}
-article.snipt aside {
- float: right;
- margin: 23px 30px 0 0;
- width: 100px;
-}
-article.snipt aside ul.options {
- margin: 0;
-}
-article.snipt aside ul.options li {
- list-style-type: none;
- margin: 2px 0;
-}
-article.snipt aside ul.options li a {
- background: rgba(128, 128, 128, 0.15) url("/static/images/edit-icon.png") 14px center no-repeat;
- color: #000;
- display: block;
- font: bold 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- opacity: .5;
- padding: 7px 10px 7px 35px;
- position: relative;
- text-decoration: none;
-}
-article.snipt aside ul.options li a:hover, article.snipt aside ul.options li a.hover {
- background-color: rgba(128, 128, 128, 0.18);
- opacity: 1;
- text-decoration: none;
-}
-article.snipt aside ul.options li a.edit:after {
- background: #F5F2F3;
- content: "";
- height: 20px;
- position: absolute;
- right: 5px;
- top: -3px;
- width: 3px;
- -webkit-transform: rotate(-45deg);
- -moz-transform: rotate(-45deg);
-}
-article.snipt aside ul.options li a.embed {
- background-image: url("/static/images/embed-icon.png");
-}
-article.snipt aside ul.options li a.copy {
- background-image: url("/static/images/copy-icon.png");
-}
-article.snipt aside ul.options li a.favorite {
- background-image: url("/static/images/favorite-icon.png");
-}
-article.snipt aside section.tags {
- padding-top: 15px;
-}
-article.snipt aside section.tags h2 {
- background: transparent url("/static/images/snipt-tags-icon.png") 15px center no-repeat;
- color: #999999;
- font: bold 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- padding: 7px 0 7px 35px;
-}
-article.snipt aside section.tags ul {
- margin: 0;
-}
-article.snipt aside section.tags ul li {
- list-style-type: none;
- margin: 5px 10px 5px 35px;
-}
-article.snipt aside section.tags ul li a {
- border-bottom: 1px solid #999;
- color: #999;
- display: inline-block;
- font: normal 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- max-width: 72px;
- overflow: hidden;
- text-overflow: ellipsis;
- text-decoration: none;
- white-space: nowrap;
-}
-article.snipt aside section.tags ul li a:hover {
- border-color: #000;
- color: #000;
-}
-article.snipt aside section.tags ul.expanded li {
- display: block;
-}
-article.snipt footer {
- clear: both;
- padding-bottom: 20px;
-}
-article.snipt footer ul.attrs {
- margin: 15px 0 0 15px;
-}
-article.snipt footer ul.attrs li {
- background: transparent url("/static/images/calendar-icon.png") top left no-repeat;
- color: #999;
- display: inline;
- font: normal 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin-right: 15px;
- padding: 1px 0 0 24px;
-}
-article.snipt footer ul.attrs li a {
- color: #999;
- font: normal 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- text-decoration: none;
-}
-article.snipt footer ul.attrs li a:hover {
- text-decoration: underline;
-}
-article.snipt footer ul.attrs li.author {
- background-image: none;
- padding-left: 0;
-}
-article.snipt footer ul.attrs li.author span {
- background-color: transparent;
- background-position: top left;
- background-repeat: no-repeat;
- display: inline-block;
- height: 15px;
- margin-right: 7px;
- vertical-align: -3px;
- width: 15px;
- -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;
-}
-article.snipt footer ul.attrs li.comments {
- background: transparent url("/static/images/comments-icon.png") 0 2px no-repeat;
-}
-article.snipt div.expanded section.code {
- height: auto;
-}
-article.snipt div.expanded section.code div.highlight pre {
- padding-bottom: 60px;
-}
-article.snipt div.expanded section.code div.markdown {
- padding-bottom: 52px;
-}
-article.snipt div.expanded section.code a.expand {
- background-image: url("/static/images/collapse.png");
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-article.snipt div.expanded section.code a.expand span.expand {
- display: none;
-}
-article.snipt div.expanded section.code a.expand span.collapse {
- display: inline;
-}
-article.snipt div.expanded section.code a.expand span.lines {
- display: none;
-}
-article.snipt div.modal textarea {
- font: normal 12px/16px Consolas, Menlo, "Courier New", monospace;
- height: 200px;
- margin: 0;
- width: 520px;
-}
-article.snipt.selected div.container {
- -webkit-box-shadow: 0 0 20px #85D2DD;
- -moz-box-shadow: 0 0 20px #85D2DD;
- box-shadow: 0 0 20px #85D2DD;
-}
-article.snipt.selected div.container:after {
- display: none;
-}
-article.snipt.favorited div.container header {
- background: #7f7f7f url("/static/images/favorited-icon.png") top right no-repeat;
- background: url("/static/images/favorited-icon.png") top right no-repeat, -webkit-gradient(linear, left top, left bottom, from(white), to(#fffaf2));
- background: url("/static/images/favorited-icon.png") top right no-repeat, -moz-linear-gradient(center top, white 0%, #fffaf2 100%);
- background: url("/static/images/favorited-icon.png") top right no-repeat, -moz-gradient(center top, white 0%, #fffaf2 100%);
-}
-article.snipt.favorited div.container header h1 a {
- padding-right: 25px;
-}
-article.snipt.blog-post div.container header {
- background: #7f7f7f;
- background: -webkit-gradient(linear, left top, left bottom, from(white), to(#f0f4fc));
- background: -moz-linear-gradient(center top, white 0%, #f0f4fc 100%);
- background: -moz-gradient(center top, white 0%, #f0f4fc 100%);
- -webkit-box-shadow: inset 0 -1px 0 #e3e9f5;
- -moz-box-shadow: inset 0 -1px 0 #e3e9f5;
- box-shadow: inset 0 -1px 0 #e3e9f5;
-}
-
-article.private-snipt div.container header {
- background: #7f7f7f url("/static/images/private-icon.png") top right no-repeat;
- background: url("/static/images/private-icon.png") top right no-repeat, -webkit-gradient(linear, left top, left bottom, from(white), to(#fffaf2));
- background: url("/static/images/private-icon.png") top right no-repeat, -moz-linear-gradient(center top, white 0%, #fffaf2 100%);
- background: url("/static/images/private-icon.png") top right no-repeat, -moz-gradient(center top, white 0%, #fffaf2 100%);
-}
-article.private-snipt div.container header h1 a {
- padding-right: 25px;
-}
-article.private-snipt.blog-post div.container header {
- background: #7f7f7f url("/static/images/private-icon.png") top right no-repeat;
- background: url("/static/images/private-icon.png") top right no-repeat, -webkit-gradient(linear, left top, left bottom, from(white), to(#f0f4fc));
- background: url("/static/images/private-icon.png") top right no-repeat, -moz-linear-gradient(center top, white 0%, #f0f4fc 100%);
- background: url("/static/images/private-icon.png") top right no-repeat, -moz-gradient(center top, white 0%, #f0f4fc 100%);
-}
-article.private-snipt.blog-post div.container header h1 a {
- padding-right: 25px;
-}
-
-div.pagination {
- margin: 0 15px 35px 15px;
- text-align: center;
-}
-div.pagination ul {
- background: #FFF;
-}
-div.pagination ul li a {
- color: #3BAAF3;
-}
-div.pagination ul li.next a {
- line-height: 33px;
- padding-bottom: 1px;
-}
-div.pagination ul li.prev a {
- line-height: 33px;
- padding-bottom: 1px;
-}
-
-div.modal .modal-header .close {
- line-height: 20px;
- margin-top: 0;
-}
-div.modal .modal-header h3 {
- line-height: 0;
-}
-div.modal .modal-header h3 span {
- display: inline-block;
- line-height: 27px;
- max-width: 400px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-div.modal .modal-header h4 {
- color: #AAA;
- margin-top: 1px;
-}
-
-div#disqus_thread {
- margin-bottom: 0;
- margin-left: 15px;
- width: 825px;
-}
-div#disqus_thread #dsq-content {
- margin-top: -38px;
-}
-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.modal div.modal-body {
- max-height: 514px;
-}
-
-div#keyboard-shortcuts {
- height: 95%;
- margin-top: 0;
- top: 20px;
-}
-div#keyboard-shortcuts table {
- margin-bottom: 0;
-}
-div#keyboard-shortcuts div.modal-body {
- max-height: inherit;
-}
-
-div.profile {
- background: rgba(128, 128, 128, 0.08);
- margin: 0 0 30px 15px;
- padding: 10px;
- -webkit-background-clip: padding-box;
- -webkit-border-radius: 8px;
- -moz-background-clip: padding-box;
- -moz-border-radius: 8px;
- border-radius: 8px;
- background-clip: padding-box;
-}
-div.profile span.avatar {
- background-color: transparent;
- background-position: top left;
- background-repeat: no-repeat;
- display: block;
- float: left;
- height: 50px;
- width: 50px;
- -webkit-background-clip: padding-box;
- -webkit-border-radius: 5px;
- -moz-background-clip: padding-box;
- -moz-border-radius: 5px;
- border-radius: 5px;
- background-clip: padding-box;
-}
-div.profile div.meta {
- display: block;
- float: left;
- font: bold 14px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin: 0 0 0 10px;
-}
-div.profile div.meta div.username {
- max-width: 95px;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-div.profile div.meta div.member-since {
- color: #909090;
- font: bold 10px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin-top: 6px;
- text-transform: uppercase;
-}
-
-div.empty-snipts {
- background: rgba(128, 128, 128, 0.08);
- font: bold 18px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin: 30px 15px 0 15px;
- padding: 10px;
- text-align: center;
- text-shadow: 0 1px 1px #FFF;
- -webkit-background-clip: padding-box;
- -webkit-border-radius: 8px;
- -moz-background-clip: padding-box;
- -moz-border-radius: 8px;
- border-radius: 8px;
- background-clip: padding-box;
-}
-
-body.detail div.right-y {
- display: none;
-}
-body.detail section.main div.inner {
- width: 100%;
-}
-body.detail section.main div.inner section.snipts article.snipt {
- margin-bottom: 0;
-}
-body.detail section.main div.inner section.snipts article.snipt div.container {
- width: 839px;
-}
-body.detail section.main div.inner section.snipts article.snipt div.container header h1 a {
- white-space: normal;
-}
-body.detail section.main div.inner section.snipts article.snipt div.container section.code {
- height: auto;
-}
-body.detail section.main div.inner section.snipts article.snipt aside {
- margin-right: 0;
-}
-body.detail div.rochester-made {
- width: 840px;
-}
-
-body.static .static-box {
- background: rgba(255, 255, 255, 0.65);
- border: 1px solid #DDDDDD;
- margin: 30px;
- padding: 20px;
- -webkit-background-clip: padding-box;
- -webkit-border-radius: 4px;
- -moz-background-clip: padding-box;
- -moz-border-radius: 4px;
- border-radius: 4px;
- background-clip: padding-box;
-}
-body.static .static-box div.form-actions {
- margin-bottom: 0;
- padding-bottom: 0;
- background: #7f7f7f;
- background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#fbfbfb));
- background: -moz-linear-gradient(center top, #f5f5f5 0%, #fbfbfb 100%);
- background: -moz-gradient(center top, #f5f5f5 0%, #fbfbfb 100%);
-}
-body.static .static-box div.form-actions a.pull-right {
- margin-left: 5px;
-}
-body.static .static-box div.alert ul {
- margin: 0;
-}
-body.static .static-box div.alert ul li {
- list-style-type: none;
-}
-body.static .static-box div.alert-info a {
- color: #3A87AD;
- text-decoration: underline;
-}
-body.static .static-box ul {
- margin-bottom: 15px;
- margin-top: 15px;
-}
-body.static .static-box ul li {
- font-size: 13px;
- line-height: 18px;
- margin: 5px 0;
-}
-body.static .static-box h3 {
- margin-bottom: 20px;
-}
-body.static .static-box p {
- margin: 15px 0;
-}
-body.static aside.main {
- padding-top: 20px;
-}
-body.static aside.main nav.footer {
- margin-top: 10px;
-}
-body.static div.alert-alone {
- margin: 0;
-}
-body.static form.form-horizontal legend + .control-group {
- margin-top: 0;
-}
-body.static form.form-horizontal div.form-actions {
- margin-top: 27px;
-}
-body.static form.form-horizontal fieldset {
- padding-top: 27px;
-}
-body.static form.form-horizontal fieldset legend {
- margin: 0;
-}
-body.static div#disqus_thread {
- margin-left: 20px;
- width: 709px;
-}
-body.static div#disqus_thread div#dsq-content {
- margin-top: 23px;
-}
-
-body.editing header.main, body.editing header.sub {
- display: none;
-}
-body.editing header.fixed-save {
- background: white url("/static/images/header-fixed-save.gif") top left repeat;
- border-bottom: 1px solid #DDDDDD;
- height: 40px;
- left: 0;
- position: fixed;
- top: 0;
- width: 100%;
- z-index: 49;
-}
-body.editing header.fixed-save div.inner {
- float: none;
- margin: 0 auto;
- padding-top: 6px;
- width: 940px;
-}
-body.editing header.fixed-save div.inner .cancel, body.editing header.fixed-save div.inner .save, body.editing header.fixed-save div.inner .save-and-close {
- float: right;
- margin-left: 10px;
-}
-body.editing header.fixed-save div.inner .save-and-close {
- margin-right: 242px;
-}
-body.editing section.main div.inner section.snipts article.editing {
- margin-top: 50px;
-}
-body.editing section.main div.inner section.snipts article.editing div.container {
- width: 696px;
-}
-body.editing section.main div.inner section.snipts article.editing div.container section.code {
- padding: 13px 11px;
-}
-body.editing section.main div.inner section.snipts article.editing div.container section.code div#editor {
- border: none;
- font: normal 12px/16px Consolas, Menlo, "Courier New", monospace;
- font-weight: normal !important;
- margin: 0;
- position: relative;
-}
-body.editing section.main div.inner section.snipts article.editing div.container section.code div#editor .ace_print_margin {
- display: none;
-}
-body.editing section.main div.inner section.snipts article.editing div.container header h1 {
- margin-left: 9px;
- margin-top: 5px;
- margin-bottom: 6px;
-}
-body.editing section.main div.inner section.snipts article.editing div.container header h1 input {
- color: #666;
- font: bold 16px/20px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin: 0;
- width: 811px;
- width: 668px;
-}
-body.editing section.main div.inner section.snipts article.editing div.container header h2 {
- border: none;
-}
-body.editing section.main div.inner section.snipts article.editing aside {
- margin-top: 0;
- width: 243px;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in {
- padding-left: 10px;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in label {
- margin: 20px 0;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in label > span {
- color: #32A8F6;
- display: block;
- font: bold 12px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin-bottom: 5px;
- text-transform: uppercase;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in > label {
- margin-top: 6px;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in textarea {
- height: 100px;
- padding: 7px 9px;
- width: 202px;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in label.public, body.editing section.main div.inner section.snipts article.editing aside div.in label.blog-post {
- background: #EFEEEF;
- border: 1px solid #DDDDDD;
- cursor: pointer;
- margin-right: 11px;
- padding: 3px 5px;
- -webkit-background-clip: padding-box;
- -webkit-border-radius: 5px;
- -moz-background-clip: padding-box;
- -moz-border-radius: 5px;
- border-radius: 5px;
- background-clip: padding-box;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in label.public input, body.editing section.main div.inner section.snipts article.editing aside div.in label.blog-post input {
- display: inline-block;
- margin: 4px 4px 0 4px;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in label.public input:focus, body.editing section.main div.inner section.snipts article.editing aside div.in label.blog-post input:focus {
- outline: none;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in label.public span, body.editing section.main div.inner section.snipts article.editing aside div.in label.blog-post span {
- color: #7B7B79;
- display: inline-block;
- text-transform: none;
- vertical-align: -3px;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in label.public.is-private, body.editing section.main div.inner section.snipts article.editing aside div.in label.blog-post.is-private {
- background: #efeeef url("/static/images/private-icon-edit.png") 199px center no-repeat;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in label.public.is-public, body.editing section.main div.inner section.snipts article.editing aside div.in label.blog-post.is-public {
- background: #F2DEDE;
- border: 1px solid #EED3D7;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in label.public.is-public span, body.editing section.main div.inner section.snipts article.editing aside div.in label.blog-post.is-public span {
- color: #B94A48;
-}
-body.editing section.main div.inner section.snipts article.editing aside div.in label.public.is-blog-post, body.editing section.main div.inner section.snipts article.editing aside div.in label.blog-post.is-blog-post {
- background: #DAE3EE;
- border: 1px solid #C8D1DE;
-}
-
-body.error section.main div.inner {
- color: #CCC;
- font: bold 50px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- padding: 63px 0;
- text-align: center;
- text-transform: uppercase;
-}
-body.error div.rochester-made {
- margin-top: 54px;
-}
-
-body.search div.empty-snipts {
- margin-top: 20px;
-}
-body.search div.static-box {
- border-left: 0;
- margin-left: 0;
- margin-right: 30px;
- -webkit-border-top-left-radius: 0px;
- -webkit-border-top-right-radius: 4px;
- -webkit-border-bottom-right-radius: 4px;
- -webkit-border-bottom-left-radius: 0px;
- -moz-border-radius-topleft: 0px;
- -moz-border-radius-topright: 4px;
- -moz-border-radius-bottomright: 4px;
- -moz-border-radius-bottomleft: 0px;
- border-top-left-radius: 0px;
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
- border-bottom-left-radius: 0px;
-}
-body.search div.static-box form {
- margin-bottom: 0;
-}
-body.search div.static-box form input.search-query {
- width: 569px;
-}
-body.search div.static-box form button {
- padding: 4px 16px 4px;
-}
-
-body.api section.main div.inner section.snipts article.snipt div.container header h1 a {
- white-space: normal;
-}
-body.api section.main div.inner section.snipts article.snipt div.container section.code {
- height: auto;
-}
-body.api section.main aside.api-info {
- float: right;
- margin-top: 26px;
- width: 190px;
-}
-body.api section.main aside.api-info div.api-inner {
- background: rgba(153, 208, 218, 0.3);
- font: normal 11px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
- margin: 0 0 30px 15px;
- padding: 10px;
- -webkit-background-clip: padding-box;
- -webkit-border-radius: 8px;
- -moz-background-clip: padding-box;
- -moz-border-radius: 8px;
- border-radius: 8px;
- background-clip: padding-box;
-}
-body.api section.main aside.api-info div.api-inner h5 {
- margin-bottom: 5px;
-}
-body.api section.main aside.api-info div.api-inner ul {
- margin: 0;
-}
-body.api section.main aside.api-info div.api-inner ul li {
- margin: 2px 0;
- list-style-type: none;
-}
-body.api section.main aside.api-info div.api-inner ul li input {
- margin-bottom: 0;
- margin-top: 5px;
- width: 145px;
-}
-body.api section.main aside.api-info.api-creds div.api-inner {
- margin-bottom: 0;
-}
-body.api section.main aside.api-info.immediate-help {
- margin-top: 20px;
-}
-body.api section.main aside.api-info.immediate-help p {
- margin: 0;
-}
-body.api section.main aside.main nav.footer {
- margin-bottom: 0;
-}
-body.api div#disqus_thread {
- width: 719px;
-}
-
-body.blog article.snipt section.code {
- height: auto;
-}
-
body.blog-site {
margin: 0;
}
@@ -1293,17 +28,49 @@ body.blog-site header.main h1 {
padding: 29px 0 0 15px;
}
-body.blog-homepage {
+html, body {
+ background: #f5f2f3 url("/static/images/bg.gif") top left repeat;
+}
+
+body {
+ color: #666;
+ font: normal 14px/16px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
+ text-rendering: optimizeLegibility;
+}
+body li {
+ line-height: normal;
+}
+
+.group:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+
+.hidden {
+ display: none;
+}
+
+body {
color: #B3B3B3;
font: normal 17px/24px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
}
+body h1.blog-title {
+ line-height: 24px;
+}
+
+body.blog-homepage {
+ padding-bottom: 39px;
+}
+body.blog-homepage p {
+ font: normal 17px/24px "Helvetica Neue", Helvetica, Arial, "Liberation Sans", FreeSans, sans-serif;
+ margin: 17px 0;
+}
body.blog-homepage li {
line-height: 24px;
- margin: 5px 0;
-}
-body.blog-homepage p:last-of-type {
- margin: 0;
- padding-bottom: 56px;
+ margin: 5px 15px;
}
body.blog-homepage img {
display: block;
@@ -1314,4 +81,5 @@ body.blog-homepage a {
}
body.blog-homepage a:hover {
color: #292929;
+ text-decoration: none;
}
diff --git a/media/css/style.scss b/media/css/style.scss
index 9e8b806..ad542dd 100644
--- a/media/css/style.scss
+++ b/media/css/style.scss
@@ -1429,61 +1429,3 @@ body.blog {
}
}
}
-
-// Blogs
-body.blog-site {
- margin: 0;
-
- section.frame {
- margin: 0 auto;
- padding-top: 50px;
- width: 500px;
- }
- h1.blog-title {
- font-size: 34px;
- margin-bottom: 50px;
- margin-top: 0;
-
- a {
- color: #0094AF;
- font-weight: normal;
- text-decoration: none;
- }
- }
- header.main {
- background: none;
- border-bottom: 0;
- height: auto;
- margin: 0 auto;
- width: 940px;
-
- h1 {
- margin: 0;
- padding: 29px 0 0 15px;
- }
- }
-}
-body.blog-homepage {
- color: #B3B3B3;
- font: normal 17px/24px $Helvetica;
-
- li {
- line-height: 24px;
- margin: 5px 0;
- }
- p:last-of-type {
- margin: 0;
- padding-bottom: 56px;
- }
- img {
- display: block;
- margin: 53px auto 0 auto;
- }
- a {
- color: #898989;
-
- &:hover {
- color: #292929;
- }
- }
-}
diff --git a/settings.py b/settings.py
index 8f50651..aa6cb0a 100644
--- a/settings.py
+++ b/settings.py
@@ -117,7 +117,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'pagination.middleware.PaginationMiddleware',
- 'blogs.middleware.SubdomainMiddleware',
+ 'blogs.middleware.BlogMiddleware',
)
ROOT_URLCONF = 'snipt.urls'
diff --git a/snipts/urls.py b/snipts/urls.py
index 946427b..d2e1f9f 100644
--- a/snipts/urls.py
+++ b/snipts/urls.py
@@ -6,7 +6,6 @@ from snipts import views
urlpatterns = patterns('',
url(r'^$', views.home, name='home'),
url(r'^public/$', views.list_public, name='list-public'),
- url(r'^blog/$', views.blog, name='blog'),
url(r'^public/tag/(?P[^/]+)/$', views.list_public, name='list-public-tag'),
url(r'^embed/(?P[^/]+)/$', views.embed, name='embed'),
url(r'^raw/(?P[^/]+)/$', views.raw, name='raw'),
diff --git a/snipts/views.py b/snipts/views.py
index 56f56f0..3462002 100644
--- a/snipts/views.py
+++ b/snipts/views.py
@@ -20,29 +20,14 @@ RESULTS_PER_PAGE = getattr(settings, 'HAYSTACK_SEARCH_RESULTS_PER_PAGE', 20)
def home(request):
- if request.subdomain:
- subdomain = request.subdomain.replace('-', '_')
- user = get_object_or_404(User, username__iexact=subdomain)
-
- try:
- homepage = Snipt.objects.get(user=user, title__iexact='Homepage', blog_post=True, public=True)
- return blog_homepage(request, user, homepage)
- except Snipt.DoesNotExist:
- return blog_list(request, user)
+ if request.blog_user:
+ return blog_homepage(request)
if request.user.is_authenticated():
return HttpResponseRedirect('/%s/' % request.user.username)
else:
return list_public(request)
-def blog(request):
- if request.subdomain:
- subdomain = request.subdomain.replace('-', '_')
- user = get_object_or_404(User, username__iexact=subdomain)
- return blog_list(request, user)
- else:
- return list_user(request, 'blog')
-
@render_to('snipts/detail.html')
def detail(request, username, snipt_slug):