Skip to content

Commit

Permalink
1st commit
Browse files Browse the repository at this point in the history
  • Loading branch information
oguilleux committed Sep 11, 2018
0 parents commit c9628e4
Show file tree
Hide file tree
Showing 86 changed files with 18,576 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .eslintrc
@@ -0,0 +1,21 @@
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["babel"],
"extends": ["airbnb/base"],
"env": {
"browser": true,
"jquery": true,
"es6": true
},
"globals": {
"Promise": true,
},
"rules": {
"indent": [2, "tab", {"SwitchCase": 1}],
"comma-dangle": 0
}
}
19 changes: 19 additions & 0 deletions .gitignore
@@ -0,0 +1,19 @@

# VAGRANT
.vagrant/

# IDE
/nbproject/
.idea/

# Composer
composer.phar
vendor/

# Project
.sass-cache
assets/dist/
bower_components/
node_modules/

_RESSOURCES/
4 changes: 4 additions & 0 deletions .idea/deployment.xml

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

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

20 changes: 20 additions & 0 deletions 404.php
@@ -0,0 +1,20 @@
<?php

get_header();

?>

<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<section>
<p>
<?php esc_attr_e('Error 404, Ooops ! Cette page n’existe pas !','textdomaintomodify'); ?>
</p>
</section>

</main><!-- #main -->
</div><!-- #primary -->

<?php
get_footer();
Empty file added assets/src/fonts/.gitkeep
Empty file.
Empty file added assets/src/img/.gitkeep
Empty file.
17 changes: 17 additions & 0 deletions assets/src/js/_generalScripts.js
@@ -0,0 +1,17 @@

class General {

constructor() {
this.setupEvents();
}

/**
* General.setupEvents
*/
setupEvents() {
// console.log('everything is ok !');
}

}

export default General;
23 changes: 23 additions & 0 deletions assets/src/js/main.js
@@ -0,0 +1,23 @@
// import 'jquery';
import GeneralScripts from './_generalScripts';

const App = {

/**
* App.init
*/
init() {
// General scripts
function initGeneralScripts() {
return new GeneralScripts();
}
initGeneralScripts();
}

};

document.addEventListener('DOMContentLoaded', () => {
$(() => {
App.init();
});
});
36 changes: 36 additions & 0 deletions assets/src/scss/abstracts/_variables.scss
@@ -0,0 +1,36 @@

/**
* Colors
*
*/

// here the colors

/**
* Breakpoint slicer
*
* @see https://github.com/lolmaus/breakpoint-slicer
*/
$slicer-breakpoints-settings: true;
@if ( $slicer-breakpoints-settings == true ) {
$slicer-breakpoints: 0 576px 768px 992px 1200px 1600px;
$slicer-breakpoint-names: 'xs' 'sm' 'md' 'lg' 'xl' 'hd';
$slicer-anti-overlap-corrections: -1px;
}

/**
* Bootstrap customised
*
*/
$font-size-base:1.4rem;
$font-weight-base:300;
$font-family-base: 'Ubuntu', "Helvetica Neue", Helvetica, Arial, sans-serif;
$btn-transition: color .3s ease-in-out, background-color .3s ease-in-out, border-color .3s ease-in-out, box-shadow .3s ease-in-out;
$border-radius:.4rem;
$primary:blue;
$btn-box-shadow:none;
$btn-active-box-shadow:none;
$btn-focus-box-shadow:none;
$input-btn-focus-box-shadow:none;
$input-border-radius:0;

32 changes: 32 additions & 0 deletions assets/src/scss/base/_base.scss
@@ -0,0 +1,32 @@

html {
font-size: 62.5%;
-ms-text-size-adjust: 100%;
}

html, body {
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
}

body {
font-size: 1.4rem;
}

a,
a:hover,
a:focus,
a:active {
color: inherit;
text-decoration: none;
}

*, *:hover, *:focus {
outline:0 !important;
}

.transition, %transition {
transition:all 0.3s ease-in-out;
}
Empty file.
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions assets/src/scss/layout/_footer.scss
@@ -0,0 +1,4 @@

.site-footer {

}
Empty file.
Empty file.
4 changes: 4 additions & 0 deletions assets/src/scss/layout/_header.scss
@@ -0,0 +1,4 @@

.site-header {

}
35 changes: 35 additions & 0 deletions assets/src/scss/main.scss
@@ -0,0 +1,35 @@

// dependencies
@import "node_modules/breakpoint-sass/stylesheets/breakpoint",
"node_modules/breakpoint-slicer/stylesheets/breakpoint-slicer";

