изменен навбар, добавлена страница профиля

This commit is contained in:
Dinosaur 2022-04-20 16:14:23 +05:00
parent 2a40e3957a
commit 481a229862
6 changed files with 89 additions and 55 deletions

Binary file not shown.

View File

@ -508,6 +508,9 @@ def recovery():
def about():
return render_template('about.html', title='О нас')
@app.route('/profil')
def profil():
return render_template('profil.html', title='Профиль')
def main():
db_session.global_init("db/moona_data.db")

View File

@ -3,4 +3,4 @@
}
body {
font-family: 'Comfortaa', cursive;
}
}

View File

@ -95,27 +95,19 @@ textarea {
.box {
margin-left: 20px;
}
#row2, #row1 {
#row2, #row1, #all_my_question {
width: 30%;
}
#row1, #row2, #all_my_question {
display:inline-block;
vertical-align: top;
}
#all_my_question {
width: 30%;
height: -100%;
}
.question, .my_post {
background-color:#7fc3ff;
border-radius: 22px;
width: 90%;
margin-left: 10px;
}
.is_ans {
background-color:#ddefff;
border:2px solid #ffffff;
border-radius: 25px;
width: 380px;
}
.emot_block {
color: #ffffff;
@ -126,7 +118,10 @@ table {
width: 90%;
}
.like {
width: 50%;
margin-left: auto;
margin-right: auto;
width: 50%;
margin-left: auto;
margin-right: auto;
}
td {
margin: 20px;
}

View File

@ -2,6 +2,24 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<link rel="canonical" href="https://getbootstrap.com/docs/5.1/examples/sidebars/">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<link href="sidebars.css" rel="stylesheet">
<link href="../static/css/base.css">
<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
@ -13,47 +31,65 @@
<title>{{title}}</title>
</head>
<body style=background-color:#f0ffff>
<nav class="navbar navbar-light" style="background-color: #d4f1ff;">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<img src="static/img/MoonCcircl1.png" width="70" height="70">
</a>
<ul class="navbar-nav">
<a class="navbar-brand" href="/">
<h2 style="color:#56a3ff">Главная</h2>
</a>
</ul>
<ul class="navbar-nav">
<a class="navbar-brand" href="/diary">
<h2 style="color:#56a3ff">Дневник</h2>
</a>
</ul>
<ul class="navbar-nav">
<a class="navbar-brand" href="/publications">
<h2 style="color:#56a3ff">Публикации</h2>
</a>
</ul>
<ul class="navbar-nav">
<a class="navbar-brand" href="/about_us">
<h2 style="color:#56a3ff">О нас</h2>
</a>
</ul>
{% if current_user.is_authenticated %}
<a href="/logout"><div style="style=position:absolute; width:148px; height:44px; left:255px; -webkit-border-radius:
22px;-moz-border-radius: 22px;border-radius: 22px; border:2px solid #FFFFFF; background-color:#1daff0; top:
98px;"><img src="../{{ current_user.photo }}" width="40" height="40" style="border-radius: 50%">
<strong style="color: #ffffff">{{ current_user.name }}</strong>
</div></a>
{% else %}
<div>
<a class="btn btn-primary " style="background-color:#41b6ff" type="submit" href="/register"><strong>
Зарегистрироваться</strong></a>
<a class="btn btn-primary" style="background-color:#38aaff" type="submit"
href="/login"><strong>Войти</strong></a>
</div>
{% endif %}
</div>
</nav>
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="bootstrap" viewBox="0 0 118 94">
<title>Bootstrap</title>
<path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z"></path>
</symbol>
<symbol id="home" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M2 13.5V7h1v6.5a.5.5 0 0 0 .5.5h9a.5.5 0 0 0 .5-.5V7h1v6.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 13.5zm11-11V6l-2-2V2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5z"/>
<path fill-rule="evenodd" d="M7.293 1.5a1 1 0 0 1 1.414 0l6.647 6.646a.5.5 0 0 1-.708.708L8 2.207 1.354 8.854a.5.5 0 1 1-.708-.708L7.293 1.5z"/>
</symbol>
<symbol id="diary" viewBox="0 0 16 16">
<path d="M5 0h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2 2 2 0 0 1-2 2H3a2 2 0 0 1-2-2h1a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1H1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v9a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1H3a2 2 0 0 1 2-2z"/>
<path d="M1 6v-.5a.5.5 0 0 1 1 0V6h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0V9h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 2.5v.5H.5a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1H2v-.5a.5.5 0 0 0-1 0z"/>
</symbol>
<symbol id="posts" viewBox="0 0 16 16">
<path d="M1 2.828c.885-.37 2.154-.769 3.388-.893 1.33-.134 2.458.063 3.112.752v9.746c-.935-.53-2.12-.603-3.213-.493-1.18.12-2.37.461-3.287.811V2.828zm7.5-.141c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"/>
</symbol>
<symbol id="about" viewBox="0 0 16 16">
<path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h12zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z"/>
<path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"/>
</symbol>
<symbol id="profil" viewBox="0 0 16 16">
<path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664h10z"/>
</symbol>
</svg>
<div class="d-flex flex-column flex-shrink-0 bg-light" style="width: 5rem; height: 0px;">
<a href="/" class="d-block p-3 link-dark text-decoration-none" title="Icon-only" data-bs-toggle="tooltip" data-bs-placement="right">
<object type="image/svg+xml" data="static/img/Логотим Moona.svg" width="54" height="54">
Your browser does not support SVG
</object>
</a>
<ul class="nav nav-pills nav-flush flex-column mb-auto text-center">
<li class="nav-item">
<a href="/" class="nav-link active py-3 border-bottom" aria-current="page" title="Главная" data-bs-toggle="tooltip" data-bs-placement="right">
<svg class="bi" width="24" height="24" role="img" aria-label="Главная"><use xlink:href="#home"/></svg>
</a>
</li>
<li>
<a href="/diary" class="nav-link py-3 border-bottom" title="Дневник" data-bs-toggle="tooltip" data-bs-placement="right">
<svg class="bi" width="24" height="24" role="img" aria-label="Дневник"><use xlink:href="#diary"/></svg>
</a>
</li>
<li>
<a href="/publications" class="nav-link py-3 border-bottom" title="Публикации" data-bs-toggle="tooltip" data-bs-placement="right">
<svg class="bi" width="24" height="24" role="img" aria-label="Публикации"><use xlink:href="#posts"/></svg>
</a>
</li>
<li>
<a href="/about_us" class="nav-link py-3 border-bottom" title="О нас" data-bs-toggle="tooltip" data-bs-placement="right">
<svg class="bi" width="24" height="24" role="img" aria-label="О нас"><use xlink:href="#about"/></svg>
</a>
</li>
<li>
<a href="/profil" class="nav-link py-3 border-bottom" title="Профиль" data-bs-toggle="tooltip" data-bs-placement="right">
<svg class="bi" width="24" height="24" role="img" aria-label="Профиль"><use xlink:href="#profil"/></svg>
</a>
</li>
</ul>
</div>
<!-- Begin page content -->
<main role="main">
{% block content %}{% endblock %}

0
templates/profil.html Normal file
View File