Commit 5d7c6de0987b757d2160812f09f1ff58f5fea164
1 parent
a3b43b3b
Exists in
master
and in
23 other branches
Fix css for context content block
Showing
2 changed files
with
22 additions
and
3 deletions
Show diff stats
plugins/context_content/public/style.css
| 1 | .context-content-block .contents .item img { | 1 | .context-content-block .contents .item img { |
| 2 | width: 100%; | 2 | width: 100%; |
| 3 | + max-height: 60px; | ||
| 4 | +} | ||
| 5 | + | ||
| 6 | +.context-content-block .contents .item .image { | ||
| 7 | + height: 60px; | ||
| 3 | } | 8 | } |
| 4 | 9 | ||
| 5 | .context-content-block .contents .item .context-icon { | 10 | .context-content-block .contents .item .context-icon { |
| 6 | background-size: cover; | 11 | background-size: cover; |
| 7 | background-repeat: no-repeat; | 12 | background-repeat: no-repeat; |
| 8 | background-position: center; | 13 | background-position: center; |
| 9 | - height: 60px; | 14 | + height: 100%; |
| 10 | } | 15 | } |
| 11 | 16 | ||
| 12 | .context-content-block .contents .item { | 17 | .context-content-block .contents .item { |
| 13 | width: 60px; | 18 | width: 60px; |
| 19 | + height: 95px; | ||
| 14 | display: inline-block; | 20 | display: inline-block; |
| 15 | vertical-align: top; | 21 | vertical-align: top; |
| 16 | margin: 5px; | 22 | margin: 5px; |
| @@ -36,3 +42,14 @@ | @@ -36,3 +42,14 @@ | ||
| 36 | .context-content-block .contents .item a { | 42 | .context-content-block .contents .item a { |
| 37 | text-decoration: none; | 43 | text-decoration: none; |
| 38 | } | 44 | } |
| 45 | + | ||
| 46 | +#content .context-content-block .contents .item .icon-text-html { background-image: url(/designs/icons/default/Tango/32x32/mimetypes/text-html.png) } | ||
| 47 | +#content .context-content-block .contents .item .icon-application-pdf { background-image: url(/designs/icons/default/Tango/32x32/mimetypes/gnome-mime-application-pdf.png) } | ||
| 48 | +#content .context-content-block .contents .item .icon-application-vnd-oasis-opendocument-text { background-image: url(/designs/icons/default/Tango/32x32/mimetypes/gnome-mime-application-vnd.oasis.opendocument.text.png) } | ||
| 49 | +#content .context-content-block .contents .item .icon-folder { background-image: url(/designs/icons/default/Tango/32x32/places/folder.png) } | ||
| 50 | +#content .context-content-block .contents .item .icon-text-plain { background-image: url(/designs/icons/default/Tango/32x32/mimetypes/text-x-generic.png) } | ||
| 51 | +#content .context-content-block .contents .item .icon-blog { background-image: url(/designs/icons/default/mod/32x32/apps/text-editor.png) } | ||
| 52 | +#content .context-content-block .contents .item .icon-forum { background-image: url(/designs/icons/default/Tango/32x32/apps/system-users.png) } | ||
| 53 | +#content .context-content-block .contents .item .icon-gallery { background-image: url(/designs/icons/default/Tango/32x32/mimetypes/image-x-generic.png) } | ||
| 54 | +#content .context-content-block .contents .item .icon-rss-feed { background-image: url(/images/icons-mime/rss-feed.png) } | ||
| 55 | +#content .context-content-block .contents .item .icon-event { background-image: url(/designs/icons/default/Tango/32x32/mimetypes/stock_calendar.png) } |
plugins/context_content/views/blocks/context_content.rhtml
| @@ -4,9 +4,11 @@ | @@ -4,9 +4,11 @@ | ||
| 4 | <% contents.each do |content| %> | 4 | <% contents.each do |content| %> |
| 5 | <span class="item"> | 5 | <span class="item"> |
| 6 | <a href="<%= url_for(content.view_url) %>"> | 6 | <a href="<%= url_for(content.view_url) %>"> |
| 7 | - <%= instance_eval(&block.content_image(content)) if block.show_image %> | 7 | + <div class="image"> |
| 8 | + <%= instance_eval(&block.content_image(content)) if block.show_image %> | ||
| 9 | + </div> | ||
| 8 | <% if block.show_name %> | 10 | <% if block.show_name %> |
| 9 | - <div class="name"><%= short_filename(content.name) %></div> | 11 | + <div class="name"><%= short_filename(content.name, 30) %></div> |
| 10 | <% end %> | 12 | <% end %> |
| 11 | </a> | 13 | </a> |
| 12 | </span> | 14 | </span> |