Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nouveau système de navigation dans les sites Web #1977

Merged
merged 37 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
835d263
Done for websites !
arnaudlevy Jun 1, 2024
ef81842
order
arnaudlevy Jun 1, 2024
f870c62
commands color
arnaudlevy Jun 1, 2024
110c6bf
settings
arnaudlevy Jun 1, 2024
0b552ff
fix
arnaudlevy Jun 2, 2024
799582f
extranet
arnaudlevy Jun 2, 2024
f4a1a83
journals
arnaudlevy Jun 2, 2024
aed32b5
organizations
arnaudlevy Jun 2, 2024
009579f
better
arnaudlevy Jun 2, 2024
c083782
pages
arnaudlevy Jun 2, 2024
334366e
pages
arnaudlevy Jun 2, 2024
91e178e
pages
arnaudlevy Jun 2, 2024
2e8f22b
posts
arnaudlevy Jun 2, 2024
021f2b5
events
arnaudlevy Jun 2, 2024
e2a0e7d
projects
arnaudlevy Jun 2, 2024
ed1b185
done
arnaudlevy Jun 2, 2024
3676655
better
arnaudlevy Jun 2, 2024
3788678
menu
arnaudlevy Jun 2, 2024
8d7782a
fix
arnaudlevy Jun 2, 2024
3461fa1
authors
arnaudlevy Jun 2, 2024
68189ea
categories
arnaudlevy Jun 2, 2024
0755092
feature nav
arnaudlevy Jun 2, 2024
6e8f17a
website feature navs
arnaudlevy Jun 2, 2024
150d8a5
Merge branch 'main' into subnav
arnaudlevy Jun 2, 2024
84ffa24
settings
arnaudlevy Jun 3, 2024
e7873ab
breadcrumbs
arnaudlevy Jun 3, 2024
9c044d1
color
arnaudlevy Jun 3, 2024
bd094dc
small
arnaudlevy Jun 3, 2024
175cbd7
fix
arnaudlevy Jun 3, 2024
8e7028c
Merge branch 'main' into subnav
SebouChu Jun 3, 2024
f4d4f1f
fix
SebouChu Jun 3, 2024
1172710
fix
SebouChu Jun 3, 2024
75118b0
flexoki
SebouChu Jun 3, 2024
00c74a8
fix summernote
arnaudlevy Jun 3, 2024
ca63c0f
Merge branch 'main' into subnav
arnaudlevy Jun 3, 2024
e0816e9
fixes
arnaudlevy Jun 3, 2024
d098556
fix
arnaudlevy Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/assets/stylesheets/admin.sass
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Configuration
@import 'admin/functions'
@import 'admin/flexoki'
@import 'admin/variables'

// Vendors
Expand All @@ -18,5 +19,6 @@

// Admin
@import 'admin/design-system/*'
@import 'admin/components/*'
@import 'admin/dependencies/*'
@import 'admin/dependencies/*'
@import 'admin/osuny/*'
@import 'admin/components/*'
25 changes: 25 additions & 0 deletions app/assets/stylesheets/admin/_flexoki.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
$color-flexoki-black: #100F0F
$color-flexoki-950: #1C1B1A
$color-flexoki-900: #282726
$color-flexoki-850: #343331
$color-flexoki-800: #403E3C
$color-flexoki-700: #575653
$color-flexoki-600: #6F6E69
$color-flexoki-500: #878580
$color-flexoki-300: #B7B5AC
$color-flexoki-200: #CECDC3
$color-flexoki-150: #DAD8CE
$color-flexoki-100: #E6E4D9
$color-flexoki-50: #F2F0E5
$color-flexoki-paper: #FFFCF0
// $color-flexoki-paper: #FFFEFA // A11Y

$color-flexoki-red: #AF3029
$color-flexoki-orange: #BC5215
$color-flexoki-yellow: #AD8301
$color-flexoki-green: #66800B
// $color-flexoki-green: #4D6109 // A11Y
$color-flexoki-cyan: #24837B
$color-flexoki-blue: #205EA6
$color-flexoki-purple: #5E409D
$color-flexoki-magenta: #A02F6F
44 changes: 33 additions & 11 deletions app/assets/stylesheets/admin/_variables.sass
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
$color-bg: #FFFCF0
$color-bg-soft: #F2F0E5
$color-white: #FFFFFF
$color-black: $color-flexoki-black
$color-bg: $color-flexoki-paper
$color-bg-soft: $color-flexoki-50
$color-white: #FFFFFF

