mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Website: Update landing-page generator & /imagine/higher-education (#11751)
Changes: - Updated the landing page generator to generate a new .ejs file using the `generateFile()` method instead of using a page template so we can be sure that every landing page generated will have `<%- /* Expose server-rendered data as window.SAILS_LOCALS :: */ exposeLocalsToBrowser() %>`. - Updated /imagine/higher-education to have a `SAILS_LOCALS` variable.
This commit is contained in:
parent
827c4a7c33
commit
e0aa635aec
3 changed files with 111 additions and 103 deletions
112
website/generators/landing-page/index.js
vendored
112
website/generators/landing-page/index.js
vendored
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
var path = require('path');
|
||||
var _ = require('@sailshq/lodash');
|
||||
// var generateFile = require('./node_modules/sails-generate/builtins/file');
|
||||
var generateFile = require('../../node_modules/sails-generate/lib/builtins/file');
|
||||
|
||||
/**
|
||||
* @eashaw/sails-generate-landing-page
|
||||
|
|
@ -162,7 +162,115 @@ module.exports = {
|
|||
|
||||
targets: {
|
||||
'./': ['action'],// << Use underlying default generator
|
||||
'./:newViewRelPath': { template: 'page.ejs.template' },
|
||||
'./:newViewRelPath': {
|
||||
exec: function(scope, done){
|
||||
return generateFile({
|
||||
rootPath: scope.rootPath,
|
||||
force: scope.force,
|
||||
contents:
|
||||
`<div id="${scope.stem}" v-cloak>
|
||||
|
||||
<div purpose="hero-background" class="container-lg d-flex justify-content-center">
|
||||
|
||||
<div purpose="hero-container" class="d-flex flex-column align-items-center">
|
||||
<div purpose="hero-text">
|
||||
<h4 class="mb-2">A magni, recusandae qui omnis in quod?</h4>
|
||||
<h1>${_.capitalize(scope.stem.replace(/\-/gim, ' '))}</h1>
|
||||
<p>Vitae architecto reiciendis in temporibus consequatur doloremque reprehenderit perferendis? Eaque quod voluptates earum corporis, quo labore reprehenderit libero sint.</p>
|
||||
<div purpose="button-row" class="d-flex flex-sm-row flex-column justify-content-center align-items-center">
|
||||
<a purpose="cta-button" href="/try-fleet/register?tryitnow">Try Fleet today</a>
|
||||
<a @click="clickOpenChatWidget()" purpose="animated-arrow-button-red">Talk to an expert</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div purpose="page-container" class="container-lg">
|
||||
<div purpose="feature" class="d-flex flex-md-row flex-column-reverse justify-content-between mx-auto align-items-center">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Culpa ab maiores alias ut, non.</h3>
|
||||
<p>Do vero et, voluptatem fugiat consequatur? totam ut dolores ut velit! Sapiente et quasi et voluptas et doloribus quaerat minima saepe enim?</p>
|
||||
<div purpose="checklist" class="flex-column d-flex">
|
||||
<p>Necessitatibus qui harum non dolore a quis!</p>
|
||||
<p>Mollitia ipsum dicta hic quidem aut debitis qui iusto.</p>
|
||||
<p>Esse dolor animi nostrum quidem expedita.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div purpose="feature-image" class="ml-md-5">
|
||||
<img alt="${scope.stem} feature image" src="https://my.feralgoblin.com/cass/300/300?text=${scope.stem.replace(/\-/gim, ' ')}+image+1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div purpose="feature" class="d-flex flex-md-row flex-column justify-content-between mx-auto align-items-center">
|
||||
<div purpose="feature-image" class="mr-md-5">
|
||||
<img alt="${scope.stem} feature image" src="https://my.feralgoblin.com/cass/300/300?text=${scope.stem.replace(/\-/gim, ' ')}+image+2">
|
||||
</div>
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Doloribus natus nihil alias earum, eius ducimus.</h3>
|
||||
<p>Laboriosam iusto magnam suscipit quasi ut quod, non, exercitationem. Enim aut consectetur repellat nihil pariatur? blanditiis.</p>
|
||||
<div purpose="checklist" class="flex-column d-flex">
|
||||
<p>Necessitatibus qui harum non dolore a quis!</p>
|
||||
<p>Mollitia ipsum dicta hic quidem aut debitis qui iusto.</p>
|
||||
<p>Esse dolor animi nostrum quidem expedita.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div purpose="feature" class="d-flex flex-md-row flex-column-reverse justify-content-between mx-auto align-items-center">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Ex, illum voluptates impedit nulla, et sunt cupiditate quas illo mollitia pariatur?? Tempora et delectus ut atque vel eaque optio, inventore.</h3>
|
||||
<p>Similique ea provident ducimus nulla ea debitis sequi nihil.</p>
|
||||
<div purpose="checklist" class="flex-column d-flex">
|
||||
<p>Necessitatibus qui harum non dolore a quis!</p>
|
||||
<p>Mollitia ipsum dicta hic quidem aut debitis qui iusto.</p>
|
||||
<p>Esse dolor animi nostrum quidem expedita.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div purpose="feature-image" class="ml-md-5">
|
||||
<img alt="${scope.stem} feature image" src="https://my.feralgoblin.com/cass/300/300?text=${scope.stem.replace(/\-/gim, ' ')}+image+3">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div purpose="button-row" style="margin-top: 60px;" class="d-flex flex-sm-row flex-column justify-content-center align-items-center mx-auto">
|
||||
<a purpose="cta-button" href="/try-fleet/register?tryitnow">Try Fleet today</a>
|
||||
<a @click="clickOpenChatWidget()" purpose="animated-arrow-button-red">Talk to an expert</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div purpose="bottom-gradient">
|
||||
<div purpose="tweets-container" class="container-fluid px-md-0 pb-0 d-flex flex-column justify-content-center">
|
||||
<div purpose="section-heading" style="max-width: 720px" class="mx-auto text-center">
|
||||
<h4>Don’t know osquery?</h4>
|
||||
<h2>Dedicated support from osquery experts</h2>
|
||||
<p>Osquery is the open-source agent that powers Fleet. And we have the most osquery experts around. We’ll help you realize the potential of this tool for your organization.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<scrollable-tweets></scrollable-tweets>
|
||||
<div purpose="page-container" class="pb-0 container">
|
||||
|
||||
<div purpose="bottom-cta" class="text-center">
|
||||
<h4>Open-source device management</h4>
|
||||
<h1>Think for yourself</h1>
|
||||
<div purpose="button-row" style="margin-top: 60px;" class="d-flex flex-sm-row flex-column justify-content-center align-items-center mx-auto">
|
||||
<a purpose="cta-button" href="/try-fleet/register?tryitnow">Try it out</a>
|
||||
<a @click="clickOpenChatWidget()" purpose="animated-arrow-button-red">Talk to an expert</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-column" purpose="bottom-cloud-city-banner">
|
||||
<img alt="A glass city floating on top of fluffy white clouds" class="d-none d-lg-flex" src="/images/homepage-cloud-city-banner-lg-1600x375@2x.png">
|
||||
<img alt="A glass city floating on top of fluffy white clouds" class="d-none d-md-flex d-lg-none" src="/images/homepage-cloud-city-banner-md-990x375@2x.png">
|
||||
<img alt="A glass city floating on top of fluffy white clouds" class="d-flex d-md-none" src="/images/homepage-cloud-city-banner-sm-375x168@2x.png">
|
||||
</div>
|
||||
</div>
|
||||
<%- /* Expose server-rendered data as window.SAILS_LOCALS :: */ exposeLocalsToBrowser() %>\n`
|
||||
}, done);
|
||||
}
|
||||
},
|
||||
'./:newStylesheetRelPath': { template: 'stylesheet.less.template' },
|
||||
'./:newPageScriptRelPath': { template: 'page-script.page.js.template' }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,100 +0,0 @@
|
|||
<div id="<%= stem %>" v-cloak>
|
||||
|
||||
<div purpose="hero-background" class="container-lg d-flex justify-content-center">
|
||||
|
||||
<div purpose="hero-container" class="d-flex flex-column align-items-center">
|
||||
<div purpose="hero-text">
|
||||
<h4 class="mb-2">A magni, recusandae qui omnis in quod?</h4>
|
||||
<h1><%= _.capitalize(stem.replace(/\-/gim, ' ')) %></h1>
|
||||
<p>Vitae architecto reiciendis in temporibus consequatur doloremque reprehenderit perferendis? Eaque quod voluptates earum corporis, quo labore reprehenderit libero sint.</p>
|
||||
<div purpose="button-row" class="d-flex flex-sm-row flex-column justify-content-center align-items-center">
|
||||
<a purpose="cta-button" href="/try-fleet/register?tryitnow">Try Fleet today</a>
|
||||
<a @click="clickOpenChatWidget()" purpose="animated-arrow-button-red">Talk to an expert</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div purpose="page-container" class="container-lg">
|
||||
<div purpose="feature" class="d-flex flex-md-row flex-column-reverse justify-content-between mx-auto align-items-center">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Culpa ab maiores alias ut, non.</h3>
|
||||
<p>Do vero et, voluptatem fugiat consequatur? totam ut dolores ut velit! Sapiente et quasi et voluptas et doloribus quaerat minima saepe enim?</p>
|
||||
<div purpose="checklist" class="flex-column d-flex">
|
||||
<p>Necessitatibus qui harum non dolore a quis!</p>
|
||||
<p>Mollitia ipsum dicta hic quidem aut debitis qui iusto.</p>
|
||||
<p>Esse dolor animi nostrum quidem expedita.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div purpose="feature-image" class="ml-md-5">
|
||||
<img alt="<%= stem %> feature image" src="https://my.feralgoblin.com/cass/300/300?text=<%= stem.replace(/\-/gim, ' ') %>+image+1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div purpose="feature" class="d-flex flex-md-row flex-column justify-content-between mx-auto align-items-center">
|
||||
<div purpose="feature-image" class="mr-md-5">
|
||||
<img alt="<%= stem %> feature image" src="https://my.feralgoblin.com/cass/300/300?text=<%=stem.replace(/\-/gim, ' ')%>+image+2">
|
||||
</div>
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Doloribus natus nihil alias earum, eius ducimus.</h3>
|
||||
<p>Laboriosam iusto magnam suscipit quasi ut quod, non, exercitationem. Enim aut consectetur repellat nihil pariatur? blanditiis.</p>
|
||||
<div purpose="checklist" class="flex-column d-flex">
|
||||
<p>Necessitatibus qui harum non dolore a quis!</p>
|
||||
<p>Mollitia ipsum dicta hic quidem aut debitis qui iusto.</p>
|
||||
<p>Esse dolor animi nostrum quidem expedita.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div purpose="feature" class="d-flex flex-md-row flex-column-reverse justify-content-between mx-auto align-items-center">
|
||||
<div class="d-flex flex-column">
|
||||
<h3>Ex, illum voluptates impedit nulla, et sunt cupiditate quas illo mollitia pariatur?? Tempora et delectus ut atque vel eaque optio, inventore.</h3>
|
||||
<p>Similique ea provident ducimus nulla ea debitis sequi nihil.</p>
|
||||
<div purpose="checklist" class="flex-column d-flex">
|
||||
<p>Necessitatibus qui harum non dolore a quis!</p>
|
||||
<p>Mollitia ipsum dicta hic quidem aut debitis qui iusto.</p>
|
||||
<p>Esse dolor animi nostrum quidem expedita.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div purpose="feature-image" class="ml-md-5">
|
||||
<img alt="<%= stem %> feature image" src="https://my.feralgoblin.com/cass/300/300?text=<%=stem.replace(/\-/gim, ' ')%>+image+3">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div purpose="button-row" style="margin-top: 60px;" class="d-flex flex-sm-row flex-column justify-content-center align-items-center mx-auto">
|
||||
<a purpose="cta-button" href="/try-fleet/register?tryitnow">Try Fleet today</a>
|
||||
<a @click="clickOpenChatWidget()" purpose="animated-arrow-button-red">Talk to an expert</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div purpose="bottom-gradient">
|
||||
<div purpose="tweets-container" class="container-fluid px-md-0 pb-0 d-flex flex-column justify-content-center">
|
||||
<div purpose="section-heading" style="max-width: 720px" class="mx-auto text-center">
|
||||
<h4>Don’t know osquery?</h4>
|
||||
<h2>Dedicated support from osquery experts</h2>
|
||||
<p>Osquery is the open-source agent that powers Fleet. And we have the most osquery experts around. We’ll help you realize the potential of this tool for your organization.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<scrollable-tweets></scrollable-tweets>
|
||||
<div purpose="page-container" class="pb-0 container">
|
||||
|
||||
<div purpose="bottom-cta" class="text-center">
|
||||
<h4>Open-source device management</h4>
|
||||
<h1>Think for yourself</h1>
|
||||
<div purpose="button-row" style="margin-top: 60px;" class="d-flex flex-sm-row flex-column justify-content-center align-items-center mx-auto">
|
||||
<a purpose="cta-button" href="/try-fleet/register?tryitnow">Try it out</a>
|
||||
<a @click="clickOpenChatWidget()" purpose="animated-arrow-button-red">Talk to an expert</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex flex-column" purpose="bottom-cloud-city-banner">
|
||||
<img alt="A glass city floating on top of fluffy white clouds" class="d-none d-lg-flex" src="/images/homepage-cloud-city-banner-lg-1600x375@2x.png">
|
||||
<img alt="A glass city floating on top of fluffy white clouds" class="d-none d-md-flex d-lg-none" src="/images/homepage-cloud-city-banner-md-990x375@2x.png">
|
||||
<img alt="A glass city floating on top of fluffy white clouds" class="d-flex d-md-none" src="/images/homepage-cloud-city-banner-sm-375x168@2x.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -97,4 +97,4 @@
|
|||
<img alt="A glass city floating on top of fluffy white clouds" class="d-flex d-md-none" src="/images/homepage-cloud-city-banner-sm-375x168@2x.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%- /* Expose server-rendered data as window.SAILS_LOCALS :: */ exposeLocalsToBrowser() %>
|
||||
|
|
|
|||
Loading…
Reference in a new issue