From 9bf5f096eed148955f4ebab6a9f3a063485d343c Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 19 Mar 2015 14:58:28 -0400 Subject: [PATCH] styled category view --- less/categories.less | 78 ++++++++++++++++++- less/category.less | 172 ----------------------------------------- less/style.less | 6 +- templates/category.tpl | 96 ++++++++++++----------- 4 files changed, 130 insertions(+), 222 deletions(-) diff --git a/less/categories.less b/less/categories.less index 9859e1e..ef0a5b1 100644 --- a/less/categories.less +++ b/less/categories.less @@ -1,4 +1,4 @@ -.categories { +.categories, .category > ul { list-style-type: none; padding: 0; @@ -19,9 +19,22 @@ margin-top: 2px; } + img { + margin-right: 15px; + width: 46px; + height: 46px; + } + h1 { font-size: 22px; margin: 0; + position: absolute; + margin-left: 62px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + margin-right: 42px; + width: 85%; } } @@ -78,4 +91,67 @@ } } } +} + + +.category-header { + width: 100%; + height: 110px; + text-align: center; + margin: 0; + padding-top:25px; + .pointer; + margin-bottom: 10px; + overflow:hidden; + + &:hover { + filter: brightness(115%); + -webkit-filter: brightness(115%); + } + + .category-box { + height:90px; + + .post-preview { + padding-left:10px; + padding-right:10px; + text-align:left; + img { + width:60px; + height:60px; + padding-right:5px; + } + + p { + overflow: hidden; + text-overflow:ellipsis; + height:60px; + } + } + } + +} + +.category-header-image-auto { + -webkit-background-size: auto!important; + -moz-background-size: auto!important; + -o-background-size: auto!important; + background-size: auto!important; + background-position: 0% 0% !important; +} + +.category-header-image-cover { + -webkit-background-size: cover!important; + -moz-background-size: cover!important; + -o-background-size: cover!important; + background-size: cover!important; + background-position: center!important; +} + +.category-header-image-contain { + -webkit-background-size: contain!important; + -moz-background-size: contain!important; + -o-background-size: contain!important; + background-size: contain!important; + background-position: center!important; } \ No newline at end of file diff --git a/less/category.less b/less/category.less index 44aa620..cec0e2d 100644 --- a/less/category.less +++ b/less/category.less @@ -1,12 +1,4 @@ .category { - .span9 { - margin-bottom: 50px; - } - - .header { - margin-bottom:20px; - } - ul { li { list-style: none; @@ -22,173 +14,9 @@ } } - ul { - padding-left: 0px; - } - - .meta { - font-size: 12px; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } - .unread { .topic-title { font-weight: bold; } } - - .topic-row { - - border-radius: 5px; - padding: 5px 10px 5px 10px; - - small { - vertical-align: 2px; - font-size: 14px; - } - - h3 { - padding: 0; - margin: 0; - margin-top: 4px; - line-height: 25px; - white-space: nowrap; - text-overflow:ellipsis; - overflow: hidden; - a { - width:100%; - display:inline-block; - } - - .topic-title { - width: 100%; - font-size: 20px; - } - } - - .teaser-pic { - width:20px; - height:20px; - } - - .user-img { - width: 50px; - height: 50px; - margin-right:10px; - } - } - - .latest-post { - float: right; - padding-top: 2px; - margin-right: 0px; - width: 40%; - - .pull-right { - width: 100%; - height: 50px; - line-height: 16px; - margin-left: 1px; - padding: 2px 5px 5px 20px; - border-left: 1px solid #bbb; - - img { - display: block; - float: left; - } - - p { - display: block; - float: left; - width: 70%; - margin-left: 10px; - overflow: hidden; - max-height: 33px; - margin-bottom: 0px; - } - } - } -} - -.category-item { - .select { - line-height: 50px; - font-size: 20px; - } -} - -h4.category-title { - width: 100%; - font-weight: 700; - line-height: 21px; - text-align: left; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - display: inline-block; - margin: 0; -} - -.category-header { - width: 100%; - height: 110px; - text-align: center; - margin: 0; - padding-top:25px; - .pointer; - margin-bottom: 10px; - overflow:hidden; - - &:hover { - filter: brightness(115%); - -webkit-filter: brightness(115%); - } - - .category-box { - height:90px; - - .post-preview { - padding-left:10px; - padding-right:10px; - text-align:left; - img { - width:60px; - height:60px; - padding-right:5px; - } - - p { - overflow: hidden; - text-overflow:ellipsis; - height:60px; - } - } - } - -} - -.category-header-image-auto { - -webkit-background-size: auto!important; - -moz-background-size: auto!important; - -o-background-size: auto!important; - background-size: auto!important; - background-position: 0% 0% !important; -} - -.category-header-image-cover { - -webkit-background-size: cover!important; - -moz-background-size: cover!important; - -o-background-size: cover!important; - background-size: cover!important; - background-position: center!important; -} - -.category-header-image-contain { - -webkit-background-size: contain!important; - -moz-background-size: contain!important; - -o-background-size: contain!important; - background-size: contain!important; - background-position: center!important; } \ No newline at end of file diff --git a/less/style.less b/less/style.less index 32bf74a..7c8859f 100644 --- a/less/style.less +++ b/less/style.less @@ -85,9 +85,9 @@ a:hover, .btn-link:hover, .btn-link:active, .btn-link:focus { transition: opacity 100ms linear; &.ajaxifying { - -moz-opacity: 0.00; - opacity: 0.00; - -ms-filter:~"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + -moz-opacity: 0.15; + opacity: 0.15; + -ms-filter:~"progid:DXImageTransform.Microsoft.Alpha(Opacity=15)"; } } diff --git a/templates/category.tpl b/templates/category.tpl index d450a9d..3ea926a 100644 --- a/templates/category.tpl +++ b/templates/category.tpl @@ -21,7 +21,6 @@ - @@ -30,65 +29,70 @@ -