Skip to content

Commit

Permalink
Merge branch 'release/1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
knuch committed Aug 21, 2018
2 parents d2d2e65 + 2aab840 commit 384b528
Show file tree
Hide file tree
Showing 62 changed files with 96 additions and 20 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

# CHANGELOG

*1.1.2* (2018-08-21)
- merge QA science shortcode
- implement styleguide version (1.1.2)
- fix breadcrumbs on level 0 pages
- fix main nav classes
- remove close cross in menu
- enable excerpt for pages

*1.1.1* (2018-08-13)
- implement styleguide version (1.1.1)
- fix main nav on post detail page
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.1
1.1.2
10 changes: 5 additions & 5 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@

?>

<div class="nav-layout-toggle">
<div class="nav-toggle-layout">
<?php get_sidebar(); ?>

<div class="container">
<div class="row">
<div class="col-12">
<?php the_archive_title( '<h1 class="mb-5">', '</h1>' ); ?>
<?php the_archive_title( '<h1>', '</h1>' ); ?>
</div>

<aside class="col-md-3">
<aside class="col-md-3 mt-5">
<?php get_template_part( 'template-parts/categories', 'list' ) ?>
<?php get_template_part( 'template-parts/archives', 'list' ) ?>
</aside>

<main id="content" role="main" class="content col-md-9">
<main id="content" role="main" class="content col-md-9 mt-5">
<div class="list-group">
<?php
if (have_posts()) :
Expand All @@ -44,4 +44,4 @@
<!-- nav-toggle -->

<?php
get_footer();
get_footer();
2 changes: 1 addition & 1 deletion assets/css/base.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/icons/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/accessibility.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/basic_page_teaser.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/event_teaser_highlight.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/event_teaser_large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/gallery_01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/gallery_02.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/gallery_03.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/gallery_04.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/gallery_05.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/gallery_06.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/gallery_07.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/thumb_01.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/thumb_02.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/thumb_03.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/thumb_04.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/thumb_05.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/thumb_06.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/gallery/thumb_07.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icon-accessibility.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/illustrations/animation-clarity.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/illustrations/color-palette-teaser.png
Binary file added assets/images/illustrations/three.png
Binary file added assets/images/illustrations/typography-teaser.png
Binary file modified assets/images/shortcode-icons/article_highlight.png
Binary file modified assets/images/shortcode-icons/article_list.png
Binary file modified assets/images/shortcode-icons/contact.png
Binary file modified assets/images/shortcode-icons/custom_teasers.png
Binary file modified assets/images/shortcode-icons/default.png
Binary file modified assets/images/shortcode-icons/definiton_list.png
Binary file modified assets/images/shortcode-icons/faculty.png
Binary file modified assets/images/shortcode-icons/hero.png
Binary file modified assets/images/shortcode-icons/introduction.png
Binary file modified assets/images/shortcode-icons/links_block.png
Binary file modified assets/images/shortcode-icons/links_teaser.png
Binary file modified assets/images/shortcode-icons/map.png
Binary file modified assets/images/shortcode-icons/page_highlight.png
Binary file modified assets/images/shortcode-icons/page_teaser.png
Binary file modified assets/images/shortcode-icons/teaser_news.png
Binary file modified assets/images/shortcode-icons/toggle.png
5 changes: 5 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,8 @@ function get_archives_link_mod ( $link_html ) {
return $string;
}
add_filter("get_archives_link", "get_archives_link_mod");

/**
* enable excerpts for pages
*/
add_post_type_support( 'page', 'excerpt' );
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
<div class="row">

<div class="col-12">
<h1 class="mb-5">
<h1>
<?php echo(apply_filters( 'the_title', get_the_title( get_option( 'page_for_posts' )))); ?>
</h1>
</div>

<aside class="col-md-3">
<aside class="col-md-3 mt-5">
<?php get_template_part( 'template-parts/categories', 'list' ) ?>
<?php get_template_part( 'template-parts/archives', 'list' ) ?>
</aside>

<main id="content" role="main" class="content col-md-9">
<main id="content" role="main" class="content col-md-9 mt-5">
<div class="list-group">
<?php
if (have_posts()) :
Expand Down
2 changes: 1 addition & 1 deletion shortcodes/custom_highlight/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
?>

