Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bobcat-su_full
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sergey
bobcat-su_full
Commits
8f9209b8
Commit
8f9209b8
authored
Jan 10, 2019
by
Sergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add adaptive catalog
parent
f7f9e64c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
18 deletions
+107
-18
catalog.html
src/catalog.html
+0
-2
down-arrow.svg
src/img/nosprite/rastr/down-arrow.svg
+6
-0
catalog-menu.js
src/js/catalog-menu.js
+23
-0
catalog-products-list.scss
src/scss/catalog-products-list/catalog-products-list.scss
+15
-2
menu-list-main.scss
src/scss/menu-list/menu-list-main.scss
+51
-2
index.html
src/template/menu-list-catalog/index.html
+12
-12
No files found.
src/catalog.html
View file @
8f9209b8
...
...
@@ -4,8 +4,6 @@
//= template/breadcrumb/index.html
//= template/catalog-filter/index.html
//= template/catalog-products-list/index.html
//= template/catalog-description/index.html
...
...
src/img/nosprite/rastr/down-arrow.svg
0 → 100644
View file @
8f9209b8
<?xml version="1.0" encoding="utf-8"?>
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
version=
"1.1"
viewBox=
"0 0 129 129"
enable-background=
"new 0 0 129 129"
width=
"512px"
height=
"512px"
>
<g>
<path
d=
"m121.3,34.6c-1.6-1.6-4.2-1.6-5.8,0l-51,51.1-51.1-51.1c-1.6-1.6-4.2-1.6-5.8,0-1.6,1.6-1.6,4.2 0,5.8l53.9,53.9c0.8,0.8 1.8,1.2 2.9,1.2 1,0 2.1-0.4 2.9-1.2l53.9-53.9c1.7-1.6 1.7-4.2 0.1-5.8z"
fill=
"#FFFFFF"
/>
</g>
</svg>
src/js/catalog-menu.js
0 → 100644
View file @
8f9209b8
'use strict'
;
(
function
()
{
var
menuItemAc
=
document
.
querySelector
(
'.menu-list__catalog .menu-list__link.active'
);
if
(
menuItemAc
){
var
getOtherItem
=
document
.
querySelectorAll
(
'.menu-list__catalog .menu-list__link:not(.active)'
);
menuItemAc
.
addEventListener
(
'click'
,
function
(
evt
)
{
//TODO: desctop
evt
.
preventDefault
();
menuItemAc
.
classList
.
toggle
(
'open'
);
if
(
menuItemAc
.
classList
.
contains
(
'open'
)){
getOtherItem
.
forEach
(
function
(
item
)
{
item
.
classList
.
add
(
'visible'
);
})
}
else
{
getOtherItem
.
forEach
(
function
(
item
)
{
item
.
classList
.
remove
(
'visible'
);
})
}
})
}
})();
src/scss/catalog-products-list/catalog-products-list.scss
View file @
8f9209b8
...
...
@@ -70,11 +70,24 @@
transform
:
translateY
(
-10px
);
}
}
@media
screen
and
(
max-width
:
425px
){
@media
screen
and
(
max-width
:
1024px
){
.products-list__list
{
flex-wrap
:
wrap
;
}
.product-item
{
width
:
33%
;
}
}
@media
screen
and
(
max-width
:
768px
){
.products-list__list
{
flex-wrap
:
wrap
;
}
.product-item
{
width
:
50%
;
}
}
@media
screen
and
(
max-width
:
425px
){
.product-item
{
width
:
100%
;
}
...
...
src/scss/menu-list/menu-list-main.scss
View file @
8f9209b8
...
...
@@ -78,9 +78,58 @@
display
:
none
;
}
}
.menu-list__list
{
.menu-list__catalog
.menu-list__list
{
flex-wrap
:
wrap
;
}
.menu-list__catalog
.menu-list__item
{
width
:
100%
;
}
.menu-list__catalog
.menu-list__wrapper
{
padding
:
0
;
}
.menu-list__catalog
.menu-list__link
{
flex-direction
:
row
;
visibility
:
hidden
;
height
:
0
;
padding
:
0
;
transition
:
none
;
}
.menu-list__catalog
.menu-list__link.active
{
position
:
relative
;
visibility
:
visible
;
height
:
auto
;
padding
:
10px
20px
20px
;
.menu-list__tit
{
margin-right
:
15px
;
}
&
:after
{
content
:
""
;
display
:
block
;
position
:
absolute
;
width
:
20px
;
height
:
20px
;
background
:
url("../img/down-arrow.svg")
;
background-size
:
contain
;
right
:
0
;
top
:
50%
;
transform
:
translate
(
-100%
,-
50%
);
transition
:
.2s
;
}
}
.menu-list__catalog
.menu-list__link.active.open
{
&
:after
{
transform
:
translate
(
-100%
,
-50%
)
rotate
(
180deg
);
}
}
.menu-list__catalog
.menu-list__link.visible
{
visibility
:
visible
;
height
:
auto
;
padding
:
10px
20px
20px
;
}
.menu-list__catalog
.menu-list__tit
{
flex-grow
:
1
;
}
}
@media
screen
and
(
max-width
:
425px
){
.menu-list__item
{
...
...
src/template/menu-list-catalog/index.html
View file @
8f9209b8
...
...
@@ -2,38 +2,38 @@
<div
class=
"wrapper menu-list__wrapper"
>
<ul
class=
"menu-list__list"
>
<li
class=
"menu-list__item"
>
<a
href=
"
#
"
class=
"menu-list__link active"
>
<img
src=
"img/
icon-test.png"
alt=
"
"
class=
"menu-list__ico"
>
<a
href=
"
/build/catalog.html
"
class=
"menu-list__link active"
>
<img
src=
"img/
kolesnie-cat.png"
alt=
"Колесные мини-погрузчики
"
class=
"menu-list__ico"
>
<p
class=
"menu-list__tit"
>
Колесные мини-погрузчики
</p>
</a>
</li>
<li
class=
"menu-list__item"
>
<a
href=
"
#
"
class=
"menu-list__link"
>
<img
src=
"img/
icon-tes
t.png"
alt=
""
class=
"menu-list__ico"
>
<a
href=
"
/build/catalog.html
"
class=
"menu-list__link"
>
<img
src=
"img/
gusen-ca
t.png"
alt=
""
class=
"menu-list__ico"
>
<p
class=
"menu-list__tit"
>
Колесные мини-погрузчики
</p>
</a>
</li>
<li
class=
"menu-list__item"
>
<a
href=
"
#
"
class=
"menu-list__link"
>
<img
src=
"img/
icon-tes
t.png"
alt=
""
class=
"menu-list__ico"
>
<a
href=
"
/build/catalog.html
"
class=
"menu-list__link"
>
<img
src=
"img/
mini-ca
t.png"
alt=
""
class=
"menu-list__ico"
>
<p
class=
"menu-list__tit"
>
Колесные мини-погрузчики
</p>
</a>
</li>
<li
class=
"menu-list__item"
>
<a
href=
"
#
"
class=
"menu-list__link"
>
<img
src=
"img/
icon-tes
t.png"
alt=
""
class=
"menu-list__ico"
>
<a
href=
"
/build/catalog.html
"
class=
"menu-list__link"
>
<img
src=
"img/
tele-ca
t.png"
alt=
""
class=
"menu-list__ico"
>
<p
class=
"menu-list__tit"
>
Колесные мини-погрузчики
</p>
</a>
</li>
<li
class=
"menu-list__item"
>
<a
href=
"
#
"
class=
"menu-list__link"
>
<img
src=
"img/
icon-tes
t.png"
alt=
""
class=
"menu-list__ico"
>
<a
href=
"
/build/catalog.html
"
class=
"menu-list__link"
>
<img
src=
"img/
ecscat-ca
t.png"
alt=
""
class=
"menu-list__ico"
>
<p
class=
"menu-list__tit"
>
Колесные мини-погрузчики
</p>
</a>
</li>
<li
class=
"menu-list__item"
>
<a
href=
"
#
"
class=
"menu-list__link"
>
<img
src=
"img/
icon-tes
t.png"
alt=
""
class=
"menu-list__ico"
>
<a
href=
"
/build/catalog.html
"
class=
"menu-list__link"
>
<img
src=
"img/
naves-ca
t.png"
alt=
""
class=
"menu-list__ico"
>
<p
class=
"menu-list__tit"
>
Колесные мини-погрузчики
</p>
</a>
</li>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment