From 60cef45be424d26714559b4122d14d89f84f96ee Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 4 Feb 2018 10:16:27 -0800 Subject: [PATCH] refactor out status media attachments --- .../_components/status/MediaAttachments.html | 142 ++++++++++++++++++ routes/_components/status/Status.html | 132 +--------------- 2 files changed, 150 insertions(+), 124 deletions(-) create mode 100644 routes/_components/status/MediaAttachments.html diff --git a/routes/_components/status/MediaAttachments.html b/routes/_components/status/MediaAttachments.html new file mode 100644 index 0000000..76569d1 --- /dev/null +++ b/routes/_components/status/MediaAttachments.html @@ -0,0 +1,142 @@ +{{#if status.sensitive}} +
+ + {{#if sensitiveShown}} + + {{/if}} +
+{{else}} + +{{/if}} + + \ No newline at end of file diff --git a/routes/_components/status/Status.html b/routes/_components/status/Status.html index 1bede85..2482caa 100644 --- a/routes/_components/status/Status.html +++ b/routes/_components/status/Status.html @@ -37,32 +37,11 @@ {{/if}} {{#if originalMediaAttachments && originalMediaAttachments.length}} - {{#if originalStatus.sensitive}} -
- - {{#if sensitiveShown}} - - {{/if}} -
- {{else}} - - {{/if}} + {{/if}} @@ -192,89 +171,6 @@ margin: 0; } - .status-sensitive-media-container { - grid-area: status-media; - margin: 10px 0; - position: relative; - border-radius: 0; - border: none; - background: none; - } - - .status-sensitive-media-button { - margin: 0; - padding: 0; - border: none; - background: none; - width: 100%; - height: 100%; - } - - .status-sensitive-media-button:hover { - background: none; - } - - .status-sensitive-media-button:active { - background: none; - } - - .status-sensitive-media-shown .status-sensitive-media-button { - position: absolute; - left: 0; - right: 0; - top: 0; - bottom: 0; - z-index: 90; - } - - .status-sensitive-media-container.status-sensitive-media-hidden { - width: 100%; - margin: 10px auto; - height: 200px; - } - - .status-sensitive-media-container .status-sensitive-media-warning { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - display: flex; - align-items: center; - justify-content: center; - color: var(--deemphasized-text-color); - z-index: 60; - } - - .status-sensitive-media-container .svg-wrapper { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - display: flex; - align-items: flex-start; - justify-content: flex-start; - z-index: 40; - pointer-events: none; - background: var(--mask-bg); - } - .status-sensitive-media-container.status-sensitive-media-shown .svg-wrapper { - background: none; - } - .status-sensitive-media-container svg { - width: 24px; - height: 24px; - fill: var(--mask-svg-fill); - border-radius: 2px; - background: var(--mask-opaque-bg); - margin: 1px; - padding: 6px 10px; - } - .status-sensitive-media-container.status-sensitive-media-hidden svg { - fill: var(--deemphasized-text-color); - background: var(--mask-opaque-bg); - } @media (max-width: 767px) { .status-article { padding: 10px 10px; @@ -284,7 +180,7 @@