DEV: Упростим работу с css (1 часть)
This commit is contained in:
parent
d220d27225
commit
53be54faad
7 changed files with 142 additions and 134 deletions
|
@ -7,36 +7,41 @@
|
|||
return [
|
||||
|
||||
// To force an update
|
||||
'version' => 14,
|
||||
'version' => 21,
|
||||
|
||||
// Path to svg sprite
|
||||
// Путь к спрайту svg
|
||||
'svg_path' => HLEB_PUBLIC_DIR . '/assets/svg/icons.svg',
|
||||
'svg_path' => '/assets/svg/icons.svg',
|
||||
|
||||
// Paths to template files
|
||||
'path_css' => [
|
||||
// Base path to css files
|
||||
// Базовый путь к css файлам
|
||||
'style' => HLEB_GLOBAL_DIRECTORY . '/resources/views/default/css/',
|
||||
'style' => '/resources/views/default/css/build.css',
|
||||
|
||||
// Template for qa style
|
||||
// Шаблон для стиля qa
|
||||
'qa' => HLEB_GLOBAL_DIRECTORY . '/resources/views/qa/css/',
|
||||
'qa' => '/resources/views/qa/css/build.css',
|
||||
|
||||
// Template for minimum style
|
||||
// Шаблон для стиля minimum
|
||||
'minimum' => HLEB_GLOBAL_DIRECTORY . '/resources/views/minimum/css/',
|
||||
'minimum' => '/resources/views/minimum/css/build.css',
|
||||
|
||||
// Single templates without assembly
|
||||
// Одиночные шаблоны без сборки
|
||||
'rtl' => '/resources/views/default/css/rtl.css',
|
||||
'catalog' => '/resources/views/default/css/catalog.css',
|
||||
],
|
||||
|
||||
'path_js' => [
|
||||
// Base path to js files
|
||||
// Базовый путь к js файлам
|
||||
'la' => HLEB_GLOBAL_DIRECTORY . '/resources/views/default/js/',
|
||||
'common' => HLEB_GLOBAL_DIRECTORY . '/resources/views/default/js/',
|
||||
'admin' => HLEB_GLOBAL_DIRECTORY . '/resources/views/default/js/',
|
||||
'medium-zoom' => HLEB_GLOBAL_DIRECTORY . '/resources/views/default/js/',
|
||||
'app' => HLEB_GLOBAL_DIRECTORY . '/resources/views/default/js/',
|
||||
'uploads' => HLEB_GLOBAL_DIRECTORY . '/resources/views/default/js/',
|
||||
'catalog' => HLEB_GLOBAL_DIRECTORY . '/resources/views/default/js/',
|
||||
'la' => '/resources/views/default/js/',
|
||||
'common' => '/resources/views/default/js/',
|
||||
'admin' => '/resources/views/default/js/',
|
||||
'medium-zoom' => '/resources/views/default/js/',
|
||||
'app' => '/resources/views/default/js/',
|
||||
'uploads' => '/resources/views/default/js/',
|
||||
'catalog' => '/resources/views/default/js/',
|
||||
],
|
||||
];
|
||||
|
|
|
@ -25,7 +25,7 @@ class Css
|
|||
{
|
||||
$iconList = [];
|
||||
|
||||
$sprite = file_get_contents(config('assembly-js-css.svg_path'));
|
||||
$sprite = file_get_contents(HLEB_PUBLIC_DIR . config('assembly-js-css.svg_path'));
|
||||
$result = preg_match_all("/<symbol[^>]*id=\"([-_a-z0-9]+)\"[^>]*>/i", $sprite, $matches);
|
||||
|
||||
if ($result > 0) {
|
||||
|
|
|
@ -9,18 +9,18 @@ class Sass
|
|||
public static function collect()
|
||||
{
|
||||
foreach (config('assembly-js-css.path_css') as $key => $putch) {
|
||||
self::buildCss($putch, $key);
|
||||
self::buildCss(HLEB_GLOBAL_DIRECTORY . $putch, $key);
|
||||
}
|
||||
|
||||
foreach (config('assembly-js-css.path_js') as $key => $putch) {
|
||||
self::buildJs($putch, $key);
|
||||
self::buildJs(HLEB_GLOBAL_DIRECTORY . $putch, $key);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static function buildCss($putch, $key)
|
||||
{
|
||||
$minifier = new Minify\CSS($putch . 'build.css');
|
||||
$minifier = new Minify\CSS($putch);
|
||||
$minifier->minify(HLEB_PUBLIC_DIR . '/assets/css/' . $key . '.css');
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1,84 +1 @@
|
|||
/*
|
||||
* Styles for the catalog
|
||||
*
|
||||
* Стили для каталога
|
||||
*/
|
||||
|
||||
.item-cat { padding: 0 30px 10px 30px; }
|
||||
|
||||
.list-items {
|
||||
margin: 0;
|
||||
max-width: 926px;
|
||||
padding: 0 30px 0 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.list-items li {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin-bottom: 28px
|
||||
}
|
||||
|
||||
.list-items__description {
|
||||
color: var(--gray-600);
|
||||
margin-top: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.list-items__thumb-image {
|
||||
box-sizing: border-box;
|
||||
width: 240px;
|
||||
box-shadow: 0 2px 4px -1px rgb(0 0 0 / 15%);
|
||||
}
|
||||
|
||||
.list-items__footer {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 0.875rem;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.item-categories {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
background-color: #f3f1ed;
|
||||
padding: 20px 20px 10px 30px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.categories-telo,
|
||||
.item-categories > div {
|
||||
width: 33%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
body.item.dark h2,
|
||||
body.item.dark .categories-telo a {
|
||||
color: #111;
|
||||
}
|
||||
|
||||
body.item.dark .box {
|
||||
background-color: #d0d0d0;
|
||||
}
|
||||
|
||||
@media (max-width: 890px) {
|
||||
.item-categories,
|
||||
.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;
|
||||
}
|
||||
|
||||
.list-items { padding: 0 5px 0 0; }
|
||||
}
|
||||
.item-cat{padding:0 30px 10px 30px}.list-items{margin:0;max-width:926px;padding:0 30px 0 0;list-style:none}.list-items li{position:relative;width:100%;margin-bottom:28px}.list-items__description{color:var(--gray-600);margin-top:5px;width:100%}.list-items__thumb-image{box-sizing:border-box;width:240px;box-shadow:0 2px 4px -1px rgb(0 0 0 / 15%)}.list-items__footer{display:flex;flex-direction:row;align-items:center;justify-content:space-between;font-size:.875rem;margin-top:10px}.item-categories{display:flex;flex-wrap:wrap;background-color:#f3f1ed;padding:20px 20px 10px 30px;margin-bottom:25px}.categories-telo,.item-categories>div{width:33%;margin-bottom:10px}body.item.dark h2,body.item.dark .categories-telo a{color:#111}body.item.dark .box{background-color:#d0d0d0}@media (max-width:890px){.item-categories,.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}.list-items{padding:0 5px 0 0}}
|
|
@ -1,34 +1 @@
|
|||
.dropdown {
|
||||
right: unset;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.mr5 {
|
||||
margin-right: 0;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.mr10 {
|
||||
margin-right: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.ml5 {
|
||||
margin-left: 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.right-close {
|
||||
padding: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.showPassword {
|
||||
left: 5px;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.dropdown.user { padding: 1rem .7rem .7rem 0; }
|
||||
.d-header_contents .btn-outline-primary { width: 120px; }
|
||||
.delet-count { right: auto; }
|
||||
.box-search { margin: 10px 0 10px 45px; }
|
||||
.dropdown{right:unset;left:0}.mr5{margin-right:0;margin-left:5px}.mr10{margin-right:0;margin-left:10px}.ml5{margin-left:0;margin-right:5px}.right-close{padding:5px;float:left}.showPassword{left:5px;right:auto}.dropdown.user{padding:1rem .7rem .7rem 0}.d-header_contents .btn-outline-primary{width:120px}.delet-count{right:auto}.box-search{margin:10px 0 10px 45px}.block-answer .right{float:left}
|
84
resources/views/default/css/catalog.css
Normal file
84
resources/views/default/css/catalog.css
Normal file
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
* Styles for the catalog
|
||||
*
|
||||
* Стили для каталога
|
||||
*/
|
||||
|
||||
.item-cat { padding: 0 30px 10px 30px; }
|
||||
|
||||
.list-items {
|
||||
margin: 0;
|
||||
max-width: 926px;
|
||||
padding: 0 30px 0 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.list-items li {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin-bottom: 28px
|
||||
}
|
||||
|
||||
.list-items__description {
|
||||
color: var(--gray-600);
|
||||
margin-top: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.list-items__thumb-image {
|
||||
box-sizing: border-box;
|
||||
width: 240px;
|
||||
box-shadow: 0 2px 4px -1px rgb(0 0 0 / 15%);
|
||||
}
|
||||
|
||||
.list-items__footer {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 0.875rem;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.item-categories {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
background-color: #f3f1ed;
|
||||
padding: 20px 20px 10px 30px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.categories-telo,
|
||||
.item-categories > div {
|
||||
width: 33%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
body.item.dark h2,
|
||||
body.item.dark .categories-telo a {
|
||||
color: #111;
|
||||
}
|
||||
|
||||
body.item.dark .box {
|
||||
background-color: #d0d0d0;
|
||||
}
|
||||
|
||||
@media (max-width: 890px) {
|
||||
.item-categories,
|
||||
.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;
|
||||
}
|
||||
|
||||
.list-items { padding: 0 5px 0 0; }
|
||||
}
|
35
resources/views/default/css/rtl.css
Normal file
35
resources/views/default/css/rtl.css
Normal file
|
@ -0,0 +1,35 @@
|
|||
.dropdown {
|
||||
right: unset;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.mr5 {
|
||||
margin-right: 0;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.mr10 {
|
||||
margin-right: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.ml5 {
|
||||
margin-left: 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.right-close {
|
||||
padding: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.showPassword {
|
||||
left: 5px;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.dropdown.user { padding: 1rem .7rem .7rem 0; }
|
||||
.d-header_contents .btn-outline-primary { width: 120px; }
|
||||
.delet-count { right: auto; }
|
||||
.box-search { margin: 10px 0 10px 45px; }
|
||||
.block-answer .right { float: left; }
|
Loading…
Reference in a new issue