Инициализация пустого React+Vite проекта

This commit is contained in:
Никита Потапов 2023-11-16 12:24:14 +04:00
parent 53d6a412fd
commit 31bc9c7f85
60 changed files with 4064 additions and 7220 deletions

20
.eslintrc.cjs Normal file
View File

@ -0,0 +1,20 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}

View File

@ -1,20 +0,0 @@
{
"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"
}
}

146
.gitignore vendored
View File

@ -1,146 +1,24 @@
# ---> Node
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
node_modules
dist
dist-ssr
*.local
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
.cache
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# ---> VisualStudioCode
# Editor directories and files
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@ -1,2 +1,8 @@
# IP_PIbd-21_Potapov
# React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

File diff suppressed because one or more lines are too long

527
feed.html
View File

@ -1,527 +0,0 @@
<!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>&copy; <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>

View File

@ -1,180 +0,0 @@
<!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>&copy; <span id="current-year"></span> Неконтакте</span>
</footer>
</body>
<script>document.getElementById('current-year').innerHTML = new Date().getFullYear();</script>
</html>

13
index.html Normal file
View File

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>

View File

@ -1,14 +0,0 @@
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Node",
"target": "ES2020",
"jsx": "preserve",
"strictNullChecks": true,
"strictFunctionTypes": true
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}

View File

@ -1,63 +0,0 @@
<!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>&copy; <span id="current-year"></span> Неконтакте</span>
</footer>
</body>
<script>document.getElementById('current-year').innerHTML = new Date().getFullYear();</script>
</html>

301
me.html
View File

@ -1,301 +0,0 @@
<!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>&copy; <span id="current-year"></span> Неконтакте</span>
</footer>
</body>
<script>document.getElementById('current-year').innerHTML = new Date().getFullYear();</script>
</html>

View File

@ -1,165 +0,0 @@
<!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>&copy; <span id="current-year"></span> Неконтакте</span>
</footer>
</body>
<script>document.getElementById('current-year').innerHTML = new Date().getFullYear();</script>
</html>

3241
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +1,26 @@
{
"name": "ip_pibd-21_potapov",
"version": "1.0.0",
"name": "ip-pibd-21-potapov",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"start": "vite --port 80 --host 0.0.0.0",
"serve": "http-server -p 80 ./dist/",
"dev": "vite",
"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"
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"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"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"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"
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@vitejs/plugin-react": "^4.0.3",
"eslint": "^8.45.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"vite": "^4.4.5"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

1
public/vite.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

42
src/App.css Normal file
View File

@ -0,0 +1,42 @@
#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
}
@keyframes logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
}
.card {
padding: 2em;
}
.read-the-docs {
color: #888;
}

35
src/App.jsx Normal file
View File

@ -0,0 +1,35 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
function App() {
const [count, setCount] = useState(0)
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.jsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
</>
)
}
export default App

1
src/assets/react.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

69
src/index.css Normal file
View File

@ -0,0 +1,69 @@
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}

10
src/main.jsx Normal file
View File

@ -0,0 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)

View File

@ -1,5 +0,0 @@
.avatar-small {
width: 35px;
height: 35px;
object-fit: cover;
}

View File

@ -1,86 +0,0 @@
/* 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 */
}

View File

@ -1,70 +0,0 @@
.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 {
}

View File

@ -1,7 +0,0 @@
.left-menu-item {
transition: .1s;
}
.left-menu-item:hover {
background-color: #e8e8e8;
}

View File

@ -1,9 +0,0 @@
@media screen and (min-width: 576px) {
.people-row {
transition: .1s;
}
.people-row:hover {
transform: translateX(10px);
}
}

View File

@ -1,34 +0,0 @@
.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;
}

View File

@ -1,202 +0,0 @@
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.

View File

@ -1,71 +0,0 @@
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 arent 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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,13 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,21 +0,0 @@
<?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>

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,110 +0,0 @@
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();
}
}

View File

@ -1,210 +0,0 @@
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 = "Добавить изображение";
}
}

View File

@ -1,79 +0,0 @@
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;
}

View File

@ -1,19 +1,7 @@
import { resolve } from "path";
// eslint-disable-next-line import/no-extraneous-dependencies
import { defineConfig } from "vite";
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
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"),
},
},
},
});
plugins: [react()],
})