Changeset 114924 in spip-zone


Ignore:
Timestamp:
Apr 11, 2019, 1:57:03 PM (3 months ago)
Author:
root
Message:

on se debarasse des vieilles box de z-core et on branche tout ca sur des cards

Location:
_plugins_/bootstrap/trunk
Files:
2 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/bootstrap/trunk/bootstrap2spip/css/_card.scss

    r114866 r114924  
    77  margin-bottom: $rem-vert-margin;
    88}
     9
     10@mixin card-variant($color) {
     11  background-color: $card-bg;
     12  color: theme-color($color);
     13  border-color: theme-color($color);
     14  .card-header, .card-footer {
     15    background-color: theme-color-level($color, $alert-bg-level);
     16    color: theme-color-level($color, $alert-color-level);
     17  }
     18  &.highlight {
     19    background-color: theme-color-level($color, $alert-bg-level);
     20    color: theme-color-level($color, $alert-color-level);
     21    border-color: theme-color-level($color, $alert-border-level);
     22    .card-header, .card-footer {
     23      background-color: $card-cap-bg;
     24    }
     25  }
     26}
     27
     28.card-box {
     29  margin-bottom: $rem-vert-margin;
     30  .card-header, .card-body, .card-footer {
     31    :last-child {
     32      margin-bottom: 0;
     33    }
     34  }
     35  &.success, &.info, &.error {
     36    padding: 0;
     37  }
     38
     39  @each $color, $value in $theme-colors {
     40    &.#{$color},&.card-#{$color} {
     41      @include card-variant($color);
     42    }
     43  }
     44
     45  &.error {
     46    @include card-variant('danger');
     47  }
     48
     49  &.important {
     50    @include card-variant('primary');
     51  }
     52
     53  &.notice {
     54    @include card-variant('warning');
     55  }
     56
     57  &.note {
     58    @include card-variant('secondary');
     59  }
     60
     61  &.inverse {
     62    color: $white;
     63    border-color: $black;
     64    background-color: $gray-700;
     65    .card-header, .card-footer {
     66      background-color: $gray-900;
     67    }
     68  }
     69
     70}
  • _plugins_/bootstrap/trunk/bootstrap4_fonctions.php

    r114868 r114924  
    143143 */
    144144function filtre_boite_ouvrir_dist($titre, $class='', $head_class='', $id=""){
    145         $class = "panel panel-default $class";
    146         $head_class = "panel-heading $head_class";
     145        $class = "card card-box $class";
     146        $head_class = "card-header $head_class";
    147147        // dans l'espace prive, titrer en h3 si pas de balise <hn>
    148148        if (test_espace_prive() AND strlen($titre) AND strpos($titre,'<h')===false)
     
    150150        return '<div class="'.$class.($id?"\" id=\"$id":"").'">'
    151151        .($titre?'<div class="'.$head_class.'">'.$titre.'</div>':'')
    152         .'<div class="panel-body">';
     152        .'<div class="card-body">';
    153153}
    154154
     
    161161 */
    162162function filtre_boite_pied_dist($class='act'){
    163         $class = "panel-footer $class";
     163        $class = "card-footer $class";
    164164        return  '</div>'
    165165        .'<div class="'.$class.'">';
Note: See TracChangeset for help on using the changeset viewer.