edit gitignor

This commit is contained in:
armansansd 2021-06-22 10:53:07 +02:00
parent 2802c94a8a
commit c2e9a2be04
7 changed files with 117 additions and 60 deletions

File diff suppressed because one or more lines are too long

View File

@ -2,9 +2,7 @@ import 'slick-carousel';
$(document).ready(function(){
console.log("$ ready !!");
$('.last-news').slick();
$('.last-ressources').slick();
/*const swiper = new Swiper('.last-news', {
slideClass: 'views-row'
});*/
//$('.last-news').slick();
//$('.last-ressources').slick();
});

View File

@ -0,0 +1,52 @@
<?php
/*
* @files
* Theme Template Funtions
*/
use Drupal\Core\Template\Attribute;
/* implements template_preprocess_views_view_unformatted() */
function popsu_preprocess_views_view_unformatted(&$variables) {
$view = $variables['view'];
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'];
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);
}
}
}
/*$rows = $variables['rows'];
$style = $view->style_plugin;
$options = $style->options;
$variables['default_row_class'] = !empty($options['default_row_class']);*/
/* foreach ($rows as $id => $row) {
$variables['rows'][$id] = array();
$variables['rows'][$id]['content'] = $row;
$variables['rows'][$id]['attributes'] = new Attribute();
if ($row_class = $view->style_plugin
->getRowClass($id)) {
$variables['rows'][$id]['attributes']
->addClass($row_class);
}
}*/
};

View File

@ -0,0 +1,40 @@
/* implements template_preprocess_region() */
/*function popsu_preprocess_region(&$variables){
kint($variables);
if (isset($variables['region']) && $variables['region'] == 'header_top_right') {
$variables['attributes']['class'][] = "poopooboy" ;
}
}*/
/*function popsu_preprocess_views_view_unformatted(&$variables){
$variables['attributes']['class'][] = "test" ;
//kint($variables).die();
}*/
/**
* Add an alternative to file name suggestions the Custom Search form block.
*
* Implements hook__suggestions_HOOK_alter().
* @return array Suggestions.
*/
/*function popsu_theme_suggestions_views_view_unformatted_alter(array &$suggestions, array $variables) {
$suggestions[] = 'views_view__headerView';
/*if($variables['elements']['#id'] == 'customsearchform'){
$suggestions[] = 'block__custom_search_form';
}*/
//}
/*
* Implements hook__suggestions_HOOK_alter().
* @return array Suggestions.
*/
/*function popsu_theme_suggestions_block_alter(array &$suggestions, array $variables) {
if($variables['elements']['#id'] == 'customsearchform'){
$suggestions[] = 'block__custom_search_form';
}
}*/

View File

@ -1,13 +0,0 @@
{% extends "block.html.twig" %}
{% block content %}
{% if site_logo %}
<a href="{{ path('<front>') }}" rel="home">
<img src="{{ site_logo }}" alt="{{ 'Home'|t }}" />
</a>
{% endif %}
{% if site_name %}
<a href="{{ path('<front>') }}" rel="home">{{ site_name }}</a>
{% endif %}
{{ site_slogan }}
{% endblock %}

View File

@ -1,41 +0,0 @@
{#
/**
* @file
* Default theme implementation to display a block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - content: The content of this block.
* - attributes: array of HTML attributes populated by modules, intended to
* be added to the main container tag of this template.
* - id: A valid HTML ID and guaranteed unique.
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* @see template_preprocess_block()
*
* @ingroup themeable
*/
#}
<div{{ attributes }}>
{{ title_prefix }}
{% if label %}
<h2{{ title_attributes }}>{{ label }}</h2>
{% endif %}
{{ title_suffix }}
{% block content %}
{{ content }}
{% endblock %}
</div>

View File

@ -0,0 +1,21 @@
{#
/**
* @file
* Default theme implementation to display a region.
*
* Available variables:
* - content: The content for this region, typically blocks.
* - attributes: HTML attributes for the region <div>.
* - region: The name of the region variable as defined in the theme's
* .info.yml file.
*
* @see template_preprocess_region()
*
* @ingroup themeable
*/
#}
{% if content %}
<div{{ attributes }}>
{{ content }}
</div>
{% endif %}