diff --git a/Gemfile.lock b/Gemfile.lock index c1bdbdd802..976d1cbd7b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,7 +82,7 @@ GEM bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) - brakeman (6.2.2) + brakeman (7.0.0) racc browser (6.2.0) builder (3.3.0) @@ -115,9 +115,9 @@ GEM cuprite (0.15.1) capybara (~> 3.0) ferrum (~> 0.15.0) - dartsass-sprockets (3.1.0) + dartsass-sprockets (3.2.0) railties (>= 4.0.0) - sassc-embedded (~> 1.69) + sassc-embedded (~> 1.80.1) sprockets (> 3.0) sprockets-rails tilt @@ -151,10 +151,14 @@ GEM concurrent-ruby (~> 1.1) webrick (~> 1.7) websocket-driver (~> 0.7) - ffi (1.17.0-arm64-darwin) - ffi (1.17.0-x86_64-darwin) - ffi (1.17.0-x86_64-linux-gnu) - ffi (1.17.0-x86_64-linux-musl) + ffi (1.17.1-aarch64-linux-gnu) + ffi (1.17.1-aarch64-linux-musl) + ffi (1.17.1-arm-linux-gnu) + ffi (1.17.1-arm-linux-musl) + ffi (1.17.1-arm64-darwin) + ffi (1.17.1-x86_64-darwin) + ffi (1.17.1-x86_64-linux-gnu) + ffi (1.17.1-x86_64-linux-musl) fugit (1.11.1) et-orbi (~> 1, >= 1.2.11) raabro (~> 1.4) @@ -188,6 +192,12 @@ GEM googleauth (~> 1.9) mini_mime (~> 1.0) google-logging-utils (0.1.0) + google-protobuf (4.29.2) + bigdecimal + rake (>= 13) + google-protobuf (4.29.2-aarch64-linux) + bigdecimal + rake (>= 13) google-protobuf (4.29.2-arm64-darwin) bigdecimal rake (>= 13) @@ -228,12 +238,15 @@ GEM jwt (2.10.1) base64 language_server-protocol (3.17.0.3) + libv8-node (18.19.0.0) + libv8-node (18.19.0.0-aarch64-linux) + libv8-node (18.19.0.0-aarch64-linux-musl) libv8-node (18.19.0.0-arm64-darwin) libv8-node (18.19.0.0-x86_64-darwin) libv8-node (18.19.0.0-x86_64-linux) libv8-node (18.19.0.0-x86_64-linux-musl) logger (1.6.4) - loofah (2.23.1) + loofah (2.24.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) mail (2.8.1) @@ -285,6 +298,14 @@ GEM net-protocol netrc (0.11.0) nio4r (2.7.4) + nokogiri (1.18.1-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.1-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.1-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.1-arm-linux-musl) + racc (~> 1.4) nokogiri (1.18.1-arm64-darwin) racc (~> 1.4) nokogiri (1.18.1-x86_64-darwin) @@ -403,6 +424,14 @@ GEM rubocop (>= 1.48.1) ruby-progressbar (1.13.0) rubyzip (2.3.2) + sass-embedded (1.83.0-aarch64-linux-gnu) + google-protobuf (~> 4.28) + sass-embedded (1.83.0-aarch64-linux-musl) + google-protobuf (~> 4.28) + sass-embedded (1.83.0-arm-linux-gnueabihf) + google-protobuf (~> 4.28) + sass-embedded (1.83.0-arm-linux-musleabihf) + google-protobuf (~> 4.28) sass-embedded (1.83.0-arm64-darwin) google-protobuf (~> 4.28) sass-embedded (1.83.0-x86_64-darwin) @@ -497,6 +526,13 @@ GEM zeitwerk (2.7.1) PLATFORMS + aarch64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-gnueabihf + arm-linux-musl + arm-linux-musleabihf arm64-darwin x86_64-darwin x86_64-linux diff --git a/app/assets/stylesheets/Admin.scss b/app/assets/stylesheets/Admin.scss index 823dac7709..ba16c2a222 100644 --- a/app/assets/stylesheets/Admin.scss +++ b/app/assets/stylesheets/Admin.scss @@ -1,32 +1,3 @@ -@import "defaults"; - -$BODY_BG_COLOR: #DD00DD; - -$LOGO_BORDER_COLOR: black; -$LOGO_BORDER_WIDTH: 2px; // vs 1px in default -$LOGO_FG_COLOR: black; -$LOGO_BG_COLOR: yellow; -$LOGO_HOVER_FG_COLOR: purple; -$LOGO_HOVER_BG_COLOR: yellow; - -$LEFT_BAR_BORDER_COLOR: #535354; // gray -$LEFT_BAR_BORDER_RADIUS: 0px; -$LEFT_BAR_HEADER_FG_COLOR: black; -$LEFT_BAR_HEADER_BG_COLOR: yellow; -$LEFT_BAR_FG_COLOR: #2050E0; -$LEFT_BAR_BG_COLOR: yellow; -$LEFT_BAR_HOVER_FG_COLOR: yellow; -$LEFT_BAR_HOVER_BG_COLOR: #2050E0; - -$TOP_BAR_BG_COLOR: #DD00DD; - -$TOP_BAR_BORDER_COLOR: none; -$TOP_BAR_BORDER_WIDTH: 0; -$TOP_BAR_BORDER_STYLE: none; -$TOP_BAR_BORDER_RADIUS: 0; -$TOP_BAR_FG_COLOR: $BODY_FG_COLOR; -$TOP_BAR_BG_COLOR: $BODY_BG_COLOR; - -$VOTE_METER_FG_COLOR: #000000; - +@import "variables/defaults"; +@import "variables/admin"; @import "mushroom_observer"; diff --git a/app/assets/stylesheets/Agaricus.scss b/app/assets/stylesheets/Agaricus.scss index 8cc478c8e5..64744c50e7 100644 --- a/app/assets/stylesheets/Agaricus.scss +++ b/app/assets/stylesheets/Agaricus.scss @@ -1,83 +1,3 @@ -@import "defaults"; - -$augustus_cap: #ECCF95; -$brasiliensis_gills_1: #BF6262; // #A06463 -$brasiliensis_gills_2: #743931; -$campestris_cap: #F6F0F2; -$cupreobrunneus_gills: #3B2821; -$lilaceps_stain: #B4725F; -$semotus_cap: #BC9D89; -$xanthodermus_stain: #D4A833; -$polyozellus_light: #a5bffa; -$polyozellus_dark: #5167b2; - -$BUTTON_FG_COLOR: $cupreobrunneus_gills; - -$BODY_FG_COLOR: $cupreobrunneus_gills; -$BODY_BG_COLOR: $campestris_cap; - -$LINK_FG_COLOR: $brasiliensis_gills_1; -$LINK_VISITED_FG_COLOR: $cupreobrunneus_gills; -$LINK_HOVER_FG_COLOR: $brasiliensis_gills_2; -$LINK_HOVER_BG_COLOR: $campestris_cap; - -$LOGO_BORDER_COLOR: $cupreobrunneus_gills; -$LOGO_FG_COLOR: $cupreobrunneus_gills; -$LOGO_BG_COLOR: $semotus_cap; -$LOGO_HOVER_FG_COLOR: $brasiliensis_gills_2; -$LOGO_HOVER_BG_COLOR: $campestris_cap; - -$LEFT_BAR_BORDER_COLOR: $augustus_cap; -$LEFT_BAR_HEADER_FG_COLOR: $cupreobrunneus_gills; -$LEFT_BAR_HEADER_BG_COLOR: $augustus_cap; -$LEFT_BAR_FG_COLOR: $brasiliensis_gills_1; -$LEFT_BAR_BG_COLOR: $augustus_cap; -$LEFT_BAR_HOVER_FG_COLOR: $brasiliensis_gills_2; -$LEFT_BAR_HOVER_BG_COLOR: $campestris_cap; - -$TOP_BAR_FG_COLOR: $cupreobrunneus_gills; -$TOP_BAR_BG_COLOR: $campestris_cap; -$TOP_BAR_LINK_FG_COLOR: $brasiliensis_gills_1; -$TOP_BAR_LINK_HOVER_FG_COLOR: $brasiliensis_gills_2; -$TOP_BAR_LINK_HOVER_BG_COLOR: $campestris_cap; - -$LIST_BORDER_COLOR: transparent; -//$LIST_BORDER_COLOR: #DDDDDD; -$LIST_HEADER_FG_COLOR: #777777; -$LIST_HEADER_BG_COLOR: #EEEEEE; -$LIST_FG_COLOR: $cupreobrunneus_gills; -$LIST_BG_COLOR: mix($campestris_cap, white, 50%); - -$TOOLTIP_FG_COLOR: $campestris_cap; -$TOOLTIP_BG_COLOR: $cupreobrunneus_gills; - -$PAGER_FG_COLOR: $cupreobrunneus_gills; -$PAGER_HOVER_FG_COLOR: $brasiliensis_gills_2; -$PAGER_HOVER_BG_COLOR: $campestris_cap; -$PAGER_ACTIVE_FG_COLOR: $campestris_cap; -$PAGER_ACTIVE_BG_COLOR: $brasiliensis_gills_2; - -$MENU_BORDER_COLOR: $brasiliensis_gills_2; -$MENU_FG_COLOR: black; -$MENU_BG_COLOR: white; -$MENU_HOT_FG_COLOR: black; -$MENU_HOT_BG_COLOR: $xanthodermus_stain; -$MENU_WARM_FG_COLOR: black; -$MENU_WARM_BG_COLOR: $lilaceps_stain; - -$INFO_BG_COLOR: $polyozellus_light; -$INFO_BORDER_COLOR: $polyozellus_dark; -$INFO_FG_COLOR: $BODY_FG_COLOR; -$SUCCESS_BG_COLOR: #E0FFE0; -$SUCCESS_BORDER_COLOR: #70C070; -$SUCCESS_FG_COLOR: $BODY_FG_COLOR; -$WARNING_BG_COLOR: #FFF8E0; -$WARNING_BORDER_COLOR: #F8CC70; -$WARNING_FG_COLOR: $BODY_FG_COLOR; -$DANGER_BG_COLOR: #FFE0E0; -$DANGER_BORDER_COLOR: #F07070; -$DANGER_FG_COLOR: $BODY_FG_COLOR; - -$WELL_FG_COLOR: lighten($cupreobrunneus_gills, 25%); - +@import "variables/defaults"; +@import "variables/agaricus"; @import "mushroom_observer"; diff --git a/app/assets/stylesheets/Amanita.scss b/app/assets/stylesheets/Amanita.scss index 199d8a63e1..106193d6dc 100644 --- a/app/assets/stylesheets/Amanita.scss +++ b/app/assets/stylesheets/Amanita.scss @@ -1,106 +1,3 @@ -@import "defaults"; - -$phalloides_foreground: #e6edd5; -$phalloides_light_cap: #dfe4bc; -$phalloides_middle_cap: #beb977; -$phalloides_dark_cap: #787133; -$calyptroderma_spring_background: #ebcc79; -$calyptroderma_spring_foreground: #f9f2e0; -$calyptroderma_fall_dark_cap: #954c23; -$calyptroderma_volva: #ebe4de; -$calyptroderma_light_cap: #f5bd5e; -$calyptroderma_middle_cap: #c18346; -$muscaria_background: #cc2616; -$muscaria_foreground: #fff8c6; -$velosa_background: #dd9d5f; -$velosa_light_veil: #f9e8d3; // faebd4 -$velosa_dark_veil: #f4d5a6; -$novinupta_background: #d1afa5; -$pachycolea_background: #383138; -$pachycolea_foreground: #bfc0bb; -$pachycolea_light_stipe: #aa9a83; -$pachycolea_dark_brown: #60412d; -$polyozellus_light: #a5bffa; -$polyozellus_dark: #5167b2; - -$BUTTON_FG_COLOR: $pachycolea_foreground; -$BUTTON_BG_COLOR: $pachycolea_background; -$BUTTON_ACTIVE_FG_COLOR: $muscaria_background; - -$BODY_FG_COLOR: $pachycolea_foreground; -$BODY_BG_COLOR: $pachycolea_background; - -$LINK_FG_COLOR: $pachycolea_light_stipe; -$LINK_VISITED_FG_COLOR: $muscaria_foreground; -$LINK_HOVER_FG_COLOR: $pachycolea_light_stipe; -$LINK_HOVER_BG_COLOR: $muscaria_background; - -$LOGO_BORDER_COLOR: $velosa_light_veil; -$LOGO_FG_COLOR: $muscaria_foreground; -$LOGO_BG_COLOR: $muscaria_background; -$LOGO_HOVER_FG_COLOR: $muscaria_foreground; -$LOGO_HOVER_BG_COLOR: $muscaria_background; - -$LEFT_BAR_BORDER_COLOR: $velosa_background; -$LEFT_BAR_HEADER_FG_COLOR: $muscaria_background; -$LEFT_BAR_HEADER_BG_COLOR: $velosa_background; -$LEFT_BAR_FG_COLOR: $velosa_light_veil; -$LEFT_BAR_BG_COLOR: $velosa_background; -$LEFT_BAR_HOVER_FG_COLOR: $velosa_light_veil; -$LEFT_BAR_HOVER_BG_COLOR: $muscaria_background; - -$TOP_BAR_FG_COLOR: $pachycolea_foreground; -$TOP_BAR_BG_COLOR: $pachycolea_background; -$TOP_BAR_LINK_FG_COLOR: $pachycolea_light_stipe; -$TOP_BAR_LINK_HOVER_FG_COLOR: $pachycolea_light_stipe; -$TOP_BAR_LINK_HOVER_BG_COLOR: $muscaria_background; - -$LIST_BORDER_COLOR: transparent; -$LIST_HEADER_FG_COLOR: #777777; -$LIST_HEADER_BG_COLOR: #EEEEEE; -$LIST_FG_COLOR: $pachycolea_foreground; -$LIST_BG_COLOR: mix($pachycolea_background, black, 80%); -$LIST_EVEN_BG_COLOR: $LIST_BG_COLOR; -$LIST_ODD_BG_COLOR: mix($LIST_EVEN_BG_COLOR, black, 25%); - -$TOOLTIP_FG_COLOR: $pachycolea_background; -$TOOLTIP_BG_COLOR: $pachycolea_foreground; - -$VOTE_METER_FG_COLOR: $pachycolea_foreground; -$VOTE_METER_BG_COLOR: $pachycolea_background; - -$PROGRESS_BG_COLOR: $pachycolea_background; -$PROGRESS_FG_COLOR: $pachycolea_foreground; -$PROGRESS_BAR_COLOR: $phalloides_dark_cap; - -$PAGER_FG_COLOR: $pachycolea_foreground; -$PAGER_HOVER_FG_COLOR: $pachycolea_foreground; -$PAGER_HOVER_BG_COLOR: $muscaria_background; -$PAGER_ACTIVE_FG_COLOR: $pachycolea_background; -$PAGER_ACTIVE_BG_COLOR: $pachycolea_foreground; - -$MENU_BORDER_COLOR: $pachycolea_background; -$MENU_FG_COLOR: black; -$MENU_BG_COLOR: white; -$MENU_HOT_FG_COLOR: black; -$MENU_HOT_BG_COLOR: $muscaria_background; -$MENU_WARM_FG_COLOR: black; -$MENU_WARM_BG_COLOR: $velosa_background; - -$INFO_BG_COLOR: $polyozellus_dark; -$INFO_BORDER_COLOR: $polyozellus_light; -$INFO_FG_COLOR: $pachycolea_foreground; -$SUCCESS_BG_COLOR: #E0FFE0; -$SUCCESS_BORDER_COLOR: #70C070; -$SUCCESS_FG_COLOR: black; -$WARNING_BG_COLOR: #FFF8E0; -$WARNING_BORDER_COLOR: #F8CC70; -$WARNING_FG_COLOR: black; -$DANGER_BG_COLOR: #FFE0E0; -$DANGER_BORDER_COLOR: #F07070; -$DANGER_FG_COLOR: black; - -$WELL_BG_COLOR: rgba($pachycolea_light_stipe, 0.45); -$WELL_FG_COLOR: $pachycolea_foreground; - +@import "variables/defaults"; +@import "variables/amanita"; @import "mushroom_observer"; diff --git a/app/assets/stylesheets/BlackOnWhite.scss b/app/assets/stylesheets/BlackOnWhite.scss index 2809a5de38..0c29aa8430 100644 --- a/app/assets/stylesheets/BlackOnWhite.scss +++ b/app/assets/stylesheets/BlackOnWhite.scss @@ -1,12 +1,5 @@ // This theme is newer than the genus-color themes, // and does not use the "old_theme" defaults. -@import "defaults"; - -$LOGO_BORDER_COLOR: #DDDDDD; -$LEFT_BAR_BORDER_COLOR: #DDDDDD; -$TOP_BAR_BORDER_COLOR: #D9D9D9; -$LIST_BORDER_COLOR: #DDDDDD; -$BUTTON_HOVER_BORDER_COLOR: #CCCCCC; -$BUTTON_BG_COLOR: #CCCCCC; - +@import "variables/defaults"; +@import "variables/black_on_white"; @import "mushroom_observer"; diff --git a/app/assets/stylesheets/Cantharellaceae.scss b/app/assets/stylesheets/Cantharellaceae.scss index 22901b7443..5e8dac3a61 100644 --- a/app/assets/stylesheets/Cantharellaceae.scss +++ b/app/assets/stylesheets/Cantharellaceae.scss @@ -1,100 +1,4 @@ -@import "defaults"; - -$californicus_cap: #f6ae4a; // image 557 -$californicus_stipe: #fae8b8; -$cinnabarinus_dark_cap: #c12900; // image 551 -$cinnabarinus_light_cap: #ff6524; -$cinnabarinus_dark_stem: #6d1900; -$tubaeformis_dark_cap: #603b29; // image 462 -$tubaeformis_light_cap: #925c20; -$tubaeformis_hymenium: #c2914c; -$tubaeformis_bright_stipe: #ffb230; -$tubaeformis_dark_stipe: #4b2e0c; -$tubaeformis_light_stipe: #e5bb67; -$cornucopioides_dark_hymenium: #13120d; // image 465 #10110b -$cornucopioides_light_hymenium: #9b9690; -$cornucopioides_dark_cap: #4f4337; -$cornucopioides_light_cap: #826c57; -$cornucopioides_bright_margin: #e6c987; -$polyozellus_light: #a5bffa; -$polyozellus_dark: #5167b2; - -$BUTTON_FG_COLOR: $cornucopioides_dark_hymenium; -$BUTTON_ACTIVE_BG_COLOR: $californicus_cap; - -$BODY_FG_COLOR: $cornucopioides_dark_hymenium; -$BODY_BG_COLOR: $californicus_stipe; - -$LINK_FG_COLOR: $cinnabarinus_light_cap; -$LINK_VISITED_FG_COLOR: $cinnabarinus_dark_cap; -$LINK_HOVER_FG_COLOR: $cinnabarinus_light_cap; -$LINK_HOVER_BG_COLOR: $californicus_cap; - -$LOGO_BORDER_COLOR: $cornucopioides_dark_hymenium; -$LOGO_FG_COLOR: $cornucopioides_dark_hymenium; -$LOGO_BG_COLOR: $californicus_cap; -$LOGO_HOVER_FG_COLOR: $cornucopioides_dark_hymenium; -$LOGO_HOVER_BG_COLOR: $californicus_stipe; - -$LEFT_BAR_BORDER_COLOR: $californicus_cap; -$LEFT_BAR_HEADER_FG_COLOR: $cornucopioides_dark_hymenium; -$LEFT_BAR_HEADER_BG_COLOR: $californicus_cap; -$LEFT_BAR_FG_COLOR: $cinnabarinus_dark_cap; -$LEFT_BAR_BG_COLOR: $californicus_cap; -$LEFT_BAR_HOVER_FG_COLOR: $cinnabarinus_dark_cap; -$LEFT_BAR_HOVER_BG_COLOR: $californicus_stipe; - -$TOP_BAR_FG_COLOR: $cornucopioides_dark_hymenium; -$TOP_BAR_BG_COLOR: $californicus_stipe; -$TOP_BAR_LINK_FG_COLOR: $cinnabarinus_light_cap; -$TOP_BAR_LINK_HOVER_FG_COLOR: $cinnabarinus_light_cap; -$TOP_BAR_LINK_HOVER_BG_COLOR: $californicus_cap; - -//$LIST_BORDER_COLOR: #DDDDDD; -$LIST_BORDER_COLOR: transparent; -$LIST_HEADER_FG_COLOR: #777777; -$LIST_HEADER_BG_COLOR: #EEEEEE; -$LIST_FG_COLOR: $cornucopioides_dark_hymenium; -$LIST_BG_COLOR: mix($californicus_stipe, white, 50%); - -$TOOLTIP_FG_COLOR: $californicus_stipe; -$TOOLTIP_BG_COLOR: $cornucopioides_dark_hymenium; - -$VOTE_METER_FG_COLOR: $cornucopioides_dark_hymenium; -$VOTE_METER_BG_COLOR: $californicus_cap; - -$PROGRESS_BG_COLOR: $californicus_stipe; -$PROGRESS_FG_COLOR: $cornucopioides_dark_hymenium; -$PROGRESS_BAR_COLOR: $cinnabarinus_light_cap; - -$PAGER_FG_COLOR: $cornucopioides_dark_hymenium; -$PAGER_HOVER_FG_COLOR: $cornucopioides_dark_hymenium; -$PAGER_HOVER_BG_COLOR: $californicus_cap; -$PAGER_ACTIVE_FG_COLOR: $californicus_stipe; -$PAGER_ACTIVE_BG_COLOR: $cornucopioides_dark_hymenium; - -$MENU_BORDER_COLOR: $cornucopioides_dark_hymenium; -$MENU_FG_COLOR: black; -$MENU_BG_COLOR: white; -$MENU_HOT_FG_COLOR: black; -$MENU_HOT_BG_COLOR: $cinnabarinus_light_cap; -$MENU_WARM_FG_COLOR: black; -$MENU_WARM_BG_COLOR: $californicus_cap; - -$INFO_BG_COLOR: $polyozellus_light; -$INFO_BORDER_COLOR: $polyozellus_dark; -$INFO_FG_COLOR: $BODY_FG_COLOR; -$SUCCESS_BG_COLOR: #E0FFE0; -$SUCCESS_BORDER_COLOR: #70C070; -$SUCCESS_FG_COLOR: $BODY_FG_COLOR; -$WARNING_BG_COLOR: #FFF8E0; -$WARNING_BORDER_COLOR: #F8CC70; -$WARNING_FG_COLOR: $BODY_FG_COLOR; -$DANGER_BG_COLOR: #FFE0E0; -$DANGER_BORDER_COLOR: #F07070; -$DANGER_FG_COLOR: $BODY_FG_COLOR; - -$WELL_FG_COLOR: lighten($cornucopioides_dark_hymenium, 25%); - +@import "variables/defaults"; +@import "variables/cantharellaceae"; @import "mushroom_observer"; diff --git a/app/assets/stylesheets/Hygrocybe.scss b/app/assets/stylesheets/Hygrocybe.scss index 7cbf4e55b7..9b27a830f2 100644 --- a/app/assets/stylesheets/Hygrocybe.scss +++ b/app/assets/stylesheets/Hygrocybe.scss @@ -1,92 +1,3 @@ -@import "defaults"; - -$conica_stain: #34342c; // #37372f -$conica_cap_red: #a31404; -$conica_cap_orange: #dd6226; -$conica_cap_yellow: #ffbf01; -$conica_gill_margin: #ffda84; -$miniata_gill_margin: #ebc97f; -$miniata_cap_red: #a10200; -$miniata_cap_orange: #c83e00; -$miniata_cap_yellow: #f19c05; -$psittacina_cap_green: #405536; -$psittacina_cap_orange: #eb9020; -$psittacina_cap_middle: #a38a3f; -$psittacina_gill_color: #f2d686; -$punicea_cap_dark: #bb2900; -$punicea_cap_light: #cc382a; -$punicea_dark_stipe: #e7bc3c; -$punicea_light_stipe: #e9e3af; -$polyozellus_light: #a5bffa; -$polyozellus_dark: #5167b2; - -$BUTTON_FG_COLOR: $conica_stain; -$BUTTON_ACTIVE_FG_COLOR: $conica_stain; -$BUTTON_ACTIVE_BG_COLOR: $miniata_cap_yellow; - -$BODY_FG_COLOR: $conica_stain; -$BODY_BG_COLOR: $punicea_light_stipe; - -$LINK_FG_COLOR: $psittacina_cap_green; -$LINK_VISITED_FG_COLOR: $psittacina_cap_orange; -$LINK_HOVER_FG_COLOR: $psittacina_cap_green; -$LINK_HOVER_BG_COLOR: $psittacina_gill_color; - -$LOGO_BORDER_COLOR: $conica_stain; -$LOGO_FG_COLOR: $conica_stain; -$LOGO_BG_COLOR: $punicea_cap_light; -$LOGO_HOVER_FG_COLOR: $conica_stain; -$LOGO_HOVER_BG_COLOR: $punicea_cap_light; - -$LEFT_BAR_BORDER_COLOR: $miniata_cap_yellow; -$LEFT_BAR_HEADER_FG_COLOR: $psittacina_cap_green; -$LEFT_BAR_HEADER_BG_COLOR: $miniata_cap_yellow; -$LEFT_BAR_FG_COLOR: $miniata_cap_red; -$LEFT_BAR_BG_COLOR: $miniata_cap_yellow; -$LEFT_BAR_HOVER_FG_COLOR: $miniata_cap_red; -$LEFT_BAR_HOVER_BG_COLOR: $psittacina_gill_color; - -$TOP_BAR_FG_COLOR: $conica_stain; -$TOP_BAR_BG_COLOR: $punicea_light_stipe; -$TOP_BAR_LINK_FG_COLOR: $psittacina_cap_green; -$TOP_BAR_LINK_HOVER_FG_COLOR: $psittacina_cap_green; -$TOP_BAR_LINK_HOVER_BG_COLOR: $psittacina_gill_color; - -$LIST_BORDER_COLOR: transparent; -$LIST_HEADER_FG_COLOR: #777777; -$LIST_HEADER_BG_COLOR: #EEEEEE; -$LIST_FG_COLOR: $conica_stain; -$LIST_BG_COLOR: mix($punicea_light_stipe, white, 50%); - -$TOOLTIP_BG_COLOR: $punicea_cap_light; - -$PAGER_FG_COLOR: $punicea_cap_dark; -$PAGER_HOVER_FG_COLOR: $punicea_light_stipe; -$PAGER_HOVER_BG_COLOR: $punicea_cap_light; -$PAGER_ACTIVE_FG_COLOR: $punicea_light_stipe; -$PAGER_ACTIVE_BG_COLOR: $punicea_cap_dark; - -$MENU_BORDER_COLOR: $miniata_gill_margin; -$MENU_FG_COLOR: black; -$MENU_BG_COLOR: white; -$MENU_HOT_FG_COLOR: black; -$MENU_HOT_BG_COLOR: $psittacina_cap_middle; -$MENU_WARM_FG_COLOR: black; -$MENU_WARM_BG_COLOR: $psittacina_cap_middle; - -$INFO_BG_COLOR: $polyozellus_light; -$INFO_BORDER_COLOR: $polyozellus_dark; -$INFO_FG_COLOR: $BODY_FG_COLOR; -$SUCCESS_BG_COLOR: #E0FFE0; -$SUCCESS_BORDER_COLOR: #70C070; -$SUCCESS_FG_COLOR: $BODY_FG_COLOR; -$WARNING_BG_COLOR: #FFF8E0; -$WARNING_BORDER_COLOR: #F8CC70; -$WARNING_FG_COLOR: $BODY_FG_COLOR; -$DANGER_BG_COLOR: #FFE0E0; -$DANGER_BORDER_COLOR: #F07070; -$DANGER_FG_COLOR: $BODY_FG_COLOR; - -$WELL_FG_COLOR: lighten($conica_stain, 25%); - +@import "variables/defaults"; +@import "variables/hygrocybe"; @import "mushroom_observer"; diff --git a/app/assets/stylesheets/Sudo.scss b/app/assets/stylesheets/Sudo.scss index 2687d767b8..73e048e5a3 100644 --- a/app/assets/stylesheets/Sudo.scss +++ b/app/assets/stylesheets/Sudo.scss @@ -1,32 +1,3 @@ -@import "defaults"; - -$BODY_BG_COLOR: #DE7201; // #DD7700 - -$LOGO_BORDER_COLOR: black; -$LOGO_BORDER_WIDTH: 2px; // vs 1px in default -$LOGO_FG_COLOR: black; -$LOGO_BG_COLOR: #66FF44; -$LOGO_HOVER_FG_COLOR: #DD7700; -$LOGO_HOVER_BG_COLOR: #66FF44; - -$LEFT_BAR_BORDER_COLOR: gray; -$LEFT_BAR_BORDER_RADIUS: 0px; -$LEFT_BAR_HEADER_FG_COLOR: black; -$LEFT_BAR_HEADER_BG_COLOR: #66FF44; -$LEFT_BAR_FG_COLOR: #DD7700; -$LEFT_BAR_BG_COLOR: #66FF44; -$LEFT_BAR_HOVER_FG_COLOR: #66FF44; -$LEFT_BAR_HOVER_BG_COLOR: #DD7700; - -$TOP_BAR_BG_COLOR: #DD7700; - -$TOP_BAR_BORDER_COLOR: none; -$TOP_BAR_BORDER_WIDTH: 0; -$TOP_BAR_BORDER_STYLE: none; -$TOP_BAR_BORDER_RADIUS: 0; -$TOP_BAR_FG_COLOR: $BODY_FG_COLOR; -$TOP_BAR_BG_COLOR: $BODY_BG_COLOR; - -$VOTE_METER_FG_COLOR: #000000; - +@import "variables/defaults"; +@import "variables/sudo"; @import "mushroom_observer"; diff --git a/app/assets/stylesheets/variables/_admin.scss b/app/assets/stylesheets/variables/_admin.scss new file mode 100644 index 0000000000..2902974117 --- /dev/null +++ b/app/assets/stylesheets/variables/_admin.scss @@ -0,0 +1,28 @@ +$BODY_BG_COLOR: #DD00DD; + +$LOGO_BORDER_COLOR: black; +$LOGO_BORDER_WIDTH: 2px; // vs 1px in default +$LOGO_FG_COLOR: black; +$LOGO_BG_COLOR: yellow; +$LOGO_HOVER_FG_COLOR: purple; +$LOGO_HOVER_BG_COLOR: yellow; + +$LEFT_BAR_BORDER_COLOR: #535354; // gray +$LEFT_BAR_BORDER_RADIUS: 0px; +$LEFT_BAR_HEADER_FG_COLOR: black; +$LEFT_BAR_HEADER_BG_COLOR: yellow; +$LEFT_BAR_FG_COLOR: #2050E0; +$LEFT_BAR_BG_COLOR: yellow; +$LEFT_BAR_HOVER_FG_COLOR: yellow; +$LEFT_BAR_HOVER_BG_COLOR: #2050E0; + +$TOP_BAR_BG_COLOR: #DD00DD; + +$TOP_BAR_BORDER_COLOR: none; +$TOP_BAR_BORDER_WIDTH: 0; +$TOP_BAR_BORDER_STYLE: none; +$TOP_BAR_BORDER_RADIUS: 0; +$TOP_BAR_FG_COLOR: $BODY_FG_COLOR; +$TOP_BAR_BG_COLOR: $BODY_BG_COLOR; + +$VOTE_METER_FG_COLOR: #000000; diff --git a/app/assets/stylesheets/variables/_agaricus.scss b/app/assets/stylesheets/variables/_agaricus.scss new file mode 100644 index 0000000000..408b251067 --- /dev/null +++ b/app/assets/stylesheets/variables/_agaricus.scss @@ -0,0 +1,79 @@ +$augustus_cap: #ECCF95; +$brasiliensis_gills_1: #A06463; +$brasiliensis_gills_2: #743931; +$campestris_cap: #F6F0F2; +$cupreobrunneus_gills: #3B2821; +$lilaceps_stain: #B4725F; +$semotus_cap: #BC9D89; +$xanthodermus_stain: #D4A833; +$polyozellus_light: #a5bffa; +$polyozellus_dark: #5167b2; + +$BUTTON_FG_COLOR: $cupreobrunneus_gills; + +$BODY_FG_COLOR: $cupreobrunneus_gills; +$BODY_BG_COLOR: $campestris_cap; + +$LINK_FG_COLOR: $brasiliensis_gills_1; +$LINK_VISITED_FG_COLOR: $cupreobrunneus_gills; +$LINK_HOVER_FG_COLOR: $brasiliensis_gills_2; +$LINK_HOVER_BG_COLOR: $campestris_cap; + +$LOGO_BORDER_COLOR: $cupreobrunneus_gills; +$LOGO_FG_COLOR: $cupreobrunneus_gills; +$LOGO_BG_COLOR: $semotus_cap; +$LOGO_HOVER_FG_COLOR: $brasiliensis_gills_2; +$LOGO_HOVER_BG_COLOR: $campestris_cap; + +$LEFT_BAR_BORDER_COLOR: $augustus_cap; +$LEFT_BAR_HEADER_FG_COLOR: $cupreobrunneus_gills; +$LEFT_BAR_HEADER_BG_COLOR: $augustus_cap; +$LEFT_BAR_FG_COLOR: $brasiliensis_gills_1; +$LEFT_BAR_BG_COLOR: $augustus_cap; +$LEFT_BAR_HOVER_FG_COLOR: $brasiliensis_gills_2; +$LEFT_BAR_HOVER_BG_COLOR: $campestris_cap; + +$TOP_BAR_FG_COLOR: $cupreobrunneus_gills; +$TOP_BAR_BG_COLOR: $campestris_cap; +$TOP_BAR_LINK_FG_COLOR: $brasiliensis_gills_1; +$TOP_BAR_LINK_HOVER_FG_COLOR: $brasiliensis_gills_2; +$TOP_BAR_LINK_HOVER_BG_COLOR: $campestris_cap; + +$LIST_BORDER_COLOR: transparent; +//$LIST_BORDER_COLOR: #DDDDDD; +$LIST_HEADER_FG_COLOR: #777777; +$LIST_HEADER_BG_COLOR: #EEEEEE; +$LIST_FG_COLOR: $cupreobrunneus_gills; +$LIST_BG_COLOR: mix($campestris_cap, white, 50%); + +$TOOLTIP_FG_COLOR: $campestris_cap; +$TOOLTIP_BG_COLOR: $cupreobrunneus_gills; + +$PAGER_FG_COLOR: $cupreobrunneus_gills; +$PAGER_HOVER_FG_COLOR: $brasiliensis_gills_2; +$PAGER_HOVER_BG_COLOR: $campestris_cap; +$PAGER_ACTIVE_FG_COLOR: $campestris_cap; +$PAGER_ACTIVE_BG_COLOR: $brasiliensis_gills_2; + +$MENU_BORDER_COLOR: $brasiliensis_gills_2; +$MENU_FG_COLOR: black; +$MENU_BG_COLOR: white; +$MENU_HOT_FG_COLOR: black; +$MENU_HOT_BG_COLOR: $xanthodermus_stain; +$MENU_WARM_FG_COLOR: black; +$MENU_WARM_BG_COLOR: $lilaceps_stain; + +$INFO_BG_COLOR: $polyozellus_light; +$INFO_BORDER_COLOR: $polyozellus_dark; +$INFO_FG_COLOR: $BODY_FG_COLOR; +$SUCCESS_BG_COLOR: #E0FFE0; +$SUCCESS_BORDER_COLOR: #70C070; +$SUCCESS_FG_COLOR: $BODY_FG_COLOR; +$WARNING_BG_COLOR: #FFF8E0; +$WARNING_BORDER_COLOR: #F8CC70; +$WARNING_FG_COLOR: $BODY_FG_COLOR; +$DANGER_BG_COLOR: #FFE0E0; +$DANGER_BORDER_COLOR: #F07070; +$DANGER_FG_COLOR: $BODY_FG_COLOR; + +$WELL_FG_COLOR: lighten($cupreobrunneus_gills, 30%); diff --git a/app/assets/stylesheets/variables/_amanita.scss b/app/assets/stylesheets/variables/_amanita.scss new file mode 100644 index 0000000000..bf013c6685 --- /dev/null +++ b/app/assets/stylesheets/variables/_amanita.scss @@ -0,0 +1,102 @@ +$phalloides_foreground: #e6edd5; +$phalloides_light_cap: #dfe4bc; +$phalloides_middle_cap: #beb977; +$phalloides_dark_cap: #787133; +$calyptroderma_spring_background: #ebcc79; +$calyptroderma_spring_foreground: #f9f2e0; +$calyptroderma_fall_dark_cap: #954c23; +$calyptroderma_volva: #ebe4de; +$calyptroderma_light_cap: #f5bd5e; +$calyptroderma_middle_cap: #c18346; +$muscaria_background: #cc2616; +$muscaria_foreground: #fff8c6; +$velosa_background: #dd9d5f; +$velosa_light_veil: #faebd4; +$velosa_dark_veil: #f4d5a6; +$novinupta_background: #d1afa5; +$pachycolea_background: #383138; +$pachycolea_foreground: #bfc0bb; +$pachycolea_light_stipe: #aa9a83; +$pachycolea_dark_brown: #60412d; +$polyozellus_light: #a5bffa; +$polyozellus_dark: #5167b2; + +$BUTTON_FG_COLOR: $pachycolea_foreground; +$BUTTON_BG_COLOR: $pachycolea_background; +$BUTTON_ACTIVE_FG_COLOR: $muscaria_background; + +$BODY_FG_COLOR: $pachycolea_foreground; +$BODY_BG_COLOR: $pachycolea_background; + +$LINK_FG_COLOR: $pachycolea_light_stipe; +$LINK_VISITED_FG_COLOR: $muscaria_foreground; +$LINK_HOVER_FG_COLOR: $pachycolea_light_stipe; +$LINK_HOVER_BG_COLOR: $muscaria_background; + +$LOGO_BORDER_COLOR: $velosa_light_veil; +$LOGO_FG_COLOR: $muscaria_foreground; +$LOGO_BG_COLOR: $muscaria_background; +$LOGO_HOVER_FG_COLOR: $muscaria_foreground; +$LOGO_HOVER_BG_COLOR: $muscaria_background; + +$LEFT_BAR_BORDER_COLOR: $velosa_background; +$LEFT_BAR_HEADER_FG_COLOR: $muscaria_background; +$LEFT_BAR_HEADER_BG_COLOR: $velosa_background; +$LEFT_BAR_FG_COLOR: $velosa_light_veil; +$LEFT_BAR_BG_COLOR: $velosa_background; +$LEFT_BAR_HOVER_FG_COLOR: $velosa_light_veil; +$LEFT_BAR_HOVER_BG_COLOR: $muscaria_background; + +$TOP_BAR_FG_COLOR: $pachycolea_foreground; +$TOP_BAR_BG_COLOR: $pachycolea_background; +$TOP_BAR_LINK_FG_COLOR: $pachycolea_light_stipe; +$TOP_BAR_LINK_HOVER_FG_COLOR: $pachycolea_light_stipe; +$TOP_BAR_LINK_HOVER_BG_COLOR: $muscaria_background; + +$LIST_BORDER_COLOR: transparent; +$LIST_HEADER_FG_COLOR: #777777; +$LIST_HEADER_BG_COLOR: #EEEEEE; +$LIST_FG_COLOR: $pachycolea_foreground; +$LIST_BG_COLOR: mix($pachycolea_background, black, 80%); +$LIST_EVEN_BG_COLOR: $LIST_BG_COLOR; +$LIST_ODD_BG_COLOR: mix($LIST_EVEN_BG_COLOR, black, 25%); + +$TOOLTIP_FG_COLOR: $pachycolea_background; +$TOOLTIP_BG_COLOR: $pachycolea_foreground; + +$VOTE_METER_FG_COLOR: $pachycolea_foreground; +$VOTE_METER_BG_COLOR: $pachycolea_background; + +$PROGRESS_BG_COLOR: $pachycolea_background; +$PROGRESS_FG_COLOR: $pachycolea_foreground; +$PROGRESS_BAR_COLOR: $phalloides_dark_cap; + +$PAGER_FG_COLOR: $pachycolea_foreground; +$PAGER_HOVER_FG_COLOR: $pachycolea_foreground; +$PAGER_HOVER_BG_COLOR: $muscaria_background; +$PAGER_ACTIVE_FG_COLOR: $pachycolea_background; +$PAGER_ACTIVE_BG_COLOR: $pachycolea_foreground; + +$MENU_BORDER_COLOR: $pachycolea_background; +$MENU_FG_COLOR: black; +$MENU_BG_COLOR: white; +$MENU_HOT_FG_COLOR: black; +$MENU_HOT_BG_COLOR: $muscaria_background; +$MENU_WARM_FG_COLOR: black; +$MENU_WARM_BG_COLOR: $velosa_background; + +$INFO_BG_COLOR: $polyozellus_dark; +$INFO_BORDER_COLOR: $polyozellus_light; +$INFO_FG_COLOR: $pachycolea_foreground; +$SUCCESS_BG_COLOR: #E0FFE0; +$SUCCESS_BORDER_COLOR: #70C070; +$SUCCESS_FG_COLOR: black; +$WARNING_BG_COLOR: #FFF8E0; +$WARNING_BORDER_COLOR: #F8CC70; +$WARNING_FG_COLOR: black; +$DANGER_BG_COLOR: #FFE0E0; +$DANGER_BORDER_COLOR: #F07070; +$DANGER_FG_COLOR: black; + +$WELL_BG_COLOR: rgba($pachycolea_light_stipe, 0.45); +$WELL_FG_COLOR: $pachycolea_foreground; diff --git a/app/assets/stylesheets/variables/_black_on_white.scss b/app/assets/stylesheets/variables/_black_on_white.scss new file mode 100644 index 0000000000..b7184e083a --- /dev/null +++ b/app/assets/stylesheets/variables/_black_on_white.scss @@ -0,0 +1,6 @@ +$LOGO_BORDER_COLOR: #DDDDDD; +$LEFT_BAR_BORDER_COLOR: #DDDDDD; +$TOP_BAR_BORDER_COLOR: #D9D9D9; +$LIST_BORDER_COLOR: #DDDDDD; +$BUTTON_HOVER_BORDER_COLOR: #CCCCCC; +$BUTTON_BG_COLOR: #CCCCCC; diff --git a/app/assets/stylesheets/variables/_cantharellaceae.scss b/app/assets/stylesheets/variables/_cantharellaceae.scss new file mode 100644 index 0000000000..95e6b34fff --- /dev/null +++ b/app/assets/stylesheets/variables/_cantharellaceae.scss @@ -0,0 +1,95 @@ +$californicus_cap: #f6ae4a; // image 557 +$californicus_stipe: #fae8b8; +$cinnabarinus_dark_cap: #c12900; // image 551 +$cinnabarinus_light_cap: #ff6524; +$cinnabarinus_dark_stem: #6d1900; +$tubaeformis_dark_cap: #603b29; // image 462 +$tubaeformis_light_cap: #925c20; +$tubaeformis_hymenium: #c2914c; +$tubaeformis_bright_stipe: #ffb230; +$tubaeformis_dark_stipe: #4b2e0c; +$tubaeformis_light_stipe: #e5bb67; +$cornucopioides_dark_hymenium: #10110b; // image 465 +$cornucopioides_light_hymenium: #9b9690; +$cornucopioides_dark_cap: #4f4337; +$cornucopioides_light_cap: #826c57; +$cornucopioides_bright_margin: #e6c987; +$polyozellus_light: #a5bffa; +$polyozellus_dark: #5167b2; + +$BUTTON_FG_COLOR: $cornucopioides_dark_hymenium; +$BUTTON_ACTIVE_BG_COLOR: $californicus_cap; + +$BODY_FG_COLOR: $cornucopioides_dark_hymenium; +$BODY_BG_COLOR: $californicus_stipe; + +$LINK_FG_COLOR: $cinnabarinus_light_cap; +$LINK_VISITED_FG_COLOR: $cinnabarinus_dark_cap; +$LINK_HOVER_FG_COLOR: $cinnabarinus_light_cap; +$LINK_HOVER_BG_COLOR: $californicus_cap; + +$LOGO_BORDER_COLOR: $cornucopioides_dark_hymenium; +$LOGO_FG_COLOR: $cornucopioides_dark_hymenium; +$LOGO_BG_COLOR: $californicus_cap; +$LOGO_HOVER_FG_COLOR: $cornucopioides_dark_hymenium; +$LOGO_HOVER_BG_COLOR: $californicus_stipe; + +$LEFT_BAR_BORDER_COLOR: $californicus_cap; +$LEFT_BAR_HEADER_FG_COLOR: $cornucopioides_dark_hymenium; +$LEFT_BAR_HEADER_BG_COLOR: $californicus_cap; +$LEFT_BAR_FG_COLOR: $cinnabarinus_dark_cap; +$LEFT_BAR_BG_COLOR: $californicus_cap; +$LEFT_BAR_HOVER_FG_COLOR: $cinnabarinus_dark_cap; +$LEFT_BAR_HOVER_BG_COLOR: $californicus_stipe; + +$TOP_BAR_FG_COLOR: $cornucopioides_dark_hymenium; +$TOP_BAR_BG_COLOR: $californicus_stipe; +$TOP_BAR_LINK_FG_COLOR: $cinnabarinus_light_cap; +$TOP_BAR_LINK_HOVER_FG_COLOR: $cinnabarinus_light_cap; +$TOP_BAR_LINK_HOVER_BG_COLOR: $californicus_cap; + +//$LIST_BORDER_COLOR: #DDDDDD; +$LIST_BORDER_COLOR: transparent; +$LIST_HEADER_FG_COLOR: #777777; +$LIST_HEADER_BG_COLOR: #EEEEEE; +$LIST_FG_COLOR: $cornucopioides_dark_hymenium; +$LIST_BG_COLOR: mix($californicus_stipe, white, 50%); + +$TOOLTIP_FG_COLOR: $californicus_stipe; +$TOOLTIP_BG_COLOR: $cornucopioides_dark_hymenium; + +$VOTE_METER_FG_COLOR: $cornucopioides_dark_hymenium; +$VOTE_METER_BG_COLOR: $californicus_cap; + +$PROGRESS_BG_COLOR: $californicus_stipe; +$PROGRESS_FG_COLOR: $cornucopioides_dark_hymenium; +$PROGRESS_BAR_COLOR: $cinnabarinus_light_cap; + +$PAGER_FG_COLOR: $cornucopioides_dark_hymenium; +$PAGER_HOVER_FG_COLOR: $cornucopioides_dark_hymenium; +$PAGER_HOVER_BG_COLOR: $californicus_cap; +$PAGER_ACTIVE_FG_COLOR: $californicus_stipe; +$PAGER_ACTIVE_BG_COLOR: $cornucopioides_dark_hymenium; + +$MENU_BORDER_COLOR: $cornucopioides_dark_hymenium; +$MENU_FG_COLOR: black; +$MENU_BG_COLOR: white; +$MENU_HOT_FG_COLOR: black; +$MENU_HOT_BG_COLOR: $cinnabarinus_light_cap; +$MENU_WARM_FG_COLOR: black; +$MENU_WARM_BG_COLOR: $californicus_cap; + +$INFO_BG_COLOR: $polyozellus_light; +$INFO_BORDER_COLOR: $polyozellus_dark; +$INFO_FG_COLOR: $BODY_FG_COLOR; +$SUCCESS_BG_COLOR: #E0FFE0; +$SUCCESS_BORDER_COLOR: #70C070; +$SUCCESS_FG_COLOR: $BODY_FG_COLOR; +$WARNING_BG_COLOR: #FFF8E0; +$WARNING_BORDER_COLOR: #F8CC70; +$WARNING_FG_COLOR: $BODY_FG_COLOR; +$DANGER_BG_COLOR: #FFE0E0; +$DANGER_BORDER_COLOR: #F07070; +$DANGER_FG_COLOR: $BODY_FG_COLOR; + +$WELL_FG_COLOR: lighten($cornucopioides_dark_hymenium, 25%); diff --git a/app/assets/stylesheets/defaults.scss b/app/assets/stylesheets/variables/_defaults.scss similarity index 100% rename from app/assets/stylesheets/defaults.scss rename to app/assets/stylesheets/variables/_defaults.scss diff --git a/app/assets/stylesheets/variables/_hygrocybe.scss b/app/assets/stylesheets/variables/_hygrocybe.scss new file mode 100644 index 0000000000..d6f21ce276 --- /dev/null +++ b/app/assets/stylesheets/variables/_hygrocybe.scss @@ -0,0 +1,88 @@ +$conica_stain: #37372f; +$conica_cap_red: #a31404; +$conica_cap_orange: #dd6226; +$conica_cap_yellow: #ffbf01; +$conica_gill_margin: #ffda84; +$miniata_gill_margin: #ebc97f; +$miniata_cap_red: #a10200; +$miniata_cap_orange: #c83e00; +$miniata_cap_yellow: #f19c05; +$psittacina_cap_green: #405536; +$psittacina_cap_orange: #eb9020; +$psittacina_cap_middle: #a38a3f; +$psittacina_gill_color: #f2d686; +$punicea_cap_dark: #bb2900; +$punicea_cap_light: #cc382a; +$punicea_dark_stipe: #e7bc3c; +$punicea_light_stipe: #e9e3af; +$polyozellus_light: #a5bffa; +$polyozellus_dark: #5167b2; + +$BUTTON_FG_COLOR: $conica_stain; +$BUTTON_ACTIVE_FG_COLOR: $conica_stain; +$BUTTON_ACTIVE_BG_COLOR: $miniata_cap_yellow; + +$BODY_FG_COLOR: $conica_stain; +$BODY_BG_COLOR: $punicea_light_stipe; + +$LINK_FG_COLOR: $psittacina_cap_green; +$LINK_VISITED_FG_COLOR: $psittacina_cap_orange; +$LINK_HOVER_FG_COLOR: $psittacina_cap_green; +$LINK_HOVER_BG_COLOR: $psittacina_gill_color; + +$LOGO_BORDER_COLOR: $conica_stain; +$LOGO_FG_COLOR: $conica_stain; +$LOGO_BG_COLOR: $punicea_cap_light; +$LOGO_HOVER_FG_COLOR: $conica_stain; +$LOGO_HOVER_BG_COLOR: $punicea_cap_light; + +$LEFT_BAR_BORDER_COLOR: $miniata_cap_yellow; +$LEFT_BAR_HEADER_FG_COLOR: $psittacina_cap_green; +$LEFT_BAR_HEADER_BG_COLOR: $miniata_cap_yellow; +$LEFT_BAR_FG_COLOR: $miniata_cap_red; +$LEFT_BAR_BG_COLOR: $miniata_cap_yellow; +$LEFT_BAR_HOVER_FG_COLOR: $miniata_cap_red; +$LEFT_BAR_HOVER_BG_COLOR: $psittacina_gill_color; + +$TOP_BAR_FG_COLOR: $conica_stain; +$TOP_BAR_BG_COLOR: $punicea_light_stipe; +$TOP_BAR_LINK_FG_COLOR: $psittacina_cap_green; +$TOP_BAR_LINK_HOVER_FG_COLOR: $psittacina_cap_green; +$TOP_BAR_LINK_HOVER_BG_COLOR: $psittacina_gill_color; + +$LIST_BORDER_COLOR: transparent; +$LIST_HEADER_FG_COLOR: #777777; +$LIST_HEADER_BG_COLOR: #EEEEEE; +$LIST_FG_COLOR: $conica_stain; +$LIST_BG_COLOR: mix($punicea_light_stipe, white, 50%); + +$TOOLTIP_BG_COLOR: $punicea_cap_light; + +$PAGER_FG_COLOR: $punicea_cap_dark; +$PAGER_HOVER_FG_COLOR: $punicea_light_stipe; +$PAGER_HOVER_BG_COLOR: $punicea_cap_light; +$PAGER_ACTIVE_FG_COLOR: $punicea_light_stipe; +$PAGER_ACTIVE_BG_COLOR: $punicea_cap_dark; + +$MENU_BORDER_COLOR: $miniata_gill_margin; +$MENU_FG_COLOR: black; +$MENU_BG_COLOR: white; +$MENU_HOT_FG_COLOR: black; +$MENU_HOT_BG_COLOR: $psittacina_cap_middle; +$MENU_WARM_FG_COLOR: black; +$MENU_WARM_BG_COLOR: $psittacina_cap_middle; + +$INFO_BG_COLOR: $polyozellus_light; +$INFO_BORDER_COLOR: $polyozellus_dark; +$INFO_FG_COLOR: $BODY_FG_COLOR; +$SUCCESS_BG_COLOR: #E0FFE0; +$SUCCESS_BORDER_COLOR: #70C070; +$SUCCESS_FG_COLOR: $BODY_FG_COLOR; +$WARNING_BG_COLOR: #FFF8E0; +$WARNING_BORDER_COLOR: #F8CC70; +$WARNING_FG_COLOR: $BODY_FG_COLOR; +$DANGER_BG_COLOR: #FFE0E0; +$DANGER_BORDER_COLOR: #F07070; +$DANGER_FG_COLOR: $BODY_FG_COLOR; + +$WELL_FG_COLOR: lighten($conica_stain, 30%); diff --git a/app/assets/stylesheets/variables/_sudo.scss b/app/assets/stylesheets/variables/_sudo.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/app/controllers/observations/locations_controller.rb b/app/controllers/observations/locations_controller.rb index b449df579a..37d62a1187 100644 --- a/app/controllers/observations/locations_controller.rb +++ b/app/controllers/observations/locations_controller.rb @@ -81,7 +81,7 @@ def locations_matching_where # Try for segments: split by comma, or by space if no commas places = @where.split(",") words = @where.split - return unless places.length > 1 || words.length > 1 + return matches unless places.length > 1 || words.length > 1 matches += Location.name_includes(places.first) # Try for specific segment matches if we have enough of them. diff --git a/app/helpers/namings_helper.rb b/app/helpers/namings_helper.rb index dafa4ebf7d..56c5fd0029 100644 --- a/app/helpers/namings_helper.rb +++ b/app/helpers/namings_helper.rb @@ -251,8 +251,7 @@ def your_vote_html(naming, vote) # N+1: should not be checking permission here # N+1: vote is naming.users_vote, so should be an instance of Vote. # NamingsController#index iteration over namings in table_row - # This could be a form with model: vote so it can has an id, sent in url - # rubocop:disable Metrics/MethodLength + # This may be a form_with(model: vote) so it gets an id, sent in url def naming_vote_form(naming, vote, context: "blank") vote_id = vote&.id method = vote_id ? :patch : :post @@ -262,25 +261,13 @@ def naming_vote_form(naming, vote, context: "blank") else Vote.confidence_menu end - localizations = { - lose_changes: :show_namings_lose_changes.l.tr("\n", " "), - saving: :show_namings_saving.l - }.to_json - form_with( - model: vote, - url: naming_vote_form_commit_url(naming, vote), method: method, - id: "naming_vote_form_#{naming.id}", - class: "naming-vote-form d-inline-block float-right float-sm-none", - data: { turbo: true, controller: "naming-vote", naming_id: naming.id, - localization: localizations } - ) do |fv| + form_with(**naming_vote_form_args(naming, vote, method)) do |fv| [ fv.select(:value, menu, {}, { class: "form-control w-100", id: "vote_value_#{naming.id}", data: { naming_vote_target: "select", - localization: localizations, action: "naming-vote#sendVote" } }), hidden_field_tag(:context, context), tag.noscript do @@ -291,10 +278,28 @@ def naming_vote_form(naming, vote, context: "blank") ].safe_join end end - # rubocop:enable Metrics/MethodLength private + def naming_vote_form_args(naming, vote, method) + args = { + url: naming_vote_form_commit_url(naming, vote), method: method, + id: "naming_vote_form_#{naming.id}", + class: "naming-vote-form d-inline-block float-right float-sm-none", + data: { turbo: true, controller: "naming-vote", naming_id: naming.id, + localization: naming_vote_form_localizations } + } + args = args.merge(model: vote) if vote + args + end + + def naming_vote_form_localizations + { + lose_changes: :show_namings_lose_changes.l.tr("\n", " "), + saving: :show_namings_saving.l + }.to_json + end + # form can commit to update or create def naming_vote_form_commit_url(naming, vote) if vote&.id diff --git a/app/models/inat_import.rb b/app/models/inat_import.rb index 96c2267473..f7ecddabe0 100644 --- a/app/models/inat_import.rb +++ b/app/models/inat_import.rb @@ -28,7 +28,8 @@ class InatImport < ApplicationRecord belongs_to :user - serialize :log, type: Array + serialize :log, type: Array, coder: YAML + def add_response_error(error) response_errors << "#{error.class.name}: #{error.message}\n" save diff --git a/app/models/naming.rb b/app/models/naming.rb index e64c5a881e..c15409cd8c 100644 --- a/app/models/naming.rb +++ b/app/models/naming.rb @@ -49,7 +49,7 @@ class Naming < AbstractModel belongs_to :user has_many :votes, dependent: :destroy - serialize :reasons + serialize :reasons, coder: YAML before_save :did_name_change? before_save :enforce_default_reasons diff --git a/app/models/observation.rb b/app/models/observation.rb index 19002eb088..1fb100b30f 100644 --- a/app/models/observation.rb +++ b/app/models/observation.rb @@ -1011,7 +1011,7 @@ def saved_change_to_place? # Notes are exported as shown, except that the intial "Notes:" caption is # omitted, and any markup is stripped from the keys. - serialize :notes + serialize :notes, coder: YAML # value of observation.notes if there are no notes def self.no_notes diff --git a/app/models/user.rb b/app/models/user.rb index 5b3943bfd6..9d65b30fe9 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -319,7 +319,7 @@ class User < AbstractModel # rubocop:disable Metrics/ClassLength belongs_to :license # user's default license belongs_to :location # primary location - serialize :content_filter, type: Hash + serialize :content_filter, type: Hash, coder: YAML ############################################################################## # @@ -344,8 +344,8 @@ class User < AbstractModel # rubocop:disable Metrics/ClassLength # This causes the data structures in these fields to be serialized # automatically with YAML and stored as plain old text strings. - serialize :bonuses - serialize :alert + serialize :bonuses, coder: YAML + serialize :alert, coder: YAML scope :by_contribution, lambda { order(contribution: :desc, name: :asc, login: :asc) diff --git a/app/models/user_stats.rb b/app/models/user_stats.rb index bfcfe310bb..348d0c7ae2 100644 --- a/app/models/user_stats.rb +++ b/app/models/user_stats.rb @@ -73,9 +73,9 @@ class UserStats < ApplicationRecord # This causes the data structures in these fields to be serialized # automatically with YAML and stored as plain old text strings. - serialize :languages, type: Hash - serialize :bonuses - serialize :checklist, type: Hash + serialize :languages, type: Hash, coder: YAML + serialize :bonuses, coder: YAML + serialize :checklist, type: Hash, coder: YAML ALL_FIELDS = { name_description_authors: { weight: 100 }, diff --git a/config/application.rb b/config/application.rb index a6dae38c0f..1592e4e4a9 100644 --- a/config/application.rb +++ b/config/application.rb @@ -43,7 +43,7 @@ class Application < Rails::Application # Uncomment this after migrating to all recommended default configs for 7.1 # config/initializers/new_framework_defaults_7_1.rb - # config.load_defaults = 7.1 + # config.load_defaults(7.1) # Set Time.zone default to the specified zone and # make Active Record auto-convert to this zone. @@ -103,6 +103,10 @@ class Application < Rails::Application config.cache_store = :solid_cache_store config.solid_cache.connects_to = { database: { writing: :cache } } + + # dartsass-sprockets - sssh! about the bootstrap deprectations + config.sass.quiet_deps = true + config.sass.silence_deprecations = ["import"] end end diff --git a/test/controllers/observations/locations_controller_test.rb b/test/controllers/observations/locations_controller_test.rb index 32e33d9908..46da23af4a 100644 --- a/test/controllers/observations/locations_controller_test.rb +++ b/test/controllers/observations/locations_controller_test.rb @@ -24,6 +24,14 @@ def test_define_location_options # Shouldn't match anything. requires_login(:edit, where: "Somewhere out there") assert_empty(assigns(:matches)) + + # Case seen in the wild that causes error + requires_login(:edit, where: "") + assert(assigns(:matches).include?(albion)) + + # Another case that caused an error + requires_login(:edit, where: "CA") + assert(assigns(:matches).include?(albion)) end def test_add_to_location