// abstracts
@import "abstracts/variables";

// vendors
@import "node_modules/bootstrap/scss/bootstrap";

// vendors overrides
// @import "vendor-overrides/myvendor";

// base
@import "base/fonts",
"base/base";

// layout
@import "layout/header",
"layout/footer",
"layout/forms",
"layout/grid";

// components
@import "components/buttons",
"components/modal";

// pages
@import "pages/front-page",
"pages/page";

// template-parts
// @import "template-parts/mytemplatepart";

4 changes: 4 additions & 0 deletions assets/src/scss/pages/_front-page.scss
@@ -0,0 +1,4 @@

.home {

}
4 changes: 4 additions & 0 deletions assets/src/scss/pages/_page.scss
@@ -0,0 +1,4 @@

.page-template-default {

}
Empty file.
Empty file.
Empty file added assets/src/svg/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions composer.json
@@ -0,0 +1,5 @@
{
"name": "olibitbucket/blankthemewebpack",
"description": "Blank Theme with Gulp and Webpack",
"type": "wordpress-theme"
}
3 changes: 3 additions & 0 deletions configure/acf.php
@@ -0,0 +1,3 @@
<?php

// ACF functions here
3 changes: 3 additions & 0 deletions configure/admin.php
@@ -0,0 +1,3 @@
<?php

// Admin functions here
78 changes: 78 additions & 0 deletions configure/configure.php
@@ -0,0 +1,78 @@
<?php

// MENUS

function _custom_theme_register_menu()
{
register_nav_menus(
array(
'menu-main' => __( 'Menu principal' ),
//'menu-footer' => __( 'Menu footer' ),
)
);
}
add_action( 'init', '_custom_theme_register_menu' );

// IMAGES

add_theme_support( 'post-thumbnails' );

function _custom_theme_init_images_size()
{
//add_image_size( '424x424', 424, 424, true );
//add_image_size( '1920', 1920, 9999 );
}
add_action( 'init', '_custom_theme_init_images_size' );

/*
* Let WordPress manage the document title.
* By adding theme support, we declare that this theme does not use a
* hard-coded <title> tag in the document head, and expect WordPress to
* provide it for us.
*/
add_theme_support( 'title-tag' );

// Giving credits
function remove_footer_admin () {
echo 'Thème crée par <a href="http://www.olivier-guilleux.com" target="_blank">Olivier Guilleux</a>';
}
add_filter('admin_footer_text', 'remove_footer_admin');

// Move Yoast to bottom
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');

// Remove WP Emoji
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');

remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );

// delete wp-embed.js from footer
function my_deregister_scripts(){
wp_deregister_script( 'wp-embed' );
}
add_action( 'wp_footer', 'my_deregister_scripts' );

// delete jquery migrate
function dequeue_jquery_migrate( &$scripts){
if(!is_admin()){
$scripts->remove( 'jquery');
// $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );
}
}
add_filter( 'wp_default_scripts', 'dequeue_jquery_migrate' );

// add SVG to allowed file uploads
function add_file_types_to_uploads($file_types){

$new_filetypes = array();
$new_filetypes['svg'] = 'image/svg+xml';
$file_types = array_merge($file_types, $new_filetypes );

return $file_types;
}
add_action('upload_mimes', 'add_file_types_to_uploads');
12 changes: 12 additions & 0 deletions configure/js-css.php
@@ -0,0 +1,12 @@
<?php
function _add_javascript()
{
wp_enqueue_script('main-js', get_template_directory_uri() . '/assets/dist/js/main.js', array(), null, true );
}
add_action('wp_enqueue_scripts', '_add_javascript', 100);

function _add_stylesheets()
{
wp_enqueue_style('main-css', get_template_directory_uri() . '/assets/dist/css/main.css', array(), null, 'all' );
}
add_action('wp_enqueue_scripts', '_add_stylesheets');
3 changes: 3 additions & 0 deletions configure/shortcodes.php
@@ -0,0 +1,3 @@
<?php

// Shortcode functions here
Empty file added configure/utilities.php
Empty file.
12 changes: 12 additions & 0 deletions footer.php
@@ -0,0 +1,12 @@

</div><!-- #content -->

<footer id="colophon" class="site-footer" role="contentinfo">

</footer><!-- #colophon -->
</div><!-- #page -->

<?php wp_footer(); ?>

</body>
</html>

0 comments on commit c9628e4

Please sign in to comment.