diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 7a5705f60..5c4dcb567 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -18,6 +18,7 @@ // 16. Flags // 17. Activity // 18. Banners +// 19. Recommended Section Home // // 01. Global styles @@ -319,6 +320,14 @@ a { background: $brand; } +.truncate-horizontal-text { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; + -ms-text-overflow: ellipsis; +} + // 02. Header // ---------- @@ -2128,3 +2137,95 @@ table { text-decoration: none; } } + +// 19. Recommended Section Home +// ----------- +.section-recommended { + padding-top: $line-height * 2; + + h2 { + margin-bottom: $line-height * 2; + } + + .debates, + .proposals, + .budget-investments { + + @include breakpoint(medium) { + margin-bottom: 0; + } + + @include breakpoint(small) { + margin-bottom: $line-height; + } + } + + .card { + + .card-section { + padding: $line-height; + + p { + font-size: rem-calc(15); + } + } + + .orbit { + height: 300px; + + .orbit-wrapper { + max-height: 250px; + overflow: hidden; + position: relative; + } + + .orbit-bullets { + @include orbit-bullets; + width: 100%; + } + } + } + + .card .orbit .orbit-wrapper .truncate { + background: image-url('truncate.png'); + background-repeat: repeat-x; + bottom: 0; + height: 20px; + position: absolute; + width: 100%; + } + + .debates-inner { + border-top: 4px solid $debates; + } + + .proposals-inner { + border-top: 4px solid $proposals; + } + + .budget-investments-inner { + border-top: 4px solid $budget; + } + + .debates-inner, + .proposals-inner, + .budget-investments-inner { + background: #fff; + max-height: 350px; + + @include breakpoint(small) { + max-height: 400px; + } + + h4 { + margin-top: $line-height; + margin-bottom: 0; + font-size: rem-calc(18); + min-height: 50px; + } + + h5 { + font-size: rem-calc(14); + } + } +} diff --git a/app/assets/stylesheets/mixins.scss b/app/assets/stylesheets/mixins.scss index 401a2ec81..70f4c179d 100644 --- a/app/assets/stylesheets/mixins.scss +++ b/app/assets/stylesheets/mixins.scss @@ -1,6 +1,7 @@ // Table of Contents // // 01. Logo +// 02. Orbit bullets // // 01. Logo @@ -30,3 +31,30 @@ } } } + + +//02. Orbit bullet +@mixin orbit-bullets { + @include disable-mouse-outline; + position: relative; + margin-top: $orbit-bullet-margin-top; + margin-bottom: $orbit-bullet-margin-bottom; + text-align: center; + + button { + width: $orbit-bullet-diameter; + height: $orbit-bullet-diameter; + margin: $orbit-bullet-margin; + + border-radius: 50%; + background-color: $orbit-bullet-background; + + &:hover { + background-color: $orbit-bullet-background-active; + } + + &.is-active { + background-color: $orbit-bullet-background-active; + } + } +} diff --git a/app/views/welcome/_recommended_no_image.html.erb b/app/views/welcome/_recommended_no_image.html.erb index 495bccc5c..e151c06c0 100644 --- a/app/views/welcome/_recommended_no_image.html.erb +++ b/app/views/welcome/_recommended_no_image.html.erb @@ -1,108 +1,108 @@ -