diff --git a/blogs/templates/blogs/themes/default/base.html b/blogs/templates/blogs/themes/default/base.html index 6470a29..039e24c 100644 --- a/blogs/templates/blogs/themes/default/base.html +++ b/blogs/templates/blogs/themes/default/base.html @@ -1,7 +1,5 @@ {% extends "base.html" %} -{% load compress %} - {% block meta %} {% if 'page' in request.get_full_path %} @@ -11,21 +9,11 @@ {% block body-class %}blog-site{% endblock %} {% block html-class %}blog-site{% endblock %} -{% block css %} - {% compress css %} - - - - - - {% endcompress %} -{% endblock %} - {% block page-title %} {% if blog_user.username == 'nick' %} Nick Sergeant {% else %} - {{ blog_user.username }}'s blog - Powered by Snipt.net + {{ blog_user.username }}'s blog {% endif %} {% endblock %} @@ -38,13 +26,20 @@ {% endif %} diff --git a/blogs/templates/blogs/themes/default/post.html b/blogs/templates/blogs/themes/default/post.html index 970cdd8..1ceec97 100644 --- a/blogs/templates/blogs/themes/default/post.html +++ b/blogs/templates/blogs/themes/default/post.html @@ -1,7 +1,7 @@ {% extends "blogs/themes/default/base.html" %} -{% block html-class %}detail{% endblock %} -{% block body-class %}detail{% endblock %} +{% block html-class %}detail blog-site{% endblock %} +{% block body-class %}detail blog-site{% endblock %} {% block js %} {{ block.super }} diff --git a/media/css/blog-themes/default/style.css b/media/css/blog-themes/default/style.css new file mode 100644 index 0000000..891e1e3 --- /dev/null +++ b/media/css/blog-themes/default/style.css @@ -0,0 +1,33 @@ +body.blog-detail section.main div.inner section.snipts article.snipt div.container { + width: 940px; +} +body.blog-detail div#disqus_thread { + width: 925px; +} + +body.blog-site article.snipt div.group div.container { + width: 708px; +} +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 aside.main nav.footer ul.powered { + border-top: 1px solid #C0C0C0; + margin-top: 40px; + padding-top: 40px; +} +body.blog-site section.main aside.main nav.footer ul.powered li { + background: transparent url("/static/images/favicon.png") center left no-repeat; +} +body.blog-site section.main aside.main nav.footer ul.powered li a { + border: none; + color: #3E6B73; + font-style: italic; +} +body.blog-site section.main aside.main nav.footer ul.powered li a:hover { + border-bottom: 1px solid #333; + color: #333; +} diff --git a/media/css/blog-themes/default/style.scss b/media/css/blog-themes/default/style.scss index d1804fb..2bb0bbf 100644 --- a/media/css/blog-themes/default/style.scss +++ b/media/css/blog-themes/default/style.scss @@ -1,19 +1,4 @@ -article.snipt { - div.group { - div.container { - width: 708px; - - header { - min-height: 0; - - h1 { - margin: 11px 15px; - } - } - } - } -} -body.detail { +body.blog-detail { section.main { div.inner { section.snipts { @@ -29,3 +14,46 @@ body.detail { width: 925px; } } +body.blog-site { + article.snipt { + div.group { + div.container { + width: 708px; + + header { + min-height: 0; + + h1 { + margin: 11px 15px; + } + } + } + } + } + section.main { + aside.main { + nav.footer { + ul.powered { + border-top: 1px solid #C0C0C0; + margin-top: 40px; + padding-top: 40px; + + li { + background: transparent url('/static/images/favicon.png') center left no-repeat; + + a { + border: none; + color: #3E6B73; + font-style: italic; + + &:hover { + border-bottom: 1px solid #333; + color: #333; + } + } + } + } + } + } + } +} diff --git a/media/css/blog.css b/media/css/blog.css deleted file mode 100644 index afca6d9..0000000 --- a/media/css/blog.css +++ /dev/null @@ -1,24 +0,0 @@ -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; -} diff --git a/media/css/style.css b/media/css/style.css index 5a28cdc..de62ca6 100644 --- a/media/css/style.css +++ b/media/css/style.css @@ -1,16 +1,1264 @@ -article.snipt div.group div.container { - width: 708px; -} -article.snipt div.group div.container header { - min-height: 0; -} -article.snipt div.group div.container header h1 { - margin: 11px 15px; +html, body { + background: #f5f2f3 url("/static/images/bg.gif") top left repeat; } -body.detail section.main div.inner section.snipts article.snipt div.container { +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; } -body.detail div#disqus_thread { - width: 925px; +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; } diff --git a/media/images/favicon.png b/media/images/favicon.png new file mode 100644 index 0000000..cf3b84a Binary files /dev/null and b/media/images/favicon.png differ diff --git a/settings.py b/settings.py index 26cb525..094004f 100644 --- a/settings.py +++ b/settings.py @@ -68,7 +68,10 @@ MEDIA_URL = '/media/uploads/' # in apps' "static/" subdirectories and in STATICFILES_DIRS. # Example: "/home/media/media.lawrence.com/static/" STATIC_ROOT = os.path.join(BASE_PATH, 'static') -STATIC_URL = '/static/' +if DEBUG: + STATIC_URL = '/media/' +else: + STATIC_URL = '/static/' # Additional locations of static files STATICFILES_DIRS = ( @@ -121,6 +124,7 @@ TEMPLATE_DIRS = ( INSTALLED_APPS = ( 'gunicorn', + #'grappelli', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -211,14 +215,10 @@ ABSOLUTE_URL_OVERRIDES = { # CSS / JS Compression COMPRESS_OUTPUT_DIR = 'cache' COMPRESS_JS_FILTERS = [] -COMPRESS_ENABLED = True if DEBUG: COMPRESS_ROOT = os.path.join(BASE_PATH, 'media') else: COMPRESS_ROOT = STATIC_ROOT -COMPRESS_PRECOMPILERS = ( - ('text/x-scss', 'scss {infile} {outfile}'), -) # Search HAYSTACK_CONNECTIONS = { diff --git a/snipts/templates/snipts/detail.html b/snipts/templates/snipts/detail.html index fca3727..349832b 100644 --- a/snipts/templates/snipts/detail.html +++ b/snipts/templates/snipts/detail.html @@ -2,7 +2,7 @@ {% block page-title %}/ {% if snipt.title %}{{ snipt.title }}{% else %}Untitled{% endif %} / {{ user.username }} - {{ block.super }}{% endblock %} {% block html-class %}detail{% endblock %} -{% block body-class %}{% if request.path == '/api/' and request.user.is_authenticated %}api{% else %}detail{% endif %}{% endblock %} +{% block body-class %}{% if request.path == '/api/' %}api{% else %}detail{% endif %}{% endblock %} {% block js %} {{ block.super }} @@ -15,18 +15,24 @@ {% endblock %} {% block aside %} - {% if request.path == '/api/' and request.user.is_authenticated %} + {% if request.path == '/api/' %} {{ block.super }} - + {% endif %} +{% endblock %} +{% block aside-inner %} + {% if request.path == '/api/' %} + {% if request.user.is_authenticated %} + + {% endif %} {% endblock %}