UX: Тестовый шаблон

This commit is contained in:
Evg 2022-06-12 10:36:47 +03:00
parent 5a572c8f02
commit c4b4fc3729
6 changed files with 49 additions and 118 deletions

View file

@ -1,105 +0,0 @@
/*
* Styles for the catalog
*
* Стили для каталога
*/
main { margin-left: 30px; }
.logo {
margin-top: 30px;
font-size: 21px;
}
.item-cat { padding: 0 0 10px 30px; }
.list-items {
margin: 0;
max-width: 926px;
padding: 0 30px 0 0;
list-style: none;
}
.list-items li {
position: relative;
display: flex;
box-sizing: border-box;
width: 100%;
margin-bottom: 28px
}
.list-items__thumb {
width: 200px;
margin: 5px 20px 0 0;
}
.list-items__description {
color: var(--gray-600);
width: 100%;
}
.list-items__thumb-image {
box-sizing: border-box;
width: 200px;
height: 140px;
box-shadow: 0 2px 4px -1px rgb(0 0 0 / 15%);
}
.list-items__text { color: var(--gray-600); }
.list-items__footer {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
font-size: 0.875rem;
margin-top: 10px;
text-transform: lowercase;
}
.item-categories {
display: flex;
flex-wrap: wrap;
background-color: #f3f1ed;
padding: 20px 20px 20px 30px;
margin-bottom: 25px;
}
.categories-telo,
.item-categories > div {
width: 33%;
margin-bottom: 10px;
}
body.dark h2,
body.dark .categories-telo a {
color: #111;
}
body.dark .box {
background-color: #d0d0d0;
}
.dropdown { min-width: 220px; }
@media (max-width: 890px) {
aside,
.logo {
display: none;
}
.item-categories,
.item-cat {
padding: 20px 20px 20px 15px;
}
.categories-telo,
.item-categories > div {
width: 99%;
margin-bottom: 10px;
}
main { margin-left: 15px; }
.item-search { padding: 10px; }
.item-search-right { margin-left: 0; }
}

View file

@ -63,7 +63,7 @@
<?php endif; ?>
<div class="post-body max-w780 full">
<div class="post">
<div class="post mb15">
<?= Content::text($post['post_content'], 'text'); ?>
</div>
<?php if ($post['post_url_domain']) : ?>

View file

@ -0,0 +1,37 @@
<?php $blog = $data['facet'];
if ($blog['facet_is_deleted'] == 0) : ?>
<div class="w-100">
<div class="box-flex" style="background-image: linear-gradient(to right, white 0%, transparent 60%), url(<?= Html::coverUrl($blog['facet_cover_art'], 'blog'); ?>); background-position: 50% 50%;">
<?= Html::image($blog['facet_img'], $blog['facet_title'], 'img-xl mr15', 'logo', 'max'); ?>
<div class="mb-ml0 flex-auto">
<h1 class="mb0 mt10 text-2xl">
<?php if (UserData::checkAdmin() || $blog['facet_user_id'] == UserData::getUserId()) : ?>
<a class="right white fon-rgba" href="<?= url('content.edit', ['type' => 'blog', 'id' => $blog['facet_id']]); ?>">
<i class="bi-pencil bold"></i>
</a>
<?php endif; ?>
<?= $blog['facet_seo_title']; ?>
</h1>
<div class="text-sm mt10 mb-none"><?= $blog['facet_short_description']; ?></div>
<div class="right">
<?= Html::signed([
'type' => 'facet',
'id' => $blog['facet_id'],
'content_user_id' => $blog['facet_user_id'],
'state' => is_array($data['facet_signed']),
]); ?>
</div>
</div>
</div>
<main>
<?= insert('/content/post/post', ['data' => $data]); ?>
<?= Html::pagination($data['pNum'], $data['pagesCount'], $data['sheet'], url('blog', ['slug' => $blog['facet_slug']])); ?>
</main>
</div>
<?php else : ?>
<div class="center">
<i class="bi-x-octagon text-8xl"></i>
<div class="mt5 gray"><?= __('app.remote'); ?></div>
</div>
<?php endif; ?>

View file

@ -1,4 +1,4 @@
<main class="w-100">
<main class="wrap">
<?= insert('/content/post/post', ['data' => $data]); ?>
<?php if (UserData::getUserScroll()) : ?>
<div id="scrollArea"></div>

View file

@ -1,6 +1,6 @@
<?php $post = $data['post']; ?>
<main class="w-100">
<article class="post-full box<?php if ($post['post_is_deleted'] == 1) : ?> bg-red-200<?php endif; ?>">
<main class="wrap">
<article class="post-full<?php if ($post['post_is_deleted'] == 1) : ?> bg-red-200<?php endif; ?>">
<?php if ($post['post_is_deleted'] == 0 || UserData::checkAdmin()) : ?>
<div class="post-body">
@ -169,7 +169,7 @@
<?= insert('/_block/form/editor', ['height' => '250px', 'type' => 'answer', 'id' => $post['post_id']]); ?>
<div class="clear pt5">
<div class="clear mb15">
<input type="hidden" name="post_id" value="<?= $post['post_id']; ?>">
<input type="hidden" name="answer_id" value="0">
<?= Html::sumbit(__('app.reply')); ?>
@ -186,6 +186,7 @@
<?php endif; ?>
</article>
<div id="comment"></div>
<div class="ml10">
<?php if ($post['post_draft'] == 0) :
if ($post['post_feature'] == 0) :
insert('/_block/comments-view', ['data' => $data, 'post' => $post]);
@ -201,6 +202,7 @@
else :
echo insert('/_block/no-content', ['type' => 'small', 'text' => __('app.this_draft'), 'icon' => 'bi-door-closed']);
endif; ?>
</div>
</main>
<script nonce="<?= $_SERVER['nonce']; ?>">
document.addEventListener('DOMContentLoaded', () => {

View file

@ -10,15 +10,14 @@ $facet = $data['facet'] ?? false; ?>
<?= insert('/meta', ['meta' => $meta]); ?>
<body class="body-test<?php if (Request::getCookie('dayNight') == 'dark') : ?> dark<?php endif; ?><?php if (Request::getCookie('menuYesNo') == 'menuno') : ?> menuno<?php endif; ?>">
<header class="text-header">
<header class="text-header wrap">
<div class="d-header_contents justify-between">
<div class="flex items-center">
<div class="flex gap-max items-center">
<a title="<?= __('app.home'); ?>" class="logo" href="/">
<?= config('meta.name'); ?>
</a>
<ul class="nav ml30">
<ul class="nav">
<?php $sheet = $data['sheet'] ?? false; ?>
<?= insert('/_block/navigation/nav', ['list' => config('navigation/nav.home')]); ?>
</ul>
@ -44,9 +43,7 @@ $facet = $data['facet'] ?? false; ?>
<?= Html::addPost($facet); ?>
<div id="toggledark">
<i class="bi-brightness-high active gray-600"></i>
</div>
<div id="toggledark"><i class="bi-brightness-high gray-600"></i></div>
<a class="gray-600" href="<?= url('notifications'); ?>">
<?php $notif = \App\Controllers\NotificationController::setBell(UserData::getUserId()); ?>