diff --git a/www/wp-content/themes/ation2016/functions.php b/www/wp-content/themes/ation2016/functions.php index 034876c..26e02a7 100755 --- a/www/wp-content/themes/ation2016/functions.php +++ b/www/wp-content/themes/ation2016/functions.php @@ -19,6 +19,7 @@ function __construct() { add_filter( 'get_twig', array( $this, 'add_to_twig' ) ); add_action( 'init', array( $this, 'register_post_types' ) ); add_action( 'init', array( $this, 'register_taxonomies' ) ); + add_action( 'wp_enqueue_scripts', array( $this, 'loadScripts' ) ); parent::__construct(); } @@ -51,6 +52,11 @@ function add_to_twig( $twig ) { return $twig; } + function loadScripts() { + wp_enqueue_style( 'main', get_template_directory_uri() . '/static/styles/site.min.css' ); + wp_enqueue_script( 'main', get_template_directory_uri() . '/static/scripts/main.min.js', array('jquery'), '1.0.0', true ); + } + } new StarterSite(); diff --git a/www/wp-content/themes/ation2016/gulpfile.js b/www/wp-content/themes/ation2016/gulpfile.js index 539eb08..64d6ddb 100644 --- a/www/wp-content/themes/ation2016/gulpfile.js +++ b/www/wp-content/themes/ation2016/gulpfile.js @@ -9,6 +9,7 @@ var imagemin = require('gulp-imagemin'), cache = require('gulp-cache'); var minifycss = require('gulp-minify-css'); var sass = require('gulp-sass'); +var sourcemaps = require('gulp-sourcemaps'); gulp.task('images', function(){ gulp.src('src/images/**/*') @@ -17,7 +18,8 @@ gulp.task('images', function(){ }); gulp.task('styles', function(){ - gulp.src(['src/styles/**/*.scss']) + gulp.src(['src/styles/site.scss']) + .pipe(sourcemaps.init()) .pipe(plumber({ errorHandler: function (error) { console.log(error.message); @@ -28,11 +30,13 @@ gulp.task('styles', function(){ .pipe(gulp.dest('static/styles/')) .pipe(rename({suffix: '.min'})) .pipe(minifycss()) + .pipe(sourcemaps.write()) .pipe(gulp.dest('static/styles/')) }); gulp.task('scripts', function(){ return gulp.src('src/scripts/**/*.js') + .pipe(sourcemaps.init()) .pipe(plumber({ errorHandler: function (error) { console.log(error.message); @@ -44,6 +48,7 @@ gulp.task('scripts', function(){ .pipe(gulp.dest('static/scripts/')) .pipe(rename({suffix: '.min'})) .pipe(uglify()) + .pipe(sourcemaps.write()) .pipe(gulp.dest('static/scripts/')) }); diff --git a/www/wp-content/themes/ation2016/src/images/logo.png b/www/wp-content/themes/ation2016/src/images/logo.png new file mode 100644 index 0000000..5f010a8 Binary files /dev/null and b/www/wp-content/themes/ation2016/src/images/logo.png differ diff --git a/www/wp-content/themes/ation2016/src/styles/components/_header.scss b/www/wp-content/themes/ation2016/src/styles/components/_header.scss new file mode 100644 index 0000000..331c023 --- /dev/null +++ b/www/wp-content/themes/ation2016/src/styles/components/_header.scss @@ -0,0 +1,4 @@ +.header-logo { + max-width: 300px; + display: block; +} \ No newline at end of file diff --git a/www/wp-content/themes/ation2016/src/styles/site.scss b/www/wp-content/themes/ation2016/src/styles/site.scss index 1b9729e..e86c782 100644 --- a/www/wp-content/themes/ation2016/src/styles/site.scss +++ b/www/wp-content/themes/ation2016/src/styles/site.scss @@ -1,5 +1,11 @@ $orange: orange; +@import 'type/typography'; + +@import 'components/header'; + +@import 'utility/images'; + .menu { color: $orange; } \ No newline at end of file diff --git a/www/wp-content/themes/ation2016/src/styles/type/_typography.scss b/www/wp-content/themes/ation2016/src/styles/type/_typography.scss new file mode 100644 index 0000000..6ddb969 --- /dev/null +++ b/www/wp-content/themes/ation2016/src/styles/type/_typography.scss @@ -0,0 +1,10 @@ +$header-font: 'Arial', sans-serif; +$body-font: 'Times New Roman', serif; + +h1, h2, h3, h4, h5, h6 { + font-family: $header-font; +} + +p, li, span { + font-family: $body-font; +} \ No newline at end of file diff --git a/www/wp-content/themes/ation2016/src/styles/utility/_images.scss b/www/wp-content/themes/ation2016/src/styles/utility/_images.scss new file mode 100644 index 0000000..dce9388 --- /dev/null +++ b/www/wp-content/themes/ation2016/src/styles/utility/_images.scss @@ -0,0 +1,5 @@ +img { + max-width: 100%; + display: block; + height: auto; +} \ No newline at end of file diff --git a/www/wp-content/themes/ation2016/static/images/logo.png b/www/wp-content/themes/ation2016/static/images/logo.png new file mode 100644 index 0000000..d87f000 Binary files /dev/null and b/www/wp-content/themes/ation2016/static/images/logo.png differ diff --git a/www/wp-content/themes/ation2016/static/scripts/main.min.js b/www/wp-content/themes/ation2016/static/scripts/main.min.js index b2b9856..700636b 100644 --- a/www/wp-content/themes/ation2016/static/scripts/main.min.js +++ b/www/wp-content/themes/ation2016/static/scripts/main.min.js @@ -1 +1,2 @@ -jQuery(document).ready(function(e){}); \ No newline at end of file +jQuery(document).ready(function(e){}); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1haW4uanMiXSwibmFtZXMiOlsialF1ZXJ5IiwiZG9jdW1lbnQiLCJyZWFkeSIsIiQiXSwibWFwcGluZ3MiOiJBQUFBQSxPQUFBQyxVQUFBQyxNQUFBLFNBQUFDIiwiZmlsZSI6Im1haW4ubWluLmpzIiwic291cmNlc0NvbnRlbnQiOlsialF1ZXJ5KCBkb2N1bWVudCApLnJlYWR5KCBmdW5jdGlvbiggJCApIHtcblxuICAvLyBNZW93XG5cbn0pOyJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== diff --git a/www/wp-content/themes/ation2016/static/styles/site.css b/www/wp-content/themes/ation2016/static/styles/site.css index 64b8995..76cdb59 100644 --- a/www/wp-content/themes/ation2016/static/styles/site.css +++ b/www/wp-content/themes/ation2016/static/styles/site.css @@ -1,2 +1,17 @@ +h1, h2, h3, h4, h5, h6 { + font-family: "Arial", sans-serif; } + +p, li, span { + font-family: "Times New Roman", serif; } + +.header-logo { + max-width: 300px; + display: block; } + +img { + max-width: 100%; + display: block; + height: auto; } + .menu { color: orange; } diff --git a/www/wp-content/themes/ation2016/static/styles/site.min.css b/www/wp-content/themes/ation2016/static/styles/site.min.css index d619bda..03f9403 100644 --- a/www/wp-content/themes/ation2016/static/styles/site.min.css +++ b/www/wp-content/themes/ation2016/static/styles/site.min.css @@ -1 +1,2 @@ -.menu{color:orange} \ No newline at end of file +h1,h2,h3,h4,h5,h6{font-family:Arial,sans-serif}li,p,span{font-family:"Times New Roman",serif}.header-logo{max-width:300px;display:block}img{max-width:100%;display:block;height:auto}.menu{color:orange} +/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInR5cGUvX3R5cG9ncmFwaHkuc2NzcyIsImNvbXBvbmVudHMvX2hlYWRlci5zY3NzIiwidXRpbGl0eS9faW1hZ2VzLnNjc3MiLCJzaXRlLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0EsR0FBQSxHQUFBLEdBQUEsR0FBQSxHQUFBLEdBQ0UsWUFBQSxNQUFBLFdBR0YsR0FBQSxFQUFBLEtBQ0UsWUFBQSxrQkFBQSxNQ1JGLGFBQ0UsVUFBQSxNQUNBLFFBQUEsTUNGRixJQUNFLFVBQUEsS0FDQSxRQUFBLE1BQ0EsT0FBQSxLQ0tGLE1BQ0UsTUFBQSIsImZpbGUiOiJzaXRlLm1pbi5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIkaGVhZGVyLWZvbnQ6ICdBcmlhbCcsIHNhbnMtc2VyaWY7XG4kYm9keS1mb250OiAnVGltZXMgTmV3IFJvbWFuJywgc2VyaWY7XG5cbmgxLCBoMiwgaDMsIGg0LCBoNSwgaDYge1xuICBmb250LWZhbWlseTogJGhlYWRlci1mb250O1xufVxuXG5wLCBsaSwgc3BhbiB7XG4gIGZvbnQtZmFtaWx5OiAkYm9keS1mb250O1xufSIsIi5oZWFkZXItbG9nbyB7XG4gIG1heC13aWR0aDogMzAwcHg7XG4gIGRpc3BsYXk6IGJsb2NrO1xufSIsImltZyB7XG4gIG1heC13aWR0aDogMTAwJTtcbiAgZGlzcGxheTogYmxvY2s7XG4gIGhlaWdodDogYXV0bztcbn0iLCIkb3JhbmdlOiBvcmFuZ2U7XG5cbkBpbXBvcnQgJ3R5cGUvdHlwb2dyYXBoeSc7XG5cbkBpbXBvcnQgJ2NvbXBvbmVudHMvaGVhZGVyJztcblxuQGltcG9ydCAndXRpbGl0eS9pbWFnZXMnO1xuXG4ubWVudSB7XG4gIGNvbG9yOiAkb3JhbmdlO1xufSJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ== */ diff --git a/www/wp-content/themes/ation2016/templates/base.twig b/www/wp-content/themes/ation2016/templates/base.twig index f589a1d..0931e55 100755 --- a/www/wp-content/themes/ation2016/templates/base.twig +++ b/www/wp-content/themes/ation2016/templates/base.twig @@ -10,9 +10,9 @@
{% block header %}
-

- {{site.name}} -

+