-
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
276 additions
and
45 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
@import 'icon-text/icon-text'; | ||
@import 'nav/nav'; | ||
@import 'toast/toast'; |
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,57 @@ | ||
$jhlite-toast-gap: 1vw; | ||
$jhlite-toast-padding: 2vw; | ||
$jhlite-toast-radius: 2vw; | ||
|
||
$jhlite-toast-medium-gap: 10px; | ||
$jhlite-toast-medium-padding: 10px 20px; | ||
$jhlite-toast-medium-radius: 20px; | ||
|
||
$jhlite-toast-color-text: $jhlite-global-color-text-light; | ||
$jhlite-toast-success-color-background: $jhlite-global-color-success; | ||
$jhlite-toast-error-color-background: $jhlite-global-color-error; | ||
|
||
.jhlite-toast { | ||
padding: $jhlite-toast-padding; | ||
display: flex; | ||
gap: $jhlite-toast-gap; | ||
border-radius: $jhlite-toast-radius; | ||
align-items: center; | ||
font-size: 1.5rem; | ||
color: $jhlite-toast-color-text; | ||
|
||
&.-success { | ||
background-color: $jhlite-toast-success-color-background; | ||
} | ||
|
||
&.-error { | ||
background-color: $jhlite-toast-error-color-background; | ||
} | ||
|
||
&--message { | ||
flex-grow: 1; | ||
flex-basis: 0; | ||
} | ||
|
||
&--action { | ||
color: inherit; | ||
cursor: pointer; | ||
margin: 0; | ||
padding: 0; | ||
font-size: 2rem; | ||
background: none; | ||
border: 0; | ||
opacity: 0.7; | ||
|
||
&:hover { | ||
opacity: 1; | ||
} | ||
} | ||
} | ||
|
||
@media screen and (min-width: $jhlite-global-breakpoint-small-medium) { | ||
.jhlite-toast { | ||
gap: $jhlite-toast-medium-gap; | ||
padding: $jhlite-toast-medium-padding; | ||
border-radius: $jhlite-toast-medium-radius; | ||
} | ||
} |
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,4 @@ | ||
include toast.mixin.pug | ||
|
||
+jhlite-toast('success') Good message | ||
+jhlite-toast('error') Bad message |
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 @@ | ||
## Toast |
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,8 @@ | ||
include /atom/icon/icon.mixin.pug | ||
|
||
mixin jhlite-toast(type) | ||
.jhlite-toast(class=`-${type}` role='alert') | ||
.jhlite-toast--message | ||
block | ||
button.jhlite-toast--action(aria-label='Close') | ||
+jhlite-icon('cancel') |
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,4 @@ | ||
extends /layout | ||
|
||
block body | ||
include toast.code.pug |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
@import 'layout/layout'; | ||
@import 'toast-overlay/toast-overlay'; |
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,20 @@ | ||
$jhlite-toast-overlay-padding: 2vw; | ||
$jhlite-toast-overlay-medium-padding: 20px; | ||
|
||
.jhlite-toast-overlay { | ||
position: fixed; | ||
z-index: 1; | ||
left: 0; | ||
top: 0; | ||
right: 0; | ||
padding: 2vw; | ||
} | ||
|
||
@media screen and (min-width: $jhlite-global-breakpoint-small-medium) { | ||
.jhlite-toast-overlay { | ||
bottom: 0; | ||
top: auto; | ||
right: auto; | ||
padding: 20px; | ||
} | ||
} |
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,4 @@ | ||
include toast-overlay.mixin.pug | ||
|
||
include /template/layout/layout.code.pug | ||
+jhlite-toast-overlay |
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 @@ | ||
## Toast overlay |
5 changes: 5 additions & 0 deletions
5
src/main/style/template/toast-overlay/toast-overlay.mixin.pug
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,5 @@ | ||
include /molecule/toast/toast.mixin.pug | ||
|
||
mixin jhlite-toast-overlay | ||
.jhlite-toast-overlay | ||
+jhlite-toast('success') A toast message |
4 changes: 4 additions & 0 deletions
4
src/main/style/template/toast-overlay/toast-overlay.render.pug
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,4 @@ | ||
extends /layout | ||
|
||
block body | ||
include toast-overlay.code.pug |
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
Oops, something went wrong.