From f99bb001c05ba8b2632fccbc05bdb702eb8e92d5 Mon Sep 17 00:00:00 2001 From: eashaw Date: Wed, 9 Mar 2022 08:27:43 -0600 Subject: [PATCH] Add page script for '/get-started' (#4516) * add get started page script, strip search params from url * Update get-started.page.js --- website/assets/js/pages/get-started.page.js | 30 +++++++++++++++++++++ website/views/layouts/layout-customer.ejs | 1 + website/views/layouts/layout.ejs | 1 + 3 files changed, 32 insertions(+) create mode 100644 website/assets/js/pages/get-started.page.js diff --git a/website/assets/js/pages/get-started.page.js b/website/assets/js/pages/get-started.page.js new file mode 100644 index 0000000000..2cde1d82c3 --- /dev/null +++ b/website/assets/js/pages/get-started.page.js @@ -0,0 +1,30 @@ +parasails.registerPage('get-started', { + // ╦╔╗╔╦╔╦╗╦╔═╗╦ ╔═╗╔╦╗╔═╗╔╦╗╔═╗ + // ║║║║║ ║ ║╠═╣║ ╚═╗ ║ ╠═╣ ║ ║╣ + // ╩╝╚╝╩ ╩ ╩╩ ╩╩═╝ ╚═╝ ╩ ╩ ╩ ╩ ╚═╝ + data: { + //… + }, + + // ╦ ╦╔═╗╔═╗╔═╗╦ ╦╔═╗╦ ╔═╗ + // ║ ║╠╣ ║╣ ║ ╚╦╝║ ║ ║╣ + // ╩═╝╩╚ ╚═╝╚═╝ ╩ ╚═╝╩═╝╚═╝ + beforeMount: function() { + + // If the user navigated to this page from the 'try it now' button, we'll strip the '?tryitnow' from the url. + if(window.location.search){ + // https://caniuse.com/mdn-api_history_replacestate + window.history.replaceState({}, document.title, '/get-started' ); + } + }, + mounted: async function() { + //… + }, + + // ╦╔╗╔╔╦╗╔═╗╦═╗╔═╗╔═╗╔╦╗╦╔═╗╔╗╔╔═╗ + // ║║║║ ║ ║╣ ╠╦╝╠═╣║ ║ ║║ ║║║║╚═╗ + // ╩╝╚╝ ╩ ╚═╝╩╚═╩ ╩╚═╝ ╩ ╩╚═╝╝╚╝╚═╝ + methods: { + //… + } +}); diff --git a/website/views/layouts/layout-customer.ejs b/website/views/layouts/layout-customer.ejs index f0dae19631..91f5f3e435 100644 --- a/website/views/layouts/layout-customer.ejs +++ b/website/views/layouts/layout-customer.ejs @@ -152,6 +152,7 @@ + diff --git a/website/views/layouts/layout.ejs b/website/views/layouts/layout.ejs index b234388cd6..dd3a7168cd 100644 --- a/website/views/layouts/layout.ejs +++ b/website/views/layouts/layout.ejs @@ -307,6 +307,7 @@ +