kevin tessier 6 tahun lalu
induk
melakukan
5bcef4263e

+ 18 - 1
user/themes/lecampus/blueprints/default.yaml

@@ -3,6 +3,23 @@ extends@: default
 form:
   fields:
     tabs:
+      fields:
+        content:
+          fields:
+            header.buttons:
+              name: galerie
+              type: list
+              style: vertical
+              label: Galerie
+              fields:
+                .text:
+                  type: text
+                  label: Descriptions
+                .header.a_file:
+                  type: filepicker
+                  folder: '@self'
+                  preview_images: true
+                  label: Select a file
       fields:
         advanced:
           fields:
@@ -12,4 +29,4 @@ form:
                    fields:
                      header.body_classes:
                        markdown: true
-                       description: 'Available classes in Quark Theme (space separated):<br />`header-fixed`, `header-animated`, `header-dark`, `header-transparent`, `sticky-footer`'
+                       description: 'Available classes in Quark Theme (space separated):<br />`header-fixed`, `header-animated`, `header-dark`, `header-transparent`, `sticky-footer`'

+ 92 - 0
user/themes/lecampus/blueprints/sublog.yaml

@@ -0,0 +1,92 @@
+extends@: default
+child_type: item
+
+rules:
+  slug:
+    pattern: "[a-z][a-z0-9_\-]+"
+    min: 2
+    max: 80
+
+form:
+  fields:
+    tabs:
+      type: tabs
+      active: 1
+
+      fields:
+        advanced:
+          fields:
+            overrides:
+              fields:
+                header.child_type:
+                  default: item
+        blog:
+          type: tab
+          title: Blog Config
+
+          fields:
+
+            content_title:
+              type: spacer
+              title: Content Definition
+
+            header.content.items:
+              type: textarea
+              yaml: true
+              label: Items
+              default: '@self.children'
+              validate:
+                type: yaml
+
+            header.content.limit:
+              type: text
+              label: Max Item Count
+              default: 5
+              validate:
+                required: true
+                type: int
+                min: 1
+
+            header.content.order.by:
+              type: select
+              label: Order By
+              default: date
+              options:
+                folder: Folder
+                title: Title
+                date: Date
+                default: Default
+
+            header.content.order.dir:
+              type: select
+              label: Order
+              default: desc
+              options:
+                asc: Ascending
+                desc: Descending
+
+            header.content.pagination:
+              type: toggle
+              label: Pagination
+              highlight: 1
+              default: 1
+              options:
+                1: PLUGIN_ADMIN.ENABLED
+                0: PLUGIN_ADMIN.DISABLED
+              validate:
+                type: bool
+
+            header.content.url_taxonomy_filters:
+              type: toggle
+              label: URL Taxonomy Filters
+              highlight: 1
+              default: 1
+              options:
+                1: PLUGIN_ADMIN.ENABLED
+                0: PLUGIN_ADMIN.DISABLED
+              validate:
+                type: bool
+
+          import@:
+            type: partials/blog-bits
+            context: blueprints://pages

File diff ditekan karena terlalu besar
+ 8 - 2
user/themes/lecampus/css-compiled/theme.css


File diff ditekan karena terlalu besar
+ 0 - 0
user/themes/lecampus/css-compiled/theme.min.css


+ 3 - 4
user/themes/lecampus/js/site.js

@@ -54,9 +54,9 @@ function slide() {
 }
 
 function links() {
-  href="/organisez-vos-evenements"
-  var $a = $('li a[href="/organisez-vos-evenements"]');
+  var $a = $('li a[href="/organisez-vos-evenements"],li a[href="/qui-sommes-nous"] ');
   var $map = $('a#carte');
+
   $a.on('click', function(e) {
     e.preventDefault();
   })
@@ -65,12 +65,11 @@ function links() {
     e.preventDefault();
   })
 
-
 }
 
 jQuery(document).ready(function($){
   links();
   slide();
   filteritem();
-  map();
+  // map();
 });

+ 18 - 1
user/themes/lecampus/scss/theme/_blog.scss

@@ -36,6 +36,14 @@
       }
     }
   }
+  .title{
+    position: absolute;
+    right: 50px;
+    width: 33%;
+    background: white;
+    padding: 40px;
+    top: 200px;
+  }
 }
 
 .cat{
@@ -110,7 +118,7 @@
   }
 }
 
