edit gitignor
This commit is contained in:
parent
2802c94a8a
commit
c2e9a2be04
File diff suppressed because one or more lines are too long
@ -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();
|
||||
|
||||
});
|
52
web/themes/custom/popsu/popsu.theme
Normal file
52
web/themes/custom/popsu/popsu.theme
Normal 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);
|
||||
}
|
||||
}*/
|
||||
};
|
40
web/themes/custom/popsu/popsuNoteTheme
Normal file
40
web/themes/custom/popsu/popsuNoteTheme
Normal 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';
|
||||
}
|
||||
}*/
|
@ -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 %}
|
@ -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>
|
@ -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 %}
|
Loading…
x
Reference in New Issue
Block a user