Changeset 93773 in spip-zone


Ignore:
Timestamp:
Dec 17, 2015, 11:18:30 PM (4 years ago)
Author:
p@…
Message:

Simplifier le pipeline CSS

Location:
_plugins_/foundation_6/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/foundation_6/trunk/foundation_6_pipelines.php

    r93772 r93773  
    3232*/
    3333function foundation_6_insert_head_css ($flux) {
    34   include_spip('inc/foundation');
    35   return foundation_get_css($flux);
     34
     35    // Si on est en mode app, on revoie le bon squelette
     36  if (_FOUNDATION_SASS) {
     37      $flux .= recuperer_fond('inclure/css/head-foundation-app');
     38  }
     39  else {
     40    $flux .= recuperer_fond('inclure/css/head-foundation');
     41  }
     42
     43  return $flux;
    3644}
  • _plugins_/foundation_6/trunk/inc/foundation.php

    r93771 r93773  
    2020  return wrap($matches[0], '<div class="flex-video'.$vimeo.'">');;
    2121}
    22 
    23 
    24 /**
    25  * Récupération des fichier css de foundation
    26  */
    27 function foundation_get_css($flux = '') {
    28 
    29   // On lit la configuration du plugin pour savoir quel version de Foundation charger.
    30   $config = lire_config('foundation');
    31 
    32   // Si on est en mode app, on revoie le bon squelette
    33   if (_FOUNDATION_SASS) {
    34       $flux .= recuperer_fond('inclure/css/head-foundation-app');
    35       return $flux;
    36   }
    37 
    38   // On renvoie le flux head avec le squelette foundation correspondant.
    39   if ($config['variante'] == '3')
    40     return $flux.recuperer_fond('inclure/css/head-foundation-3');
    41   elseif ($config['variante'] == '4')
    42     return $flux.recuperer_fond('inclure/css/head-foundation-4');
    43   elseif ($config['variante'] == '5')
    44     return $flux.recuperer_fond('inclure/css/head-foundation-5');
    45   // Si foundation est désactivé, on revoie directement le flux, sans aller chercher le head-foundation.
    46   else
    47     return $flux;
    48 }
Note: See TracChangeset for help on using the changeset viewer.