remove layout.hbs

This commit is contained in:
Nikola Petrov 2024-07-31 15:53:27 +02:00
parent 0c19dde34d
commit 4c8e1460fb
9 changed files with 810 additions and 689 deletions

View File

@ -4,13 +4,13 @@ import UserModel, { values } from '../models/userModel';
export default {
render: async function (req: Request, res: Response) {
res.render('user', { title: 'Register', keys: UserModel.namesOfValues });
res.render('user', { keys: UserModel.namesOfValues });
},
create: async function (req: Request, res: Response) {
const reqPassword: string = req.body.reqPassword;
if (!reqPassword) return res.render('user', { title: 'Register', keys: UserModel.namesOfValues });
if (!reqPassword) return res.render('user', { keys: UserModel.namesOfValues });
const password = await UserModel.getValue(values.pass);
@ -20,11 +20,11 @@ export default {
if (affectedRows > 0) {
return res.redirect('/list');
}
return res.render('user', { title: 'Register', keys: UserModel.namesOfValues });
return res.render('user', { keys: UserModel.namesOfValues });
}
// check if passwords equal
if (password != reqPassword) {
return res.render('user', { title: 'Register', keys: UserModel.namesOfValues });
return res.render('user', { keys: UserModel.namesOfValues });
}
// update
@ -32,12 +32,12 @@ export default {
const value: string = req.body.value;
if (!name || !value) {
return res.render('user', { title: 'Register', keys: UserModel.namesOfValues });
return res.render('user', { keys: UserModel.namesOfValues });
}
const affectedRows = await UserModel.updateValue(name, value);
if (affectedRows == 0) {
return res.render('user', { title: 'Register', keys: UserModel.namesOfValues });
return res.render('user', { keys: UserModel.namesOfValues });
}
return res.redirect('/list');

View File

@ -8,15 +8,15 @@ router.get('/', function (req: Request, res: Response) {
const project = userData.project;
const experience = userData.experience;
const education = userData.education;
res.render('main/2_0', { title: 'Nikola Petrov', disableBootStrap: true, project, experience, education });
res.render('main/2_0', { project, experience, education });
});
router.get('/cv', function (req: Request, res: Response) {
res.render('cv', { title: 'Nikola Petrov', disableBootStrap: true, userData });
res.render('cv', { userData });
});
router.get('/old', function (req: Request, res: Response) {
res.render('main/1_0', { title: 'Nikola Petrov' });
res.render('main/1_0');
});
router.get('/mail', function (req: Request, res: Response) {
@ -24,11 +24,11 @@ router.get('/mail', function (req: Request, res: Response) {
});
router.get('/list', function (req: Request, res: Response) {
res.render('list', { title: 'List' });
res.render('list');
});
router.get('/cash', function (req: Request, res: Response) {
res.render('cash', { title: 'Cash' });
res.render('cash');
});
//import userRouter from './user';

View File

@ -1,43 +1,68 @@
<script type="module" src="/assets/build/cash.js"></script>
<!doctype html>
<html lang="en" data-bs-theme="dark">
<header>
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<form class="d-flex" action="" id="myform">
<input class="form-control me-2" type="date" name="date" id="date" placeholder="date">
<input class="form-control me-2" type="password" name="password" id="pass" placeholder="password">
<input class="btn btn-outline-success" type="submit" value="Submit">
</form>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/logo.ico" type="image/x-icon">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
<title>Cash</title>
<script type="module" src="/assets/build/cash.js"></script>
</head>
<body>
<header>
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<form class="d-flex" action="" id="myform">
<input class="form-control me-2" type="date" name="date" id="date" placeholder="date">
<input class="form-control me-2" type="password" name="password" id="pass" placeholder="password">
<input class="btn btn-outline-success" type="submit" value="Submit">
</form>
</div>
</div>
</div>
</nav>
</header>
</nav>
</header>
<main class="bg-body-tertiary pt-5 pb-5">
<div class="container position-relative">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Day</th>
<th scope="col">Month</th>
<th scope="col">Year</th>
<th scope="col">Amount</th>
<th scope="col">Type</th>
<th scope="col">Company</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<div class="row">
<div class="w-50 mx-auto"><canvas id="acquisitions"></canvas></div>
</div>
<main class="bg-body-tertiary pt-5 pb-5">
<div class="container position-relative">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Day</th>
<th scope="col">Month</th>
<th scope="col">Year</th>
<th scope="col">Amount</th>
<th scope="col">Type</th>
<th scope="col">Company</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<div class="row">
<div class="w-50 mx-auto"><canvas id="acquisitions"></canvas></div>
</div>
</div>
</main>
</div>
</main>
</body>
</html>

View File

@ -1,172 +1,187 @@
<script src="https://kit.fontawesome.com/cb81440751.js" crossorigin="anonymous"></script>
<!doctype html>
<html lang="en" data-bs-theme="dark">
<!-- Import stylesheets in CSS3 -->
<link rel="stylesheet" href="/assets/cv/stylesheets/style.css" type="text/css">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/logo.ico" type="image/x-icon">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>CV</title>
<script src="https://kit.fontawesome.com/cb81440751.js" crossorigin="anonymous"></script>
<!-- Import stylesheets in CSS3 -->
<link rel="stylesheet" href="/assets/cv/stylesheets/style.css" type="text/css">
<header class="l-header" id="header">
<!-- Nav menu -->
<nav class="nav bd-container">
<a href="#" class="nav_logo">Léa GALLIER</a>
<div class="nav_menu" id="nav-menu">
<ul class="nav_list">
<!-- HTML2PDF.js -->
<!-- Version 0.9.3 -->
<script defer src="/assets/cv/javascripts/html2pdf.v0.9.3.bundle.min.js"></script>
<li class="nav_item">
<a href="#home" class="nav_link active-link">
<i class="fa-solid fa-house nav_icon"></i>Home
</a>
</li>
<!-- Main Javascript file -->
<script defer src="/assets/cv/javascripts/main.js"></script>
</head>
<li class="nav_item">
<a href="#experience" class="nav_link">
<i class="fa-solid fa-briefcase nav_icon"></i>Experiences
</a>
</li>
<body>
<header class="l-header" id="header">
<!-- Nav menu -->
<nav class="nav bd-container">
<a href="#" class="nav_logo">Léa GALLIER</a>
<div class="nav_menu" id="nav-menu">
<ul class="nav_list">
<li class="nav_item">
<a href="#home" class="nav_link active-link">
<i class="fa-solid fa-house nav_icon"></i>Home
</a>
</li>
<li class="nav_item">
<a href="#experience" class="nav_link">
<i class="fa-solid fa-briefcase nav_icon"></i>Experiences
</a>
</li>
<li class="nav_item">
<a href="#education" class="nav_link">
<i class="fa-solid fa-book-bookmark nav_icon"></i>Education
</a>
</li>
<li class="nav_item">
<a href="#education" class="nav_link">
<i class="fa-solid fa-book-bookmark nav_icon"></i>Education
</a>
</li>
</ul>
</div>
</ul>
</div>
<div class="nav_toggle" id="nav-toggle">
<i class="fa-solid fa-bars"></i>
</div>
</nav>
</header>
{{#with userData}}
<main class="l-main bd-container">
<!-- Resume CV -->
<div class="resume" id="area-cv">
<div class="resume_left">
<div class="nav_toggle" id="nav-toggle">
<i class="fa-solid fa-bars"></i>
</div>
</nav>
</header>
{{#with userData}}
<main class="l-main bd-container">
<!-- Resume CV -->
<div class="resume" id="area-cv">
<div class="resume_left">
<!-- HOME -->
<section class="home" id="home">
<div class="home_container section bd-grid">
<!-- HOME -->
<section class="home" id="home">
<div class="home_container section bd-grid">
<div class="home_data bd-grid">
<img src="/images/Jaz.jpg" alt="Icon picture" class="home_img" id="home-img">
<!--<img alt="Icon picture" class="home_img" id="home-img">-->
<h1 class="home_title">{{first_name}} {{last_name}}</h1>
<h3 class="home_profession">{{occupation}}</h3>
</div>
<div class="home_address bd-grid">
<span class="home_information">
<i class="fa-solid fa-location-dot home_icon"></i>{{living_location}}
</span>
<span class="home_information">
<i class="fa-solid fa-calendar-days home_icon"></i>{{birth}}
</span>
<span class="home_information">
<a href="mailto:{{email}}" class="home_link">
<i class="fa-solid fa-envelope home_icon"></i>{{email}}
</a>
</span>
<span class="home_information">
<a href="tel:{{phone_number}}" class="home_link">
<i class="fa-solid fa-phone home_icon"></i>{{phone_number}}
</a>
</span>
<span class="home_information">
<a href="{{web_link}}" class="home_link">
<i class="fa-solid fa-globe home_icon"></i>{{web_link}}
</a>
</span>
</div>
</div>
<!-- Theme change button -->
<i class="fa-solid fa-moon change-theme" title="Theme" id="theme-button"></i>
<!-- Button to generate and download the pdf. Available for desktop. -->
<i class="fa-solid fa-download generate-pdf" title="Generate PDF" id="resume-button"></i>
</section>
<!-- SOCIAL -->
<section class="social section">
<h2 class="section-title">Social</h2>
<div class="social_container bd-grid">
<a href="{{git_link}}" target="_blank" class="social_link">
<i class="fa-brands fa-gitlab social_icon"></i>{{git_link}}
</a>
</div>
</section>
</div>
<div class="resume_right">
<!-- EXPERIENCE -->
<section class="experience section" id="experience">
<h2 class="section-title">Experience</h2>
<div class="experience_container bd-grid">
{{#each experience}}
<div class="experience_content">
<div class="experience_time">
<span class="experience_rounder"></span>
{{#unless @last}}
<span class="experience_line"></span>
{{/unless}}
<div class="home_data bd-grid">
<img src="/images/Jaz.jpg" alt="Icon picture" class="home_img" id="home-img">
<!--<img alt="Icon picture" class="home_img" id="home-img">-->
<h1 class="home_title">{{first_name}} {{last_name}}</h1>
<h3 class="home_profession">{{occupation}}</h3>
</div>
<div class="experience_data bd-grid">
<h3 class="experience_title">{{title}}</h3>
<span class="experience_company">{{company}}</span>
<span class="experience_year">{{time}}</span>
<p class="experience_description">
{{des}}
</p>
<div class="home_address bd-grid">
<span class="home_information">
<i class="fa-solid fa-location-dot home_icon"></i>{{living_location}}
</span>
<span class="home_information">
<i class="fa-solid fa-calendar-days home_icon"></i>{{birth}}
</span>
<span class="home_information">
<a href="mailto:{{email}}" class="home_link">
<i class="fa-solid fa-envelope home_icon"></i>{{email}}
</a>
</span>
<span class="home_information">
<a href="tel:{{phone_number}}" class="home_link">
<i class="fa-solid fa-phone home_icon"></i>{{phone_number}}
</a>
</span>
<span class="home_information">
<a href="{{web_link}}" class="home_link">
<i class="fa-solid fa-globe home_icon"></i>{{web_link}}
</a>
</span>
</div>
</div>
{{/each}}
</div>
</section>
<!-- EDUCATION -->
<section class="education section" id="education">
<h2 class="section-title">Education</h2>
<!-- Theme change button -->
<i class="fa-solid fa-moon change-theme" title="Theme" id="theme-button"></i>
<!-- Button to generate and download the pdf. Available for desktop. -->
<i class="fa-solid fa-download generate-pdf" title="Generate PDF" id="resume-button"></i>
</section>
<!-- SOCIAL -->
<section class="social section">
<h2 class="section-title">Social</h2>
<div class="social_container bd-grid">
<a href="{{git_link}}" target="_blank" class="social_link">
<i class="fa-brands fa-gitlab social_icon"></i>{{git_link}}
</a>
<div class="education_container bd-grid">
{{#each education}}
<div class="education_content">
<div class="education_time">
<span class="education_rounder"></span>
{{#unless @last}}
<span class="education_line"></span>
{{/unless}}
</div>
<div class="education_data bd-grid">
<h3 class="education_title">{{des}}</h3>
<span class="education_studies">{{title}}</span>
<span class="education_year">{{time}}</span>
</div>
</div>
{{/each}}
</section>
</div>
</div>
</section>
<div class="resume_right">
<!-- EXPERIENCE -->
<section class="experience section" id="experience">
<h2 class="section-title">Experience</h2>
<div class="experience_container bd-grid">
{{#each experience}}
<div class="experience_content">
<div class="experience_time">
<span class="experience_rounder"></span>
{{#unless @last}}
<span class="experience_line"></span>
{{/unless}}
</div>
<div class="experience_data bd-grid">
<h3 class="experience_title">{{title}}</h3>
<span class="experience_company">{{company}}</span>
<span class="experience_year">{{time}}</span>
<p class="experience_description">
{{des}}
</p>
</div>
</div>
{{/each}}
</div>
</section>
<!-- EDUCATION -->
<section class="education section" id="education">
<h2 class="section-title">Education</h2>
<div class="education_container bd-grid">
{{#each education}}
<div class="education_content">
<div class="education_time">
<span class="education_rounder"></span>
{{#unless @last}}
<span class="education_line"></span>
{{/unless}}
</div>
<div class="education_data bd-grid">
<h3 class="education_title">{{des}}</h3>
<span class="education_studies">{{title}}</span>
<span class="education_year">{{time}}</span>
</div>
</div>
{{/each}}
</div>
</section>
</div>
</div>
</div>
</main>
{{/with}}
<a href="#" class="scrolltop" id="scroll-top">
<i class="fa-solid fa-arrow-up scrolltop_icon"></i>
</a>
</main>
{{/with}}
<a href="#" class="scrolltop" id="scroll-top">
<i class="fa-solid fa-arrow-up scrolltop_icon"></i>
</a>
<!-- HTML2PDF.js -->
<!-- Version 0.9.3 -->
<script src="/assets/cv/javascripts/html2pdf.v0.9.3.bundle.min.js"></script>
</body>
<!-- Main Javascript file -->
<script src="/assets/cv/javascripts/main.js"></script>
</html>

View File

@ -1,23 +0,0 @@
<!doctype html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/logo.ico" type="image/x-icon">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
{{#unless disableBootStrap}}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
{{/unless}}
<title>{{title}}</title>
</head>
<body>
{{{body}}}
</body>
</html>

View File

@ -1,52 +1,74 @@
<script src="/assets/build/list.js"></script>
<!doctype html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/logo.ico" type="image/x-icon">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
<title>List</title>
<script src="/assets/build/list.js"></script>
</head>
<body>
<header>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<button class="nav-link active" id="movieButton">Movies</button>
</li>
<li class="nav-item">
<button class="nav-link" id="seriesButton">Series</button>
</li>
<li class="nav-item">
<button class="nav-link" id="gameButton">Games</button>
</li>
<li class="nav-item dropdown">
<button class="nav-link dropdown-toggle" id="navbarDropdown" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
Sort
</button>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><button class="dropdown-item" id="titleButton">Title</button></li>
<li><button class="dropdown-item" id="yearButton">Year</button></li>
<li><button class="dropdown-item" id="idButton">Added</button></li>
</ul>
</li>
<li class="nav-item">
<button class="nav-link" id="editButton">Edit</button>
</li>
</ul>
<form class="d-flex" action="" id="myform">
<input class="form-control me-2" type="password" name="password" id="pass" placeholder="password">
<input class="form-control me-2" type="text" name="input_id" id="input_id" placeholder="id">
<input class="btn btn-outline-success" type="submit" value="Submit">
</form>
</div>
</div>
</nav>
</header>
<main>
<div class="py-5 bg-body-tertiary mt-3">
<div class="container" id="root">
<header>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<button class="nav-link active" id="movieButton">Movies</button>
</li>
<li class="nav-item">
<button class="nav-link" id="seriesButton">Series</button>
</li>
<li class="nav-item">
<button class="nav-link" id="gameButton">Games</button>
</li>
<li class="nav-item dropdown">
<button class="nav-link dropdown-toggle" id="navbarDropdown" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
Sort
</button>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><button class="dropdown-item" id="titleButton">Title</button></li>
<li><button class="dropdown-item" id="yearButton">Year</button></li>
<li><button class="dropdown-item" id="idButton">Added</button></li>
</ul>
</li>
<li class="nav-item">
<button class="nav-link" id="editButton">Edit</button>
</li>
</ul>
<form class="d-flex" action="" id="myform">
<input class="form-control me-2" type="password" name="password" id="pass" placeholder="password">
<input class="form-control me-2" type="text" name="input_id" id="input_id" placeholder="id">
<input class="btn btn-outline-success" type="submit" value="Submit">
</form>
</div>
</div>
</nav>
</header>
</main>
<main>
<div class="py-5 bg-body-tertiary mt-3">
<div class="container" id="root">
</body>
</div>
</div>
</main>
</html>

View File

@ -1,175 +1,214 @@
<!doctype html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/logo.ico" type="image/x-icon">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
<title>Nikola Petrov</title>
<link rel="stylesheet" href="/assets/main/1_0/assets/fontawesome/css/all.css">
<link rel="stylesheet" href="/assets/main/1_0/css/intro.css">
<link rel="stylesheet" href="/assets/main/1_0/css/styles.css">
<script defer src="/assets/main/1_0/assets/WinBox/winbox.bundle.js"></script>
<script defer src="/assets/main/1_0/js/main.js"></script>
</head>
<body>
<link rel="stylesheet" href="/assets/main/1_0/assets/fontawesome/css/all.css">
<link rel="stylesheet" href="/assets/main/1_0/css/intro.css">
<link rel="stylesheet" href="/assets/main/1_0/css/styles.css">
<script defer src="/assets/main/1_0/assets/WinBox/winbox.bundle.js"></script>
<script defer src="/assets/main/1_0/js/main.js"></script>
<section class="intro">
<h1 class="section__title">
Hi, I am <strong>Nikola Petrov</strong>
</h1>
<p class="section__subtitle">2. Year RIT</p>
<img src="/images/Jaz.jpg" alt="a picture of Nikola Petrov" class="intro__img">
</section>
<section class="intro">
<h1 class="section__title">
Hi, I am <strong>Nikola Petrov</strong>
</h1>
<p class="section__subtitle">2. Year RIT</p>
<img src="/images/Jaz.jpg" alt="a picture of Nikola Petrov" class="intro__img">
</section>
<div class="container">
<div class="container">
<div class="text-center" id="buttons">
<a class="btn btn-info btn-lg" id="git" href="https://gitlab.com/nikolape7">Git</a>
<button class="btn btn-info btn-lg" id="work-experiance">Work Experience</button>
<button class="btn btn-info btn-lg" id="education">Education</button>
<button class="btn btn-info btn-lg" id="documents">Documents</button>
</div>
<div class="row">
<div class="col">
<br>
<h2>Skills</h2>
<div class="row justify-content-md-center">
<div class="col col-lg-2">
<table class="centered">
<tr><th>Language</th></tr>
<tr><td>Slovenian</td></tr>
<tr><td>English</td></tr>
</table>
</div>
<div class="col-md-auto">
<table class="centered">
<tr><th>Programming languages</th></tr>
<tr><td>C/C++</td></tr>
<tr><td>html/css/js/php</td></tr>
</table>
</div>
</div>
<div class="text-center" id="buttons">
<a class="btn btn-info btn-lg" id="git" href="https://gitlab.com/nikolape7">Git</a>
<button class="btn btn-info btn-lg" id="work-experiance">Work Experience</button>
<button class="btn btn-info btn-lg" id="education">Education</button>
<button class="btn btn-info btn-lg" id="documents">Documents</button>
</div>
<div class="col">
<br>
<h2>Contact</h2>
<table class="centered">
<tr><td>
<a href="mailto:nikolape7@gmail.com">
<i class="fa fa-envelope"></i>
nikolape7@gmail.com
</a>
</td></tr>
<tr><td>
<a href="tel:070749506">
<i class="fa fa-phone"></i>
070 749 506
</a>
</td></tr>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col">
<br>
<h2>Skills</h2>
<div class="row justify-content-md-center">
<div class="col col-lg-2">
<table class="centered">
<tr>
<th>Language</th>
</tr>
<tr>
<td>Slovenian</td>
</tr>
<tr>
<td>English</td>
</tr>
</table>
</div>
<div class="col-md-auto">
<table class="centered">
<tr>
<th>Programming languages</th>
</tr>
<tr>
<td>C/C++</td>
</tr>
<tr>
<td>html/css/js/php</td>
</tr>
</table>
</div>
</div>
</div>
<section class="hidden">
<div id="work-experience-content">
<div class="container margin-top">
<div class="row">
<div class="col">
<span style="font-size: 1.5em;">LightAct </span><br>
01/07/2022 - 01/09/2022
</div>
<div class="col">
<span style="font-size: 1.5em;">Developer/IT</span><br>
I helped maintaining data base, wored on the application (integrated a capture card and IP camera),
assembled new server rack, installed new UTP/power conectors in the office.
</div>
</div>
<div class="row">
<div class="col">
<span style="font-size: 1.5em;">Institute 404</span><br>
08/06/2020 - 19/06/2020
</div>
<div class="col">
<span style="font-size: 1.5em;">Mentor</span><br>
I helped primary school children with their projects with soldering, laser cutting,
and building. And I helped with a cement 3D printer.
</div>
</div>
<div class="row">
<div class="col">
<span style="font-size: 1.5em;">Hella Saturnos d.o.o.</span><br>
04/09/2018 - 18/01/2019<br>
</div>
<div class="col">
<span style="font-size: 1.5em;">Maintenance technician</span><br>
I maintained and repaired machines from plastic presses to personal stations.
</div>
</div>
<div class="row">
<div class="col">
<span style="font-size: 1.5em;">Best Western Premier Hotel Slon</span><br>
01/03/2018 - 04/05/2018<br>
</div>
<div class="col">
<span style="font-size: 1.5em;">Maintenance technician</span><br>
I helped with setting up the conference/event rooms.
I helped customers and fixed problems like replacing light bulbs, wall sockets, hair-dryers.
</div>
<div class="col">
<br>
<h2>Contact</h2>
<table class="centered">
<tr>
<td>
<a href="mailto:nikolape7@gmail.com">
<i class="fa fa-envelope"></i>
nikolape7@gmail.com
</a>
</td>
</tr>
<tr>
<td>
<a href="tel:070749506">
<i class="fa fa-phone"></i>
070 749 506
</a>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="education-content">
<div class="container margin-top">
<p>
<span class="hidden" style="font-size: 0.75em;">
<i class="fa-solid fa-calendar-days"></i> 01/10/2021 - CURRENT
<section class="hidden">
<div id="work-experience-content">
<div class="container margin-top">
<div class="row">
<div class="col">
<span style="font-size: 1.5em;">LightAct </span><br>
01/07/2022 - 01/09/2022
</div>
<div class="col">
<span style="font-size: 1.5em;">Developer/IT</span><br>
I helped maintaining data base, wored on the application (integrated a capture card and IP camera),
assembled new server rack, installed new UTP/power conectors in the office.
</div>
</div>
<div class="row">
<div class="col">
<span style="font-size: 1.5em;">Institute 404</span><br>
08/06/2020 - 19/06/2020
</div>
<div class="col">
<span style="font-size: 1.5em;">Mentor</span><br>
I helped primary school children with their projects with soldering, laser cutting,
and building. And I helped with a cement 3D printer.
</div>
</div>
<div class="row">
<div class="col">
<span style="font-size: 1.5em;">Hella Saturnos d.o.o.</span><br>
04/09/2018 - 18/01/2019<br>
</div>
<div class="col">
<span style="font-size: 1.5em;">Maintenance technician</span><br>
I maintained and repaired machines from plastic presses to personal stations.
</div>
</div>
<div class="row">
<div class="col">
<span style="font-size: 1.5em;">Best Western Premier Hotel Slon</span><br>
01/03/2018 - 04/05/2018<br>
</div>
<div class="col">
<span style="font-size: 1.5em;">Maintenance technician</span><br>
I helped with setting up the conference/event rooms.
I helped customers and fixed problems like replacing light bulbs, wall sockets, hair-dryers.
</div>
</div>
</div>
</div>
<div id="education-content">
<div class="container margin-top">
<p>
<span class="hidden" style="font-size: 0.75em;">
<i class="fa-solid fa-calendar-days"></i> 01/10/2021 - CURRENT
<i class="fa-solid fa-location-dot"></i> Koroška cesta 46, Maribor, Slovenia <br>
</span>
<span style="font-size: 1.1em;">
</span>
<span style="font-size: 1.1em;">
Faculty of Electrical Engineering and Computer Science, University of Maribor <br>
</span>
<span style="font-size: 1.6em; line-height: 1em; color: #0dcaf0;">
</span>
<span style="font-size: 1.6em; line-height: 1em; color: #0dcaf0;">
Graduate engineer of computer science and information technology<br>
</span>
<span>
<a href="https://feri.um.si/">
<i class="fa-solid fa-globe"></i>
https://feri.um.si/
</a>
</span>
</p>
</span>
<span>
<a href="https://feri.um.si/">
<i class="fa-solid fa-globe"></i>
https://feri.um.si/
</a>
</span>
</p>
<p>
<span class="hidden" style="font-size: 0.75em;">
<i class="fa-solid fa-calendar-days"></i> 01/09/2016 - 07/07/2021
<i class="fa-solid fa-location-dot"></i> Litostrojska Cesta 51, Ljubljana, Slovenia <br>
</span>
<span style="font-size: 1.1em;">
Secondary school of technical professions šiška<br>
</span>
<span style="font-size: 1.6em; line-height: 1em; color: #0dcaf0;">
Electrotechnician<br>
</span>
<span>
<a href="https://ssts.si/">
<i class="fa-solid fa-globe"></i>
https://ssts.si/
</a>
</span>
</p>
<br>
<br>
</div>
</div>
<div id="documents-content">
<div class="container margin-top">
<div class="row">
<a href="/doc/CV.pdf" class="btn btn-info" download="Nikola_Petrov_CV">CV</a>
<a href="/doc/Certificate.pdf" class="btn btn-info" download="Nikola_Petrov_electrotechnician_certificate">Electrotechnician certificate</a>
<p>
<span class="hidden" style="font-size: 0.75em;">
<i class="fa-solid fa-calendar-days"></i> 01/09/2016 - 07/07/2021
<i class="fa-solid fa-location-dot"></i> Litostrojska Cesta 51, Ljubljana, Slovenia <br>
</span>
<span style="font-size: 1.1em;">
Secondary school of technical professions šiška<br>
</span>
<span style="font-size: 1.6em; line-height: 1em; color: #0dcaf0;">
Electrotechnician<br>
</span>
<span>
<a href="https://ssts.si/">
<i class="fa-solid fa-globe"></i>
https://ssts.si/
</a>
</span>
</p>
<br>
<br>
</div>
</div>
</div>
</section>
<div id="documents-content">
<div class="container margin-top">
<div class="row">
<a href="/doc/CV.pdf" class="btn btn-info" download="Nikola_Petrov_CV">CV</a>
<a href="/doc/Certificate.pdf" class="btn btn-info"
download="Nikola_Petrov_electrotechnician_certificate">Electrotechnician certificate</a>
</div>
</div>
</div>
</section>
</body>
</html>

View File

@ -1,352 +1,371 @@
<script defer src="/assets/main/2_0/js/script.js"></script>
<link rel="stylesheet" href="/assets/main/2_0/css/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet">
<script defer type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script defer nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<!doctype html>
<html lang="en" data-bs-theme="dark">
<main>
<aside class="sidebar" data-sidebar>
<div class="sidebar-info">
<figure class="avatar-box">
<img src="/images/Jaz.jpg" alt="Nikola Petrov" width="80">
</figure>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/logo.ico" type="image/x-icon">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Nikola Petrov</title>
<div class="info-content">
<h1 class="name" title="Nikola Petrov">Nikola Petrov</h1>
<script defer src="/assets/main/2_0/js/script.js"></script>
<link rel="stylesheet" href="/assets/main/2_0/css/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet">
<script defer type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script defer nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
</head>
<body>
<main>
<aside class="sidebar" data-sidebar>
<div class="sidebar-info">
<figure class="avatar-box">
<img src="/images/Jaz.jpg" alt="Nikola Petrov" width="80">
</figure>
<div class="info-content">
<h1 class="name" title="Nikola Petrov">Nikola Petrov</h1>
<p class="title">RIT Student</p>
</div>
<button class="info_more-btn" data-sidebar-btn>
<span>Show Contacts</span>
<ion-icon name="chevron-down"></ion-icon>
</button>
<p class="title">RIT Student</p>
</div>
<button class="info_more-btn" data-sidebar-btn>
<span>Show Contacts</span>
<div class="sidebar-info_more">
<ion-icon name="chevron-down"></ion-icon>
</button>
<div class="separator"></div>
</div>
<ul class="contacts-list">
<div class="sidebar-info_more">
<li class="contact-item">
<div class="separator"></div>
<div class="icon-box">
<ion-icon name="mail-outline"></ion-icon>
</div>
<ul class="contacts-list">
<div class="contact-info">
<p class="contact-title">Email</p>
<li class="contact-item">
<a href="mailto:nikola@petrov.nexus" class="contact-link">nikolape7@gmail.com</a>
</div>
<div class="icon-box">
<ion-icon name="mail-outline"></ion-icon>
</div>
</li>
<div class="contact-info">
<p class="contact-title">Email</p>
<li class="contact-item">
<a href="mailto:nikola@petrov.nexus" class="contact-link">nikolape7@gmail.com</a>
</div>
<div class="icon-box">
<ion-icon name="phone-portrait-outline"></ion-icon>
</div>
</li>
<div class="contact-info">
<p class="contact-title">Phone</p>
<li class="contact-item">
<a href="tel:0038670749506" class="contact-link">070749506</a>
</div>
<div class="icon-box">
<ion-icon name="phone-portrait-outline"></ion-icon>
</div>
</li>
<div class="contact-info">
<p class="contact-title">Phone</p>
<li class="contact-item">
<a href="tel:0038670749506" class="contact-link">070749506</a>
</div>
<div class="icon-box">
<ion-icon name="calendar-outline"></ion-icon>
</div>
</li>
<div class="contact-info">
<p class="contact-title">Birthday</p>
<li class="contact-item">
<time datetime="2000-11-01">November, 2000</time>
</div>
<div class="icon-box">
<ion-icon name="calendar-outline"></ion-icon>
</div>
</li>
<div class="contact-info">
<p class="contact-title">Birthday</p>
<li class="contact-item">
<time datetime="2000-11-01">November, 2000</time>
</div>
<div class="icon-box">
<ion-icon name="location-outline"></ion-icon>
</div>
</li>
<div class="contact-info">
<p class="contact-title">Location</p>
<li class="contact-item">
<address>Ljubljana, Slovenia</address>
</div>
<div class="icon-box">
<ion-icon name="location-outline"></ion-icon>
</div>
</li>
<div class="contact-info">
<p class="contact-title">Location</p>
</ul>
<address>Ljubljana, Slovenia</address>
</div>
<div class="separator"></div>
</li>
<ul class="social-list">
</ul>
<li class="social-item">
<a href="https://gitlab.com/nikolape7" title="GitLab" class="social-link">
<ion-icon name="logo-gitlab"></ion-icon>
</a>
</li>
<div class="separator"></div>
<li class="social-item">
<a href="/doc/CV.pdf" title="CV" class="social-link">
<p>CV</p>
</a>
</li>
<ul class="social-list">
<li class="social-item">
<a href="/doc/Certificate.pdf" title="Certificate" class="social-link">
<ion-icon name="document-text-outline"></ion-icon>
</a>
</li>
<li class="social-item">
<a href="https://gitlab.com/nikolape7" title="GitLab" class="social-link">
<ion-icon name="logo-gitlab"></ion-icon>
</a>
</li>
<li class="social-item">
<a href="/doc/CV.pdf" title="CV" class="social-link">
<p>CV</p>
</a>
</li>
<li class="social-item">
<a href="/doc/Certificate.pdf" title="Certificate" class="social-link">
<ion-icon name="document-text-outline"></ion-icon>
</a>
</li>
<!-- <li class="social-item">
<!-- <li class="social-item">
<a href="#" class="social-link">
<ion-icon name="logo-gitlab"></ion-icon>
</a>
</li> -->
</ul>
</ul>
</div>
</div>
</aside>
</aside>
<!--
<!--
- #main-content
-->
<div class="main-content">
<div class="main-content">
<!--
<!--
- #NAVBAR
-->
<nav class="navbar">
<nav class="navbar">
<ul class="navbar-list">
<ul class="navbar-list">
<li class="navbar-item">
<button class="navbar-link active" data-nav-link>About</button>
</li>
<li class="navbar-item">
<button class="navbar-link active" data-nav-link>About</button>
</li>
<li class="navbar-item">
<button class="navbar-link" data-nav-link>Resume</button>
</li>
<li class="navbar-item">
<button class="navbar-link" data-nav-link>Resume</button>
</li>
<li class="navbar-item">
<button class="navbar-link" data-nav-link>Portfolio</button>
</li>
</ul>
<li class="navbar-item">
<button class="navbar-link" data-nav-link>Portfolio</button>
</li>
</ul>
</nav>
</nav>
<!--
<!--
- #ABOUT
-->
<article class="about active" data-page="about">
<article class="about active" data-page="about">
<header>
<h2 class="h2 article-title">About me</h2>
</header>
<header>
<h2 class="h2 article-title">About me</h2>
</header>
<section class="about-text">
<p>
I am currently an RIT student at FERI in Maribor and come from the beautiful city of Ljubljana.
What really excites me is the opportunity to build systems that have a direct and positive impact on people's
lives.
I find great satisfaction in using my skills to create practical solutions that address real-world challenges.
</p>
<section class="about-text">
<p>
I am currently an RIT student at FERI in Maribor and come from the beautiful city of Ljubljana.
What really excites me is the opportunity to build systems that have a direct and positive impact on
people's
lives.
I find great satisfaction in using my skills to create practical solutions that address real-world
challenges.
</p>
<p>
I am excited by the potential of my work and the opportunities that lie ahead.
With my dedication and expertise, I am determined to contribute to the development of solutions that enhance
the people's experiences and make a positive difference in the world.
</p>
</section>
<p>
I am excited by the potential of my work and the opportunities that lie ahead.
With my dedication and expertise, I am determined to contribute to the development of solutions that enhance
the people's experiences and make a positive difference in the world.
</p>
</section>
<!--
<!--
- project
-->
<section class="service">
<section class="service">
<h3 class="h3 service-title">Interests</h3>
<h3 class="h3 service-title">Interests</h3>
<ul class="service-list">
<ul class="service-list">
<li class="service-item">
<div class="service-icon-box">
<ion-icon name="server-outline"></ion-icon>
</div>
<li class="service-item">
<div class="service-icon-box">
<ion-icon name="server-outline"></ion-icon>
</div>
<div class="service-content-box">
<div class="service-content-box">
<h4 class="h4 service-item-title">Backend programming</h4>
<p class="service-item-text">
Backend programming focuses on server-side development, handling data storage, processing, and business
logic to support the functionality of web and mobile applications
</p>
</div>
</li>
<h4 class="h4 service-item-title">Backend programming</h4>
<p class="service-item-text">
Backend programming focuses on server-side development, handling data storage, processing, and
business
logic to support the functionality of web and mobile applications
</p>
</div>
</li>
<li class="service-item">
<li class="service-item">
<div class="service-icon-box">
<ion-icon name="hardware-chip-outline"></ion-icon>
</div>
<div class="service-icon-box">
<ion-icon name="hardware-chip-outline"></ion-icon>
</div>
<div class="service-content-box">
<div class="service-content-box">
<h4 class="h4 service-item-title">Embedded systems</h4>
<h4 class="h4 service-item-title">Embedded systems</h4>
<p class="service-item-text">
Embedded systems are specialized computing devices integrated into everyday products, performing
dedicated functions with real-time constraints.
</p>
</div>
<p class="service-item-text">
Embedded systems are specialized computing devices integrated into everyday products, performing
dedicated functions with real-time constraints.
</p>
</div>
</li>
</li>
<li class="service-item">
<li class="service-item">
<div class="service-icon-box">
<ion-icon name="desktop-outline"></ion-icon>
</div>
<div class="service-icon-box">
<ion-icon name="desktop-outline"></ion-icon>
</div>
<div class="service-content-box">
<h4 class="h4 service-item-title">Application programming</h4>
<p class="service-item-text">
Application programming involves writing code to create software applications that perform specific
tasks or functions.
</p>
</div>
<div class="service-content-box">
<h4 class="h4 service-item-title">Application programming</h4>
<p class="service-item-text">
Application programming involves writing code to create software applications that perform specific
tasks or functions.
</p>
</div>
</li>
</li>
</ul>
</ul>
</section>
</section>
</article>
</article>
<!--
<!--
- #RESUME
-->
<article class="resume" data-page="resume">
<article class="resume" data-page="resume">
<header>
<h2 class="h2 article-title">Resume</h2>
</header>
<header>
<h2 class="h2 article-title">Resume</h2>
</header>
<section class="timeline">
<section class="timeline">
<div class="title-wrapper">
<div class="icon-box">
<ion-icon name="book-outline"></ion-icon>
<div class="title-wrapper">
<div class="icon-box">
<ion-icon name="book-outline"></ion-icon>
</div>
<h3 class="h3">Education</h3>
</div>
<h3 class="h3">Education</h3>
</div>
<ol class="timeline-list">
{{#each education}}
<li class="timeline-item">
<h4 class="h4 timeline-item-title">{{title}}</h4>
<span>{{time}}</span>
<p class="timeline-text">{{des}}</p>
</li>
{{/each}}
</ol>
<ol class="timeline-list">
{{#each education}}
<li class="timeline-item">
<h4 class="h4 timeline-item-title">{{title}}</h4>
<span>{{time}}</span>
<p class="timeline-text">{{des}}</p>
</li>
{{/each}}
</ol>
</section>
</section>
<section class="timeline">
<section class="timeline">
<div class="title-wrapper">
<div class="icon-box">
<ion-icon name="book-outline"></ion-icon>
</div>
<div class="title-wrapper">
<div class="icon-box">
<ion-icon name="book-outline"></ion-icon>
<h3 class="h3">Experience</h3>
</div>
<h3 class="h3">Experience</h3>
</div>
<ol class="timeline-list">
{{#each experience}}
<li class="timeline-item">
<h4 class="h4 timeline-item-title">{{title}} [ {{company}} ]</h4>
<span>{{time}}</span>
<p class="timeline-text">
{{des}}
</p>
</li>
{{/each}}
<ol class="timeline-list">
{{#each experience}}
<li class="timeline-item">
<h4 class="h4 timeline-item-title">{{title}} [ {{company}} ]</h4>
<span>{{time}}</span>
<p class="timeline-text">
{{des}}
</p>
</li>
{{/each}}
</ol>
</ol>
</section>
</section>
</article>
</article>
<!--
<!--
- #PORTFOLIO
-->
<article class="portfolio" data-page="portfolio">
<article class="portfolio" data-page="portfolio">
<header>
<h2 class="h2 article-title">Portfolio</h2>
</header>
<header>
<h2 class="h2 article-title">Portfolio</h2>
</header>
<section class="projects">
<section class="projects">
<ul class="project-list">
<ul class="project-list">
{{#each project}}
<li class="project-item active">
<a href="{{link}}">
{{#each project}}
<li class="project-item active">
<a href="{{link}}">
<figure class="project-img">
<div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon>
</div>
<figure class="project-img">
<div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon>
</div>
<img src="{{img}}" loading="lazy">
</figure>
<img src="{{img}}" loading="lazy">
</figure>
<h3 class="project-title">{{title}}</h3>
<h3 class="project-title">{{title}}</h3>
<p class="project-category">{{des}}</p>
<p class="project-category">{{des}}</p>
</a>
</li>
{{/each}}
</ul>
</a>
</li>
{{/each}}
</ul>
</section>
</section>
</article>
</article>
</div>
</div>
</main>
</main>
</body>
</html>

View File

@ -1,45 +1,69 @@
<div class="container">
<form action="/user" method="post">
<div class="mb-3">
<label class="form-label">Name</label>
<select name="name" class="form-select">
{{#each keys}}
<option value="{{this}}">{{this}}</option>
{{/each}}
</select>
</div>
<!doctype html>
<html lang="en" data-bs-theme="dark">
<div class="mb-3">
<label class="form-label">Value</label>
<input type="text" class="form-control" name="value">
</div>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="images/logo.ico" type="image/x-icon">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<div class="mb-3">
<label class="form-label">Password</label>
<input type="password" class="form-control" name="reqPassword" id="password">
</div>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
<button type="submit" class="btn btn-primary">Add</button>
</form>
<br>
<div class="btn btn-primary" id="get" onclick="getUser()"> Get</div>
<br>
<div id="text"></div>
<title>User</title>
</head>
<script>
<body>
async function getUser() {
const password = document.getElementById('password').value;
const response = await fetch('/user', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ "pass": password }),
})
const data = await response.json();
document.getElementById('text').textContent = JSON.stringify(data, null, 2);
}
<div class="container">
<form action="/user" method="post">
<div class="mb-3">
<label class="form-label">Name</label>
<select name="name" class="form-select">
{{#each keys}}
<option value="{{this}}">{{this}}</option>
{{/each}}
</select>
</div>
</script>
</div>
<div class="mb-3">
<label class="form-label">Value</label>
<input type="text" class="form-control" name="value">
</div>
<div class="mb-3">
<label class="form-label">Password</label>
<input type="password" class="form-control" name="reqPassword" id="password">
</div>
<button type="submit" class="btn btn-primary">Add</button>
</form>
<br>
<div class="btn btn-primary" id="get" onclick="getUser()"> Get</div>
<br>
<div id="text"></div>
<script>
async function getUser() {
const password = document.getElementById('password').value;
const response = await fetch('/user', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ "pass": password }),
})
const data = await response.json();
document.getElementById('text').textContent = JSON.stringify(data, null, 2);
}
</script>
</div>
</body>
</html>