Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,8 @@ jobs:

- name: Build website
run: |
# install npm dependencies
npm install

# empty contents of gh-pages
rm -f -r ./gh-pages/*

# move contents of dist to gh-pages
mv -f ./dist/* ./gh-pages/

# move node_modules directory to gh-pages
mv -f ./node_modules/ ./gh-pages/
sudo chmod +x ./scripts/build.sh
./scripts/build.sh

- name: Upload Artifacts
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
Expand Down
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# ignore JetBrains project
.idea/

dist/

# ignore node modules
node_modules/
package-lock.json

# ignore duplicated dist folder for localization
dist/en
dist/es-ES
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"scripts": {
"build": "webpack"
},
"dependencies": {
"@fortawesome/fontawesome-free": "6.6.0",
"bootstrap": "5.3.3",
"jquery": "3.7.1"
},
"devDependencies": {
"css-loader": "6.10.0",
"mini-css-extract-plugin": "2.8.1",
"script-loader": "0.7.2",
"webpack": "5.90.3",
"webpack-cli": "5.1.4"
}
}
23 changes: 23 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

# if ./dist exists, remove it entirely
if [ -d "./dist" ]; then
rm -rf ./dist
fi

# if ./gh-pages exists, remove the contents
if [ -d "./gh-pages" ]; then
rm -rf ./gh-pages/*
fi

# copy ./src directory to ./dist
cp -r ./src ./dist

# install npm dependencies
npm install
npm run build

# copy ./dist directory to ./gh-pages
if [ -d "./gh-pages" ]; then
mv -f ./dist/* ./gh-pages/
fi
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions dist/dev.html → src/dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico" />
<!-- FontAwesome-->
<link href="node_modules/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet" />
<link href="css/fontawesome.bundle.css" rel="stylesheet" />
<!-- Bootstrap theme-->
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap.bundle.css" rel="stylesheet" />
<!-- Bootstrap core JS-->
<script src="js/bootstrap.bundle.js"></script>
<!-- Custom css-->
<link href="css/custom.css" rel="stylesheet" />
<!-- Custom logos-->
<link href="css/logos.css" rel="stylesheet" />

<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
<script src="js/jquery.bundle.js"></script>
<script src="js/popper.bundle.js"></script>

<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
Expand Down Expand Up @@ -131,8 +133,6 @@ <h2 class="fw-bolder pb-4">Repos</h2>
</main>
<!-- Footer-->
<footer class="bg-dark py-4 mt-auto" id="footer-container"></footer>
<!-- Bootstrap core JS-->
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

<!-- Get navbar -->
<script src="js/navbar.js"></script>
Expand Down
8 changes: 4 additions & 4 deletions dist/discord.html → src/discord.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico" />
<!-- Bootstrap theme-->
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap.bundle.css" rel="stylesheet" />
<!-- Bootstrap core JS-->
<script src="js/bootstrap.bundle.js"></script>
<!-- Custom css-->
<link href="css/custom.css" rel="stylesheet" />

<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="js/jquery.bundle.js"></script>

<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
Expand Down Expand Up @@ -57,8 +59,6 @@
</main>
<!-- Footer-->
<footer class="bg-dark py-4 mt-auto" id="footer-container"></footer>
<!-- Bootstrap core JS-->
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

<!-- Get navbar -->
<script src="js/navbar.js"></script>
Expand Down
8 changes: 4 additions & 4 deletions dist/feedback.html → src/feedback.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico" />
<!-- Bootstrap theme-->
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap.bundle.css" rel="stylesheet" />
<!-- Bootstrap core JS-->
<script src="js/bootstrap.bundle.js"></script>
<!-- Custom css-->
<link href="css/custom.css" rel="stylesheet" />

<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="js/jquery.bundle.js"></script>

<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
Expand All @@ -55,8 +57,6 @@
</main>
<!-- Footer-->
<footer class="bg-dark py-4 mt-auto" id="footer-container"></footer>
<!-- Bootstrap core JS-->
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

<!-- Get navbar -->
<script src="js/navbar.js"></script>
Expand Down
12 changes: 6 additions & 6 deletions dist/index.html → src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico" />
<!-- FontAwesome-->
<link href="node_modules/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet" />
<link href="css/fontawesome.bundle.css" rel="stylesheet" />
<!-- Bootstrap theme-->
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap.bundle.css" rel="stylesheet" />
<!-- Bootstrap core JS-->
<script src="js/bootstrap.bundle.js"></script>
<!-- Custom css-->
<link href="css/custom.css" rel="stylesheet" />
<!-- Custom logos-->
<link href="css/logos.css" rel="stylesheet" />

<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
<script src="js/jquery.bundle.js"></script>
<script src="js/popper.bundle.js"></script>

<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
Expand Down Expand Up @@ -344,8 +346,6 @@ <h4 class="card-title mb-3 fw-bolder">Donate</h4>
</main>
<!-- Footer-->
<footer class="bg-dark py-4 mt-auto" id="footer-container"></footer>
<!-- Bootstrap core JS-->
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

<!-- Get navbar -->
<script src="js/navbar.js"></script>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions dist/privacy.html → src/privacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico" />
<!-- Bootstrap theme-->
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap.bundle.css" rel="stylesheet" />
<!-- Bootstrap core JS-->
<script src="js/bootstrap.bundle.js"></script>
<!-- Custom css-->
<link href="css/custom.css" rel="stylesheet" />

<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="js/jquery.bundle.js"></script>

<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
Expand Down Expand Up @@ -133,8 +135,6 @@ <h2>Privacy Policy Changes</h2>
</main>
<!-- Footer-->
<footer class="bg-dark py-4 mt-auto" id="footer-container"></footer>
<!-- Bootstrap core JS-->
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

<!-- Get navbar -->
<script src="js/navbar.js"></script>
Expand Down
10 changes: 5 additions & 5 deletions dist/support.html → src/support.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico" />
<!-- FontAwesome-->
<link href="node_modules/@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet" />
<link href="css/fontawesome.bundle.css" rel="stylesheet" />
<!-- Bootstrap theme-->
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap.bundle.css" rel="stylesheet" />
<!-- Bootstrap core JS-->
<script src="js/bootstrap.bundle.js"></script>
<!-- Custom css-->
<link href="css/custom.css" rel="stylesheet" />

<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="js/jquery.bundle.js"></script>

<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
Expand Down Expand Up @@ -295,8 +297,6 @@ <h4 class="card-title mb-3 fw-bolder">Facebook Group</h4>
</main>
<!-- Footer-->
<footer class="bg-dark py-4 mt-auto" id="footer-container"></footer>
<!-- Bootstrap core JS-->
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

<!-- Get navbar -->
<script src="js/navbar.js"></script>
Expand Down
8 changes: 4 additions & 4 deletions dist/terms.html → src/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/images/favicon.ico" />
<!-- Bootstrap theme-->
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap.bundle.css" rel="stylesheet" />
<!-- Bootstrap core JS-->
<script src="js/bootstrap.bundle.js"></script>
<!-- Custom css-->
<link href="css/custom.css" rel="stylesheet" />

<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="js/jquery.bundle.js"></script>

<!-- Crowdin widget -->
<script src="js/crowdin.js"></script>
Expand Down Expand Up @@ -172,8 +174,6 @@ <h2>Disclaimer</h2>
</main>
<!-- Footer-->
<footer class="bg-dark py-4 mt-auto" id="footer-container"></footer>
<!-- Bootstrap core JS-->
<script src="node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>

<!-- Get navbar -->
<script src="js/navbar.js"></script>
Expand Down
32 changes: 32 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports = {
entry: {
bootstrap: [
'bootstrap/dist/js/bootstrap.bundle.min.js',
'bootstrap/dist/css/bootstrap.min.css'
],
fontawesome: '@fortawesome/fontawesome-free/css/all.min.css',
jquery: 'script-loader!jquery/dist/jquery.min.js', // this needs script-loader or $ will not be defined globally
popper: '@popperjs/core/dist/umd/popper.min.js',
},
output: {
filename: 'js/[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
},
mode: 'production',
module: {
rules: [
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
],
},
plugins: [
new MiniCssExtractPlugin({
filename: 'css/[name].bundle.css',
}),
],
};