diff --git a/.editorconfig b/.editorconfig
index 8e6f9f8..c01f262 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -9,5 +9,8 @@ indent_size = 4
[*.{html,twig,yml}]
indent_size = 2
+[gulpfile.js]
+indent_size = 2
+
[Makefile]
indent_style = tab
diff --git a/gulpfile.js b/gulpfile.js
index 47f6595..5978527 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -9,6 +9,10 @@ const SASS_SOURCE_PATH = './source/_assets/**/*.scss';
const SASS_DEST_PATH = `./output_${ENV}`;
const SASS_FILE_NAME = 'app.css';
+const SCRIPT_SOURCE_PATH = './source/_assets/**/*.js';
+const SCRIPT_DEST_PATH = `./output_${ENV}`;
+const SCRIPT_FILE_NAME = 'app.js';
+
const SASS_OPTIONS = {
outputStyle: ENV === 'prod' ? 'compressed' : 'expanded',
};
@@ -24,6 +28,10 @@ gulp.task('build', function () {
.pipe(concat(SASS_FILE_NAME))
.pipe(gulp.dest(SASS_DEST_PATH))
;
+ gulp.src(SCRIPT_SOURCE_PATH)
+ .pipe(concat(SCRIPT_FILE_NAME))
+ .pipe(gulp.dest(SCRIPT_DEST_PATH))
+ ;
});
// gulp.task('build:watch', function () {
diff --git a/source/_assets/about-me.js b/source/_assets/about-me.js
new file mode 100644
index 0000000..1d906d7
--- /dev/null
+++ b/source/_assets/about-me.js
@@ -0,0 +1,36 @@
+(function() {
+ 'use strict';
+
+ var notes = [
+ 'Любимый фильм "Три идиота".',
+ 'Люблю кататься на велосипеде.',
+ 'Люблю читать фантастические книги.',
+ 'Люблю шоколад.',
+ 'На день рождения ко мне можно прийти без подарка.',
+ 'Не люблю пьяных людей.',
+ 'Предпочитаю ходить в кино на 2D-сеансы.',
+ 'Проехал на велосипеде 200 километров за день.',
+ 'Работаю программистом.',
+ 'Хотел бы побывать в горах.',
+ ];
+
+ function selectRandomNote() {
+ return notes[Math.floor(Math.random() * notes.length)];
+ }
+
+ function updateNode() {
+ document.getElementById('about-me-note').innerHTML = selectRandomNote();
+ }
+
+ function onKnowBetter(event) {
+ event.preventDefault();
+ if (window.yaCounter41913764) {
+ window.yaCounter41913764.hit(location.href);
+ }
+ updateNode();
+ }
+
+ window.addEventListener('DOMContentLoaded', updateNode);
+ document.getElementById('know-better').addEventListener('click', onKnowBetter);
+
+}());
diff --git a/source/_layouts/default.html.twig b/source/_layouts/default.html.twig
index 3bd53fd..ab35e2b 100644
--- a/source/_layouts/default.html.twig
+++ b/source/_layouts/default.html.twig
@@ -18,6 +18,6 @@
{% block content %}{% endblock %}
{% include 'counters.twig' %}
-
+