Restructure for Docsy theme

This commit is contained in:
Jeremy Vyska 2022-02-20 13:18:49 +01:00
parent f4a1ebc077
commit cceb0c945e
376 changed files with 963 additions and 186 deletions

6
.gitignore vendored
View file

@ -1,3 +1,7 @@
public/
/node_modules/
/resources/_gen/
/resources/_gen/
## Locking files for when working with local servers
.hugo_build.lock
package-lock.json

BIN
assets/icons/SiteLogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
assets/icons/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

1
assets/icons/logo.svg Normal file
View file

@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 255 255"><defs><style>.cls-1{fill:#2ea98e;}</style></defs><title>AL logo_VS_smallest version_v3</title><path class="cls-1" d="M92.71,61.16a12.38,12.38,0,0,0-11.56-8h-.44a12.38,12.38,0,0,0-11.56,8l-52.79,138H46.58l8.06-23h52.58l8.06,23h30.21Zm-29.16,89,17.38-49.58L98.3,150.2Z"/><path class="cls-1" d="M189.7,172.2V54.2h-28V180.92c0,12.21,11.34,18.28,18,18.28h59v-27Z"/></svg>

After

Width:  |  Height:  |  Size: 461 B

View file

@ -0,0 +1,720 @@
/*
Add styles or override variables from the theme here.
*/
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');
body {
font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif !important;
font-weight:300 !important;
}
$display1-weight: 500 !default;
$display2-weight: 100 !default;
$primary: #1f2a43 !default;
$primary-light: lighten($primary, 90%) !default;
$secondary: #2d70de !default;
$light: rgb(255, 255, 255) !default;
$grey: #888 !default;
$orange: $secondary;
ul, ol {
padding-left: 2em;
}
.navbar-logo {
height: 2em;
}
.nav-shadow {
box-shadow: 0 2px 2px -2px rgba(0,0,0,.2);
}
.navbar-brand {
color: #048273 !important
}
.navbar-bg-onscroll {
box-shadow: 0 2px 2px -2px rgba(0,0,0,.2);
#docsy-top {
display: block !important;
}
}
.control-bar {
display: none;
}
.td-content pre {
word-wrap: normal;
background-color: #f8f9fa;
padding: 1rem;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 1px solid rgba(0, 0, 0, 0.125);
border-radius: 0.25rem;
}
.highlight > pre {
border: 0px;
}
.td-content blockquote {
border-radius: .15rem;
}
.notice.info {
border-left-color: #6bf;
background-color: rgba(102,187,255,.1);
}
.notice.warning {
border-left-color: #fd6;
background-color: rgba(255,221,102,.1);
}
.notice.danger {
border-left-color: #f66;
background-color: rgba(255,102,102,.1);
}
.notice > ul {
margin-bottom: 0em;
}
#docsy-search {
background: rgba(190, 185, 185, 0.3);
}
input[type="search"]::placeholder {
color: #9B9595 !important;
}
.td-box--secondary p > a:hover {
color: #121314 !important;
}
#community a {
color: #121314 !important;
}
.showcase img {
margin: 0 30px;
}
.td-content > h1 { font-weight: 700; }
.td-content > h2 { font-weight: 700; }
.td-content > h3 { font-weight: 700; }
.td-content > h4 { font-weight: 700; }
.td-content > h5 { font-weight: 700; }
.td-content > h6 { font-weight: 700; }
.td-content > h7 { font-weight: 700; }
// Custom CSS for homepage
.hero {
padding: 20px 0px 25px 0px;
color: white;
background: rgb(33,39,73);
background: linear-gradient(130deg, #473782 50%, #2c2c62 70%);
margin-left: -15px;
margin-right: -15px;
position: relative;
overflow: hidden;
.container {
position: relative;
z-index: 2;
}
}
@media (min-width: 992px) {
.hero {
padding: 130px 0 100px;
}
.hero-banner {
transform: scale(1.4) translateY(10%);
}
}
@media (min-width: 1170px) {
.hero {
&:before {
content: '';
width: 60vw;
height: 60vw;
display: block;
background: linear-gradient(90deg, rgba(42,24,102,1) 59%, rgba(44,44,98,1) 70%);
position: absolute;
left: -20vw;
top: -20vw;
transform: rotate(45deg);
border-radius: 10%;
}
&:after {
content: '';
width: 20vw;
height: 100vw;
display: block;
background: linear-gradient(-74deg, #2c2c62 50%, #3f3479 70%);
position: absolute;
left: 55vw;
bottom: -40vw;
z-index: 1;
transform: rotate(45deg);
}
.container {
position: relative;
z-index: 2;
}
}
}
.hero-title {
font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif !important;
font-weight: 700 !important;
// margin-top: 80px;
font-size: 56px;
}
// .hero-banner {
// margin-top: 80px;
// }
.hero-big {
background: rgb(112, 85, 255);
background: linear-gradient(
140deg,
rgba(112, 85, 255, 1) 0%,
rgba(140, 61, 180, 1) 100%
);
padding: 12px 38px;
border: none;
border-radius: 4px;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
font-size: 22px;
font-weight: 400;
color: white;
margin: 10px 0px 40px 0px;
}
.hero-mid {
background: rgb(112, 85, 255);
background: linear-gradient(140deg,rgba(112, 85, 255, 1) 0%, rgba(140, 61, 180, 1) 100%);
padding: 16px 30px;
border-radius: 4px;
border: none;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
font-size: 18px;
font-weight: 400;
color: white;
margin: 30px 0px 10px 0px;
&:hover {
box-shadow: 0 3px 7px #b7b7b7;
}
}
.body-container {
margin-left: -15px;
margin-right: -15px;
}
.body-container .row {
padding: 30px 0px;
margin: 20px auto;
}
.td-navbar {
.nav-link {
font-weight: normal !important;
color: #f4f4f4 !important;
border-bottom: 1px solid transparent;
&:hover {
color: #fff !important;
border-bottom: 1px solid #E361FD;
}
}
}
.td-search-input::placeholder {
color: #fff !important;
}
.section-title {
color: #3b3c4c;
font-weight: 700;
font-size: 46px;
margin: 12px 0px;
}
.section-text-bold {
color: #3b3c4c;
font-weight: 700;
margin: 12px 0px;
font-size: 18px;
line-height: 1.2;
}
.section-text {
color: #5a5b75;
font-weight: 400;
margin: 12px 0px;
font-size: 18px;
}
.wide-image {
// width: 100%;
margin-left: -15px;
margin-right: -15px;
}
.big-waves {
width: 100% !important;
position: relative;
top: -40px;
}
.push-up {
margin-top: -50px;
}
.center-text {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.push-up .col-lg-4, .whats-new .col-lg-4,
.community-cards .card-shadow, .community-cards.show-desktop .col-lg-6{
margin-bottom: 20px;
}
.card-shadow {
padding: 35px 30px 30px 30px;
text-align: center;
box-shadow: 0 5px 10px 0 rgba(41,26,204,0.12);
border: none;
border-radius: 6px;
height: 100%;
}
.card-shadow .section-text-bold {
font-size: 22px;
}
.card-shadow img {
margin: 2px auto;
}
.card-shadow .section-text {
color: #5a5b75;
font-size: 16px;
line-height: 1.5;
}
.feature-card {
padding: 20px;
border-radius: 0;
height: 100%;
border: 1px solid #E8E8E8;
background-color: #FFFFFF;
}
.feature-card .card-header-custom .section-text-bold {
font-size: 20px;
margin: 4px 0 0;
}
.feature-card p.section-text {
font-size: 15px;
}
.feature-card p:last-child {
margin-bottom: 0;
}
.card-header-custom {
display: flex;
flex-direction: row;
align-items: flex-start;
min-height: 58px;
}
.card-header-custom img {
margin-right: 16px;
}
.card-header-custom .section-text-bold {
font-size: 18px;
color: #3b3c4c;
}
.card .section-text {
font-size: 14px;
color: #5a5b75;
}
.info-card {
text-align: center;
margin: 0px auto 30px auto;
}
.info-card .section-text-bold {
font-size: 22px;
}
.info-card .section-text {
font-size: 17px;
}
.info-card img {
margin: 10px auto;
}
.whats-new {
background: url("/images/whats-new-bg.webp") no-repeat;
background-size: cover;
background-position: 0 -150px;
}
.whats-new .card-shadow {
height: 100%;
}
.whats-new .section-title {
color: white;
margin-bottom: 5px;
margin-top: 4rem
}
.whats-new .card-shadow {
background: white;
padding: 25px 15px 15px 15px;
min-height: unset;
box-shadow: 0 5px 10px 0 rgba(41,26,204,0.12);
}
.whats-new .card-shadow:hover {
box-shadow: 5px 10px 30px 0 rgba(41,26,204,0.12);
}
.whats-new .card-shadow-content {
padding: 0px 12px;
}
.whats-new .card-shadow button {
padding: 12px 22px !important;
}
@media (min-width: 992px) {
.whats-new .card-shadow .section-text-bold {
min-height: 80px;
}
.whats-new .card-shadow .section-text {
min-height: 122px;
}
}
.card-badge {
background: #f2f0fb;
padding: 6px 15px;
text-transform: uppercase;
border-radius: 5px;
color: #5a5b75;
font-weight: 400;
font-size: 16px;
}
.card-shadow .hero-mid {
width: 100%;
position: relative;
bottom: 0px;
}
.card-shadow .hero-mid-2 {
width: 100%;
position: relative;
bottom: 0px;
}
.hero-mid-2 {
background: white;
padding: 12px 22px;
border-radius: 4px;
border: 1px solid #8147d2;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
font-size: 18px;
font-weight: 400;
color: #8147d2;
margin: 30px 0px 10px 0px;
font-weight: 700;
&:hover {
background: #7055ff;
background: linear-gradient(140deg, #7055ff 0%, #8c3db4 100%);
color: #fff;
box-shadow: 0 3px 7px #b7b7b7;
}
}
.community-cards {
background: url("/images/color-bg.webp") no-repeat center;
background-size: contain;
}
.community-cards .card-shadow {
background: white;
min-height: 150px;
padding: 16px 22px;
}
.community-cards .card-header-custom {
margin-right: auto;
display: flex;
align-items: center;
}
.community-cards .card-header-custom p.section-text-bold {
margin: 0;
}
.community-cards .card-shadow img {
margin-left: unset;
}
.community-cards .card-shadow .section-text {
text-align: left;
font-size: 14px;
margin-top: 4px;
}
.community-cards a:hover .card-shadow {
box-shadow: 0 10px 11px rgba(41, 26, 204, .12);
}
.text-highlight {
color: #8147d2;
}
.community-cards .row {
padding: 30px 0px;
margin: 20px 2px;
}
.twitter-card-desktop {
position: relative;
left: 150px;
top: 10px;
}
.show-mobile {
display: none;
}
@media (max-width: 1299px) {
.hero {
background: url("/images/hero-bg.webp") no-repeat;
background-size: cover;
}
}
@media (max-width: 575px) {
.row {
display: inherit;
}
}
@media (min-width: 320px) and (max-width: 990px) {
.show-desktop {
display: none;
}
.show-mobile {
display: block;
}
.hero {
background: url("/images/hero-bg.webp") no-repeat;
background-size: cover;
}
.hero-section-mobile .hero-title {
font-size: 39px;
}
.show-mobile-margin {
margin-top: 30px;
}
.card {
min-height: unset;
padding-bottom: 25px;
}
.card-shadow {
min-height: unset;
padding-bottom: 25px;
}
.whats-new {
background: url("/images/whats-new-bg.webp") no-repeat;
background-size: cover;
}
.community-cards {
background: unset;
}
}
.feature-section .card {
margin-bottom: 26px;
}
.feature-section .col-lg-4{
margin-bottom: 25px;
}
@media (max-width: 480px) {
.body-container .row {
padding: 30px 8px;
}
.community-cards {
background: unset;
}
}
.show-mobile-big {
display: none;
}
@media (max-width: 767px) {
.show-mobile-big {
display: block;
}
.show-desktop-big {
display: none;
}
.hero-section-mobile {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
}
.hero-section-mobile .show-mobile-big {
margin-top: 10px;
}
// {{< tabs >}}
// from https://github.com/alex-shpak/hugo-book
.hidden {
display: none;
}
.book-tabs {
margin-top: 1rem;
margin-bottom: 1rem;
border: 1px solid rgba(0, 0, 0, 0.125);
border-radius:.15rem;
overflow: hidden;
display: flex;
flex-wrap: wrap;
label {
display: inline-block;
padding: 0.5rem 1rem;
border-bottom: 1px transparent;
cursor: pointer;
}
.book-tabs-content {
order: 999;
width: 100%;
border-top: 1px solid #f8f9fa;
padding: 1rem;
display: none;
}
input[type="radio"]:checked + label {
border-bottom: 2px solid #05b;
}
input[type="radio"]:checked + label + .book-tabs-content {
display: block;
}
.book-tabs-content > .highlight {
margin: 0;
}
.book-tabs-content > blockquote.notice {
padding: 1.2em 0em 1.2em 1em;
margin-bottom: 1rem;
color: #616161;
border-left: 6px solid #2D70DE;
}
.book-tabs-content > blockquote.notice.notice.info { border-left-color: #6bf; }
.book-tabs-content > blockquote.notice.notice.warning { border-left-color: #fd6; }
.book-tabs-content > blockquote.notice.notice.danger { border-left-color: #f66; }
}
a {
text-decoration: inherit;
}
.post-img {
display: block;
> p {
text-align: center;
font-style: italic;
}
}
.DocSearch-Hit-title mark {
padding: 0;
}
.DocSearch-Hit-icon svg {
vertical-align: top;
}
.DocSearch-Hits mark {
padding: 0;
}
.DocSearch-Hit-content-wrapper {
overflow-y: hidden;
}

View file

@ -1,9 +0,0 @@
+++
title = "Performance"
weight = 980
+++
## AL Coding Guidelines
## **Performance**
Some guidelines are simply better for performance considerations rather than readability or anything else. In this section, let's look into some..

View file

@ -1,11 +0,0 @@
+++
title = "Readability"
weight = 980
+++
## AL Coding Guidelines
## **Readability**
Generally, all readability rules are Microsoft style choices only. You can use them to keep consistency with the existing code.
Find the AL guidelines by expanding the menu in the left.

View file

@ -1,15 +0,0 @@
+++
chapter = true
pre = "<b><i class='fas fa-medal'></i> </b>"
title = "BC Dev. Best Practices"
weight = 15
+++
# Business Central Best Practices
## Coming soon!
This section will be cover things that aren't as simple as Design Patterns, but will help make sure your development is:
- high-performance
- complies with good designs
- has high maintainability

View file

@ -1,12 +0,0 @@
+++
chapter = true
pre = "<b><i class='fas fa-clone'></i> </b>"
title = "BC Patterns"
weight = 10
+++
# Business Central Design Patterns
## Coming soon!
This section will be all about the Design Patterns for BC and AL.

View file

@ -1,9 +0,0 @@
+++
chapter = true
title = "1. Patterns"
weight = 110
+++
## Browse design patterns by tags
_Originally, this page was categorized set of links to subpages, but that is not necessary now with the menu system to the left._

5
content/blog/_index.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "AL Guidelines Blog"
linkTitle: "Blog"
type: "blog"
---

View file

@ -1,7 +1,8 @@
+++
title = "DeleteAll"
weight = 1180
+++
---
title: "DeleteAll"
tags: ["Performance"]
categories: ["Best Practice"]
---
<_Created by waldo, Described by waldo_\>

View file

@ -1,9 +1,10 @@
+++
title = "Subscriber Codeunits"
weight = 1180
+++
---
title: "Subscriber Codeunits"
tags: ["Performance"]
categories: ["Best Practice"]
---
<_Created by waldo, Described by waldo_\>
_Created by waldo, Described by waldo_
## Description

View file

@ -0,0 +1,21 @@
---
title: "Best Practices"
weight: 3
description: >
AL Code Best Practices
---
# Business Central Best Practices
This section will be cover things that aren't as simple as Design Patterns, but will help make sure your development is:
- high-performance
- complies with good designs
- has high maintainability
## Readability
Generally, all readability rules are Microsoft style choices only. You can use them to keep consistency with the existing code.
## Performance
Some guidelines are simply better for performance considerations rather than readability or anything else. In this section, let's look into some..

View file

@ -1,9 +1,10 @@
+++
title = "begin as an 'After Word'"
weight = 230
+++
---
title: "begin as an afterword"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description

View file

@ -1,9 +1,10 @@
+++
title = "Begin-End - Compound Only"
weight = 240
+++
---
title: "Begin-End - Compound Only"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
Only use begin..end to enclose [compound statements](https://docs.microsoft.com/en-us/cpp/c-language/compound-statement-c?view=msvc-170#:~:text=A%20compound%20statement%20%28also%20called%20a%20%22block%22%29%20typically,appear%20at%20the%20head%20of%20a%20compound%20statement.).

View file

@ -1,9 +1,10 @@
+++
title = "Binary Operator to Start Line"
weight = 250
+++
---
title: "Binary Operator to Start Line"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description

View file

@ -1,9 +1,10 @@
+++
title = "CASE Action on next line"
weight = 310
+++
---
title: "CASE Action on next line"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description

View file

@ -1,9 +1,10 @@
+++
title = "Comment Spacing"
weight = 360
+++
---
title: "Comment Spacing"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
Always start comments with // followed by one space character.

View file

@ -1,9 +1,10 @@
+++
title = "end else pair"
weight = 540
+++
---
title: "end else pair"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description

View file

@ -1,9 +1,10 @@
+++
title = "Keyword Pairs - Indentation"
weight = 730
+++
---
title: "Keyword Pairs - Indentation"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
The `if..then` pair, `while..do` pair, and `for..do` pair must appear on the same line or the same level of indentation. If possible, you can align the lines it is even much more readable.

View file

@ -1,8 +1,8 @@
+++
title = "Line Start Keywords"
weight = 740
+++
---
title: "Line Start Keywords"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
## Description

View file

@ -1,9 +1,10 @@
+++
title = "Lonely Repeat"
weight = 760
+++
---
title: "Lonely Repeat"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
The `repeat` statement should always be alone on a line.

View file

@ -1,9 +1,10 @@
+++
title = "Named Invocations"
weight = 830
+++
---
title: "Named Invocations"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
When calling an object statically use the Object Name, not the Object Id.

View file

@ -1,9 +1,10 @@
+++
title = "One Statement Per Line"
weight = 910
+++
---
title: "One Statement per Line"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
A line of code should not have more than one statement.

View file

@ -1,9 +1,10 @@
+++
title = "Separate if and else"
weight = 1050
+++
---
title: "Seperate if and else"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
`if` and `else` statements should be on separate lines.

View file

@ -1,9 +1,10 @@
+++
title = "Spacing Binary Operators"
weight = 1120
+++
---
title: "Spacing Binary Operators"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
There must be exactly one space character on each side of a binary operator such as = + - AND OR =. The parameter comma operator however, should have a space after the comma.

View file

@ -1,9 +1,10 @@
+++
title = "Suggested Abbreviations"
weight = 1170
+++
---
title: "Suggested Abbreviations"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description

View file

@ -1,9 +1,10 @@
+++
title = "Unnecessary 'else'"
weight = 1270
+++
---
title: "Unnecessary else"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
`else` should not be used when the last action in the `then` part is an `exit`, `break`, `skip`, `quit`, `error`.

View file

@ -1,9 +1,10 @@
+++
title = "Unnecessary true/false"
weight = 1300
+++
---
title: "Unnecessary true/false"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
Do not use `true` or `false` keywords unnecessarily if the expression is already an logical expression.

View file

@ -1,9 +1,10 @@
+++
title = "Variable Naming"
weight = 1420
+++
---
title: "Variable Naming"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
Variables that refer to a AL object must contain the objects name, abbreviated where necessary.

View file

@ -1,9 +1,10 @@
+++
title = "Variables Declarations Order"
weight = 1430
+++
---
title: "Variables Declarations Order"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
Variables declarations should be ordered by type. In general, object and complex variable types are listed first followed by simple variables. The order should be:

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more