Honsely, I don't know what happened here
This commit is contained in:
4
components/00_ContentShape/_contentShape.styl
Normal file
4
components/00_ContentShape/_contentShape.styl
Normal file
@@ -0,0 +1,4 @@
|
||||
@import 'aspectRatio/_aspectRatio'
|
||||
@import 'focalPoint/_focalPoint'
|
||||
@import 'shape/_shape'
|
||||
@import 'truncation/_truncation'
|
61
components/00_ContentShape/aspectRatio/_aspectRatio.styl
Normal file
61
components/00_ContentShape/aspectRatio/_aspectRatio.styl
Normal file
@@ -0,0 +1,61 @@
|
||||
RV-AspectRatio--XtoY(aspectX=1, aspectY=1)
|
||||
RV-CSSParameter({
|
||||
aspectX: aspectX,
|
||||
aspectY: aspectY
|
||||
})
|
||||
|
||||
padding-top 'calc(100% * calc(%s / %s))' % (--aspectY --aspectX)
|
||||
&:last-child
|
||||
margin-bottom 'calc(-1 * 100% * calc(%s / %s) + var(--outer-spacing))' % (--aspectY --aspectX)
|
||||
|
||||
RV-Utils__ElementAmount(1, @(index, totale){
|
||||
margin-bottom 0px
|
||||
})
|
||||
|
||||
RV-AspectRatio()
|
||||
position relative
|
||||
overflow hidden
|
||||
height unset
|
||||
width unset
|
||||
|
||||
*
|
||||
object-fit cover
|
||||
position absolute
|
||||
top 0
|
||||
left 0
|
||||
bottom 0
|
||||
right 0
|
||||
|
||||
RV-AspectRatio--1to2()
|
||||
RV-AspectRatio--XtoY(1, 2)
|
||||
|
||||
RV-AspectRatio--2to1()
|
||||
RV-AspectRatio--XtoY(2, 1)
|
||||
|
||||
RV-AspectRatio--3to2()
|
||||
RV-AspectRatio--XtoY(3, 2)
|
||||
|
||||
RV-AspectRatio--4to3()
|
||||
RV-AspectRatio--XtoY(4, 3)
|
||||
|
||||
RV-AspectRatio--16to9()
|
||||
RV-AspectRatio--XtoY(16, 9)
|
||||
|
||||
|
||||
.RV-AspectRatio
|
||||
RV-AspectRatio()
|
||||
|
||||
&--1to2
|
||||
RV-AspectRatio--1to2()
|
||||
|
||||
&--2to1
|
||||
RV-AspectRatio--2to1()
|
||||
|
||||
&--3to2
|
||||
RV-AspectRatio--3to2()
|
||||
|
||||
&--4to3
|
||||
RV-AspectRatio--4to3()
|
||||
|
||||
&--16to9
|
||||
RV-AspectRatio--16to9()
|
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "aspectRatio",
|
||||
"title": "Aspect Ratio",
|
||||
"context": {
|
||||
"modifier_list": [
|
||||
"RV-AspectRatio--1to2 RV-Dummy--orange",
|
||||
"RV-AspectRatio--2to1 RV-Dummy--blue",
|
||||
"RV-AspectRatio--3to2 RV-Dummy--green",
|
||||
"RV-AspectRatio--4to3 RV-Dummy--red",
|
||||
"RV-AspectRatio--16to9 RV-Dummy--yellow"
|
||||
]
|
||||
},
|
||||
"variants": [
|
||||
{
|
||||
"name": "1 to 2",
|
||||
"context": {
|
||||
"modifier": "RV-AspectRatio--1to2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "2 to 1",
|
||||
"context": {
|
||||
"modifier": "RV-AspectRatio--2to1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "3 to 2",
|
||||
"context": {
|
||||
"modifier": "RV-AspectRatio--3to2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "4 to 3",
|
||||
"context": {
|
||||
"modifier": "RV-AspectRatio--4to3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "16 to 9",
|
||||
"context": {
|
||||
"modifier": "RV-AspectRatio--16to9"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
12
components/00_ContentShape/aspectRatio/aspectRatio.hbs
Normal file
12
components/00_ContentShape/aspectRatio/aspectRatio.hbs
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
{{#if modifier}}
|
||||
<div class="RV-Dummy RV-AspectRatio {{modifier}}"></div>
|
||||
{{else}}
|
||||
<div class="RV-FlexGrid RV-FlexGrid--masonry">
|
||||
{{#each modifier_list}}
|
||||
<div class="RV-FlexGrid__Item ">
|
||||
<div class="RV-Dummy RV-AspectRatio {{this}}"></div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
48
components/00_ContentShape/focalPoint/_focalPoint.styl
Normal file
48
components/00_ContentShape/focalPoint/_focalPoint.styl
Normal file
@@ -0,0 +1,48 @@
|
||||
// FocalPoint in percentage
|
||||
RV-FocalPoint(focalX=50%, focalY=50%)
|
||||
RV-CSSParameter({
|
||||
focalX: focalX,
|
||||
focalY: focalY
|
||||
})
|
||||
|
||||
height 100%
|
||||
width 100%
|
||||
object-fit cover
|
||||
object-position --focalX --focalY
|
||||
|
||||
RV-FocalPoint--upperHalf()
|
||||
RV-CSSParameter({
|
||||
focalY: 25%
|
||||
})
|
||||
|
||||
RV-FocalPoint--lowerHalf()
|
||||
RV-CSSParameter({
|
||||
focalY: 75%
|
||||
})
|
||||
|
||||
RV-FocalPoint--leftHalf()
|
||||
RV-CSSParameter({
|
||||
focalX: 25%
|
||||
})
|
||||
|
||||
RV-FocalPoint--rightHalf()
|
||||
RV-CSSParameter({
|
||||
focalX: 75%
|
||||
})
|
||||
|
||||
.RV-FocalPoint
|
||||
RV-FocalPoint()
|
||||
|
||||
&--upperHalf
|
||||
RV-FocalPoint--upperHalf()
|
||||
|
||||
&--lowerHalf
|
||||
RV-FocalPoint--lowerHalf()
|
||||
|
||||
&--leftHalf
|
||||
RV-FocalPoint--leftHalf()
|
||||
|
||||
&--rightHalf
|
||||
RV-FocalPoint--rightHalf()
|
||||
|
||||
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "focalPoint",
|
||||
"title": "Focal Point"
|
||||
}
|
22
components/00_ContentShape/focalPoint/focalPoint.hbs
Normal file
22
components/00_ContentShape/focalPoint/focalPoint.hbs
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
<div>
|
||||
<div class="RV-AspectRatio RV-AspectRatio--4to3">
|
||||
<img class="RV-FocalPoint" style="--focalX: 50%; --focalY: 16.66%" src="{{ path '/images/landscape.jpeg'}}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="RV-AspectRatio RV-AspectRatio--4to3">
|
||||
<img class="RV-FocalPoint" style="--focalX: 50%; --focalY: 75%" src="{{ path '/images/portrait_lowFocelPoint.jpeg'}}"/>
|
||||
</div>
|
||||
|
||||
<div class="RV-AspectRatio RV-AspectRatio--4to3">
|
||||
<img class="RV-FocalPoint" style="--focalX: 50%; --focalY: 47%" src="{{ path '/images/hasi01.png'}}"/>
|
||||
</div>
|
||||
|
||||
<div class="RV-AspectRatio RV-AspectRatio--4to3">
|
||||
<img class="RV-FocalPoint RV-FocalPoint--upperHalf" src="{{ path '/images/portrait_lowFocelPoint.jpeg'}}"/>
|
||||
</div>
|
||||
|
||||
<div class="RV-AspectRatio RV-AspectRatio--1to2">
|
||||
<img class="RV-FocalPoint RV-FocalPoint--rightHalf" src="{{ path '/images/landscape.jpeg'}}"/>
|
||||
</div>
|
34
components/00_ContentShape/shape/_shape.styl
Normal file
34
components/00_ContentShape/shape/_shape.styl
Normal file
@@ -0,0 +1,34 @@
|
||||
RV-Shape--square()
|
||||
padding-top 100%
|
||||
width 100%
|
||||
position relative
|
||||
|
||||
*
|
||||
position absolute
|
||||
top 0
|
||||
left 0
|
||||
bottom 0
|
||||
right 0
|
||||
|
||||
RV-Shape--circle()
|
||||
padding-top 100%
|
||||
width 100%
|
||||
position relative
|
||||
|
||||
&, *
|
||||
border-radius 50%
|
||||
|
||||
*
|
||||
position absolute
|
||||
top 0
|
||||
left 0
|
||||
bottom 0
|
||||
right 0
|
||||
|
||||
.RV-Shape
|
||||
|
||||
&--square
|
||||
RV-Shape--square()
|
||||
|
||||
&--circle
|
||||
RV-Shape--circle()
|
17
components/00_ContentShape/shape/shape.config.json
Normal file
17
components/00_ContentShape/shape/shape.config.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "Shape",
|
||||
"variants": [
|
||||
{
|
||||
"name": "Square",
|
||||
"context": {
|
||||
"modifier": "RV-Shape--square"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Circle",
|
||||
"context": {
|
||||
"modifier": "RV-Shape--circle"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
3
components/00_ContentShape/shape/shape.hbs
Normal file
3
components/00_ContentShape/shape/shape.hbs
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="RV-Shape {{#if modifier}}{{modifier}}{{/if}}">
|
||||
<img class="RV-FocalPoint" style="--focalX: 50%; --focalY: 75%" src="{{ path '/images/portrait_lowFocelPoint.jpeg'}}"/>
|
||||
</div>
|
62
components/00_ContentShape/truncation/_truncation.styl
Normal file
62
components/00_ContentShape/truncation/_truncation.styl
Normal file
@@ -0,0 +1,62 @@
|
||||
RV-Truncation--fade(background-color=white)
|
||||
&:after
|
||||
background-image linear-gradient(180deg, rgba(255, 255, 255, 0), background-color)
|
||||
display block
|
||||
content '###'
|
||||
color transparent
|
||||
opacity 1
|
||||
position absolute
|
||||
top calc(var(--height) - 60px)
|
||||
width 100%
|
||||
height 50px
|
||||
line-height var(--line-height)
|
||||
z-index 10
|
||||
|
||||
RV-Truncation--ellipsis(background-color=white)
|
||||
&:after
|
||||
position absolute
|
||||
display block
|
||||
right 0
|
||||
content '...'
|
||||
background-color background-color
|
||||
padding-left 5px
|
||||
padding-bottom 10px
|
||||
box-shadow -10px 8px 6px 0px #fff;
|
||||
line-height var(--line-height)
|
||||
top calc(var(--height) - 40px)
|
||||
|
||||
RV-Truncation(line-height=1.3, height=350px)
|
||||
RV-CSSParameter({
|
||||
line-height: line-height,
|
||||
height: height
|
||||
})
|
||||
|
||||
background-color = white
|
||||
display block
|
||||
overflow hidden
|
||||
position relative
|
||||
|
||||
height calc_height()
|
||||
width calc_width()
|
||||
|
||||
*
|
||||
overflow hidden
|
||||
display block
|
||||
position relative
|
||||
text-overflow ellipsis
|
||||
background-color background-color
|
||||
|
||||
line-height line-height
|
||||
max-height floor(height / (line-height * 16)) * (line-height * 16)
|
||||
|
||||
padding 0
|
||||
margin 0
|
||||
|
||||
.RV-Truncation
|
||||
RV-Truncation()
|
||||
|
||||
&--fade
|
||||
RV-Truncation--fade()
|
||||
|
||||
&--ellipsis
|
||||
RV-Truncation--ellipsis()
|
17
components/00_ContentShape/truncation/truncation.config.json
Normal file
17
components/00_ContentShape/truncation/truncation.config.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "Truncation",
|
||||
"variants": [
|
||||
{
|
||||
"name": "Fade",
|
||||
"context": {
|
||||
"modifier": "RV-Truncation--fade"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Ellipsis",
|
||||
"context": {
|
||||
"modifier": "RV-Truncation--ellipsis"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
5
components/00_ContentShape/truncation/truncation.hbs
Normal file
5
components/00_ContentShape/truncation/truncation.hbs
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="RV-Truncation {{#if modifier}}{{modifier}}{{/if}}">
|
||||
<p>
|
||||
You could see there was text coming out of her eyes, text coming out of her wherever. . Does everybody know that pig named Lorem Ipsum? She's a disgusting pig, right? When other websites give you text, they’re not sending the best. They’re not sending you, they’re sending words that have lots of problems and they’re bringing those problems with us. They’re bringing mistakes. They’re bringing misspellings. They’re typists… And some, I assume, are good words. I'm speaking with myself, number one, because I have a very good brain and I've said a lot of things. Podcasting operational change management inside of workflows to establish a framework. Taking seamless key performance indicators offline to maximise the long tail. Keeping your eye on the ball while performing a deep dive on the start-up mentality to derive convergence on cross-platform integration.
|
||||
</p>
|
||||
</div>
|
Reference in New Issue
Block a user