-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
265 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.2.10 | ||
1.2.11 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: epfl\n" | ||
"POT-Creation-Date: 2018-10-04 13:01+0200\n" | ||
"PO-Revision-Date: 2018-10-04 13:02+0200\n" | ||
"PO-Revision-Date: 2018-10-09 17:53+0200\n" | ||
"Last-Translator: Charmier Grégory <[email protected]>\n" | ||
"Language-Team: \n" | ||
"Language: fr_FR\n" | ||
|
@@ -275,6 +275,15 @@ msgstr "" | |
msgid "School" | ||
msgstr "" | ||
|
||
msgid "Map" | ||
msgstr "Plan" | ||
|
||
msgid "Social feed" | ||
msgstr "Réseaux sociaux" | ||
|
||
msgid "Infoscience search" | ||
msgstr "Recherche Infoscience" | ||
|
||
#~ msgid "at publisher" | ||
#~ msgstr "Consulter chez l'éditeur" | ||
|
||
|
@@ -329,9 +338,6 @@ msgstr "" | |
#~ msgid "Datasets" | ||
#~ msgstr "Echantillons de données" | ||
|
||
#~ msgid "Social feed" | ||
#~ msgstr "Réseaux sociaux" | ||
|
||
#, fuzzy | ||
#~ msgid "Faculty" | ||
#~ msgstr "Template pour les sites de facultés (avec 4 actualités)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,50 @@ | ||
<?php | ||
$title = get_query_var('epfl_card_title'); | ||
$text = get_query_var('epfl_card_text'); | ||
$link = get_query_var('epfl_card_link'); | ||
$image = get_query_var('epfl_card_image'); | ||
?> | ||
$data = get_query_var('epfl_cards'); | ||
|
||
if (!$data) return true; | ||
|
||
<a href="<?php echo esc_url($link) ?>" class="card link-trapeze-horizontal"> | ||
<?php if ($image): ?> | ||
<picture class="card-img-top"> | ||
<img src="<?php echo esc_url($image) ?>" class="img-fluid" title="<?php echo esc_attr($title) ?>" alt="<?php echo esc_attr($title) ?>" /> | ||
</picture> | ||
<?php endif ?> | ||
<div class="card-body"> | ||
<h3 class="card-title"><?php echo esc_html($title) ?></h3> | ||
<p><?php echo esc_html($text) ?></p> | ||
$elementCount = 0; | ||
for($i = 1; $i < 4; $i++){ | ||
if (strlen(sanitize_text_field($data['title'.$i])) > 0) { | ||
$elementCount++; | ||
} | ||
} | ||
?> | ||
<?php if ($elementCount > 1): ?> | ||
<div class="container my-3"> | ||
<div class="card-deck <?php echo ($elementCount < 3) && ($elementCount > 1) ? ' card-deck-line' : '' ?>"> | ||
<?php endif ?> | ||
<?php | ||
for($i = 1; $i < 4; $i++): | ||
if ($data['title'.$i]) : | ||
$image = get_post($data['image'.$i]); | ||
?> | ||
<div class="card"> | ||
<?php if ($data['image'.$i]): ?> | ||
<a href="<?php echo esc_url($data['url'.$i]) ?: '#' ?>" class="card-img-top"> | ||
<picture class="card-img-top"> | ||
<?php echo wp_get_attachment_image( | ||
$data['image'.$i], | ||
'thumbnail_16_9_crop', // see functions.php | ||
'', | ||
[ | ||
'class' => 'img-fluid', | ||
'title' => $image->post_excerpt | ||
] | ||
) ?> | ||
</picture> | ||
</a> | ||
<?php endif; ?> | ||
<div class="card-body"> | ||
<div class="card-title"><a href="<?php echo esc_url($data['url'.$i]) ?: '#' ?>" class="h3"><?php echo esc_html($data['title'.$i]) ?: '' ?></a></div> | ||
<p><?php echo wp_kses_post(urldecode($data['content'.$i])) ?: '' ?></p> | ||
</div> | ||
</div> | ||
<?php | ||
endif; | ||
endfor; | ||
?> | ||
<?php if ($elementCount > 1): ?> | ||
</div> | ||
</a> | ||
</div> | ||
<?php endif ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
/** | ||
* 3rd argument is the priority, higher means executed first | ||
* 4rth argument is number of arguments the function can accept | ||
**/ | ||
|
||
add_action('epfl_contact_action', 'renderContact', 10, 1); | ||
|
||
function renderContact($args) { | ||
if (is_admin()) { | ||
// render placeholder for backend editor | ||
set_query_var('epfl_placeholder_title', 'Contact'); | ||
get_template_part('shortcodes/placeholder'); | ||
} else { | ||
set_query_var('epfl_contact-data', $args); | ||
get_template_part('shortcodes/epfl_contact/view'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
$data = get_query_var('epfl_contact-data'); | ||
$gray_wrapper = $data['gray_wrapper']; | ||
?> | ||
|
||
<div class="container-full <?php echo ($gray_wrapper) ? 'bg-gray-100 py-2 my-5' : 'my-3'; ?>"> | ||
<?php if ($gray_wrapper): ?> | ||
<div class="bg-white p-4 p-md-5"> | ||
<?php endif; ?> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
<h3>Contact</h3> | ||
<p><?php esc_html_e($data['introduction']) ?></p> | ||
|
||
<?php for ($i=1; $i < 5; $i++): ?> | ||
<?php if ($data['timetable'.$i]): ?> | ||
<div class="card card-body card-sm mb-2 flex-row flex-wrap justify-content-between justify-content-sm-start"> | ||
<div class="mr-3 w-sm-50"><?php echo $data['timetable'.$i] ?: '' ?></div> | ||
</div> | ||
<?php | ||
endif; | ||
endfor; | ||
?> | ||
<?php for ($i=1; $i < 4; $i++): ?> | ||
<?php if ($data['information'.$i]): ?> | ||
<p><?php echo wp_kses_post(urldecode($data['information'.$i])) ?: '' ?></p> | ||
<?php if ($data['information'.($i+1)]): ?> | ||
<hr> | ||
<?php endif; ?> | ||
<?php | ||
endif; | ||
endfor; | ||
?> | ||
</div> | ||
<?php if ($data['map_query']): ?> | ||
<div class="col-md-6 d-flex flex-column"> | ||
<?php echo do_shortcode( '[epfl_map lang="' .pll_current_language(). '" query="'. $data['map_query'] .'"]' ); ?> | ||
<?php endif; ?> | ||
</div> | ||
<?php if ($gray_wrapper): ?></div><?php endif; ?> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.