A bunch of blog stuff.
parent
6219446445
commit
16f2c8ff23
|
@ -1,7 +1,5 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% load compress %}
|
|
||||||
|
|
||||||
{% block meta %}
|
{% block meta %}
|
||||||
{% if 'page' in request.get_full_path %}
|
{% if 'page' in request.get_full_path %}
|
||||||
<meta name="robots" content="noindex, follow" />
|
<meta name="robots" content="noindex, follow" />
|
||||||
|
@ -11,21 +9,11 @@
|
||||||
{% block body-class %}blog-site{% endblock %}
|
{% block body-class %}blog-site{% endblock %}
|
||||||
{% block html-class %}blog-site{% endblock %}
|
{% block html-class %}blog-site{% endblock %}
|
||||||
|
|
||||||
{% block css %}
|
|
||||||
{% compress css %}
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/bootstrap.css" />
|
|
||||||
<link rel="stylesheet" type="text/x-scss" href="{{ STATIC_URL }}css/style.scss" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/themes.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/chosen.css" />
|
|
||||||
<link rel="stylesheet" type="text/x-scss" href="{{ STATIC_URL }}css/blog-themes/default/style.scss" />
|
|
||||||
{% endcompress %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block page-title %}
|
{% block page-title %}
|
||||||
{% if blog_user.username == 'nick' %}
|
{% if blog_user.username == 'nick' %}
|
||||||
Nick Sergeant
|
Nick Sergeant
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ blog_user.username }}'s blog - Powered by Snipt.net
|
{{ blog_user.username }}'s blog
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -38,13 +26,20 @@
|
||||||
<nav class="footer">
|
<nav class="footer">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="blog">
|
<li class="blog">
|
||||||
{% if blog_user.username == 'nick' %}
|
<a href="/">
|
||||||
<a href="/">Nick Sergeant</a>
|
{% if blog_user.username == 'nick' %}
|
||||||
{% else %}
|
Nick Sergeant
|
||||||
<a href="/">{{ blog_user.username }}'s blog</a>
|
{% elif blog_user.username == 'blog' %}
|
||||||
{% endif %}
|
Snipt Blog
|
||||||
|
{% else %}
|
||||||
|
{{ blog_user.username }}'s blog
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul class="powered">
|
||||||
|
<li class="snipt"><a href="https://snipt.net/">Blog powered by Snipt</a></li>
|
||||||
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{% extends "blogs/themes/default/base.html" %}
|
{% extends "blogs/themes/default/base.html" %}
|
||||||
|
|
||||||
{% block html-class %}detail{% endblock %}
|
{% block html-class %}detail blog-site{% endblock %}
|
||||||
{% block body-class %}detail{% endblock %}
|
{% block body-class %}detail blog-site{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
|
@ -1,19 +1,4 @@
|
||||||
article.snipt {
|
body.blog-detail {
|
||||||
div.group {
|
|
||||||
div.container {
|
|
||||||
width: 708px;
|
|
||||||
|
|
||||||
header {
|
|
||||||
min-height: 0;
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
margin: 11px 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
body.detail {
|
|
||||||
section.main {
|
section.main {
|
||||||
div.inner {
|
div.inner {
|
||||||
section.snipts {
|
section.snipts {
|
||||||
|
@ -29,3 +14,46 @@ body.detail {
|
||||||
width: 925px;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
1270
media/css/style.css
1270
media/css/style.css
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
10
settings.py
10
settings.py
|
@ -68,7 +68,10 @@ MEDIA_URL = '/media/uploads/'
|
||||||
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
||||||
# Example: "/home/media/media.lawrence.com/static/"
|
# Example: "/home/media/media.lawrence.com/static/"
|
||||||
STATIC_ROOT = os.path.join(BASE_PATH, '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
|
# Additional locations of static files
|
||||||
STATICFILES_DIRS = (
|
STATICFILES_DIRS = (
|
||||||
|
@ -121,6 +124,7 @@ TEMPLATE_DIRS = (
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
'gunicorn',
|
'gunicorn',
|
||||||
|
#'grappelli',
|
||||||
|
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
|
@ -211,14 +215,10 @@ ABSOLUTE_URL_OVERRIDES = {
|
||||||
# CSS / JS Compression
|
# CSS / JS Compression
|
||||||
COMPRESS_OUTPUT_DIR = 'cache'
|
COMPRESS_OUTPUT_DIR = 'cache'
|
||||||
COMPRESS_JS_FILTERS = []
|
COMPRESS_JS_FILTERS = []
|
||||||
COMPRESS_ENABLED = True
|
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
COMPRESS_ROOT = os.path.join(BASE_PATH, 'media')
|
COMPRESS_ROOT = os.path.join(BASE_PATH, 'media')
|
||||||
else:
|
else:
|
||||||
COMPRESS_ROOT = STATIC_ROOT
|
COMPRESS_ROOT = STATIC_ROOT
|
||||||
COMPRESS_PRECOMPILERS = (
|
|
||||||
('text/x-scss', 'scss {infile} {outfile}'),
|
|
||||||
)
|
|
||||||
|
|
||||||
# Search
|
# Search
|
||||||
HAYSTACK_CONNECTIONS = {
|
HAYSTACK_CONNECTIONS = {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{% block page-title %}/ {% if snipt.title %}{{ snipt.title }}{% else %}Untitled{% endif %} / {{ user.username }} - {{ block.super }}{% endblock %}
|
{% block page-title %}/ {% if snipt.title %}{{ snipt.title }}{% else %}Untitled{% endif %} / {{ user.username }} - {{ block.super }}{% endblock %}
|
||||||
{% block html-class %}detail{% 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 js %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
@ -15,18 +15,24 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block aside %}
|
{% block aside %}
|
||||||
{% if request.path == '/api/' and request.user.is_authenticated %}
|
{% if request.path == '/api/' %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<aside class="api-info api-creds">
|
{% endif %}
|
||||||
<div class="api-inner">
|
{% endblock %}
|
||||||
<h5>Your API credentials:</h5>
|
{% block aside-inner %}
|
||||||
<ul>
|
{% if request.path == '/api/' %}
|
||||||
<li>Username: <strong>{{ request.user.username }}</strong></li>
|
{% if request.user.is_authenticated %}
|
||||||
<li>User ID: <strong>{{ request.user.id }}</strong></li>
|
<aside class="api-info api-creds">
|
||||||
<li>API Key: <br /><input type="text" value="{{ request.user.api_key.key }}" /></li>
|
<div class="api-inner">
|
||||||
</ul>
|
<h5>Your API credentials:</h5>
|
||||||
</div>
|
<ul>
|
||||||
</aside>
|
<li>Username: <strong>{{ request.user.username }}</strong></li>
|
||||||
|
<li>User ID: <strong>{{ request.user.id }}</strong></li>
|
||||||
|
<li>API Key: <br /><input type="text" value="{{ request.user.api_key.key }}" /></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
{% endif %}
|
||||||
<aside class="api-info immediate-help">
|
<aside class="api-info immediate-help">
|
||||||
<div class="api-inner">
|
<div class="api-inner">
|
||||||
<h5>Need immediate help?</h5>
|
<h5>Need immediate help?</h5>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{% snipt_is_favorited_by_user as 'is_favorited' %}
|
{% snipt_is_favorited_by_user as 'is_favorited' %}
|
||||||
|
|
||||||
<article id="snipt-{{ snipt.pk }}" class="snipt {% if snipt.blog_post %}blog-post {% endif %}{% if not snipt.public %} private-snipt{% endif %}{% if snipt.line_count > 8 and not detail and user.username != 'blog' %} expandable{% endif %}{% if snipt.user == request.user %} editable{% endif %}{% if is_favorited %} favorited" data-favorite-id="{{ is_favorited }}"{% else %}"{% endif %}>
|
<article id="snipt-{{ snipt.pk }}" class="snipt {% if snipt.blog_post %}blog-post {% endif %}{% if not snipt.public %} private-snipt{% endif %}{% if snipt.line_count > 8 and not detail %} expandable{% endif %}{% if snipt.user == request.user %} editable{% endif %}{% if is_favorited %} favorited" data-favorite-id="{{ is_favorited }}"{% else %}"{% endif %}>
|
||||||
<div class="number">#{{ snipt.pk }}</div>
|
<div class="number">#{{ snipt.pk }}</div>
|
||||||
<div class="group">
|
<div class="group">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ snipt.stylized|safe }}
|
{{ snipt.stylized|safe }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if snipt.line_count > 8 and not detail and user.username != 'blog' %}
|
{% if snipt.line_count > 8 and not detail %}
|
||||||
<a href="#" class="expand">
|
<a href="#" class="expand">
|
||||||
<span class="expand">Expand</span>
|
<span class="expand">Expand</span>
|
||||||
<span class="collapse">Collapse</span>
|
<span class="collapse">Collapse</span>
|
||||||
|
|
|
@ -12,14 +12,13 @@
|
||||||
|
|
||||||
{% block meta %}{% endblock %}
|
{% block meta %}{% endblock %}
|
||||||
|
|
||||||
{% block css %}
|
{% compress css %}
|
||||||
{% compress css %}
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/bootstrap.css" />
|
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/bootstrap.css" />
|
||||||
<link rel="stylesheet" type="text/x-scss" href="{{ STATIC_URL }}css/style.scss" />
|
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/style.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/themes.css" />
|
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/themes.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/chosen.css" />
|
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/chosen.css" />
|
||||||
{% endcompress %}
|
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/blog-themes/default/style.css" />
|
||||||
{% endblock %}
|
{% endcompress %}
|
||||||
|
|
||||||
{% compress js %}
|
{% compress js %}
|
||||||
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/underscore.js"></script>
|
<script type="text/javascript" src="{{ STATIC_URL }}js/libs/underscore.js"></script>
|
||||||
|
@ -141,7 +140,7 @@
|
||||||
<a href="/api/" {% if '/api/' in request.path %}class="active"{% endif %}>API</a>
|
<a href="/api/" {% if '/api/' in request.path %}class="active"{% endif %}>API</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="blog">
|
<li class="blog">
|
||||||
<a href="/blog/" {% if '/blog/' in request.path %}class="active"{% endif %}>Blog</a>
|
<a href="https://blog.snipt.net/">Blog</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="roadmap">
|
<li class="roadmap">
|
||||||
<a href="/todo/" {% if '/todo/' in request.path %}class="active"{% endif %}>Roadmap</a>
|
<a href="/todo/" {% if '/todo/' in request.path %}class="active"{% endif %}>Roadmap</a>
|
||||||
|
@ -152,6 +151,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
{% block tags %}{% endblock %}
|
{% block tags %}{% endblock %}
|
||||||
|
{% block aside-inner %}{% endblock %}
|
||||||
</aside>
|
</aside>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
|
Loading…
Reference in New Issue