From c46f40d85856544af4bd0d71be126b5fb39f4dfe Mon Sep 17 00:00:00 2001 From: mateuswetah Date: Wed, 30 May 2018 16:19:42 -0300 Subject: [PATCH] Adds initial version of frame view mode :) --- src/assets/scss/_view-mode-frame.scss | 67 +++++++++++++++++++++++++++ src/assets/scss/style.scss | 4 +- src/functions.php | 6 +++ src/tainacan/view-mode-frame.php | 29 ++++++++++++ 4 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 src/assets/scss/_view-mode-frame.scss create mode 100644 src/tainacan/view-mode-frame.php diff --git a/src/assets/scss/_view-mode-frame.scss b/src/assets/scss/_view-mode-frame.scss new file mode 100644 index 0000000..64b1d15 --- /dev/null +++ b/src/assets/scss/_view-mode-frame.scss @@ -0,0 +1,67 @@ +.tainacan-frame-container { + padding: 30px 4.166666667%; + background-color: #f5f5f5; + + .row { + justify-content: space-between; + align-items: center; + } + .col { flex-grow: 0; } + + .tainacan-frame { + padding: 12px 12px 16px 12px; + text-align: center; + + .frame { + background: black; + box-shadow: 0 10px 10px -6px rgba(0, 0, 0, 0.4); + padding: 12px; + } + + .mat { + background: white; + padding: 20px; + box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5) inset; + } + + .art { + position: relative; + + } + .art::before { + box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5) inset; + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + border-radius: 2px; + } + + .art img { + width: 100%; + width: 258px; + height: auto; + border-radius: 2px; + } + + .metadata-title { + flex-shrink: 0; + font-size: 0.875rem; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + padding: 0.5rem 0.75rem; + text-align: center; + display: inline-block; + background: #fff; + margin: 14px 8px 8px 8px; + box-shadow: 0px 1px 3px #ddd; + border: 1px solid #dedede; + } + + } +} + + diff --git a/src/assets/scss/style.scss b/src/assets/scss/style.scss index 9656544..2972f0e 100644 --- a/src/assets/scss/style.scss +++ b/src/assets/scss/style.scss @@ -204,4 +204,6 @@ form{ @import "_view-mode-grid.scss"; -@import "_view-mode-mosaic.scss"; \ No newline at end of file +@import "_view-mode-mosaic.scss"; + +@import "_view-mode-frame.scss"; \ No newline at end of file diff --git a/src/functions.php b/src/functions.php index 22788d6..5c9f265 100644 --- a/src/functions.php +++ b/src/functions.php @@ -72,6 +72,12 @@ if(!function_exists('tainacan_setup')) { 'icon' => '', 'dynamic_metadata' => false, ]); + tainacan_register_view_mode('frame', [ + 'label' => 'Frame view', + 'description' => 'A frame view, made for gallery expositions', + 'icon' => '', + 'dynamic_metadata' => false, + ]); } } diff --git a/src/tainacan/view-mode-frame.php b/src/tainacan/view-mode-frame.php new file mode 100644 index 0000000..a31e596 --- /dev/null +++ b/src/tainacan/view-mode-frame.php @@ -0,0 +1,29 @@ + + +
+ +
+ +
+
+
+
+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+ Nenhum item encontrado +
+