update cnil-2023 (#82965) #431

Merged
tjund merged 6 commits from wip/82965-update-cnil-2023 into main 2023-11-08 11:59:01 +01:00
3 changed files with 92 additions and 18 deletions

View File

@ -55,6 +55,7 @@ a {
label {
color: $gray;
font-size: $fz-small;
font-weight: normal;
.required {
color: $error-color;
}
@ -108,6 +109,7 @@ $header-padding-mobile: 12px;
}
}
#logo.has-logo {
position: relative;
flex-grow: 1;
line-height: 0;
padding-top: $header-padding-desktop;
@ -127,7 +129,7 @@ $header-padding-mobile: 12px;
}
#toplinks {
position: static;
position: relative;
font-family: $ff-ss-serif;
font-size: $fz-xsmall;
margin-bottom: $header-padding-desktop;
@ -170,6 +172,17 @@ div.gru-nav {
margin: 0;
}
}
// hide nav to anonymous user
.anonymous-user {
.site-nav {
display: none;
}
#logo.has-logo {
@media ($max-mobile-viewport) {
padding-left: 0;
}
}
}
//
@ -187,6 +200,9 @@ main {
text-transform: none;
text-align: center;
font-family: $ff-ss-serif-cond;
strong {
font-weight: inherit;
}
}
}
@ -298,28 +314,60 @@ div.cell.foldable > div > h2:first-child {
.wcs-current-drafts-cell,
.wcs-current-forms-cell {
@extend .bordered-links-list;
.list-of-forms {
.form-title {
flex-grow: 1;
.gru-content &.cell {
// Forms counter
.cell--title, h2:first-child {
display: flex;
.cnil-forms-counter {
flex-grow: 1;
text-align: right;
color: $font-color;
margin-left: .66em;
}
}
.form-number {
flex-grow: 0;
font-family: $ff-serif;
font-weight: normal;
color: $font-color;
}
.form-status {
font-family: $ff-serif;
font-size: $fz-small;
color: $font-color;
@extend .bordered-links-list;
.list-of-forms {
.form-title {
flex-grow: 1;
font-family: $ff-serif;
}
.form-number {
flex-grow: 0;
font-family: $ff-serif;
font-weight: normal;
opacity: 1;
color: $gray;
font-size: $font-size-small;
}
.form-digest {
color: $font-color;
}
.form-status {
font-family: $ff-serif;
font-size: $fz-small;
color: $blue;
}
}
}
}
#sidebar .cell {
@extend .cell-light-title;
}
#sidebar {
.cell {
@extend .cell-light-title;
}
.tracking-code-input-cell form {
input {
margin-bottom: 1rem;
margin-top: 0;
}
button {
vertical-align: baseline;
margin-bottom: 1rem;
}
}
}
//
// WCS & Forms
@ -373,6 +421,7 @@ $form-padding: 1rem;
}
div#rub_service {
display: flow-root;
.drafts-recall,
form {
padding: $form-padding;
@ -401,6 +450,18 @@ div#rub_service {
flex-basis: calc(100% + #{$form-padding*2)};
}
}
div.dataview {
padding: $form-padding;
.label {
@extend label;
}
}
.back-home-button {
padding: $form-padding;
a {
@extend .arrow-link;
}
}
}
.widget-with-error {

View File

@ -60,6 +60,7 @@ $nav-item-hover-background: none;
$nav-item-hover-color: $nav-color;
$nav-mobile-menu-background: white;
$nav-mobile-menu-item-color: $nav-color;
$nav-after-image: false;
$title-font-family: $ff-ss-serif-cond;
$title-font-size: $fz-2;

12
static/cnil-2023/extra.js Normal file
View File

@ -0,0 +1,12 @@
// Add forms counter after cell title
$(document).on('combo:cell-loaded', function(e, cell){
const cellType = ["wcs-current-forms-cell", "wcs-current-drafts-cell"]
if (cellType.some(className => cell.classList.contains(className))) {
const title = cell.querySelector("h2")
const nbForms = cell.querySelectorAll('.list-of-forms > ul > li').length
const nbTag = document.createElement('span')
nbTag.classList.add('cnil-forms-counter')
nbTag.innerText = nbForms
title.appendChild(nbTag)
}
})