Skip to content

Instantly share code, notes, and snippets.

Avatar

Jean Luc Houedanou jhouedanou

View GitHub Profile
View list.js
<script type="text/javascript">
require(['jquery', 'cookie'], function($) {
$(document).ready(function() {
if ($("body").hasClass("page-products")) {
//si l'user click sur la photo, creer un cookie
$('.product-item-info').each(function() {
$(this).click(function() {
var moupe = $(this).find('.swatch-option.color.selected');
var tangoyi = moupe.attr("id");
View body.html
body {
max-width: 1280px;
margin: 58px auto 0;
background-image: url(https://dummyimage.com/800/400);}
@jhouedanou
jhouedanou / hashlink.md
Last active Jul 7, 2020
Instructions pour ajouter un hashlink vers la section 'user generated content'
View hashlink.md
View Wp.code-snippets
{
"acfdate": {
"prefix": "acfdate",
"body": "\n $$date_d = get_field('jalon');\n $$y = substr($$date_d, 0, 4);\n $$m = substr($$date_d, 4, 2);\n $$d = substr($$date_d, 6, 2);\n $$time_d = strtotime(\"{$$d}-{$$m}-{$$y}\");\n echo date('Y', $$time_d);\n",
"description": "",
"scope": ""
},
"activetrailhome": {
"prefix": "activetrailhome",
"body": "\n function YOURTHEMENAME_menu_link($$variables) {\n\n $$element = $$variables['element'];\n $$sub_menu = '';\n\n if ($$element['#href'] == '' && drupal_is_front_page()) {\n $$element['#attributes']['class'][] = 'active-trail';\n }\n\n if ($$element['#below']) {\n $$sub_menu = drupal_render($$element['#below']);\n }\n $$output = l($$element['#title'], $$element['#href'], $$element['#localized_options']);\n return '' . $$output . $$sub_menu . \"\\n\";\n}",
View header.html
<script src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="jquery.instagramFeed.min.js"></script>
<script src="scripts/index.js"></script>
@jhouedanou
jhouedanou / vscodesnippets.json
Created Oct 22, 2019
Wordpress Snippets for Visual Studio Code
View vscodesnippets.json
{
"acfdate": {
"prefix": "acfdate",
"body": "\n $date_d = get_field('jalon');\n $y = substr($date_d, 0, 4);\n $m = substr($date_d, 4, 2);\n $d = substr($date_d, 6, 2);\n $time_d = strtotime(\"{$d}-{$m}-{$y}\");\n echo date('Y', $time_d);\n",
"description": "",
"scope": ""
},
"activetrailhome": {
"prefix": "activetrailhome",
"body": "\n function YOURTHEMENAME_menu_link($variables) {\n\n $element = $variables['element'];\n $sub_menu = '';\n\n if ($element['#href'] == '' && drupal_is_front_page()) {\n $element['#attributes']['class'][] = 'active-trail';\n }\n\n if ($element['#below']) {\n $sub_menu = drupal_render($element['#below']);\n }\n $output = l($element['#title'], $element['#href'], $element['#localized_options']);\n return '' . $output . $sub_menu . \"\\n\";\n}",
View comptearebours.html
<div class="iframe-container" style=".iframe-container {
position: relative;
overflow: hidden;
padding-top: 56.25%;
}">
<iframe src="https://compteur.socity.ci/" style="border:0px #ffffff none;" name="myiFrame" scrolling="no" frameborder="1" marginheight="0px" marginwidth="0px" height="800px" width="100%" allowfullscreen></iframe>
</div>
View social.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- images pour facebook -->
<!-- titre de larticle -->
<meta property="og:title" content="">
<!-- extrait de l'article -->
<meta property="og:description" content="">
<!-- miniature de l'article -->
View Rainbowth.sublime-settings
{
"languages": ["lisp", "scheme", "clojure", "clojurescript", "hylang","html","php","js","twig","tpl"],
"palettes":
{
"default": ["#ff6188", "#fc9867", "#ffd866", "#a9dc76", "#78dce8", "#ab9df2", "#ff6188"],
"Tomorrow Night": ["#c66", "#de935f", "#ee6", "#b5bd68", "#81a2be", "#b294bb", "#ff69b4", "#8a2be2"],
"Monokai": ["#AE81FF", "#66D9EF", "#A6E22E", "#FD971F", "#F92672"],
"Monokai Pro": ["#ff6188", "#fc9867", "#ffd866", "#a9dc76", "#78dce8", "#ab9df2", "#ff6188"]a
a
},
View lang.php
<?php
$current_lang = WPGlobus::Config()->language;
if($current_lang == "fr"){
?>
<?php }else if($current_lang == "en"){?>
<?php
}