From d0a499107913af8d60333210490d5acf12c4babb Mon Sep 17 00:00:00 2001 From: Victoria Wang Date: Mon, 13 Oct 2014 15:04:38 -0700 Subject: [PATCH] Browse page - initial work on adding tags for individual sites, switching to 3 columns at a certain browser width --- .../_project-Website-Gallery.scss | 21 +++++++++++++++---- views/browse.erb | 8 +++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/sass/_project-sass/_project-Website-Gallery.scss b/sass/_project-sass/_project-Website-Gallery.scss index a64ee91b..33e04e16 100644 --- a/sass/_project-sass/_project-Website-Gallery.scss +++ b/sass/_project-sass/_project-Website-Gallery.scss @@ -10,6 +10,7 @@ @extend .col-25; float:left; margin-bottom:$spacing*2; + color: #666; @include box-shadow(1px 1px 2px 0px rgba(0, 0, 0, 0.15)); @media (max-device-width:480px), screen and (max-width:800px){ @@ -17,9 +18,9 @@ } } - li a { - display:block; - } +// li a { +// display:block; +// } .site-info a { color: #666; font-size: 80%; @@ -28,6 +29,14 @@ margin-top: 8px; margin-bottom: 2px; } + .site-tags { + width: 100%; + clear: both; + height: 1.4em; + } + .site-tags .fa-tag { + vertical-align: -2px; + } &.int-Gall{ @@ -37,7 +46,11 @@ background-color: white; border: 9px solid white; - + overflow: hidden; + + @media (max-width:1000px){ + width:32% + } @media (max-device-width:480px), screen and (max-width:800px){ width:49% } diff --git a/views/browse.erb b/views/browse.erb index 2d4d9cd1..b0ce966b 100644 --- a/views/browse.erb +++ b/views/browse.erb @@ -88,6 +88,14 @@ <% end %> +
+ <% if site.tags.count > 0 %> + + <% site.tags.each_with_index do |tag, index| %> + <%= tag.name %><% if index != site.tags.length - 1 %>,<% end %> + <% end %> + <% end %> +
<% end %>