kevin tessier 4 years ago
parent
commit
49539d7e82

+ 1 - 1
.htaccess

@@ -9,7 +9,7 @@ RewriteEngine On
 # along the lines of: RewriteBase /<your_sub_folder>
 ##
 
-# RewriteBase /
+ RewriteBase /
 
 ## End - RewriteBase
 

+ 20 - 0
user/config/plugins/email.yaml

@@ -0,0 +1,20 @@
+enabled: true
+from: kvntssr@gmail.com
+to: kvntssr@gmail.com
+queue:
+  enabled: false
+  flush_frequency: '* * * * *'
+  flush_msg_limit: 10
+  flush_time_limit: 100
+mailer:
+  engine: smtp
+  smtp:
+    server: smtp.mailtrap.io
+    port: 587
+    encryption: tls
+    user: 5e920233e534b8
+    password: a78fb10acda1fc
+  sendmail:
+    bin: '/usr/sbin/sendmail -bs'
+content_type: text/html
+debug: false

+ 18 - 0
user/config/plugins/form.yaml

@@ -0,0 +1,18 @@
+enabled: true
+built_in_css: true
+inline_css: true
+refresh_prevention: false
+client_side_validation: true
+inline_errors: false
+files:
+  multiple: false
+  limit: 10
+  destination: self@
+  avoid_overwriting: false
+  random_name: false
+  filesize: 0
+  accept:
+    - 'image/*'
+recaptcha:
+  version: 2-checkbox
+  theme: light

+ 1 - 1
user/config/site.yaml

@@ -2,7 +2,7 @@ title: Vocurations
 default_lang: en
 author:
   name: 'Zina Vieille'
-  email: zina@vocurations.com
+  email: kevin@figureslibres.io
 taxonomies:
   - category
   - tag

+ 1 - 1
user/config/system.yaml

@@ -16,7 +16,7 @@ languages:
   http_accept_language: false
   override_locale: false
 home:
-  alias: /home
+  alias: /whats-on
   hide_in_urls: false
 pages:
   theme: vocurations

+ 0 - 42
user/pages/01.home/default.md

