Browse Source

Better whoami static block markup after panelize.

Frederic G. MARAND 10 năm trước cách đây
mục cha
commit
359c2addad

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
css/theme/evidence.css


+ 24 - 0
dr821.breakpoints.yml

@@ -0,0 +1,24 @@
+hdlbq.xs:
+  label: extra-small
+  mediaQuery: '(min-width: 0px) and (max-width: 767px)'
+  weight: 0
+  multipliers:
+    - 1x
+hdlbq.sm:
+  label: small
+  mediaQuery: '(min-width: 768px) and (max-width: 991px)'
+  weight: 1
+  multipliers:
+    - 1x
+hdlbq.md:
+  label: medium
+  mediaQuery: '(min-width: 992px) and (max-width: 1199px)'
+  weight: 2
+  multipliers:
+    - 1x
+hdlbq.lg:
+  label: large
+  mediaQuery: '(min-width: 1200px)'
+  weight: 3
+  multipliers:
+    - 1x

+ 1 - 0
dr821.info.yml

@@ -4,6 +4,7 @@ description: 'Theme OSInet Formation DR-821'
 core: 8.x
 package: 'OSInet Formation'
 # Pas de base theme -> stable
+# base theme: false
 
 libraries:
   # An alternative JS solution to panelize blocks.

+ 60 - 17
templates/block/block--quisuisje.html.twig

@@ -25,21 +25,64 @@
  * @see template_preprocess_block()
  */
 #}
-<div{{ attributes.addClass('panel panel-default') }}>
-  <ul>
-    <li>Id: {{ user.id }}</li>
-    <li>Name: {{ user.getAccountName }}</li>
-    <li>Display name: {{ user.getDisplayName }}</li>
-    <li>Email: {{ user.getEmail }}</li>
-    <li>Language: {{ user.getPreferredLangcode }}</li>
-    <li>Last access: {{ user.getLastAccessedTime|format_date }}</li>
-    <li>Roles:
-      <ul>
-        {% for role in user.getRoles(true) %}
-          <li>{{ role }}</li>
-        {% endfor %}
-      </ul></li>
-    <li>Time zone: {{ user.getTimezone }}</li>
-    <li>Username: {{ user.getUsername }}</li>
-  </ul>
+<div{{ attributes }}>
+  {{ title_prefix }}
+  {% if label %}
+    <h2{{ title_attributes }}>{{ label }}</h2>
+  {% endif %}
+  {{ title_suffix }}
+  {% block content %}
+    <div class="panel-body"></div>
+      <table class="table">
+        <tr>
+          <th scope="col">{{ "Property"|t }}</th>
+          <th scope="col">{{ "Value"|t }}</th>
+        </tr>
+        <tr>
+          <th>{{ "Id"|t }}</th>
+          <td>{{ user.id }}</td>
+        </tr>
+        <tr>
+          <th>{{ "Name"|t }}</th>
+          <td>{{ user.getAccountName }}</td>
+        </tr>
+        <tr>
+          <th>{{ "Display Name"|t }}</th>
+          <td>{{ user.getDisplayName }}</td>
+        </tr>
+        <tr>
+          <th>{{ "Email"|t }}</th>
+          <td>{{ user.getEmail }}</td>
+        </tr>
+        <tr>
+          <th>{{ "Language"|t }}</th>
+          <td>{{ user.getPreferredLangcode }}</td>
+        </tr>
+        <tr>
+          <th>{{ "Last access time"|t }}</th>
+          <td>{{ user.getLastAccessedTime | format_date('medium') }}</td>
+        </tr>
+        <tr>
+          <th>{{ "Roles"|t }}</th>
+          <td>
+            <ul>
+              {% for role in user.getRoles(true) %}
+                <li>
+                  {{ role }}
+                </li>
+              {% endfor %}
+            </ul>
+          </td>
+        </tr>
+        <tr>
+          <th>{{ "Time zone"|t }}</th>
+          <td>{{ user.getTimeZone }}</td>
+        </tr>
+        <tr>
+          <th>{{ "Username"|t }}</th>
+          <td>{{ user.getUsername }}</td>
+        </tr>
+      </table>
+    </div>
+  {% endblock %}
 </div>

