DEV: Мобильная версия (2 часть)
См. https://libarea.ru/post/1507/nachal-peredelyvat-mobilnuyu-versiyu-libarea-i-dr
This commit is contained in:
parent
86b2f72bdf
commit
d338a77e7e
6 changed files with 154 additions and 146 deletions
|
@ -68,17 +68,17 @@ body.item.dark .box {
|
|||
.item-cat {
|
||||
padding: 20px 20px 20px 15px;
|
||||
}
|
||||
|
||||
|
||||
.categories-telo,
|
||||
.item-categories > div {
|
||||
width: 99%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.wrap.wrap-max {
|
||||
padding-left: .5rem;
|
||||
padding-right: .5rem;
|
||||
}
|
||||
|
||||
.item main { margin: 0.5rem; }
|
||||
.list-items { padding: 0 5px 0 0; }
|
||||
}
|
|
@ -1,68 +1,70 @@
|
|||
<main class="w-100">
|
||||
<div class="mb15">
|
||||
<h1 class="text-xl mt5 m0"><?= __('meta.' . $data['sheet'] . '_' . $data['type'] . 's'); ?></h1>
|
||||
<span class="gray-600 text-xs">
|
||||
<?= __('meta.' . $data['sheet'] . '_' . $data['type'] . 's_info'); ?>.
|
||||
</span>
|
||||
</div>
|
||||
<div class="indent-body">
|
||||
<div class="mb15">
|
||||
<h1 class="text-xl mt5 m0"><?= __('meta.' . $data['sheet'] . '_' . $data['type'] . 's'); ?></h1>
|
||||
<span class="gray-600 text-xs">
|
||||
<?= __('meta.' . $data['sheet'] . '_' . $data['type'] . 's_info'); ?>.
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between mb20">
|
||||
<ul class="nav scroll-menu">
|
||||
<div class="flex justify-between mb20">
|
||||
<ul class="nav scroll-menu">
|
||||
|
||||
<?= insert(
|
||||
'/_block/navigation/nav',
|
||||
[
|
||||
'list' => [
|
||||
[
|
||||
'id' => $data['type'] . '_all',
|
||||
'url' => url($data['type'] . 's.all'),
|
||||
'title' => __('app.all'),
|
||||
],
|
||||
[
|
||||
'id' => $data['type'] . '_new',
|
||||
'url' => url($data['type'] . 's.new'),
|
||||
'title' => __('app.new_ones'),
|
||||
],
|
||||
[
|
||||
'tl' => 1,
|
||||
'id' => $data['type'] . '_my',
|
||||
'url' => url($data['type'] . 's.my'),
|
||||
'title' => __('app.reading'),
|
||||
],
|
||||
<?= insert(
|
||||
'/_block/navigation/nav',
|
||||
[
|
||||
'list' => [
|
||||
[
|
||||
'id' => $data['type'] . '_all',
|
||||
'url' => url($data['type'] . 's.all'),
|
||||
'title' => __('app.all'),
|
||||
],
|
||||
[
|
||||
'id' => $data['type'] . '_new',
|
||||
'url' => url($data['type'] . 's.new'),
|
||||
'title' => __('app.new_ones'),
|
||||
],
|
||||
[
|
||||
'tl' => 1,
|
||||
'id' => $data['type'] . '_my',
|
||||
'url' => url($data['type'] . 's.my'),
|
||||
'title' => __('app.reading'),
|
||||
],
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
?>
|
||||
);
|
||||
?>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<?php if (Access::trustLevels(config('trust-levels.tl_add_' . $data['type']))) : ?>
|
||||
<?php if ($data['countUserFacet'] == 0 || UserData::checkAdmin()) : ?>
|
||||
<p class="text-xl">
|
||||
<a class="btn btn-outline-primary btn-small" href="<?= url('content.add', ['type' => $data['type']]); ?>">
|
||||
<svg class="icons">
|
||||
<use xlink:href="/assets/svg/icons.svg#plus"></use>
|
||||
</svg>
|
||||
<?= __('app.add'); ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php if (Access::trustLevels(config('trust-levels.tl_add_' . $data['type']))) : ?>
|
||||
<?php if ($data['countUserFacet'] == 0 || UserData::checkAdmin()) : ?>
|
||||
<p class="text-xl">
|
||||
<a class="btn btn-outline-primary btn-small" href="<?= url('content.add', ['type' => $data['type']]); ?>">
|
||||
<svg class="icons">
|
||||
<use xlink:href="/assets/svg/icons.svg#plus"></use>
|
||||
</svg>
|
||||
<?= __('app.add'); ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($data['facets'])) : ?>
|
||||
<?php if ($data['type'] == 'blog') : ?>
|
||||
<div class="mb20">
|
||||
<?= insert('/_block/facet/blog-list-all', ['facets' => $data['facets']]); ?>
|
||||
</div>
|
||||
<?php if (!empty($data['facets'])) : ?>
|
||||
<?php if ($data['type'] == 'blog') : ?>
|
||||
<div class="mb20">
|
||||
<?= insert('/_block/facet/blog-list-all', ['facets' => $data['facets']]); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="flex justify-between gap-max flex-wrap mb20">
|
||||
<?= insert('/_block/facet/topic-list-all', ['facets' => $data['facets']]); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<div class="flex justify-between gap-max flex-wrap mb20">
|
||||
<?= insert('/_block/facet/topic-list-all', ['facets' => $data['facets']]); ?>
|
||||
</div>
|
||||
<?= insert('/_block/no-content', ['type' => 'small', 'text' => __('app.no_content'), 'icon' => 'info']); ?>
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<?= insert('/_block/no-content', ['type' => 'small', 'text' => __('app.no_content'), 'icon' => 'info']); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, url($data['type'] . 's.' . $data['sheet'])); ?>
|
||||
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, url($data['type'] . 's.' . $data['sheet'])); ?>
|
||||
</div>
|
||||
</main>
|
|
@ -1,24 +1,26 @@
|
|||
<?= insert('/_block/add-js-css'); ?>
|
||||
<div id="contentWrapper" class="wrap wrap-max justify-between">
|
||||
<main>
|
||||
<?= insert('/_block/navigation/breadcrumbs', [
|
||||
'list' => [
|
||||
[
|
||||
'name' => __('web.catalog'),
|
||||
'link' => url('web')
|
||||
], [
|
||||
'name' => __('web.add_website'),
|
||||
'link' => 'red'
|
||||
],
|
||||
]
|
||||
]); ?>
|
||||
<div class="indent-body">
|
||||
<?= insert('/_block/navigation/breadcrumbs', [
|
||||
'list' => [
|
||||
[
|
||||
'name' => __('web.catalog'),
|
||||
'link' => url('web')
|
||||
], [
|
||||
'name' => __('web.add_website'),
|
||||
'link' => 'red'
|
||||
],
|
||||
]
|
||||
]); ?>
|
||||
|
||||
<form action="<?= url('content.create', ['type' => 'item']); ?>" class="max-w780" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<?= insert('/_block/form/select/category', ['category' => $data['category'], 'action' => 'add']); ?>
|
||||
<?= insert('/_block/form/add-website'); ?>
|
||||
<?= Html::sumbit(__('web.add')); ?>
|
||||
</form>
|
||||
<form action="<?= url('content.create', ['type' => 'item']); ?>" class="max-w780" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<?= insert('/_block/form/select/category', ['category' => $data['category'], 'action' => 'add']); ?>
|
||||
<?= insert('/_block/form/add-website'); ?>
|
||||
<?= Html::sumbit(__('web.add')); ?>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
<aside>
|
||||
<div class="box box-shadow-all text-sm">
|
||||
|
|
|
@ -3,7 +3,7 @@ $domain = $data['domain']; ?>
|
|||
|
||||
<div id="contentWrapper" class="wrap wrap-max justify-between">
|
||||
<main>
|
||||
<div class="max-w780">
|
||||
<div class="indent-body max-w780">
|
||||
|
||||
<?= insert('/_block/navigation/breadcrumbs', [
|
||||
'list' => [
|
||||
|
|
|
@ -1,32 +1,34 @@
|
|||
<?php $page = $data['page']; ?>
|
||||
<main>
|
||||
<article<?php if ($page['post_is_deleted'] == 1) : ?> class="bg-red-200" <?php endif; ?>>
|
||||
<?php if ($page['post_is_deleted'] == 0 || UserData::checkAdmin()) : ?>
|
||||
<h1>
|
||||
<?= $page['post_title']; ?>
|
||||
</h1>
|
||||
<div class="max-w780 full">
|
||||
<?= markdown($page['post_content'], 'text'); ?>
|
||||
<div class="indent-body">
|
||||
<article<?php if ($page['post_is_deleted'] == 1) : ?> class="bg-red-200" <?php endif; ?>>
|
||||
<?php if ($page['post_is_deleted'] == 0 || UserData::checkAdmin()) : ?>
|
||||
<h1>
|
||||
<?= $page['post_title']; ?>
|
||||
</h1>
|
||||
<div class="max-w780 full">
|
||||
<?= markdown($page['post_content'], 'text'); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="bg-red-200 p15 center">
|
||||
<?= __('app.content_deleted', ['name' => __('app.post')]); ?>...
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
<div class="flex justify-between">
|
||||
<?= Html::votes($page, 'post'); ?>
|
||||
<div class="gray-600 italic ml15">
|
||||
<?= $page['post_modified']; ?>
|
||||
<?php if (Access::author('post', $page) === true) : ?>
|
||||
<a class="gray-600 ml5" title="<?= __('app.edit'); ?>" href="<?= url('content.edit', ['type' => $page['post_type'], 'id' => $page['post_id']]); ?>">
|
||||
<svg class="icons">
|
||||
<use xlink:href="/assets/svg/icons.svg#edit"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="bg-red-200 p15 center">
|
||||
<?= __('app.content_deleted', ['name' => __('app.post')]); ?>...
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
<div class="flex justify-between">
|
||||
<?= Html::votes($page, 'post'); ?>
|
||||
<div class="gray-600 italic ml15">
|
||||
<?= $page['post_modified']; ?>
|
||||
<?php if (Access::author('post', $page) === true) : ?>
|
||||
<a class="gray-600 ml5" title="<?= __('app.edit'); ?>" href="<?= url('content.edit', ['type' => $page['post_type'], 'id' => $page['post_id']]); ?>">
|
||||
<svg class="icons">
|
||||
<use xlink:href="/assets/svg/icons.svg#edit"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<aside>
|
||||
<div class="box sticky top-sm bg-beige">
|
||||
|
|
|
@ -1,50 +1,52 @@
|
|||
<main class="w-100">
|
||||
<div class="mb15">
|
||||
<h1 class="text-xl mt5 m0"><?= __('meta.' . $data['sheet'] . '_users'); ?></h1>
|
||||
<span class="gray-600 text-xs">
|
||||
<?= __('meta.' . $data['sheet'] . '_users_info'); ?>.
|
||||
</span>
|
||||
</div>
|
||||
<div class="indent-body">
|
||||
<div class="mb15">
|
||||
<h1 class="text-xl mt5 m0"><?= __('meta.' . $data['sheet'] . '_users'); ?></h1>
|
||||
<span class="gray-600 text-xs">
|
||||
<?= __('meta.' . $data['sheet'] . '_users_info'); ?>.
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between mb20">
|
||||
<ul class="nav">
|
||||
<div class="flex justify-between mb20">
|
||||
<ul class="nav">
|
||||
|
||||
<?= insert(
|
||||
'/_block/navigation/nav',
|
||||
[
|
||||
'list' => [
|
||||
[
|
||||
'id' => $data['sheet'] . '_users_all',
|
||||
'url' => url('users.all'),
|
||||
'title' => __('app.all'),
|
||||
], [
|
||||
'id' => $data['sheet'] . '_users_new',
|
||||
'url' => url('users.new'),
|
||||
'title' => __('app.new_ones'),
|
||||
],
|
||||
<?= insert(
|
||||
'/_block/navigation/nav',
|
||||
[
|
||||
'list' => [
|
||||
[
|
||||
'id' => $data['sheet'] . '_users_all',
|
||||
'url' => url('users.all'),
|
||||
'title' => __('app.all'),
|
||||
], [
|
||||
'id' => $data['sheet'] . '_users_new',
|
||||
'url' => url('users.new'),
|
||||
'title' => __('app.new_ones'),
|
||||
],
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
?>
|
||||
);
|
||||
?>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap justify-between">
|
||||
<?php foreach ($data['users'] as $user) : ?>
|
||||
<div class="w160 mb-w100 mb20 center">
|
||||
<a href="<?= url('profile', ['login' => $user['login']]); ?>">
|
||||
<?= Img::avatar($user['avatar'], $user['login'], 'img-lg', 'max'); ?>
|
||||
<div class="block mt5">
|
||||
<?= $user['login']; ?>
|
||||
</div>
|
||||
<?php if ($user['name']) : ?>
|
||||
<span class="gray text-sm"><?= $user['name']; ?></span>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, url('users.' . $data['sheet'])); ?>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap justify-between">
|
||||
<?php foreach ($data['users'] as $user) : ?>
|
||||
<div class="w160 mb-w100 mb20 center">
|
||||
<a href="<?= url('profile', ['login' => $user['login']]); ?>">
|
||||
<?= Img::avatar($user['avatar'], $user['login'], 'img-lg', 'max'); ?>
|
||||
<div class="block mt5">
|
||||
<?= $user['login']; ?>
|
||||
</div>
|
||||
<?php if ($user['name']) : ?>
|
||||
<span class="gray text-sm"><?= $user['name']; ?></span>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<?= Html::pagination($data['pNum'], $data['pagesCount'], false, url('users.' . $data['sheet'])); ?>
|
||||
</main>
|
Loading…
Reference in a new issue