Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Fixes GH-39
Browse files Browse the repository at this point in the history
  • Loading branch information
shorodilov committed Feb 21, 2024
1 parent e0ba5fb commit 1e5726b
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tasktracker-bootstrap",
"version": "1.2.0",
"version": "1.3.0",
"description": "Task tracker site bootstrap5 templates",
"private": true,
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/views/detail_view.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description" content="Task tracker templates package - EDU Python course">
<meta name="author" content="Serhii Horodilov <[email protected]>">
<link rel="icon" type="image/svg+xml" href="../img/favicon.svg">
<link rel="icon" type="image/png" href="../img/favicon.png">
<link rel="icon" type="image/svg+xml" href="{{favicon_svg}}">
<link rel="icon" type="image/png" href="{{favicon_png}}">
<title>{{title}} | Task Tracker</title>
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions src/views/form_view.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description" content="Task tracker templates package - EDU Python course">
<meta name="author" content="Serhii Horodilov <[email protected]>">
<link rel="icon" type="image/svg+xml" href="../img/favicon.svg">
<link rel="icon" type="image/png" href="../img/favicon.png">
<link rel="icon" type="image/svg+xml" href="{{favicon_svg}}">
<link rel="icon" type="image/png" href="{{favicon_png}}">
<title>{{title}} | Task Tracker</title>
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions src/views/list_view.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description" content="Task tracker templates package - EDU Python course">
<meta name="author" content="Serhii Horodilov <[email protected]>">
<link rel="icon" type="image/svg+xml" href="../img/favicon.svg">
<link rel="icon" type="image/png" href="../img/favicon.png">
<link rel="icon" type="image/svg+xml" href="{{favicon_svg}}">
<link rel="icon" type="image/png" href="{{favicon_png}}">
<title>{{title}} | Task Tracker</title>
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions src/views/profile_view.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description" content="Task tracker templates package - EDU Python course">
<meta name="author" content="Serhii Horodilov <[email protected]>">
<link rel="icon" type="image/svg+xml" href="../img/favicon.svg">
<link rel="icon" type="image/png" href="../img/favicon.png">
<link rel="icon" type="image/svg+xml" href="{{favicon_svg}}">
<link rel="icon" type="image/png" href="{{favicon_png}}">
<title>{{title}} | Task Tracker</title>
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions src/views/signin_view.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description" content="Task tracker templates package - EDU Python course">
<meta name="author" content="Serhii Horodilov <[email protected]>">
<link rel="icon" type="image/svg+xml" href="../img/favicon.svg">
<link rel="icon" type="image/png" href="../img/favicon.png">
<link rel="icon" type="image/svg+xml" href="{{favicon_svg}}">
<link rel="icon" type="image/png" href="{{favicon_png}}">
<title>{{title}} | Task Tracker</title>
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions src/views/signup_view.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description" content="Task tracker templates package - EDU Python course">
<meta name="author" content="Serhii Horodilov <[email protected]>">
<link rel="icon" type="image/svg+xml" href="../img/favicon.svg">
<link rel="icon" type="image/png" href="../img/favicon.png">
<link rel="icon" type="image/svg+xml" href="{{favicon_svg}}">
<link rel="icon" type="image/png" href="{{favicon_png}}">
<title>{{title}} | Task Tracker</title>
</head>
<body>
Expand Down
33 changes: 22 additions & 11 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ const HTMLWebpackPlugin = require("html-webpack-plugin")
const MiniCSSExtractPlugin = require("mini-css-extract-plugin")
const api = require("./api/settings")

const templateParameters = {
favicon_png: "../assets/img/favicon.png",
favicon_svg: "../assets/img/favicon.svg",
}

// webpack config object
// noinspection WebpackConfigHighlighting,HttpUrlsUsage
module.exports = {
mode: "development",
output: {
filename: "js/main.bundle.js",
filename: "assets/js/main.bundle.js",
path: path.resolve(__dirname, "dist"),
clean: true
},
Expand All @@ -35,46 +40,52 @@ module.exports = {
}
},
plugins: [
new MiniCSSExtractPlugin({filename: "css/main.min.css"}),
new MiniCSSExtractPlugin({filename: "assets/css/main.min.css"}),
new HTMLWebpackPlugin({
template: path.resolve(__dirname, "src/views/list_view.hbs"),
filename: "tasks/task_list.html",
filename: "templates/task_list.html",
templateParameters: {
...templateParameters,
title: "Tasks List",
}
}),
new HTMLWebpackPlugin({
template: path.resolve(__dirname, "src/views/detail_view.hbs"),
filename: "tasks/task_detail.html",
filename: "templates/task_detail.html",
templateParameters: {
...templateParameters,
title: "Tasks Details",
}
}),
new HTMLWebpackPlugin({
template: path.resolve(__dirname, "src/views/form_view.hbs"),
filename: "tasks/task_form.html",
filename: "templates/task_form.html",
templateParameters: {
...templateParameters,
title: "Task Form",
}
}),
new HTMLWebpackPlugin({
template: path.resolve(__dirname, "src/views/profile_view.hbs"),
filename: "users/profile.html",
filename: "templates/profile.html",
templateParameters: {
...templateParameters,
title: "User Profile",
}
}),
new HTMLWebpackPlugin({
template: path.resolve(__dirname, "src/views/signup_view.hbs"),
filename: "auth/signup.html",
filename: "templates/signup.html",
templateParameters: {
...templateParameters,
title: "Sign Up",
}
}),
new HTMLWebpackPlugin({
template: path.resolve(__dirname, "src/views/signin_view.hbs"),
filename: "auth/signin.html",
filename: "templates/signin.html",
templateParameters: {
...templateParameters,
title: "Sign In",
}
}),
Expand All @@ -101,22 +112,22 @@ module.exports = {
test: /\.(png|svg|jpg|jpeg|gif)$/i,
type: "asset/resource",
generator: {
filename: "img/[name][ext]"
filename: "assets/img/[name][ext]"
}
},
{
test: /\.(woff|woff2|ttf|eot)$/,
type: "asset/resource",
generator: {
filename: "fonts/[name][ext][query]"
filename: "assets/fonts/[name][ext][query]"
}
},
{
mimetype: "image/svg+xml",
scheme: "data",
type: "asset/resource",
generator: {
filename: "icons/[hash].svg"
filename: "assets/icons/[hash].svg"
}
},
{
Expand Down

0 comments on commit 1e5726b

Please sign in to comment.