local packaging for asset files
This commit is contained in:
parent
e06e7f5593
commit
834c66ffa8
6 changed files with 3689 additions and 27 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
node_modules
|
||||||
|
assets
|
||||||
3
Makefile
Normal file
3
Makefile
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
all:
|
||||||
|
npm ci
|
||||||
|
npm run build
|
||||||
26
gulpfile.js
Normal file
26
gulpfile.js
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
// Load gulp and gulp-copy
|
||||||
|
var gulp = require('gulp');
|
||||||
|
var copy = require('gulp-copy');
|
||||||
|
|
||||||
|
// Define a task to copy all css and js files from the source directory
|
||||||
|
gulp.task('copy-assets', function() {
|
||||||
|
// Use a glob pattern to select all css and js files in the source directory and its subdirectories
|
||||||
|
return gulp.src([
|
||||||
|
'./node_modules/bootstrap/dist/**/*.+(css|js)',
|
||||||
|
'./node_modules/feather-icons/dist/**/*.+(css|js)',
|
||||||
|
'./node_modules/progress-tracker/src/styles/*.+(css|js)'
|
||||||
|
]) // Specify the base folder as src
|
||||||
|
.pipe(copy('./assets/', { // Copy the files to the assets folder
|
||||||
|
prefix: 3, // Remove the src folder from the path
|
||||||
|
rename: function(path) { // Rename the path
|
||||||
|
if (path.extname === '.css') { // If the file is a css file
|
||||||
|
path.dirname = 'css'; // Change the folder name to css
|
||||||
|
} else if (path.extname === '.js') { // If the file is a js file
|
||||||
|
path.dirname = 'js'; // Change the folder name to js
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Define a default task that runs the copy-assets task
|
||||||
|
gulp.task('default', gulp.series('copy-assets'));
|
||||||
49
index.html
49
index.html
|
|
@ -1,15 +1,13 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Questionnaire Wizard</title>
|
<title>Questionnaire Wizard</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" />
|
<script src="assets/js/bootstrap.bundle.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.min.js"></script>
|
<script src="assets/feather.min.js"></script>
|
||||||
<script src="https://unpkg.com/feather-icons"></script>
|
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
<link rel="stylesheet" href="assets/styles/progress-tracker.css">
|
||||||
<link rel="stylesheet" href="https://nigelotoole.github.io/progress-tracker/styles/progress-tracker.css">
|
|
||||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="questionaire">
|
<div class="questionaire">
|
||||||
|
|
@ -89,25 +87,25 @@
|
||||||
<div class="contact">
|
<div class="contact">
|
||||||
<ul class="social-links mb-0">
|
<ul class="social-links mb-0">
|
||||||
<li class="entry-phone hide">
|
<li class="entry-phone hide">
|
||||||
<i class="fa fa-phone"></i>
|
<i class="fi-phone" data-feather="phone"></i>
|
||||||
<a href="">
|
<a href="">
|
||||||
<span></span>
|
<span></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="entry-envelope hide">
|
<li class="entry-envelope hide">
|
||||||
<i class="fa fa-envelope"></i>
|
<i class="fi-envelope" data-feather="mail"></i>
|
||||||
<a href="">
|
<a href="">
|
||||||
<span></span>
|
<span></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="entry-home hide">
|
<li class="entry-home hide">
|
||||||
<i class="fa fa-home"></i>
|
<i class="fi-home" data-feather="home"></i>
|
||||||
<a target=new href="">
|
<a target=new href="">
|
||||||
<span></span>
|
<span></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="entry-map hide">
|
<li class="entry-map hide">
|
||||||
<i class="fa fa-map"></i>
|
<i class="fi-map" data-feather="map"></i>
|
||||||
<a target=new href="">
|
<a target=new href="">
|
||||||
<span></span>
|
<span></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -342,6 +340,11 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
.card-body svg {
|
||||||
|
height: 1rem;
|
||||||
|
stroke-width: 2;
|
||||||
|
min-width: 2rem;
|
||||||
|
}
|
||||||
.m-b-30 {
|
.m-b-30 {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
@ -359,7 +362,8 @@
|
||||||
color: rgba(33, 37, 41, 0.75);
|
color: rgba(33, 37, 41, 0.75);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 0.5rem 1rem;
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
.social-links li a {
|
.social-links li a {
|
||||||
color: rgba(33, 37, 41, 0.75);
|
color: rgba(33, 37, 41, 0.75);
|
||||||
|
|
@ -629,14 +633,14 @@
|
||||||
|
|
||||||
template.querySelector('.media-body h5').textContent = name;
|
template.querySelector('.media-body h5').textContent = name;
|
||||||
template.querySelector('.media-body p').textContent = title;
|
template.querySelector('.media-body p').textContent = title;
|
||||||
template.querySelector('.fa-phone + a').textContent = tel;
|
template.querySelector('.fi-phone + a').textContent = tel;
|
||||||
template.querySelector('.fa-phone + a').href = 'tel:' + tel;
|
template.querySelector('.fi-phone + a').href = 'tel:' + tel;
|
||||||
template.querySelector('.fa-envelope + a').textContent = mail;
|
template.querySelector('.fi-envelope + a').textContent = mail;
|
||||||
template.querySelector('.fa-envelope + a').href = 'mailto:' + mail;
|
template.querySelector('.fi-envelope + a').href = 'mailto:' + mail;
|
||||||
template.querySelector('.fa-home + a').textContent = web;
|
template.querySelector('.fi-home + a').textContent = web;
|
||||||
template.querySelector('.fa-home + a').href = 'https://' + web;
|
template.querySelector('.fi-home + a').href = 'https://' + web;
|
||||||
template.querySelector('.fa-map + a').textContent = address;
|
template.querySelector('.fi-map + a').textContent = address;
|
||||||
template.querySelector('.fa-map + a').href = 'https://www.google.de/maps/place/' + address;
|
template.querySelector('.fi-map + a').href = 'https://www.google.de/maps/place/' + address;
|
||||||
|
|
||||||
if (tel) {
|
if (tel) {
|
||||||
template.querySelector('.entry-phone').classList.remove('hide');
|
template.querySelector('.entry-phone').classList.remove('hide');
|
||||||
|
|
@ -653,6 +657,7 @@
|
||||||
|
|
||||||
var questionContainer = document.getElementById('questionContainer');
|
var questionContainer = document.getElementById('questionContainer');
|
||||||
questionContainer.appendChild(template);
|
questionContainer.appendChild(template);
|
||||||
|
feather.replace();
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayQuestion(questionId=1) {
|
function displayQuestion(questionId=1) {
|
||||||
|
|
|
||||||
3624
package-lock.json
generated
3624
package-lock.json
generated
File diff suppressed because it is too large
Load diff
12
package.json
12
package.json
|
|
@ -1,6 +1,12 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "^5.3.2",
|
"bootstrap": "^5.3.3",
|
||||||
"feather-icons": "^4.29.1"
|
"feather-icons": "^4.29.1",
|
||||||
|
"gulp": "^4.0.2",
|
||||||
|
"gulp-copy": "^4.0.1",
|
||||||
|
"progress-tracker": "^2.0.7"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "gulp"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue