Working on Pro

master
Nick Sergeant 2012-08-28 11:35:04 -04:00
parent 91ca0a0e8f
commit b592f6ce6a
10 changed files with 1129 additions and 6 deletions

View File

@ -13,6 +13,8 @@
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/pro.js"></script>
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/pro.css?1" />
{% if has_snipts and not detail %}

View File

@ -1,12 +1,37 @@
{% load snipt_tags %}
<article class="group {% if detail %}detail{% endif %}">
<div class="gutter"></div>
<div class="content-inner">
<h1><a href="{{ snipt.get_full_absolute_url }}">{% firstof snipt.title 'Untitled' %}</a></h1>
<div class="post-content">
{% if not detail %}
{{ snipt.stylized|safe }}
<div class="post-content autumn">
{% if snipt.lexer == 'markdown' %}
<div class="markdown">
{{ snipt.stylized|safe }}
</div>
{% else %}
{{ snipt.stylized|safe }}
{% if 'linenos' not in snipt.stylized %}
<table class="highlighttable fakenos">
<tbody>
<tr>
<td class="linenos">
<div class="linenodiv">
<pre>
{% generate_line_numbers for snipt.line_count %}
</pre>
</div>
</td>
<td class="code">
{{ snipt.stylized|safe }}
</td>
</tr>
</tbody>
</table>
{% else %}
{{ snipt.stylized|safe }}
{% endif %}
{% endif %}
{% if detail %}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'snipt-net';

File diff suppressed because one or more lines are too long

View File

@ -272,6 +272,10 @@ article {
p {
margin: 20px 0;
&:last-of-type {
margin-bottom: 0;
}
}
a {
color: #666;
@ -280,6 +284,78 @@ article {
color: #000;
}
}
table.highlighttable {
background: #F7F7F7;
height: 100%;
}
td {
padding: 0;
vertical-align: top;
&.linenos {
border-right: 1px solid #EEEEEE;
min-width: 24px;
div.linenodiv {
pre {
border: 0;
line-height: 16px;
margin: 0;
padding: 5px 3px 0 7px;
white-space: normal;
@include border-radius(0);
span {
color: #AAA;
display: block;
font: normal 12px/16px $Consolas;
line-height: 16px;
margin: 0;
padding: 0;
text-align: right;
text-decoration: none;
white-space: nowrap;
}
}
}
}
&.code {
background: #FFFFFF;
div.highlight {
pre {
background: transparent;
border: none;
font: normal 12px/16px $Consolas;
margin: 0;
overflow-x: auto;
padding: 5px;
white-space: pre;
word-wrap: normal;
width: 583px;
@include border-radius(0);
&::-webkit-scrollbar {
background: #F7F7F7;
height: 16px;
width: 16px;
-webkit-appearance: none;
}
&::-webkit-scrollbar-thumb {
border: 4px solid #F7F7F7;
border-radius: 16px;
background-color: #C7C7C7;
}
}
}
}
}
div.markdown {
pre {
min-height: 0;
margin: 20px 0 !important;
}
}
}
&:first-of-type {
margin-top: 0;

View File

@ -2,6 +2,7 @@
cat media/css/reset.css \
media/css/blog-themes/pro-adams/style.css \
media/css/themes.css \
> media/css/pro.css
cat media/css/bootstrap.css \

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,8 @@ cat media/js/src/application.js|jsmin > media/js/src/application.min.js
cat media/js/src/modules/site.js|jsmin > media/js/src/modules/site.min.js
cat media/js/src/modules/snipt.js|jsmin > media/js/src/modules/snipt.min.js
cat media/js/src/pro.js|jsmin > media/js/src/pro.min.js
cat media/js/libs/underscore.js \
media/js/libs/json2.js \
media/js/libs/backbone.js \
@ -16,3 +18,6 @@ cat media/js/libs/underscore.js \
media/js/src/modules/snipt.min.js \
media/js/libs/codemirror.js \
> media/js/snipt.js
cat media/js/src/pro.js \
> media/js/pro.js

1
media/js/pro.js Normal file

File diff suppressed because one or more lines are too long

0
media/js/src/pro.js Normal file
View File

0
media/js/src/pro.min.js vendored Normal file
View File