DEV: Html validation

This commit is contained in:
Evg 2022-01-31 10:56:51 +03:00
parent 899819ecdb
commit 6e2ca32e2e
18 changed files with 100 additions and 101 deletions

View file

@ -1,4 +1,4 @@
</container>
</div>
<footer class="w-100 mt15 p15 bg-zinc-800 clear">
<div class="text-sm lowercase">
<?= Config::get('meta.name'); ?> &copy; <?= date('Y'); ?> — <?= Translate::get('admin'); ?>

View file

@ -45,4 +45,4 @@ $dark = Request::getCookie('dayNight') == 'dark' ? 'dark' : '';
</div>
</div>
</header>
<container>
<div id="contentWrapper">

View file

@ -66,7 +66,7 @@
</div>
</main>
<aside class="col-span-3 relative mb-none">
<box class="bg-white br-box-gray box-shadow-all">
<div class="box bg-white br-box-gray box-shadow-all">
<?php if ($data['similar']) { ?>
<h3 class="uppercase-box"><?= Translate::get('recommended'); ?></h3>
<?php foreach ($data['similar'] as $link) { ?>
@ -78,8 +78,8 @@
<?php } else { ?>
....
<?php } ?>
</box>
<box class="bg-white br-box-gray box-shadow-all">
</div>
<div class="box bg-white br-box-gray box-shadow-all">
<?php if ($data['high_leve']) { ?>
<div class="gray"><?= Translate::get('see more'); ?></div>
<?php foreach ($data['high_leve'] as $rl) { ?>
@ -92,7 +92,7 @@
<?php } else { ?>
....
<?php } ?>
</box>
</div>
</aside>
</div>
<?= includeTemplate('/view/default/footer', ['user' => $user]); ?>

View file

@ -1,4 +1,4 @@
</container>
</div>
<footer>
<?= Config::get('meta.name'); ?> &copy; <?= date('Y'); ?> — <span class="lowercase"><?= Translate::get('search'); ?></span>
</footer>

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
<box class="bg-blue-100 gray center relative">
<div class="box bg-blue-100 gray center relative">
<?= Translate::get('not.registered'); ?>?
<form action="<?= getUrlByName('register'); ?>" class="mt15 mb15 block">
<?= sumbit(Translate::get('create.account')); ?>
@ -7,4 +7,4 @@
<a class="mt15 mb0 gray lowercase block text-sm" href="<?= getUrlByName('login'); ?>">
<?= Translate::get('sign.in'); ?>
</a>
</box>
</div>

View file

@ -1,8 +1,8 @@
<?php if ($user['id'] == 0) { ?>
<box class="col-span-12 bg-white br-box-gray center">
<div class="box col-span-12 bg-white br-box-gray center">
<h1><?= Config::get('meta.banner_title'); ?></h1>
<div class="mb5"><?= Config::get('meta.banner_desc'); ?>...</div>
</box>
<p><?= Config::get('meta.banner_desc'); ?>...</p>
</div>
<?php } ?>
<div class="col-span-2 justify-between mb-none">
@ -69,7 +69,7 @@
<?php } ?>
<?php if ($user['id'] > 0 && !empty($data['topics_user'])) { ?>
<box class="br-box-gray bg-white text-sm">
<div class="box br-box-gray bg-white text-sm">
<h3 class="uppercase-box"><?= Translate::get('reading'); ?></h3>
<ul class="p0 m0 list-none text-sm">
<?php
@ -112,24 +112,22 @@
<?= Translate::get('see more'); ?> <i class="bi bi-chevron-double-right middle"></i>
</a>
<?php } ?>
</box>
</div>
<?php } else { ?>
<box class="br-box-gray bg-white text-sm">
<div class="uppercase gray mt5 mb5">
<?= Translate::get('topics'); ?>
</div>
<div class="box br-box-gray bg-white text-sm">
<h3 class="uppercase-box"><?= Translate::get('topics'); ?></h3>
<?php foreach (Config::get('facets.default') as $key => $topic) { ?>
<a class="flex relative pt5 pb5 items-center hidden gray-600" href="<?= $topic['url']; ?>">
<img class="w30 h30 mr5 br-box-gray" src="<?= $topic['img']; ?>" alt="<?= $topic['name']; ?>">
<span class="ml5"><?= $topic['name']; ?></span>
</a>
<?php } ?>
</box>
</div>
<?php } ?>
<div class="sticky top70">
<?php if (!empty($data['latest_answers'])) { ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<?php foreach ($data['latest_answers'] as $answer) { ?>
<div class="mb15 text-sm gray-400">
<?= user_avatar_img($answer['avatar'], 'small', $answer['login'], 'w20 h20 br-rd-50 mr5'); ?>
@ -139,7 +137,7 @@
</a>
</div>
<?php } ?>
</box>
</div>
<?php } ?>
<?= Tpl::import('/_block/sidebar/lang', ['lang' => []]); ?>

