App skeleton
This commit is contained in:
21
views/.eslintrc
Normal file
21
views/.eslintrc
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
// ╔═╗╔═╗╦ ╦╔╗╔╔╦╗┬─┐┌─┐ ┌─┐┬ ┬┌─┐┬─┐┬─┐┬┌┬┐┌─┐
|
||||
// ║╣ ╚═╗║ ║║║║ ║ ├┬┘│ │ │└┐┌┘├┤ ├┬┘├┬┘│ ││├┤
|
||||
// o╚═╝╚═╝╩═╝╩╝╚╝ ╩ ┴└─└─┘ └─┘ └┘ └─┘┴└─┴└─┴─┴┘└─┘
|
||||
// ┌─ ┌─┐┌─┐┬─┐ ┬┌┐┌┬ ┬┌┐┌┌─┐ ┌─┐┌─┐┬─┐┬┌─┐┌┬┐ ┌┬┐┌─┐┌─┐┌─┐ ─┐
|
||||
// │ ├┤ │ │├┬┘ │││││ ││││├┤ └─┐│ ├┬┘│├─┘ │ │ ├─┤│ ┬└─┐ │
|
||||
// └─ └ └─┘┴└─ ┴┘└┘┴─┘┴┘└┘└─┘ └─┘└─┘┴└─┴┴ ┴ ┴ ┴ ┴└─┘└─┘ ─┘
|
||||
// > An .eslintrc configuration override for use in the `views/` directory.
|
||||
//
|
||||
// (This works just like assets/.eslintrc, with one minor addition)
|
||||
//
|
||||
// For more information see:
|
||||
// https://sailsjs.com/anatomy/views/.eslintrc
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
"extends": [
|
||||
"../assets/.eslintrc"
|
||||
],
|
||||
"rules": {
|
||||
"eol-last": [0]
|
||||
}
|
||||
}
|
||||
64
views/404.ejs
Normal file
64
views/404.ejs
Normal file
File diff suppressed because one or more lines are too long
63
views/500.ejs
Normal file
63
views/500.ejs
Normal file
File diff suppressed because one or more lines are too long
110
views/layouts/layout.ejs
Normal file
110
views/layouts/layout.ejs
Normal file
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>New Sails App</title>
|
||||
|
||||
<!-- Viewport mobile tag for sensible mobile support -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
|
||||
|
||||
<!--
|
||||
Stylesheets and Preprocessors
|
||||
==============================
|
||||
|
||||
You can always bring in CSS files manually with `<link>` tags, or asynchronously
|
||||
using a solution like AMD (RequireJS). Or, if you like, you can take advantage
|
||||
of Sails' conventional asset pipeline (boilerplate Gruntfile).
|
||||
|
||||
By default, stylesheets from your `assets/styles` folder are included
|
||||
here automatically (between STYLES and STYLES END). Both CSS (.css) and LESS (.less)
|
||||
are supported. In production, your styles will be minified and concatenated into
|
||||
a single file.
|
||||
|
||||
To customize any part of the built-in behavior, just edit `tasks/pipeline.js`.
|
||||
For example, here are a few things you could do:
|
||||
|
||||
+ Change the order of your CSS files
|
||||
+ Import stylesheets from other directories
|
||||
+ Use a different or additional preprocessor, like SASS, SCSS or Stylus
|
||||
-->
|
||||
|
||||
<!--STYLES-->
|
||||
<link rel="stylesheet" href="/styles/importer.css">
|
||||
<!--STYLES END-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<%- body %>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
Client-side Templates
|
||||
========================
|
||||
|
||||
HTML templates are important prerequisites of modern, rich client applications.
|
||||
To work their magic, frameworks like React, Vue.js, Angular, Ember, and Backbone
|
||||
require that you load these templates client-side.
|
||||
|
||||
By default, your Gruntfile is configured to automatically load and precompile
|
||||
client-side JST templates in your `assets/templates` folder, then
|
||||
include them here automatically (between TEMPLATES and TEMPLATES END).
|
||||
|
||||
To customize this behavior to fit your needs, just edit `tasks/pipeline.js`.
|
||||
For example, here are a few things you could do:
|
||||
|
||||
+ Import templates from other directories
|
||||
+ Use a different view engine (handlebars, dust, pug/jade, etc.)
|
||||
+ Internationalize your client-side templates using a server-side
|
||||
stringfile before they're served.
|
||||
-->
|
||||
|
||||
<!--TEMPLATES-->
|
||||
|
||||
<!--TEMPLATES END-->
|
||||
|
||||
|
||||
<!--
|
||||
Server-side View Locals
|
||||
========================
|
||||
|
||||
Sometimes, it's convenient to get access to your server-side view locals from
|
||||
client-side JavaScript. This can improve page load times, remove the need for
|
||||
extra AJAX requests, and make your client-side code easier to understand and
|
||||
to maintain. Sails provides a simple mechanism for accessing dynamic view
|
||||
locals: the "exposeLocalsToBrowser()" view partial.
|
||||
|
||||
For more information on using this built-in feature, see:
|
||||
https://sailsjs.com/docs/concepts/views/locals#?escaping-untrusted-data-using-exposelocalstobrowser
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
Client-side Javascript
|
||||
========================
|
||||
|
||||
You can always bring in JS files manually with `script` tags, or asynchronously
|
||||
on the client using a solution like AMD (RequireJS). Or, if you like, you can
|
||||
take advantage of Sails' conventional asset pipeline (boilerplate Gruntfile).
|
||||
|
||||
By default, files in your `assets/js` folder are included here
|
||||
automatically (between SCRIPTS and SCRIPTS END). Both JavaScript (.js) and
|
||||
CoffeeScript (.coffee) are supported. In production, your scripts will be minified
|
||||
and concatenated into a single file.
|
||||
|
||||
To customize any part of the built-in behavior, just edit `tasks/pipeline.js`.
|
||||
For example, here are a few things you could do:
|
||||
|
||||
+ Change the order of your scripts
|
||||
+ Import scripts from other directories
|
||||
+ Use a different preprocessor, like TypeScript
|
||||
|
||||
-->
|
||||
|
||||
<!--SCRIPTS-->
|
||||
<script src="/dependencies/sails.io.js"></script>
|
||||
<!--SCRIPTS END-->
|
||||
</body>
|
||||
</html>
|
||||
78
views/pages/homepage.ejs
Normal file
78
views/pages/homepage.ejs
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user