Skip to content

Commit

Permalink
update home page
Browse files Browse the repository at this point in the history
  • Loading branch information
RustamovAkrom committed Oct 28, 2024
1 parent 778c156 commit 1e26ce4
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 24 deletions.
6 changes: 6 additions & 0 deletions app/routes/blog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from flask import Blueprint, render_template


dp = Blueprint("blog", __name__)


5 changes: 3 additions & 2 deletions app/routes/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ def uploaded_file(filename):
@htmx_route()
def index():
resume_data = Resume.query.first()

about_avatar_url = About.query.first()
context = {
"template_name": "site/index.html",
"template_title": "Rustamov Akrom",
# "template_title": "Rustamov Akrom",
"template_body_class_name": "index",
"resume": resume_data,
"about_avatar_url": about_avatar_url.avatar
}
return context

Expand Down
4 changes: 3 additions & 1 deletion app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta name="author" content="Akrom Rustamov">

<!-- Open graph -->
<meta property="og:title" content="Akrom Rustamov - Python Developer">
<meta property="og:title" content="Akrom Rustamov - Python Developer Portfolio">
<meta property="og:description" content="Take a look at my projects and contact me for cooperation.">
<meta property="og:image" content="{{ url_for('static', filename='asseets/img/portfolio-thumbnail.png') }}">
<meta property="og:url" content="https://akromjonrustamov.pythonanywhere.com">
Expand All @@ -35,6 +35,8 @@
<!-- Main CSS File -->
<link href="{{ url_for('static', filename='assets/css/main.css') }}" rel="stylesheet">

{% block style %}
{% endblock %}
<!-- =======================================================
* Template Name: Personal
* Template URL: https://bootstrapmade.com/personal-free-resume-bootstrap-template/
Expand Down
76 changes: 55 additions & 21 deletions app/templates/site/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,61 @@
{% block style %}
<style>
.avatar-wrapper {
display: flex;
justify-content: flex-end; /* Выравнивание аватара вправо */
align-items: center; /* Вертикальное выравнивание по центру */
}

.avatar-wrapper img {
width: 200px; /* Ширина аватара, при необходимости можно изменить */
height: 200px; /* Высота аватара, при необходимости можно изменить */
object-fit: cover; /* Обрезка изображения по форме круга */
border: 5px solid seagreen; /* Белая рамка вокруг аватара (при желании) */
margin-left: 70%;
}
</style>
{% endblock %}

<!-- Hero Section -->
<section id="hero" class="hero section dark-background">
<img src="{{ url_for('static', filename='assets/img/index-bg.jpg') }}" alt="" data-aos="fade-in">
<div class="container" data-aos="zoom-out" data-aos-delay="100">
{% if current_user.is_authenticated %}
<h2>Welcome Akrom</h2>
{% else %}
<h2>Rustamov Akrom &</h2>
{% endif %}
<p>I'm <span class="typed" data-typed-items="Python developer, Web developer, Freelancer, Akrom">Photographer</span><span class="typed-cursor typed-cursor--blink"></span></p>
<div class="col-md-6 mt-4">
<small>Hi! I am Akrom Rustamov, a Python developer with over 2 years of experience in web development. My key skills include Django, Flask and FastAPI.</small>
</div>
<div class="social-links">
{% for social in socials() %}
<a href="{{ social.url }}"><i class="{{ social.style }}"></i></a>
{% endfor %}
</div>
<div class="mt-4 mb-3">
<a href="{{ url_for('site.portfolio') }}" class="btn btn-outline-success">My projects</a>
{% if resume %}
<a href="{{ url_for('site.download_resume', resume_id=resume.id) }}" class="btn btn-outline-success">Download resume</a>
<img src="{{ url_for('static', filename='assets/img/index-bg.jpg') }}" alt="Background Image" data-aos="fade-in" class="img-fluid">

<div class="container d-flex align-items-center" data-aos="zoom-out" data-aos-delay="100">
<div class="col-md-6">
{% if current_user.is_authenticated %}
<h2>Welcome Akrom</h2>
{% else %}
<h2>Rustamov Akrom</h2>
{% endif %}

<p>
I'm <span class="typed" data-typed-items="Python developer, Web developer, Freelancer, Akrom">Photographer</span>
<span class="typed-cursor typed-cursor--blink"></span>
</p>

<small>Hi! I am Akrom Rustamov, a Python developer with over 2 years of experience in web development. My key skills include Django, Flask, and FastAPI.</small>

<div class="social-links mt-4">
{% for social in socials() %}
<a href="{{ social.url }}" class="social-icon" target="_blank" rel="noopener noreferrer">
<i class="{{ social.style }}"></i>
</a>
{% endfor %}
</div>

<div class="mt-4 mb-3">
<a href="{{ url_for('site.portfolio') }}" class="btn btn-outline-success">My projects</a>
{% if resume %}
<a href="{{ url_for('site.download_resume', resume_id=resume.id) }}" class="btn btn-outline-success">Download resume</a>
{% endif %}
</div>
</div>

<!-- Avatar -->
<div class="col-lg-4 ml-auto">
<div class="avatar-wrapper">
<img src="{{ url_for('site.uploaded_file', filename=about_avatar_url) }}" class="img-fluid rounded-circle" alt="Akrom Rustamov - Python Developer">
</div>
</div>
</div>

</section><!-- /Hero Section -->

0 comments on commit 1e26ce4

Please sign in to comment.