diff --git a/app/assets/stylesheets/admin/pure.sass b/app/assets/stylesheets/admin/pure.sass index 976a811f1c90f8230e72ad0b9d754dd9ee8da2cd..b7fbeb0d0b706bc0130c63de3045c10b4941ef11 100644 --- a/app/assets/stylesheets/admin/pure.sass +++ b/app/assets/stylesheets/admin/pure.sass @@ -1,3 +1,4 @@ +@import 'pure/utils' @import 'pure/fonts' @import 'pure/variables' @import 'bootstrap' diff --git a/app/assets/stylesheets/admin/pure/style.sass b/app/assets/stylesheets/admin/pure/style.sass index 31b55fcde25ed5169ae18bb03248dc4da4117229..0ce39d67a85b855d30572e8c5d2f0e9b21d6e0c8 100644 --- a/app/assets/stylesheets/admin/pure/style.sass +++ b/app/assets/stylesheets/admin/pure/style.sass @@ -28,6 +28,7 @@ opacity: 0.2 a color: white + text-decoration: underline text-decoration-color: #FFFFFF66 &:hover text-decoration-color: #FFFFFFFF @@ -46,29 +47,50 @@ h2 font-weight: bold .section - font-size: 14px + font-size: $h5-font-size margin-top: 60px !important padding-bottom: 10px border-bottom: 1px solid #00000033 a - transition: text-decoration 0.5s, color 0.5s - text-decoration: underline + text-decoration: none text-decoration-thickness: 1px text-underline-offset: 5px - text-decoration-color: adjust-color($primary, $alpha: -0.5) + transition: text-decoration 0.5s, color 0.5s + &:hover color: darken($primary, 10) - text-decoration-color: $primary + +.card + margin-bottom: $spacing2 + .card-header + .card-title + font-size: $h5-font-size + text-transform: uppercase + color: $color-text-alt + .card-body + margin-top: $spacing1 + +.list-group-item.active + color: $color-accent + font-weight: bold + +.btn-xs + font-size: 14px + padding: 2px 7px .commands - background: black + background: $color-background-alt position: fixed bottom: 0 left: 0 right: 0 z-index: 100 +.table + input[type=checkbox] + margin-right: 10px + footer min-height: 300px a diff --git a/app/assets/stylesheets/admin/pure/utils.sass b/app/assets/stylesheets/admin/pure/utils.sass new file mode 100644 index 0000000000000000000000000000000000000000..ecae55eb75f89242df3a22e4c4fa7f0745f548eb --- /dev/null +++ b/app/assets/stylesheets/admin/pure/utils.sass @@ -0,0 +1,3 @@ +@function px2rem($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/pure/variables.sass index 908bc49808c9c255379320baeed5fc33aa57adf0..2f18f22fa3b18a55d44c0ffbd5036a85857844c7 100644 --- a/app/assets/stylesheets/admin/pure/variables.sass +++ b/app/assets/stylesheets/admin/pure/variables.sass @@ -1,11 +1,33 @@ -$font-family-sans-serif: "Basier Square", sans-serif +// MAIN COLORS +$color-accent: #0038FF +$color-text: #000000 +$color-text-alt: #454545 +$color-border: rgba(0, 0, 0, 0.30) +$color-background-alt: #F2F2F2 +$color-background: #FFFFFF + +// Spacing +$spacing0: px2rem(10) +$spacing1: px2rem(20) +$spacing2: px2rem(40) +$spacing3: px2rem(60) +$spacing4: px2rem(120) +$spacing5: px2rem(240) + +// Bootstrap -$primary: #001AFF +$primary: $color-accent $color-background-alt: #F5F5F5 -$grid-gutter-width: 30px +$font-family-sans-serif: "Basier Square", sans-serif + +$grid-gutter-width: 60px $border-radius: 0 +$border-radius-sm: 0 +$border-radius-lg: 0 +$border-radius-xl: 0 +$border-radius-2xl: 0 $card-spacer-y: 0 $card-spacer-x: 0 @@ -15,3 +37,20 @@ $card-cap-bg: transparent $transition-collapse: height 0 $h2-font-size: 20px +$h5-font-size: px2rem(14) + +$table-cell-padding-x: 0 +$table-cell-padding-x-sm: 0 + +$badge-font-weight: normal + +$form-label-font-size: $h5-font-size + +$breadcrumb-font-size: $h5-font-size +$breadcrumb-padding-y: $spacing1 + +$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 diff --git a/app/helpers/admin/application_helper.rb b/app/helpers/admin/application_helper.rb index d310aaf50372ba8bab825e0f78b8305f9dd09b76..81df5fccd9cee15bd8b449d22719afbd2d905ef7 100644 --- a/app/helpers/admin/application_helper.rb +++ b/app/helpers/admin/application_helper.rb @@ -38,7 +38,7 @@ module Admin::ApplicationHelper end def preview_link - raw "<button class=\"btn btn-primary\" + raw "<button class=\"btn btn-primary btn-xs\" type=\"button\" data-bs-toggle=\"modal\" data-bs-target=\"#preview\" diff --git a/app/views/admin/communication/blocks/new.html.erb b/app/views/admin/communication/blocks/new.html.erb index c754eafd14b6f706d6edf2dbda4bf9f7c2cac48a..6ba41853285842a7419cdd8d0397e62ad768f132 100644 --- a/app/views/admin/communication/blocks/new.html.erb +++ b/app/views/admin/communication/blocks/new.html.erb @@ -25,9 +25,7 @@ <div class="card flex-fill"> <%= image_tag "communication/blocks/templates/#{kind}.jpg", alt: '', class:"card-img-top" %> <div class="card-body d-flex flex-column"> - <h5 class="card-title"> - <%= t "enums.communication.block.template_kind.#{kind}" %> - </h5> + <h4><%= t "enums.communication.block.template_kind.#{kind}" %></h4> <p class="mb-0"> <%= t "admin.communication.blocks.templates.#{kind}.description" %> </p> diff --git a/app/views/admin/communication/websites/posts/_list.html.erb b/app/views/admin/communication/websites/posts/_list.html.erb index bc30187722ff808aaefe4b83588f728a1b3d74a0..d608f73ce3297e6d8ecd6dc094d042d30889a09e 100644 --- a/app/views/admin/communication/websites/posts/_list.html.erb +++ b/app/views/admin/communication/websites/posts/_list.html.erb @@ -17,13 +17,7 @@ <% end %> <th><%= Communication::Website::Post.human_attribute_name('title') %></th> <th><%= Communication::Website::Post.human_attribute_name('featured_image') %></th> - <% unless hide_author %> - <th><%= Communication::Website::Post.human_attribute_name('author') %></th> - <% end %> - <% unless hide_category %> - <th><%= Communication::Website::Post.human_attribute_name('categories') %></th> - <% end %> - <th colspan="2"><%= Communication::Website::Post.human_attribute_name('published_at') %></th> + <th colspan="2"><%= Communication::Website::Post.human_attribute_name('meta') %></th> </tr> </thead> <tbody> @@ -39,20 +33,22 @@ class: "#{'draft' unless post.published?}" %></td> <td><%= image_tag post.featured_image.representation(resize: 'x100'), height: 50 if post.featured_image.attached? && post.featured_image.representable? %></td> - <% unless hide_author %> - <td><%= link_to post.author, admin_communication_website_author_path(website_id: post.website.id, id: post.author.id) if post.author %></td> - <% end %> - <% unless hide_category %> - <td> + <td> + <p class="small mb-0"> + <%= l post.published_at, format: :date_with_explicit_month if post.published_at %> + </p> + <% if !hide_author && post.author %> + <p class="small mb-0"> + <%= link_to post.author, admin_communication_website_author_path(website_id: post.website.id, id: post.author.id) %> + </p> + <% end %> + <% unless hide_category %> <ul class="list-unstyled mb-0"> <% post.categories.each do |category| %> - <li><%= link_to_if can?(:read, category), category, admin_communication_website_category_path(website_id: post.website.id, id: category.id) %></li> + <li><%= link_to_if can?(:read, category), category, admin_communication_website_category_path(website_id: post.website.id, id: category.id), class: 'small' %></li> <% end %> </ul> - </td> - <% end %> - <td> - <%= l post.published_at, format: :date_with_explicit_month if post.published_at %> + <% end %> <% if post.pinned %> <span class="badge bg-success"><%= Communication::Website::Post.human_attribute_name('pinned') %></span> <% end %> diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb index b2aec4f42e253293624f87d9e77db0c9426cfe2c..0343ab54df599b8d77919050467d074fe4ba115d 100644 --- a/app/views/admin/dashboard/index.html.erb +++ b/app/views/admin/dashboard/index.html.erb @@ -34,27 +34,6 @@ </div> </div> -<% if current_university.research_journals.any? && can?(:read, Research::Journal) %> - <h2 class="h4 my-4 section"><%= Research::Journal.model_name.human(count: 2) %></h2> - <div class="row"> - <% current_university.research_journals.each do |journal| %> - <% next unless can?(:read, journal) %> - <div class="<%= classes %>"> - <div class="card flex-fill"> - <div class="card-body"> - <span class="float-end"> - <i class="fas fa-<%= Icon::RESEARCH_JOURNAL %> fa-2x"></i> - </span> - <h4><%= journal %></h4> - <p> </p> - <%= link_to t('show'), [:admin, journal], class: button_classes('stretched-link') %> - </div> - </div> - </div> - <% end %> - </div> -<% end %> - <% if current_university.communication_websites.any? && can?(:read, Communication::Website) %> <h2 class="h4 my-4 section"><%= Communication::Website.model_name.human(count: 2) %></h2> <div class="row"> @@ -97,23 +76,46 @@ </div> <% end %> -<div class="small mt-5"> - <ul class="list-inline"> - <li class="list-inline-item"> - <%= link_to 'API', api_root_path %> - </li> - <% - [ - :terms_of_service, - :privacy_policy, - :cookies_policy - ].each do |term| %> +<% if current_university.research_journals.any? && can?(:read, Research::Journal) %> + <h2 class="h4 my-4 section"><%= Research::Journal.model_name.human(count: 2) %></h2> + <div class="row"> + <% current_university.research_journals.each do |journal| %> + <% next unless can?(:read, journal) %> + <div class="<%= classes %>"> + <div class="card flex-fill"> + <div class="card-body"> + <span class="float-end"> + <i class="fas fa-<%= Icon::RESEARCH_JOURNAL %> fa-2x"></i> + </span> + <h4><%= journal %></h4> + <p> </p> + <%= link_to t('show'), [:admin, journal], class: button_classes('stretched-link') %> + </div> + </div> + </div> + <% end %> + </div> +<% end %> + +<% if current_admin_theme == 'appstack' %> + <div class="small mt-5"> + <ul class="list-inline"> <li class="list-inline-item"> - <%= link_to t("#{term}"), t("#{term}_url"), target: '_blank', rel: 'noreferrer' %> + <%= link_to 'API', api_root_path %> </li> - <% end %> - <li class="list-inline-item"> - <%= link_to t('cookies_consent_choice'), '', class: 'js-gdpr__cookie_consent__display_again' %> - </li> - </ul> -</div> + <% + [ + :terms_of_service, + :privacy_policy, + :cookies_policy + ].each do |term| %> + <li class="list-inline-item"> + <%= link_to t("#{term}"), t("#{term}_url"), target: '_blank', rel: 'noreferrer' %> + </li> + <% end %> + <li class="list-inline-item"> + <%= link_to t('cookies_consent_choice'), '', class: 'js-gdpr__cookie_consent__display_again' %> + </li> + </ul> + </div> +<% end %> diff --git a/app/views/admin/layouts/themes/_pure.html.erb b/app/views/admin/layouts/themes/_pure.html.erb index 4f798216e65c229e1b6aef34eb402d2013203c06..b25b6463628fb1defc0e4331b440bdc180431b54 100644 --- a/app/views/admin/layouts/themes/_pure.html.erb +++ b/app/views/admin/layouts/themes/_pure.html.erb @@ -12,9 +12,6 @@ </div> </div> <% end %> - <div class="d-flex justify-content-between"> - <p class="text-end pt-1"><%= yield :title_right %></p> - </div> <%= yield %> <%= render 'admin/application/preview' %> </main> diff --git a/app/views/admin/layouts/themes/pure/_hero.html.erb b/app/views/admin/layouts/themes/pure/_hero.html.erb index 87d355c0df695db499b0e590264397ba04f22fda..335ec3484dfc98b6a3f11d75af77a83dada12356 100644 --- a/app/views/admin/layouts/themes/pure/_hero.html.erb +++ b/app/views/admin/layouts/themes/pure/_hero.html.erb @@ -1,6 +1,9 @@ <div class="hero"> <div class="container-fluid"> <h1><%= yield :title %></h1> + <div class="float-md-end mt-md-n4"> + <%= yield :title_right %> + </div> <%= render_breadcrumbs builder: Osuny::BreadcrumbsOnRailsBuilder %> </div> </div> \ No newline at end of file