fleet/website/assets/styles/pages/docs/basic-documentation.less

467 lines
7.7 KiB
Text
Raw Normal View History

#basic-documentation {
Put live documentation on fleetdm.com (#1380) * minor clarifications * further expand comments and stubs * absorb custom titles embedded in metadata, plus further comment expansion and a followup fix for something i left hanging in f8cbc14829d91e7577c63307fd9c4346dbc229bb * Skip non-markdown files and use real path maths * Prep for running in parallel (Remove `continue` so this isn't dependent on the `for` loop) * determine + track unique HTML output paths * Compile markdown + spit out real HTML (without involving any but the crunchy nougaty dependency from the very center of everything) * add md metadata parsing * add timestamp * Update build-static-content.js * attach misc metadata as "other" * how doc images might should work (this also aligns with how the select few images in the sailsjs.com docs work) * add file extension to generated HTML files * "options"=>"meta" * Make "htmlId" useful for alphabetically sorting pages within their bottom-level section See recent comments on https://github.com/fleetdm/fleet/issues/706 for more information. * list out the most important, specific build-time transformations * Omit ordering prefixes like "1-" from expected content page URLs * add a little zone for consolidating backwards compatible permalinks * interpret README.md files by mapping their URLs to match their containing folder * clarify plan for images * decrease probability of collisions * Make capitalization smarter using known acronyms, proper nouns, and a smarter numeric word trim * Resolve app path in case pwd is different in prod * Delete HTML output from previous runs, if any * condense the stuff about github emojis * got rid of "permalink" thing, since id gets automatically attached during markdown compilation anyway Also "permalink" isn't even a good name for what this is. See https://github.com/fleetdm/fleet/issues/706#issuecomment-884693931 * …and that eliminates the need for the cheerio dep! * Bring in bubbles+syntax highlighting into build script, and remove sails.helpers.compileMarkdownContent() -- this leaves link munging as a todo though * trivial (condense comments) * Remove unused code from toHtml() helper * Implemented target="_blank" and root-relative-ification * remove todo about emojis after testing and verifying it works just fine * trivial: add link to comment in case github emojis matter at some point * consolidate "what ifs" in comments * Leave this up to Sarah, for now. (Either bring it back here in the build script or do it all on the frontend) * Enable /docs and /handbook routes, and add example of a redirect for a legacy/deprecated URL * implement routing * Upgrade deps this takes advantages of the latest work from @eashaw, @rachaelshaw, and the rest of the Sails community * tweak var names and comments * make readme pages use their folder names to determine their default (fallback) titles as discussed in https://github.com/fleetdm/fleet/issues/706#issuecomment-884788002 * first (good enough for now) pass at link rewriting as discussed in https://github.com/fleetdm/fleet/issues/706#issuecomment-884742072 * Adapt docs pages to build from markdown output * Continue work on docs pages * Add landing page * Remove unused code; minor changes * Replace regex * fixes https://github.com/fleetdm/fleet/pull/1380#issuecomment-891429581 * Don't rely on "path" being a global var * Syle fleetdm doc pages * Continue work on docs pages * Fix linting error * Disable lesshint style warnings * parasails-has-no-page-script attribute Added a parasails-has-no-page-script attribute to the docs template, added a check for that attribute in parasails.js and removed the empty page script for 498 * bring in latest parasails dep * trivial * Update links to dedupe and not open in new tab unless actually external * Disable handbook for now til styles are ready * fix CTA links * trivial * make sitemap.xml get served in prod * hide search boxes for now, remove hard-coded version and make releases open in new tab * clean out unused files Co-authored-by: gillespi314 <73313222+gillespi314@users.noreply.github.com> Co-authored-by: eashaw <caglc@live.com>
2021-08-18 00:55:13 +00:00
h1 {
font-size: 36px;
line-height: 48px;
}
h3 {
font-size: 22px;
line-height: 36px;
}
h4 {
font-size: 18px;
padding-top: 24px;
}
h6 {
font-family: 'Nunito';
}
a {
color: @core-vibrant-blue;
}
ul {
list-style: none;
padding-left: 8px;
li {
padding-bottom: 8px;
}
}
[purpose='docs-landing-page'] {
h3 {
font-size: 24px;
line-height: 32px;
}
a {
color: @core-vibrant-blue;
}
[purpose='search'] {
input {
padding-top: 6px;
padding-bottom: 6px;
&::placeholder {
font-size: 16px;
line-height: 24px;
}
}
.input-group-text {
color: @core-fleet-black-50;
border-color: @core-fleet-black-25;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}
.form-control {
height: 48px;
font-size: 16px;
border-color: @core-fleet-black-25;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
&:focus {
border: 1px solid @core-fleet-black-25;
}
}
}
[purpose='cta-cards'] {
.cta-card {
cursor: pointer;
border: 1px solid @ui-gray;
border-radius: 8px;
box-shadow: 1px 2px 2px rgba(197, 199, 209, 0.2);
.cta-image {
max-height: 60px;
width: auto;
}
.cta-text {
a {
color: @core-fleet-black;
text-decoration: none;
}
img {
padding-left: 8px;
transition: 0.2s ease-in-out;
-o-transition: 0.2s ease-in-out;
-ms-transition: 0.2s ease-in-out;
-moz-transition: 0.2s ease-in-out;
-webkit-transition: 0.2s ease-in-out;
}
&:hover {
.arrow {
img {
padding-left: 11px;
transition: 0.2s ease-in-out;
-o-transition: 0.2s ease-in-out;
-ms-transition: 0.2s ease-in-out;
-moz-transition: 0.2s ease-in-out;
-webkit-transition: 0.2s ease-in-out;
}
}
}
}
}
}
[purpose='docs-tree'] {
a {
color: @core-fleet-black;
text-decoration: none;
&:hover {
color: @core-vibrant-blue;
}
}
}
@media (min-width: 768px) {
.cta-card {
max-width: 437px;
min-height: 160px;
.cta-image {
max-height: 72px;
}
}
}
}
[purpose='docs-template'] {
h3 {
code {
color: @core-fleet-black;
}
}
[purpose='search'] {
input {
padding-top: 6px;
padding-bottom: 6px;
border-radius: 6px;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
&::placeholder {
font-size: 16px;
line-height: 24px;
}
}
.input-group-prepend {
border-radius: 6px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
.input-group-text {
color: #8b8fa2;
border-color: #c5c7d1;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
.form-control {
height: 40px;
font-size: 16px;
border-color: #c5c7d1;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
&:focus {
border: 1px solid #c5c7d1;
}
}
}
[purpose='breadcrumbs'] {
p, a {
font-size: 14px;
}
}
[purpose='mobile-docs-nav'] {
a {
color: @core-fleet-black;
text-decoration: none;
&.active {
color: @core-vibrant-blue;
}
}
[purpose='docs-nav-button'] {
color: @core-fleet-black;
background-color: transparent;
font-family: 'Nunito';
font-weight: 400;
font-size: 16px;
padding: 0;
padding-top: 12px;
padding-bottom: 12px;
&:focus {
box-shadow: none;
}
}
}
[purpose='left-sidebar'] {
font-size: 14px;
border-right: 1px solid @core-fleet-black-25;
a {
color: @core-fleet-black;
text-decoration: none;
&:hover {
color: #6A67FE;
}
&.btn-primary {
color: #fff;
}
.btn-primary {
color: #fff;
background-color: #ff5c83;
border-color: #ff5c83;
&:hover {
background-color: darken(#ff5c83, 10%);
border-color: darken(#ff5c83, 10%);
}
}
}
.left-nav {
border-bottom: 1px solid @core-fleet-black-25;
}
.topic {
&.active {
color: @core-vibrant-blue;
}
}
}
[purpose='right-sidebar'] {
p, a {
font-size: 14px;
}
a {
&:hover {
color: #6A67FE;
}
}
}
[purpose='content'] {
h1 {
padding-bottom: 16px;
}
h2 {
font-size: 28px;
line-height: 36px;
padding-top: 24px;
padding-bottom: 24px;
}
h3 {
font-size: 24px;
line-height: 28px;
padding-top: 24px;
padding-bottom: 24px;
margin-bottom: 0px;
}
ul {
list-style-type: disc;
padding-left: 32px;
}
img {
display: flex;
width: 100%;
height: auto;
padding-top: 24px;
padding-bottom: 24px;
}
h1 + ul {
display: none; // Hides links at top of some markdown files
}
h2 + h3 {
padding-top: 8px;
}
.note {
background-color: @core-vibrant-blue-10;
border-radius: 12px;
text-decoration: none;
}
}
// for smaller screens
@media (max-width: 991px) {
[purpose='right-sidebar'] {
width: 100%;
[purpose='subtopics'] {
color: @core-fleet-black;
a {
color: @core-vibrant-blue;
}
}
}
[purpose='content'] {
width: 100%;
h1:first-of-type {
display: none; // hides on mobile
}
}
}
// for larger screens
@media (min-width: 992px) {
ul {
.topic {
padding-left: 8px;
}
}
[purpose='search'] {
.input-group {
min-width: 400px;
}
}
[purpose='page-title'] {
h1 {
display: block;
}
}
[purpose='right-sidebar'] {
min-width: 190px;
max-width: 210px;
[purpose='subtopics'] {
color: @core-fleet-black;
padding-top: 4px;
padding-bottom: 4px;
border-left: 1px solid @core-vibrant-blue-25;
a {
color: @core-fleet-black;
text-decoration: none;
&:hover {
color: @core-vibrant-blue;
}
}
// .active {
// color: @core-vibrant-blue;
// position: absolute;
// height: 32px;
// transform: translate(-2px, -4px);
// border-left: 3px solid @core-vibrant-blue;
// border-radius: 2px;
// a {
// color: @core-vibrant-blue;
// }
// }
}
}
[purpose='content'] {
min-width: 0px; // in order for <pre> elements to shrink properly, the parent flex element needs to override min-width auto
}
}
}
@import 'code-blocks.less'; // styles for code blocks and hljs
}