Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
53d6a412fd | |||
0f688cd350 | |||
166c1acb42 | |||
7f7f47304a | |||
28ac5a270c | |||
3866ba5ce0 | |||
822b0df255 | |||
7f920dd722 | |||
cbcc23a80a | |||
1595decb97 | |||
e1d82cfc62 | |||
20d4dd42a7 | |||
246a556b33 | |||
b0ade359db | |||
3863d8710d | |||
fc2b6083cc |
20
.eslintrc.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"es2021": true
|
||||||
|
},
|
||||||
|
"extends": "airbnb-base",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 12,
|
||||||
|
"sourceType": "module"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"quotes": "off",
|
||||||
|
"indent": "off",
|
||||||
|
"no-console": "off",
|
||||||
|
"no-use-before-define": "off",
|
||||||
|
"no-alert": "off",
|
||||||
|
"no-restricted-globals": "off",
|
||||||
|
"quote-props": "off"
|
||||||
|
}
|
||||||
|
}
|
527
feed.html
Normal file
@ -0,0 +1,527 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<script type="module" src="./node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
|
||||||
|
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
|
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||||
|
<link href="./node_modules/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||||
|
<link rel="stylesheet" href="./static/css/base.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/left-menu.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/center.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/post.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/avatar.css">
|
||||||
|
<link rel="shortcut icon" href="./static/img/favicon.svg" type="image/svg+xml">
|
||||||
|
<script src="./static/js/feed.js" type="module"></script>
|
||||||
|
<title>Новости</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="min-vh-100 d-flex flex-column">
|
||||||
|
<header class="sticky-top">
|
||||||
|
<nav class="navbar">
|
||||||
|
<div class="container-fluid d-flex justify-content-between">
|
||||||
|
<a class="navbar-brand">
|
||||||
|
<span class="logo-small d-sm-none">нк</span>
|
||||||
|
<span class="logo-full d-none d-sm-block">неконтакте</span>
|
||||||
|
</a>
|
||||||
|
<div class="page-title position-fixed w-100 text-center">Новости</div>
|
||||||
|
<div class="dropdown">
|
||||||
|
<a class="dropdown-toggle d-flex align-items-center" href="#" role="button" id="dropdownMenuLink"
|
||||||
|
data-bs-toggle="dropdown" aria-expanded="false" style="color: white;">
|
||||||
|
<img src="./static/img/gachi.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle me-2">
|
||||||
|
<div class="post-author-name me-2 d-none d-md-block">
|
||||||
|
Алексей Смирнов
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenuLink">
|
||||||
|
<li class="d-sm-none"><a class="dropdown-item" href="/me.html"><i
|
||||||
|
class="bi bi-person me-2"></i>Моя страница</a>
|
||||||
|
</li>
|
||||||
|
<li><a class="dropdown-item" href="#"><i class="bi bi-gear me-2"></i>Настройки</a></li>
|
||||||
|
<li>
|
||||||
|
<hr class="dropdown-divider">
|
||||||
|
</li>
|
||||||
|
<li><a class="dropdown-item" href="#"><i class="bi bi-box-arrow-right me-2"></i>Выход</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<main class="px-1 px-sm-2 px-lg-4 pt-2 pt-sm-4 d-flex position-relative flex-fill">
|
||||||
|
<div id="left-menu"
|
||||||
|
class="p-3 d-none d-sm-flex flex-column justify-content-center align-content-around border border-dark rounded-2 position-fixed">
|
||||||
|
<a href="/me.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-person"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Моя страница</span>
|
||||||
|
</a>
|
||||||
|
<a href="/feed.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-layout-text-sidebar-reverse"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Новости</span>
|
||||||
|
</a>
|
||||||
|
<a href="/messages.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-chat-text"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Сообщения</span>
|
||||||
|
</a>
|
||||||
|
<a href="/friends.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-people"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Друзья</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="wrapper d-flex justify-content-center">
|
||||||
|
<div class="center d-flex flex-column">
|
||||||
|
<textarea placeholder="Что нового?" id="post-editor" class="border rounded-2 border-dark mb-2 p-2"></textarea>
|
||||||
|
<div id="title-image-block" class="modal-critery">
|
||||||
|
<input id="check-title-image" type="checkbox" style="display: none;">
|
||||||
|
<input id="input-title-image" name="titleImage" accept="image/*" type="file" onchange="showTitleImagePreview(event);" />
|
||||||
|
<label id="title-image-preview" for="input-title-image" title="Добавить изображение" class="rounded-2 mb-2">
|
||||||
|
<i id="empty-title-image" class="bi bi-camera"></i>
|
||||||
|
<img id="selected-title-image" class="rounded-2">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-primary mb-2" id="post-publication-button">Опубликовать</button>
|
||||||
|
<div class="mb-2 w-100" id="edit-block">
|
||||||
|
<button class="btn btn-danger me-2 w-100" id="edit-post-button-cancel">Отмена</button>
|
||||||
|
<button class="btn btn-success w-100" id="edit-post-button-accept">Применить</button>
|
||||||
|
</div>
|
||||||
|
<div class="posts-wrapper">
|
||||||
|
<div class="post mb-2 mb-sm-4 w-100 d-flex flex-column border rounded-2 border-dark">
|
||||||
|
<div
|
||||||
|
class="post-header py-1 px-2 d-flex border-bottom border-dark justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center">
|
||||||
|
<div class="post-author-avatar-wrapper">
|
||||||
|
<img src="./static/img/korgi.jpg" class="post-author-avatar">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="post-meta ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="post-author-name">
|
||||||
|
Алексей Смирнов
|
||||||
|
</div>
|
||||||
|
<div class="post-publication-datetime">
|
||||||
|
15 сентября, 15:22
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<i class="bi bi-three-dots fs-4"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="post-body">
|
||||||
|
<div class="post-body-text m-2">
|
||||||
|
<p>
|
||||||
|
Корги – королевская порода с дружелюбным характером
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Привет, друзья! Сегодня я хочу рассказать вам о замечательной породе собак – корги. Эти
|
||||||
|
милые создания с короткими лапами и длинными ушами покорили сердца многих людей, и не
|
||||||
|
зря! Корги – это небольшие собаки, которые произошли из Уэльса. Они были выведены для
|
||||||
|
охоты на зайцев и других мелких животных.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<img src="./static/img/korgi.jpg" class="post-body-img img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="post-footer py-1 px-2 border-top border-dark d-flex">
|
||||||
|
<div class="counter-block likes-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16 4a5.95 5.95 0 0 0-3.89 1.7l-.12.11-.12-.11A5.96 5.96 0 0 0 7.73 4 5.73 5.73 0 0 0 2 9.72c0 3.08 1.13 4.55 6.18 8.54l2.69 2.1c.66.52 1.6.52 2.26 0l2.36-1.84.94-.74c4.53-3.64 5.57-5.1 5.57-8.06A5.73 5.73 0 0 0 16.27 4zm.27 1.8a3.93 3.93 0 0 1 3.93 3.92v.3c-.08 2.15-1.07 3.33-5.51 6.84l-2.67 2.08a.04.04 0 0 1-.04 0L9.6 17.1l-.87-.7C4.6 13.1 3.8 11.98 3.8 9.73A3.93 3.93 0 0 1 7.73 5.8c1.34 0 2.51.62 3.57 1.92a.9.9 0 0 0 1.4-.01c1.04-1.3 2.2-1.91 3.57-1.91z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">734</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block comments-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16.9 4H7.1c-1.15 0-1.73.11-2.35.44-.56.3-1 .75-1.31 1.31C3.11 6.37 3 6.95 3 8.1v5.8c0 1.15.11 1.73.44 2.35.3.56.75 1 1.31 1.31l.15.07c.51.25 1.04.35 1.95.37h.25v2.21c0 .44.17.85.47 1.16l.12.1c.64.55 1.6.52 2.21-.08L13.37 18h3.53c1.15 0 1.73-.11 2.35-.44.56-.3 1-.75 1.31-1.31.33-.62.44-1.2.44-2.35V8.1c0-1.15-.11-1.73-.44-2.35a3.17 3.17 0 0 0-1.31-1.31A4.51 4.51 0 0 0 16.9 4zM6.9 5.8h9.99c.88 0 1.18.06 1.5.23.25.13.44.32.57.57.17.32.23.62.23 1.5v6.16c-.02.61-.09.87-.23 1.14-.13.25-.32.44-.57.57-.32.17-.62.23-1.5.23h-4.02a.9.9 0 0 0-.51.26l-3.47 3.4V17.1c0-.5-.4-.9-.9-.9H6.74a2.3 2.3 0 0 1-1.14-.23 1.37 1.37 0 0 1-.57-.57c-.17-.32-.23-.62-.23-1.5V7.74c.02-.61.09-.87.23-1.14.13-.25.32-.44.57-.57.3-.16.58-.22 1.31-.23z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">344</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block replies-block px-2 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M12 3.73c-1.12.07-2 1-2 2.14v2.12h-.02a9.9 9.9 0 0 0-7.83 10.72.9.9 0 0 0 1.61.46l.19-.24a9.08 9.08 0 0 1 5.84-3.26l.2-.03.01 2.5a2.15 2.15 0 0 0 3.48 1.69l7.82-6.14a2.15 2.15 0 0 0 0-3.38l-7.82-6.13c-.38-.3-.85-.46-1.33-.46zm.15 1.79c.08 0 .15.03.22.07l7.82 6.14a.35.35 0 0 1 0 .55l-7.82 6.13a.35.35 0 0 1-.57-.28V14.7a.9.9 0 0 0-.92-.9h-.23l-.34.02c-2.28.14-4.4.98-6.12 2.36l-.17.15.02-.14a8.1 8.1 0 0 1 6.97-6.53.9.9 0 0 0 .79-.9V5.87c0-.2.16-.35.35-.35z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">1</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post mb-2 mb-sm-4 w-100 d-flex flex-column border rounded-2 border-dark">
|
||||||
|
<div
|
||||||
|
class="post-header py-1 px-2 d-flex border-bottom border-dark justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center">
|
||||||
|
<img src="./static/img/polina_krotova.jpg"
|
||||||
|
class="post-author-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="post-meta ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="post-author-name">
|
||||||
|
Полина Кротова
|
||||||
|
</div>
|
||||||
|
<div class="post-publication-datetime">
|
||||||
|
15 сентября, 15:22
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<i class="bi bi-three-dots fs-4"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="post-body">
|
||||||
|
<div class="post-body-text m-2">
|
||||||
|
<p>
|
||||||
|
Самореализация: путь к успеху и счастью
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Привет, друзья! Сегодня мы поговорим о таком важном аспекте нашей жизни, как
|
||||||
|
самореализация. Многие из нас задумываются о том, как достичь гармонии в жизни и
|
||||||
|
реализовать свои мечты. В этом посте мы рассмотрим основные аспекты самореализации и
|
||||||
|
дадим советы, которые помогут вам найти свой путь к счастью.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<img src="./static/img/samoreal.jpeg" class="post-body-img img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="post-footer py-1 px-2 border-top border-dark d-flex">
|
||||||
|
<div class="counter-block likes-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16 4a5.95 5.95 0 0 0-3.89 1.7l-.12.11-.12-.11A5.96 5.96 0 0 0 7.73 4 5.73 5.73 0 0 0 2 9.72c0 3.08 1.13 4.55 6.18 8.54l2.69 2.1c.66.52 1.6.52 2.26 0l2.36-1.84.94-.74c4.53-3.64 5.57-5.1 5.57-8.06A5.73 5.73 0 0 0 16.27 4zm.27 1.8a3.93 3.93 0 0 1 3.93 3.92v.3c-.08 2.15-1.07 3.33-5.51 6.84l-2.67 2.08a.04.04 0 0 1-.04 0L9.6 17.1l-.87-.7C4.6 13.1 3.8 11.98 3.8 9.73A3.93 3.93 0 0 1 7.73 5.8c1.34 0 2.51.62 3.57 1.92a.9.9 0 0 0 1.4-.01c1.04-1.3 2.2-1.91 3.57-1.91z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">734</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block comments-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16.9 4H7.1c-1.15 0-1.73.11-2.35.44-.56.3-1 .75-1.31 1.31C3.11 6.37 3 6.95 3 8.1v5.8c0 1.15.11 1.73.44 2.35.3.56.75 1 1.31 1.31l.15.07c.51.25 1.04.35 1.95.37h.25v2.21c0 .44.17.85.47 1.16l.12.1c.64.55 1.6.52 2.21-.08L13.37 18h3.53c1.15 0 1.73-.11 2.35-.44.56-.3 1-.75 1.31-1.31.33-.62.44-1.2.44-2.35V8.1c0-1.15-.11-1.73-.44-2.35a3.17 3.17 0 0 0-1.31-1.31A4.51 4.51 0 0 0 16.9 4zM6.9 5.8h9.99c.88 0 1.18.06 1.5.23.25.13.44.32.57.57.17.32.23.62.23 1.5v6.16c-.02.61-.09.87-.23 1.14-.13.25-.32.44-.57.57-.32.17-.62.23-1.5.23h-4.02a.9.9 0 0 0-.51.26l-3.47 3.4V17.1c0-.5-.4-.9-.9-.9H6.74a2.3 2.3 0 0 1-1.14-.23 1.37 1.37 0 0 1-.57-.57c-.17-.32-.23-.62-.23-1.5V7.74c.02-.61.09-.87.23-1.14.13-.25.32-.44.57-.57.3-.16.58-.22 1.31-.23z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">344</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block replies-block px-2 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M12 3.73c-1.12.07-2 1-2 2.14v2.12h-.02a9.9 9.9 0 0 0-7.83 10.72.9.9 0 0 0 1.61.46l.19-.24a9.08 9.08 0 0 1 5.84-3.26l.2-.03.01 2.5a2.15 2.15 0 0 0 3.48 1.69l7.82-6.14a2.15 2.15 0 0 0 0-3.38l-7.82-6.13c-.38-.3-.85-.46-1.33-.46zm.15 1.79c.08 0 .15.03.22.07l7.82 6.14a.35.35 0 0 1 0 .55l-7.82 6.13a.35.35 0 0 1-.57-.28V14.7a.9.9 0 0 0-.92-.9h-.23l-.34.02c-2.28.14-4.4.98-6.12 2.36l-.17.15.02-.14a8.1 8.1 0 0 1 6.97-6.53.9.9 0 0 0 .79-.9V5.87c0-.2.16-.35.35-.35z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">1</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post mb-2 mb-sm-4 w-100 d-flex flex-column border rounded-2 border-dark">
|
||||||
|
<div
|
||||||
|
class="post-header py-1 px-2 d-flex border-bottom border-dark justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center">
|
||||||
|
<img src="./static/img/gachi.jpg"
|
||||||
|
class="post-author-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="post-meta ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="post-author-name">
|
||||||
|
Алексей Смирнов
|
||||||
|
</div>
|
||||||
|
<div class="post-publication-datetime">
|
||||||
|
15 сентября, 15:22
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<i class="bi bi-three-dots fs-4"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="post-body">
|
||||||
|
<div class="post-body-text m-2">
|
||||||
|
<p>
|
||||||
|
Корги - это не просто милые собачки, а настоящие друзья, которые всегда готовы составить
|
||||||
|
компанию в любых приключениях. Они очень умны и легко обучаемы, что делает их идеальными
|
||||||
|
питомцами для семей с детьми. Однако, несмотря на свою популярность, корги все же
|
||||||
|
остаются собаками, которые нуждаются в правильном уходе и заботе.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post-footer py-1 px-2 border-top border-dark d-flex">
|
||||||
|
<div class="counter-block likes-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<img src="./static/img/heart.svg" style="width: 24px;">
|
||||||
|
<span class="count ms-1">734</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block comments-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16.9 4H7.1c-1.15 0-1.73.11-2.35.44-.56.3-1 .75-1.31 1.31C3.11 6.37 3 6.95 3 8.1v5.8c0 1.15.11 1.73.44 2.35.3.56.75 1 1.31 1.31l.15.07c.51.25 1.04.35 1.95.37h.25v2.21c0 .44.17.85.47 1.16l.12.1c.64.55 1.6.52 2.21-.08L13.37 18h3.53c1.15 0 1.73-.11 2.35-.44.56-.3 1-.75 1.31-1.31.33-.62.44-1.2.44-2.35V8.1c0-1.15-.11-1.73-.44-2.35a3.17 3.17 0 0 0-1.31-1.31A4.51 4.51 0 0 0 16.9 4zM6.9 5.8h9.99c.88 0 1.18.06 1.5.23.25.13.44.32.57.57.17.32.23.62.23 1.5v6.16c-.02.61-.09.87-.23 1.14-.13.25-.32.44-.57.57-.32.17-.62.23-1.5.23h-4.02a.9.9 0 0 0-.51.26l-3.47 3.4V17.1c0-.5-.4-.9-.9-.9H6.74a2.3 2.3 0 0 1-1.14-.23 1.37 1.37 0 0 1-.57-.57c-.17-.32-.23-.62-.23-1.5V7.74c.02-.61.09-.87.23-1.14.13-.25.32-.44.57-.57.3-.16.58-.22 1.31-.23z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">344</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block replies-block px-2 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M12 3.73c-1.12.07-2 1-2 2.14v2.12h-.02a9.9 9.9 0 0 0-7.83 10.72.9.9 0 0 0 1.61.46l.19-.24a9.08 9.08 0 0 1 5.84-3.26l.2-.03.01 2.5a2.15 2.15 0 0 0 3.48 1.69l7.82-6.14a2.15 2.15 0 0 0 0-3.38l-7.82-6.13c-.38-.3-.85-.46-1.33-.46zm.15 1.79c.08 0 .15.03.22.07l7.82 6.14a.35.35 0 0 1 0 .55l-7.82 6.13a.35.35 0 0 1-.57-.28V14.7a.9.9 0 0 0-.92-.9h-.23l-.34.02c-2.28.14-4.4.98-6.12 2.36l-.17.15.02-.14a8.1 8.1 0 0 1 6.97-6.53.9.9 0 0 0 .79-.9V5.87c0-.2.16-.35.35-.35z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">1</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post mb-2 mb-sm-4 w-100 d-flex flex-column border rounded-2 border-dark">
|
||||||
|
<div
|
||||||
|
class="post-header py-1 px-2 d-flex border-bottom border-dark justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center">
|
||||||
|
<img src="./static/img/selivan_troickiy.jpg"
|
||||||
|
class="post-author-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="post-meta ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="post-author-name">
|
||||||
|
Селиван Троицкий
|
||||||
|
</div>
|
||||||
|
<div class="post-publication-datetime">
|
||||||
|
15 сентября, 15:22
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<i class="bi bi-three-dots fs-4"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="post-body">
|
||||||
|
<div class="post-body-text m-2">
|
||||||
|
<p>
|
||||||
|
Ульяновский политехнический университет - это одно из ведущих образовательных учреждений
|
||||||
|
России, которое предлагает широкий спектр образовательных программ для студентов всех
|
||||||
|
возрастов. Университет был основан в 1957 году и с тех пор выпустил тысячи
|
||||||
|
квалифицированных специалистов. Сегодня в университете обучается более 5000 студентов,
|
||||||
|
которые могут выбрать из 15 направлений подготовки бакалавров, 10 направлений подготовки
|
||||||
|
магистров и 5 специальностей.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post-footer py-1 px-2 border-top border-dark d-flex">
|
||||||
|
<div class="counter-block likes-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16 4a5.95 5.95 0 0 0-3.89 1.7l-.12.11-.12-.11A5.96 5.96 0 0 0 7.73 4 5.73 5.73 0 0 0 2 9.72c0 3.08 1.13 4.55 6.18 8.54l2.69 2.1c.66.52 1.6.52 2.26 0l2.36-1.84.94-.74c4.53-3.64 5.57-5.1 5.57-8.06A5.73 5.73 0 0 0 16.27 4zm.27 1.8a3.93 3.93 0 0 1 3.93 3.92v.3c-.08 2.15-1.07 3.33-5.51 6.84l-2.67 2.08a.04.04 0 0 1-.04 0L9.6 17.1l-.87-.7C4.6 13.1 3.8 11.98 3.8 9.73A3.93 3.93 0 0 1 7.73 5.8c1.34 0 2.51.62 3.57 1.92a.9.9 0 0 0 1.4-.01c1.04-1.3 2.2-1.91 3.57-1.91z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">734</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block comments-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16.9 4H7.1c-1.15 0-1.73.11-2.35.44-.56.3-1 .75-1.31 1.31C3.11 6.37 3 6.95 3 8.1v5.8c0 1.15.11 1.73.44 2.35.3.56.75 1 1.31 1.31l.15.07c.51.25 1.04.35 1.95.37h.25v2.21c0 .44.17.85.47 1.16l.12.1c.64.55 1.6.52 2.21-.08L13.37 18h3.53c1.15 0 1.73-.11 2.35-.44.56-.3 1-.75 1.31-1.31.33-.62.44-1.2.44-2.35V8.1c0-1.15-.11-1.73-.44-2.35a3.17 3.17 0 0 0-1.31-1.31A4.51 4.51 0 0 0 16.9 4zM6.9 5.8h9.99c.88 0 1.18.06 1.5.23.25.13.44.32.57.57.17.32.23.62.23 1.5v6.16c-.02.61-.09.87-.23 1.14-.13.25-.32.44-.57.57-.32.17-.62.23-1.5.23h-4.02a.9.9 0 0 0-.51.26l-3.47 3.4V17.1c0-.5-.4-.9-.9-.9H6.74a2.3 2.3 0 0 1-1.14-.23 1.37 1.37 0 0 1-.57-.57c-.17-.32-.23-.62-.23-1.5V7.74c.02-.61.09-.87.23-1.14.13-.25.32-.44.57-.57.3-.16.58-.22 1.31-.23z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">344</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block replies-block px-2 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M12 3.73c-1.12.07-2 1-2 2.14v2.12h-.02a9.9 9.9 0 0 0-7.83 10.72.9.9 0 0 0 1.61.46l.19-.24a9.08 9.08 0 0 1 5.84-3.26l.2-.03.01 2.5a2.15 2.15 0 0 0 3.48 1.69l7.82-6.14a2.15 2.15 0 0 0 0-3.38l-7.82-6.13c-.38-.3-.85-.46-1.33-.46zm.15 1.79c.08 0 .15.03.22.07l7.82 6.14a.35.35 0 0 1 0 .55l-7.82 6.13a.35.35 0 0 1-.57-.28V14.7a.9.9 0 0 0-.92-.9h-.23l-.34.02c-2.28.14-4.4.98-6.12 2.36l-.17.15.02-.14a8.1 8.1 0 0 1 6.97-6.53.9.9 0 0 0 .79-.9V5.87c0-.2.16-.35.35-.35z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">1</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post mb-2 mb-sm-4 w-100 d-flex flex-column border rounded-2 border-dark">
|
||||||
|
<div
|
||||||
|
class="post-header py-1 px-2 d-flex border-bottom border-dark justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center">
|
||||||
|
<img src="./static/img/gachi.jpg"
|
||||||
|
class="post-author-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="post-meta ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="post-author-name">
|
||||||
|
Алексей Смирнов
|
||||||
|
</div>
|
||||||
|
<div class="post-publication-datetime">
|
||||||
|
15 сентября, 15:22
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<i class="bi bi-three-dots fs-4"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="post-body">
|
||||||
|
<img src="./static/img/korgi.jpg" class="post-body-img img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="post-footer py-1 px-2 border-top border-dark d-flex">
|
||||||
|
<div class="counter-block likes-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16 4a5.95 5.95 0 0 0-3.89 1.7l-.12.11-.12-.11A5.96 5.96 0 0 0 7.73 4 5.73 5.73 0 0 0 2 9.72c0 3.08 1.13 4.55 6.18 8.54l2.69 2.1c.66.52 1.6.52 2.26 0l2.36-1.84.94-.74c4.53-3.64 5.57-5.1 5.57-8.06A5.73 5.73 0 0 0 16.27 4zm.27 1.8a3.93 3.93 0 0 1 3.93 3.92v.3c-.08 2.15-1.07 3.33-5.51 6.84l-2.67 2.08a.04.04 0 0 1-.04 0L9.6 17.1l-.87-.7C4.6 13.1 3.8 11.98 3.8 9.73A3.93 3.93 0 0 1 7.73 5.8c1.34 0 2.51.62 3.57 1.92a.9.9 0 0 0 1.4-.01c1.04-1.3 2.2-1.91 3.57-1.91z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">734</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block comments-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16.9 4H7.1c-1.15 0-1.73.11-2.35.44-.56.3-1 .75-1.31 1.31C3.11 6.37 3 6.95 3 8.1v5.8c0 1.15.11 1.73.44 2.35.3.56.75 1 1.31 1.31l.15.07c.51.25 1.04.35 1.95.37h.25v2.21c0 .44.17.85.47 1.16l.12.1c.64.55 1.6.52 2.21-.08L13.37 18h3.53c1.15 0 1.73-.11 2.35-.44.56-.3 1-.75 1.31-1.31.33-.62.44-1.2.44-2.35V8.1c0-1.15-.11-1.73-.44-2.35a3.17 3.17 0 0 0-1.31-1.31A4.51 4.51 0 0 0 16.9 4zM6.9 5.8h9.99c.88 0 1.18.06 1.5.23.25.13.44.32.57.57.17.32.23.62.23 1.5v6.16c-.02.61-.09.87-.23 1.14-.13.25-.32.44-.57.57-.32.17-.62.23-1.5.23h-4.02a.9.9 0 0 0-.51.26l-3.47 3.4V17.1c0-.5-.4-.9-.9-.9H6.74a2.3 2.3 0 0 1-1.14-.23 1.37 1.37 0 0 1-.57-.57c-.17-.32-.23-.62-.23-1.5V7.74c.02-.61.09-.87.23-1.14.13-.25.32-.44.57-.57.3-.16.58-.22 1.31-.23z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">344</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block replies-block px-2 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M12 3.73c-1.12.07-2 1-2 2.14v2.12h-.02a9.9 9.9 0 0 0-7.83 10.72.9.9 0 0 0 1.61.46l.19-.24a9.08 9.08 0 0 1 5.84-3.26l.2-.03.01 2.5a2.15 2.15 0 0 0 3.48 1.69l7.82-6.14a2.15 2.15 0 0 0 0-3.38l-7.82-6.13c-.38-.3-.85-.46-1.33-.46zm.15 1.79c.08 0 .15.03.22.07l7.82 6.14a.35.35 0 0 1 0 .55l-7.82 6.13a.35.35 0 0 1-.57-.28V14.7a.9.9 0 0 0-.92-.9h-.23l-.34.02c-2.28.14-4.4.98-6.12 2.36l-.17.15.02-.14a8.1 8.1 0 0 1 6.97-6.53.9.9 0 0 0 .79-.9V5.87c0-.2.16-.35.35-.35z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">1</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post mb-2 mb-sm-4 w-100 d-flex flex-column border rounded-2 border-dark">
|
||||||
|
<div
|
||||||
|
class="post-header py-1 px-2 d-flex border-bottom border-dark justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center">
|
||||||
|
<img src="./static/img/valeriy_nikiforov.jpg"
|
||||||
|
class="post-author-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="post-meta ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="post-author-name">
|
||||||
|
Валерий Никифоров
|
||||||
|
</div>
|
||||||
|
<div class="post-publication-datetime">
|
||||||
|
15 сентября, 15:22
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<i class="bi bi-three-dots fs-4"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="post-body">
|
||||||
|
<div class="post-body-text m-2">
|
||||||
|
<p>
|
||||||
|
Крутое фото - зацените!
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<img src="./static/img/gachi.jpg" class="post-body-img img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="post-footer py-1 px-2 border-top border-dark d-flex">
|
||||||
|
<div class="counter-block likes-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16 4a5.95 5.95 0 0 0-3.89 1.7l-.12.11-.12-.11A5.96 5.96 0 0 0 7.73 4 5.73 5.73 0 0 0 2 9.72c0 3.08 1.13 4.55 6.18 8.54l2.69 2.1c.66.52 1.6.52 2.26 0l2.36-1.84.94-.74c4.53-3.64 5.57-5.1 5.57-8.06A5.73 5.73 0 0 0 16.27 4zm.27 1.8a3.93 3.93 0 0 1 3.93 3.92v.3c-.08 2.15-1.07 3.33-5.51 6.84l-2.67 2.08a.04.04 0 0 1-.04 0L9.6 17.1l-.87-.7C4.6 13.1 3.8 11.98 3.8 9.73A3.93 3.93 0 0 1 7.73 5.8c1.34 0 2.51.62 3.57 1.92a.9.9 0 0 0 1.4-.01c1.04-1.3 2.2-1.91 3.57-1.91z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">734</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block comments-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16.9 4H7.1c-1.15 0-1.73.11-2.35.44-.56.3-1 .75-1.31 1.31C3.11 6.37 3 6.95 3 8.1v5.8c0 1.15.11 1.73.44 2.35.3.56.75 1 1.31 1.31l.15.07c.51.25 1.04.35 1.95.37h.25v2.21c0 .44.17.85.47 1.16l.12.1c.64.55 1.6.52 2.21-.08L13.37 18h3.53c1.15 0 1.73-.11 2.35-.44.56-.3 1-.75 1.31-1.31.33-.62.44-1.2.44-2.35V8.1c0-1.15-.11-1.73-.44-2.35a3.17 3.17 0 0 0-1.31-1.31A4.51 4.51 0 0 0 16.9 4zM6.9 5.8h9.99c.88 0 1.18.06 1.5.23.25.13.44.32.57.57.17.32.23.62.23 1.5v6.16c-.02.61-.09.87-.23 1.14-.13.25-.32.44-.57.57-.32.17-.62.23-1.5.23h-4.02a.9.9 0 0 0-.51.26l-3.47 3.4V17.1c0-.5-.4-.9-.9-.9H6.74a2.3 2.3 0 0 1-1.14-.23 1.37 1.37 0 0 1-.57-.57c-.17-.32-.23-.62-.23-1.5V7.74c.02-.61.09-.87.23-1.14.13-.25.32-.44.57-.57.3-.16.58-.22 1.31-.23z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">344</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block replies-block px-2 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M12 3.73c-1.12.07-2 1-2 2.14v2.12h-.02a9.9 9.9 0 0 0-7.83 10.72.9.9 0 0 0 1.61.46l.19-.24a9.08 9.08 0 0 1 5.84-3.26l.2-.03.01 2.5a2.15 2.15 0 0 0 3.48 1.69l7.82-6.14a2.15 2.15 0 0 0 0-3.38l-7.82-6.13c-.38-.3-.85-.46-1.33-.46zm.15 1.79c.08 0 .15.03.22.07l7.82 6.14a.35.35 0 0 1 0 .55l-7.82 6.13a.35.35 0 0 1-.57-.28V14.7a.9.9 0 0 0-.92-.9h-.23l-.34.02c-2.28.14-4.4.98-6.12 2.36l-.17.15.02-.14a8.1 8.1 0 0 1 6.97-6.53.9.9 0 0 0 .79-.9V5.87c0-.2.16-.35.35-.35z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">1</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<div class="bottom-menu d-flex d-sm-none w-100 sticky-bottom justify-content-around">
|
||||||
|
<a href="/feed.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-layout-text-sidebar-reverse fs-4"></i>
|
||||||
|
<span>Новости</span>
|
||||||
|
</a>
|
||||||
|
<a href="/messages.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-chat-text fs-4"></i>
|
||||||
|
<span>Чаты</span>
|
||||||
|
</a>
|
||||||
|
<a href="/friends.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-people fs-4"></i>
|
||||||
|
<span>Друзья</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<footer class="py-2 d-none d-sm-flex justify-content-center border-top border-dark">
|
||||||
|
<span>© <span id="current-year"></span> Неконтакте</span>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
<script>document.getElementById('current-year').innerHTML = new Date().getFullYear();</script>
|
||||||
|
<script>
|
||||||
|
function showTitleImagePreview(event) {
|
||||||
|
var previewEmpty = document.getElementById("empty-title-image");
|
||||||
|
var previewSelected = document.getElementById("selected-title-image");
|
||||||
|
var check = document.getElementById("check-title-image");
|
||||||
|
var preview = document.getElementById('title-image-preview');
|
||||||
|
|
||||||
|
if (check != null) check.checked = true;
|
||||||
|
if (event.target.files.length > 0) {
|
||||||
|
var src = URL.createObjectURL(event.target.files[0]);
|
||||||
|
previewEmpty.style.display = "none";
|
||||||
|
previewSelected.style.display = "block";
|
||||||
|
previewSelected.style.opacity = "1.0";
|
||||||
|
previewSelected.src = src;
|
||||||
|
preview.title = "Редактировать изображение";
|
||||||
|
} else {
|
||||||
|
previewEmpty.style.display = "block";
|
||||||
|
previewSelected.style.display = "none";
|
||||||
|
previewSelected.style.opacity = "1.0";
|
||||||
|
previewSelected.src = "";
|
||||||
|
preview.title = "Добавить изображение";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</html>
|
180
friends.html
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<script type="module" src="./node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
|
||||||
|
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
|
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||||
|
<link href="./node_modules/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||||
|
<link rel="stylesheet" href="./static/css/base.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/left-menu.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/center.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/post.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/avatar.css">
|
||||||
|
<link rel="shortcut icon" href="./static/img/favicon.svg" type="image/svg+xml">
|
||||||
|
<title>Друзья</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="vh-100 d-flex flex-column">
|
||||||
|
<header class="sticky-top">
|
||||||
|
<nav class="navbar">
|
||||||
|
<div class="container-fluid d-flex justify-content-between">
|
||||||
|
<a class="navbar-brand">
|
||||||
|
<span class="logo-small d-sm-none">нк</span>
|
||||||
|
<span class="logo-full d-none d-sm-block">неконтакте</span>
|
||||||
|
</a>
|
||||||
|
<div class="page-title position-fixed w-100 text-center">Друзья</div>
|
||||||
|
<div class="dropdown">
|
||||||
|
<a class="dropdown-toggle d-flex align-items-center" href="#" role="button" id="dropdownMenuLink"
|
||||||
|
data-bs-toggle="dropdown" aria-expanded="false" style="color: white;">
|
||||||
|
<img src="./static/img/gachi.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle me-2">
|
||||||
|
<div class="post-author-name me-2 d-none d-md-block">
|
||||||
|
Алексей Смирнов
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenuLink">
|
||||||
|
<li class="d-sm-none"><a class="dropdown-item" href="/me.html"><i
|
||||||
|
class="bi bi-person me-2"></i>Моя страница</a>
|
||||||
|
</li>
|
||||||
|
<li><a class="dropdown-item" href="#"><i class="bi bi-gear me-2"></i>Настройки</a></li>
|
||||||
|
<li>
|
||||||
|
<hr class="dropdown-divider">
|
||||||
|
</li>
|
||||||
|
<li><a class="dropdown-item" href="#"><i class="bi bi-box-arrow-right me-2"></i>Выход</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<main class="px-1 px-sm-2 px-lg-4 pt-2 pt-sm-4 d-flex position-relative flex-fill">
|
||||||
|
<div id="left-menu"
|
||||||
|
class="p-3 d-none d-sm-flex flex-column justify-content-center align-content-around border border-dark rounded-2 position-fixed">
|
||||||
|
<a href="/me.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-person"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Моя страница</span>
|
||||||
|
</a>
|
||||||
|
<a href="/feed.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-layout-text-sidebar-reverse"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Новости</span>
|
||||||
|
</a>
|
||||||
|
<a href="/messages.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-chat-text"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Сообщения</span>
|
||||||
|
</a>
|
||||||
|
<a href="/friends.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-people"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Друзья</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="wrapper d-flex justify-content-center">
|
||||||
|
<div class="center position-relative">
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
<input type="text" class="form-control" placeholder="Найти друзей">
|
||||||
|
<button class="btn btn-outline-secondary" type="button" id="button-addon"><i
|
||||||
|
class="bi bi-search"></i></button>
|
||||||
|
</div>
|
||||||
|
<div class="people-row border-bottom border-dark p-2 d-flex justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center" style="font-size: small;">
|
||||||
|
<img src="./static/img/valentina_lavrenteva.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="user-info ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="user-name">
|
||||||
|
Валентина Лаврентьева
|
||||||
|
</div>
|
||||||
|
<div class="user-meta">
|
||||||
|
г. Калининград, 20 лет
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<button class="btn btn-close" title="Удалить из друзей"></button>
|
||||||
|
</div>
|
||||||
|
<div class="people-row border-bottom border-dark p-2 d-flex justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center" style="font-size: small;">
|
||||||
|
<img src="./static/img/polina_krotova.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="user-info ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="user-name">
|
||||||
|
Полина Кротова
|
||||||
|
</div>
|
||||||
|
<div class="user-meta">
|
||||||
|
г. Большой Улуй, 40 лет
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<button class="btn btn-close" title="Удалить из друзей"></button>
|
||||||
|
</div>
|
||||||
|
<div class="people-row border-bottom border-dark p-2 d-flex justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center" style="font-size: small;">
|
||||||
|
<img src="./static/img/amos_artimovich.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="user-info ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="user-name">
|
||||||
|
Амос Артимович
|
||||||
|
</div>
|
||||||
|
<div class="user-meta">
|
||||||
|
г. Нюрба, 33 года
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<button class="btn btn-close" title="Удалить из друзей"></button>
|
||||||
|
</div>
|
||||||
|
<div class="people-row border-bottom border-dark p-2 d-flex justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center" style="font-size: small;">
|
||||||
|
<img src="./static/img/valeriy_nikiforov.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="user-info ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="user-name">
|
||||||
|
Валерий Никифоров
|
||||||
|
</div>
|
||||||
|
<div class="user-meta">
|
||||||
|
г. Змиевка, 30 лет
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<button class="btn btn-close" title="Удалить из друзей"></button>
|
||||||
|
</div>
|
||||||
|
<div class="people-row p-2 d-flex justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center" style="font-size: small;">
|
||||||
|
<img src="./static/img/selivan_troickiy.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="user-info ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="user-name">
|
||||||
|
Селиван Троицкий
|
||||||
|
</div>
|
||||||
|
<div class="user-meta">
|
||||||
|
г. Неман, 47 лет
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<button class="btn btn-close" title="Удалить из друзей"></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<div class="bottom-menu d-flex d-sm-none w-100 sticky-bottom justify-content-around">
|
||||||
|
<a href="/feed.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-layout-text-sidebar-reverse fs-4"></i>
|
||||||
|
<span>Новости</span>
|
||||||
|
</a>
|
||||||
|
<a href="/messages.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-chat-text fs-4"></i>
|
||||||
|
<span>Чаты</span>
|
||||||
|
</a>
|
||||||
|
<a href="/friends.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-people fs-4"></i>
|
||||||
|
<span>Друзья</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<footer class="py-2 d-none d-sm-flex justify-content-center border-top border-dark">
|
||||||
|
<span>© <span id="current-year"></span> Неконтакте</span>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
<script>document.getElementById('current-year').innerHTML = new Date().getFullYear();</script>
|
||||||
|
|
||||||
|
</html>
|
14
jsconfig.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "Node",
|
||||||
|
"target": "ES2020",
|
||||||
|
"jsx": "preserve",
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"strictFunctionTypes": true
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"node_modules",
|
||||||
|
"**/node_modules/*"
|
||||||
|
]
|
||||||
|
}
|
63
login.html
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<script type="module" src="./node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
|
||||||
|
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
|
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||||
|
<link href="./node_modules/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||||
|
<link rel="stylesheet" href="./static/css/base.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/left-menu.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/center.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/post.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/avatar.css">
|
||||||
|
<link rel="shortcut icon" href="./static/img/favicon.svg" type="image/svg+xml">
|
||||||
|
<title>Вход</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="vh-100">
|
||||||
|
<header class="fixed-top">
|
||||||
|
<nav class="navbar">
|
||||||
|
<div class="container-fluid d-flex justify-content-between">
|
||||||
|
<a class="navbar-brand">
|
||||||
|
<span class="logo-small d-sm-none">нк</span>
|
||||||
|
<span class="logo-full d-none d-sm-block">неконтакте</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<main class="px-1 px-sm-2 px-lg-4 py-2 py-sm-4 d-flex position-relative h-100">
|
||||||
|
<div class="block w-100 h-100 d-flex justify-content-center align-items-center d-none d-lg-flex">
|
||||||
|
<div class="logo-small" style="font-size: 6vw;">нк
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="block w-100 h-100 d-flex justify-content-center align-items-center">
|
||||||
|
<form id="login-form">
|
||||||
|
<legend class="text-center">Вход</legend>
|
||||||
|
<div class="mb-3">
|
||||||
|
<input type="text" class="form-control" id="inputLogin" placeholder="Логин">
|
||||||
|
</div>
|
||||||
|
<div class="mb-3">
|
||||||
|
<input type="password" class="form-control" placeholder="Пароль" id="inputPassword">
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-outline-secondary w-100 mb-3">Войти</button>
|
||||||
|
<div class="d-flex justify-content-between">
|
||||||
|
<a>
|
||||||
|
Забыли пароль?
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
Регистрация
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer class="py-2 d-flex justify-content-center border-top border-dark fixed-bottom">
|
||||||
|
<span>© <span id="current-year"></span> Неконтакте</span>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
<script>document.getElementById('current-year').innerHTML = new Date().getFullYear();</script>
|
||||||
|
|
||||||
|
</html>
|
301
me.html
Normal file
@ -0,0 +1,301 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<script type="module" src="./node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
|
||||||
|
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
|
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||||
|
<link href="./node_modules/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||||
|
<link rel="stylesheet" href="./static/css/base.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/left-menu.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/center.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/post.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/avatar.css">
|
||||||
|
<link rel="shortcut icon" href="./static/img/favicon.svg" type="image/svg+xml">
|
||||||
|
<title>Профиль</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<header class="sticky-top">
|
||||||
|
<nav class="navbar">
|
||||||
|
<div class="container-fluid d-flex justify-content-between">
|
||||||
|
<a class="navbar-brand">
|
||||||
|
<span class="logo-small d-sm-none">нк</span>
|
||||||
|
<span class="logo-full d-none d-sm-block">неконтакте</span>
|
||||||
|
</a>
|
||||||
|
<div class="page-title position-fixed w-100 text-center">Моя страница</div>
|
||||||
|
<div class="dropdown">
|
||||||
|
<a class="dropdown-toggle d-flex align-items-center" href="#" role="button" id="dropdownMenuLink"
|
||||||
|
data-bs-toggle="dropdown" aria-expanded="false" style="color: white;">
|
||||||
|
<img src="./static/img/gachi.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle me-2">
|
||||||
|
<div class="post-author-name me-2 d-none d-md-block">
|
||||||
|
Алексей Смирнов
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenuLink">
|
||||||
|
<li class="d-sm-none"><a class="dropdown-item" href="/me.html"><i
|
||||||
|
class="bi bi-person me-2"></i>Моя страница</a>
|
||||||
|
</li>
|
||||||
|
<li><a class="dropdown-item" href="#"><i class="bi bi-gear me-2"></i>Настройки</a></li>
|
||||||
|
<li>
|
||||||
|
<hr class="dropdown-divider">
|
||||||
|
</li>
|
||||||
|
<li><a class="dropdown-item" href="#"><i class="bi bi-box-arrow-right me-2"></i>Выход</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<main class="px-1 px-sm-2 px-lg-4 pt-2 pt-sm-4 d-flex position-relative">
|
||||||
|
<div id="left-menu"
|
||||||
|
class="p-3 d-none d-sm-flex flex-column justify-content-center align-content-around border border-dark rounded-2 position-fixed">
|
||||||
|
<a href="/me.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-person"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Моя страница</span>
|
||||||
|
</a>
|
||||||
|
<a href="/feed.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-layout-text-sidebar-reverse"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Новости</span>
|
||||||
|
</a>
|
||||||
|
<a href="/messages.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-chat-text"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Сообщения</span>
|
||||||
|
</a>
|
||||||
|
<a href="/friends.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-people"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Друзья</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="wrapper d-flex justify-content-center">
|
||||||
|
<div class="center">
|
||||||
|
<div
|
||||||
|
class="user-profile p-3 mb-2 mb-sm-4 w-100 d-flex flex-column flex-sm-row border rounded-2 border-dark">
|
||||||
|
<img src="./static/img/gachi.jpg"
|
||||||
|
class="user-photo img-fluid rounded-2 h-25 me-5 mb-3 mb-sm-0 w-100">
|
||||||
|
<div class="user-meta-wrapper d-flex flex-column">
|
||||||
|
<span class="fs-5 mb-2">Алексей Смирнов</span>
|
||||||
|
<span style="font-size: small; font-style: italic;" class="mb-2">Прежде чем задать вопрос,
|
||||||
|
подумай, хочешь ли
|
||||||
|
ты знать на него
|
||||||
|
правдивый
|
||||||
|
ответ...</span>
|
||||||
|
<span style="font-size: small;"><i class="bi bi-geo-alt me-1"></i>Ульяновск</span>
|
||||||
|
<span style="font-size: small;"><i class="bi bi-cake2 me-1"></i>23.04.1998г.</span>
|
||||||
|
<span style="font-size: small;"><i class="bi bi-people me-1"></i>234 друга</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post mb-2 mb-sm-4 w-100 d-flex flex-column border rounded-2 border-dark">
|
||||||
|
<div
|
||||||
|
class="post-header py-1 px-2 d-flex border-bottom border-dark justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center">
|
||||||
|
<img src="./static/img/gachi.jpg"
|
||||||
|
class="post-author-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="post-meta ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="post-author-name">
|
||||||
|
Алексей Смирнов
|
||||||
|
</div>
|
||||||
|
<div class="post-publication-datetime">
|
||||||
|
15 сентября, 15:22
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<i class="bi bi-three-dots fs-4"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="post-body">
|
||||||
|
<div class="post-body-text m-2">
|
||||||
|
<p>
|
||||||
|
Корги – королевская порода с дружелюбным характером
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Привет, друзья! Сегодня я хочу рассказать вам о замечательной породе собак – корги. Эти
|
||||||
|
милые создания с короткими лапами и длинными ушами покорили сердца многих людей, и не
|
||||||
|
зря! Корги – это небольшие собаки, которые произошли из Уэльса. Они были выведены для
|
||||||
|
охоты на зайцев и других мелких животных.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<img src="./static/img/korgi.jpg" class="post-body-img img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="post-footer py-1 px-2 border-top border-dark d-flex">
|
||||||
|
<div class="counter-block likes-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16 4a5.95 5.95 0 0 0-3.89 1.7l-.12.11-.12-.11A5.96 5.96 0 0 0 7.73 4 5.73 5.73 0 0 0 2 9.72c0 3.08 1.13 4.55 6.18 8.54l2.69 2.1c.66.52 1.6.52 2.26 0l2.36-1.84.94-.74c4.53-3.64 5.57-5.1 5.57-8.06A5.73 5.73 0 0 0 16.27 4zm.27 1.8a3.93 3.93 0 0 1 3.93 3.92v.3c-.08 2.15-1.07 3.33-5.51 6.84l-2.67 2.08a.04.04 0 0 1-.04 0L9.6 17.1l-.87-.7C4.6 13.1 3.8 11.98 3.8 9.73A3.93 3.93 0 0 1 7.73 5.8c1.34 0 2.51.62 3.57 1.92a.9.9 0 0 0 1.4-.01c1.04-1.3 2.2-1.91 3.57-1.91z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">734</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block comments-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16.9 4H7.1c-1.15 0-1.73.11-2.35.44-.56.3-1 .75-1.31 1.31C3.11 6.37 3 6.95 3 8.1v5.8c0 1.15.11 1.73.44 2.35.3.56.75 1 1.31 1.31l.15.07c.51.25 1.04.35 1.95.37h.25v2.21c0 .44.17.85.47 1.16l.12.1c.64.55 1.6.52 2.21-.08L13.37 18h3.53c1.15 0 1.73-.11 2.35-.44.56-.3 1-.75 1.31-1.31.33-.62.44-1.2.44-2.35V8.1c0-1.15-.11-1.73-.44-2.35a3.17 3.17 0 0 0-1.31-1.31A4.51 4.51 0 0 0 16.9 4zM6.9 5.8h9.99c.88 0 1.18.06 1.5.23.25.13.44.32.57.57.17.32.23.62.23 1.5v6.16c-.02.61-.09.87-.23 1.14-.13.25-.32.44-.57.57-.32.17-.62.23-1.5.23h-4.02a.9.9 0 0 0-.51.26l-3.47 3.4V17.1c0-.5-.4-.9-.9-.9H6.74a2.3 2.3 0 0 1-1.14-.23 1.37 1.37 0 0 1-.57-.57c-.17-.32-.23-.62-.23-1.5V7.74c.02-.61.09-.87.23-1.14.13-.25.32-.44.57-.57.3-.16.58-.22 1.31-.23z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">344</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block replies-block px-2 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M12 3.73c-1.12.07-2 1-2 2.14v2.12h-.02a9.9 9.9 0 0 0-7.83 10.72.9.9 0 0 0 1.61.46l.19-.24a9.08 9.08 0 0 1 5.84-3.26l.2-.03.01 2.5a2.15 2.15 0 0 0 3.48 1.69l7.82-6.14a2.15 2.15 0 0 0 0-3.38l-7.82-6.13c-.38-.3-.85-.46-1.33-.46zm.15 1.79c.08 0 .15.03.22.07l7.82 6.14a.35.35 0 0 1 0 .55l-7.82 6.13a.35.35 0 0 1-.57-.28V14.7a.9.9 0 0 0-.92-.9h-.23l-.34.02c-2.28.14-4.4.98-6.12 2.36l-.17.15.02-.14a8.1 8.1 0 0 1 6.97-6.53.9.9 0 0 0 .79-.9V5.87c0-.2.16-.35.35-.35z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">1</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post mb-2 mb-sm-4 w-100 d-flex flex-column border rounded-2 border-dark">
|
||||||
|
<div
|
||||||
|
class="post-header py-1 px-2 d-flex border-bottom border-dark justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center">
|
||||||
|
<img src="./static/img/gachi.jpg"
|
||||||
|
class="post-author-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="post-meta ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="post-author-name">
|
||||||
|
Алексей Смирнов
|
||||||
|
</div>
|
||||||
|
<div class="post-publication-datetime">
|
||||||
|
15 сентября, 15:22
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<i class="bi bi-three-dots fs-4"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="post-body">
|
||||||
|
<div class="post-body-text m-2">
|
||||||
|
<p>
|
||||||
|
Корги - это не просто милые собачки, а настоящие друзья, которые всегда готовы составить
|
||||||
|
компанию в любых приключениях. Они очень умны и легко обучаемы, что делает их идеальными
|
||||||
|
питомцами для семей с детьми. Однако, несмотря на свою популярность, корги все же
|
||||||
|
остаются собаками, которые нуждаются в правильном уходе и заботе.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post-footer py-1 px-2 border-top border-dark d-flex">
|
||||||
|
<div class="counter-block likes-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<img src="./static/img/heart.svg" style="width: 24px;">
|
||||||
|
<span class="count ms-1">734</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block comments-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16.9 4H7.1c-1.15 0-1.73.11-2.35.44-.56.3-1 .75-1.31 1.31C3.11 6.37 3 6.95 3 8.1v5.8c0 1.15.11 1.73.44 2.35.3.56.75 1 1.31 1.31l.15.07c.51.25 1.04.35 1.95.37h.25v2.21c0 .44.17.85.47 1.16l.12.1c.64.55 1.6.52 2.21-.08L13.37 18h3.53c1.15 0 1.73-.11 2.35-.44.56-.3 1-.75 1.31-1.31.33-.62.44-1.2.44-2.35V8.1c0-1.15-.11-1.73-.44-2.35a3.17 3.17 0 0 0-1.31-1.31A4.51 4.51 0 0 0 16.9 4zM6.9 5.8h9.99c.88 0 1.18.06 1.5.23.25.13.44.32.57.57.17.32.23.62.23 1.5v6.16c-.02.61-.09.87-.23 1.14-.13.25-.32.44-.57.57-.32.17-.62.23-1.5.23h-4.02a.9.9 0 0 0-.51.26l-3.47 3.4V17.1c0-.5-.4-.9-.9-.9H6.74a2.3 2.3 0 0 1-1.14-.23 1.37 1.37 0 0 1-.57-.57c-.17-.32-.23-.62-.23-1.5V7.74c.02-.61.09-.87.23-1.14.13-.25.32-.44.57-.57.3-.16.58-.22 1.31-.23z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">344</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block replies-block px-2 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M12 3.73c-1.12.07-2 1-2 2.14v2.12h-.02a9.9 9.9 0 0 0-7.83 10.72.9.9 0 0 0 1.61.46l.19-.24a9.08 9.08 0 0 1 5.84-3.26l.2-.03.01 2.5a2.15 2.15 0 0 0 3.48 1.69l7.82-6.14a2.15 2.15 0 0 0 0-3.38l-7.82-6.13c-.38-.3-.85-.46-1.33-.46zm.15 1.79c.08 0 .15.03.22.07l7.82 6.14a.35.35 0 0 1 0 .55l-7.82 6.13a.35.35 0 0 1-.57-.28V14.7a.9.9 0 0 0-.92-.9h-.23l-.34.02c-2.28.14-4.4.98-6.12 2.36l-.17.15.02-.14a8.1 8.1 0 0 1 6.97-6.53.9.9 0 0 0 .79-.9V5.87c0-.2.16-.35.35-.35z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">1</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="post mb-2 mb-sm-4 w-100 d-flex flex-column border rounded-2 border-dark">
|
||||||
|
<div
|
||||||
|
class="post-header py-1 px-2 d-flex border-bottom border-dark justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center">
|
||||||
|
<img src="./static/img/gachi.jpg"
|
||||||
|
class="post-author-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="post-meta ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="post-author-name">
|
||||||
|
Алексей Смирнов
|
||||||
|
</div>
|
||||||
|
<div class="post-publication-datetime">
|
||||||
|
15 сентября, 15:22
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<i class="bi bi-three-dots fs-4"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="post-body">
|
||||||
|
<img src="./static/img/korgi.jpg" class="post-body-img img-fluid">
|
||||||
|
</div>
|
||||||
|
<div class="post-footer py-1 px-2 border-top border-dark d-flex">
|
||||||
|
<div class="counter-block likes-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16 4a5.95 5.95 0 0 0-3.89 1.7l-.12.11-.12-.11A5.96 5.96 0 0 0 7.73 4 5.73 5.73 0 0 0 2 9.72c0 3.08 1.13 4.55 6.18 8.54l2.69 2.1c.66.52 1.6.52 2.26 0l2.36-1.84.94-.74c4.53-3.64 5.57-5.1 5.57-8.06A5.73 5.73 0 0 0 16.27 4zm.27 1.8a3.93 3.93 0 0 1 3.93 3.92v.3c-.08 2.15-1.07 3.33-5.51 6.84l-2.67 2.08a.04.04 0 0 1-.04 0L9.6 17.1l-.87-.7C4.6 13.1 3.8 11.98 3.8 9.73A3.93 3.93 0 0 1 7.73 5.8c1.34 0 2.51.62 3.57 1.92a.9.9 0 0 0 1.4-.01c1.04-1.3 2.2-1.91 3.57-1.91z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">734</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block comments-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M16.9 4H7.1c-1.15 0-1.73.11-2.35.44-.56.3-1 .75-1.31 1.31C3.11 6.37 3 6.95 3 8.1v5.8c0 1.15.11 1.73.44 2.35.3.56.75 1 1.31 1.31l.15.07c.51.25 1.04.35 1.95.37h.25v2.21c0 .44.17.85.47 1.16l.12.1c.64.55 1.6.52 2.21-.08L13.37 18h3.53c1.15 0 1.73-.11 2.35-.44.56-.3 1-.75 1.31-1.31.33-.62.44-1.2.44-2.35V8.1c0-1.15-.11-1.73-.44-2.35a3.17 3.17 0 0 0-1.31-1.31A4.51 4.51 0 0 0 16.9 4zM6.9 5.8h9.99c.88 0 1.18.06 1.5.23.25.13.44.32.57.57.17.32.23.62.23 1.5v6.16c-.02.61-.09.87-.23 1.14-.13.25-.32.44-.57.57-.32.17-.62.23-1.5.23h-4.02a.9.9 0 0 0-.51.26l-3.47 3.4V17.1c0-.5-.4-.9-.9-.9H6.74a2.3 2.3 0 0 1-1.14-.23 1.37 1.37 0 0 1-.57-.57c-.17-.32-.23-.62-.23-1.5V7.74c.02-.61.09-.87.23-1.14.13-.25.32-.44.57-.57.3-.16.58-.22 1.31-.23z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">344</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block replies-block px-2 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path
|
||||||
|
d="M12 3.73c-1.12.07-2 1-2 2.14v2.12h-.02a9.9 9.9 0 0 0-7.83 10.72.9.9 0 0 0 1.61.46l.19-.24a9.08 9.08 0 0 1 5.84-3.26l.2-.03.01 2.5a2.15 2.15 0 0 0 3.48 1.69l7.82-6.14a2.15 2.15 0 0 0 0-3.38l-7.82-6.13c-.38-.3-.85-.46-1.33-.46zm.15 1.79c.08 0 .15.03.22.07l7.82 6.14a.35.35 0 0 1 0 .55l-7.82 6.13a.35.35 0 0 1-.57-.28V14.7a.9.9 0 0 0-.92-.9h-.23l-.34.02c-2.28.14-4.4.98-6.12 2.36l-.17.15.02-.14a8.1 8.1 0 0 1 6.97-6.53.9.9 0 0 0 .79-.9V5.87c0-.2.16-.35.35-.35z"
|
||||||
|
fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">1</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<div class="bottom-menu d-flex d-sm-none w-100 sticky-bottom justify-content-around">
|
||||||
|
<a href="/feed.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-layout-text-sidebar-reverse fs-4"></i>
|
||||||
|
<span>Новости</span>
|
||||||
|
</a>
|
||||||
|
<a href="/messages.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-chat-text fs-4"></i>
|
||||||
|
<span>Чаты</span>
|
||||||
|
</a>
|
||||||
|
<a href="/friends.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-people fs-4"></i>
|
||||||
|
<span>Друзья</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<footer class="py-2 d-none d-sm-flex justify-content-center border-top border-dark">
|
||||||
|
<span>© <span id="current-year"></span> Неконтакте</span>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
<script>document.getElementById('current-year').innerHTML = new Date().getFullYear();</script>
|
||||||
|
|
||||||
|
</html>
|
165
messages.html
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<script type="module" src="./node_modules/@popperjs/core/dist/umd/popper.min.js"></script>
|
||||||
|
<script type="module" src="./node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||||
|
<link href="./node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||||
|
<link href="./node_modules/bootstrap-icons/font/bootstrap-icons.min.css" rel="stylesheet" />
|
||||||
|
<link rel="stylesheet" href="./static/css/base.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/left-menu.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/center.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/post.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/avatar.css">
|
||||||
|
<link rel="stylesheet" href="./static/css/messages.css">
|
||||||
|
<link rel="shortcut icon" href="./static/img/favicon.svg" type="image/svg+xml">
|
||||||
|
<title>Сообщения</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="vh-100 d-flex flex-column">
|
||||||
|
<header class="sticky-top">
|
||||||
|
<nav class="navbar">
|
||||||
|
<div class="container-fluid d-flex justify-content-between">
|
||||||
|
<a class="navbar-brand">
|
||||||
|
<span class="logo-small d-sm-none">нк</span>
|
||||||
|
<span class="logo-full d-none d-sm-block">неконтакте</span>
|
||||||
|
</a>
|
||||||
|
<div class="page-title position-fixed w-100 text-center">Сообщения</div>
|
||||||
|
<div class="dropdown">
|
||||||
|
<a class="dropdown-toggle d-flex align-items-center" href="#" role="button" id="dropdownMenuLink"
|
||||||
|
data-bs-toggle="dropdown" aria-expanded="false" style="color: white;">
|
||||||
|
<img src="./static/img/gachi.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle me-2">
|
||||||
|
<div class="post-author-name me-2 d-none d-md-block">
|
||||||
|
Алексей Смирнов
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenuLink">
|
||||||
|
<li class="d-sm-none"><a class="dropdown-item" href="/me.html"><i
|
||||||
|
class="bi bi-person me-2"></i>Моя страница</a>
|
||||||
|
</li>
|
||||||
|
<li><a class="dropdown-item" href="#"><i class="bi bi-gear me-2"></i>Настройки</a></li>
|
||||||
|
<li>
|
||||||
|
<hr class="dropdown-divider">
|
||||||
|
</li>
|
||||||
|
<li><a class="dropdown-item" href="#"><i class="bi bi-box-arrow-right me-2"></i>Выход</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<main class="px-1 px-sm-2 px-lg-4 pt-2 pt-sm-4 d-flex position-relative flex-fill">
|
||||||
|
<div id="left-menu"
|
||||||
|
class="p-3 d-none d-sm-flex flex-column justify-content-center align-content-around border border-dark rounded-2 position-fixed">
|
||||||
|
<a href="/me.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-person"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Моя страница</span>
|
||||||
|
</a>
|
||||||
|
<a href="/feed.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-layout-text-sidebar-reverse"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Новости</span>
|
||||||
|
</a>
|
||||||
|
<a href="/messages.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-chat-text"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Сообщения</span>
|
||||||
|
</a>
|
||||||
|
<a href="/friends.html" class="left-menu-item d-flex rounded-2 py-1 px-2">
|
||||||
|
<i class="bi bi-people"></i>
|
||||||
|
<span class="ms-2 d-none d-lg-block">Друзья</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="wrapper d-flex justify-content-center">
|
||||||
|
<div class="center position-relative">
|
||||||
|
<a class="people-row border-bottom border-dark p-2 d-flex justify-content-between align-items-center">
|
||||||
|
<div class="d-flex justify-content-start align-items-center" style="font-size: small;">
|
||||||
|
<img src="./static/img/polina_krotova.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="user-info ms-2 d-flex flex-column justify-content-center w-100">
|
||||||
|
<div class="user-name">
|
||||||
|
Полина Кротова
|
||||||
|
</div>
|
||||||
|
<div class="user-message-trucated-text px-2 py-1 rounded-3 text-truncate"
|
||||||
|
style="background-color: #e8e8e8; font-size: smaller;">
|
||||||
|
Добрый день. Есть возможность поучаствовать в конкурсе переводчиков от УлГУ. Кто желает
|
||||||
|
поучаствовать - пишите мне в личные сообщения.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="people-row border-bottom border-dark p-2 d-flex justify-content-between align-items-center">
|
||||||
|
<div class="d-flex justify-content-start align-items-center" style="font-size: small;">
|
||||||
|
<img src="./static/img/selivan_troickiy.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="user-info ms-2 d-flex flex-column justify-content-center w-100">
|
||||||
|
<div class="user-name">
|
||||||
|
Селиван Троицкий
|
||||||
|
</div>
|
||||||
|
<div class="user-message-trucated-text px-2 py-1 rounded-3 text-truncate"
|
||||||
|
style="background-color: #e8e8e8; font-size: smaller;">
|
||||||
|
В прошлом году там был метод, а в этом он либо забыл его дописать либо специально так
|
||||||
|
сделал
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="people-row border-bottom border-dark p-2 d-flex justify-content-between align-items-center">
|
||||||
|
<div class="d-flex justify-content-start align-items-center" style="font-size: small;">
|
||||||
|
<img src="./static/img/valentina_lavrenteva.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="user-info ms-2 d-flex flex-column justify-content-center w-100">
|
||||||
|
<div class="user-name">
|
||||||
|
Валентина Лаврентьева
|
||||||
|
</div>
|
||||||
|
<div class="user-message-trucated-text px-2 py-1 rounded-3 text-truncate"
|
||||||
|
style="background-color: #e8e8e8; font-size: smaller;">
|
||||||
|
Проведение пар до первой лекции уточняйте у преподавателя, который ведёт у вас
|
||||||
|
лабораторные работы по расписанию.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a class="people-row border-bottom border-dark p-2 d-flex justify-content-between align-items-center">
|
||||||
|
<div class="d-flex justify-content-start align-items-center" style="font-size: small;">
|
||||||
|
<img src="./static/img/valeriy_nikiforov.jpg"
|
||||||
|
class="user-avatar avatar-small img-fluid rounded-circle">
|
||||||
|
<div class="user-info ms-2 d-flex flex-column justify-content-center w-100">
|
||||||
|
<div class="user-name">
|
||||||
|
Валерий Никифоров
|
||||||
|
</div>
|
||||||
|
<div class="user-message-trucated-text px-2 py-1 rounded-3 text-truncate"
|
||||||
|
style="font-size: smaller;">
|
||||||
|
Табличку по баллам сведу к понедельнику. Больше никакие лабы присылать нельзя, литкод
|
||||||
|
можно. Плюс поверьте, что у вас 7 ответов по лекциям
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<div class="bottom-menu d-flex d-sm-none w-100 sticky-bottom justify-content-around">
|
||||||
|
<a href="/feed.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-layout-text-sidebar-reverse fs-4"></i>
|
||||||
|
<span>Новости</span>
|
||||||
|
</a>
|
||||||
|
<a href="/messages.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-chat-text fs-4"></i>
|
||||||
|
<span>Чаты</span>
|
||||||
|
</a>
|
||||||
|
<a href="/friends.html" class="bottom-menu-item d-flex flex-column rounded-2 align-items-center">
|
||||||
|
<i class="bi bi-people fs-4"></i>
|
||||||
|
<span>Друзья</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<footer class="py-2 d-none d-sm-flex justify-content-center border-top border-dark">
|
||||||
|
<span>© <span id="current-year"></span> Неконтакте</span>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
<script>document.getElementById('current-year').innerHTML = new Date().getFullYear();</script>
|
||||||
|
|
||||||
|
</html>
|
4794
package-lock.json
generated
Normal file
33
package.json
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"name": "ip_pibd-21_potapov",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"start": "vite --port 80 --host 0.0.0.0",
|
||||||
|
"serve": "http-server -p 80 ./dist/",
|
||||||
|
"build": "vite build",
|
||||||
|
"rest": "json-server --watch data.json -p 8081",
|
||||||
|
"dev": "npm-run-all --parallel rest start",
|
||||||
|
"prod": "npm-run-all build --parallel serve rest"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@editorjs/editorjs": "^2.28.2",
|
||||||
|
"@editorjs/embed": "^2.6.0",
|
||||||
|
"@editorjs/header": "^2.7.0",
|
||||||
|
"@editorjs/list": "^1.8.0",
|
||||||
|
"bootstrap": "5.3.2",
|
||||||
|
"bootstrap-icons": "1.11.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@editorjs/link": "^2.5.0",
|
||||||
|
"@editorjs/quote": "^2.5.0",
|
||||||
|
"@editorjs/simple-image": "^1.5.1",
|
||||||
|
"eslint": "8.50.0",
|
||||||
|
"eslint-config-airbnb-base": "15.0.0",
|
||||||
|
"eslint-plugin-import": "2.28.1",
|
||||||
|
"http-server": "14.1.1",
|
||||||
|
"json-server": "0.17.4",
|
||||||
|
"npm-run-all": "4.1.5",
|
||||||
|
"vite": "4.4.9"
|
||||||
|
}
|
||||||
|
}
|
BIN
png/Вход.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
png/Друзья.png
Normal file
After Width: | Height: | Size: 89 KiB |
BIN
png/Моя страница.png
Normal file
After Width: | Height: | Size: 182 KiB |
BIN
png/Новости.png
Normal file
After Width: | Height: | Size: 151 KiB |
BIN
png/Сообщения.png
Normal file
After Width: | Height: | Size: 99 KiB |
5
static/css/avatar.css
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.avatar-small {
|
||||||
|
width: 35px;
|
||||||
|
height: 35px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
86
static/css/base.css
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
/* Hide scrollbar for Chrome, Safari and Opera */
|
||||||
|
:root::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hide scrollbar for IE, Edge and Firefox */
|
||||||
|
:root {
|
||||||
|
-ms-overflow-style: none;
|
||||||
|
/* IE and Edge */
|
||||||
|
scrollbar-width: none;
|
||||||
|
/* Firefox */
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: Roboto Slab;
|
||||||
|
src: url("../fonts/Roboto_Slab/RobotoSlab-VariableFont_wght.ttf");
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
font-family: Roboto Slab;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
background-color: #235D70;
|
||||||
|
z-index: 99999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
color: white;
|
||||||
|
margin-bottom: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand:hover {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-menu {
|
||||||
|
background-color: #235D70;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-menu * {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-menu span {
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
#login-form {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 576px) {
|
||||||
|
#login-form {
|
||||||
|
width: 75%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
--bs-btn-bg: #235D70;
|
||||||
|
--bs-btn-hover-bg: none;
|
||||||
|
--bs-btn-hover-color: black;
|
||||||
|
--bs-btn-border-color: #235D70;
|
||||||
|
--bs-btn-hover-border-color: #235D70;
|
||||||
|
--bs-btn-active-bg: #235D70;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown:hover .dropdown-menu {
|
||||||
|
display: block;
|
||||||
|
margin-top: 0;
|
||||||
|
right: 0px;
|
||||||
|
/* remove the gap so it doesn't close */
|
||||||
|
}
|
70
static/css/center.css
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
.wrapper {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
width: 70%;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-message-trucated-text {
|
||||||
|
max-width: 60vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 992px) {
|
||||||
|
.user-message-trucated-text {
|
||||||
|
max-width: 30vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 576px) {
|
||||||
|
.user-message-trucated-text {
|
||||||
|
max-width: 70vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#post-editor {
|
||||||
|
min-height: calc(1em + 26px);
|
||||||
|
}
|
||||||
|
|
||||||
|
#title-image-preview {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 50px;
|
||||||
|
cursor: pointer;
|
||||||
|
border: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#title-image-preview i {
|
||||||
|
opacity: 0.3;
|
||||||
|
transition: opacity .3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#title-image-preview:hover i {
|
||||||
|
opacity: 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#input-title-image {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#selected-title-image {
|
||||||
|
width: 100%;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#title-image-block img {
|
||||||
|
}
|
7
static/css/left-menu.css
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.left-menu-item {
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-menu-item:hover {
|
||||||
|
background-color: #e8e8e8;
|
||||||
|
}
|
9
static/css/messages.css
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
@media screen and (min-width: 576px) {
|
||||||
|
.people-row {
|
||||||
|
transition: .1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.people-row:hover {
|
||||||
|
transform: translateX(10px);
|
||||||
|
}
|
||||||
|
}
|
34
static/css/post.css
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
.post-meta {
|
||||||
|
font-size: small;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter-block {
|
||||||
|
transition: .1s;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter-block:hover {
|
||||||
|
background-color: #e8e8e8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-body-img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-body a {
|
||||||
|
color: #4a9cb7;
|
||||||
|
text-decoration: none;
|
||||||
|
background-image: linear-gradient(currentColor, currentColor);
|
||||||
|
background-position: 0% 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 0% 2px;
|
||||||
|
transition: background-size .3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-body a:hover {
|
||||||
|
background-size: 100% 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.post-body-text {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
202
static/fonts/Roboto_Slab/LICENSE.txt
Normal file
@ -0,0 +1,202 @@
|
|||||||
|
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
71
static/fonts/Roboto_Slab/README.txt
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
Roboto Slab Variable Font
|
||||||
|
=========================
|
||||||
|
|
||||||
|
This download contains Roboto Slab as both a variable font and static fonts.
|
||||||
|
|
||||||
|
Roboto Slab is a variable font with this axis:
|
||||||
|
wght
|
||||||
|
|
||||||
|
This means all the styles are contained in a single file:
|
||||||
|
RobotoSlab-VariableFont_wght.ttf
|
||||||
|
|
||||||
|
If your app fully supports variable fonts, you can now pick intermediate styles
|
||||||
|
that aren’t available as static fonts. Not all apps support variable fonts, and
|
||||||
|
in those cases you can use the static font files for Roboto Slab:
|
||||||
|
static/RobotoSlab-Thin.ttf
|
||||||
|
static/RobotoSlab-ExtraLight.ttf
|
||||||
|
static/RobotoSlab-Light.ttf
|
||||||
|
static/RobotoSlab-Regular.ttf
|
||||||
|
static/RobotoSlab-Medium.ttf
|
||||||
|
static/RobotoSlab-SemiBold.ttf
|
||||||
|
static/RobotoSlab-Bold.ttf
|
||||||
|
static/RobotoSlab-ExtraBold.ttf
|
||||||
|
static/RobotoSlab-Black.ttf
|
||||||
|
|
||||||
|
Get started
|
||||||
|
-----------
|
||||||
|
|
||||||
|
1. Install the font files you want to use
|
||||||
|
|
||||||
|
2. Use your app's font picker to view the font family and all the
|
||||||
|
available styles
|
||||||
|
|
||||||
|
Learn more about variable fonts
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
|
||||||
|
https://variablefonts.typenetwork.com
|
||||||
|
https://medium.com/variable-fonts
|
||||||
|
|
||||||
|
In desktop apps
|
||||||
|
|
||||||
|
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
|
||||||
|
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
|
||||||
|
|
||||||
|
Online
|
||||||
|
|
||||||
|
https://developers.google.com/fonts/docs/getting_started
|
||||||
|
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
|
||||||
|
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
|
||||||
|
|
||||||
|
Installing fonts
|
||||||
|
|
||||||
|
MacOS: https://support.apple.com/en-us/HT201749
|
||||||
|
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
|
||||||
|
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
|
||||||
|
|
||||||
|
Android Apps
|
||||||
|
|
||||||
|
https://developers.google.com/fonts/docs/android
|
||||||
|
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
Please read the full license text (LICENSE.txt) to understand the permissions,
|
||||||
|
restrictions and requirements for usage, redistribution, and modification.
|
||||||
|
|
||||||
|
You can use them in your products & projects – print or digital,
|
||||||
|
commercial or otherwise.
|
||||||
|
|
||||||
|
This isn't legal advice, please consider consulting a lawyer and see the full
|
||||||
|
license for all details.
|
BIN
static/fonts/Roboto_Slab/RobotoSlab-VariableFont_wght.ttf
Normal file
BIN
static/fonts/Roboto_Slab/static/RobotoSlab-Black.ttf
Normal file
BIN
static/fonts/Roboto_Slab/static/RobotoSlab-Bold.ttf
Normal file
BIN
static/fonts/Roboto_Slab/static/RobotoSlab-ExtraBold.ttf
Normal file
BIN
static/fonts/Roboto_Slab/static/RobotoSlab-ExtraLight.ttf
Normal file
BIN
static/fonts/Roboto_Slab/static/RobotoSlab-Light.ttf
Normal file
BIN
static/fonts/Roboto_Slab/static/RobotoSlab-Medium.ttf
Normal file
BIN
static/fonts/Roboto_Slab/static/RobotoSlab-Regular.ttf
Normal file
BIN
static/fonts/Roboto_Slab/static/RobotoSlab-SemiBold.ttf
Normal file
BIN
static/fonts/Roboto_Slab/static/RobotoSlab-Thin.ttf
Normal file
BIN
static/img/amos_artimovich.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
13
static/img/favicon.svg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<svg width="142" height="72" viewBox="0 0 142 72" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M0.955078 72V65.8477L8.91406 64.4805V8.47461L0.955078 7.10742V0.90625H26.4922V7.10742L18.5332 8.47461V33.0352H52.5176V8.47461L44.5586 7.10742V0.90625H52.5176H62.1367H70.0957V7.10742L62.1367 8.47461V64.4805L70.0957 65.8477V72H44.5586V65.8477L52.5176 64.4805V40.6035H18.5332V64.4805L26.4922 65.8477V72H0.955078ZM77.5176 72V65.8477L85.4766 64.4805V8.47461L77.5176 7.10742V0.90625H103.055V7.10742L95.0957 8.47461V32.9375H102.859L118.924 9.79297C121.561 6.14714 123.855 3.67318 125.809 2.37109C127.762 1.03646 130.024 0.369141 132.596 0.369141C134.126 0.369141 135.411 0.564453 136.453 0.955078C137.527 1.31315 138.65 1.85026 139.822 2.56641L138.406 9.35352C137.527 9.19076 136.746 9.06055 136.062 8.96289C135.411 8.83268 134.76 8.76758 134.109 8.76758C132.579 8.76758 131.277 9.17448 130.203 9.98828C129.161 10.8021 127.941 12.1855 126.541 14.1387L111.258 35.4277L134.891 64.627L141.58 65.8477V72H118.24V65.8477L123.66 65.1641L123.465 64.9199L104.275 41.043H95.0957V64.4805L103.055 65.8477V72H77.5176Z"/>
|
||||||
|
<style>
|
||||||
|
path {
|
||||||
|
fill: black;
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
path {
|
||||||
|
fill: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
BIN
static/img/gachi.jpg
Normal file
After Width: | Height: | Size: 14 KiB |
21
static/img/heart.svg
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 23.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Слой_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:none;}
|
||||||
|
.st1{fill:#ED0226;}
|
||||||
|
</style>
|
||||||
|
<g>
|
||||||
|
<path class="st0" d="M0,0v24h24V0H0z M16.4,17.8l-0.9,0.7l-2.4,1.8c-0.7,0.5-1.6,0.5-2.3,0l-2.7-2.1c-5-4-6.2-5.5-6.2-8.5
|
||||||
|
C2,6.6,4.6,4,7.7,4c1.6,0,3,0.6,4.1,1.7L12,5.8l0.1-0.1c1-1,2.4-1.6,3.9-1.7h0.3C19.4,4,22,6.6,22,9.7C22,12.7,21,14.1,16.4,17.8z"
|
||||||
|
/>
|
||||||
|
<path d="M20.2,10c-0.1,2.1-1.1,3.3-5.5,6.8L12,18.9c0,0,0,0,0,0l-2.4-1.8l-0.9-0.7C4.6,13.1,3.8,12,3.8,9.7c0-2.2,1.8-3.9,3.9-3.9
|
||||||
|
c1.3,0,2.5,0.6,3.6,1.9c0.3,0.4,0.9,0.4,1.3,0.1c0,0,0.1-0.1,0.1-0.1c1-1.3,2.2-1.9,3.6-1.9c2.2,0,3.9,1.8,3.9,3.9V10z"/>
|
||||||
|
<path class="st1" d="M22,9.7c0,3-1,4.4-5.6,8.1l-0.9,0.7l-2.4,1.8c-0.7,0.5-1.6,0.5-2.3,0l-2.7-2.1c-5-4-6.2-5.5-6.2-8.5
|
||||||
|
C2,6.6,4.6,4,7.7,4c1.6,0,3,0.6,4.1,1.7L12,5.8l0.1-0.1c1-1,2.4-1.6,3.9-1.7h0.3C19.4,4,22,6.6,22,9.7z"/>
|
||||||
|
<path class="st0" d="M20.2,9.7V10c-0.1,2.1-1.1,3.3-5.5,6.8L12,18.9c0,0,0,0,0,0l-2.4-1.8l-0.9-0.7C4.6,13.1,3.8,12,3.8,9.7
|
||||||
|
c0-2.2,1.8-3.9,3.9-3.9c1.3,0,2.5,0.6,3.6,1.9c0.3,0.4,0.9,0.4,1.3,0.1c0,0,0.1-0.1,0.1-0.1c1-1.3,2.2-1.9,3.6-1.9
|
||||||
|
C18.4,5.8,20.2,7.5,20.2,9.7z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/img/korgi.jpg
Normal file
After Width: | Height: | Size: 140 KiB |
BIN
static/img/polina_krotova.jpg
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
static/img/samoreal.jpeg
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
static/img/selivan_troickiy.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
static/img/valentina_lavrenteva.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
static/img/valeriy_nikiforov.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
110
static/js/apiendpoint.js
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
const serverUrl = "http://localhost:8081";
|
||||||
|
|
||||||
|
export function createUserObject(
|
||||||
|
firstName,
|
||||||
|
lastName,
|
||||||
|
birthday,
|
||||||
|
address,
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
avatarImg,
|
||||||
|
) {
|
||||||
|
return {
|
||||||
|
firstName,
|
||||||
|
lastName,
|
||||||
|
birthday,
|
||||||
|
address,
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
avatarImg,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createPostObject(
|
||||||
|
userId,
|
||||||
|
createdDateTime,
|
||||||
|
text,
|
||||||
|
img,
|
||||||
|
) {
|
||||||
|
return {
|
||||||
|
userId,
|
||||||
|
createdDateTime,
|
||||||
|
text,
|
||||||
|
img,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ApiEndpoint {
|
||||||
|
constructor(endpoint) {
|
||||||
|
this.endpoint = endpoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
async getObjects() {
|
||||||
|
const response = await fetch(`${serverUrl}/${this.endpoint}`);
|
||||||
|
if (!response.ok) {
|
||||||
|
throw response.statusText;
|
||||||
|
}
|
||||||
|
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
|
|
||||||
|
async getObject(id) {
|
||||||
|
const response = await fetch(`${serverUrl}/${this.endpoint}/${id}`);
|
||||||
|
if (!response.ok) {
|
||||||
|
throw response.statusText;
|
||||||
|
}
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
|
|
||||||
|
async createObject(obj) {
|
||||||
|
const options = {
|
||||||
|
method: "POST",
|
||||||
|
body: JSON.stringify(obj),
|
||||||
|
headers: {
|
||||||
|
"Accept": "application/json",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await fetch(`${serverUrl}/${this.endpoint}`, options);
|
||||||
|
if (!response.ok) {
|
||||||
|
throw response.statusText;
|
||||||
|
}
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
|
|
||||||
|
async updateObject(obj) {
|
||||||
|
const options = {
|
||||||
|
method: "PUT",
|
||||||
|
body: JSON.stringify(obj),
|
||||||
|
headers: {
|
||||||
|
"Accept": "application/json",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await fetch(
|
||||||
|
`${serverUrl}/${this.endpoint}/${obj.id}`,
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
if (!response.ok) {
|
||||||
|
throw response.statusText;
|
||||||
|
}
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
|
|
||||||
|
async deleteObject(id) {
|
||||||
|
const options = {
|
||||||
|
method: "DELETE",
|
||||||
|
};
|
||||||
|
|
||||||
|
const response = await fetch(
|
||||||
|
`${serverUrl}/${this.endpoint}/${id}`,
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
if (!response.ok) {
|
||||||
|
throw response.statusText;
|
||||||
|
}
|
||||||
|
return response.json();
|
||||||
|
}
|
||||||
|
}
|
210
static/js/feed.js
Normal file
@ -0,0 +1,210 @@
|
|||||||
|
import { ApiEndpoint, createPostObject } from "./apiendpoint";
|
||||||
|
import { generatePostHtml } from "./posts";
|
||||||
|
|
||||||
|
const postApiEndpoint = new ApiEndpoint("posts");
|
||||||
|
const userApiEndpoint = new ApiEndpoint("users");
|
||||||
|
|
||||||
|
document.addEventListener("DOMContentLoaded", loadPosts);
|
||||||
|
|
||||||
|
// функция для получения содержимого файла в виде base64 строки
|
||||||
|
// https://ru.wikipedia.org/wiki/Base64
|
||||||
|
async function readImageFileToBase64(file) {
|
||||||
|
const reader = new FileReader();
|
||||||
|
|
||||||
|
// создание Promise-объекта для использования функции
|
||||||
|
// с помощью await (асинхронно) без коллбэков (callback)
|
||||||
|
// https://learn.javascript.ru/promise
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
// 2. "Возвращаем" содержимое когда файл прочитан
|
||||||
|
// через вызов resolve
|
||||||
|
// Если не использовать Promise, то всю работу по взаимодействию
|
||||||
|
// с REST API пришлось бы делать в обработчике (callback) функции
|
||||||
|
// onloadend
|
||||||
|
reader.onloadend = () => {
|
||||||
|
const fileContent = reader.result;
|
||||||
|
// Здесь могла бы быть работа с REST API
|
||||||
|
// Чтение заканчивает выполняться здесь
|
||||||
|
resolve(fileContent);
|
||||||
|
};
|
||||||
|
// 3. Возвращаем ошибку
|
||||||
|
reader.onerror = () => {
|
||||||
|
// Или здесь в случае ошибки
|
||||||
|
reject(new Error("oops, something went wrong with the file reader."));
|
||||||
|
};
|
||||||
|
// Шаг 1. Сначала читаем файл
|
||||||
|
// Чтение начинает выполняться здесь
|
||||||
|
reader.readAsDataURL(file);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
let currentEditPostId = null;
|
||||||
|
|
||||||
|
async function buttonPostPublicationClicked() {
|
||||||
|
let text = document.getElementById("post-editor").value.trim();
|
||||||
|
const img = document.getElementById("input-title-image").files[0];
|
||||||
|
var check = document.getElementById("check-title-image").checked;
|
||||||
|
|
||||||
|
if (text == "" && check) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let imgBase64 = null;
|
||||||
|
if (img != null) {
|
||||||
|
imgBase64 = await readImageFileToBase64(img);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (text == "")
|
||||||
|
{
|
||||||
|
text = null;
|
||||||
|
}
|
||||||
|
var post = createPostObject(1, new Date(), text, imgBase64);
|
||||||
|
|
||||||
|
await postApiEndpoint.createObject(post);
|
||||||
|
showImage(null);
|
||||||
|
document.getElementById("post-editor").value = "";
|
||||||
|
await loadPosts();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function postObjectEdit(e) {
|
||||||
|
let text = document.getElementById("post-editor").value.trim();
|
||||||
|
const img = document.getElementById("input-title-image").files[0];
|
||||||
|
var check = document.getElementById("check-title-image").checked;
|
||||||
|
|
||||||
|
if (text == "" && !check) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let imgBase64 = null;
|
||||||
|
if (img != null) {
|
||||||
|
imgBase64 = await readImageFileToBase64(img);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (text == "") {
|
||||||
|
text = null;
|
||||||
|
}
|
||||||
|
var post = await postApiEndpoint.getObject(currentEditPostId);
|
||||||
|
post.text = text;
|
||||||
|
|
||||||
|
if (check)
|
||||||
|
{
|
||||||
|
post.img = imgBase64;
|
||||||
|
}
|
||||||
|
|
||||||
|
await postApiEndpoint.updateObject(post);
|
||||||
|
document.getElementById("edit-block").style.display = "none";
|
||||||
|
document.getElementById("post-publication-button").style.display = "block";
|
||||||
|
currentEditPostId = null;
|
||||||
|
showImage(null);
|
||||||
|
document.getElementById("post-editor").value = "";
|
||||||
|
await loadPosts();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function editPost(e) {
|
||||||
|
const btnId = e.target.id;
|
||||||
|
const postId = parseInt(btnId.split("-")[2]);
|
||||||
|
let postObj = await postApiEndpoint.getObject(postId);
|
||||||
|
document.getElementById("post-editor").value = postObj.text == null ? "" : postObj.text;
|
||||||
|
var textElement = document.getElementById("post-editor");
|
||||||
|
textElement.style.height = "auto";
|
||||||
|
textElement.style.height = textElement.scrollHeight + 2 + "px";
|
||||||
|
showImage(postObj.img);
|
||||||
|
scrollTo(0, 0);
|
||||||
|
document.getElementById("edit-block").style.display = 'flex';
|
||||||
|
document.getElementById("post-publication-button").style.display = 'none';
|
||||||
|
currentEditPostId = postId;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loadPosts() {
|
||||||
|
document.getElementById("edit-block").style.display = "none";
|
||||||
|
document.getElementById("edit-post-button-cancel").addEventListener('click', () => {location.reload();});
|
||||||
|
document.getElementById("edit-post-button-accept").addEventListener('click', postObjectEdit);
|
||||||
|
var posts = await postApiEndpoint.getObjects();
|
||||||
|
|
||||||
|
posts.sort((a, b) => (a.createdDateTime < b.createdDateTime ? 1 : -1));
|
||||||
|
|
||||||
|
const center = document.getElementsByClassName("posts-wrapper")[0];
|
||||||
|
center.innerHTML = "";
|
||||||
|
for (let i = 0; i < posts.length; i++) {
|
||||||
|
const post = posts[i];
|
||||||
|
const postOwner = await userApiEndpoint.getObject(post.userId);
|
||||||
|
center.innerHTML += generatePostHtml(post, postOwner);
|
||||||
|
}
|
||||||
|
|
||||||
|
const postDeleteButtons =
|
||||||
|
document.getElementsByClassName("post-delete-button");
|
||||||
|
for (let i = 0; i < postDeleteButtons.length; i++) {
|
||||||
|
const btn = postDeleteButtons[i];
|
||||||
|
btn.addEventListener('click', (e) => {
|
||||||
|
const btnId = e.target.id;
|
||||||
|
const postId = parseInt(btnId.split("-")[2]);
|
||||||
|
postApiEndpoint.deleteObject(postId);
|
||||||
|
var postDiv = document.getElementById("post-" + postId);
|
||||||
|
postDiv.parentNode.removeChild(postDiv);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const postEditButtons =
|
||||||
|
document.getElementsByClassName("post-edit-button");
|
||||||
|
for (let i = 0; i < postEditButtons.length; i++) {
|
||||||
|
const btn = postEditButtons[i];
|
||||||
|
btn.addEventListener("click", editPost);
|
||||||
|
}
|
||||||
|
|
||||||
|
var text = document.getElementById("post-editor");
|
||||||
|
function resize() {
|
||||||
|
if (text.value == "") {
|
||||||
|
text.style.height = "calc(1em + 26px)";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
text.style.height = "auto";
|
||||||
|
text.style.height = text.scrollHeight + 2 + "px";
|
||||||
|
}
|
||||||
|
/* 0-timeout to get the already changed text */
|
||||||
|
function delayedResize() {
|
||||||
|
window.setTimeout(resize, 0);
|
||||||
|
}
|
||||||
|
observe(text, "change", resize);
|
||||||
|
observe(text, "cut", delayedResize);
|
||||||
|
observe(text, "paste", delayedResize);
|
||||||
|
observe(text, "drop", delayedResize);
|
||||||
|
observe(text, "keydown", delayedResize);
|
||||||
|
|
||||||
|
text.focus();
|
||||||
|
text.select();
|
||||||
|
resize();
|
||||||
|
|
||||||
|
document.getElementById("post-publication-button").addEventListener('click', buttonPostPublicationClicked);
|
||||||
|
}
|
||||||
|
var observe;
|
||||||
|
if (window.attachEvent) {
|
||||||
|
observe = function (element, event, handler) {
|
||||||
|
element.attachEvent("on" + event, handler);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
observe = function (element, event, handler) {
|
||||||
|
element.addEventListener(event, handler, false);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function showImage(img) {
|
||||||
|
var previewEmpty = document.getElementById("empty-title-image");
|
||||||
|
var previewSelected = document.getElementById("selected-title-image");
|
||||||
|
var check = document.getElementById("check-title-image");
|
||||||
|
var preview = document.getElementById("title-image-preview");
|
||||||
|
|
||||||
|
if (check != null) check.checked = false;
|
||||||
|
if (img != null) {
|
||||||
|
var src = img;
|
||||||
|
previewEmpty.style.display = "none";
|
||||||
|
previewSelected.style.display = "block";
|
||||||
|
previewSelected.style.opacity = "1.0";
|
||||||
|
previewSelected.src = src;
|
||||||
|
preview.title = "Редактировать изображение";
|
||||||
|
} else {
|
||||||
|
previewEmpty.style.display = "block";
|
||||||
|
previewSelected.style.display = "none";
|
||||||
|
previewSelected.style.opacity = "1.0";
|
||||||
|
previewSelected.src = "";
|
||||||
|
preview.title = "Добавить изображение";
|
||||||
|
}
|
||||||
|
}
|
79
static/js/posts.js
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
export function generatePostHtml(postObject, userObject) {
|
||||||
|
const postText = postObject.text !== null ? `<div class="post-body-text m-2">${postObject.text}</div>` : "";
|
||||||
|
const postImg = postObject.img !== null ? `<img src="${postObject.img}" class="post-body-img img-fluid"></img>` : "";
|
||||||
|
var options = {
|
||||||
|
year: "numeric",
|
||||||
|
month: "long",
|
||||||
|
day: "numeric",
|
||||||
|
hour: "numeric",
|
||||||
|
minute: "numeric"
|
||||||
|
};
|
||||||
|
const postCreatedDateTime = new Date(postObject.createdDateTime);
|
||||||
|
|
||||||
|
const html = `<div class="post mb-2 mb-sm-4 w-100 d-flex flex-column border rounded-2 border-dark" id="post-${
|
||||||
|
postObject.id
|
||||||
|
}">
|
||||||
|
<div class="post-header py-1 px-2 d-flex border-bottom border-dark justify-content-between align-items-center">
|
||||||
|
<a class="d-flex justify-content-start align-items-center">
|
||||||
|
<img src="./static/img/${
|
||||||
|
userObject.avatarImg
|
||||||
|
}" class="post-author-avatar avatar-small rounded-circle">
|
||||||
|
<div class="post-meta ms-2 d-flex flex-column justify-content-center">
|
||||||
|
<div class="post-author-name">
|
||||||
|
${userObject.firstName} ${userObject.lastName}
|
||||||
|
</div>
|
||||||
|
<div class="post-publication-datetime">
|
||||||
|
${postCreatedDateTime.toLocaleDateString("ru-RU", options)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<div class="dropdown">
|
||||||
|
<i class="bi bi-three-dots fs-4" data-bs-toggle="dropdown" aria-expanded="false"></i>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end">
|
||||||
|
<li><a class="dropdown-item post-delete-button" id="delete-post-${
|
||||||
|
postObject.id
|
||||||
|
}"><i class="bi bi-trash3"></i> Удалить</a></li>
|
||||||
|
<li><a class="dropdown-item post-edit-button" id="edit-post-${
|
||||||
|
postObject.id
|
||||||
|
}"><i class="bi bi-pencil"></i> Редактировать</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="post-body">
|
||||||
|
${postText}
|
||||||
|
${postImg}
|
||||||
|
</div>
|
||||||
|
<div class="post-footer py-1 px-2 border-top border-dark d-flex">
|
||||||
|
<div class="counter-block likes-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path d="M16 4a5.95 5.95 0 0 0-3.89 1.7l-.12.11-.12-.11A5.96 5.96 0 0 0 7.73 4 5.73 5.73 0 0 0 2 9.72c0 3.08 1.13 4.55 6.18 8.54l2.69 2.1c.66.52 1.6.52 2.26 0l2.36-1.84.94-.74c4.53-3.64 5.57-5.1 5.57-8.06A5.73 5.73 0 0 0 16.27 4zm.27 1.8a3.93 3.93 0 0 1 3.93 3.92v.3c-.08 2.15-1.07 3.33-5.51 6.84l-2.67 2.08a.04.04 0 0 1-.04 0L9.6 17.1l-.87-.7C4.6 13.1 3.8 11.98 3.8 9.73A3.93 3.93 0 0 1 7.73 5.8c1.34 0 2.51.62 3.57 1.92a.9.9 0 0 0 1.4-.01c1.04-1.3 2.2-1.91 3.57-1.91z" fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">0</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block comments-block px-2 me-1 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path d="M16.9 4H7.1c-1.15 0-1.73.11-2.35.44-.56.3-1 .75-1.31 1.31C3.11 6.37 3 6.95 3 8.1v5.8c0 1.15.11 1.73.44 2.35.3.56.75 1 1.31 1.31l.15.07c.51.25 1.04.35 1.95.37h.25v2.21c0 .44.17.85.47 1.16l.12.1c.64.55 1.6.52 2.21-.08L13.37 18h3.53c1.15 0 1.73-.11 2.35-.44.56-.3 1-.75 1.31-1.31.33-.62.44-1.2.44-2.35V8.1c0-1.15-.11-1.73-.44-2.35a3.17 3.17 0 0 0-1.31-1.31A4.51 4.51 0 0 0 16.9 4zM6.9 5.8h9.99c.88 0 1.18.06 1.5.23.25.13.44.32.57.57.17.32.23.62.23 1.5v6.16c-.02.61-.09.87-.23 1.14-.13.25-.32.44-.57.57-.32.17-.62.23-1.5.23h-4.02a.9.9 0 0 0-.51.26l-3.47 3.4V17.1c0-.5-.4-.9-.9-.9H6.74a2.3 2.3 0 0 1-1.14-.23 1.37 1.37 0 0 1-.57-.57c-.17-.32-.23-.62-.23-1.5V7.74c.02-.61.09-.87.23-1.14.13-.25.32-.44.57-.57.3-.16.58-.22 1.31-.23z" fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">0</span>
|
||||||
|
</div>
|
||||||
|
<div class="counter-block replies-block px-2 d-flex align-items-center rounded-4">
|
||||||
|
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<path d="M0 0h24v24H0z"></path>
|
||||||
|
<path d="M12 3.73c-1.12.07-2 1-2 2.14v2.12h-.02a9.9 9.9 0 0 0-7.83 10.72.9.9 0 0 0 1.61.46l.19-.24a9.08 9.08 0 0 1 5.84-3.26l.2-.03.01 2.5a2.15 2.15 0 0 0 3.48 1.69l7.82-6.14a2.15 2.15 0 0 0 0-3.38l-7.82-6.13c-.38-.3-.85-.46-1.33-.46zm.15 1.79c.08 0 .15.03.22.07l7.82 6.14a.35.35 0 0 1 0 .55l-7.82 6.13a.35.35 0 0 1-.57-.28V14.7a.9.9 0 0 0-.92-.9h-.23l-.34.02c-2.28.14-4.4.98-6.12 2.36l-.17.15.02-.14a8.1 8.1 0 0 1 6.97-6.53.9.9 0 0 0 .79-.9V5.87c0-.2.16-.35.35-.35z" fill="currentColor" fill-rule="nonzero"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
<span class="count ms-1">0</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
return html;
|
||||||
|
}
|
19
vite.config.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { resolve } from "path";
|
||||||
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||||
|
import { defineConfig } from "vite";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
sourcemap: true,
|
||||||
|
emptyOutDir: true,
|
||||||
|
rollupOptions: {
|
||||||
|
input: {
|
||||||
|
feed: resolve(__dirname, "feed.html"),
|
||||||
|
friends: resolve(__dirname, "friends.html"),
|
||||||
|
login: resolve(__dirname, "login.html"),
|
||||||
|
me: resolve(__dirname, "me.html"),
|
||||||
|
messages: resolve(__dirname, "messages.html"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|