@@ -1,42 +0,0 @@
----
-title: Home
-body_classes: title-center title-h1h2
----
-
-# Say Hello to Grav!
-## installation successful...
-
-Congratulations! You have installed the **Base Grav Package** that provides a **simple page** and the default **Quark** theme to get you started.
-
-!! If you see a **404 Error** when you click `Typography` in the menu, please refer to the [troubleshooting guide](http://learn.getgrav.org/troubleshooting/page-not-found).
-
-### Find out all about Grav
-
-* Learn about **Grav** by checking out our dedicated [Learn Grav](http://learn.getgrav.org) site.
-* Download **plugins**, **themes**, as well as other Grav **skeleton** packages from the [Grav Downloads](http://getgrav.org/downloads) page.
-* Check out our [Grav Development Blog](http://getgrav.org/blog) to find out the latest goings on in the Grav-verse.
-
-!!! If you want a more **full-featured** base install, you should check out [**Skeleton** packages available in the downloads](http://getgrav.org/downloads).
-
-### Edit this Page
-
-To edit this page, simply navigate to the folder you installed **Grav** into, and then browse to the `user/pages/01.home` folder and open the `default.md` file in your [editor of choice](http://learn.getgrav.org/basics/requirements).  You will see the content of this page in [Markdown format](http://learn.getgrav.org/content/markdown).
-
-### Create a New Page
-
-Creating a new page is a simple affair in **Grav**.  Simply follow these simple steps:
-
-1. Navigate to your pages folder: `user/pages/` and create a new folder.  In this example, we will use [explicit default ordering](http://learn.getgrav.org/content/content-pages) and call the folder `03.mypage`.
-2. Launch your text editor and paste in the following sample code:
-
-        ---
-        title: My New Page
-        ---
-        # My New Page!
-
-        This is the body of **my new page** and I can easily use _Markdown_ syntax here.
-
-3. Save this file in the `user/pages/03.mypage/` folder as `default.md`. This will tell **Grav** to render the page using the **default** template.
-4. That is it! Reload your browser to see your new page in the menu.
-
-! NOTE: The page will automatically show up in the Menu after the "Typography" menu item. If you wish to change the name that shows up in the Menu, simple add: `menu: My Page` between the dashes in the page content. This is called the YAML front matter, and it is where you configure page-specific options.

+ 0 - 155
user/pages/02.typography/default.md

@@ -1,155 +0,0 @@
----
-title: Typography
----
-
-! Details on the full capabilities of Spectre.css can be found in the [Official Spectre Documentation](https://picturepan2.github.io/spectre/elements.html)
-
-The [Quark theme](https://github.com/getgrav/grav-theme-quark) is the new default theme for Grav built with [Spectre.css](https://picturepan2.github.io/spectre/) the lightweight, responsive and modern CSS framework. Spectre provides  basic styles for typography, elements, and a responsive layout system that utilizes best practices and consistent language design.
-
-### Headings
-
-# H1 Heading `40px`
-
-## H2 Heading `32px`
-
-### H3 Heading `28px`
-
-#### H4 Heading `24px`
-
-##### H5 Heading `20px`
-
-###### H6 Heading `16px`
-
-```html
-# H1 Heading
-# H1 Heading `40px`</small>`
-
-<span class="h1">H1 Heading</span>
-```
-
-### Paragraphs
-
-Lorem ipsum dolor sit amet, consectetur [adipiscing elit. Praesent risus leo, dictum in vehicula sit amet](#), feugiat tempus tellus. Duis quis sodales risus. Etiam euismod ornare consequat.
-
-Climb leg rub face on everything give attitude nap all day for under the bed. Chase mice attack feet but rub face on everything hopped up on goofballs.
-
-### Markdown Semantic Text Elements
-
-**Bold** `**Bold**`
-
-_Italic_ `_Italic_`
-
-~~Deleted~~ `~~Deleted~~`
-
-`Inline Code` `` `Inline Code` ``
-
-### HTML Semantic Text Elements
-
-<abbr>I18N</abbr> `<abbr>`
-
-<cite>Citation</cite> `<cite>`
-
-<kbd>Ctrl + S</kbd> `<kbd>`
-
-Text<sup>Superscripted</sup> `<sup>`
-
-Text<sub>Subscripted</sub> `<sub>`
-
-<u>Underlined</u> `<u>`
-
-<mark>Highlighted</mark> `<mark>`
-
-<time>20:14</time> `<time>`
-
-<var>x = y + 2</var> `<var>`
-
-### Blockquote
-
-> The advance of technology is based on making it fit in so that you don't really even notice it,
-> so it's part of everyday life.
->
-> <cite>- Bill Gates</cite>
-
-```markdown
-> The advance of technology is based on making it fit in so that you don't really even notice it,
-> so it's part of everyday life.
->
-> <cite>- Bill Gates</cite>
-```
-
-### Unordered List
-
-* list item 1
-* list item 2
-    * list item 2.1
-    * list item 2.2
-    * list item 2.3
-* list item 3
-
-```markdown
-* list item 1
-* list item 2
-    * list item 2.1
-    * list item 2.2
-    * list item 2.3
-* list item 3
-```
-
-### Ordered List
-
-1. list item 1
-1. list item 2
-    1. list item 2.1
-    1. list item 2.2
-    1. list item 2.3
-1. list item 3
-
-```markdown
-1. list item 1
-1. list item 2
-    1. list item 2.1
-    1. list item 2.2
-    1. list item 2.3
-1. list item 3
-```
-
-### Table
-
-| Name                        | Genre                         | Release date         |
-| :-------------------------- | :---------------------------: | -------------------: |
-| The Shawshank Redemption    | Crime, Drama                  | 14 October 1994      |
-| The Godfather               | Crime, Drama                  | 24 March 1972        |
-| Schindler's List            | Biography, Drama, History     | 4 February 1994      |
-| Se7en                       | Crime, Drama, Mystery         | 22 September 1995    |
-
-```markdown
-| Name                        | Genre                         | Release date         |
-| :-------------------------- | :---------------------------: | -------------------: |
-| The Shawshank Redemption    | Crime, Drama                  | 14 October 1994      |
-| The Godfather               | Crime, Drama                  | 24 March 1972        |
-| Schindler's List            | Biography, Drama, History     | 4 February 1994      |
-| Se7en                       | Crime, Drama, Mystery         | 22 September 1995    |
-```
-
-### Notices
-
-The notices styles are actually provided by the `markdown-notices` plugin but are useful enough to include here:
-
-! This is a warning notification
-
-!! This is a error notification
-
-!!! This is a default notification
-
-!!!! This is a success notification
-
-```markdown
-! This is a warning notification
-
-!! This is a error notification
-
-!!! This is a default notification
-
-!!!! This is a success notification
-```
-

+ 47 - 0
user/pages/03.formulaire/form.md

@@ -0,0 +1,47 @@
+---
+title: formulaire
+aura:
+    pagetype: website
+form:
+    name: "Demande_inscriptions"
+    template: form-messages
+    refresh_prevention: true
+    fields:
+        -
+            name: Prénom
+            placeholder: Prénom
+            type: text
+            size: long
+            classes: fancy
+            validate:
+                required: true
+        -
+            name: Nom
+            placeholder: Nom
+            type: text
+            size: long
+            classes: fancy
+            validate:
+                required: true
+    buttons:
+        -
+            type: submit
+            value: Envoyer
+    process:
+        -
+            email:
+                from: '{{ config.plugins.email.from }}'
+                to: '{{ config.plugins.email.to }}'  
+                subject: '[inscriptions N°] {{ form.value.name|e }}'
+                body: '{% include ''forms/data.html.twig'' %}'
+        -
+            save:
+                fileprefix: inscriptions_N°-
+                dateformat: Y-H-u
+                extension: txt
+                body: '{% include ''forms/data.txt.twig'' %}'
+        -
+            message: 'Merci, votre demande de devis à bien été envoyé ! Elle sera traité dans les prochains jours.'
+---
+
+Salut, je suis la page formulaire

+ 16 - 0
user/pages/04.whats-on/blog.md

@@ -0,0 +1,16 @@
+---
+title: 'What''s On'
+content:
+    items:
+        - '@self.children'
+    limit: 5
+    order:
+        by: date
+        dir: desc
+    pagination: true
+    url_taxonomy_filters: true
+aura:
+    pagetype: website
+---
+
+Salut, What's On

+ 16 - 0
user/pages/05.studio-programme/blog.md

@@ -0,0 +1,16 @@
+---
+title: 'Studio Programme'
+content:
+    items:
+        - '@self.children'
+    limit: 5
+    order:
+        by: date
+        dir: desc
+    pagination: true
+    url_taxonomy_filters: true
+aura:
+    pagetype: website
+---
+
+Salut, Studio Programme

+ 16 - 0
user/pages/06.in-residence/blog.md

@@ -0,0 +1,16 @@
+---
+title: About
+content:
+    items:
+        - '@self.children'
+    limit: 5
+    order:
+        by: date
+        dir: desc
+    pagination: true
+    url_taxonomy_filters: true
+aura:
+    pagetype: website
+---
+
+Salut,  About

+ 16 - 0
user/pages/07.visit-us/blog.md

@@ -0,0 +1,16 @@
+---
+title: 'Visit Us'
+content:
+    items:
+        - '@self.children'
+    limit: 5
+    order:
+        by: date
+        dir: desc
+    pagination: true
+    url_taxonomy_filters: true
+aura:
+    pagetype: website
+---
+
+Salut, Visit Us

+ 47 - 0
user/themes/vocurations/templates/forms/data.html.twig

@@ -0,0 +1,47 @@
+{% macro render_field(form, fields, scope) %}
+    {% import _self as self %}
+
+    {% 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.label|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) ? "GRAV.YES"|t|e : "GRAV.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 %}
+
+{% import _self as macro %}
+
+{{ macro.render_field(form, form.fields, '') }}

+ 19 - 0
user/themes/vocurations/templates/forms/data.txt.twig

@@ -0,0 +1,19 @@
+{%- macro render_field(form, fields, scope) %}
+{%- import _self as self %}
+{%- 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 %}
+{%- import _self as macro %}
+{%- autoescape false %}
+{{- macro.render_field(form, form.fields, '') ~ "\r\n" }}
+{%- endautoescape %}

+ 1 - 3
user/themes/vocurations/templates/partials/logo.html.twig

@@ -3,7 +3,5 @@
 {% if logo %}
   {% set logo_file = (logo|first).name %}
   <img src="{{ url('theme://images/logo/' ~ logo_file)  }}" alt="{{ site.name }}" />
-{% else %}
-  {% include('@images/grav-logo.svg') %}
 {% endif %}
-</a>
+</a>