Skip to content

Commit

Permalink
Split up thyme CSS.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frodo161 committed Sep 18, 2023
1 parent 22bd9cc commit e475705
Show file tree
Hide file tree
Showing 4 changed files with 240 additions and 243 deletions.
162 changes: 162 additions & 0 deletions app/assets/stylesheets/annotations.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
}
}
4 changes: 3 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -63,6 +64,7 @@ $container-max-widths: (
@import "tags";
@import "talks";
@import "thyme";
@import "thyme_feedback";
@import "users";
@import "submissions";
@import "vertices";
Expand Down Expand Up @@ -302,4 +304,4 @@ a {
&:hover {
text-decoration: underline;
}
}
}
Loading

0 comments on commit e475705

Please sign in to comment.