From c841e7cb50c02230d3cbf927f5439818436cd113 Mon Sep 17 00:00:00 2001 From: Eloi Perdereau <eloi@perdereau.eu> Date: Thu, 19 Nov 2020 14:44:22 +0100 Subject: [PATCH] =?UTF-8?q?=C3=A9change=20de=20place=20forestry/netlifyCMS?= =?UTF-8?q?=20lepuget/admin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/index.html | 83 ++++++++++++++++++++++------------- {admin => lepuget}/config.yml | 0 lepuget/index.html | 83 +++++++++++++---------------------- lepuget2/index.html | 21 --------- 4 files changed, 83 insertions(+), 104 deletions(-) rename {admin => lepuget}/config.yml (100%) delete mode 100644 lepuget2/index.html diff --git a/admin/index.html b/admin/index.html index 9884e54..ac15b47 100644 --- a/admin/index.html +++ b/admin/index.html @@ -1,32 +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> - <!-- Locale translate script --> - <script> - import CMS from 'netlify-cms-app'; - import { fr } from 'netlify-cms-locales'; - - CMS.registerLocale('fr', fr); - </script> - <script> - if (window.netlifyIdentity) { - window.netlifyIdentity.on("init", user => { - if (!user) { - window.netlifyIdentity.on("login", () => { - document.location.href = "/admin/"; - }); - } - }); - } - </script> - <!-- 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> diff --git a/admin/config.yml b/lepuget/config.yml similarity index 100% rename from admin/config.yml rename to lepuget/config.yml diff --git a/lepuget/index.html b/lepuget/index.html index ac15b47..9884e54 100644 --- a/lepuget/index.html +++ b/lepuget/index.html @@ -1,55 +1,32 @@ -<!-- forestryio: ignore; forestryio: admin --> +<!-- admin/index.html --> <!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> + <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> + <!-- Locale translate script --> + <script> + import CMS from 'netlify-cms-app'; + import { fr } from 'netlify-cms-locales'; + + CMS.registerLocale('fr', fr); + </script> + <script> + if (window.netlifyIdentity) { + window.netlifyIdentity.on("init", user => { + if (!user) { + window.netlifyIdentity.on("login", () => { + document.location.href = "/admin/"; + }); + } + }); + } + </script> + <!-- 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> diff --git a/lepuget2/index.html b/lepuget2/index.html deleted file mode 100644 index 7f98ea3..0000000 --- a/lepuget2/index.html +++ /dev/null @@ -1,21 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>A static website</title> - - <!-- include the widget --> - <script type="text/javascript" src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script> -</head> -<body> - <!-- Add a menu: - Log in / Sign up - when the user is not logged in - Username / Log out - when the user is logged in - --> - <div data-netlify-identity-menu></div> - - <!-- Add a simpler button: - Simple button that will open the modal. - --> - <div data-netlify-identity-button>Login with Netlify Identity</div> -</body> -</html> -- GitLab