From 48742a1b1553efacbfc3084fba29d7b87ff3e0b4 Mon Sep 17 00:00:00 2001 From: Sanne de Vries Date: Wed, 1 Dec 2021 14:07:05 +0000 Subject: [PATCH] Updated audio card placeholder --- ghost/admin/app/styles/components/koenig.css | 54 +++++++++++- .../addon/components/koenig-card-audio.hbs | 88 +++++++++---------- .../addon/components/koenig-card-video.hbs | 2 +- .../public/assets/icons/audio-upload.svg | 8 ++ 4 files changed, 105 insertions(+), 47 deletions(-) create mode 100644 ghost/admin/public/assets/icons/audio-upload.svg diff --git a/ghost/admin/app/styles/components/koenig.css b/ghost/admin/app/styles/components/koenig.css index 6ce419295b..f95ba8cfde 100644 --- a/ghost/admin/app/styles/components/koenig.css +++ b/ghost/admin/app/styles/components/koenig.css @@ -1875,7 +1875,59 @@ button.emoji-picker__category-button.active { margin-top: 20px; } -/* .kg-nft-card */ +/* Audio card +/* --------------------------------------------------------------- */ + +.kg-audio-card .kg-audio-container { + display: flex; + border-radius: var(--border-radius); + box-shadow: inset 0 0 0 1px rgba(124, 139, 154, 0.25); +} + +.kg-media-container { + position: relative; + width: 80px; + height: 80px; + margin: 8px; + background: var(--whitegrey-l1); + border-radius: var(--border-radius); +} + +.kg-audio-button { + display: flex; + align-items: center; + justify-content: center; + width: 80px; + height: 80px; +} + +.kg-audio-button svg { + fill: var(--midlightgrey); + opacity: 0.85; + transition: var(--animation-speed-normal) ease-out; + transform: scale(1.0); + } + + .kg-audio-button:hover svg { + opacity: 1.0; + fill: var(--green); + } + + .kg-placeholder-audio { + width: 28px; + height: 28px; +} + +.kg-placeholder-text { + display: flex; + flex-grow: 1; + align-items: center; + margin-left: 12px; + color: var(--midgrey); + font-family: var(--font-family); + font-size: 1.45rem; + font-weight: 400; +} /* Codemirror overrides /* --------------------------------------------------------------- */ diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-audio.hbs b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-audio.hbs index 1181deac62..cf0d209879 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-audio.hbs +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-audio.hbs @@ -1,6 +1,6 @@ -
-
+
+
{{#if (not @payload.src)}} -
- {{#if (or uploader.errors uploader.isUploading)}} -
- {{#if uploader.errors}} - - {{uploader.errors.firstObject.message}} - - {{/if}} + {{#if (or uploader.errors uploader.isUploading)}} +
+ {{#if uploader.errors}} + + {{uploader.errors.firstObject.message}} + + {{/if}} - {{#if this.isDraggedOver}} - - Drop it like it's hot 🔥 - - {{else if uploader.isUploading}} - {{uploader.progressBar}} - {{/if}} -
- {{else}} -
- {{#if this.isDraggedOver}} - - Drop it like it's hot 🔥 - - {{else if uploader.isUploading}} - {{uploader.progressBar}} - {{else}} - - {{/if}} -
- {{/if}} -
+ {{#if this.isDraggedOver}} + + Drop it like it's hot 🔥 + + {{else if uploader.isUploading}} + {{uploader.progressBar}} + {{/if}} +
+ {{else}} +
+ {{#if this.isDraggedOver}} + + Drop it like it's hot 🔥 + + {{else if uploader.isUploading}} + {{uploader.progressBar}} + {{else}} + + {{/if}} +
+ {{/if}}
@@ -88,10 +86,10 @@ @paramsHash={{hash url=@payload.src}} as |uploader| > -
+
{{#if (or uploader.errors uploader.isUploading)}} -
+
{{#if uploader.errors}} {{uploader.errors.firstObject.message}} @@ -105,12 +103,12 @@ {{else if uploader.isUploading}} {{uploader.progressBar}} {{else if (not @payload.thumbnailSrc)}} - {{else}} - @@ -124,7 +122,7 @@ {{/if}}
{{else}} -
+
{{#if this.isDraggedOver}} Drop it like it's hot 🔥 @@ -132,12 +130,12 @@ {{else if uploader.isUploading}} {{uploader.progressBar}} {{else if @payload.thumbnailSrc}} - {{else}} - {{/if}}
@@ -160,7 +158,7 @@ />
{{else}} -
+
Click to upload an audio file
{{/if}} diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-video.hbs b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-video.hbs index 493b2668e1..8f9cd24733 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-video.hbs +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-video.hbs @@ -1,6 +1,6 @@ + + + + + + + \ No newline at end of file