+ 26 - 0
templates/block/block--system-branding-block.html.twig

@@ -0,0 +1,26 @@
+{% extends "block.html.twig" %}
+{#
+/**
+ * @file
+ * Theme override for a branding block.
+ *
+ * Each branding element variable (logo, name, slogan) is only available if
+ * enabled in the block configuration.
+ *
+ * Available variables:
+ * - site_logo: Logo for site as defined in Appearance or theme settings.
+ * - site_name: Name for site as defined in Site information settings.
+ * - site_slogan: Slogan for site as defined in Site information settings.
+ */
+#}
+{% block content %}
+  {% if site_logo %}
+    <a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">
+      <img src="{{ site_logo }}" alt="{{ 'Home'|t }}" />
+    </a>
+  {% endif %}
+  {% if site_name %}
+    <a href="{{ path('<front>') }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
+  {% endif %}
+  {{ site_slogan }}
+{% endblock %}

+ 2 - 2
templates/layout/page.html.twig

@@ -89,11 +89,11 @@
       <div class="zlayout-content col-md-8">
       {{ page.content }}
       </div>{# /.layout-content #}
-      <aside class="zlayout-sidebar-first col-md-4" role="complementary">
+      <aside class="layout-sidebar-first col-md-4" role="complementary">
         {{ page.sidebar_first }}
       </aside>
     {% else %}
-      <div class="zlayout-content col-md-12">
+      <div class="layout-content col-md-12">
       {{ page.content }}
       </div>{# /.layout-content #}
     {% endif %}

+ 25 - 0
templates/navigation/breadcrumb.html.twig

@@ -0,0 +1,25 @@
+{#
+/**
+ * @file
+ * Theme override for a breadcrumb trail.
+ *
+ * Available variables:
+ * - breadcrumb: Breadcrumb trail items.
+ */
+#}
+{% if breadcrumb %}
+  <nav role="navigation" aria-labelledby="system-breadcrumb">
+    <h2 class="visually-hidden">{{ 'Breadcrumb'|t }}</h2>
+    <ol class="breadcrumb">
+    {% for item in breadcrumb %}
+      <li>
+        {% if item.url %}
+          <a href="{{ item.url }}">{{ item.text }}</a>
+        {% else %}
+          {{ item.text }}
+        {% endif %}
+      </li>
+    {% endfor %}
+    </ol>
+  </nav>
+{% endif %}

+ 89 - 0
templates/navigation/menu--main-backup.html.twig

@@ -0,0 +1,89 @@
+{#
+/**
+ * @file
+ * Theme override to display a menu.
+ *
+ * Available variables:
+ * - menu_name: The machine name of the menu.
+ * - items: A nested list of menu items. Each menu item contains:
+ *   - attributes: HTML attributes for the menu item.
+ *   - below: The menu item child items.
+ *   - title: The menu link title.
+ *   - url: The menu link url, instance of \Drupal\Core\Url
+ *   - localized_options: Menu link localized options.
+ *   - is_expanded: TRUE if the link has visible children within the current
+ *     menu tree.
+ *   - is_collapsed: TRUE if the link has children within the current menu tree
+ *     that are not currently visible.
+ *   - in_active_trail: TRUE if the link is in the active trail.
+ */
+#}
+{% import _self as menus %}
+
+{#
+  We call a macro which calls itself to render the full tree.
+  @see http://twig.sensiolabs.org/doc/tags/macro.html
+#}
+<div class="navbar navbar-default">
+  <ul class="nav navbar-nav">
+    <li class="nav navbar-link">
+      <a href="#" data-target="#" data-toggle="dropdown">
+        MSSMat en bref
+        <span class="caret" />
+      </a>
+      <ul class="dropdown-menu dropdown">
+        <li><a href="#">Organisation</a></li>
+        <li><a href="#">Production scientifique</a></li>
+        <li><a href="#">Implication dans l'Enseignement</a></li>
+        <li><a href="#">Collaborations et Partenariats</a></li>
+      </ul>
+    </li>
+    <li class="nav navbar-link">
+      <a href="#" data-target="#" data-toggle="dropdown">
+        Recherche
+        <span class="caret" />
+      </a>
+      <ul class="dropdown-menu dropdown">
+        <li><a href="#">Equipe Sciences et Ingénierie des Matériaux</a></li>
+        <li><a href="#">Equipe Sciences et Ingénierie Numérique</a></li>
+        <li><a href="#">Axe CM3</a></li>
+        <li><a href="#">Axe DynOdAs</a></li>
+        <li><a href="#">Axe MPI</a></li>
+      </ul>
+    </li>
+    <li class="nav navbar-link">
+      <a href="#" data-target="#" data-toggle="dropdown">
+        Moyens
+        <span class="caret" />
+      </a>
+      <ul class="dropdown-menu dropdown">
+        <li><a href="#">Logiciels</a></li>
+        <li><a href="#">Essais Mécaniques</a></li>
+        <li><a href="#">Microscopie</a></li>
+        <li><a href="#">Machines de Nanomatériaux</a></li>
+      </ul>
+    </li>
+  </ul>
+</div>
+
+{{ menus.menu_links(items, attributes, 0) }}
+
+{% macro menu_links(items, attributes, menu_level) %}
+  {% import _self as menus %}
+  {% if items %}
+    {% if menu_level == 0 %}
+      <ul{{ attributes }}>
+    {% else %}
+      <ul>
+    {% endif %}
+    {% for item in items %}
+      <li{{ item.attributes }}>
+        {{ link(item.title, item.url) }}
+        {% if item.below %}
+          {{ menus.menu_links(item.below, attributes, menu_level + 1) }}
+        {% endif %}
+      </li>
+    {% endfor %}
+    </ul>
+  {% endif %}
+{% endmacro %}

+ 55 - 0
templates/navigation/menu--main.html.twig

@@ -0,0 +1,55 @@
+{#
+/**
+ * @file
+ * Theme override to display a menu.
+ *
+ * Available variables:
+ * - menu_name: The machine name of the menu.
+ * - items: A nested list of menu items. Each menu item contains:
+ *   - attributes: HTML attributes for the menu item.
+ *   - below: The menu item child items.
+ *   - title: The menu link title.
+ *   - url: The menu link url, instance of \Drupal\Core\Url
+ *   - localized_options: Menu link localized options.
+ *   - is_expanded: TRUE if the link has visible children within the current
+ *     menu tree.
+ *   - is_collapsed: TRUE if the link has children within the current menu tree
+ *     that are not currently visible.
+ *   - in_active_trail: TRUE if the link is in the active trail.
+ */
+#}
+{% import _self as menus %}
+
+{#
+  We call a macro which calls itself to render the full tree.
+  @see http://twig.sensiolabs.org/doc/tags/macro.html
+#}
+{{ menus.menu_links(items, attributes, 0) }}
+
+{% macro menu_links(items, attributes, menu_level) %}
+  {% import _self as menus %}
+  {% if items %}
+    {% if menu_level == 0 %}
+      <ul{{ attributes.addClass("nav", "navbar-nav", "menu") }}>
+    {% else %}
+      <ul{{ attributes.addClass("dropdown-menu") }}>
+    {% endif %}
+    {% for item in items %}
+      {% if menu_level == 0 %}
+        <li{{ item.attributes.addClass("expanded", "dropdown") }}>
+          <a href="{{ item.url }}" class="dropdown-toggle" data-target="#" data-toggle="dropdown">
+            {{ item.title }}
+            <span class="caret" />
+          </a>
+      {% else %}
+        <li{{ item.attributes }}>
+        {{ link(item.title, item.url) }}
+      {% endif %}
+      {% if item.below %}
+       {{ menus.menu_links(item.below, attributes.removeClass("nav", "navbar-nav"), menu_level + 1) }}
+      {% endif %}
+      </li>
+    {% endfor %}
+    </ul>
+  {% endif %}
+{% endmacro %}

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác