Mattias Bodlund 3 days ago
parent
commit
be9a7e2ef5
28 changed files with 306 additions and 637 deletions
  1. +3
    -0
      Gemfile
  2. +22
    -18
      Gemfile.lock
  3. +4
    -4
      app/assets/stylesheets/admin.css
  4. +40
    -40
      app/assets/stylesheets/application.css
  5. +6
    -6
      app/assets/stylesheets/assets.css
  6. +3
    -3
      app/assets/stylesheets/attachments.css
  7. +5
    -5
      app/assets/stylesheets/form.css
  8. +58
    -42
      app/assets/stylesheets/forms.css
  9. +21
    -21
      app/assets/stylesheets/lists.css
  10. +10
    -10
      app/assets/stylesheets/nodes.css
  11. +4
    -4
      app/assets/stylesheets/popup-menu.css
  12. +39
    -0
      app/assets/stylesheets/reset.css
  13. +7
    -7
      app/assets/stylesheets/sessions.css
  14. +1
    -1
      app/assets/stylesheets/tom-select.css
  15. +0
    -410
      app/assets/stylesheets/trix.css
  16. +3
    -1
      app/controllers/application_controller.rb
  17. +4
    -24
      app/javascript/admin.js
  18. +6
    -7
      app/views/admin/attachments/_attachment.html.erb
  19. +1
    -1
      app/views/admin/nodes/_tree_node.html.erb
  20. +1
    -1
      app/views/languages/_intro.html.erb
  21. +2
    -1
      app/views/layouts/admin.html.erb
  22. +6
    -0
      app/views/material/_lexxy_field.html.erb
  23. +16
    -0
      app/views/material/_lexxy_field_i18n.html.erb
  24. +0
    -13
      app/views/material/_trix_field.html.erb
  25. +0
    -16
      app/views/material/_trix_field_i18n.html.erb
  26. +1
    -1
      config/application.rb
  27. +1
    -1
      config/importmap.rb
  28. +42
    -0
      update_css.rb

+ 3
- 0
Gemfile View File

@ -16,6 +16,7 @@ gem "stimulus-rails"
gem "propshaft"
gem "importmap-rails"
gem "lexxy"
# Use postgresql as the database for Active Record
gem "pg", "~> 1.1"
@ -55,6 +56,8 @@ gem "bootsnap", require: false
gem "image_processing", "~> 1.2"
group :development do
# Use console on exceptions pages [https://github.com/rails/web-console]
gem "web-console"


+ 22
- 18
Gemfile.lock View File

@ -154,6 +154,8 @@ GEM
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
language_server-protocol (3.17.0.5)
lexxy (0.8.5.beta)
rails (>= 8.0.2)
lint_roller (1.1.0)
logger (1.7.0)
loofah (2.25.1)
@ -166,7 +168,7 @@ GEM
net-pop
net-smtp
marcel (1.1.0)
mcp (0.8.0)
mcp (0.9.0)
json-schema (>= 4.1)
mini_magick (5.3.1)
logger
@ -188,21 +190,21 @@ GEM
net-smtp (0.5.1)
net-protocol
nio4r (2.7.5)
nokogiri (1.19.1-aarch64-linux-gnu)
nokogiri (1.19.2-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.1-aarch64-linux-musl)
nokogiri (1.19.2-aarch64-linux-musl)
racc (~> 1.4)
nokogiri (1.19.1-arm-linux-gnu)
nokogiri (1.19.2-arm-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.1-arm-linux-musl)
nokogiri (1.19.2-arm-linux-musl)
racc (~> 1.4)
nokogiri (1.19.1-arm64-darwin)
nokogiri (1.19.2-arm64-darwin)
racc (~> 1.4)
nokogiri (1.19.1-x86_64-darwin)
nokogiri (1.19.2-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.19.1-x86_64-linux-gnu)
nokogiri (1.19.2-x86_64-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.1-x86_64-linux-musl)
nokogiri (1.19.2-x86_64-linux-musl)
racc (~> 1.4)
openssl (4.0.1)
parallel (1.27.0)
@ -390,6 +392,7 @@ DEPENDENCIES
importmap-rails
jbuilder
kaminari
lexxy
mobility (~> 1.3.0.rc1)
openssl
pg (~> 1.1)
@ -464,12 +467,13 @@ CHECKSUMS
kaminari-activerecord (1.2.2) sha256=0dd3a67bab356a356f36b3b7236bcb81cef313095365befe8e98057dd2472430
kaminari-core (1.2.2) sha256=3bd26fec7370645af40ca73b9426a448d09b8a8ba7afa9ba3c3e0d39cdbb83ff
language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
lexxy (0.8.5.beta) sha256=336b95507f80cb3ddad533c27edca8851c7773831a767495cdabfc984c4831ec
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
loofah (2.25.1) sha256=d436c73dbd0c1147b16c4a41db097942d217303e1f7728704b37e4df9f6d2e04
mail (2.9.0) sha256=6fa6673ecd71c60c2d996260f9ee3dd387d4673b8169b502134659ece6d34941
marcel (1.1.0) sha256=fdcfcfa33cc52e93c4308d40e4090a5d4ea279e160a7f6af988260fa970e0bee
mcp (0.8.0) sha256=ae8bd146bb8e168852866fd26f805f52744f6326afb3211e073f78a95e0c34fb
mcp (0.9.0) sha256=a0a3737b0ac9df0772f4ef7e2b013c260ddbcf217a5d50a66bff0baeddf03e47
mini_magick (5.3.1) sha256=29395dfd76badcabb6403ee5aff6f681e867074f8f28ce08d78661e9e4a351c4
mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef
minitest (6.0.2) sha256=db6e57956f6ecc6134683b4c87467d6dd792323c7f0eea7b93f66bd284adbc3d
@ -480,14 +484,14 @@ CHECKSUMS
net-protocol (0.2.2) sha256=aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8
net-smtp (0.5.1) sha256=ed96a0af63c524fceb4b29b0d352195c30d82dd916a42f03c62a3a70e5b70736
nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1
nokogiri (1.19.1-aarch64-linux-gnu) sha256=cfdb0eafd9a554a88f12ebcc688d2b9005f9fce42b00b970e3dc199587b27f32
nokogiri (1.19.1-aarch64-linux-musl) sha256=1e2150ab43c3b373aba76cd1190af7b9e92103564063e48c474f7600923620b5
nokogiri (1.19.1-arm-linux-gnu) sha256=0a39ed59abe3bf279fab9dd4c6db6fe8af01af0608f6e1f08b8ffa4e5d407fa3
nokogiri (1.19.1-arm-linux-musl) sha256=3a18e559ee499b064aac6562d98daab3d39ba6cbb4074a1542781b2f556db47d
nokogiri (1.19.1-arm64-darwin) sha256=dfe2d337e6700eac47290407c289d56bcf85805d128c1b5a6434ddb79731cb9e
nokogiri (1.19.1-x86_64-darwin) sha256=7093896778cc03efb74b85f915a775862730e887f2e58d6921e3fa3d981e68bf
nokogiri (1.19.1-x86_64-linux-gnu) sha256=1a4902842a186b4f901078e692d12257678e6133858d0566152fe29cdb98456a
nokogiri (1.19.1-x86_64-linux-musl) sha256=4267f38ad4fc7e52a2e7ee28ed494e8f9d8eb4f4b3320901d55981c7b995fc23
nokogiri (1.19.2-aarch64-linux-gnu) sha256=c34d5c8208025587554608e98fd88ab125b29c80f9352b821964e9a5d5cfbd19
nokogiri (1.19.2-aarch64-linux-musl) sha256=7f6b4b0202d507326841a4f790294bf75098aef50c7173443812e3ac5cb06515
nokogiri (1.19.2-arm-linux-gnu) sha256=b7fa1139016f3dc850bda1260988f0d749934a939d04ef2da13bec060d7d5081
nokogiri (1.19.2-arm-linux-musl) sha256=61114d44f6742ff72194a1b3020967201e2eb982814778d130f6471c11f9828c
nokogiri (1.19.2-arm64-darwin) sha256=58d8ea2e31a967b843b70487a44c14c8ba1866daa1b9da9be9dbdf1b43dee205
nokogiri (1.19.2-x86_64-darwin) sha256=7d9af11fda72dfaa2961d8c4d5380ca0b51bc389dc5f8d4b859b9644f195e7a4
nokogiri (1.19.2-x86_64-linux-gnu) sha256=fa8feca882b73e871a9845f3817a72e9734c8e974bdc4fbad6e4bc6e8076b94f
nokogiri (1.19.2-x86_64-linux-musl) sha256=93128448e61a9383a30baef041bf1f5817e22f297a1d400521e90294445069a8
openssl (4.0.1) sha256=e27974136b7b02894a1bce46c5397ee889afafe704a839446b54dc81cb9c5f7d
parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
parser (3.3.10.2) sha256=6f60c84aa4bdcedb6d1a2434b738fe8a8136807b6adc8f7f53b97da9bc4e9357


