temp fix for flash thumbnails

This commit is contained in:
albert
2011-10-21 18:02:41 -04:00
parent 3b1d01370a
commit b69cab11ee
3 changed files with 20 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ div#page {
margin: 0 30px;
aside#sidebar {
width: 15em;
width: 20%;
float: left;
h1 {
@@ -30,7 +30,7 @@ div#page {
}
section#content {
width: 65em;
width: 75%;
float: left;
padding-left: 2em;
overflow: visible;

View File

@@ -13,6 +13,15 @@ article.post-preview {
float: left;
text-align: center;
vertical-align: middle;
span.text-post-preview {
border: 1px solid #666;
height: 150px;
width: 150px;
text-align: center;
vertical-align: middle;
display: block;
}
}
article.post-preview.blacklisted-active {

View File

@@ -7,7 +7,15 @@ class PostPresenter < Presenter
html = %{<article class="post-preview" id="post_#{post.id}" data-id="#{post.id}" data-tags="#{h(post.tag_string)}" data-uploader="#{h(post.uploader_name)}" data-rating="#{post.rating}" data-width="#{post.image_width}" data-height="#{post.image_height}" data-flags="#{flags.join(' ')}">}
html << %{<a href="/posts/#{post.id}">}
html << %{<img src="#{post.preview_file_url}">}
if post.is_image?
html << %{<img src="#{post.preview_file_url}">}
elsif post.is_flash?
html << '<span class="text-post-preview">Flash</span>'
else
html << '<span class="text-post-preview">Download</span>'
end
html << %{</a>}
html << %{</article>}
html.html_safe