-
Notifications
You must be signed in to change notification settings - Fork 0
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
Matthew Stone
committed
Nov 7, 2023
1 parent
0dd7fc4
commit 1db4be3
Showing
13 changed files
with
94 additions
and
30 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,51 @@ | ||
<!-- | ||
MEDIA, HERO IMAGE 2 (no fixed proportions) | ||
------------------------------------------------------------------------------- | ||
available parameters: | ||
* source | ||
- contain | ||
- cover | ||
- scale | ||
- caption | ||
* required | ||
------------------------------------------------------------------------------- | ||
--> | ||
|
||
<div class="hero-img-2"> | ||
<div class="img-wrapper"> | ||
<div><img src="/assets/images/{{ include.source }}" | ||
{% if include.cover %} | ||
style=" | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover;" | ||
{% elsif include.contain %} | ||
style=" | ||
width: 100%; | ||
height: 100%; | ||
object-fit: contain; | ||
{% if include.scale %} | ||
max-height: calc( {{ include.scale }}% * 100 ); | ||
max-width: calc( {{ include.scale }}% * 100 ); | ||
{% endif %} | ||
" | ||
{% else %} | ||
style="object-fit: initial; | ||
{% if include.scale %} | ||
-ms-transform: translate(-50%, -50%) scale( {{ include.scale }} ); | ||
transform: translate(-50%, -50%) scale( {{ include.scale }} ); | ||
{% endif %} | ||
" | ||
{% endif %} | ||
></div> | ||
</div> | ||
{% if include.caption %} | ||
<small class="caption">{{ include.caption }}</small> | ||
{% endif %} | ||
</div> |
32 changes: 32 additions & 0 deletions
32
_sass/template/components/_component--media-heroimg-2.scss
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,32 @@ | ||
/** | ||
* Component: Media, Hero Image | ||
* | ||
* @description | ||
* - | ||
*/ | ||
|
||
.hero-img-2 { | ||
@include grid-child($cols:12); | ||
|
||
.img-wrapper { | ||
// @include aspect-ratio(16, 9); | ||
grid-column: 1 / -1; | ||
@include stack(sm); | ||
@include respond-to(m){ | ||
grid-column: 3 / 11; | ||
@include stack(md); | ||
} | ||
} | ||
|
||
img { | ||
width: 100%; | ||
} | ||
|
||
.caption { | ||
grid-column: 1 / -1; | ||
@include stack(md); | ||
@include respond-to(m){ | ||
grid-column: 3 / 11; | ||
} | ||
} | ||
} |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.