// MAIN COLORS
$color-accent: #0038FF
$color-text: #000000
$color-text-alt: #454545
$color-border: rgba(0, 0, 0, 0.1)
$color-background-alt: #F2F2F2
$color-background: #FFFFFF
$color-accent: #0038FF
$color-text: #000000
$color-text-alt: #454545
$color-border: rgba(0, 0, 0, 0.1)
$color-background-alt: #F2F2F2
$color-background: #FFFFFF

$color-commands: transparentize($color-background-alt, 0.1)
$color-commands: transparentize($color-bg-soft, 0.1)

$color-valid: #BEDABE

Expand All @@ -24,7 +25,28 @@ $spacing5: pxToRem(256)
$spacing-section-y: pxToRem(36)

// Bootstrap

$white: $color-flexoki-paper
$gray-100: $color-flexoki-100
$gray-200: $color-flexoki-200
$gray-300: $color-flexoki-300
$gray-400: $color-flexoki-300
$gray-500: $color-flexoki-500
$gray-600: $color-flexoki-600
$gray-700: $color-flexoki-700
$gray-800: $color-flexoki-800
$gray-900: $color-flexoki-900
$black: $color-flexoki-black

$primary: $color-flexoki-blue
$secondary: $color-flexoki-600
$success: $color-flexoki-green
$info: $color-flexoki-cyan
$warning: $color-flexoki-yellow
$danger: $color-flexoki-red
$light: $color-flexoki-100
$dark: $color-flexoki-900

$body-bg: $color-bg
$primary: $color-accent
$color-background-alt: #F5F5F5

Expand Down
10 changes: 10 additions & 0 deletions app/assets/stylesheets/admin/components/card.sass
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,23 @@
margin-bottom: $spacing1
overflow: hidden
transition: box-shadow 0.3s ease-in-out
&--horizontal
align-items: center
flex-direction: row
margin-bottom: 0
.osuny__thumbnail
height: 70px
width: 70px
&: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
.card-body,
.card-footer
line-height: 120%
.table
margin-bottom: 0
th,
Expand Down
3 changes: 2 additions & 1 deletion app/assets/stylesheets/admin/components/pagination.sass
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
background-color: $color-bg-soft
border-radius: $border-radius
display: inline-block
margin-top: $spacing1
line-height: 100%
margin-bottom: $spacing1
margin-top: $spacing1
padding: 2px
span
display: inline-block
Expand Down
3 changes: 0 additions & 3 deletions app/assets/stylesheets/admin/components/table.sass
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
color: $color-text-alt
font-size: $form-label-font-size
font-weight: normal
td,
th
background: transparent !important
th:first-of-type,
td:first-of-type
padding-left: 0
Expand Down
7 changes: 7 additions & 0 deletions app/assets/stylesheets/admin/components/treeview.sass
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.treeview
ul
margin-left: 74px
margin-top: 5px
&__element
a:not(.action)
text-decoration: none
& > .treeview__children .treeview__empty
display: none

& > .treeview__label
.close_text,
& > a .close_btn,
& > a .close_text
display: none
Expand All @@ -14,6 +18,7 @@
.close_btn--without_children
display: none

.open_text,
& > a .open_btn,
& > a .open_text
display: inline
Expand All @@ -39,9 +44,11 @@

&--opened
& > .treeview__label
.close_text,
& > a .close_btn,
& > a .close_text
display: inline
.open_text,
& > a .open_btn,
& > a .open_text
display: none
Expand Down
2 changes: 2 additions & 0 deletions app/assets/stylesheets/admin/dependencies/summernote.sass
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.summernote
.note-editor
&, &:hover
box-shadow: none
.note-toolbar
background-color: $color-bg
.note-editing-area
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/admin/design-system/forms.sass
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ input.form-control[type=tel],
input.form-control[type=password],
input.form-control[type=url],
textarea.form-control
background: $color-white
font-family: $font-family-serif

.form-control:valid,
Expand Down
3 changes: 1 addition & 2 deletions app/assets/stylesheets/admin/design-system/hero.sass
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.hero
margin-bottom: 30px
min-height: 300px
padding-bottom: 30px
min-height: 200px
.welcome
color: $color-text-alt
font-size: pxToRem(14)
40 changes: 38 additions & 2 deletions app/assets/stylesheets/admin/design-system/nav.sass
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
text-decoration: none