+ 4
- 4
app/assets/stylesheets/admin.css View File

@ -50,7 +50,7 @@
--font-base: system-ui, sans-serif;
--font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", monospace;
font: 10px/1.3 var(--font-base);
font: 16px/1.3 var(--font-base);
}
@ -189,7 +189,7 @@ turbo-frame {
h1,
.node-path {
font-size: 2.4rem;
font-size: 1.5rem;
line-height: 2;
font-weight: 400;
margin: 0 0 0 0;
@ -221,7 +221,7 @@ a.list-title-link:hover {
display: flex;
flex-direction: column;
gap: 0px;
font-size: 1.6rem;
font-size: 1rem;
z-index: 100;
}
@ -237,7 +237,7 @@ a.list-title-link:hover {
& .icon {
color: #f1f1f1;
font-size: 3.2rem;
font-size: 2rem;
}
}


+ 40
- 40
app/assets/stylesheets/application.css View File

@ -84,15 +84,15 @@
--shadow: 0px 0px 10px 2px rgba(0,0,0,0.1);
--fs-s: 1.4rem;
--fs-base: 1.6rem;
--fs-lg: 1.8rem;
--fs-xl: 2.8rem;
--fs-2xl: 3.2rem;
--fs-3xl: 4.0rem;
--fs-4xl: 9.0rem;
--fs-s: 0.875rem;
--fs-base: 1rem;
--fs-lg: 1.125rem;
--fs-xl: 1.75rem;
--fs-2xl: 2rem;
--fs-3xl: 2.5rem;
--fs-4xl: 5.625rem;
font: 10px/1.3 var(--ff-ikea);
font: 16px/1.3 var(--ff-ikea);
}
.turbo-progress-bar {
@ -186,7 +186,7 @@ ul[class] {
header {
padding: 1.2rem;
padding: 0.75rem;
flex-grow: 0;
z-index: 11;
position: absolute;
@ -213,10 +213,10 @@ path.logo-text {
footer {
position: fixed;
font-size: 1.2rem;
font-size: 0.75rem;
line-height: 1.2;
right: 1.2rem;
top: 1.2rem;
right: 0.75rem;
top: 0.75rem;
font-family: var(--ff-ikea);
writing-mode: vertical-rl;
text-orientation: mixed;
@ -279,8 +279,8 @@ footer {
font-size: var(--fs-base);
font-family: var(--ff-ikea);
font-weight: 700;
height: 4.4rem;
border-radius: 4.4rem;
height: 2.75rem;
border-radius: 2.75rem;
width: 100%;
cursor: pointer;
text-decoration: none;
@ -320,7 +320,7 @@ footer {
main {
padding: 50px 1.2rem 1.6rem 1.2rem;
padding: 50px 0.75rem 1rem 0.75rem;
flex-grow: 1;
display: flex;
flex-direction: column;
@ -387,8 +387,8 @@ main {
.intro-content-header,
.intro-content-body {
padding: 1.6rem 1.2rem;
border-radius: 1.2rem;
padding: 1rem 0.75rem;
border-radius: 0.75rem;
}
@ -413,23 +413,23 @@ main {
display: flex;
& div {
background-color: var(--clr-medium-yellow);
padding: 1rem 1.2rem;
padding: 0.625rem 0.75rem;
border-radius: 400px;
}
}
.question-header {
background-color: var(--clr-medium-yellow);
border-radius: 1.6rem;
border-radius: 1rem;
font-size: var(--fs-xl);
line-height: 1.2;
font-weight: 700;
padding: 1.6rem 1.2rem;
padding: 1rem 0.75rem;
}
.error {
padding: 1.6rem 1.2rem;
border-radius: 1.6rem;
padding: 1rem 0.75rem;
border-radius: 1rem;
background-color: var(--clr-text-highlight);
color: var(--clr-black);
font-size: var(--fs-s);
@ -445,8 +445,8 @@ main {
& label {
display: block;
padding: 1.6rem 1.2rem;
border-radius: 1.6rem;
padding: 1rem 0.75rem;
border-radius: 1rem;
background-color: var(--clr-white);
cursor: pointer;
user-select: none;
@ -514,16 +514,16 @@ main {
.question-result, .result-stats {
background-color: var(--clr-medium-yellow);
border-radius: 1.2rem;
border-radius: 0.75rem;
font-size: var(--fs-base);
line-height: 1.4;
padding: 1.6rem 1.2rem;
padding: 1rem 0.75rem;
}
.result-actions {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.8rem;
gap: 0.5rem;
& a {
background-color: var(--clr-medium-yellow);
@ -543,9 +543,9 @@ main {
& > div {
box-sizing: border-box;
padding: 1.6rem 1.2rem;
padding: 1rem 0.75rem;
background-color: var(--clr-medium-yellow);
border-radius: 1.2rem;
border-radius: 0.75rem;
color: var(--clr-dark-yellow);
font-size: var(--fs-s);
font-weight: 700;
@ -577,7 +577,7 @@ main {
&::after {
content: '%';
font-size: 4rem;
font-size: 2.5rem;
}
}
}
@ -591,10 +591,10 @@ main {
.result-msg {
background-color: var(--clr-white);
border-radius: 1.2rem;
border-radius: 0.75rem;
font-size: var(--fs-base);
line-height: 1.4;
padding: 2.0rem 1.2rem;
padding: 1.25rem 0.75rem;
& h1 {
font-size: var(--fs-3xl);
@ -614,10 +614,10 @@ main {
label.question-answer {
display: flex;
align-items: start;
height: 10.8rem;
height: 6.75rem;
cursor: pointer;
padding: 1.6rem 1.2rem;
border-radius: 1.6rem;
padding: 1rem 0.75rem;
border-radius: 1rem;
background-color: var(--clr-white);
& input {
@ -679,18 +679,18 @@ label {
@media (min-width: 815px) {
header {
top: 2rem;
left: 3rem;
top: 1.25rem;
left: 1.875rem;
}
main {
padding: calc(50px + 2rem) 2rem 3rem 2rem;
padding: calc(50px + 1.25rem) 1.25rem 1.875rem 1.25rem;
}
footer {
top: 2rem;
right: 3rem;
top: 1.25rem;
right: 1.875rem;
}


+ 6
- 6
app/assets/stylesheets/assets.css View File

@ -39,7 +39,7 @@
}
.asset__title {
font-size: 1.4rem;
font-size: 0.875rem;
margin-bottom: 2px;
text-overflow: ellipsis;
white-space: nowrap;
@ -48,16 +48,16 @@
}
.asset__mimetypes {
font-size: 1.2rem;
font-size: 0.75rem;
font-family: var(--font-mono);
color: var(--action);
}
.assets-sort {
font-size: 1.4rem;
font-size: 0.875rem;
display: flex;
justify-content: flex-end;
gap: 1rem;
gap: 0.625rem;
align-items: center;
.popup-menu {
@ -65,7 +65,7 @@
}
& a {
font-size: 1.4rem;
font-size: 0.875rem;
white-space: nowrap;
}
}
@ -80,7 +80,7 @@
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
font-size: 0.75rem;
border-color: var(--clr-grey-200);
& .progress::after {


+ 3
- 3
app/assets/stylesheets/attachments.css View File

@ -1,14 +1,14 @@
#attachments {
display: flex;
flex-direction: column;
gap: 3.2rem;
gap: 2rem;
}
.attachment {
position: relative;
padding-top: 14px;
& label {
font-size: 1.4rem;
font-size: 0.875rem;
line-height: 1.2;
color: #555;
display: block;
@ -36,7 +36,7 @@
align-items: center;
font-family: var(--font-icons);
background-color: transparent;
font-size: 2.2rem;
font-size: 1.375rem;
color: var(--clr-grey-400);
&:hover {


+ 5
- 5
app/assets/stylesheets/form.css View File

@ -8,7 +8,7 @@
gap: 0.4em;
&>div:nth-child(1) {
& label {
font-size: 1.6rem;
font-size: 1rem;
line-height: 1.2;
color: var(--clr-grey-600);
}
@ -33,7 +33,7 @@
input[type=submit] {
font-family: var(--ff-base);
font-size: 1.6rem;
font-size: 1rem;
background-color: var(--clr-grey-800);
color: var(--clr-white-200);
padding: 1em 1.2em;
@ -47,7 +47,7 @@ input[type=submit] {
display: flex;
font-family: var(--ff-base);
border: 1px solid var(--clr-border);
font-size: 1.6rem;
font-size: 1rem;
letter-spacing: 0.00625em;
border: none !important;
background-color: transparent;
@ -120,7 +120,7 @@ textarea.material__input {
p[role="alert"] {
margin: 4px 0 0 0;
color: var(--clr-error);
font-size: 1.2rem;
font-size: 0.75rem;
}
ul.errors {
@ -131,7 +131,7 @@ ul.errors {
p[role="tooltip"] {
margin: 4px 0 0 0;
color: var(--clr-grey-500);
font-size: 1.2rem;
font-size: 0.75rem;
}


+ 58
- 42
app/assets/stylesheets/forms.css View File

@ -47,7 +47,7 @@
color: var(--data-icon-color, #717274);
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 3.2rem;
font-size: 2rem;
line-height: 1;
margin-top: 6px;
content: attr(data-icon);
@ -71,12 +71,12 @@
max-width: 990px;
display: flex;
align-items: start;
padding-bottom: 2.4rem;
padding-bottom: 1.5rem;
&>div:nth-child(1) {
padding-top: 12px;
flex-basis: 33%;
& label {
font-size: 1.4rem;
font-size: 0.875rem;
line-height: 1.2;
color: #555;
}
@ -117,7 +117,7 @@
}
.attachment label {
font-size: 1.4rem;
font-size: 0.875rem;
line-height: 1.2;
color: #555;
}
@ -126,7 +126,7 @@
display: flex;
font-family: var(--font-base);
border: 1px solid var(--border);
font-size: 1.6rem;
font-size: 1rem;
letter-spacing: 0.00625em;
border: none !important;
background-color: transparent;
@ -210,7 +210,7 @@
font-family: var(--font-base);
border: 1px solid var(--border);
font-size: 2.4rem;
font-size: 1.5rem;
line-height: 2;
font-weight: 400;
letter-spacing: 0.00625em;
@ -286,7 +286,7 @@
}
& span {
font-size: 1.6rem;
font-size: 1rem;
letter-spacing: 0.00625em;
color: var(--clr-grey-400);
@ -402,7 +402,7 @@ form[data-locale='uk'] .i18n__input-uk{
p[role="alert"] {
margin: 4px 0 0 0;
color: var(--error);
font-size: 1.2rem;
font-size: 0.75rem;
}
.icon-rb {
@ -421,13 +421,13 @@ p[role="alert"] {
text-transform: uppercase;
height: 24px;
width: 24px;
font: 400 1rem/24px "Roboto Mono", monospace;
font: 400 0.625rem/24px "Roboto Mono", monospace;
}
}
.form-ctrls input[type="submit"],
.form-ctrls button {
font-size: 1.5rem;
font-size: 0.9375rem;
letter-spacing: 0.00625em;
padding: 0.6em 1.4em;
background: var(--action);
@ -442,7 +442,7 @@ p[role="alert"] {
.btn {
display: inline-flex;
font-size: 1.4rem;
font-size: 0.875rem;
letter-spacing: 0.00625em;
padding: 0 8px 0 8px;
border-radius: 8px;
@ -460,7 +460,7 @@ p[role="alert"] {
.add-btn, .icon-only-btn, .action-btn {
font-size: 1.6rem;
font-size: 1rem;
letter-spacing: 0.00625em;
padding: 0 14px 0 32px;
border-radius: 12px;
@ -479,7 +479,7 @@ p[role="alert"] {
.icon-btn {
display: inline-flex;
font-size: 1.4rem;
font-size: 0.875rem;
letter-spacing: 0.00625em;
padding: 0 8px 0 24px;
color: var(--black);
@ -494,14 +494,14 @@ p[role="alert"] {
left: 2px;
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 2.0rem;
font-size: 1.25rem;
line-height: 32px;
}
}
.icon-only-btn {
display: inline-flex;
font-size: 1.4rem;
font-size: 0.875rem;
letter-spacing: 0.00625em;
padding: 0 8px;
color: var(--black);
@ -509,7 +509,7 @@ p[role="alert"] {
align-items: center;
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 3.2rem;
font-size: 2rem;
line-height: 32px;
&:disabled {
@ -528,7 +528,7 @@ p[role="alert"] {
left: 2px;
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 3.2rem;
font-size: 2rem;
line-height: 48px;
}
}
@ -540,7 +540,7 @@ p[role="alert"] {
left: 2px;
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 2.8rem;
font-size: 1.75rem;
line-height: 48px;
}
}
@ -555,7 +555,7 @@ p[role="alert"] {
.form-nav-links {
display: flex;
justify-content: space-between;
margin-bottom: 1rem;
margin-bottom: 0.625rem;
}
@ -569,7 +569,7 @@ p[role="alert"] {
gap: 4px;
& label {
font-size: 1.5rem;
font-size: 0.9375rem;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 0.00625em;
@ -590,7 +590,7 @@ p[role="alert"] {
position: absolute;
right: -12px;
top: -12px;
font-size: 1rem;
font-size: 0.625rem;
width: 24px;
height: 24px;
line-height: 24px;
@ -628,7 +628,7 @@ p[role="alert"] {
.delete-link {
color: var(--secondary);
text-decoration: none;
font-size: 1.5rem;
font-size: 0.9375rem;
letter-spacing: 0.00625em;
appearance: none;
background: none;
@ -668,7 +668,7 @@ p[role="alert"] {
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 4.2rem;
font-size: 2.625rem;
}
}
@ -678,7 +678,7 @@ p[role="alert"] {
height: 48px;
& span {
font-size: 3.2rem;
font-size: 2rem;
}
}
@ -700,7 +700,7 @@ p[role="alert"] {
.file-details {
text-align: center;
font: 1.2rem var(--font-mono);
font: 0.75rem var(--font-mono);
}
@ -717,14 +717,14 @@ p[role="alert"] {
}
.file-data-large {
font: 1.4rem var(--font-mono);
font: 0.875rem var(--font-mono);
}
.asset-ctrls {
display: none;
gap: 4px;
justify-content: center;
font: 2.4rem var(--font-icons);
font: 1.5rem var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
& > div {
@ -784,10 +784,10 @@ p[role="alert"] {
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 20px;
font-size: 1.6rem;
font-size: 1rem;
& label {
font-size: 1.4rem;
font-size: 0.875rem;
color: #555;
}
@ -841,7 +841,7 @@ p[role="alert"] {
position: absolute;
top: 20px;
right: 20px;
font: 3.2rem/36px var(--font-icons);
font: 2rem/36px var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
display: inline-flex;
justify-content: center;
@ -872,7 +872,7 @@ p[role="alert"] {
}
.tag {
font: 1.4rem/1.4 var(--font-mono);
font: 0.875rem/1.4 var(--font-mono);
background: var(--clr-grey-300);
padding: 2px 6px 3px 6px;
border-radius: 4px;
@ -890,21 +890,21 @@ p[role="alert"] {
}
trix-toolbar, trix-editor {
font-size: 1.6rem;
font-size: 1rem;
}
trix-editor {
& h1 {
font-weight: 600;
font-size: 2.4rem;
font-size: 1.5rem;
line-height: 1.25;
margin: 0 0 0.4em 0;
}
& h2 {
font-weight: 600;
font-size: 1.8rem;
font-size: 1.125rem;
line-height: 1.25;
margin: 0 0 0.4em 0;
}
@ -979,7 +979,7 @@ trix-editor {
#scan-result {
font-size: 1.6rem;
font-size: 1rem;
border-radius: 4px;
&:has(div) {
@ -1003,7 +1003,7 @@ trix-editor {
.date-formatted {
font-size: 1.6rem;
font-size: 1rem;
margin-top: 12px;
}
@ -1017,7 +1017,7 @@ ul {
}
.node__status {
font-size: 1.6rem;
font-size: 1rem;
letter-spacing: 0.00625em;
line-height: 1.2;
@ -1036,11 +1036,11 @@ ul {
justify-content: flex-start;
align-items: center;
gap: 0.6em;
font-size: 1.6rem;
font-size: 1rem;
letter-spacing: 0.00625em;
select {
height: 3.2rem;
height: 2rem;
&:focus {
&:focus {
outline: 2px solid var(--action);
@ -1053,7 +1053,7 @@ ul {
color: var(--data-icon-color, #717274);
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 2.8rem;
font-size: 1.75rem;
line-height: 1.142857142857143;
appearance: none;
background: none;
@ -1102,7 +1102,7 @@ ul {
}
.ts-dropdown, .ts-control, .ts-control input {
font-size: 1.6rem;
font-size: 1rem;
}
.ts-dropdown .active {
@ -1128,11 +1128,27 @@ ul {
align-items: center;
font-family: var(--font-icons);
background-color: transparent;
font-size: 2.2rem;
font-size: 1.375rem;
color: var(--clr-grey-400);
&:hover {
background-color: var(--clr-grey-200);
color: var(--clr-grey-700);
}
}
.lexxy__field {
width: 100%;
max-width: 100%;
}
:where(.lexxy-content) {
code, pre {
&:is(pre),
&[data-language] {
text-wrap: wrap; /* Overrides 'nowrap' */
white-space: pre-wrap; /* Overrides 'pre' while keeping formatting */
word-break: break-all; /* Ensures long strings don't push the width */
}
}
}

+ 21
- 21
app/assets/stylesheets/lists.css View File

@ -1,17 +1,17 @@
.entries-info {
font-size: 2.2rem;
font-size: 1.375rem;
font-weight: 500;
margin: 0;
}
.audit-date, .user__role {
color: var(--audit);
font-size: 1.4rem;
font-size: 0.875rem;
}
.date {
color: var(--audit);
font-size: 1.4rem;
font-size: 0.875rem;
}
.list-container {
@ -32,11 +32,11 @@
.list-small {
padding: 0;
& .list-header, & .row, & .audit-date {
font-size: 1.2rem;
font-size: 0.75rem;
}
& .icon {
font-size: 1.8rem;
font-size: 1.125rem;
}
}
@ -48,7 +48,7 @@
}
.list-header {
font-size: 1.4rem;
font-size: 0.875rem;
line-height: 1.2;
color: var(--black);
min-height: 38px;
@ -58,7 +58,7 @@
}
.sort_link {
font-size: 1.4rem;
font-size: 0.875rem;
text-decoration: none;
color: var(--black);
display: inline-flex;
@ -78,7 +78,7 @@
&::after {
content: "arrow_downward";
font: 1.6rem var(--font-icons);
font: 1rem var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
color: var(--black);
}
@ -99,7 +99,7 @@
min-height: 48px;
box-sizing: border-box;
padding: 4px 0;
font-size: 1.6rem;
font-size: 1rem;
& .actions {
@ -180,7 +180,7 @@
}
&.mono {
font-size: 1.2rem;
font-size: 0.75rem;
font-family: var(--font-mono);
}
@ -212,14 +212,14 @@
.back-link {
color: var(--secondary);
text-decoration: none;
font-size: 1.6rem;
font-size: 1rem;
display: inline-flex;
justify-content: center;
align-items: center;
&::before {
content: "arrow_back";
font: 1.6rem/1 var(--font-icons);
font: 1rem/1 var(--font-icons);
color: var(--secondary);
margin-right: 0.4em;
}
@ -232,11 +232,11 @@
justify-content: end;
align-items: center;
gap: 20px;
font-size: 1.4rem;
font-size: 0.875rem;
}
.pagination {
font: normal 3.2rem/40px var(--font-icons);
font: normal 2rem/40px var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
display: flex;
height: 40px;
@ -266,7 +266,7 @@
.category-selector {
font-size: 1.5rem;
font-size: 0.9375rem;
line-height: 1.6;
display: flex;
flex-wrap: wrap;
@ -287,7 +287,7 @@
content: 'done';
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 2.4rem;
font-size: 1.5rem;
line-height: 1;
margin-right: 2px;
vertical-align: bottom;
@ -324,7 +324,7 @@
color: var(--data-icon-color, #717274);
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 3.2rem;
font-size: 2rem;
line-height: 1;
content: attr(data-icon);
}
@ -335,7 +335,7 @@
color: var(--black);
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 2.8rem;
font-size: 1.75rem;
line-height: 32px;
width: 20px;
overflow: visible;
@ -381,7 +381,7 @@
border: none;
flex-grow: 1;
font-size: 1.6rem;
font-size: 1rem;
line-height: 36px;
height: 36px;
padding: 0 0.4em;
@ -428,9 +428,9 @@
.utm {
margin-top: 8px;
font-size: 1.2rem;
font-size: 0.75rem;
font-family: var(--font-mono);
& .tag {
font-size: 1.2rem;
font-size: 0.75rem;
}
}

+ 10
- 10
app/assets/stylesheets/nodes.css View File

@ -25,7 +25,7 @@
& h1 {
margin: 0;
font: 1.4rem/1 var(--font-base);
font: 0.875rem/1 var(--font-base);
}
&:hover {
@ -34,7 +34,7 @@
}
#drawer-structure {
font-size: 1.4rem;
font-size: 0.875rem;
line-height: 1.5;
margin: 0 8px;
}
@ -60,13 +60,13 @@
.node-row {
--level: 0;
--toggle-width: 1.6rem;
--toggle-width: 1rem;
display: grid;
grid-template-columns: calc(var(--level) * (var(--toggle-width) / 2)) var(--toggle-width) 1fr;
grid-template-areas: "spacer toggle content";
min-height: 3.2rem;
min-height: 2rem;
padding: 0 10px 0 0;
cursor: pointer;
@ -78,7 +78,7 @@
.child {
color: var(--clr-grey-400);
font: 1.8rem/1 var(--font-icons);
font: 1.125rem/1 var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
grid-area: toggle;
display: flex;
@ -135,7 +135,7 @@
color: var(--data-icon-color, #717274);
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 2.0rem;
font-size: 1.25rem;
content: attr(data-icon);
}
}
@ -151,7 +151,7 @@
color: var(--data-icon-color, #717274);
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 2.4rem;
font-size: 1.5rem;
line-height: 1.5;
content: attr(data-icon);
}
@ -206,7 +206,7 @@
gap: 8px;
& button {
font: 1.6rem/1 var(--font-icons);
font: 1rem/1 var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
}
}
@ -216,7 +216,7 @@
}
.tree-title {
font-size: 1.6rem;
font-size: 1rem;
font-weight: 600;
display: flex;
justify-content: start;
@ -234,5 +234,5 @@
.tree-children {
font-size: 1.6rem;
font-size: 1rem;
}

+ 4
- 4
app/assets/stylesheets/popup-menu.css View File

@ -5,7 +5,7 @@
padding: 0;
overflow: hidden;
border-radius: 4px;
font-size: 1.6rem;
font-size: 1rem;
line-height: 1.2;
min-width: 240px;
@ -48,7 +48,7 @@
display: flex;
appearance: none;
border: none;
font-size: 1.6rem;
font-size: 1rem;
justify-content: flex-start;
flex-grow: 1;
align-items: center;
@ -62,13 +62,13 @@
color: var(--data-icon-color);
font-family: var(--font-icons);
font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 1, 'GRAD' 0;
font-size: 2.4rem;
font-size: 1.5rem;
line-height: 1;
content: attr(data-icon);
}
& .icon {
font-size: 2.8rem;
font-size: 1.75rem;
color: var(--clr-grey-800);
}
}


+ 39
- 0
app/assets/stylesheets/reset.css View File

@ -0,0 +1,39 @@
*, *::before, *::after {
box-sizing: border-box;
}
*:not(dialog) {
margin: 0;
}
@media (prefers-reduced-motion: no-preference) {
html {
interpolate-size: allow-keywords;
}
}
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
img, picture, video, canvas, svg {
display: block;
max-width: 100%;
}
input, button, textarea, select {
font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
p {
text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
text-wrap: balance;
}

+ 7
- 7
app/assets/stylesheets/sessions.css View File

@ -1,5 +1,5 @@
:root {
font: 400 10px/1.3 system-ui, sans-serif;
font: 400 16px/1.3 system-ui, sans-serif;
--red: #B24226;
--border: #ccc;
--font-base: system-ui, sans-serif;
@ -23,7 +23,7 @@ main {
width: 100%;
background: white;
padding: 40px 32px 40px 32px;
font-size: 1.6rem;
font-size: 1rem;
box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
display: flex;
flex-direction: column;
@ -39,7 +39,7 @@ svg {
}
label {
font-size: 1.4rem;
font-size: 0.875rem;
color: #666;
order: 0;
}
@ -50,7 +50,7 @@ input[type="password"] {
display: flex;
border: 1px solid var(--border);
font-family: var(--font-base);
font-size: 1.6rem;
font-size: 1rem;
letter-spacing: 0.00625em;
border: none !important;
background-color: transparent;
@ -109,7 +109,7 @@ button[type=submit] {
background: #333;
border: none;
outline: none;
font: 400 1.6rem system-ui, sans-serif;
font: 400 1rem system-ui, sans-serif;
padding: 8px 20px;
border-radius: 4px;
cursor: pointer;
@ -123,7 +123,7 @@ button[type=submit] {
p[role=alert] {
margin: 4px 0 0 0;
color: var(--red);
font-size: 1.4rem;
font-size: 0.875rem;
order: 3;
}
@ -167,6 +167,6 @@ form {
footer {
text-align: right;
margin-top: 40px;
font-size: 1.4rem;
font-size: 0.875rem;
color: #666;
}

+ 1
- 1
app/assets/stylesheets/tom-select.css
File diff suppressed because it is too large
View File


+ 0
- 410
app/assets/stylesheets/trix.css View File

@ -1,410 +0,0 @@
trix-editor {
border: 1px solid #bbb;
border-radius: 3px;
margin: 0;
padding: 0.4em 0.6em;
min-height: 5em;
outline: none; }
trix-toolbar * {
box-sizing: border-box; }
trix-toolbar .trix-button-row {
display: flex;
flex-wrap: nowrap;
justify-content: space-between;
overflow-x: auto; }
trix-toolbar .trix-button-group {
display: flex;
margin-bottom: 10px;
border: 1px solid #bbb;
border-top-color: #ccc;
border-bottom-color: #888;
border-radius: 3px; }
trix-toolbar .trix-button-group:not(:first-child) {
margin-left: 1.5vw; }
@media (max-device-width: 768px) {
trix-toolbar .trix-button-group:not(:first-child) {
margin-left: 0; } }
trix-toolbar .trix-button-group-spacer {
flex-grow: 1; }
@media (max-device-width: 768px) {
trix-toolbar .trix-button-group-spacer {
display: none; } }
trix-toolbar .trix-button {
position: relative;
float: left;
color: rgba(0, 0, 0, 0.6);
font-size: 0.75em;
font-weight: 600;
white-space: nowrap;
padding: 0 0.5em;
margin: 0;
outline: none;
border: none;
border-bottom: 1px solid #ddd;
border-radius: 0;
background: transparent; }
trix-toolbar .trix-button:not(:first-child) {
border-left: 1px solid #ccc; }
trix-toolbar .trix-button.trix-active {
background: #cbeefa;
color: black; }
trix-toolbar .trix-button:not(:disabled) {
cursor: pointer; }
trix-toolbar .trix-button:disabled {
color: rgba(0, 0, 0, 0.125); }
@media (max-device-width: 768px) {
trix-toolbar .trix-button {
letter-spacing: -0.01em;
padding: 0 0.3em; } }
trix-toolbar .trix-button--icon {
font-size: inherit;
width: 2.6em;
height: 1.6em;
max-width: calc(0.8em + 4vw);
text-indent: -9999px; }
@media (max-device-width: 768px) {
trix-toolbar .trix-button--icon {
height: 2em;
max-width: calc(0.8em + 3.5vw); } }
trix-toolbar .trix-button--icon::before {
display: inline-block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.6;
content: "";
background-position: center;
background-repeat: no-repeat;
background-size: contain; }
@media (max-device-width: 768px) {
trix-toolbar .trix-button--icon::before {
right: 6%;
left: 6%; } }
trix-toolbar .trix-button--icon.trix-active::before {
opacity: 1; }
trix-toolbar .trix-button--icon:disabled::before {
opacity: 0.125; }
trix-toolbar .trix-button--icon-attach::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M10.5%2018V7.5c0-2.25%203-2.25%203%200V18c0%204.125-6%204.125-6%200V7.5c0-6.375%209-6.375%209%200V18%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-miterlimit%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
top: 8%;
bottom: 4%; }
trix-toolbar .trix-button--icon-bold::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.522%2019.242a.5.5%200%200%201-.5-.5V5.35a.5.5%200%200%201%20.5-.5h5.783c1.347%200%202.46.345%203.24.982.783.64%201.216%201.562%201.216%202.683%200%201.13-.587%202.129-1.476%202.71a.35.35%200%200%200%20.049.613c1.259.56%202.101%201.742%202.101%203.22%200%201.282-.483%202.334-1.363%203.063-.876.726-2.132%201.12-3.66%201.12h-5.89ZM9.27%207.347v3.362h1.97c.766%200%201.347-.17%201.733-.464.38-.291.587-.716.587-1.27%200-.53-.183-.928-.513-1.198-.334-.273-.838-.43-1.505-.43H9.27Zm0%205.606v3.791h2.389c.832%200%201.448-.177%201.853-.497.399-.315.614-.786.614-1.423%200-.62-.22-1.077-.63-1.385-.418-.313-1.053-.486-1.905-.486H9.27Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-italic::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9%205h6.5v2h-2.23l-2.31%2010H13v2H6v-2h2.461l2.306-10H9V5Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-link::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.948%205.258a4.337%204.337%200%200%200-6.108%200L11.217%206.87a.993.993%200%200%200%200%201.41c.392.39%201.027.39%201.418%200l1.623-1.613a2.323%202.323%200%200%201%203.271%200%202.29%202.29%200%200%201%200%203.251l-2.393%202.38a3.021%203.021%200%200%201-4.255%200l-.05-.049a1.007%201.007%200%200%200-1.418%200%20.993.993%200%200%200%200%201.41l.05.049a5.036%205.036%200%200%200%207.091%200l2.394-2.38a4.275%204.275%200%200%200%200-6.072Zm-13.683%2013.6a4.337%204.337%200%200%200%206.108%200l1.262-1.255a.993.993%200%200%200%200-1.41%201.007%201.007%200%200%200-1.418%200L9.954%2017.45a2.323%202.323%200%200%201-3.27%200%202.29%202.29%200%200%201%200-3.251l2.344-2.331a2.579%202.579%200%200%201%203.631%200c.392.39%201.027.39%201.419%200a.993.993%200%200%200%200-1.41%204.593%204.593%200%200%200-6.468%200l-2.345%202.33a4.275%204.275%200%200%200%200%206.072Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-strike::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6%2014.986c.088%202.647%202.246%204.258%205.635%204.258%203.496%200%205.713-1.728%205.713-4.463%200-.275-.02-.536-.062-.781h-3.461c.398.293.573.654.573%201.123%200%201.035-1.074%201.787-2.646%201.787-1.563%200-2.773-.762-2.91-1.924H6ZM6.432%2010h3.763c-.632-.314-.914-.715-.914-1.273%200-1.045.977-1.739%202.432-1.739%201.475%200%202.52.723%202.617%201.914h2.764c-.05-2.548-2.11-4.238-5.39-4.238-3.145%200-5.392%201.719-5.392%204.316%200%20.363.04.703.12%201.02ZM4%2011a1%201%200%201%200%200%202h15a1%201%200%201%200%200-2H4Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-quote::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M4.581%208.471c.44-.5%201.056-.834%201.758-.995C8.074%207.17%209.201%207.822%2010%208.752c1.354%201.578%201.33%203.555.394%205.277-.941%201.731-2.788%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.121-.49.16-.764.294-.286.567-.566.791-.835.222-.266.413-.54.524-.815.113-.28.156-.597.026-.908-.128-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.674-2.7c0-.905.283-1.59.72-2.088Zm9.419%200c.44-.5%201.055-.834%201.758-.995%201.734-.306%202.862.346%203.66%201.276%201.355%201.578%201.33%203.555.395%205.277-.941%201.731-2.789%203.163-4.988%203.56a.622.622%200%200%201-.653-.317c-.113-.205-.122-.49.16-.764.294-.286.567-.566.791-.835.222-.266.412-.54.523-.815.114-.28.157-.597.026-.908-.127-.303-.39-.524-.72-.69a3.02%203.02%200%200%201-1.672-2.701c0-.905.283-1.59.72-2.088Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-heading-1::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21.5%207.5v-3h-12v3H14v13h3v-13h4.5ZM9%2013.5h3.5v-3h-10v3H6v7h3v-7Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-code::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.293%2011.293a1%201%200%200%200%200%201.414l4%204a1%201%200%201%200%201.414-1.414L5.414%2012l3.293-3.293a1%201%200%200%200-1.414-1.414l-4%204Zm13.414%205.414%204-4a1%201%200%200%200%200-1.414l-4-4a1%201%200%201%200-1.414%201.414L18.586%2012l-3.293%203.293a1%201%200%200%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-bullet-list::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%207.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203ZM8%206a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-2.5-5a1.5%201.5%200%201%201-3%200%201.5%201.5%200%200%201%203%200ZM5%2019.5a1.5%201.5%200%201%200%200-3%201.5%201.5%200%200%200%200%203Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-number-list::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%204h2v4H4V5H3V4Zm5%202a1%201%200%200%201%201-1h11a1%201%200%201%201%200%202H9a1%201%200%200%201-1-1Zm1%205a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm0%206a1%201%200%201%200%200%202h11a1%201%200%201%200%200-2H9Zm-3.5-7H6v1l-1.5%202H6v1H3v-1l1.667-2H3v-1h2.5ZM3%2017v-1h3v4H3v-1h2v-.5H4v-1h1V17H3Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-undo::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3%2014a1%201%200%200%200%201%201h6a1%201%200%201%200%200-2H6.257c2.247-2.764%205.151-3.668%207.579-3.264%202.589.432%204.739%202.356%205.174%205.405a1%201%200%200%200%201.98-.283c-.564-3.95-3.415-6.526-6.825-7.095C11.084%207.25%207.63%208.377%205%2011.39V8a1%201%200%200%200-2%200v6Zm2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-redo::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M21%2014a1%201%200%200%201-1%201h-6a1%201%200%201%201%200-2h3.743c-2.247-2.764-5.151-3.668-7.579-3.264-2.589.432-4.739%202.356-5.174%205.405a1%201%200%200%201-1.98-.283c.564-3.95%203.415-6.526%206.826-7.095%203.08-.513%206.534.614%209.164%203.626V8a1%201%200%201%201%202%200v6Zm-2-1Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-decrease-nesting-level::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-3.707-5.707a1%201%200%200%200%200%201.414l2%202a1%201%200%201%200%201.414-1.414L4.414%2012l1.293-1.293a1%201%200%200%200-1.414-1.414l-2%202Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-button--icon-increase-nesting-level::before {
background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5%206a1%201%200%200%201%201-1h12a1%201%200%201%201%200%202H6a1%201%200%200%201-1-1Zm4%205a1%201%200%201%200%200%202h9a1%201%200%201%200%200-2H9Zm-3%206a1%201%200%201%200%200%202h12a1%201%200%201%200%200-2H6Zm-2.293-2.293%202-2a1%201%200%200%200%200-1.414l-2-2a1%201%200%201%200-1.414%201.414L3.586%2012l-1.293%201.293a1%201%200%201%200%201.414%201.414Z%22%20fill%3D%22%23000%22%2F%3E%3C%2Fsvg%3E"); }
trix-toolbar .trix-dialogs {
position: relative; }
trix-toolbar .trix-dialog {
position: absolute;
top: 0;
left: 0;
right: 0;
font-size: 0.75em;
padding: 15px 10px;
background: #fff;
box-shadow: 0 0.3em 1em #ccc;
border-top: 2px solid #888;
border-radius: 5px;
z-index: 5; }
trix-toolbar .trix-input--dialog {
font-size: inherit;
font-weight: normal;
padding: 0.5em 0.8em;
margin: 0 10px 0 0;
border-radius: 3px;
border: 1px solid #bbb;
background-color: #fff;
box-shadow: none;
outline: none;
-webkit-appearance: none;
-moz-appearance: none; }
trix-toolbar .trix-input--dialog.validate:invalid {
box-shadow: #F00 0px 0px 1.5px 1px; }
trix-toolbar .trix-button--dialog {
font-size: inherit;
padding: 0.5em;
border-bottom: none; }
trix-toolbar .trix-dialog--link {
max-width: 600px; }
trix-toolbar .trix-dialog__link-fields {
display: flex;
align-items: baseline; }
trix-toolbar .trix-dialog__link-fields .trix-input {
flex: 1; }
trix-toolbar .trix-dialog__link-fields .trix-button-group {
flex: 0 0 content;
margin: 0; }
trix-editor [data-trix-mutable]:not(.attachment__caption-editor) {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none; }
trix-editor [data-trix-mutable]::-moz-selection,
trix-editor [data-trix-cursor-target]::-moz-selection, trix-editor [data-trix-mutable] ::-moz-selection {
background: none; }
trix-editor [data-trix-mutable]::selection,
trix-editor [data-trix-cursor-target]::selection, trix-editor [data-trix-mutable] ::selection {
background: none; }
trix-editor .attachment__caption-editor:focus[data-trix-mutable]::-moz-selection {
background: highlight; }
trix-editor .attachment__caption-editor:focus[data-trix-mutable]::selection {
background: highlight; }
trix-editor [data-trix-mutable].attachment.attachment--file {
box-shadow: 0 0 0 2px highlight;
border-color: transparent; }
trix-editor [data-trix-mutable].attachment img {
box-shadow: 0 0 0 2px highlight; }
trix-editor .attachment {
position: relative; }
trix-editor .attachment:hover {
cursor: default; }
trix-editor .attachment--preview .attachment__caption:hover {
cursor: text; }
trix-editor .attachment__progress {
position: absolute;
z-index: 1;
height: 20px;
top: calc(50% - 10px);
left: 5%;
width: 90%;
opacity: 0.9;
transition: opacity 200ms ease-in; }
trix-editor .attachment__progress[value="100"] {
opacity: 0; }
trix-editor .attachment__caption-editor {
display: inline-block;
width: 100%;
margin: 0;
padding: 0;
font-size: inherit;
font-family: inherit;
line-height: inherit;
color: inherit;
text-align: center;
vertical-align: top;
border: none;
outline: none;
-webkit-appearance: none;
-moz-appearance: none; }
trix-editor .attachment__toolbar {
position: absolute;
z-index: 1;
top: -0.9em;
left: 0;
width: 100%;
text-align: center; }
trix-editor .trix-button-group {
display: inline-flex; }
trix-editor .trix-button {
position: relative;
float: left;
color: #666;
white-space: nowrap;
font-size: 80%;
padding: 0 0.8em;
margin: 0;
outline: none;
border: none;
border-radius: 0;
background: transparent; }
trix-editor .trix-button:not(:first-child) {
border-left: 1px solid #ccc; }
trix-editor .trix-button.trix-active {
background: #cbeefa; }
trix-editor .trix-button:not(:disabled) {
cursor: pointer; }
trix-editor .trix-button--remove {
text-indent: -9999px;
display: inline-block;
padding: 0;
outline: none;
width: 1.8em;
height: 1.8em;
line-height: 1.8em;
border-radius: 50%;
background-color: #fff;
border: 2px solid highlight;
box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); }
trix-editor .trix-button--remove::before {
display: inline-block;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.7;
content: "";
background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.41%2017.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E");
background-position: center;
background-repeat: no-repeat;
background-size: 90%; }
trix-editor .trix-button--remove:hover {
border-color: #333; }
trix-editor .trix-button--remove:hover::before {
opacity: 1; }
trix-editor .attachment__metadata-container {
position: relative; }
trix-editor .attachment__metadata {
position: absolute;
left: 50%;
top: 2em;
transform: translate(-50%, 0);
max-width: 90%;
padding: 0.1em 0.6em;
font-size: 0.8em;
color: #fff;
background-color: rgba(0, 0, 0, 0.7);
border-radius: 3px; }
trix-editor .attachment__metadata .attachment__name {
display: inline-block;
max-width: 100%;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; }
trix-editor .attachment__metadata .attachment__size {
margin-left: 0.2em;
white-space: nowrap; }
.trix-content {
line-height: 1.5; }
.trix-content * {
box-sizing: border-box;
margin: 0;
padding: 0; }
.trix-content h1 {
font-size: 1.2em;
line-height: 1.2; }
.trix-content blockquote {
border: 0 solid #ccc;
border-left-width: 0.3em;
margin-left: 0.3em;
padding-left: 0.6em; }
.trix-content [dir=rtl] blockquote,
.trix-content blockquote[dir=rtl] {
border-width: 0;
border-right-width: 0.3em;
margin-right: 0.3em;
padding-right: 0.6em; }
.trix-content li {
margin-left: 1em; }
.trix-content [dir=rtl] li {
margin-right: 1em; }
.trix-content pre {
display: inline-block;
width: 100%;
vertical-align: top;
font-family: monospace;
font-size: 0.9em;
padding: 0.5em;
white-space: pre;
background-color: #eee;
overflow-x: auto; }
.trix-content img {
max-width: 100%;
height: auto; }
.trix-content .attachment {
display: inline-block;
position: relative;
max-width: 100%; }
.trix-content .attachment a {
color: inherit;
text-decoration: none; }
.trix-content .attachment a:hover, .trix-content .attachment a:visited:hover {
color: inherit; }
.trix-content .attachment__caption {
text-align: center; }
.trix-content .attachment__caption .attachment__name + .attachment__size::before {
content: ' \2022 '; }
.trix-content .attachment--preview {
width: 100%;
text-align: center; }
.trix-content .attachment--preview .attachment__caption {
color: #666;
font-size: 0.9em;
line-height: 1.2; }
.trix-content .attachment--file {
color: #333;
line-height: 1;
margin: 0 2px 2px 2px;
padding: 0.4em 1em;
border: 1px solid #bbb;
border-radius: 5px; }
.trix-content .attachment-gallery {
display: flex;
flex-wrap: wrap;
position: relative; }
.trix-content .attachment-gallery .attachment {
flex: 1 0 33%;
padding: 0 0.5em;
max-width: 33%; }
.trix-content .attachment-gallery.attachment-gallery--2 .attachment, .trix-content .attachment-gallery.attachment-gallery--4 .attachment {
flex-basis: 50%;
max-width: 50%; }

+ 3
- 1
app/controllers/application_controller.rb View File

@ -1,6 +1,8 @@
class ApplicationController < ActionController::Base
# http_basic_authenticate_with name: "stupid", password: "studio" if Rails.env.production?
http_basic_authenticate_with name: "stupid", password: "studio" if Rails.env.production?
private


+ 4
- 24
app/javascript/admin.js View File

@ -1,38 +1,18 @@
import "@hotwired/turbo-rails"
import "controllers"
import Trix from "trix"
import "lexxy"
// Bind ctrl + s to submit form
document.addEventListener('keydown', function (event) {
document.addEventListener("keydown", function (event) {
// Check if Ctrl key is pressed and the pressed key is 'S'
if ((event.ctrlKey || event.metaKey) && event.key === 's') {
if ((event.ctrlKey || event.metaKey) && event.key === "s") {
// Prevent the browser's default save action
event.preventDefault();
// Submit the form
const form = document.querySelector('.has--key-ctrls');
const form = document.querySelector(".has--key-ctrls");
if (form) {
form.requestSubmit();
}
}
});
// Trix
Trix.config.blockAttributes.heading2 = { tagName: "h2", terminal: true, breakOnReturn: true, group: false }
// Trix.config.blockAttributes.heading3 = { tagName: "h3", terminal: true, breakOnReturn: true, group: false }
document.addEventListener("trix-initialize", event => {
var buttonHTML
buttonHTML = '<button type="button" class="trix-button trix-button--icon trix-button--icon-heading-2" data-trix-attribute="heading2">Heading</button>';
const groupElement = event.target.toolbarElement.querySelector(".trix-button-group--block-tools .trix-button--icon-heading-1")
groupElement.insertAdjacentHTML("afterend", buttonHTML)
const { toolbarElement } = event.target
const inputElement = toolbarElement.querySelector("input[name=href]")
inputElement.type = "text"
inputElement.pattern = "(https?://|/).+"
})

+ 6
- 7
app/views/admin/attachments/_attachment.html.erb View File

@ -2,8 +2,8 @@
<div class="attachment__content">
<%= render partial: 'admin/attachments/asset', collection: Array(f.object.asset) %>
<%= render partial: 'material/trix_field_i18n',
locals: {
<%= render partial: 'material/lexxy_field_i18n',
locals: {
f: f,
attr: :body,
label: t('activerecord.attributes.attachment.body',
@ -14,13 +14,12 @@
</div>
<%= button_tag 'delete',
type: 'button',
data: { action: 'click->fields#removeField' },
class: 'destroy__field-btn' %>
type: 'button',
data: { action: 'click->fields#removeField' },
class: 'destroy__field-btn' %>
<%= f.hidden_field :_destroy, class: 'destroy__field' %>
<%= f.hidden_field :position, class: 'position' %>


+ 1
- 1
app/views/admin/nodes/_tree_node.html.erb View File

@ -27,7 +27,7 @@
</div>
<div class="cell actions">
<%= link_to 'edit', edit_admin_node_path(node), class:"icon size--medium round", data: {turbo_action: 'advance'} %>
<%= link_to 'edit', edit_admin_node_path(node), class:"icon size--medium round", data: { turbo_action: 'advance' } %>
<%= tag.div 'more_vert', class: 'handle' %>
</div>

+ 1
- 1
app/views/languages/_intro.html.erb View File

@ -3,7 +3,7 @@
<div class="animation-element">
<% if i == 0 %>
<div class="intro-content-header">
<%= decorate_divs_for_typewriting_effect(attachment.body) %>
<%= attachment.body %>
</div>
<% else %>
<div class="intro-content-body">


+ 2
- 1
app/views/layouts/admin.html.erb View File

@ -4,11 +4,12 @@
<title><%= content_for?(:title) ? yield(:title) : ENV['PROJECT_NAME_LONG'] %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="turbo-prefetch" content="false">
<meta name="turbo-cache-control" content="no-cache">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag "admin", "trix", "tom-select", "popup-menu", "forms", "lists", "assets", "nodes", "attachments" %>
<%= stylesheet_link_tag "admin", "lexxy", "tom-select", "popup-menu", "forms", "lists", "assets", "nodes", "attachments" %>
<%= javascript_importmap_tags 'admin' %>
</head>
<body>


+ 6
- 0
app/views/material/_lexxy_field.html.erb View File

@ -0,0 +1,6 @@
<%= content_tag :div, class: local_assigns[:class] do %>
<div class="lexxy__field">
<%= f.label attr, local_assigns[:label], for: nil unless local_assigns[:skip_label] %>
<%= f.rich_text_area attr %>
</div>
<%- end -%>

+ 16
- 0
app/views/material/_lexxy_field_i18n.html.erb View File

@ -0,0 +1,16 @@
<%= content_tag :div, class: 'lexxy__field-i18n' do %>
<%- available_locales.each do |locale| %>
<%- i18n_attr = "#{attr}_#{locale}" -%>
<%= render partial: 'material/lexxy_field',
locals: {
f: f,
attr: i18n_attr,
class: "i18n__input i18n__input-#{locale}",
label_class: '',
label: local_assigns[:label],
tmp_id: local_assigns[:tmp_id]
} %>
<%- end -%>
<%- end -%>

+ 0
- 13
app/views/material/_trix_field.html.erb View File

@ -1,13 +0,0 @@
<%= content_tag :div, class: local_assigns[:class] do %>
<div class="trix__field">
<%- trix_id = f.object.new_record? ? (local_assigns[:tmp_id] ? "#{dom_id(f.object, attr)}_#{local_assigns[:tmp_id]}" :
"#{attr}_new_#{model_name_from_record_or_class(f.object).param_key.pluralize}" ) :
dom_id(f.object, attr) -%>
<%= f.label attr, local_assigns[:label], for: nil unless local_assigns[:skip_label] %>
<%= f.hidden_field attr, id: trix_id %>
<trix-editor input="<%= trix_id %>"></trix-editor>
</div>
<%- end -%>

+ 0
- 16
app/views/material/_trix_field_i18n.html.erb View File

@ -1,16 +0,0 @@
<%= content_tag :div, class: 'trix__field-i18n' do %>
<%- available_locales.each do |locale| %>
<%- i18n_attr = "#{attr}_#{locale}" -%>
<%= render partial: 'material/trix_field',
locals: {
f: f,
attr: i18n_attr,
class: "i18n__input i18n__input-#{locale}",
label_class: '',
label: local_assigns[:label],
tmp_id: local_assigns[:tmp_id]
} %>
<%- end -%>
<%- end -%>

+ 1
- 1
config/application.rb View File

@ -9,7 +9,7 @@ require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
# require "action_mailbox/engine"
# require "action_text/engine"
require "action_text/engine"
require "action_view/railtie"
require "action_cable/engine"
require "rails/test_unit/railtie"


+ 1
- 1
config/importmap.rb View File

@ -9,7 +9,7 @@ pin "sortablejs" # @1.15.7
pin "stimulus-use" # @0.52.3
pin "@rails/request.js", to: "@rails--request.js.js" # @0.0.13
pin "@rails/activestorage", to: "@rails--activestorage.js" # @8.1.200
pin "trix" # @2.1.16
pin "lexxy", to: "lexxy.js"
pin "tom-select/dist/js/tom-select.base.min.js", to: "tom-select--dist--js--tom-select.base.min.js.js" # @2.4.3
# site_helper


+ 42
- 0
update_css.rb View File

@ -0,0 +1,42 @@
FILES = [
"app/assets/stylesheets/admin.css",
"app/assets/stylesheets/application.css",
"app/assets/stylesheets/assets.css",
"app/assets/stylesheets/attachments.css",
"app/assets/stylesheets/form.css",
"app/assets/stylesheets/forms.css",
"app/assets/stylesheets/lists.css",
"app/assets/stylesheets/nodes.css",
"app/assets/stylesheets/popup-menu.css",
"app/assets/stylesheets/sessions.css",
"app/assets/stylesheets/tom-select.css"
]
FILES.each do |file_path|
full_path = File.join(Dir.pwd, file_path)
next unless File.exist?(full_path)
content = File.read(full_path)
# 1. Recalculate rem values
# Improved regex to handle .75rem as well as 0.75rem and 1rem
content.gsub!(/(\d*\.\d+|\d+)rem/) do |match|
numeric_part = $1
val = numeric_part.to_f
new_val = (val * 0.625).to_r.to_f
formatted_val = new_val.to_s.gsub(/\.0$/, "")
# If the original was .75rem, we might want to keep the dot-only style,
# but 0.46875rem is more standard and safer.
"#{formatted_val}rem"
end
# 2. Update font-size/font from 10px to 16px
# Only inside font or font-size declarations
content.gsub!(/(font(?:-size)?\s*:\s*[^;]+;)/i) do |decl|
decl.gsub(/\b10px\b/, "16px")
end
File.write(full_path, content)
puts "Updated #{file_path}"
end

Loading…
Cancel
Save