From a424dd8cbd1e4cc05553b1ad39c09ae69ac100f1 Mon Sep 17 00:00:00 2001 From: Eloi Perdereau <eloi@perdereau.eu> Date: Tue, 17 Nov 2020 23:51:41 +0100 Subject: [PATCH] =?UTF-8?q?d=C3=A9gage=20netlify=20CMS=20et=20met=20forest?= =?UTF-8?q?ry=20sur=20/lepuget?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _pages/index.md | 11 ---- admin/index.html | 55 ------------------- lepuget/config.yml | 130 --------------------------------------------- lepuget/index.html | 65 ++++++++++++++++++----- 4 files changed, 53 insertions(+), 208 deletions(-) delete mode 100644 admin/index.html delete mode 100644 lepuget/config.yml diff --git a/_pages/index.md b/_pages/index.md index efd8095..ac28c2c 100644 --- a/_pages/index.md +++ b/_pages/index.md @@ -36,17 +36,6 @@ feature_row: btn_class: "btn--warning" btn_label: "<i class='fas fa-music'></i> Infos" --- -<script> - if (window.netlifyIdentity) { - window.netlifyIdentity.on("init", user => { - if (!user) { - window.netlifyIdentity.on("login", () => { - document.location.href = "/admin/"; - }); - } - }); - } -</script> {% include feature_row %} diff --git a/admin/index.html b/admin/index.html deleted file mode 100644 index ac15b47..0000000 --- a/admin/index.html +++ /dev/null @@ -1,55 +0,0 @@ -<!-- forestryio: ignore; forestryio: admin --> -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="robots" content="noindex" /> - <title>Admin</title> - <meta name="description" content=" " /> - <meta name="author" content=" " /> - <meta name="HandheldFriendly" content="true" /> - <meta name="MobileOptimized" content="320" /> - <!-- Use maximum-scale and user-scalable at your own risk. It disables pinch/zoom. Think about usability/accessibility before including.--> - <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> - - <!-- Google font --> - <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> - - <!-- Fort awesome icon kit --> - <script src="https://use.fortawesome.com/b6f38602.js"></script> - -</head> -<body> -<div id="app"> - -</div> -<script id="admin-config-script" type="text/javascript"> - var env = { - siteId: "ngsw7f5rep036a", - local: false - }; - - function uuidv4() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); - return v.toString(16); - }); - } - - var uuid = uuidv4() - var script = document.createElement('script'); - script.src = "https://app.forestry.io/admin/forestry.min.js?hash=" + uuid - script.id = "forestry-admin"; - document.body.appendChild(script); - - var link = document.createElement("link"); - link.type = "text/css"; - link.rel = "stylesheet"; - link.href = "https://app.forestry.io/admin/main.css?hash=" + uuid - document.head.appendChild(link); - -</script> - -</body> -</html> diff --git a/lepuget/config.yml b/lepuget/config.yml deleted file mode 100644 index c242dc9..0000000 --- a/lepuget/config.yml +++ /dev/null @@ -1,130 +0,0 @@ -# config.yml - -backend: - name: git-gateway - repo: CCLuminy/CCL-site - branch: content # Branch to update (optional; defaults to master) -media_folder: 'assets/images/' -slug: - encoding: "ascii" - clean_accents: true - -collections: - - name: 'data' - label: "Auteurs et Navigations" - editor: - preview: false - files: - - name: "authors" - label: "Auteurs" - file: "_data/authors.yml" - fields: - - label: "Auteurs" - name: "authors" - widget: "list" - fields: - - { label: "Nom à afficher", name: "name", widget: string } - - { required: false, label: "Nom court (pour l'url)", name: "prefix", widget: string } - - { label: "Avatar", name: "avatar", widget: image } - - { required: false, label: "Image de partage", name: "og_image", widget: string } - - { required: false, label: "Bannière par défaut", name: "banner", widget: string } - - { label: "Petite description", name: "bio", widget: string } - - { required: false, label: "Localisation", name: "location", widget: string } - - { required: false, label: "Email", name: "email", widget: string } - - { required: false, label: "Site internet", name: "uri", widget: string } - - { required: false, label: "Facebook", name: "facebook", widget: string } - - { required: false, label: "Helloasso", name: "helloasso", widget: string } - - required: false - label: "Autre" - name: "links" - widget: "list" - fields: - - {label: "Label", name: "label", widget: string} - - {label: "URL", name: "url", widget: string} - - {label: "Icone Fontawesome", name: "icon", widget: string, required: false} - - - name: "navigation" - label: "Navigations" - file: "_data/navigation.yml" - fields: - - label: "Navigation d'entête" - name: "main" - widget: "list" - fields: - - {label: "Titre", name: "title", widget: string} - - {label: "Lien", name: "url", widget: string} - - label: "Navigations par 'auteur'" - name: "navs" - widget: "list" - fields: - - {label: "Nom court (pour url)", name: "name", widget: string} - - label: "Sections" - name: "nav" - widget: list - fields: - - {label: "Titre", name: "title", widget: string} - - {label: "Lien", name: "url", widget: string} - - label: "Sous-sections" - name: "children" - required: false - widget: "list" - fields: - - {label: "Titre", name: "title", widget: string} - - {label: "Lien", name: "url", widget: string} - - - name: 'general' - label: 'Pages générales' - folder: '_pages/' - create: true - editor: - preview: true - fields: - - {label: "Titre de la page", name: "title", widget: "string"} - - {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"} - - {label: "Remplacer le bandeau par défaut par un autre ?", name: "overlay_image", widget: "image", default: false} - - {label: "Body", name: "body", widget: "markdown"} - - name: 'ccl' - label: 'CCL' - folder: '_pages/ccl' - create: true - fields: - - {label: "Titre de la page", name: "title", widget: "string"} - - {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"} - - {label: "Bandeau ?", name: "overlay_image", widget: "image", required: false} - - {label: "Body", name: "body", widget: "markdown"} - - name: 'l-asso' - label: "CCL/l'asso" - folder: '_pages/ccl/l-asso' - fields: - - {label: "Titre de la page", name: "title", widget: "string"} - - {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"} - - {label: "Remplacer le bandeau par défaut par un autre ?", name: "overlay_image", widget: "image", required: false} - - {label: "Body", name: "body", widget: "markdown"} - - name: 'activites' - label: 'CCL/Activites' - folder: '_pages/ccl/activites/' - create: true - fields: - - {label: "Titre de la page", name: "title", widget: "string"} - - {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"} - - {label: "Remplacer le bandeau par défaut par un autre ?", name: "overlay_image", widget: "image", required: false} - - {label: "Body", name: "body", widget: "markdown"} - - name: 'grenier' - label: 'CCL/Grenier' - folder: '_pages/ccl/grenier/' - create: true - fields: - - {label: "Titre de la page", name: "title", widget: "string"} - - {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"} - - {label: "Remplacer le bandeau par défaut par un autre ?", name: "overlay_image", widget: "image", required: false} - - {label: "Body", name: "body", widget: "markdown"} - - name: 'jardin' - label: 'Jardin' - description: 'Tout est là' - folder: '_pages/jardin' - create: true - fields: - - {label: "Titre de la page", name: "title", widget: "string"} - - {label: "Date de dernière mise à jour", name: "last_modified_at", widget: "date"} - - {label: "Remplacer le bandeau par défaut par un autre ?", name: "overlay_image", widget: "image", required: false} - - {label: "Body", name: "body", widget: "markdown"} diff --git a/lepuget/index.html b/lepuget/index.html index 20fd5e6..ac15b47 100644 --- a/lepuget/index.html +++ b/lepuget/index.html @@ -1,14 +1,55 @@ -<!-- admin/index.html --> +<!-- forestryio: ignore; forestryio: admin --> <!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title>CCLuminy CMS</title> - <script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script> - </head> - <body> - <!-- Include the script that builds the page and powers Netlify CMS --> - <script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script> - </body> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="robots" content="noindex" /> + <title>Admin</title> + <meta name="description" content=" " /> + <meta name="author" content=" " /> + <meta name="HandheldFriendly" content="true" /> + <meta name="MobileOptimized" content="320" /> + <!-- Use maximum-scale and user-scalable at your own risk. It disables pinch/zoom. Think about usability/accessibility before including.--> + <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> + + <!-- Google font --> + <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> + + <!-- Fort awesome icon kit --> + <script src="https://use.fortawesome.com/b6f38602.js"></script> + +</head> +<body> +<div id="app"> + +</div> +<script id="admin-config-script" type="text/javascript"> + var env = { + siteId: "ngsw7f5rep036a", + local: false + }; + + function uuidv4() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } + + var uuid = uuidv4() + var script = document.createElement('script'); + script.src = "https://app.forestry.io/admin/forestry.min.js?hash=" + uuid + script.id = "forestry-admin"; + document.body.appendChild(script); + + var link = document.createElement("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = "https://app.forestry.io/admin/main.css?hash=" + uuid + document.head.appendChild(link); + +</script> + +</body> </html> -- GitLab