.commands
background: $color-commands
backdrop-filter: blur(6px)
background: $color-commands
@media screen and ( min-height: 700px )
bottom: 0
left: 0
Expand All @@ -64,4 +64,40 @@ nav[aria-label="breadcrumb"]
white-space: nowrap
&:last-of-type
padding-right: var(--bs-gutter-x)


.subnav
border-bottom: 1px solid $color-bg-soft
padding-bottom: 0
padding-top: 0
#subnav
justify-content: center
.navbar-toggler
border: none
padding-left: 0
a
border-top-color: transparent
border-top-style: solid
border-top-width: 5px
color: $color-text-alt
display: inline-block
line-height: 100%
margin: 0 30px
padding-bottom: 20px
padding-top: 15px
&:hover
color: $color-black
&.active
border-top-color: $color-black
color: $color-black

.feature-nav
line-height: 100%
*
margin-right: pxToRem(40)
h1
display: inline-block
a
color: $color-flexoki-600
display: inline-block
font-family: $font-family-serif
font-size: $h1-font-size
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ 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
Expand Down
9 changes: 9 additions & 0 deletions app/assets/stylesheets/admin/osuny/published.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.osuny__published
background-color: $color-flexoki-100
border-radius: 100%
display: inline-block
height: 10px
margin-right: 5px
width: 10px
&--true
background-color: $color-flexoki-green
21 changes: 21 additions & 0 deletions app/assets/stylesheets/admin/osuny/thumbnail.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.osuny__thumbnail
align-items: center
aspect-ratio: 1
background: $color-bg-soft
display: flex
justify-content: center
max-height: 100px
max-width: 100px
overflow: hidden
@include media-breakpoint-down(md)
display: none
&__initials
color: #CCCCCC
display: block
font-family: $font-family-serif
font-size: pxToRem(40)
&--large
max-height: 300px
max-width: 300px
&--uncropped
padding: 20%
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ class Admin::Communication::Extranets::ApplicationController < Admin::Communicat

protected

def current_subnav_context
'navigation/admin/communication/extranet' if @extranet && @extranet.persisted?
end

def breadcrumb
super
add_breadcrumb Communication::Extranet.model_name.human(count: 2), admin_communication_extranets_path
Expand Down
10 changes: 2 additions & 8 deletions app/controllers/admin/communication/extranets_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Admin::Communication::ExtranetsController < Admin::Communication::ApplicationController
class Admin::Communication::ExtranetsController < Admin::Communication::Extranets::ApplicationController
load_and_authorize_resource class: Communication::Extranet,
through: :current_university,
through_association: :communication_extranets
Expand All @@ -21,7 +21,7 @@ def new

def edit
breadcrumb
add_breadcrumb t('edit')
add_breadcrumb t('admin.subnav.settings')
end

def create
Expand Down Expand Up @@ -51,12 +51,6 @@ def destroy

protected

def breadcrumb
super
add_breadcrumb Communication::Extranet.model_name.human(count: 2), admin_communication_extranets_path
breadcrumb_for @extranet
end

def extranet_params
allowed_params = [
:name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Admin::Communication::Websites::Agenda::CategoriesController < Admin::Comm
def index
@root_categories = categories.root
@categories_class = categories_class
@feature_nav = 'navigation/admin/communication/website/agenda'
breadcrumb
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def index
@events = apply_scopes(@events).for_language(current_website_language)
.ordered_desc
.page(params[:page])
@root_categories = categories.root
@categories_class = Communication::Website::Agenda::Category
@feature_nav = 'navigation/admin/communication/website/agenda'
breadcrumb
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ def current_website_language
end
helper_method :current_website_language

def current_subnav_context
'navigation/admin/communication/website' if @website && @website.persisted?
end

def breadcrumb
super
add_breadcrumb Communication::Website.model_name.human(count: 2), admin_communication_websites_path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Admin::Communication::Websites::LocalizationsController < Admin::Communica

def show
breadcrumb
@feature_nav = 'navigation/admin/communication/website/settings'
arnaudlevy marked this conversation as resolved.
Show resolved Hide resolved
end

def update
Expand All @@ -23,7 +24,7 @@ def load_localization

def breadcrumb
super
add_breadcrumb helpers.language_name(current_website_language.iso_code)
add_breadcrumb t('admin.subnav.settings')
add_breadcrumb t('admin.communication.website.localizations.title')
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Admin::Communication::Websites::Portfolio::CategoriesController < Admin::C
def index
@root_categories = categories.root
@categories_class = categories_class
@feature_nav = 'navigation/admin/communication/website/portfolio'
breadcrumb
end

Expand Down
Loading
Loading