Refactored article CSS, added clear breaks
This commit is contained in:
parent
6a663b188a
commit
5b81e9a867
7 changed files with 61 additions and 50 deletions
|
@ -32,6 +32,9 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% else %}
|
||||
No articles here.
|
||||
{% endif %}
|
||||
|
||||
{% if subcategories %}
|
||||
|
|
|
@ -4,51 +4,9 @@
|
|||
@import '../libs/bootstrap-sass/assets/stylesheets/bootstrap';
|
||||
@import 'paper/bootswatch';
|
||||
|
||||
|
||||
// Modules
|
||||
@import "modules/modules";
|
||||
|
||||
body {
|
||||
margin-top: 104px;
|
||||
}
|
||||
|
||||
section {
|
||||
padding: 6em 0;
|
||||
&:nth-child(odd) {
|
||||
background-color: $gray-lighter;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 1.5em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive image/video classes */
|
||||
.rich-text img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.richtext-image.left{
|
||||
float:left;
|
||||
}
|
||||
.richtext-image.right{
|
||||
float:right;
|
||||
}
|
||||
.responsive-object {
|
||||
position: relative;
|
||||
}
|
||||
.responsive-object iframe,
|
||||
.responsive-object object,
|
||||
.responsive-object embed {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
article footer .btn {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
|
42
publichealth/static/css/modules/_articles.scss
Normal file
42
publichealth/static/css/modules/_articles.scss
Normal file
|
@ -0,0 +1,42 @@
|
|||
// Article sections
|
||||
section {
|
||||
padding: 6em 0;
|
||||
&:nth-child(odd) {
|
||||
background-color: $gray-lighter;
|
||||
}
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 1.5em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
|
||||
// Article content blocks
|
||||
.article-body > div {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
// Responsive image/video classes
|
||||
.rich-text img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.richtext-image.left{
|
||||
float:left;
|
||||
}
|
||||
.richtext-image.right{
|
||||
float:right;
|
||||
}
|
||||
.responsive-object {
|
||||
position: relative;
|
||||
}
|
||||
.responsive-object iframe,
|
||||
.responsive-object object,
|
||||
.responsive-object embed {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
|
@ -15,3 +15,7 @@ footer#footer {
|
|||
text-align: center;
|
||||
font-size: 70%;
|
||||
}
|
||||
|
||||
article footer .btn {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
|
|
@ -4,3 +4,4 @@
|
|||
@import "footer";
|
||||
@import "news";
|
||||
@import "forms";
|
||||
@import "articles";
|
||||
|
|
|
@ -8411,6 +8411,10 @@ footer#footer a {
|
|||
font-size: 70%;
|
||||
}
|
||||
|
||||
article footer .btn {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#news .panel-default {
|
||||
font-size: 90%;
|
||||
padding-top: 75%;
|
||||
|
@ -8559,10 +8563,6 @@ footer#footer a {
|
|||
padding-top: 0.5em;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-top: 104px;
|
||||
}
|
||||
|
||||
section {
|
||||
padding: 6em 0;
|
||||
}
|
||||
|
@ -8575,7 +8575,10 @@ section h2 {
|
|||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* Responsive image/video classes */
|
||||
.article-body > div {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.rich-text img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
|
@ -8603,6 +8606,6 @@ section h2 {
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
article footer .btn {
|
||||
margin-bottom: 1em;
|
||||
body {
|
||||
margin-top: 104px;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue