Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
K
kpp
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alexandr Veselov
kpp
Commits
d32702cb
Commit
d32702cb
authored
Nov 17, 2017
by
Nikolay Gromov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Фикс JS на странице демки блоков (для IE)
parent
9718c2ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
blocks-demo.html
src/blocks-demo.html
+4
-2
No files found.
src/blocks-demo.html
View file @
d32702cb
...
...
@@ -9,6 +9,7 @@
<link
rel=
"stylesheet"
href=
"css/blocks-library.css"
>
<style>
.components-demo
{
display
:
block
;
padding
:
1em
;
margin
:
auto
;
max-width
:
1200px
;
...
...
@@ -2017,11 +2018,12 @@
var
demoBlocks
=
document
.
querySelectorAll
(
'.blocks-library__item'
);
var
offCanvasMenu
=
'<li class="menu__item"><a class="menu__link" data-toggle-native="off-canvas" href="https://github.com/nicothin/NTH-start-project">Исходный репозиторий</a></li><li class="menu__item menu__item--separator"><a class="menu__link" data-toggle-native="off-canvas" href="http://nicothin.github.io/NTH-start-project/blocks-demo.html">Демка на github pages</a></li>'
;
demoBlocks
.
forEach
(
function
(
block
)
{
for
(
var
i
=
0
;
i
<
demoBlocks
.
length
;
i
++
)
{
var
classes
=
'menu__item'
;
var
block
=
demoBlocks
[
i
];
if
(
block
.
classList
.
contains
(
'blocks-library__item--menusep'
))
{
classes
+=
' menu__item--separator'
;
}
offCanvasMenu
+=
'<li class="'
+
classes
+
'"><a class="menu__link" data-toggle-native="off-canvas" href="#'
+
block
.
getAttribute
(
'id'
)
+
'">'
+
block
.
querySelector
(
'.blocks-library__item-title'
).
textContent
+
'</a></li>'
;
}
);
}
var
offCanvasMenuContent
=
document
.
getElementById
(
'off-canvas-menu'
);
offCanvasMenuContent
.
innerHTML
=
offCanvasMenu
;
...
...
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