DEV: Catalog redesign (first part)
This commit is contained in:
parent
38f0f35a05
commit
4dab7b1ce4
|
@ -4,5 +4,5 @@
|
|||
<?= Config::get('meta.name'); ?> © <?= date('Y'); ?> — <?= Translate::get('admin'); ?>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/assets/js/admin.js"></script>
|
||||
<?= Tpl::insert('scripts', ['uid' => 1]); ?>
|
|
@ -2,4 +2,6 @@
|
|||
<?= Config::get('meta.name'); ?> © <?= date('Y'); ?> — <span class="lowercase"><?= Translate::get('site.directory'); ?></span>
|
||||
</footer>
|
||||
|
||||
<?= Tpl::insert('scripts', ['uid' => $user['id']]); ?>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,9 +1,6 @@
|
|||
<?php
|
||||
Translate::setLang($user['lang']);
|
||||
$dark = Request::getCookie('dayNight') == 'dark' ? 'dark' : '';
|
||||
$css = $data['type'] == 'web' || $data['type'] == 'page' ? '' : 'bg-fons';
|
||||
$type = $data['type'] ?? false;
|
||||
$facet = $data['facet'] ?? false;
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
@ -15,104 +12,52 @@
|
|||
<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?41">
|
||||
<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>
|
||||
|
||||
<body class="<?= $css; ?><?php if ($dark == 'dark') { ?> dark<?php } ?>">
|
||||
|
||||
<header class="bg-white box-shadow <?php if ($type != 'page') { ?>sticky top0<?php } ?> z-30">
|
||||
<div class="box-flex 3mr-auto p15 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">
|
||||
<nav>
|
||||
<?= tabs_nav(
|
||||
'menu',
|
||||
$type,
|
||||
$user,
|
||||
$pages = Config::get('menu.mobile'),
|
||||
); ?>
|
||||
</nav>
|
||||
</div>
|
||||
<a title="<?= Translate::get('home'); ?>" class="logo black" href="/">
|
||||
<?= Config::get('meta.name'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php if (Request::getUri() != getUrlByName('search')) { ?>
|
||||
<div class="p5 ml30 mr20 relative mb-none w-100">
|
||||
<form class="form" method="post" action="<?= getUrlByName('search'); ?>">
|
||||
<input type="text" autocomplete="off" name="q" id="find" placeholder="<?= Translate::get('to find'); ?>" class="bg-gray-100 br-rd20 pl15 w-100 h30 gray">
|
||||
<input name="token" value="<?= csrf_token(); ?>" type="hidden">
|
||||
<input name="url" value="<?= AG_PATH_FACETS_LOGOS; ?>" type="hidden">
|
||||
</form>
|
||||
<div class="absolute box-shadow bg-white p15 pt0 mt5 max-w460 br-rd3 none" id="search_items"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if (!UserData::checkActiveUser()) { ?>
|
||||
<body <?php if ($dark == 'dark') { ?>class="dark"<?php } ?>>
|
||||
<header>
|
||||
<div class="mr-auto item-search mb-p-10">
|
||||
<a title="<?= Translate::get('home'); ?>" class="logo sky-500 mt30 mb-none" href="/">
|
||||
<?= Config::get('meta.name'); ?>
|
||||
</a>
|
||||
<div class="w-100 ml45 mb-ml-0">
|
||||
<div>
|
||||
<a class="item-search__url" href="<?= getUrlByName('web.all'); ?>">Каталог</a>
|
||||
<div class="flex right col-span-4 items-center">
|
||||
<div id="toggledark" class="header-menu-item mb-none only-icon p10 ml30 mb-ml-10">
|
||||
<div id="toggledark" class="header-menu-item mb-none only-icon mr20 mb-ml-10">
|
||||
<i class="bi bi-brightness-high gray-400 text-xl"></i>
|
||||
</div>
|
||||
<?php if (Config::get('general.invite') == false) { ?>
|
||||
<a class="register gray ml30 mr15 mb-ml-10 mb-mr-5 block" title="<?= Translate::get('sign up'); ?>" href="<?= getUrlByName('register'); ?>">
|
||||
<?= Translate::get('sign up'); ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<a class="btn btn-outline-primary ml20" title="<?= Translate::get('sign.in'); ?>" href="<?= getUrlByName('login'); ?>">
|
||||
<?= Translate::get('sign.in'); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="col-span-4">
|
||||
<div class="flex right ml30 mb-ml-10 items-center">
|
||||
|
||||
<?php if (UserData::checkAdmin()) { ?>
|
||||
<a title="<?= Translate::get('add'); ?>" class="right ml15" href="<?= getUrlByName('site.add'); ?>">
|
||||
<i class="bi bi-plus-lg middle"></i>
|
||||
<?php if (!UserData::checkActiveUser()) { ?>
|
||||
<?php if (Config::get('general.invite') == false) { ?>
|
||||
<a class="register gray-400 ml30 mr15 mb-ml-10 mb-mr-5 block" title="<?= Translate::get('sign up'); ?>" href="<?= getUrlByName('register'); ?>">
|
||||
<?= Translate::get('sign up'); ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
<div id="toggledark" class="only-icon p10 ml20 mb-ml-10">
|
||||
<i class="bi bi-brightness-high gray-400 text-xl"></i>
|
||||
</div>
|
||||
|
||||
<a class="gray-400 p10 text-xl ml20 mb-ml-10" href="<?= getUrlByName('notifications'); ?>">
|
||||
<?php $notif = \App\Controllers\NotificationsController::setBell($user['id']); ?>
|
||||
<?php if (!empty($notif)) { ?>
|
||||
<?php if ($notif['notification_action_type'] == 1) { ?>
|
||||
<i class="bi bi-envelope red-500"></i>
|
||||
<?php } else { ?>
|
||||
<i class="bi bi-bell-fill red-500"></i>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<i class="bi bi-bell"></i>
|
||||
<?php } ?>
|
||||
<a class="gray-400 mr10 ml10" title="<?= Translate::get('sign.in'); ?>" href="<?= getUrlByName('login'); ?>">
|
||||
<?= Translate::get('sign.in'); ?>
|
||||
</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 id="two" style="display: none;" class="bg-white br-rd3">
|
||||
<nav class="p0 pr20 m0">
|
||||
<?= tabs_nav(
|
||||
'menu',
|
||||
$type,
|
||||
$user,
|
||||
$pages = Config::get('menu.user'),
|
||||
); ?>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<?php if (UserData::checkAdmin()) { ?>
|
||||
<a title="<?= Translate::get('add'); ?>" class="right mr20 ml20" href="<?= getUrlByName('site.add'); ?>">
|
||||
<i class="bi bi-plus-lg middle"></i>
|
||||
</a>
|
||||
<a class="right mr10 ml20" href="<?= getUrlByName('web.deleted'); ?>">
|
||||
<?= Translate::get('deleted'); ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<form method="post" action="<?= getUrlByName('search'); ?>">
|
||||
<input type="text" name="q" placeholder="<?= Translate::get('to find'); ?>" class="item-search__input">
|
||||
<input name="token" value="<?= csrf_token(); ?>" type="hidden">
|
||||
<input name="url" value="<?= AG_PATH_FACETS_LOGOS; ?>" type="hidden">
|
||||
</form>
|
||||
</div>
|
||||
</header>
|
||||
</div>
|
||||
</header>
|
|
@ -1,35 +1,27 @@
|
|||
<?= includeTemplate('/view/default/header', ['data' => $data, 'user' => $user, 'meta' => $meta]); ?>
|
||||
|
||||
<?php if (UserData::checkAdmin()) { ?>
|
||||
<div class="m15 ">
|
||||
<a class="right" href="<?= getUrlByName('web.deleted'); ?>">
|
||||
<?= Translate::get('deleted'); ?>
|
||||
<h1 class="ml20"><?= Translate::get('categories'); ?></h1>
|
||||
|
||||
<div class="flex mb-block mb20 p20 bg-violet-50">
|
||||
<?php foreach (Config::get('web-root-categories') as $cat) { ?>
|
||||
<div class="mr60 mb-pr-0">
|
||||
<a class="pr20 underline-hover text-2xl block " href="<?= getUrlByName('web.topic', ['slug' => $cat['url']]); ?>">
|
||||
<?= $cat['title']; ?>
|
||||
</a>
|
||||
<h1><?= Translate::get('categories'); ?></h1>
|
||||
<?php if (!empty($cat['sub'])) { ?>
|
||||
<?php foreach ($cat['sub'] as $sub) { ?>
|
||||
<a class="pr10 text-sm black inline" href="<?= getUrlByName('web.topic', ['slug' => $sub['url']]); ?>">
|
||||
<?= $sub['title']; ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!empty($cat['help'])) { ?>
|
||||
<div class="text-sm gray-400 mt5"><?= $cat['help']; ?>...</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="flex mb20 p15 bg-violet-50">
|
||||
<?php foreach (Config::get('web-root-categories') as $cat) { ?>
|
||||
<div class="mr60">
|
||||
<a class="pr20 underline-hover text-2xl block " href="<?= getUrlByName('web.topic', ['slug' => $cat['url']]); ?>">
|
||||
<?= $cat['title']; ?>
|
||||
</a>
|
||||
<?php if (!empty($cat['sub'])) { ?>
|
||||
<?php foreach ($cat['sub'] as $sub) { ?>
|
||||
<a class="pr10 text-sm black inline" href="<?= getUrlByName('web.topic', ['slug' => $sub['url']]); ?>">
|
||||
<?= $sub['title']; ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if (!empty($cat['help'])) { ?>
|
||||
<div class="text-sm gray-400 mt5"><?= $cat['help']; ?>...</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-12 gap-4">
|
||||
<main class="col-span-9 mb-col-12 ml20">
|
||||
<main class="col-span-9 mb-col-12 ml20 mr20">
|
||||
<p>
|
||||
<?= num_word($data['count'], Translate::get('num-website'), false); ?>:
|
||||
<?= $data['count']; ?>
|
||||
|
@ -52,7 +44,7 @@
|
|||
<?= pagination($data['pNum'], $data['pagesCount'], $data['sheet'], getUrlByName($data['sheet'])); ?>
|
||||
</main>
|
||||
<aside class="col-span-3 mb-col-12 mb-none">
|
||||
<div class="right mt15"><?= Translate::get('being.developed'); ?></div>
|
||||
<div class="right mt15 mr20"><?= Translate::get('being.developed'); ?></div>
|
||||
</aside>
|
||||
</div>
|
||||
<?= includeTemplate('/view/default/footer', ['user' => $user]); ?>
|
|
@ -18,7 +18,7 @@
|
|||
<?= website_img($item['item_url_domain'], 'favicon', $item['item_url_domain'], 'favicons mr5'); ?>
|
||||
<?= $item['item_url_domain']; ?>
|
||||
<?php if ($item['item_github_url']) { ?>
|
||||
<a class="ml15 gray-600" target="_blank" rel="nofollow noreferrer ugc" href="<?= $item['item_github_url']; ?>">
|
||||
<a class="ml15 gray-600 mb-none" target="_blank" rel="nofollow noreferrer ugc" href="<?= $item['item_github_url']; ?>">
|
||||
<i class="bi bi-github text-sm mr5"></i>
|
||||
<?= $item['item_title_soft']; ?> <?= Translate::get('on'); ?> GitHub
|
||||
</a>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
|
||||
<main class="col-span-7 mb-col-12">
|
||||
<div class="bg-white box-flex br-box-gray">
|
||||
<div class="box-flex-white">
|
||||
<p class="m0"><?= Translate::get($data['sheet']); ?></p>
|
||||
<ul class="flex flex-row list-none text-sm">
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
|
||||
<main class="col-span-7 mb-col-12">
|
||||
<div class="bg-white box-flex br-box-gray">
|
||||
<div class="box-flex-white">
|
||||
<p class="m0"><?= Translate::get($data['sheet']); ?></p>
|
||||
<ul class="flex flex-row list-none text-sm">
|
||||
|
||||
|
|
|
@ -123,14 +123,10 @@ img {
|
|||
.ml20 { margin-left: 20px; }
|
||||
|
||||
.mt30 { margin-top: 30px; }
|
||||
.mt60 { margin-top: 60px; }
|
||||
.mr30 { margin-right: 30px; }
|
||||
.mr60 { margin-right: 60px; }
|
||||
.mb30 { margin-bottom: 30px; }
|
||||
.ml30 { margin-left: 30px; }
|
||||
.ml45 { margin-left: 45px; }
|
||||
.ml60 { margin-left: 60px; }
|
||||
.ml120 { margin-left: 120px; }
|
||||
.mr60 { margin-right: 60px; }
|
||||
|
||||
.p0 { padding: 0; }
|
||||
.pt0 { padding-top: 0; }
|
||||
|
|
|
@ -134,7 +134,7 @@ details[open] > summary {
|
|||
/* web catalog */
|
||||
.list-items {
|
||||
margin: 0;
|
||||
min-width: 426px;
|
||||
max-width: 726px;
|
||||
padding: 0 30px 0 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
@ -176,6 +176,31 @@ details[open] > summary {
|
|||
font-size: 0.875rem;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.item-search {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 40px 60px 30px 20px;
|
||||
}
|
||||
|
||||
.item-search__input {
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
height: 50px;
|
||||
border: 9px solid #eee;
|
||||
padding-left: 15px;
|
||||
color: var(--gray-700);
|
||||
}
|
||||
|
||||
.item-search__url{
|
||||
text-decoration: underline;
|
||||
font-size: 1.25rem;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
/* end catalog */
|
||||
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
.mb-ml-0 { margin-left: 0; }
|
||||
.mb-pl-0 { padding-left: 0; }
|
||||
.mb-pr-0 { padding-right: 0; }
|
||||
.mb-p-10 { padding: 10px; }
|
||||
.mb-text-xl { font-size: 1.25rem; }
|
||||
.mb-inline { display: inline; }
|
||||
.mb-gap-05 { gap: 0.5rem; }
|
||||
|
|
|
@ -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?39">
|
||||
<link rel="stylesheet" href="/assets/css/style.css?41">
|
||||
<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>
|
||||
|
|
Loading…
Reference in a new issue