Merge branch 'master' of gogs-figureslibres.io:bachir/popsu-d9
This commit is contained in:
commit
48454bd99e
@ -1339,40 +1339,75 @@ footer {
|
|||||||
text-align: center; }
|
text-align: center; }
|
||||||
|
|
||||||
.path-centre-de-ressources {
|
.path-centre-de-ressources {
|
||||||
background-color: #f2f6fc; }
|
background-color: #f8f8fb; }
|
||||||
.path-centre-de-ressources .content_container > div > h2:first-child {
|
.path-centre-de-ressources .content_container > div > h2:first-child {
|
||||||
text-align: center; }
|
text-align: center;
|
||||||
|
background-color: #98d0d9;
|
||||||
|
padding: 1rem 0; }
|
||||||
.path-centre-de-ressources form {
|
.path-centre-de-ressources form {
|
||||||
|
background-color: #98d0d9;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 10% repeat(4, 20%); }
|
padding: 0 0 5rem 0;
|
||||||
|
column-gap: 1rem;
|
||||||
|
grid-template-columns: calc(10% - 3em) repeat(4, 20%); }
|
||||||
.path-centre-de-ressources form > div:first-child {
|
.path-centre-de-ressources form > div:first-child {
|
||||||
grid-column-start: 2; }
|
grid-column-start: 2; }
|
||||||
.path-centre-de-ressources form select {
|
.path-centre-de-ressources form .form-item-combine {
|
||||||
|
grid-row: 1 / span 1;
|
||||||
|
grid-column-start: 2; }
|
||||||
|
.path-centre-de-ressources form .form-item-programme {
|
||||||
|
grid-column-start: 2; }
|
||||||
|
.path-centre-de-ressources form .form-item-items-per-page {
|
||||||
|
grid-column-start: 2; }
|
||||||
|
.path-centre-de-ressources form select, .path-centre-de-ressources form input {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: auto;
|
width: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 0.6rem;
|
font-size: 0.6rem;
|
||||||
padding: .3rem .1rem;
|
padding: .3rem 1rem;
|
||||||
height: auto; }
|
height: auto; }
|
||||||
.path-centre-de-ressources form div {
|
.path-centre-de-ressources form div {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: auto;
|
width: auto; }
|
||||||
padding: .5rem 1rem; }
|
.path-centre-de-ressources form .form-actions {
|
||||||
|
grid-column: 4 / span 2;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
align-items: center;
|
||||||
|
column-gap: 1rem; }
|
||||||
|
.path-centre-de-ressources form .form-actions input {
|
||||||
|
background-color: transparent;
|
||||||
|
border: solid 1px black;
|
||||||
|
box-shadow: none; }
|
||||||
|
.path-centre-de-ressources .views-view-grid {
|
||||||
|
margin-top: 3rem; }
|
||||||
.path-centre-de-ressources .views-view-grid .views-row {
|
.path-centre-de-ressources .views-view-grid .views-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 10% 20% 20% 20% 20% 10%; }
|
column-gap: 1rem;
|
||||||
|
row-gap: 1rem;
|
||||||
|
grid-template-columns: calc(10% - 3em) repeat(4, 20%); }
|
||||||
.path-centre-de-ressources .views-view-grid .views-row .views-col:first-child {
|
.path-centre-de-ressources .views-view-grid .views-row .views-col:first-child {
|
||||||
grid-column-start: 2; }
|
grid-column-start: 2; }
|
||||||
.path-centre-de-ressources .views-view-grid .views-col {
|
.path-centre-de-ressources .views-view-grid .views-col {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 20% 80%;
|
||||||
|
align-items: stretch;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
background-clip: content-box;
|
background-clip: content-box;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
padding: .3rem; }
|
padding: .3rem; }
|
||||||
.path-centre-de-ressources .views-view-grid .views-col a {
|
.path-centre-de-ressources .views-view-grid .views-col a {
|
||||||
text-decoration: none; }
|
text-decoration: none; }
|
||||||
|
.path-centre-de-ressources .views-view-grid .views-col a:hover {
|
||||||
|
text-decoration: underline; }
|
||||||
.path-centre-de-ressources .views-view-grid .views-col .views-field:not(:first-child) {
|
.path-centre-de-ressources .views-view-grid .views-col .views-field:not(:first-child) {
|
||||||
padding: 0 0 0 .4rem; }
|
padding: 0 0 0 .4rem; }
|
||||||
|
.path-centre-de-ressources .views-view-grid .views-col .views-field-field-image {
|
||||||
|
grid-row: 2 / span 2; }
|
||||||
.path-centre-de-ressources .views-view-grid .views-col .views-field-field-programme {
|
.path-centre-de-ressources .views-view-grid .views-col .views-field-field-programme {
|
||||||
|
grid-row: 1 / span 1;
|
||||||
|
grid-column: 1 / span 2; }
|
||||||
|
.path-centre-de-ressources .views-view-grid .views-col .views-field-field-programme .field-content {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: auto;
|
width: auto;
|
||||||
@ -1382,13 +1417,22 @@ footer {
|
|||||||
margin-bottom: 1rem; }
|
margin-bottom: 1rem; }
|
||||||
.path-centre-de-ressources .views-view-grid .views-col .views-field-field-type-de-ressource {
|
.path-centre-de-ressources .views-view-grid .views-col .views-field-field-type-de-ressource {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 500;
|
font-size: 600;
|
||||||
margin-bottom: .5rem; }
|
margin-bottom: .5rem;
|
||||||
|
font-size: 0.45rem;
|
||||||
|
grid-row: 2 / span 1;
|
||||||
|
grid-column: 2 / span 1; }
|
||||||
.path-centre-de-ressources .views-view-grid .views-col .views-field-title {
|
.path-centre-de-ressources .views-view-grid .views-col .views-field-title {
|
||||||
font-style: italic; }
|
font-style: italic;
|
||||||
|
grid-row: 3 / span 1;
|
||||||
|
grid-column: 2 / span 1; }
|
||||||
.path-centre-de-ressources .views-view-grid .views-col .views-field-field-sous-titre {
|
.path-centre-de-ressources .views-view-grid .views-col .views-field-field-sous-titre {
|
||||||
margin-bottom: 1rem; }
|
margin-bottom: 1rem;
|
||||||
|
grid-row: 4 / span 1;
|
||||||
|
grid-column: 2 / span 1; }
|
||||||
.path-centre-de-ressources .views-view-grid .views-col .views-field-field-theme {
|
.path-centre-de-ressources .views-view-grid .views-col .views-field-field-theme {
|
||||||
|
grid-row: 5 / span 1;
|
||||||
|
grid-column: 1 / span 2;
|
||||||
font-size: 0.45rem; }
|
font-size: 0.45rem; }
|
||||||
|
|
||||||
article h2 {
|
article h2 {
|
||||||
|
File diff suppressed because one or more lines are too long
@ -20,17 +20,6 @@ function popsu_preprocess_views_view_unformatted(&$variables) {
|
|||||||
|
|
||||||
$view = $variables['view'];
|
$view = $variables['view'];
|
||||||
if($view->id() == "programmes"){
|
if($view->id() == "programmes"){
|
||||||
$rows = $variables['rows'];
|
|
||||||
foreach ($rows as $id => $row) {
|
|
||||||
$variables['rows'][$id]['attributes'] = new Attribute();
|
|
||||||
$c = $variables['rows'][$id]['content']["#row"]->nid;
|
|
||||||
$variables['rows'][$id]['attributes']->addClass("popsu-node-".$c);
|
|
||||||
//kint($variables['rows'][$id]['content']["#row"]->nid);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}else{
|
|
||||||
if ($view->current_display == "block_1") {
|
|
||||||
$rows = $variables['rows'];
|
$rows = $variables['rows'];
|
||||||
foreach ($rows as $id => $row) {
|
foreach ($rows as $id => $row) {
|
||||||
$variables['rows'][$id]['attributes'] = new Attribute();
|
$variables['rows'][$id]['attributes'] = new Attribute();
|
||||||
@ -39,7 +28,6 @@ function popsu_preprocess_views_view_unformatted(&$variables) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* implements template_preprocess_region() */
|
/* implements template_preprocess_region() */
|
||||||
@ -49,30 +37,25 @@ function popsu_preprocess_region(&$variables) {
|
|||||||
if (isset($variables['region'])) {
|
if (isset($variables['region'])) {
|
||||||
$variables['attributes']['class'][] = $variables['region'].'_container';
|
$variables['attributes']['class'][] = $variables['region'].'_container';
|
||||||
}
|
}
|
||||||
// if ($variables['region'] == 'footer_bottom_right') {
|
|
||||||
// if ($node = \Drupal::routeMatch()->getParameter('node')) {
|
|
||||||
// $t = $node->getType();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// function popsu_preprocess_field(&$variables){
|
|
||||||
// $v = $variables;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// function popsu_theme_suggestions_views_view_alter(array &$suggestions, array $variables) {
|
|
||||||
// $v = $variables;
|
|
||||||
// $suggestions[] = 'views_view__headerView';
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements hook_preprocess_block().
|
* Implements hook_preprocess_block().
|
||||||
*/
|
*/
|
||||||
// function popsu_preprocess_block(&$variables) {
|
|
||||||
// $t="t";
|
function popsu_preprocess_views_view_fields(&$variables){
|
||||||
// }
|
|
||||||
|
$entity = $variables['row']->_entity;
|
||||||
|
if($entity->hasField('field_programme')){
|
||||||
|
$target_id = $entity->get('field_programme')->getString();
|
||||||
|
//kint($variables['row']);die();
|
||||||
|
// $variables['row']['attributes'] = new Attribute();
|
||||||
|
// $variables['row']['attributes']->addClass("pouet-node-".$target_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function popsu_preprocess_views_view_field(&$variables){
|
function popsu_preprocess_views_view_field(&$variables){
|
||||||
// check if link to entoty option is true
|
// check if link to entoty option is true
|
||||||
@ -80,14 +63,16 @@ function popsu_preprocess_views_view_field(&$variables){
|
|||||||
if ($settings && isset($settings['link_to_entity']) && $settings['link_to_entity']) {
|
if ($settings && isset($settings['link_to_entity']) && $settings['link_to_entity']) {
|
||||||
// get the entity and build the classes
|
// get the entity and build the classes
|
||||||
$entity = $variables['row']->_entity;
|
$entity = $variables['row']->_entity;
|
||||||
// $target_id = $entity;
|
|
||||||
// build new classes
|
// build new classes
|
||||||
$new_classes = array(
|
$new_classes = array(
|
||||||
$entity->getEntityTypeId(),
|
$entity->getEntityTypeId(),
|
||||||
$entity->getEntityTypeId().'-'.$entity->bundle(),
|
$entity->getEntityTypeId().'-'.$entity->bundle(),
|
||||||
$entity->getEntityTypeId().'-'.$entity->bundle().'-'.$entity->id()
|
$entity->getEntityTypeId().'-'.$entity->bundle().'-'.$entity->id(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// get the entity link and url
|
// get the entity link and url
|
||||||
$link = $entity->toLink();
|
$link = $entity->toLink();
|
||||||
$url = $entity->toLink()->getUrl();
|
$url = $entity->toLink()->getUrl();
|
||||||
|
@ -1,42 +1,85 @@
|
|||||||
.path-centre-de-ressources{
|
.path-centre-de-ressources{
|
||||||
background-color: rgb(242, 246, 252);
|
background-color: #f8f8fb;
|
||||||
.content_container{
|
.content_container{
|
||||||
&>div>h2:first-child{
|
&>div>h2:first-child{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
background-color: #98d0d9;
|
||||||
|
padding: 1rem 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
form{
|
form{
|
||||||
|
background-color: #98d0d9;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 10% repeat(4, 20%);
|
padding: 0 0 5rem 0;
|
||||||
|
column-gap: 1rem;
|
||||||
|
grid-template-columns: calc(10% - 3em) repeat(4, 20%);
|
||||||
&>div:first-child{
|
&>div:first-child{
|
||||||
grid-column-start: 2;
|
grid-column-start: 2;
|
||||||
}
|
}
|
||||||
select{
|
.form-item-combine{
|
||||||
|
grid-row: 1 / span 1 ;
|
||||||
|
grid-column-start: 2;
|
||||||
|
}
|
||||||
|
.form-item-programme{
|
||||||
|
|
||||||
|
grid-column-start: 2;
|
||||||
|
}
|
||||||
|
.form-item-items-per-page{
|
||||||
|
grid-column-start: 2;
|
||||||
|
}
|
||||||
|
select, input{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: auto;
|
width: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: $font-normal;
|
font-size: $font-normal;
|
||||||
padding: .3rem .1rem;
|
padding: .3rem 1rem;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
div{
|
div{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: auto;
|
width: auto;
|
||||||
padding: .5rem 1rem;
|
// padding: .5rem 1rem;
|
||||||
|
}
|
||||||
|
.form-actions{
|
||||||
|
grid-column: 4 / span 2;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
align-items: center;
|
||||||
|
column-gap: 1rem;
|
||||||
|
input{
|
||||||
|
background-color: transparent;
|
||||||
|
border: solid 1px black;
|
||||||
|
box-shadow: none;
|
||||||
|
&:first-child{
|
||||||
|
// margin-right: .5rem;
|
||||||
|
}
|
||||||
|
&:last-child{
|
||||||
|
// margin-left: .5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.views-view-grid{
|
.views-view-grid{
|
||||||
|
margin-top: 3rem;
|
||||||
.views-row{
|
.views-row{
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 10% 20% 20% 20% 20% 10%;
|
column-gap: 1rem;
|
||||||
|
row-gap: 1rem;
|
||||||
|
grid-template-columns: calc(10% - 3em) repeat(4, 20%);
|
||||||
.views-col:first-child{
|
.views-col:first-child{
|
||||||
grid-column-start: 2;
|
grid-column-start: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.views-col{
|
.views-col{
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 20% 80%;
|
||||||
|
align-items: stretch;
|
||||||
a{
|
a{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
&:hover{
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
background-color: rgb(255, 255, 255);
|
background-color: rgb(255, 255, 255);
|
||||||
background-clip: content-box;
|
background-clip: content-box;
|
||||||
@ -45,7 +88,15 @@
|
|||||||
.views-field:not(:first-child){
|
.views-field:not(:first-child){
|
||||||
padding: 0 0 0 .4rem;
|
padding: 0 0 0 .4rem;
|
||||||
}
|
}
|
||||||
|
.views-field-field-image{
|
||||||
|
grid-row: 2 / span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.views-field-field-programme{
|
.views-field-field-programme{
|
||||||
|
grid-row: 1 / span 1;
|
||||||
|
grid-column: 1 / span 2;
|
||||||
|
.field-content{
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: auto;
|
width: auto;
|
||||||
@ -54,24 +105,37 @@
|
|||||||
padding: .15rem .3rem;
|
padding: .15rem .3rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
.views-field-field-type-de-ressource{
|
.views-field-field-type-de-ressource{
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 500;
|
font-size: 600;
|
||||||
margin-bottom: .5rem;
|
margin-bottom: .5rem;
|
||||||
|
font-size: $font-small;
|
||||||
|
|
||||||
|
grid-row: 2 / span 1;
|
||||||
|
grid-column: 2 / span 1;
|
||||||
}
|
}
|
||||||
.views-field-title{
|
.views-field-title{
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
grid-row: 3 / span 1;
|
||||||
|
grid-column: 2 / span 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
.views-field-field-sous-titre{
|
.views-field-field-sous-titre{
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
|
grid-row: 4 / span 1;
|
||||||
|
grid-column: 2 / span 1;
|
||||||
}
|
}
|
||||||
.views-field-field-theme{
|
.views-field-field-theme{
|
||||||
|
grid-row: 5 / span 1;
|
||||||
|
grid-column: 1 / span 2;
|
||||||
font-size: $font-small;
|
font-size: $font-small;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user