From adafae977a5cc2b5ce1e3ab044bc17c4d4f11a4e Mon Sep 17 00:00:00 2001
From: Henry Jameson <me@hjkos.com>
Date: Mon, 12 Apr 2021 00:00:23 +0300
Subject: Play-on-click, layout improvements.

---
 src/components/flash/flash.vue | 57 ++++++++++++++++++++++++++++++++++++++----
 1 file changed, 52 insertions(+), 5 deletions(-)

(limited to 'src/components/flash/flash.vue')

diff --git a/src/components/flash/flash.vue b/src/components/flash/flash.vue
index 510fe6d2..adef67ff 100644
--- a/src/components/flash/flash.vue
+++ b/src/components/flash/flash.vue
@@ -1,8 +1,31 @@
 <template>
-  <div
-    class="Flash"
-    ref="cunt"
-  />
+  <div class="Flash">
+    <div
+      v-if="player"
+      ref="cunt"
+      class="player"
+      :class="{ hidden: player === 'hidden' }"
+    />
+    <button
+      v-if="player === false || player === 'hidden'"
+      @click="openPlayer"
+      class="button-unstyled placeholder"
+    >
+      <span v-if="player === 'hidden'" class="label">
+        {{ $t('general.loading') }}
+      </span>
+      <span v-else class="label">
+        {{ $t('general.flash_content') }}
+      </span>
+    </button>
+    <button
+      v-if="player"
+      class="button-unstyled hider"
+      @click="closePlayer"
+    >
+      <FAIcon icon="stop" />
+  </button>
+</div>
 </template>
 
 <script src="./flash.js"></script>
@@ -10,6 +33,30 @@
 <style lang="scss">
 @import '../../_variables.scss';
 .Flash {
-  display: block;
+  width: 100%;
+  height: 260px;
+  position: relative;
+
+  .player {
+    height: 100%;
+    width: 100%;
+  }
+
+  .hider {
+    top: 0;
+  }
+
+  .hidden {
+    display: none;
+    visibility: 'hidden';
+  }
+
+  .placeholder {
+    height: 100%;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
 }
 </style>
-- 
cgit v1.2.3-70-g09d2

