Reconfigure add structure and add Gulp
This commit is contained in:
parent
303dfd8aff
commit
3005f92bd2
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
/ansible/galaxy.roles/
|
/ansible/galaxy.roles/
|
||||||
/output_*
|
/output_*
|
||||||
|
/node_modules/
|
||||||
/vendor/
|
/vendor/
|
||||||
|
11
Makefile
11
Makefile
@ -1,6 +1,13 @@
|
|||||||
|
build:
|
||||||
|
rm -rf output_dev/*
|
||||||
|
vendor/bin/sculpin generate --env=dev --no-interaction
|
||||||
|
BUILD_ENV=dev node_modules/.bin/gulp build
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
vendor/bin/sculpin generate --env=prod
|
rm -rf output_prod/*
|
||||||
ansible-playbook --inventory "ansible/hosts_prod" --user=deployer ansible/deploy.yml
|
vendor/bin/sculpin generate --env=prod --no-interaction
|
||||||
|
BUILD_ENV=prod node_modules/.bin/gulp build
|
||||||
|
# ansible-playbook --inventory "ansible/hosts_prod" --user=deployer ansible/deploy.yml
|
||||||
|
|
||||||
rollback:
|
rollback:
|
||||||
ansible-playbook --inventory "ansible/hosts_prod" --user=deployer ansible/rollback.yml
|
ansible-playbook --inventory "ansible/hosts_prod" --user=deployer ansible/rollback.yml
|
||||||
|
3
app/config/sculpin_kernel.yml
Normal file
3
app/config/sculpin_kernel.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
sculpin:
|
||||||
|
ignore:
|
||||||
|
- _assets/
|
31
gulpfile.js
Normal file
31
gulpfile.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
const gulp = require('gulp');
|
||||||
|
const concat = require('gulp-concat');
|
||||||
|
const sass = require('gulp-sass');
|
||||||
|
const autoprefixer = require('gulp-autoprefixer');
|
||||||
|
|
||||||
|
const ENV = process.env.BUILD_ENV || 'dev';
|
||||||
|
|
||||||
|
const SASS_SOURCE_PATH = './source/_assets/**/*.scss';
|
||||||
|
const SASS_DEST_PATH = `./output_${ENV}`;
|
||||||
|
const SASS_FILE_NAME = 'app.css';
|
||||||
|
|
||||||
|
const SASS_OPTIONS = {
|
||||||
|
outputStyle: ENV === 'prod' ? 'compressed' : 'expanded',
|
||||||
|
};
|
||||||
|
|
||||||
|
const AUTOPREFIX_OPTIONS = {
|
||||||
|
browsers: ['last 2 versions'],
|
||||||
|
};
|
||||||
|
|
||||||
|
gulp.task('build', function () {
|
||||||
|
gulp.src(SASS_SOURCE_PATH)
|
||||||
|
.pipe(sass(SASS_OPTIONS).on('error', sass.logError))
|
||||||
|
.pipe(autoprefixer(AUTOPREFIX_OPTIONS))
|
||||||
|
.pipe(concat(SASS_FILE_NAME))
|
||||||
|
.pipe(gulp.dest(SASS_DEST_PATH))
|
||||||
|
;
|
||||||
|
});
|
||||||
|
|
||||||
|
// gulp.task('build:watch', function () {
|
||||||
|
// gulp.watch(SASS_SOURCE_PATH, ['build']);
|
||||||
|
// });
|
13
package.json
Normal file
13
package.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "homepage",
|
||||||
|
"author": "Anton Vakhrushev",
|
||||||
|
"license": "MIT",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Homepage",
|
||||||
|
"devDependencies": {
|
||||||
|
"gulp": "^3.9.1",
|
||||||
|
"gulp-autoprefixer": "^3.1.1",
|
||||||
|
"gulp-concat": "^2.6.1",
|
||||||
|
"gulp-sass": "^3.1.0"
|
||||||
|
}
|
||||||
|
}
|
29
source/_assets/about-me.scss
Normal file
29
source/_assets/about-me.scss
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
.about-me {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100vh;
|
||||||
|
|
||||||
|
|
||||||
|
&__note {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 120%;
|
||||||
|
max-width: 400px;
|
||||||
|
min-height: 3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__links {
|
||||||
|
padding: 0;
|
||||||
|
margin-top: 4em;
|
||||||
|
list-style: none;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__link {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__link + &__link {
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
}
|
@ -4,8 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link href="https://fonts.googleapis.com/css?family=PT+Serif&subset=cyrillic" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=PT+Serif&subset=cyrillic" rel="stylesheet">
|
||||||
<link rel="stylesheet" type="text/css" href="/styles/app.css?v={{ date().timestamp }}">
|
<link rel="stylesheet" type="text/css" href="/app.css?v={{ date().timestamp }}">
|
||||||
<link rel="stylesheet" type="text/css" href="/styles/about-me.css?v={{ date().timestamp }}">
|
|
||||||
<title>
|
<title>
|
||||||
{% if page.title is defined %}
|
{% if page.title is defined %}
|
||||||
{{ page.title }} - {{ site.title }}
|
{{ page.title }} - {{ site.title }}
|
||||||
@ -19,5 +18,6 @@
|
|||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
</main>
|
</main>
|
||||||
{% include 'counters.twig' %}
|
{% include 'counters.twig' %}
|
||||||
|
<script src="/static/app.js?v={{ date().timestamp }}"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
.about-me {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.about-me__note {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 120%;
|
|
||||||
max-width: 400px;
|
|
||||||
min-height: 3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.about-me__links {
|
|
||||||
padding: 0;
|
|
||||||
margin-top: 4em;
|
|
||||||
list-style: none;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.about-me__link {
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.about-me__link + .about-me__link {
|
|
||||||
margin-left: 1em;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user