-.content{
+.content, .content_s{
   width: 40%;
   margin: 0px 20px 20px auto;
   p{
@@ -118,6 +126,10 @@
   }
 }
 
+.content_s{
+  margin: auto!important;
+}
+
 #default{
   .content{
     & > p{
@@ -169,6 +181,11 @@
     border-top: 1px solid black;
     margin-bottom: 20px;
     margin-top: 20px;
+    & > img{
+      width: 33%;
+      float: left;
+      margin: 20px 10px 0px 0px;
+    }
     h3{
       margin-top: 20px;
     }

+ 4 - 10
user/themes/lecampus/templates/blog.html.twig

@@ -13,17 +13,11 @@
       <div class="content">
         <h2>{{page.title}}</h2>
         {{content}}
-        {% for item in page.collection %}
-        <div class="sub-content">
-          <h3>{{item.title}}</h3>
-          {{item.content}}
-        </div>
-        {% endfor %}
       </div>
 
-        {% block sidebar %}
-          {% include 'partials/sidebar.html.twig' %}
-        {% endblock %}  
-      </section>
+      {% block sidebar %}
+        {% include 'partials/sidebar.html.twig' %}
+      {% endblock %}
+    </section>
 
 {% endblock %}

+ 8 - 4
user/themes/lecampus/templates/default.html.twig

@@ -4,11 +4,15 @@
 {% block content %}
 
 <div class="gal">
-  {% if image %}
-  {% for images in image %}
-      {{ images }}
+  {% for feature in page.header.buttons %}
+    {% set gal = feature.header.a_file %}
+      <div class="content_gal">
+        <div class="title">
+          <h2>{{ feature.text }}</h2>
+        </div>
+        <img src="user/pages/01.home/{{gal}}" alt="">
+    </div>
   {% endfor %}
-  {% endif %}
 </div>
 
   <div class="content">

+ 1 - 1
user/themes/lecampus/templates/footer.html.twig

@@ -1,7 +1,7 @@
 {% set collection = page.collection() %}
 {% set image = page.media.images|first %}
 
-{% for item in page.collection if page.template == "footer" %}
+{% for item in collection if page.template == "footer" %}
   {{item.title}}
 {% endfor %}
     <section id="footer" class="section blog-listing">

+ 43 - 0
user/themes/lecampus/templates/forms/default/data.html.twig

@@ -0,0 +1,43 @@
+{% macro render_field(form, fields, scope) %}
+    {% for index, field in fields %}
+        {% set input = attribute(field, "input@") %}
+
+        {% if input is null or input == true %}
+
+            {% if form.value(scope ~ field.name) %}
+                {% block field %}
+                    <div>
+                        {% block field_label %}
+                            <strong>{{ field.name|t|e }}</strong>:
+                        {% endblock %}
+
+                        {% block field_value %}
+                            {% if field.type == 'checkboxes' %}
+                                <ul>
+                                    {% set use_keys = field.use is defined and field.use == 'keys' %}
+                                    {% for key,value in form.value(scope ~ field.name) %}
+                                        {% set index = (use_keys ? key : value) %}
+                                        <li>{{ field.options[index]|e }}</li>
+                                    {% endfor %}
+                                </ul>
+                            {% elseif field.type == 'checkbox' %}
+                                {{ (form.value(scope ~ field.name) == 1) ? "PLUGIN_FORM.YES"|t|e : "PLUGIN_FORM.NO"|t|e }}
+                            {% elseif field.type == 'select' %}
+                                {{ field.options[form.value(scope ~ field.name)]|e }}
+                            {% else %}
+                                {{ string(form.value(scope ~ field.name))|nl2br }}
+                            {% endif %}
+                        {% endblock %}
+                    </div>
+                {% endblock %}
+            {% endif %}
+        {% else %}
+            {% if field.fields %}
+                {% set new_scope = field.nest_id ? scope ~ field.name ~ '.' : scope %}
+                {{ _self.render_field(form, field.fields, new_scope) }}
+            {% endif %}
+        {% endif %}
+    {% endfor %}
+{% endmacro %}
+
+{{ _self.render_field(form, form.fields, '') }}

+ 0 - 17
user/themes/lecampus/templates/forms/default/data.txt.twig

@@ -1,17 +0,0 @@
-{%- macro render_field(form, fields, scope) %}
-{%- for index, field in fields %}
-    {%- set input = attribute(field, "input@") %}
-        {%- if input is null or input == true %}
-        {%- set value = form.value(scope ~ (field.name ?? index)) %}
-        {{- scope ~ (field.name ?? index) }}: {{ string(value is iterable ? value|json_encode : value|escape('yaml')) ~ "\r\n" }}
-    {%- else %}
-        {%- if field.fields %}
-        {%- set new_scope = field.nest_id ? scope ~ field.name ~ '.' : scope -%}
-        {{- _self.render_field(form, field.fields, new_scope) }}
-        {%- endif %}
-    {%- endif %}
-{%- endfor %}
-{%- endmacro %}
-{%- autoescape false %}
-{{- _self.render_field(form, form.fields, '') ~ "\r\n" }}
-{%- endautoescape %}

+ 0 - 1
user/themes/lecampus/templates/forms/fields/data.txt.twig

@@ -1 +0,0 @@
-{% extends "forms/default/data.txt.twig" %}

+ 0 - 0
user/themes/lecampus/templates/galerie.html.twig


+ 37 - 0
user/themes/lecampus/templates/mapsalle.html.twig

@@ -0,0 +1,37 @@
+{% extends 'partials/base.html.twig' %}
+{% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
+{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
+{% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true)  %}
+{% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}
+{% set hero_image_name = page.header.hero_image %}
+
+{% block hero %}
+    {% if hero_image_name %}
+        {% set hero_image = page.media[hero_image_name] %}
+        {% set content %}
+            <h1>{{ page.title }}</h1>
+            <h2>{{ page.header.subtitle }}</h2>
+            {% include 'partials/blog/date.html.twig' %}
+            {% include 'partials/blog/taxonomy.html.twig' %}
+        {% endset %}
+        {% include 'partials/hero.html.twig' with {id: 'blog-hero'} %}
+
+    {% endif %}
+{% endblock %}
+
+{% block body %}
+      {% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
+          {% include 'partials/breadcrumbs.html.twig' %}
+      {% endif %}
+
+      {% embed 'partials/layout.html.twig' %}
+          {% block item %}
+              {% include 'partials/blog-item.html.twig' %}
+          {% endblock %}
+      {% endembed %}
+
+      {% for child in page.collection %}
+        {{child.content}}
+      {% endfor %}
+
+{% endblock %}

+ 11 - 2
user/themes/lecampus/templates/partials/blog-item.html.twig

@@ -5,8 +5,8 @@
     {{ image.html }}
   </div>
   {% endif %}
-  {% if not hero_image_name %}
-    <div class="content">
+  {% if not hero_image_name and not show_sidebar %}
+    <div class="content_s">
       {% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
       {% if page.header.subtitle %}
       <h3 >{{ page.header.subtitle }}</h3>
@@ -14,3 +14,12 @@
       {{ page.content|raw }}
     </div>
   {% endif %}
+  {% if not hero_image_name and show_sidebar %}
+  <div class="content">
+    {% include 'partials/blog/title.html.twig' with {title_level: 'h2'} %}
+    {% if page.header.subtitle %}
+    <h3 >{{ page.header.subtitle }}</h3>
+    {% endif %}
+    {{ page.content|raw }}
+  </div>
+{% endif %}

+ 1 - 1
user/themes/lecampus/templates/partials/cal-list-event.html.twig

@@ -14,7 +14,7 @@
       <div class="card-title">
         {% include 'partials/blog/title.html.twig' with {title_level: 'h5'} %}
         {% include 'partials/blog/date.html.twig' %}
-    </div>
+      </div>
     <div class="card-summary">
       <a href="{{ page.url }}">
       {% if page.summary != page.content %}

+ 35 - 0
user/themes/lecampus/templates/sublog.html.twig

@@ -0,0 +1,35 @@
+{% extends 'partials/base.html.twig' %}
+{% set collection = page.collection() %}
+{% set image = page.media.images|first %}
+
+{% block body %}
+    <section id="item" class="section blog-listing">
+      <div class="bandeau">
+        {% if image %}
+          {{image.html}}
+        {% endif %}
+      </div>
+
+      <div class="content">
+        <h2>{{page.title}}</h2>
+        {{content}}
+        {% for item in page.collection %}
+
+        <div class="sub-content">
+          {% set child_image = item.media.images|first %}
+          {% if image %}
+            {{child_image.html}}
+          {% endif %}
+          <h3>{{item.title}}</h3>
+          {{item.content}}
+        </div>
+
+        {% endfor %}
+      </div>
+
+        {% block sidebar %}
+          {% include 'partials/sidebar.html.twig' %}
+        {% endblock %}
+      </section>
+
+{% endblock %}

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini