Use webpack for bundling

This commit is contained in:
2018-04-29 10:23:42 +03:00
parent 5ebfecb8bc
commit 4e73b218bf
11 changed files with 9100 additions and 875 deletions

View File

@ -1,43 +0,0 @@
(function() {
'use strict';
var notes = [
'Любимый фильм "Три идиота".',
'Люблю кататься на велосипеде.',
'Люблю читать фантастические книги.',
'Люблю шоколад.',
'На день рождения ко мне можно прийти без подарка.',
'Не люблю пьяных людей.',
'Предпочитаю ходить в кино на 2D-сеансы.',
'Проехал на велосипеде 200 километров за день.',
'Работаю программистом.',
'Хотел бы побывать в горах.',
];
function selectRandomNote() {
return notes[Math.floor(Math.random() * notes.length)];
}
function updateNode() {
var el = document.getElementById('about-me-note');
if (el) {
el.innerHTML = selectRandomNote();
}
}
function onKnowBetter(event) {
event.preventDefault();
if (window.yaCounter41913764) {
window.yaCounter41913764.hit(location.href);
}
updateNode();
}
window.addEventListener('DOMContentLoaded', updateNode);
var el = document.getElementById('know-better');
if (el) {
el.addEventListener('click', onKnowBetter);
}
}());

View File

@ -0,0 +1,40 @@
import './style.scss'
const notes = [
'Любимый фильм "Три идиота".',
'Люблю кататься на велосипеде.',
'Люблю читать фантастические книги.',
'Люблю шоколад.',
'На день рождения ко мне можно прийти без подарка.',
'Не люблю пьяных людей.',
'Предпочитаю ходить в кино на 2D-сеансы.',
'Проехал на велосипеде 200 километров за день.',
'Работаю программистом.',
'Хотел бы побывать в горах.',
];
function selectRandomNote() {
return notes[Math.floor(Math.random() * notes.length)];
}
function updateNode() {
const el = document.getElementById('about-me-note');
if (el) {
el.innerHTML = selectRandomNote();
}
}
function onKnowBetter(event) {
event.preventDefault();
if (window.yaCounter41913764) {
window.yaCounter41913764.hit(location.href);
}
updateNode();
}
window.addEventListener('DOMContentLoaded', updateNode);
const el = document.getElementById('know-better');
if (el) {
el.addEventListener('click', onKnowBetter);
}

View File

@ -1,8 +1,8 @@
html, body {
font-size: 18px;
font-family: 'PT Serif', Serif;
font-family: 'PT Serif', serif;
padding: 0;
margin: 0;
margin: 0;
@media (max-width: 839px) {
font-size: 16px;