Skip to content

Commit

Permalink
Merge pull request #7 from InternetSocietyChapters/feature/read-all-news
Browse files Browse the repository at this point in the history
Feature/read all news
  • Loading branch information
InternetSocietyChapters authored Apr 5, 2017
2 parents 07deed5 + c3490cd commit 7f4a6be
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 42 deletions.
47 changes: 38 additions & 9 deletions dist/css/app.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/app.min.css

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions front-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
?>

<article id="post-<?php echo $oPost->ID; ?>">

<h2><?php echo get_the_title( $oPost->ID ); ?></h2>

<?php
if ( has_post_thumbnail($oPost->ID) ) {
echo get_the_post_thumbnail($oPost->ID, 'square');
}
}
?>

<div class="entry">
Expand All @@ -35,6 +35,13 @@
</article>

<?php endforeach; ?>
<?php
$postId = wp_get_post_categories($aPosts[0]->ID);
$postCategory = get_category($postId[0])->slug;
?>
<div class="see-all">
<a class="btn btn-primary btn-lg" href="<?php echo '/' . $postCategory ?>"><?php _e('Meer nieuws', 'od') ?></a>
</div>
</section>

<?php if( is_active_sidebar('sidebar_home') ) : ?>
Expand Down
3 changes: 3 additions & 0 deletions src/sass/modules/_see-all.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.see-all {
padding: gutter-sm() gutter();
}
63 changes: 33 additions & 30 deletions src/sass/utilities/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
// Cross-resolution style setting
// h1 {
// @include set(font-size, (xs: 20px, sm: 24px, md: 24px, lg: 30px) );
// @include set(font-size, (xs: 20px, sm: 24px, md: 24px, lg: 30px) );
// }
@mixin set($property, $map) {
@each $item, $i in $map {
& {
@if( $item == 'xs') {
@media (max-width: $screen-xs-max) {
#{$property}: $i;
}
}
}
@if( $item == 'sm') {
@media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
#{$property}: $i;
}
}
}
@if( $item == 'md') {
@media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
#{$property}: $i;
}
}
}
@if( $item == 'lg') {
@media (min-width: $screen-lg) {
#{$property}: $i;
}
}
}
}
}
}
}

// mixin for centering horizontally
Expand All @@ -36,7 +36,7 @@
margin-right: auto;
}

/*
/*
.box {
@include center-element;
}
Expand All @@ -50,7 +50,7 @@
justify-content: center;
}

/*
/*
.box {
@include vertically-centred;
}
Expand All @@ -66,7 +66,7 @@
left: $left;
}

/*
/*
.box {
@include position(absolute, 10px, 10px, 10px, 10px);
}
Expand All @@ -88,47 +88,47 @@
// for use by specific screen size
@mixin respond-to($media) {
@if( $media == 'xs' ) {
@media only screen and (max-width: $screen-xs-max) {
@media only screen and (max-width: $screen-xs-max) {
@content;
}
}
@else if( $media == 'sm' ) {
@media only screen and (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
@content;
@media only screen and (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
@content;
}
}
@else if( $media == 'md' ) {
@media only screen and (min-width: $screen-md-min) and (max-width: $screen-md-max) {
@content;
@media only screen and (min-width: $screen-md-min) and (max-width: $screen-md-max) {
@content;
}
}
@else if( $media == 'lg' ) {
@media only screen and (min-width: $screen-lg-min) {
@content;
@media only screen and (min-width: $screen-lg-min) {
@content;
}
}
}

// for min width usage
@mixin min-width($media) {
@if( $media == 'xs' ) {
@media only screen and (min-width: $screen-xs-min) {
@content;
@media only screen and (min-width: $screen-xs-min) {
@content;
}
}
@if( $media == 'sm' ) {
@media only screen and (min-width: $screen-sm-min) {
@content;
@media only screen and (min-width: $screen-sm-min) {
@content;
}
}
@else if( $media == 'md' ) {
@media only screen and (min-width: $screen-md-min) {
@content;
@media only screen and (min-width: $screen-md-min) {
@content;
}
}
@else if( $media == 'lg' ) {
@media only screen and (min-width: $screen-lg-min) {
@content;
@media only screen and (min-width: $screen-lg-min) {
@content;
}
}
}
Expand All @@ -146,7 +146,7 @@
::-webkit-input-placeholder {@content}
:-moz-placeholder {@content}
::-moz-placeholder {@content}
:-ms-input-placeholder {@content}
:-ms-input-placeholder {@content}
}

// usage:
Expand All @@ -157,9 +157,9 @@
// }

// page color mixin
// mixin for the pages
// mixin for the pages
@mixin page-color($color) {

background-color: lighten($color, 5%);

a {
Expand All @@ -179,7 +179,7 @@
li.widget:nth-of-type(odd) {
background-color: $color;
}

li.widget:nth-of-type(even) {
background-color: lighten($color, 5%);
}
Expand All @@ -198,11 +198,14 @@
background-color: lighten($color, 12%);
}
}
.see-all {
background-color: lighten($color, 12%);
}

section.items {
background-color: lighten($color, 8%);
overflow: hidden;

}

table {
Expand All @@ -218,4 +221,4 @@
a {
color: #fff;
}
}
}

0 comments on commit 7f4a6be

Please sign in to comment.