This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(side-revealer): Add new molecule to give the ability to have mai…
…n content and sub content in the side
- Loading branch information
Showing
7 changed files
with
251 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
<p> | ||
Side revealers are used to give you the ability to have main content and sub content in the side, and there are two styles of the revealers | ||
</p> | ||
|
||
<div class="dc-side-revealer"> | ||
<h3>1. The sub content is added inside a card <code>.dc-side-revealer__content__scroll</code></h3> | ||
<div> | ||
<strong>The main content is here.</strong> What is Lorem Ipsum? | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. | ||
|
||
Why do we use it? | ||
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). | ||
|
||
|
||
Where does it come from? | ||
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. | ||
|
||
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. | ||
</div> | ||
|
||
<input class="dc-side-revealer__toggle dc-icon" type="checkbox"/> | ||
<div class="dc-side-revealer__content dc-card"> | ||
<div class="dc-side-revealer__content__scroll dc-card"> | ||
<table class="dc-table"> | ||
<thead class="dc-table__thead"> | ||
<tr class="dc-table__tr"> | ||
<th class="dc-table__th dc-table__th--sortable" data-col="First Name">First Name<span class="dc-table__sorter dc-table__sorter--ascending"></th> | ||
<th class="dc-table__th dc-table__th--sortable" data-col="Name">Last Name<span class="dc-table__sorter dc-table__sorter--descending"></th> | ||
<th class="dc-table__th dc-table__th--sortable" data-col="Name">Status<span class="dc-table__sorter"></th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody class="dc-table__tbody"> | ||
<tr class="dc-table__tr"> | ||
<td class="dc-table__td" data-col="First Name">Austin</td> | ||
<td class="dc-table__td" data-col="Last Name">Carpenter</td> | ||
<td class="dc-table__td" data-col="Status"><span class="dc-status dc-status--new">New</span></td> | ||
</tr> | ||
|
||
<tr class="dc-table__tr"> | ||
<td class="dc-table__td" data-col="First Name">Eileen</td> | ||
<td class="dc-table__td" data-col="Last Name">Holland</td> | ||
<td class="dc-table__td" data-col="Status"><span class="dc-status dc-status--active">Active</span></td> | ||
</tr> | ||
|
||
<tr class="dc-table__tr"> | ||
<td class="dc-table__td" data-col="First Name">Duane</td> | ||
<td class="dc-table__td" data-col="Last Name">Holmes</td> | ||
<td class="dc-table__td" data-col="Status"><span class="dc-status dc-status--active">Active</span></td> | ||
</tr> | ||
|
||
<tr class="dc-table__tr"> | ||
<td class="dc-table__td" data-col="First Name">Kitty</td> | ||
<td class="dc-table__td" data-col="Last Name">Murray</td> | ||
<td class="dc-table__td" data-col="Status"><span class="dc-status dc-status--new">New</span></td> | ||
</tr> | ||
|
||
<tr class="dc-table__tr"> | ||
<td class="dc-table__td" data-col="First Name">Toni</td> | ||
<td class="dc-table__td" data-col="Last Name">Nichols</td> | ||
<td class="dc-table__td" data-col="Status"><span class="dc-status dc-status--error">Error</span></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<p> | ||
What is Lorem Ipsum? | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. | ||
|
||
Why do we use it? | ||
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). | ||
|
||
|
||
Where does it come from? | ||
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. | ||
|
||
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<br> | ||
<hr class="dc-divider"> | ||
|
||
<div class="dc-side-revealer"> | ||
<h3>2. The sub content is added directly into the revealer <code>.dc-side-revealer__content</code></h3> | ||
<div> | ||
<strong>The main content is here.</strong> What is Lorem Ipsum? | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. | ||
|
||
Why do we use it? | ||
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). | ||
|
||
|
||
Where does it come from? | ||
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. | ||
|
||
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. | ||
</div> | ||
|
||
<input class="dc-side-revealer__toggle dc-icon" type="checkbox"/> | ||
<div class="dc-side-revealer__content dc-card"> | ||
<table class="dc-table"> | ||
<thead class="dc-table__thead"> | ||
<tr class="dc-table__tr"> | ||
<th class="dc-table__th dc-table__th--sortable" data-col="First Name">First Name<span class="dc-table__sorter dc-table__sorter--ascending"></th> | ||
<th class="dc-table__th dc-table__th--sortable" data-col="Name">Last Name<span class="dc-table__sorter dc-table__sorter--descending"></th> | ||
<th class="dc-table__th dc-table__th--sortable" data-col="Name">Status<span class="dc-table__sorter"></th> | ||
</tr> | ||
</thead> | ||
|
||
<tbody class="dc-table__tbody"> | ||
<tr class="dc-table__tr"> | ||
<td class="dc-table__td" data-col="First Name">Austin</td> | ||
<td class="dc-table__td" data-col="Last Name">Carpenter</td> | ||
<td class="dc-table__td" data-col="Status"><span class="dc-status dc-status--new">New</span></td> | ||
</tr> | ||
|
||
<tr class="dc-table__tr"> | ||
<td class="dc-table__td" data-col="First Name">Eileen</td> | ||
<td class="dc-table__td" data-col="Last Name">Holland</td> | ||
<td class="dc-table__td" data-col="Status"><span class="dc-status dc-status--active">Active</span></td> | ||
</tr> | ||
|
||
<tr class="dc-table__tr"> | ||
<td class="dc-table__td" data-col="First Name">Duane</td> | ||
<td class="dc-table__td" data-col="Last Name">Holmes</td> | ||
<td class="dc-table__td" data-col="Status"><span class="dc-status dc-status--active">Active</span></td> | ||
</tr> | ||
|
||
<tr class="dc-table__tr"> | ||
<td class="dc-table__td" data-col="First Name">Kitty</td> | ||
<td class="dc-table__td" data-col="Last Name">Murray</td> | ||
<td class="dc-table__td" data-col="Status"><span class="dc-status dc-status--new">New</span></td> | ||
</tr> | ||
|
||
<tr class="dc-table__tr"> | ||
<td class="dc-table__td" data-col="First Name">Toni</td> | ||
<td class="dc-table__td" data-col="Last Name">Nichols</td> | ||
<td class="dc-table__td" data-col="Status"><span class="dc-status dc-status--error">Error</span></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<p> | ||
What is Lorem Ipsum? | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. | ||
|
||
Why do we use it? | ||
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). | ||
|
||
|
||
Where does it come from? | ||
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32. | ||
|
||
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham. | ||
</p> | ||
</div> | ||
</div> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
// @import "../core/core"; | ||
|
||
@mixin dc-side-revealer { | ||
position: relative; | ||
overflow: hidden; | ||
} | ||
|
||
@mixin dc-side-revealer__toggle { | ||
position: absolute; | ||
top: 15px; | ||
right: 0; | ||
bottom: 0; | ||
transition: right .2s .2s cubic-bezier(.39, .58, .57, 1); | ||
width: 2.3em; | ||
height: 2.3em; | ||
outline: none; | ||
|
||
&:before { | ||
display: block; | ||
position: relative; | ||
border-radius: 2px; | ||
background-color: $dc-white; | ||
font-size: 16px; | ||
line-height: 2em; | ||
text-align: center; | ||
box-shadow: 0 1px 3px 2px rgba($dc-black, .08); | ||
content: "\EA09"; | ||
cursor: pointer; | ||
} | ||
|
||
&:hover { | ||
color: $dc-blue30; | ||
} | ||
|
||
&:checked { | ||
right: 60%; | ||
|
||
@include breakpoint($dc-small-width) { | ||
right: 80%; | ||
} | ||
|
||
&:before { | ||
content: "\EA0C"; | ||
} | ||
} | ||
} | ||
|
||
@mixin dc-side-revealer__content { | ||
position: absolute; | ||
top: 2px; | ||
right: 0; | ||
bottom: 2px; | ||
transform: translateX(101%); | ||
transition: transform .2s .2s cubic-bezier(.39, .58, .57, 1); | ||
background: $dc-gray80; | ||
width: 60%; | ||
overflow-y: scroll; | ||
|
||
@include breakpoint($dc-small-width) { | ||
width: 80%; | ||
} | ||
|
||
input:checked ~ & { | ||
transform: translateX(0); | ||
} | ||
} | ||
|
||
@mixin dc-side-revealer__content__scroll { | ||
height: 100%; | ||
overflow-y: scroll; | ||
} | ||
|
||
@mixin dc-side-revealer-selectors { | ||
.dc-side-revealer { | ||
@include dc-side-revealer; | ||
} | ||
|
||
.dc-side-revealer__toggle { | ||
@include dc-side-revealer__toggle; | ||
} | ||
|
||
.dc-side-revealer__content { | ||
@include dc-side-revealer__content; | ||
} | ||
|
||
.dc-side-revealer__content__scroll { | ||
@include dc-side-revealer__content__scroll; | ||
} | ||
} |