View file

@ -6,7 +6,7 @@
<?= Tpl::import('/_block/no-login-screensaver'); ?>
<?php } ?>
<?php $post_url = getUrlByName('post', ['id' => $post['post_id'], 'slug' => $post['post_slug']]); ?>
<box class="br-box-gray bg-white article_<?= $post['post_id']; ?>">
<div class="box br-box-gray bg-white article_<?= $post['post_id']; ?>">
<?php if ($data['sheet'] == 'subscribed') { ?>
<div data-id="<?= $post['post_id']; ?>" data-type="post" class="focus-id text-sm right">
<?= Translate::get('unsubscribe'); ?>
@ -80,7 +80,7 @@
<?= favorite($user['id'], $post['post_id'], 'post', $post['favorite_tid'], 'ps', ''); ?>
</div>
</div>
</box>
</div>
<?php } ?>
<?php } else { ?>
<?= Tpl::import('/_block/recommended-topics', ['data' => $data]); ?>

View file

@ -2,7 +2,7 @@
<div class="col-span-4 justify-between mb-none">
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<blockquote class="ml0 mb10 max-w640 gray">
<?= $profile['about']; ?>...
</blockquote>
@ -13,10 +13,10 @@
<sup class="ml5"><?= Translate::get('tl' . $profile['trust_level'] . '.title'); ?></sup>
</span>
</div>
</box>
</div>
<?php if ($data['blogs']) { ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('created by'); ?></h3>
<?php foreach ($data['blogs'] as $blog) { ?>
<div class="w-100 mb-w-100 mb15 flex flex-row">
@ -41,12 +41,12 @@
</div>
</div>
<?php } ?>
</box>
</div>
<?php } ?>
<?php if ($profile['my_post'] != 0) { ?>
<?php $post = $data['post']; ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('selected post'); ?></h3>
<div class="mt5">
<a href="<?= getUrlByName('post', ['id' => $post['post_id'], 'slug' => $post['post_slug']]); ?>">
@ -73,11 +73,11 @@
<?php } ?>
</div>
</div>
</box>
</div>
<?php } ?>
<?php if ($data['topics']) { ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('is reading'); ?></h3>
<?php foreach ($data['topics'] as $topic) { ?>
<div class="mt5 mb5">
@ -87,21 +87,21 @@
</a>
</div>
<?php } ?>
</box>
</div>
<?php } ?>
<?php if (!empty($data['participation'][0]['facet_id'])) { ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('understands'); ?></h3>
<?php foreach ($data['participation'] as $part) { ?>
<a class="tag" href="<?= getUrlByName('topic', ['slug' => $part['facet_slug']]); ?>">
<?= $part['facet_title']; ?>
</a>
<?php } ?>
</box>
</div>
<?php } ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('contacts'); ?></h3>
<?php foreach (Config::get('fields-profile') as $block) { ?>
<?php if ($profile[$block['title']]) { ?>
@ -123,9 +123,9 @@
<?php } ?>
<?php } ?>
<?php } ?>
</box>
</div>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('badges'); ?></h3>
<div class="m0 text-3xl">
<i title="<?= Translate::get('medal for registration'); ?>" class="bi bi-gift sky-500"></i>
@ -136,10 +136,10 @@
<?= $badge['badge_icon']; ?>
<?php } ?>
</div>
</box>
</div>
<?php if (UserData::checkAdmin()) { ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('admin'); ?></h3>
<div class="mt5">
<?php if ($profile['trust_level'] != UserData::REGISTERED_ADMIN) { ?>
@ -173,6 +173,6 @@
<hr>
<span class="gray">id<?= $profile['id']; ?> | <?= $profile['email']; ?></span>
</div>
</box>
</div>
<?php } ?>
</div>

View file

@ -9,6 +9,7 @@
/* Resources used for Agouti design */
@import "basic.scss";
@import "menu.scss";
@import "inputs.scss";
@import "table.scss";
@import "button.scss";

View file

@ -4,7 +4,7 @@
* Компоненты, основанные на базовом стиле Агути
*/
container {
#contentWrapper {
display: grid;
gap: 1rem;
grid-template-columns: repeat(12, minmax(0, 1fr));
@ -14,7 +14,7 @@ container {
margin: 0 auto;
}
box {
.box {
border-radius: 5px;
padding: 15px;
margin-bottom: 15px;
@ -212,23 +212,6 @@ a:hover > img { opacity: 0.8; }
text-align: center;
}
/* Drop-down menu and left nav */
menu { padding: 0px; }
nav > ul > li > a {
color: var(--gray-400);
padding: 3px 10px;
display: flex;
flex-direction: row;
align-items: center;
}
ul > li > a span { color: var(--gray-600); }
ul > li > a:hover > span,
ul > li > a:hover > i,
a.sky-500 span { color: #0ea5e9; }
/* Tippy.js - theme: light, */
.dark .tippy-box[data-theme~="light"] {
background-color: $black;

View file

@ -0,0 +1,21 @@
/*
* Drop-down menu and left nav
*
* Выпадающее меню и навигация слева
*/
menu { padding: 0px; }
nav > ul > li > a {
color: var(--gray-400);
padding: 3px 10px;
display: flex;
flex-direction: row;
align-items: center;
}
ul > li > a span { color: var(--gray-600); }
ul > li > a:hover > span,
ul > li > a:hover > i,
a.sky-500 span { color: #0ea5e9; }

View file

@ -1,4 +1,4 @@
</container>
</div>
<footer>
<div class="left">
<div class="mb5">

View file

@ -15,7 +15,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<?= $meta; ?>
<?php getRequestHead()->output(); ?>
<link rel="stylesheet" href="/assets/css/style.css?21">
<link rel="stylesheet" href="/assets/css/style.css?26">
<link rel="icon" sizes="16x16" href="/favicon.ico" type="image/x-icon">
<link rel="icon" sizes="120x120" href="/favicon-120.ico" type="image/x-icon">
</head>
@ -25,12 +25,10 @@
<header class="bg-white box-shadow <?php if ($type != 'page') { ?>sticky top0<?php } ?> z-30">
<div class="box-flex max-width mr-auto pl10 pr10 h50">
<div class="flex items-center">
<menu data-template="one" class="tippy pl0 pr10 none mb-block">
<div class="relative w-auto">
<i class="bi bi-list gray-400 text-xl"></i>
</div>
</menu>
<div id="one" style="display: none;" class="box-shadow2 z-40 bg-white br-rd3">
<div data-template="one" class="tippy pl0 pr10 none mb-block">
<i class="bi bi-list gray-400 text-xl"></i>
</div>
<div id="one" style="display: none;" class="box-shadow2 z-40 bg-white br-rd3">
<nav>
<?= tabs_nav(
'menu',
@ -39,7 +37,7 @@
$pages = Config::get('menu.mobile'),
); ?>
</nav>
</div>
</div>
<a title="<?= Translate::get('home'); ?>" class="logo black" href="/">
<?= Config::get('meta.name'); ?>
</a>
@ -91,11 +89,9 @@
<?php } ?>
</a>
<menu data-template="two" class="tippy ml20 mb-ml-10">
<div class="relative w-auto">
<?= user_avatar_img($user['avatar'], 'small', $user['login'], 'w30 h30 br-rd-50'); ?>
</div>
</menu>
<div data-template="two" class="tippy ml20 mb-ml-10">
<?= user_avatar_img($user['avatar'], 'small', $user['login'], 'w30 h30 br-rd-50'); ?>
</div>
<div id="two" style="display: none;" class="bg-white br-rd3">
<nav class="p0 pr20 m0">
<?= tabs_nav(
@ -112,5 +108,5 @@
<?php } ?>
</div>
</header>
<container>
<div id="contentWrapper">

View file

@ -1,10 +1,10 @@
<aside class="col-span-3 relative br-rd5 mb-none">
<?php if (!empty($lang)) { ?>
<box class="bg-white mb15 br-box-gray box-shadow-all">
<div class="box bg-white br-box-gray box-shadow-all">
<?= $lang; ?>...
</box>
</div>
<?php } ?>
<box class="box-flex bg-white br-box-gray box-shadow-all">
<div class="box-flex bg-white br-box-gray box-shadow-all">
<div class="text-sm">
<a class="inline gray-400" title="<?= Translate::get('help'); ?>" href="/info/<?= Config::get('facets.page-one'); ?>">
<?= Translate::get('help'); ?>
@ -21,5 +21,5 @@
<i class="bi bi-github middle text-xl"></i>
</a>
</div>
</box>
</div>
</aside>

View file

@ -51,7 +51,7 @@
<?php } ?>
<?php if ($user['id'] > 0 && !empty($data['topics_user'])) { ?>
<box class="br-box-gray box-shadow-all bg-white text-sm">
<div class="box br-box-gray box-shadow-all bg-white text-sm">
<div class="uppercase gray mb5">
<?= Translate::get('reading'); ?>
</div>
@ -95,9 +95,9 @@
<?= Translate::get('see more'); ?> <i class="bi bi-chevron-double-right middle"></i>
</a>
<?php } ?>
</box>
</div>
<?php } else { ?>
<box class="br-box-gray box-shadow-all bg-white text-sm">
<div class="box br-box-gray box-shadow-all bg-white text-sm">
<div class="uppercase gray mt5 mb5">
<?= Translate::get('topics'); ?>
</div>
@ -107,12 +107,12 @@
<span class="ml5"><?= $topic['name']; ?></span>
</a>
<?php } ?>
</box>
</div>
<?php } ?>
<div class="sticky top20">
<?php if (!empty($data['latest_answers'])) { ?>
<box class="br-box-gray box-shadow-all bg-white">
<div class="box br-box-gray box-shadow-all bg-white">
<?php foreach ($data['latest_answers'] as $answer) { ?>
<div class="mt15 mr0 mb15 ml0">
<div class="text-sm gray-400">
@ -124,7 +124,7 @@
</a>
</div>
<?php } ?>
</box>
</div>
<?php } ?>
</div>
</aside>

View file

@ -2,7 +2,7 @@
<div class="col-span-4 justify-between mb-none">
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<blockquote class="ml0 mb10 max-w640 gray">
<?= $profile['about']; ?>...
</blockquote>
@ -13,10 +13,10 @@
<sup class="ml5"><?= Translate::get('tl' . $profile['trust_level'] . '.title'); ?></sup>
</span>
</div>
</box>
</div>
<?php if ($data['blogs']) { ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('created by'); ?></h3>
<?php foreach ($data['blogs'] as $blog) { ?>
<div class="w-100 mb-w-100 mb15 flex flex-row">
@ -41,12 +41,12 @@
</div>
</div>
<?php } ?>
</box>
</div>
<?php } ?>
<?php if ($profile['my_post'] != 0) { ?>
<?php $post = $data['post']; ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('selected post'); ?></h3>
<div class="mt5">
<a href="<?= getUrlByName('post', ['id' => $post['post_id'], 'slug' => $post['post_slug']]); ?>">
@ -73,11 +73,11 @@
<?php } ?>
</div>
</div>
</box>
</div>
<?php } ?>
<?php if ($data['topics']) { ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('is reading'); ?></h3>
<?php foreach ($data['topics'] as $topic) { ?>
<div class="mt5 mb5">
@ -87,21 +87,21 @@
</a>
</div>
<?php } ?>
</box>
</div>
<?php } ?>
<?php if (!empty($data['participation'][0]['facet_id'])) { ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('understands'); ?></h3>
<?php foreach ($data['participation'] as $part) { ?>
<a class="tag" href="<?= getUrlByName('topic', ['slug' => $part['facet_slug']]); ?>">
<?= $part['facet_title']; ?>
</a>
<?php } ?>
</box>
</div>
<?php } ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('contacts'); ?></h3>
<?php foreach (Config::get('fields-profile') as $block) { ?>
<?php if ($profile[$block['title']]) { ?>
@ -123,9 +123,9 @@
<?php } ?>
<?php } ?>
<?php } ?>
</box>
</div>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('badges'); ?></h3>
<div class="m0 text-3xl">
<i title="<?= Translate::get('medal for registration'); ?>" class="bi bi-gift sky-500"></i>
@ -136,10 +136,10 @@
<?= $badge['badge_icon']; ?>
<?php } ?>
</div>
</box>
</div>
<?php if (UserData::checkAdmin()) { ?>
<box class="br-box-gray bg-white">
<div class="box br-box-gray bg-white">
<h3 class="uppercase-box"><?= Translate::get('admin'); ?></h3>
<div class="mt5">
<?php if ($profile['trust_level'] != UserData::REGISTERED_ADMIN) { ?>
@ -173,6 +173,6 @@
<hr>
<span class="gray">id<?= $profile['id']; ?> | <?= $profile['email']; ?></span>
</div>
</box>
</div>
<?php } ?>
</div>

View file

@ -111,4 +111,4 @@ $facet = $data['facet'] ?? false; ?>
<?php } ?>
</div>
</header>
<container>
<div id="contentWrapper">