Commit 5d8b5cd8 authored by agnez's avatar agnez

rss pour rcr wip

parent 10038f1e
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before
"trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.www.gasap.be"]);
_paq.push(["setDomains", ["*.www.gasap.be","*.gasap.be"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//piwik.domainepublic.net/";
_paq.push(['setTrackerUrl', u+'piwwik.php']);
_paq.push(['setSiteId', '20']);
var d=document, g=d.createElement('script'),
s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true;
g.src=u+'piwwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//piwik.domainepublic.net/piwwik.php?idsite=20&rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
\ No newline at end of file
......@@ -13,5 +13,4 @@ function mk_unregister_default_widgets() {
add_action( 'widgets_init', 'gasap_widget_area' );
function gasap_widget_area() {
beans_deregister_widget_area( 'sidebar_secondary' );
}
}
\ No newline at end of file
<?php
// Language please!
load_child_theme_textdomain( 'beans_gasap', get_stylesheet_directory() . '/languages/' );
......
......@@ -530,6 +530,14 @@ main .uk-container{
padding-top: @global-grid-gutter-large;
padding-bottom: @global-grid-gutter-large;
}
#snippet_contact_prod{
.wpcf7-recaptcha > div{
margin: 0 auto;
div{
background-color: white;
}
}
}
#snippet_contact_calendrier{
background-color: @bleu-ciel;
padding: 3em 0;
......@@ -573,13 +581,20 @@ main .uk-container{
}
#nl_form{
background-color: @global-muted-color;
border: 1px solid white;
//border: 1px solid white;
margin-top: 1.5em;
span.wpcf7-form-control-wrap{
height: 0;
}
input{
display: inline;
background-color: @global-muted-color;
border:none;
border: white 1px solid;
border-radius: 0;
color:white;
&[type=email]{
border-width: 0 0 1px;
}
}
.uk-form-icon{
float: right;
......
......@@ -33,14 +33,7 @@
<h4><?php esc_html_e( 'Nous suivre', 'beans_gasap' ) ?></h4>
<div><?php esc_html_e( 'Inscrivez-vous &agrave; notre newsletter pour recevoir nos prochaines actualités.', 'beans_gasap' ) ?></div>
<div id="nl_form">
<form class="uk-form" method="post" action="#">
<input type="email" name="EMAIL" placeholder="<?php esc_html_e( 'Votre adresse mail', 'beans_gasap' ) ?>" required />
<span class="uk-form-icon">
<i class="uk-icon-long-arrow-right"></i>
<input type="submit" value="" name="sub" id="sub" />
</span>
<?php do_action(google_invre_render_widget_action); ?>
</form>
<?php echo do_shortcode( '[contact-form-7 id="963" title="newsletter"]' ); ?>
</div>
</div>
<div class="uk-width-1 uk-width-medium-1-3">
......
<?php
// Include Beans. Do not remove the line below.
require_once( get_template_directory() . '/lib/init.php' );
......@@ -8,6 +7,29 @@ function gasap_setup() {
load_child_theme_textdomain( 'beans_gasap', get_stylesheet_directory() . '/languages' );//Loads the child theme textdomain.
}
/* Thumbnail upscale
/* ------------------------------------
*http://alxmedia.se/code/2013/10/thumbnail-upscale-correct-crop-in-wordpress/#comment-106069
*/
//casse les formats carrés
//add_filter( 'image_resize_dimensions', 'alx_thumbnail_upscale', 10, 6 );
function alx_thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ){
if ( !$crop ) return null; // let the wordpress default function handle this
$aspect_ratio = $orig_w / $orig_h;
$size_ratio = max($new_w / $orig_w, $new_h / $orig_h);
$crop_w = round($new_w / $size_ratio);
$crop_h = round($new_h / $size_ratio);
$s_x = floor( ($orig_w - $crop_w) / 2 );
$s_y = floor( ($orig_h - $crop_h) / 2 );
return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );
}
/* Image formats */
add_action( 'after_setup_theme', 'gasap_formats', 20 );
function gasap_formats(){
......@@ -48,6 +70,12 @@ function gasap_js_scripts() {
wp_localize_script( 'gasap_trois_prod', 'gasap_frontend_ajax',array('ajaxurl' => admin_url( 'admin-ajax.php' ),));
}
add_action( 'beans_head', 'embed_google_script' );
function embed_google_script(){
echo '<script src="https://www.google.com/recaptcha/api.js"></script>';
}
//TODO encore besoin ?
add_action( 'wp_ajax_gasap_activepost', 'gasap_get_activepost' );
add_action( 'wp_ajax_nopriv_gasap_activepost', 'gasap_get_activepost' );
......@@ -130,9 +158,8 @@ function gasap_force_layout() {
}
add_action( 'beans_head', 'gasap_add_font' );
function gasap_add_font() {?>
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
<?php
function gasap_add_font() {
?><link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet"><?php
}
// ?? ça fait quoi ça encore ?
......@@ -249,8 +276,6 @@ function gasap_gmw_modify_taxonomy( $args, $gmw, $taxonomy ) {
}
add_filter( 'shortcode_atts_wpcf7', 'custom_shortcode_atts_wpcf7_filter', 10, 3 );
function custom_shortcode_atts_wpcf7_filter( $out, $pairs, $atts ) {
$attr_mailreferent = 'email-referent';
......@@ -263,5 +288,4 @@ function custom_shortcode_atts_wpcf7_filter( $out, $pairs, $atts ) {
return $out;
}
// -----------
// -----------
\ No newline at end of file
......@@ -19,12 +19,10 @@ function gasap_latest_news() {
<div class="uk-overlay-panel uk-overlay-background uk-text-center">
<h3 class="uk-article-title"><?php the_title(); ?></h3>
</div>
<a class="uk-position-cover" href="<?php echo get_the_permalink(); ?>"></a>
</figure><?php
} else{?>
<h1 class="uk-article-title"><?php the_title(); ?></h1><?php
} ?>
<div class="postdate"><?php esc_html_e( 'Publié le ', 'beans_gasap' ); echo date_i18n( get_option( 'date_format' )); ?></div>
<div class="largeur1">
<div><?php the_content(); ?></div>
<?php edit_post_link( esc_html__( 'Edit news', 'beans_gasap' ), '<span class="edit-link">', '</span>' ); ?>
......
......@@ -25,12 +25,10 @@ function titre_avec_ou_sans_image($content) {
<div class="uk-overlay-panel uk-overlay-background uk-text-center">
<h3 class="uk-article-title"><?php the_title(); ?></h3>
</div>
<a class="uk-position-cover" href="<?php echo get_the_permalink(); ?>"></a>
</figure><?php
} else{?>
<h1 class="uk-article-title"><?php the_title(); ?></h1><?php
} ?>
<div class="postdate"><?php esc_html_e( 'Publié le ', 'beans_gasap' ); echo date_i18n( get_option( 'date_format' )); ?></div><?php
}
return $content;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment