Skip to content

Commit e1cddec

Browse files
committed
responsive adjustments on homepage
1 parent 650365e commit e1cddec

9 files changed

Lines changed: 117 additions & 20 deletions

File tree

assets/css/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.lock

Lines changed: 56 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

front/src/styles/base.scss

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
.main-content {
2+
.container {
3+
@include mobile() {
4+
padding-left: $space-normal;
5+
padding-right: $space-normal;
6+
}
7+
&.mobile-no-padding {
8+
@include mobile() {
9+
padding-left: 0;
10+
padding-right: 0;
11+
}
12+
}
13+
}
14+
}
115
.page, .single {
216
.main-content {
317
padding-top: 0;
@@ -110,4 +124,5 @@
110124
h1, h2, h3, h4, h5, h6 {
111125
margin-bottom: $space-normal;
112126
}
113-
}
127+
128+
}

front/src/styles/modules.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
&.has-image {
5555
.entry-image {
5656
padding: 0;
57+
img {
58+
width: 100%;
59+
}
5760
}
5861
.entry-content{
5962
padding-left: $space-bigger !important;
@@ -77,6 +80,13 @@
7780
text-transform: uppercase;
7881
}
7982
}
83+
@include mobile() {
84+
&.has-image {
85+
.entry-content {
86+
padding-left: 0 !important;
87+
}
88+
}
89+
}
8090
}
8191
.navigation {
8292
&.pagination {

front/src/styles/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
@import "@creativecommons/vocabulary/scss/table.scss";
1010

1111
@import "@creativecommons/vocabulary/scss/header.scss";
12+
@import "@creativecommons/vocabulary/scss/global_header.scss";
1213
@import "@creativecommons/vocabulary/scss/footer.scss";
1314

1415
@import "@creativecommons/vocabulary/scss/layout.scss";

front/src/styles/widgets.scss

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
.widget {
2+
&.title {
3+
@include mobile() {
4+
padding: 0;
5+
h1 {
6+
font-size: 2.25rem;
7+
}
8+
}
9+
}
210
&.donate {
311
text-align: center;
412
h3 {
@@ -15,6 +23,20 @@
1523
}
1624
}
1725
}
26+
@include mobile() {
27+
padding: $space-normal;
28+
.donate-buttons {
29+
justify-content: space-between;
30+
.donate-amount {
31+
margin-bottom: $space-normal;
32+
margin-right: $space-normal;
33+
margin-left: $space-normal;
34+
}
35+
.donate {
36+
display: flex;
37+
}
38+
}
39+
}
1840
}
1941
&.twitter {
2042
&.has-border {
@@ -77,5 +99,10 @@
7799
.no-gap {
78100
.widget {
79101
padding: $space-large;
102+
&.title {
103+
@include mobile() {
104+
padding: 0;
105+
}
106+
}
80107
}
81108
}

inc/partials/entry/entry-footer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<hr>
22
<div class="columns leveled">
3-
<div class="column is-one-third">
3+
<div class="column is-8">
44
<div class="entry-meta">
55
<div class="terms-list the-categories margin-vertical-normal">
66
<h6>Categories</h6>
@@ -12,7 +12,7 @@
1212
</div>
1313
</div>
1414
</div>
15-
<div class="column is-one-fifth">
15+
<div class="column is-2">
1616
<div class="share-entry margin-vertical-normal">
1717
<h6>Share</h6>
1818
<a href="<?php echo CC_Site::social_share( 'facebook', get_the_ID() ); ?>" class="share facebook"><i class="icon facebook colored"></i></a>

inc/partials/home/home-content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php if ( is_active_sidebar( 'homepage-sidebar' ) ) : ?>
22
<section class="homepage-sidebars">
3-
<div class="container">
3+
<div class="container mobile-no-padding">
44
<?php dynamic_sidebar( 'homepage-sidebar' ); ?>
55
</div>
66
</section>

inc/widgets/cc-title.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ function widget( $args, $instance ) {
1515
$title_size = ( ! empty( $instance['title_size'] ) ) ? 'h' . $instance['title_size'] : 'h1';
1616
$class_centered = ( $instance['is_centered'] ) ? 'has-text-centered' : '';
1717
$class_vertical_space = ( ! empty( $instance['vertical_space'] ) ) ? ' padding-vertical-' . $instance['vertical_space'] : ' padding-vertical-normal';
18-
echo '<' . $title_size . ' class="' . $class_centered . $class_vertical_space . '">' . $instance['title'] . '</' . $title_size . '>';
18+
echo '<div class="widget title">';
19+
echo '<' . $title_size . ' class="' . $class_centered . $class_vertical_space . '">' . $instance['title'] . '</' . $title_size . '>';
20+
echo '</div>';
1921
}
2022

2123
function update( $new_instance, $old_instance ) {

0 commit comments

Comments
 (0)