mirror of
https://github.com/aykhans/portfolio-blog.git
synced 2025-09-10 08:00:44 +00:00
First Commit
This commit is contained in:
41
src/app/templates/admin/login.html
Normal file
41
src/app/templates/admin/login.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Login Example</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="loginForm">
|
||||
<!-- Your login input fields go here -->
|
||||
<input type="text" name="email" placeholder="email">
|
||||
<input type="password" name="password" placeholder="Password">
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
// Function to handle the form submission
|
||||
function handleSubmit(event) {
|
||||
event.preventDefault();
|
||||
const form = document.getElementById('loginForm');
|
||||
const formData = new FormData(form);
|
||||
|
||||
fetch('/login', {
|
||||
method: 'POST', // Adjust the HTTP method if needed
|
||||
body: formData,
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
const accessToken = data.access_token;
|
||||
console.log(accessToken);
|
||||
document.cookie = `access_token=${accessToken}`;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Login error:', error);
|
||||
});
|
||||
}
|
||||
|
||||
// Add a submit event listener to the form
|
||||
const loginForm = document.getElementById('loginForm');
|
||||
loginForm.addEventListener('submit', handleSubmit);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
55
src/app/templates/base.html
Normal file
55
src/app/templates/base.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html data-bs-theme="light" lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||
<title>{% block title %}{% endblock title %}</title>
|
||||
<link rel="icon" type="image/png" href="static/img/shipit.png">
|
||||
<link rel="stylesheet" href="static/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Abril+Fatface&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Aclonica&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Alatsi&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Alfa+Slab+One&display=swap">
|
||||
<link rel="stylesheet" href="static/fonts/font-awesome.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg fixed-top navbar-light" id="mainNav">
|
||||
<div class="container"><a class="navbar-brand fw-bolder" href="/#" style="font-family: Lora, serif;font-size: 35px;" data-bs-target="/">#</a><button data-bs-toggle="collapse" data-bs-target="#navbarResponsive" class="navbar-toggler" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation" style="padding: 6px;border-radius: 0px;border-width: 0px;"><i class="fa fa-bars" style="font-size: 27px;"></i></button>
|
||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item"><a class="nav-link fs-5" href="/#about">about</a></li>
|
||||
<li class="nav-item"><a class="nav-link fs-5" href="/#contact">contact</a></li>
|
||||
<li class="nav-item"><a class="nav-link fs-5" href="/blog">blog</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{% block content %}{% endblock content %}
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-lg-8 mx-auto">
|
||||
<ul class="list-inline text-center">
|
||||
<li class="list-inline-item"><a class="link-body-emphasis" href="mailto:aykhan.shahs@gmail.com"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" class="fa-stack-1x fa-inverse" style="font-size: 34px;margin-top: 9px;">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.00977 5.83789C3.00977 5.28561 3.45748 4.83789 4.00977 4.83789H20C20.5523 4.83789 21 5.28561 21 5.83789V17.1621C21 18.2667 20.1046 19.1621 19 19.1621H5C3.89543 19.1621 3 18.2667 3 17.1621V6.16211C3 6.11449 3.00333 6.06765 3.00977 6.0218V5.83789ZM5 8.06165V17.1621H19V8.06199L14.1215 12.9405C12.9499 14.1121 11.0504 14.1121 9.87885 12.9405L5 8.06165ZM6.57232 6.80554H17.428L12.7073 11.5263C12.3168 11.9168 11.6836 11.9168 11.2931 11.5263L6.57232 6.80554Z" fill="currentColor"></path>
|
||||
</svg></span></a></li>
|
||||
<li class="list-inline-item"><a class="link-body-emphasis" href="https://www.linkedin.com/in/aykhan-shahsuvarov-59a314187/" target="_blank"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-linkedin fa-stack-1x fa-inverse"></i></span></a></li>
|
||||
<li class="list-inline-item"><a class="link-body-emphasis" href="whatsapp://send?abid=+994998998951&text=Hello%2C%20World!/" target="_blank"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-whatsapp fa-stack-1x fa-inverse"></i></span></a></li>
|
||||
<li class="list-inline-item"><a class="link-body-emphasis" href="https://github.com/Aykhan-s" target="_blank"><span class="fa-stack fa-lg"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-github fa-stack-1x fa-inverse"></i></span></a></li>
|
||||
</ul>
|
||||
<p class="text-muted copyright" style="margin-top: 10px;">Aykhan Shahsuvarov</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<script src="static/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="static/js/clean-blog.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
44
src/app/templates/blog.html
Normal file
44
src/app/templates/blog.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Blog{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<header class="masthead" style="background: url("static/img/bryan-goff-f7YQo-eYHdM-unsplash.jpg");">
|
||||
<div class="overlay"></div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-lg-8 mx-auto position-relative">
|
||||
<div class="site-heading">
|
||||
<h1><strong>Blog</strong></h1><span class="subheading">you won't find the meaning of life below</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<article>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-lg-8 mx-auto">
|
||||
{% for post in posts %}
|
||||
<div class="post-preview">
|
||||
<a href="#">
|
||||
<h2 class="post-title">{{post.title}}</h2>
|
||||
<h3 class="post-subtitle">{{post.text}}</h3>
|
||||
</a>
|
||||
<p class="post-meta">Posted at <a href="#">{{post.created_at}}</a></p>
|
||||
</div>
|
||||
<hr>
|
||||
{% endfor %}
|
||||
<div class="clearfix">
|
||||
<button class="btn btn-primary float-end" type="button" style="margin-left: 2rem; background: rgb(0, 133, 161);">
|
||||
<a href="/blog?skip={{skip}}" style="text-decoration: none; color: inherit;">Older Posts ⇒</a>
|
||||
</button>
|
||||
<button class="btn btn-primary float-end" type="button" style="background: rgb(0, 133, 161);">
|
||||
<a href="/blog?skip={{skip}}&new=true" style="text-decoration: none; color: inherit;">⇐ Newer Posts</a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{% endblock content %}
|
1
src/app/templates/components/navbar.html
Normal file
1
src/app/templates/components/navbar.html
Normal file
@@ -0,0 +1 @@
|
||||
<h1>Navbar</h1>
|
79
src/app/templates/index.html
Normal file
79
src/app/templates/index.html
Normal file
@@ -0,0 +1,79 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Just a Page{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<header class="masthead" style="background: url("static/img/bryan-goff-f7YQo-eYHdM-unsplash.jpg");">
|
||||
<div class="overlay"></div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-lg-8 mx-auto position-relative">
|
||||
<div class="site-heading">
|
||||
<h1><strong>Just a Page</strong></h1><span class="subheading">Actually this is the home page</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<section id="about" class="about" style="margin-top: 80px;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-lg-8 mx-auto">
|
||||
<h1><strong>¿WhO</strong> aM I</h1>
|
||||
<p>I am 20 years old and I am studying computer science in the 4th grade of Azerbaijan Technical University.</p>
|
||||
<p>I have been learning and using the Python programming language for over 2 years. So far I have used python in many projects mainly for developing web based applications.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 50px;">
|
||||
<div class="col-md-10 col-lg-8 mx-auto">
|
||||
<h1 style="margin-bottom: 12px;"><strong>Tools I usually use</strong></h1>
|
||||
<div class="row" style="margin-right: -6px;padding-right: 116px;margin-bottom: 35px;">
|
||||
<div class="col-xxl-2" style="margin-top: 10px;"><a href="https://www.python.org/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54" alt="django" width="116" height="37"></a></div>
|
||||
<div class="col-xxl-2" style="margin-top: 10px;"><a href="https://www.djangoproject.com/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/django-%23092E20.svg?style=for-the-badge&logo=django&logoColor=white" alt="django" width="116" height="37"></a></div>
|
||||
<div class="col" style="margin-top: 10px;"><a href="https://www.django-rest-framework.org/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/DJANGO-REST-ff1709?style=for-the-badge&logo=django&logoColor=white&color=ff1709&labelColor=gray" alt="django-rest framework" width="161" height="37"></a></div>
|
||||
<div class="col" style="margin-top: 10px;"><a href="https://www.postman.com/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/Postman-FF6C37?style=for-the-badge&logo=postman&logoColor=white" alt="django" width="127" height="37"></a></div>
|
||||
<div class="col" style="margin-top: 10px;"><a href="https://selenium-python.readthedocs.io/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/-selenium-%43B02A?style=for-the-badge&logo=selenium&logoColor=white" alt="selenium" width="132" height="37"></a></div>
|
||||
</div>
|
||||
<div class="row" style="margin-right: -6px;padding-right: 116px;margin-bottom: 35px;">
|
||||
<div class="col-xxl-2" style="margin-top: 10px;"><a href="https://pandas.pydata.org/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/pandas-%23150458.svg?style=for-the-badge&logo=pandas&logoColor=white" alt="pandas" width="116" height="37"></a></div>
|
||||
<div class="col-xxl-2" style="margin-top: 10px;"><a href="https://numpy.org/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/numpy-%23013243.svg?style=for-the-badge&logo=numpy&logoColor=white" alt="numpy" alt="numpy" width="119" height="37"></a></div>
|
||||
<div class="col" style="margin-top: 10px;"><a href="https://streamlit.io/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/Streamlit-%23D00000.svg?style=for-the-badge&logoColor=white" alt="streamlit" width="116" height="37"></a></div>
|
||||
</div>
|
||||
<div class="row" style="margin-right: -6px;padding-right: 116px;">
|
||||
<div class="col-xxl-2" style="margin-top: 10px;"><a href="https://www.docker.com/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white" alt="docker" width="116" height="37"></a></div>
|
||||
<div class="col-xxl-2" style="margin-top: 10px;"><a href="https://www.postgresql.org/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/postgres-%23316192.svg?style=for-the-badge&logo=postgresql&logoColor=white" alt="postgres" width="121" height="37"></a></div>
|
||||
<div class="col-xxl-2" style="margin-top: 10px;"><a href="https://www.nginx.com/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/nginx-%23009639.svg?style=for-the-badge&logo=nginx&logoColor=white" alt="nginx" width="116" height="37"></a></div>
|
||||
<div class="col-xxl-2" style="margin-top: 10px;"><a href="https://aws.amazon.com/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/AWS-%23FF9900.svg?style=for-the-badge&logo=amazon-aws&logoColor=white" alt="AWS" width="105" height="37"></a></div>
|
||||
<div class="col" style="margin-top: 10px;"><a href="https://ubuntu.com/" target="_blank" style="margin-right: 0;margin-top: 0;"><img src="https://img.shields.io/badge/Ubuntu-E95420?style=for-the-badge&logo=ubuntu&logoColor=white" alt="django" width="126" height="37"></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="contact" class="contact" style="margin-top: 150px;margin-bottom: 20px;">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-lg-8 mx-auto">
|
||||
<h1>Contact me</h1>
|
||||
<p>Want to get in touch? Fill out the form below to send me a message and I will get back to you as soon as possible!</p>
|
||||
<form id="contactForm" name="sentMessage">
|
||||
<div class="control-group">
|
||||
<div class="form-floating controls mb-3"><input class="form-control" type="text" id="name" required="" placeholder="Name"><label class="form-label" for="name">Name</label><small class="form-text text-danger help-block"></small></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="form-floating controls mb-3"><input class="form-control" type="email" id="email" required="" placeholder="Email Address"><label class="form-label">Email Address</label><small class="form-text text-danger help-block"></small></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="form-floating controls mb-3"><input class="form-control" type="tel" id="phone" required="" placeholder="Phone Number"><label class="form-label">Phone Number</label><small class="form-text text-danger help-block"></small></div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="form-floating controls mb-3"><textarea class="form-control" id="message" data-validation-required-message="Please enter a message." required="" placeholder="Message" style="height: 150px;"></textarea><label class="form-label">Message</label><small class="form-text text-danger help-block"></small></div>
|
||||
</div>
|
||||
<div id="success"></div>
|
||||
<div class="mb-3"><button class="btn btn-primary" id="sendMessageButton" type="submit">Send</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock content %}
|
45
src/app/templates/post.html
Normal file
45
src/app/templates/post.html
Normal file
@@ -0,0 +1,45 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Blog Post{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<header class="masthead" style="background: url("static/img/bryan-goff-f7YQo-eYHdM-unsplash.jpg");">
|
||||
<div class="overlay"></div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-lg-8 mx-auto position-relative">
|
||||
<div class="site-heading">
|
||||
<h1><strong>Title</strong></h1><span class="subheading">Date</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<article>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-lg-8 mx-auto">
|
||||
<p>Never in all their history have men been able truly to conceive of the world as one: a single sphere, a globe, having the qualities of a globe, a round earth in which all the directions eventually meet, in which there is no center because every point, or none, is center — an equal earth which all men occupy as equals. The airman's earth, if free men make it, will be truly round: a globe in practice, not in theory.</p>
|
||||
<p>Science cuts two ways, of course; its products can be used for both good and evil. But there's no turning back from science. The early warnings about technological dangers also come from science.</p>
|
||||
<p>What was most significant about the lunar voyage was not that man set foot on the Moon but that they set eye on the earth.</p>
|
||||
<p>A Chinese tale tells of some men sent to harm a young girl who, upon seeing her beauty, become her protectors rather than her violators. That's how I felt seeing the Earth for the first time. I could not help but love and cherish her.</p>
|
||||
<p>For those who have seen the Earth from space, and for the hundreds and perhaps thousands more who will, the experience most certainly changes your perspective. The things that we share in our world are far more valuable than those which divide us.</p>
|
||||
<h2 class="section-heading">Heading</h2>
|
||||
<p>There can be no thought of finishing for ‘aiming for the stars.’ Both figuratively and literally, it is a task to occupy the generations. And no matter how much progress one makes, there is always the thrill of just beginning.</p>
|
||||
<p>There can be no thought of finishing for ‘aiming for the stars.’ Both figuratively and literally, it is a task to occupy the generations. And no matter how much progress one makes, there is always the thrill of just beginning.</p>
|
||||
<figure>
|
||||
<blockquote class="blockquote">
|
||||
<p class="mb-0">The dreams of yesterday are the hopes of today and the reality of tomorrow. Science has not yet mastered prophecy. We predict too much for the next year and yet far too little for the next ten.</p>
|
||||
</blockquote>
|
||||
</figure>
|
||||
<p>Spaceflights cannot be stopped. This is not the work of any one man or even a group of men. It is a historical process which mankind is carrying out in accordance with the natural laws of human development.</p>
|
||||
<h2 class="section-heading">Reaching for the Stars</h2>
|
||||
<p>As we got further and further away, it [the Earth] diminished in size. Finally it shrank to the size of a marble, the most beautiful you can imagine. That beautiful, warm, living object looked so fragile, so delicate, that if you touched it with a finger it would crumble and fall apart. Seeing this has to change a man.</p><a href="#"><img class="img-fluid" src="static/img/post-sample-image.jpg"></a><span class="text-muted caption">To go places and do things that have never been done before – that’s what living is all about.</span>
|
||||
<p>Space, the final frontier. These are the voyages of the Starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before.</p>
|
||||
<p>As I stand out here in the wonders of the unknown at Hadley, I sort of realize there’s a fundamental truth to our nature, Man must explore, and this is exploration at its greatest.</p>
|
||||
<p><span>Placeholder text by </span><a href="http://spaceipsum.com">Space Ipsum</a><span> Photographs by </span><a href="https://www.flickr.com/photos/nasacommons/">NASA on The Commons</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{% endblock content %}
|
Reference in New Issue
Block a user