From e4757057047d276fb0d82a8fd3b270207c7cf5b1 Mon Sep 17 00:00:00 2001 From: Frodo161 Date: Mon, 18 Sep 2023 10:47:05 +0200 Subject: [PATCH] Split up thyme CSS. --- app/assets/stylesheets/annotations.scss | 162 ++++++++++++++ app/assets/stylesheets/application.scss | 4 +- app/assets/stylesheets/thyme.scss | 242 --------------------- app/assets/stylesheets/thyme_feedback.scss | 75 +++++++ 4 files changed, 240 insertions(+), 243 deletions(-) create mode 100644 app/assets/stylesheets/thyme_feedback.scss diff --git a/app/assets/stylesheets/annotations.scss b/app/assets/stylesheets/annotations.scss index e69de29bb..827237ca6 100644 --- a/app/assets/stylesheets/annotations.scss +++ b/app/assets/stylesheets/annotations.scss @@ -0,0 +1,162 @@ +/* buttons */ +#emergency-button { + position: absolute; + display: flex; + left: 89%; +} + +#annotations-toggle { + position: absolute; + display: flex; + left: 89%; + top: 40%; + -ms-transform: translateY(-50%); + transform: translateY(-50%); + input:checked + .slider { + background-color: #2196F3; + } +} + +/* annotation modal */ +#annotation-modal { + .modal-content { + width: 100%; + } + #annotation-modal-content { + width: 100%; + } + #preview-toggle { + input:checked + .slider { + background-color: #0D6EFD; + } + .switch { + vertical-align: middle; + } + } + #annotation-modal-preview { + height: 543px; + width: 35%; + word-wrap: break-word; + overflow-y: scroll; + } + #annotation_comment { + height: 150px; + resize: none; + } + #annotation_category_text { + width: 200px; + } + input[type=checkbox] { + width: 18px; + height: 18px; + } +} + +#emergency-link { + text-align: center; +} + +#markers { + position: relative; + top: -6px; + width: 0; + height: 0; + display: flex; + cursor: pointer; +} + +#annotation-caption { + display: flex; + flex-direction: column; + justify-content: space-between; +} + +#annotation-infobar { + height: 2em; + color: black; + overflow-y: scroll; + padding: 3px; + border-left: 1px solid darkgray; + border-right: 1px solid darkgray; + border-top: 1px solid darkgray; +} + +#annotation-comment { + margin-left: 3px; + margin-right: 3px; + overflow-y: scroll; + height: 85%; +} + +#annotation-buttons { + display: flex; + justify-content: space-between; + margin-left: 10%; + margin-right: 10%; + margin-bottom: 15px; + margin-top: auto; +} + + +/* A collection of all colors. +Be aware that color changes must also be written in the +AnnotationHelper! */ +$annotation_colors: ( + annotation_color1: #DB2828, + annotation_color2: #F2711C, + annotation_color3: #FBBD08, + annotation_color4: #B5CC18, + annotation_color5: #21BA45, + annotation_color6: #00B5AD, + annotation_color7: #2185D0, + annotation_color8: #6435C9, + annotation_color9: #A333C8, + annotation_color10: #E03997, + annotation_color11: #d05d41, + annotation_color12: #924129, + annotation_color13: #444444, + annotation_color14: #999999, + annotation_color15: #eeeeee, +); + +* { + box-sizing: border-box; +} + +#annotation-color-picker { + input[type="radio"] { + display: none; + &:checked + label { + span { transform: scale(1.25); } + @each $name, $value in $annotation_colors { + .#{$name} { + border: 2px solid black; + } + } + } + } + text-align: center; + label { + display: inline-block; + width: 25px; + height: 25px; + margin-right: 2px; + cursor: pointer; + &:hover { + span { + transform: scale(1.25); + } + } + span { + display: block; + width: 100%; + height: 100%; + transition: transform .2s ease-in-out; + @each $name, $value in $annotation_colors { + &.#{$name} { + background: $value; + } + } + } + } +} diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 35f8c0d78..97f94f17e 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -48,6 +48,7 @@ $container-max-widths: ( /* override the !default vars with the values we set above */ +@import "annotations"; @import "bootstrap"; @import "rails_bootstrap_forms"; @import "chapters"; @@ -63,6 +64,7 @@ $container-max-widths: ( @import "tags"; @import "talks"; @import "thyme"; +@import "thyme_feedback"; @import "users"; @import "submissions"; @import "vertices"; @@ -302,4 +304,4 @@ a { &:hover { text-decoration: underline; } -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/thyme.scss b/app/assets/stylesheets/thyme.scss index 7508cb09d..d0d84bf49 100644 --- a/app/assets/stylesheets/thyme.scss +++ b/app/assets/stylesheets/thyme.scss @@ -135,24 +135,6 @@ margin-left: 4px; } -#emergency-button { - position: absolute; - display: flex; - left: 89%; -} - -#annotations-toggle { - position: absolute; - display: flex; - left: 89%; - top: 40%; - -ms-transform: translateY(-50%); - transform: translateY(-50%); - input:checked + .slider { - background-color: #2196F3; - } -} - /* The switch - the box around the slider */ .switch { position: relative; @@ -418,227 +400,3 @@ figure { { background-color: black; } - - - -/* annotation modal */ -#annotation-modal { - .modal-content { - width: 100%; - } - #annotation-modal-content { - width: 100%; - } - #preview-toggle { - input:checked + .slider { - background-color: #0D6EFD; - } - .switch { - vertical-align: middle; - } - } - #annotation-modal-preview { - height: 543px; - width: 35%; - word-wrap: break-word; - overflow-y: scroll; - } - #annotation_comment { - height: 150px; - resize: none; - } - #annotation_category_text { - width: 200px; - } - input[type=checkbox] { - width: 18px; - height: 18px; - } -} - -#emergency-link { - text-align: center; -} - -#markers { - position: relative; - top: -6px; - width: 0; - height: 0; - display: flex; - cursor: pointer; -} - -#annotation-caption { - display: flex; - flex-direction: column; - justify-content: space-between; -} - -#annotation-infobar { - height: 2em; - color: black; - overflow-y: scroll; - padding: 3px; - border-left: 1px solid darkgray; - border-right: 1px solid darkgray; - border-top: 1px solid darkgray; -} - -#annotation-comment { - margin-left: 3px; - margin-right: 3px; - overflow-y: scroll; - height: 85%; -} - -#annotation-buttons { - display: flex; - justify-content: space-between; - margin-left: 10%; - margin-right: 10%; - margin-bottom: 15px; - margin-top: auto; -} - - -/* A collection of all colors. -Be aware that color changes must also be written in the -AnnotationHelper! */ -$annotation_colors: ( - annotation_color1: #DB2828, - annotation_color2: #F2711C, - annotation_color3: #FBBD08, - annotation_color4: #B5CC18, - annotation_color5: #21BA45, - annotation_color6: #00B5AD, - annotation_color7: #2185D0, - annotation_color8: #6435C9, - annotation_color9: #A333C8, - annotation_color10: #E03997, - annotation_color11: #d05d41, - annotation_color12: #924129, - annotation_color13: #444444, - annotation_color14: #999999, - annotation_color15: #eeeeee, -); - -* { - box-sizing: border-box; -} - -#annotation-color-picker { - input[type="radio"] { - display: none; - &:checked + label { - span { transform: scale(1.25); } - @each $name, $value in $annotation_colors { - .#{$name} { - border: 2px solid black; - } - } - } - } - text-align: center; - label { - display: inline-block; - width: 25px; - height: 25px; - margin-right: 2px; - cursor: pointer; - &:hover { - span { - transform: scale(1.25); - } - } - span { - display: block; - width: 100%; - height: 100%; - transition: transform .2s ease-in-out; - @each $name, $value in $annotation_colors { - &.#{$name} { - background: $value; - } - } - } - } -} - - -/* THYME FEEDBACK */ -#thyme-feedback { - position: absolute; - top: 0; - width: 100%; - height: 100%; - font-family: 'Roboto'; -} - -#feedback-timeline { - position: absolute; - display: flex; - width: 78%; -} - -#feedback-special-buttons { - position: absolute; - display: flex; - right: 14%; -} - -#feedback-volume-controls { - position: absolute; - display: flex; - width: 10%; - right: 2%; -} - -#feedback-markers { - position: relative; - top: -6px; - width: 0; - height: 0; - display: flex; - cursor: pointer; -} - -#heatmap { - position: relative; - width: 0; - height: 0; - pointer-events: none; -} - -#below-area { - bottom: 0; - padding: 10px; - background: #eeefff; - border: solid; - border-width: 1px; - border-color: black; -} - -#toggle-mistake-annotations { - input:checked + .slider { - background-color: #C23939; - } -} - -#toggle-content-annotations { - input:checked + .slider { - background-color: #D5D841; - } -} - -#toggle-presentation-annotations { - input:checked + .slider { - background-color: #D9892E; - } -} - -#toggle-note-annotations { - input:checked + .slider { - background-color: #66B748; - } -} diff --git a/app/assets/stylesheets/thyme_feedback.scss b/app/assets/stylesheets/thyme_feedback.scss new file mode 100644 index 000000000..91febb2d9 --- /dev/null +++ b/app/assets/stylesheets/thyme_feedback.scss @@ -0,0 +1,75 @@ +#thyme-feedback { + position: absolute; + top: 0; + width: 100%; + height: 100%; + font-family: 'Roboto'; +} + +#feedback-timeline { + position: absolute; + display: flex; + width: 78%; +} + +#feedback-special-buttons { + position: absolute; + display: flex; + right: 14%; +} + +#feedback-volume-controls { + position: absolute; + display: flex; + width: 10%; + right: 2%; +} + +#feedback-markers { + position: relative; + top: -6px; + width: 0; + height: 0; + display: flex; + cursor: pointer; +} + +#heatmap { + position: relative; + width: 0; + height: 0; + pointer-events: none; +} + +#below-area { + bottom: 0; + padding: 10px; + background: #eeefff; + border: solid; + border-width: 1px; + border-color: black; +} + +#toggle-mistake-annotations { + input:checked + .slider { + background-color: #C23939; + } +} + +#toggle-content-annotations { + input:checked + .slider { + background-color: #D5D841; + } +} + +#toggle-presentation-annotations { + input:checked + .slider { + background-color: #D9892E; + } +} + +#toggle-note-annotations { + input:checked + .slider { + background-color: #66B748; + } +}