Force expand

master
Nick Sergeant 2012-06-12 10:52:55 -04:00
parent 0a1c8a0b90
commit ff55008701
3 changed files with 12 additions and 2 deletions

View File

@ -742,6 +742,9 @@ article.snipt.blog-post div.container header {
-moz-box-shadow: inset 0 -1px 0 #e3e9f5;
box-shadow: inset 0 -1px 0 #e3e9f5;
}
article.snipt.snipt-expand div.container section.code {
height: auto;
}
article.private-snipt div.container header {
background: #7f7f7f url("/static/images/private-icon.png") top right no-repeat;

View File

@ -852,6 +852,13 @@ article.snipt {
}
}
}
&.snipt-expand {
div.container {
section.code {
height: auto;
}
}
}
}
article.private-snipt {
div.container {

View File

@ -2,7 +2,7 @@
{% 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 %} 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-expand' in snipt.tags_list and snipt.blog_post %}snipt-expand {% endif %}{% if snipt.blog_post %}blog-post {% endif %}{% if not snipt.public %} private-snipt{% endif %}{% if snipt.line_count > 8 and not detail and 'snipt-expand' not in snipt.tags_list %} 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="group">
<div class="container">
@ -21,7 +21,7 @@
{% else %}
{{ snipt.stylized|safe }}
{% endif %}
{% if snipt.line_count > 8 and not detail %}
{% if snipt.line_count > 8 and not detail and 'snipt-expand' not in snipt.tags_list %}
<a href="#" class="expand">
<span class="expand">Expand</span>
<span class="collapse">Collapse</span>