From a4bcdb1fdbe6423d705db82914025ca72873c156 Mon Sep 17 00:00:00 2001 From: Mike McNeil Date: Tue, 23 Mar 2021 04:36:35 -0500 Subject: [PATCH] Fix lint rules and simplify website development by checking in a dev-only config file that sets the default port to 2024 instead of 1337, so you dont have to do that with a command-line option. --- website/README.md | 20 ++++++++++++------- .../assets/styles/bootstrap-overrides.less | 2 +- website/assets/styles/layout.less | 5 ++--- website/config/env/development.js | 17 ++++++++++++++++ website/views/layouts/layout.ejs | 8 ++++---- 5 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 website/config/env/development.js diff --git a/website/README.md b/website/README.md index 4b24e219e8..de5f1b402f 100644 --- a/website/README.md +++ b/website/README.md @@ -3,21 +3,27 @@ This is where the code for the public https://fleetdm.com website lives. -a [Sails v1](https://sailsjs.com) application + + ## Test locally - Run the following commands to test the site locally: ```sh npm install -g sails cd website/ npm install -sails lift --port=2024 +sails lift ``` -The site will now be running on http://localhost:2024 +Your local copy of the website is now running at [http://localhost:2024](http://localhost:2024)! + +## Bugs +To report a bug or make a suggestion for the website, [click here](https://github.com/fleetdm/fleet/issues). + + + - + diff --git a/website/assets/styles/bootstrap-overrides.less b/website/assets/styles/bootstrap-overrides.less index 6ec1c663b8..df418a5e6f 100644 --- a/website/assets/styles/bootstrap-overrides.less +++ b/website/assets/styles/bootstrap-overrides.less @@ -87,7 +87,7 @@ h1, h2, h3, h4 { } .dropdown-menu { - left: 16px !important; + left: 16px !important;//lesshint-disable-line importantRule min-width: 0; margin: 0; } diff --git a/website/assets/styles/layout.less b/website/assets/styles/layout.less index d551ea3e4c..2aacfc570b 100644 --- a/website/assets/styles/layout.less +++ b/website/assets/styles/layout.less @@ -10,8 +10,7 @@ html, body { [purpose='page-wrap'] { height: 100%; - /* lesshint-disable */height: auto !important;/* lesshint-enable */ - // ^^The above is to disable "importantRule" and "duplicateProperty" rules. + height: auto !important;//lesshint-disable-line importantRule,duplicateProperty min-height: 100%; position: relative; padding-bottom: @footer-height; @@ -23,7 +22,7 @@ html, body { right: 0; .header-btn { color: #ffffff; - cursor: default !important; + cursor: default !important;//lesshint-disable-line importantRule font-family: @navigation-font; } // .header-btn[aria-expanded='true'] { diff --git a/website/config/env/development.js b/website/config/env/development.js new file mode 100644 index 0000000000..fdd45c303e --- /dev/null +++ b/website/config/env/development.js @@ -0,0 +1,17 @@ +/** + * Development environment settings + * (sails.config.*) + * + * The configuration in this file only applies when Sails is running + * in the local development environment. + */ + +module.exports = { + + // Develop locally on http://localhost:2024 + // (instead of the standard default for Sails apps, http://localhost:1337. + // This helps avoid conflicts since `fleetctl preview` will very often already + // be running on port 1337 on your computer.) + port: 2024, + +}; diff --git a/website/views/layouts/layout.ejs b/website/views/layouts/layout.ejs index ac985b9d2e..f7325eb5c6 100644 --- a/website/views/layouts/layout.ejs +++ b/website/views/layouts/layout.ejs @@ -55,13 +55,13 @@