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
1ac44930
Commit
1ac44930
authored
Jun 13, 2017
by
Nikolay Gromov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил блок для адаптирующегося медиаконтента
parent
a76a514d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
2 deletions
+79
-2
projectConfig.json
projectConfig.json
+2
-1
blocks-demo.html
src/blocks-demo.html
+24
-1
embed-responsive.html
src/blocks/embed-responsive/embed-responsive.html
+14
-0
embed-responsive.scss
src/blocks/embed-responsive/embed-responsive.scss
+39
-0
No files found.
projectConfig.json
View file @
1ac44930
...
...
@@ -54,7 +54,8 @@
"modal"
:
[],
"close"
:
[],
"tabs"
:
[],
"object-fit-polyfill"
:
[]
"object-fit-polyfill"
:
[],
"embed-responsive"
:
[]
},
"addCssBefore"
:
[
"./src/scss/variables.scss"
,
...
...
src/blocks-demo.html
View file @
1ac44930
...
...
@@ -1418,7 +1418,7 @@
</section>
<section
class=
"blocks-library__item
blocks-library__item--menusep
"
id=
"media"
data-name=
".media"
>
<section
class=
"blocks-library__item"
id=
"media"
data-name=
".media"
>
<h2
class=
"blocks-library__item-title"
>
Медиа-компонент
</h2>
...
...
@@ -1464,6 +1464,29 @@
</section>
<section
class=
"blocks-library__item blocks-library__item--menusep"
id=
"embed-responsive"
data-name=
".embed-responsive"
>
<h2
class=
"blocks-library__item-title"
>
Адаптирующийся медиаконтент
</h2>
<p>
16/9 по умолчанию, 4/3 с модификатором.
</p>
<div
class=
"embed-responsive"
>
<iframe
width=
"560"
height=
"315"
src=
"https://www.youtube.com/embed/HNpLuXOg7xQ"
frameborder=
"0"
allowfullscreen
></iframe>
</div>
<div
class=
"blocks-library__code-wrapper"
>
<span
class=
"blocks-library__code-show-trigger"
title=
"Показать код"
><i
class=
"blocks-library__code-icon"
></i></span>
<div
class=
"blocks-library__code"
>
<pre
class=
"code"
>
<code>
<
div class="embed-responsive embed-responsive--16-9">
</code>
<code>
<
iframe ...>
<
/iframe>
</code>
<code>
<
/div>
</code>
</pre>
</div>
</div>
</section>
...
...
src/blocks/embed-responsive/embed-responsive.html
0 → 100644
View file @
1ac44930
<!--DEV
Для использования этого файла как шаблона:
@ @include('blocks/embed-responsive/embed-responsive.html')
(Нужно убрать пробел между символами @)
Подробнее: https://www.npmjs.com/package/gulp-file-include
-->
<div
class=
"embed-responsive embed-responsive--16-9"
>
<iframe
src=
"https://www.youtube.com/embed/HNpLuXOg7xQ"
frameborder=
"0"
allowfullscreen
></iframe>
</div>
src/blocks/embed-responsive/embed-responsive.scss
0 → 100644
View file @
1ac44930
// В этом файле должны быть стили только для БЭМ-блока embed-responsive, его элементов,
// модификаторов, псевдоселекторов, псевдоэлементов, @media-условий...
// Не пишите здесь другие селекторы.
.embed-responsive
{
position
:
relative
;
display
:
block
;
width
:
100%
;
padding
:
0
;
overflow
:
hidden
;
&
:
:
before
{
content
:
''
;
display
:
block
;
padding-top
:
percentage
(
9
/
16
);
}
// embed,
// object,
iframe
,
video
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
border
:
0
;
}
&
--4-3
{
&
:
:
before
{
padding-top
:
percentage
(
3
/
4
);
}
}
}
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