diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index 8194b57860ef2e23fb4e7a406909f0fcb43336f0..153570910d3affa77a7516de4624487eae8934f0 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -3,6 +3,4 @@ //= link_tree ../fonts //= link_directory ../stylesheets .css //= link_directory ../javascripts .js -//= link_directory ../stylesheets/admin .css -//= link_directory ../javascripts/admin .js //= link vue.js diff --git a/app/assets/images/avatar-neutral.png b/app/assets/images/avatar-neutral.png new file mode 100644 index 0000000000000000000000000000000000000000..6655c0fab4ffe97a493420d92757cd25a7ea8279 Binary files /dev/null and b/app/assets/images/avatar-neutral.png differ diff --git a/app/assets/javascripts/admin/pure.js b/app/assets/javascripts/admin.js similarity index 76% rename from app/assets/javascripts/admin/pure.js rename to app/assets/javascripts/admin.js index e986de4e9866be462d6b8c1b6de8f91a72275921..99e84621072f4e5df5e9c8bfe8d35f6ba8e8c98e 100644 --- a/app/assets/javascripts/admin/pure.js +++ b/app/assets/javascripts/admin.js @@ -16,10 +16,10 @@ //= require autocomplete-rails //= require codemirror/lib/codemirror //= require_self -//= require_tree ./commons -//= require_tree ../application/plugins -//= require_tree ./plugins -//= require_tree ./utils -//= require ./communication/init +//= require_tree ./admin/commons +//= require_tree ./application/plugins +//= require_tree ./admin/plugins +//= require_tree ./admin/utils +//= require admin/communication/init window.osuny = {}; diff --git a/app/assets/stylesheets/admin/pure.sass b/app/assets/stylesheets/admin.sass similarity index 57% rename from app/assets/stylesheets/admin/pure.sass rename to app/assets/stylesheets/admin.sass index 262cd6664afdaddab315624cc36d8853e210ffc7..9cdde746a0161078586fc6817de6012d3fd91d80 100644 --- a/app/assets/stylesheets/admin/pure.sass +++ b/app/assets/stylesheets/admin.sass @@ -1,8 +1,8 @@ -@import 'pure/utils' -@import 'pure/fonts' -@import 'pure/variables' -@import 'pure/mixins' -@import 'pure/grid' +// Configuration +@import 'admin/functions' +@import 'admin/variables' + +// Vendors @import 'bootstrap' @import 'bootstrap-icons/font/bootstrap-icons' @import 'font-awesome' @@ -12,9 +12,11 @@ @import 'summernote-bs5' @import 'cropperjs/dist/cropper' @import 'codemirror/lib/codemirror' -@import '../commons/*' + +// Commons @import 'commons/*' -@import 'pure/buttons' -@import 'pure/navigation' -@import 'pure/style' -@import 'pure/summernote' + +// Admin +@import 'admin/design-system/*' +@import 'admin/components/*' +@import 'admin/dependencies/*' \ No newline at end of file diff --git a/app/assets/stylesheets/admin/pure/utils.sass b/app/assets/stylesheets/admin/_functions.sass similarity index 67% rename from app/assets/stylesheets/admin/pure/utils.sass rename to app/assets/stylesheets/admin/_functions.sass index ecae55eb75f89242df3a22e4c4fa7f0745f548eb..0974320357ef0c02fbffe1ef86acddc74b8f9a59 100644 --- a/app/assets/stylesheets/admin/pure/utils.sass +++ b/app/assets/stylesheets/admin/_functions.sass @@ -1,3 +1,3 @@ -@function px2rem($size) +@function pxToRem($size) $remSize: $size / 16 @return #{$remSize}rem \ No newline at end of file diff --git a/app/assets/stylesheets/admin/pure/variables.sass b/app/assets/stylesheets/admin/_variables.sass similarity index 72% rename from app/assets/stylesheets/admin/pure/variables.sass rename to app/assets/stylesheets/admin/_variables.sass index 20991d75286e660fc79369401d74aedf44a3656f..e4502fc26602ec9a742b632b5fbefef26555b73e 100644 --- a/app/assets/stylesheets/admin/pure/variables.sass +++ b/app/assets/stylesheets/admin/_variables.sass @@ -1,4 +1,5 @@ $color-bg: #FFFCF0 +$color-white: #FFFFFF // MAIN COLORS $color-accent: #0038FF @@ -13,13 +14,13 @@ $color-commands: transparentize($color-background-alt, 0.1) $color-valid: #BEDABE // Spacing -$spacing0: px2rem(12) -$spacing1: px2rem(24) -$spacing2: px2rem(48) -$spacing3: px2rem(64) -$spacing4: px2rem(128) -$spacing5: px2rem(256) -$spacing-section-y: px2rem(36) +$spacing0: pxToRem(12) +$spacing1: pxToRem(24) +$spacing2: pxToRem(48) +$spacing3: pxToRem(64) +$spacing4: pxToRem(128) +$spacing5: pxToRem(256) +$spacing-section-y: pxToRem(36) // Bootstrap @@ -29,25 +30,21 @@ $color-background-alt: #F5F5F5 $font-family-serif: "Adelphe", serif $font-family-sans-serif: "InclusiveSans", sans-serif -// // -// $form-font-size: px2rem(16) -// $form-font - -$border-radius: 2px +$border-radius: 3px $border-radius-sm: $border-radius $border-radius-lg: $border-radius $border-radius-xl: $border-radius $border-radius-2xl: $border-radius $card-border-width: 0 -$card-cap-bg: $color-background-alt +$card-cap-bg: $color-background $card-cap-padding-y: $spacing0 -$card-bg: $color-background-alt +$card-bg: $color-white $transition-collapse: height 0 -$h2-font-size: px2rem(20) -$h5-font-size: px2rem(14) +$h2-font-size: pxToRem(20) +$h5-font-size: pxToRem(14) $table-cell-padding-x: 0 $table-cell-padding-x-sm: 0 @@ -66,4 +63,7 @@ $list-group-item-padding-x: 0 $list-group-active-bg: $color-background $list-group-active-border-color: $color-accent -$enable-negative-margins: true \ No newline at end of file +$enable-negative-margins: true + +$grid-gutter-width: 2rem + diff --git a/app/assets/stylesheets/admin/commons/forms.sass b/app/assets/stylesheets/admin/commons/forms.sass deleted file mode 100644 index 03b7a04e7fdc98f1fa9d828768090643a7305575..0000000000000000000000000000000000000000 --- a/app/assets/stylesheets/admin/commons/forms.sass +++ /dev/null @@ -1,7 +0,0 @@ -input.form-control[type=text], -input.form-control[type=email], -input.form-control[type=tel], -input.form-control[type=password], -input.form-control[type=url], -textarea.form-control - font-family: $font-family-serif \ No newline at end of file diff --git a/app/assets/stylesheets/admin/commons/style.sass b/app/assets/stylesheets/admin/commons/style.sass deleted file mode 100644 index 22ead9b5c8a828f79257b5116c7fb8555333b78d..0000000000000000000000000000000000000000 --- a/app/assets/stylesheets/admin/commons/style.sass +++ /dev/null @@ -1,25 +0,0 @@ -.draft - td - opacity: 0.5 - &:last-of-type // Buttons - opacity: 1 -.handle - cursor: move - -.a11y - &__status - &__icon - vertical-align: sub - -.img-circle - aspect-ratio: 1/1 - border-radius: 100% - object-fit: cover - width: 100% - -.lead - &--example - color: #999999 - -.logo - height: auto \ No newline at end of file diff --git a/app/assets/stylesheets/admin/commons/autocomplete.sass b/app/assets/stylesheets/admin/components/autocomplete.sass similarity index 100% rename from app/assets/stylesheets/admin/commons/autocomplete.sass rename to app/assets/stylesheets/admin/components/autocomplete.sass diff --git a/app/assets/stylesheets/admin/commons/batch-selectable.sass b/app/assets/stylesheets/admin/components/batch-selectable.sass similarity index 100% rename from app/assets/stylesheets/admin/commons/batch-selectable.sass rename to app/assets/stylesheets/admin/components/batch-selectable.sass diff --git a/app/assets/stylesheets/admin/components/blocks.sass b/app/assets/stylesheets/admin/components/blocks.sass new file mode 100644 index 0000000000000000000000000000000000000000..cf2e04e1c563059b4b34eff8530ce4a3d43bc880 --- /dev/null +++ b/app/assets/stylesheets/admin/components/blocks.sass @@ -0,0 +1,13 @@ +.blocks + &__category + &__description + margin-top: -4px +.block + &__image + border: 1px solid $color-border + margin-bottom: $spacing0 + &__title + font-size: pxToRem(18) + font-weight: bold + &__description + font-size: pxToRem(14) diff --git a/app/assets/stylesheets/admin/components/card.sass b/app/assets/stylesheets/admin/components/card.sass new file mode 100644 index 0000000000000000000000000000000000000000..37a37c62189407d0d82b3f4d6448258feecf27b2 --- /dev/null +++ b/app/assets/stylesheets/admin/components/card.sass @@ -0,0 +1,22 @@ +.card + box-shadow: 0px 2px 4px 0px rgba(16, 15, 15, 0.05) + margin-bottom: $spacing1 + overflow: hidden + transition: box-shadow 0.3s ease-in-out + &:hover + box-shadow: 4px 6px 8px 0 rgba(16, 15, 15, 0.1) + .card-title + font-size: pxToRem(18) + font-weight: bold + small + font-weight: normal + .table + margin-bottom: 0 + th, + td + padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x) + &.kind--selected + background: $color-accent + border-color: $color-accent + &, p, label + color: $color-background \ No newline at end of file diff --git a/app/assets/stylesheets/admin/commons/content-editor.sass b/app/assets/stylesheets/admin/components/content-editor.sass similarity index 98% rename from app/assets/stylesheets/admin/commons/content-editor.sass rename to app/assets/stylesheets/admin/components/content-editor.sass index eb83df4da1b3e142c3ebb9bd691ae5ffd9168833..2d6bef6a37134eb4e03ac7f6a55d5fdccd2cd145 100644 --- a/app/assets/stylesheets/admin/commons/content-editor.sass +++ b/app/assets/stylesheets/admin/components/content-editor.sass @@ -35,7 +35,7 @@ &__handle margin-left: 10px .fas - font-size: px2rem(13) + font-size: pxToRem(13) .handle margin-right: 0 &__preview diff --git a/app/assets/stylesheets/admin/commons/filters.sass b/app/assets/stylesheets/admin/components/filters.sass similarity index 100% rename from app/assets/stylesheets/admin/commons/filters.sass rename to app/assets/stylesheets/admin/components/filters.sass diff --git a/app/assets/stylesheets/admin/commons/offcanvas.sass b/app/assets/stylesheets/admin/components/offcanvas.sass similarity index 100% rename from app/assets/stylesheets/admin/commons/offcanvas.sass rename to app/assets/stylesheets/admin/components/offcanvas.sass diff --git a/app/assets/stylesheets/admin/commons/photo-import.sass b/app/assets/stylesheets/admin/components/photo-import.sass similarity index 100% rename from app/assets/stylesheets/admin/commons/photo-import.sass rename to app/assets/stylesheets/admin/components/photo-import.sass diff --git a/app/assets/stylesheets/admin/commons/preview.sass b/app/assets/stylesheets/admin/components/preview.sass similarity index 100% rename from app/assets/stylesheets/admin/commons/preview.sass rename to app/assets/stylesheets/admin/components/preview.sass diff --git a/app/assets/stylesheets/admin/commons/sidebar.sass b/app/assets/stylesheets/admin/components/sidebar.sass similarity index 100% rename from app/assets/stylesheets/admin/commons/sidebar.sass rename to app/assets/stylesheets/admin/components/sidebar.sass diff --git a/app/assets/stylesheets/admin/commons/table.sass b/app/assets/stylesheets/admin/components/table.sass similarity index 69% rename from app/assets/stylesheets/admin/commons/table.sass rename to app/assets/stylesheets/admin/components/table.sass index 22dfd95356b38416d99269d404ba401753d66ef8..e1322f157ea1f0e98aefaa912d8f304bd4af622b 100644 --- a/app/assets/stylesheets/admin/commons/table.sass +++ b/app/assets/stylesheets/admin/components/table.sass @@ -1,4 +1,10 @@ .table + input[type=checkbox] + margin-right: 10px + th + color: $color-text-alt + font-size: $form-label-font-size + font-weight: normal td, th background: transparent !important @@ -17,4 +23,4 @@ width: calc(100% + 25px) th:first-of-type, td:first-of-type - width: 25px \ No newline at end of file + width: 25px diff --git a/app/assets/stylesheets/admin/commons/treeview.sass b/app/assets/stylesheets/admin/components/treeview.sass similarity index 100% rename from app/assets/stylesheets/admin/commons/treeview.sass rename to app/assets/stylesheets/admin/components/treeview.sass diff --git a/app/assets/stylesheets/admin/commons/codemirror.sass b/app/assets/stylesheets/admin/dependencies/codemirror.sass similarity index 100% rename from app/assets/stylesheets/admin/commons/codemirror.sass rename to app/assets/stylesheets/admin/dependencies/codemirror.sass diff --git a/app/assets/stylesheets/admin/pure/summernote.sass b/app/assets/stylesheets/admin/dependencies/summernote.sass similarity index 100% rename from app/assets/stylesheets/admin/pure/summernote.sass rename to app/assets/stylesheets/admin/dependencies/summernote.sass diff --git a/app/assets/stylesheets/admin/pure/buttons.sass b/app/assets/stylesheets/admin/design-system/button.sass similarity index 100% rename from app/assets/stylesheets/admin/pure/buttons.sass rename to app/assets/stylesheets/admin/design-system/button.sass diff --git a/app/assets/stylesheets/admin/pure/fonts.sass b/app/assets/stylesheets/admin/design-system/fonts.sass similarity index 100% rename from app/assets/stylesheets/admin/pure/fonts.sass rename to app/assets/stylesheets/admin/design-system/fonts.sass diff --git a/app/assets/stylesheets/admin/design-system/footer.sass b/app/assets/stylesheets/admin/design-system/footer.sass new file mode 100644 index 0000000000000000000000000000000000000000..3ac0368549c55670a5401795a4d393737a830c2c --- /dev/null +++ b/app/assets/stylesheets/admin/design-system/footer.sass @@ -0,0 +1,5 @@ +footer + min-height: 300px + a + color: white + text-decoration: none \ No newline at end of file diff --git a/app/assets/stylesheets/admin/design-system/forms.sass b/app/assets/stylesheets/admin/design-system/forms.sass new file mode 100644 index 0000000000000000000000000000000000000000..57ad6832849b1a7028289eb812531420f242e6ed --- /dev/null +++ b/app/assets/stylesheets/admin/design-system/forms.sass @@ -0,0 +1,15 @@ +input.form-control[type=text], +input.form-control[type=email], +input.form-control[type=tel], +input.form-control[type=password], +input.form-control[type=url], +textarea.form-control + font-family: $font-family-serif + +.form-control:valid, +.form-control.is-valid, +.form-select:valid, +.form-select.is-valid + border-color: $color-valid +.form-label + color: $color-text-alt \ No newline at end of file diff --git a/app/assets/stylesheets/admin/design-system/hero.sass b/app/assets/stylesheets/admin/design-system/hero.sass new file mode 100644 index 0000000000000000000000000000000000000000..e18725a8cf4c7d985349c864be6108ed313570eb --- /dev/null +++ b/app/assets/stylesheets/admin/design-system/hero.sass @@ -0,0 +1,7 @@ +.hero + margin-bottom: 30px + min-height: 300px + padding-bottom: 30px + .welcome + color: $color-text-alt + font-size: pxToRem(14) diff --git a/app/assets/stylesheets/admin/design-system/image.sass b/app/assets/stylesheets/admin/design-system/image.sass new file mode 100644 index 0000000000000000000000000000000000000000..0cfd130ea6f5a2789ad3601de3db7564d60ee01f --- /dev/null +++ b/app/assets/stylesheets/admin/design-system/image.sass @@ -0,0 +1,5 @@ +.img-circle + aspect-ratio: 1/1 + border-radius: 100% + object-fit: cover + width: 100% diff --git a/app/assets/stylesheets/admin/design-system/layout.sass b/app/assets/stylesheets/admin/design-system/layout.sass new file mode 100644 index 0000000000000000000000000000000000000000..4ddf7561f22c5479fb5fb6b328f4354b8e00f070 --- /dev/null +++ b/app/assets/stylesheets/admin/design-system/layout.sass @@ -0,0 +1,13 @@ +body + background-color: $color-bg + +.container-fluid + padding-left: var(--bs-gutter-x) + padding-right: var(--bs-gutter-x) + @media (min-width: 768px) + --bs-gutter-x: 4rem + +main + min-height: 70vh + padding-bottom: pxToRem(100) + position: relative diff --git a/app/assets/stylesheets/admin/design-system/logo.sass b/app/assets/stylesheets/admin/design-system/logo.sass new file mode 100644 index 0000000000000000000000000000000000000000..dfe29defcb8b1696022e9907470a0b7d50a468db --- /dev/null +++ b/app/assets/stylesheets/admin/design-system/logo.sass @@ -0,0 +1,3 @@ +.logo + height: auto + diff --git a/app/assets/stylesheets/admin/pure/navigation.sass b/app/assets/stylesheets/admin/design-system/nav.sass similarity index 100% rename from app/assets/stylesheets/admin/pure/navigation.sass rename to app/assets/stylesheets/admin/design-system/nav.sass diff --git a/app/assets/stylesheets/admin/design-system/shame.sass b/app/assets/stylesheets/admin/design-system/shame.sass new file mode 100644 index 0000000000000000000000000000000000000000..539280cd3dafef376bf71e32bb44f257fd5bca34 --- /dev/null +++ b/app/assets/stylesheets/admin/design-system/shame.sass @@ -0,0 +1,59 @@ +.draft + td + opacity: 0.5 + &:last-of-type // Buttons + opacity: 1 +.handle + cursor: move + +.a11y + &__status + &__icon + vertical-align: sub + +.lead + &--example + color: #999999 + +.pure + &__section + margin-bottom: $spacing3 + h2 + font-family: $font-family-sans-serif + &__row--small + margin-left: calc(-.5 * #{$spacing1}) + margin-right: calc(-.5 * #{$spacing1}) + > * + padding-left: calc(.5 * #{$spacing1}) + padding-right: calc(.5 * #{$spacing1}) + &__chapter + &__image + @media (min-width: 992px) + margin-top: -200px + +.dashboard-index + .pure__section + .float-end + // No icon in cards + display: none + +.draggable-item + margin-bottom: $spacing1 + +section:first-of-type + .category + margin-top: 0 !important + +p + .form-label + margin-top: $spacing0 + +.list-group-item.active + color: $color-accent + font-weight: bold + +.sdfi-deletable-file__preview + margin-top: 10px + +.handle + margin-right: 10px + margin-top: 5px diff --git a/app/assets/stylesheets/admin/design-system/typography.sass b/app/assets/stylesheets/admin/design-system/typography.sass new file mode 100644 index 0000000000000000000000000000000000000000..bd600995f4c418807f2c77c72473cdb791cd479d --- /dev/null +++ b/app/assets/stylesheets/admin/design-system/typography.sass @@ -0,0 +1,37 @@ +h1, +h2 + font-family: $font-family-serif + +h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 + font-weight: normal + +p + color: $color-text + +.category + border-bottom: 1px solid $color-border + font-family: $font-family-sans-serif + font-size: $h5-font-size + font-weight: normal + margin-bottom: $spacing1 + margin-top: $spacing3 !important + padding-bottom: $spacing0 + text-transform: uppercase + +a + text-decoration: none + text-decoration-thickness: 1px + text-underline-offset: 4px + transition: text-decoration 0.5s, color 0.5s + &:hover + color: darken($primary, 10) + +.action + font-size: pxToRem(14) + text-decoration: underline + text-decoration-color: rgba(0, 0, 0, 0.2) + text-decoration-thickness: 1px + text-underline-offset: 4px + transition: text-decoration 0.5s + &:hover + text-decoration-color: black diff --git a/app/assets/stylesheets/admin/pure/grid.sass b/app/assets/stylesheets/admin/pure/grid.sass deleted file mode 100644 index c6dae827477440ca8bd6fb6c6e60a414f8e97888..0000000000000000000000000000000000000000 --- a/app/assets/stylesheets/admin/pure/grid.sass +++ /dev/null @@ -1,4 +0,0 @@ -* - @include root-prop(--bs-gutter-x, 64px !important) - @media (max-width: 768px) - @include root-prop(--bs-gutter-x, 32px !important) diff --git a/app/assets/stylesheets/admin/pure/mixins.sass b/app/assets/stylesheets/admin/pure/mixins.sass deleted file mode 100644 index 7c1207ae0a1aecb4c07f2df9ddf093bd93f213d4..0000000000000000000000000000000000000000 --- a/app/assets/stylesheets/admin/pure/mixins.sass +++ /dev/null @@ -1,3 +0,0 @@ -@mixin root-prop($prop: null, $value: null) - @if ($prop and $value) - #{$prop}: $value diff --git a/app/assets/stylesheets/admin/pure/style.sass b/app/assets/stylesheets/admin/pure/style.sass deleted file mode 100644 index dca0dfb1870850472bc1affe7026873c024d4775..0000000000000000000000000000000000000000 --- a/app/assets/stylesheets/admin/pure/style.sass +++ /dev/null @@ -1,148 +0,0 @@ -body - background-color: $color-bg -h1, -h2 - font-family: $font-family-serif -h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 - font-weight: normal -.pure - &__section - margin-bottom: $spacing3 - h2 - font-family: $font-family-sans-serif - &__row--small - margin-left: calc(-.5 * #{$spacing1}) - margin-right: calc(-.5 * #{$spacing1}) - > * - padding-left: calc(.5 * #{$spacing1}) - padding-right: calc(.5 * #{$spacing1}) - &__chapter - &__image - @media (min-width: 992px) - margin-top: -200px - -.dashboard-index - .pure__section - .float-end - // No icon in cards - display: none - -.draggable-item - margin-bottom: $spacing1 - -.hero - margin-bottom: 30px - min-height: 300px - padding-bottom: 30px - .welcome - color: $color-text-alt - font-size: px2rem(14) -main - min-height: 70vh - padding-bottom: px2rem(100) - position: relative - -.container-fluid - padding-left: var(--bs-gutter-x) - padding-right: var(--bs-gutter-x) - -p - color: $color-text - -.category - border-bottom: 1px solid $color-border - font-family: $font-family-sans-serif - font-size: $h5-font-size - font-weight: normal - margin-bottom: $spacing1 - margin-top: $spacing3 !important - padding-bottom: $spacing0 - text-transform: uppercase -section:first-of-type - .category - margin-top: 0 !important - -a - text-decoration: none - text-decoration-thickness: 1px - text-underline-offset: 4px - transition: text-decoration 0.5s, color 0.5s - &:hover - color: darken($primary, 10) - -.action - font-size: px2rem(14) - text-decoration: underline - text-decoration-color: rgba(0, 0, 0, 0.2) - text-decoration-thickness: 1px - text-underline-offset: 4px - transition: text-decoration 0.5s - &:hover - text-decoration-color: black - -.form-control:valid, -.form-control.is-valid, -.form-select:valid, -.form-select.is-valid - border-color: $color-valid -.form-label - color: $color-text-alt -p + .form-label - margin-top: $spacing0 - -.card - margin-bottom: $spacing1 - .card-title - font-size: px2rem(18) - font-weight: bold - small - font-weight: normal - .table - margin-bottom: 0 - th, - td - padding: var(--bs-card-cap-padding-y) var(--bs-card-cap-padding-x) - &.kind--selected - background: $color-accent - border-color: $color-accent - &, p, label - color: $color-background - -.list-group-item.active - color: $color-accent - font-weight: bold - -.blocks - &__category - &__description - margin-top: -4px -.block - &__image - border: 1px solid $color-border - margin-bottom: $spacing0 - &__title - font-size: px2rem(18) - font-weight: bold - &__description - font-size: px2rem(14) - -.sdfi-deletable-file__preview - margin-top: 10px - -.table - input[type=checkbox] - margin-right: 10px - th - color: $color-text-alt - font-size: $form-label-font-size - font-weight: normal - -.handle - margin-right: 10px - margin-top: 5px - -footer - min-height: 300px - a - color: white - text-decoration: none \ No newline at end of file diff --git a/app/assets/stylesheets/extranet/_functions.sass b/app/assets/stylesheets/extranet/_functions.sass index 14698742b628ac9bdcbf4d695cb9bdbf1f07001d..5606380815f057f97b9bc365f1d01123d5bf343a 100644 --- a/app/assets/stylesheets/extranet/_functions.sass +++ b/app/assets/stylesheets/extranet/_functions.sass @@ -1,4 +1,4 @@ -@function px2rem($size) +@function pxToRem($size) $remSize: $size / 16 @return #{$remSize}rem diff --git a/app/assets/stylesheets/extranet/_variables.sass b/app/assets/stylesheets/extranet/_variables.sass index bb22f27236cbbcb12bfc5807b76c1591c34193aa..de37946b8182d0159482270f77632ccf6b286c31 100644 --- a/app/assets/stylesheets/extranet/_variables.sass +++ b/app/assets/stylesheets/extranet/_variables.sass @@ -8,12 +8,12 @@ $font-family-sans-serif: "Basier Square", sans-serif $font-size-root: 1rem $font-size-base: 1.125rem -$h1-font-size: px2rem(60) -$h2-font-size: px2rem(24) -$h3-font-size: px2rem(18) +$h1-font-size: pxToRem(60) +$h2-font-size: pxToRem(24) +$h3-font-size: pxToRem(18) $headings-font-weight: 700 -$headings-margin-bottom: px2rem(24) -$small-font-size: px2rem(14) +$headings-margin-bottom: pxToRem(24) +$small-font-size: pxToRem(14) // Links $link-color: $primary @@ -32,7 +32,7 @@ $btn-facet-background-active: rgba(0, 0, 0, 0.3) $btn-facet-color: $primary // Breadcrumb -$breadcrumb-font-size: px2rem(14) +$breadcrumb-font-size: pxToRem(14) $breadcrumb-active-color: black $breadcrumb-divider-color: black diff --git a/app/assets/stylesheets/extranet/layout/_default.sass b/app/assets/stylesheets/extranet/layout/_default.sass index 101169d4715d8817fdb9af969d7cfdf64e2fe791..8135b352620bf0a71faedacd891772eadd7964ac 100644 --- a/app/assets/stylesheets/extranet/layout/_default.sass +++ b/app/assets/stylesheets/extranet/layout/_default.sass @@ -5,11 +5,11 @@ .action-show dl - line-height: px2rem(26) + line-height: pxToRem(26) dt font-size: $small-font-size dd - margin-bottom: px2rem(26) + margin-bottom: pxToRem(26) a text-decoration: underline text-decoration-color: adjust-color(black, $alpha: -0.8) diff --git a/app/assets/stylesheets/extranet/layout/_facets.sass b/app/assets/stylesheets/extranet/layout/_facets.sass index 253f06bbe4989457afec183a6d78a32172b444ef..2e7535ebace55004a772acd7a57f7c7e97172ad7 100644 --- a/app/assets/stylesheets/extranet/layout/_facets.sass +++ b/app/assets/stylesheets/extranet/layout/_facets.sass @@ -6,7 +6,7 @@ background: $btn-facet-background border: 0 color: $btn-facet-color - min-width: px2rem(52) + min-width: pxToRem(52) padding: 2px 7px .btn-check:checked + .btn-sm background: $btn-facet-background-active @@ -21,7 +21,7 @@ margin-bottom: 40px b display: block - margin-bottom: px2rem(10) + margin-bottom: pxToRem(10) .faceted__facet &__checkboxes @@ -46,7 +46,7 @@ display: inline-block margin-bottom: 10px margin-right: 10px - min-width: px2rem(52) + min-width: pxToRem(52) padding: 2px 7px &--selected background: $btn-facet-background-active diff --git a/app/assets/stylesheets/extranet/layout/_footer.sass b/app/assets/stylesheets/extranet/layout/_footer.sass index 177f77af40d8b256ca6c4c8791809a152fe97127..1a47bd6b237ba6c8a9abd22322b0f66a2cc328c7 100644 --- a/app/assets/stylesheets/extranet/layout/_footer.sass +++ b/app/assets/stylesheets/extranet/layout/_footer.sass @@ -10,7 +10,7 @@ footer nav a display: block - line-height: px2rem(26) + line-height: pxToRem(26) padding-bottom: 15px text-decoration: underline text-decoration-thickness: 1px diff --git a/app/assets/stylesheets/extranet/layout/_nav.sass b/app/assets/stylesheets/extranet/layout/_nav.sass index 38d89ae9c5eec7eaa80bb7d29ccfd83170a34dfb..7a6944298b4065d915715e205a4e72c03d0d6666 100644 --- a/app/assets/stylesheets/extranet/layout/_nav.sass +++ b/app/assets/stylesheets/extranet/layout/_nav.sass @@ -29,8 +29,8 @@ padding-left: var(--bs-navbar-nav-link-padding-x) .navbar-toggler border: 0 - font-size: px2rem(14) - line-height: px2rem(28) + font-size: pxToRem(14) + line-height: pxToRem(28) padding-right: 0 text-transform: uppercase .dropdown-toggle diff --git a/app/assets/stylesheets/extranet/layout/_typography.sass b/app/assets/stylesheets/extranet/layout/_typography.sass index 6f2a35b83c55f2753eca1e8a66d3654303d5124b..d854a43b94d4d5233858bc6e2198b4e949819e18 100644 --- a/app/assets/stylesheets/extranet/layout/_typography.sass +++ b/app/assets/stylesheets/extranet/layout/_typography.sass @@ -17,7 +17,7 @@ h1 font-weight: 700 line-height: 125% @include media-breakpoint-down(md) - font-size: px2rem(30) + font-size: pxToRem(30) a color: $active-color transition: text-decoration 0.5s, color 0.5s diff --git a/app/assets/stylesheets/extranet/pages/_experiences.sass b/app/assets/stylesheets/extranet/pages/_experiences.sass index efbd0e9f1e2ac2d8e276af2778eeab2d0b9b8366..e7f4f3dfe0239a233195a5451aef403f4fe4b571 100644 --- a/app/assets/stylesheets/extranet/pages/_experiences.sass +++ b/app/assets/stylesheets/extranet/pages/_experiences.sass @@ -1,5 +1,5 @@ .experience - line-height: px2rem(24) + line-height: pxToRem(24) position: relative &__organization__logo height: 100% \ No newline at end of file diff --git a/app/assets/stylesheets/extranet/pages/_home.sass b/app/assets/stylesheets/extranet/pages/_home.sass index b1b98acd41766fcad7fff9901bf01ad2d6ce2f78..e93aa64ad886c50776789f7b3c123a6504d780fd 100644 --- a/app/assets/stylesheets/extranet/pages/_home.sass +++ b/app/assets/stylesheets/extranet/pages/_home.sass @@ -36,7 +36,7 @@ li @include make-row border-bottom: 0 - margin-bottom: px2rem(16) + margin-bottom: pxToRem(16) > div @include make-col-ready &:nth-child(1) @@ -51,7 +51,7 @@ border-top: solid 1px $light-border-color display: flex justify-content: space-between - padding: px2rem(20) 0 + padding: pxToRem(20) 0 position: relative a @extend .stretched-link diff --git a/app/assets/stylesheets/extranet/pages/_person.sass b/app/assets/stylesheets/extranet/pages/_person.sass index e659fe32907045e38ec3989e2af3962ce8b0af5d..62e1fe5d9c3cbdf13ff59bd37e0014440d424531 100644 --- a/app/assets/stylesheets/extranet/pages/_person.sass +++ b/app/assets/stylesheets/extranet/pages/_person.sass @@ -1,5 +1,5 @@ .person - line-height: px2rem(24) + line-height: pxToRem(24) position: relative &__portrait margin-top: -130px diff --git a/app/assets/stylesheets/extranet/pages/_year.sass b/app/assets/stylesheets/extranet/pages/_year.sass index 4d99fb422cb7f90ae9d16682f0ea1e5df54573f5..70e2cddc32028f4fc168eb2efd389bfc69b1a11c 100644 --- a/app/assets/stylesheets/extranet/pages/_year.sass +++ b/app/assets/stylesheets/extranet/pages/_year.sass @@ -4,6 +4,6 @@ padding-left: 0 li @include pseudo-top-border - padding: px2rem(20) 0 + padding: pxToRem(20) 0 &:last-child @include pseudo-bottom-border \ No newline at end of file diff --git a/app/controllers/admin/university/people_controller.rb b/app/controllers/admin/university/people_controller.rb index 0bf0c24c607772a0db6b1bd995e7e2c3f1e61cee..09cb51bb0c2cf41d0c6ce9ef038224b4e2c1d71b 100644 --- a/app/controllers/admin/university/people_controller.rb +++ b/app/controllers/admin/university/people_controller.rb @@ -15,7 +15,7 @@ class Admin::University::PeopleController < Admin::University::ApplicationContro respond_to do |format| format.html { - @people = @people.page params[:page] + @people = @people.page(params[:page]).per(24) @categories = current_university.person_categories .for_language_id(current_university.default_language_id) .ordered diff --git a/app/views/admin/layouts/application.html.erb b/app/views/admin/layouts/application.html.erb index 201a43d486db31a5e2776482d536a4afc7e76e1a..c985a8671685b82978cfa060b4b23dca9d8819c5 100644 --- a/app/views/admin/layouts/application.html.erb +++ b/app/views/admin/layouts/application.html.erb @@ -9,7 +9,7 @@ <script nonce="<%= request.content_security_policy_nonce %>"> // Avoid opening menu on load </script> - <%= stylesheet_link_tag "admin/pure", media: 'all' %> + <%= stylesheet_link_tag "admin", media: 'all' %> <%= favicon_link_tag 'favicon.png' %> </head> <body class="<%= body_classes %>"> @@ -25,7 +25,7 @@ </main> <%= render "admin/layouts/themes/pure/commands" %> <%= render "admin/layouts/themes/pure/footer" %> - <%= javascript_include_tag 'admin/pure' %> + <%= javascript_include_tag 'admin' %> <%= render 'bugsnag' %> <%= render 'summernote_localization' %> </body> diff --git a/app/views/admin/layouts/preview.html.erb b/app/views/admin/layouts/preview.html.erb index e861d86b9802d122bc241e3090255792d90ceb17..2d82126841647103d95e1f01e260e60fcd457c9c 100644 --- a/app/views/admin/layouts/preview.html.erb +++ b/app/views/admin/layouts/preview.html.erb @@ -7,7 +7,7 @@ <% if @website %> <link rel="stylesheet" media="all" href="<%= admin_communication_website_style_path @website.id %>" /> <% else %> - <%= stylesheet_link_tag 'admin/pure', media: 'all' %> + <%= stylesheet_link_tag 'admin', media: 'all' %> <% end %> <style> /* diff --git a/app/views/admin/layouts/themes/pure/_footer.html.erb b/app/views/admin/layouts/themes/pure/_footer.html.erb index 26566428364079e082ef0e8284ca1c175228d2e6..25cf90346b9d72009f9a10d1903a40d4ddc70fa2 100644 --- a/app/views/admin/layouts/themes/pure/_footer.html.erb +++ b/app/views/admin/layouts/themes/pure/_footer.html.erb @@ -10,12 +10,11 @@ <p class="text-white"><%= t('admin.pending_tasks.text_html') %></p> </div> </div> - - <div class="d-flex justify-content-between mt-5 pt-5"> + <div class="d-md-flex justify-content-between mt-5 pt-5"> <%= link_to 'https://www.osuny.org', target: :_blank, class: 'text-white-50' do %> <%= t('admin.footer.signature') %> <% end %> - <ul class="list-inline"> + <ul class="list-unstyled d-md-flex"> <% [ ['Aide à la contribution', 'https://support.osuny.org'], @@ -25,7 +24,7 @@ ['Statut', 'https://status.osuny.org'], ].each do |item| %> - <li class="list-inline-item"> + <li> <%= link_to item.first, item.last, target: :_blank, class: 'text-white-50' %> </li> <% end %> diff --git a/app/views/admin/layouts/themes/pure/_hero.html.erb b/app/views/admin/layouts/themes/pure/_hero.html.erb index 855f0f44a4b485d2e19c882390486a4cbc9dea81..50a45e099d0d80712ba8a3d87b8b2b637138d14b 100644 --- a/app/views/admin/layouts/themes/pure/_hero.html.erb +++ b/app/views/admin/layouts/themes/pure/_hero.html.erb @@ -1,6 +1,6 @@ <div class="hero"> <div class="container-fluid"> - <% if controller_name == 'dashboard' && action_name == 'index' %> + <% if breadcrumbs.one? %> <div class="welcome py-4"> <%= t('hello', name: current_user.first_name) %> </div> @@ -8,7 +8,7 @@ <%= render_breadcrumbs builder: Osuny::BreadcrumbsOnRailsBuilder %> <% end %> <div class="d-xl-flex mt-5"> - <h1><%= yield :title %></h1> + <h1 class="mb-4"><%= yield :title %></h1> <div class="ms-xl-auto text-xl-end mt-2"> <%= yield :title_right %> </div> diff --git a/app/views/admin/university/people/_list.html.erb b/app/views/admin/university/people/_list.html.erb index eb9de1911c7339614d3f53c7376aae20b81b4482..81eb0a1d3e914b0fee0e52a40925e60e8f2479ea 100644 --- a/app/views/admin/university/people/_list.html.erb +++ b/app/views/admin/university/people/_list.html.erb @@ -26,20 +26,22 @@ </ul> <div class="tab-content mb-4" id="myTabContent"> <div class="tab-pane show active" id="grid-tab-pane" role="tabpanel" aria-labelledby="grid-tab" tabindex="0"> - <div class="row"> + <div class="row mt-1 g-4"> <% people.each do |person| %> - <div class="col-sm-6 col-lg-3"> - <div class="position-relative mt-5"> + <div class="col-6 col-lg-3 col-xxl-2"> + <div class="card mb-0"> <% if person.best_picture.attached? %> <%= kamifusen_tag person.best_picture, - width: 60, - class: 'rounded-circle d-block' %> + width: 240, + class: 'card-img-top img-fluid' %> <% else %> - <div class="bg-light rounded-circle" style="width: 60px; height: 60px"></div> + <%= image_tag 'avatar-neutral.png', class: 'card-img-top' %> <% end %> - <p class="mt-2 mb-0"><%= person %></p> - <p class="small text-muted mb-0"><%= person.summary %></p> - <%= link_to t('show'), admin_university_person_path(person), class: 'action stretched-link' %> + <div class="card-body"> + <p><%= person %></p> + <p class="small text-muted mb-0"><%= person.summary %></p> + <%= link_to t('show'), admin_university_person_path(person), class: 'action stretched-link' %> + </div> </div> </div> <% end %> diff --git a/app/views/api/layouts/application.html.erb b/app/views/api/layouts/application.html.erb index 1053513aec3a9f60eb18b13556c008ad70ed8bce..e72845625033920b5d39003b9e3f3f80e9e058f4 100644 --- a/app/views/api/layouts/application.html.erb +++ b/app/views/api/layouts/application.html.erb @@ -6,8 +6,8 @@ <title><%= yield :title %></title> <%= csrf_meta_tags %> <%= csp_meta_tag %> - <%= stylesheet_link_tag 'admin/pure', media: 'all' %> - <%= javascript_include_tag 'admin/pure' %> + <%= stylesheet_link_tag 'admin', media: 'all' %> + <%= javascript_include_tag 'admin' %> <%= favicon_link_tag 'favicon.png' %> </head> <body> diff --git a/app/views/layouts/devise.html.erb b/app/views/layouts/devise.html.erb index 000eabb5890ec72efdf228bf6aa7704a32525983..9e7d9b5f27243359ffe352e386890f5143b11694 100644 --- a/app/views/layouts/devise.html.erb +++ b/app/views/layouts/devise.html.erb @@ -6,7 +6,7 @@ <title><%= yield :title %></title> <%= csrf_meta_tags %> <%= csp_meta_tag %> - <%= stylesheet_link_tag "admin/pure", media: 'all' %> + <%= stylesheet_link_tag "admin", media: 'all' %> <%= javascript_include_tag 'devise' %> <%= favicon_link_tag 'favicon.png' %> </head> diff --git a/app/views/server/layouts/application.html.erb b/app/views/server/layouts/application.html.erb index 99c2a52ad678271333c5396629076d85383f1754..32a73fd2692fd292fe27ea200fa91c38c2e57a64 100644 --- a/app/views/server/layouts/application.html.erb +++ b/app/views/server/layouts/application.html.erb @@ -9,7 +9,7 @@ <script nonce="<%= request.content_security_policy_nonce %>"> // Avoid opening menu on load </script> - <%= stylesheet_link_tag 'admin/pure', media: 'all' %> + <%= stylesheet_link_tag 'admin', media: 'all' %> <%= favicon_link_tag 'favicon.png' %> </head> <body class="<%= body_classes %>">