<div class="container-full">
<div class="fullwidth-teaser mb-5 <?php echo $classes; ?>">
<div class="fullwidth-teaser mt-5 <?php echo $classes; ?>">
<picture>
<?php echo wp_get_attachment_image(
$data['image'],
Expand Down
25 changes: 25 additions & 0 deletions shortcodes/epfl_scienceqa/controller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

/**
* 1 (3rd argument) is the priority, higher means executed first
* 1 (4rth argument) is number of arguments the function can accept
**/
add_action('epfl_scienceqa_action', 'renderEpflScienceQA', 1, 1);

function renderEpflScienceQA($item) {
ob_start();

if (is_admin()) {

// render placeholder for backend editor
set_query_var('epfl_placeholder_title', 'EPFL Science Q&A');
get_template_part('shortcodes/placeholder');

} else {

set_query_var('epfl_scienceqa_data', $item);
get_template_part('shortcodes/epfl_scienceqa/view');

}
return ob_end_flush();
}
39 changes: 39 additions & 0 deletions shortcodes/epfl_scienceqa/view.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
$data = get_query_var('epfl_scienceqa_data');
$url_form = '//qi.epfl.ch/' . $data->locale . '/question/show/' . esc_attr( $data->id ). '/';
?>
<div class="container-full">
<div class="question">
<div class="question-img">
<picture>
<img src="<?php echo $data->image ?>" class="img-fluid" alt="image">
</picture>
</div>
<div class="question-content">
<h2 class="question-title"><?php esc_html_e('Question de science', 'epfl-shortcodes') ?></h2>
<h2 class="question-subtitle mt-3 mb-0"><?php echo $data->question ?></h2>
<form action="<?php echo $url_form ?>" method="POST">
<div class="question-answers mt-4">

<?php
$count = 1;
foreach($data->answers as $answerId => $answer) {
?>
<input type="radio" id="custom-radio<?php echo $count ?>" value="<?php echo $answerId ?>" name="customRadio" class="custom-control-input">
<label class="custom-control-label" for="custom-radio<?php echo $count ?>">
<span class="custom-control-label-content">
<?php echo $answer ?></span>
<span class="trapeze-horizontal d-none d-lg-block"></span>
<span class="trapeze-vertical d-lg-none"></span>
</label>
<?php
$count++;
}
?>

</div>
<input type="submit" class="btn btn-primary mt-4" value="<?php esc_html_e('Voter', 'epfl-shortcodes') ?>">
</form>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions shortcodes/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
*/

require_once(get_template_directory().'/shortcodes/templates/card-img-top.php');

require_once(get_template_directory().'/shortcodes/faculties/controller.php');
require_once(get_template_directory().'/shortcodes/definition_list/controller.php');
require_once(get_template_directory().'/shortcodes/introduction/controller.php');
require_once(get_template_directory().'/shortcodes/hero/controller.php');
require_once(get_template_directory().'/shortcodes/collapsable/controller.php');
require_once(get_template_directory().'/shortcodes/news/controller.php');
require_once(get_template_directory().'/shortcodes/page_teaser/controller.php');
require_once(get_template_directory().'/shortcodes/epfl_scienceqa/controller.php');
require_once(get_template_directory().'/shortcodes/post_teaser/controller.php');
require_once(get_template_directory().'/shortcodes/custom_teasers/controller.php');
require_once(get_template_directory().'/shortcodes/page_highlight/controller.php');
require_once(get_template_directory().'/shortcodes/post_highlight/controller.php');
require_once(get_template_directory().'/shortcodes/custom_highlight/controller.php');
require_once(get_template_directory().'/shortcodes/custom_highlight/controller.php');
4 changes: 2 additions & 2 deletions shortcodes/page_highlight/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
?>

<div class="container-full">
<div class="fullwidth-teaser mb-5 <?php echo $classes; ?>">
<div class="fullwidth-teaser mt-5 <?php echo $classes; ?>">
<?php if (has_post_thumbnail( $page )) : ?>
<picture>
<img src="<?php echo get_the_post_thumbnail_url($page) ?>" aria-labelledby="background-label" alt="An image description"
Expand Down Expand Up @@ -46,4 +46,4 @@
</div>
</div>
</div>
</div>
</div>
Loading

0 comments on commit 384b528

Please sign in to comment.