Tons of stuff
parent
9f20924d3d
commit
5773f84e9f
|
@ -681,6 +681,12 @@ article.private-snipt {
|
||||||
div.container {
|
div.container {
|
||||||
header {
|
header {
|
||||||
.vertical-gradient-with-image(#FFF, #FFFAF2, url('/media/images/private-icon.png') top right no-repeat);
|
.vertical-gradient-with-image(#FFF, #FFFAF2, url('/media/images/private-icon.png') top right no-repeat);
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
a {
|
||||||
|
padding-right: 25px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -714,6 +720,72 @@ div.pagination {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pages
|
||||||
|
body.detail {
|
||||||
|
div.right-y {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
section.main {
|
||||||
|
div.inner {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
section.snipts {
|
||||||
|
div#disqus_thread {
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-left: 15px;
|
||||||
|
width: 825px;
|
||||||
|
|
||||||
|
#dsq-content {
|
||||||
|
margin-top: -38px;
|
||||||
|
|
||||||
|
#dsq-global-toolbar {
|
||||||
|
margin-bottom: 18px;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
#dsq-sort-by {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.dsq-comment-text {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#dsq-footer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
article.snipt {
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
div.container {
|
||||||
|
width: 839px;
|
||||||
|
|
||||||
|
header {
|
||||||
|
h1 {
|
||||||
|
a {
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
section.code {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
&:after {
|
||||||
|
bottom: 11px;
|
||||||
|
height: 23px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
aside {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
.group:after {
|
.group:after {
|
||||||
content: ".";
|
content: ".";
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
events: {
|
events: {
|
||||||
'click a.copy': 'copy',
|
'click a.copy': 'copy',
|
||||||
'click a.expand': 'expand',
|
'click a.expand': 'expand',
|
||||||
'click .container': 'clickSelect',
|
'click .container': 'selectFromClick',
|
||||||
'copy': 'copy',
|
'copy': 'copy',
|
||||||
'detail': 'detail',
|
'detail': 'detail',
|
||||||
'deselect': 'deselect',
|
'deselect': 'deselect',
|
||||||
|
@ -34,9 +34,6 @@
|
||||||
'select': 'select'
|
'select': 'select'
|
||||||
},
|
},
|
||||||
|
|
||||||
clickSelect: function() {
|
|
||||||
this.select(true);
|
|
||||||
},
|
|
||||||
copy: function() {
|
copy: function() {
|
||||||
var cmd;
|
var cmd;
|
||||||
if (navigator.platform == 'MacPPC' ||
|
if (navigator.platform == 'MacPPC' ||
|
||||||
|
@ -59,6 +56,7 @@
|
||||||
expand: function() {
|
expand: function() {
|
||||||
this.$container.toggleClass('expanded', 100);
|
this.$container.toggleClass('expanded', 100);
|
||||||
this.$tags.toggleClass('expanded');
|
this.$tags.toggleClass('expanded');
|
||||||
|
this.select();
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
next: function() {
|
next: function() {
|
||||||
|
@ -89,6 +87,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
window.$selected = this.$el;
|
window.$selected = this.$el;
|
||||||
|
},
|
||||||
|
selectFromClick: function() {
|
||||||
|
this.select(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
SniptListView = Backbone.View.extend({
|
SniptListView = Backbone.View.extend({
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block page-title %}/ {{ user.username }} / {{ snipt.title }} - {{ block.super }}{% endblock %}
|
{% block page-title %}/ {{ user.username }} / {{ snipt.title }} - {{ block.super }}{% endblock %}
|
||||||
|
{% block body-class %}detail{% endblock %}
|
||||||
|
|
||||||
{% block breadcrumb %}
|
{% block breadcrumb %}
|
||||||
<li><a href="/{{ user.username }}/">{{ user.username }}</a></li>
|
<li><a href="/{{ user.username }}/">{{ user.username }}</a></li>
|
||||||
|
@ -11,7 +12,21 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="snipts" id="snipts">
|
<section class="snipts" id="snipts">
|
||||||
{% include "snipts/snipt-detail.html" %}
|
{% with 'true' as detail %}
|
||||||
|
{% include "snipts/snipt-list.html" %}
|
||||||
|
{% endwith %}
|
||||||
|
<div id="disqus_thread"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var disqus_shortname = 'snipt-net';
|
||||||
|
var disqus_developer = 1;
|
||||||
|
var disqus_url = ('https:' == document.location.protocol ? 'https' : 'http') + '://snipt.net{{ request.path }}';
|
||||||
|
var disqus_identifier = {{ snipt.id }};
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||||
|
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
||||||
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
{% load humanize %}
|
{% load humanize %}
|
||||||
|
|
||||||
<article class="snipt {% if not snipt.public %}private-snipt{% endif %}{% if snipt.get_line_count > 8 %}expandable{% endif %}">
|
<article class="snipt {% if not snipt.public %}private-snipt{% endif %} {% if snipt.get_line_count > 8 and not detail %}expandable{% endif %}">
|
||||||
<div class="number">#{{ snipt.id }}</div>
|
<div class="number">#{{ snipt.id }}</div>
|
||||||
<div class="group">
|
<div class="group">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<header>
|
<header>
|
||||||
<h2>{{ snipt.lexer_name }}</h2>
|
<h2>{{ snipt.lexer_name }}</h2>
|
||||||
<h1><a href="{{ snipt.get_absolute_url }}">{{ snipt.title }}</a></h1>
|
<h1><a href="{{ snipt.get_absolute_url }}">{{ snipt.title }} fdsauif odpsaufiodpsa ufiopdsa ufiopds uaiopfu dsaiopf udiospa ufiopdsau fiopdsa</a></h1>
|
||||||
</header>
|
</header>
|
||||||
<section class="code {% if request.GET.style %}{{ request.GET.style }}{% else %}autumn{% endif %}">
|
<section class="code {% if request.GET.style %}{{ request.GET.style }}{% else %}autumn{% endif %}">
|
||||||
{{ snipt.get_stylized|safe }}
|
{{ snipt.get_stylized|safe }}
|
||||||
{% if snipt.get_line_count > 8 %}
|
{% if snipt.get_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>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<h2>{{ snipt.tags.all|length }} tag{{ snipt.tags.all|pluralize }}</h2>
|
<h2>{{ snipt.tags.all|length }} tag{{ snipt.tags.all|pluralize }}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% for tag in snipt.sorted_tags %}
|
{% for tag in snipt.sorted_tags %}
|
||||||
<li {% if forloop.counter > 4 %}class="hidden"{% endif %}>
|
<li {% if forloop.counter > 4 and not detail %}class="hidden"{% endif %}>
|
||||||
{% if public %}
|
{% if public %}
|
||||||
<a href="/public/tag/{{ tag.slug }}/">{{ tag }}</a>
|
<a href="/public/tag/{{ tag.slug }}/">{{ tag }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -59,3 +59,5 @@
|
||||||
</ul>
|
</ul>
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
{% block comments %}{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue