-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ [AMP Story Audio Sticker] add the sticker container and tap hint (#…
…38744) * Audio sticker skeleton code: clicking on the element would unmute the story and hide the element * Remove validator test and spaces in css file * Add dependency * Update z-index * Update extensions/amp-story-audio-sticker/0.1/amp-story-audio-sticker.css Co-authored-by: Matias Szylkowski <[email protected]> * Cleaning up extension and css code * fix * Remove unnecessary CSS and update the example. * Fix z-index * Remove validator * Add the sticker container and tap hint * Fix whitespace * lint * String concat in jsx --------- Co-authored-by: Matias Szylkowski <[email protected]>
- Loading branch information
1 parent
81747b1
commit 74060fa
Showing
4 changed files
with
101 additions
and
21 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
54 changes: 49 additions & 5 deletions
54
extensions/amp-story-audio-sticker/0.1/amp-story-audio-sticker.css
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,15 +1,59 @@ | ||
amp-story-audio-sticker { | ||
.i-amphtml-amp-story-audio-sticker-component { | ||
display: flex !important; | ||
flex-direction: column !important; | ||
flex-wrap: wrap !important; | ||
align-items: center !important; | ||
align-content: flex-start !important; | ||
justify-content: flex-start !important; | ||
} | ||
|
||
.i-amphtml-amp-story-audio-sticker-tap-hint { | ||
width: 110px !important; | ||
height: 38.33px !important; | ||
background-size: contain !important; | ||
background-repeat: no-repeat !important; | ||
background-image: url('data:image/svg+xml;charset=utf-8,<svg width="110" height="39" viewBox="0 0 110 39" fill="none" xmlns="http://www.w3.org/2000/svg"><g filter="url(#filter0_b_2402_31756)"><path fill-rule="evenodd" clip-rule="evenodd" d="M16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32H19.75L24.2 37.9333C24.6 38.4667 25.4 38.4667 25.8 37.9333L30.25 32H94C102.837 32 110 24.8366 110 16C110 7.16344 102.837 0 94 0H16Z" fill="#4D4D4D" fill-opacity="0.4"/></g><defs><filter id="filter0_b_2402_31756" x="-15" y="-15" width="140" height="68.3333" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feGaussianBlur in="BackgroundImageFix" stdDeviation="7.5"/><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_2402_31756"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_backgroundBlur_2402_31756" result="shape"/></filter></defs></svg>') !important; | ||
font-weight: 500 !important; | ||
font-size: 14px !important; | ||
display: flex !important; | ||
justify-content: center !important; | ||
align-items: center !important; | ||
margin-bottom: 4px !important; | ||
} | ||
|
||
.i-amphtml-amp-story-audio-sticker-tap-hint span { | ||
margin-bottom: 6px !important; | ||
} | ||
|
||
.i-amphtml-amp-story-audio-sticker-container { | ||
position: relative !important; | ||
overflow: hidden !important; | ||
} | ||
|
||
amp-story[muted] amp-story-audio-sticker { | ||
pointer-events: auto !important; | ||
.i-amphtml-amp-story-audio-sticker-container.large { | ||
width: 180px !important; | ||
height: 180px !important; | ||
} | ||
|
||
amp-story:not([muted]) amp-story-audio-sticker { | ||
display: none !important; | ||
.i-amphtml-amp-story-audio-sticker-container.small { | ||
width: 120px !important; | ||
height: 120px !important; | ||
} | ||
|
||
amp-story-audio-sticker { | ||
max-width: 100% !important; /* Set the maximum width of the image to 100% to ensure it fits within the container */ | ||
max-height: 100% !important; /* Set the maximum height of the image to 100% to ensure it fits within the container */ | ||
margin: auto !important; /* Center the image horizontally and vertically within the container */ | ||
} | ||
|
||
amp-story-audio-sticker * { | ||
pointer-events: none !important; | ||
} | ||
|
||
amp-story[muted] amp-story-audio-sticker { | ||
pointer-events: auto !important; | ||
} | ||
|
||
amp-story:not([muted]) .i-amphtml-amp-story-audio-sticker-component { | ||
display: none !important; | ||
} |
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