Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorconfig page #2427

Merged
merged 37 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
832a680
Rebased with master
alanlomeli Aug 17, 2022
e75305e
Merge branch 'master' of https://github.com/fsprojects/fantomas into …
alanlomeli Aug 17, 2022
1ca47a8
Add function for formatting settings inside configuration page.
alanlomeli Aug 17, 2022
118c396
Clean a little bit introduction file
alanlomeli Aug 18, 2022
21005a7
Introduction
alanlomeli Aug 19, 2022
42a0654
Separated sections
alanlomeli Aug 19, 2022
b04e8b0
Recommendation system draft
alanlomeli Aug 19, 2022
840a814
Move function to top and update fantomas version in configuration.fsx to
alanlomeli Aug 20, 2022
887fc54
Update not recommended color to orange
alanlomeli Aug 20, 2022
1596f76
Add G-Research logos
alanlomeli Aug 21, 2022
6f7db25
Reworded some redactions
alanlomeli Aug 21, 2022
7a745b9
Recommendation explanations
alanlomeli Aug 21, 2022
8ab548f
Custom tooltips when you hover on recommendation icons.
alanlomeli Aug 21, 2022
29834c2
Cleanup
alanlomeli Aug 21, 2022
aa5922e
Better gif quality
alanlomeli Aug 22, 2022
9aab7eb
Merge branch 'master' into editorconfig-page
alanlomeli Aug 22, 2022
0a3ddf3
Merge branch 'master' into editorconfig-page
alanlomeli Aug 22, 2022
b29926f
Icons and other stylings
alanlomeli Aug 23, 2022
17c897a
Deleted letters from SVG
alanlomeli Aug 23, 2022
13ba230
Code result stylings
alanlomeli Aug 23, 2022
3c26550
Inline icon to header
alanlomeli Aug 23, 2022
e2f447e
New gif
alanlomeli Aug 23, 2022
2c7867a
Merge branch 'master' of https://github.com/fsprojects/fantomas into …
alanlomeli Aug 23, 2022
0c2d61c
Merge branch 'editorconfig-page' of https://github.com/MLH-Fellowship…
alanlomeli Aug 23, 2022
cd85f95
Tweaks from last feedback
alanlomeli Aug 23, 2022
cbfde70
Onload event for listeners
alanlomeli Aug 24, 2022
6469e94
Custom Web Components
alanlomeli Aug 24, 2022
cfe8b54
Deleted unused class and comment
alanlomeli Aug 24, 2022
7dbf3d9
Merge branch 'master' of https://github.com/fsprojects/fantomas into …
alanlomeli Aug 24, 2022
fd29481
Minor visual tweaks and haunted implementation for web components.
alanlomeli Aug 25, 2022
7112774
Add settings list
alanlomeli Aug 25, 2022
ef5c845
Merge branch 'master' of https://github.com/fsprojects/fantomas into …
alanlomeli Aug 25, 2022
9b62f90
Tweak stylings, minor refactors, rewords
alanlomeli Aug 26, 2022
4e211a2
SVG change size for icon recommendations
alanlomeli Aug 26, 2022
969a542
Configurations with descriptions and code snippets!
alanlomeli Aug 26, 2022
35112ea
Fix fsharp_space_before_parameter not rendering the right example.
alanlomeli Aug 26, 2022
210ee9b
Changed icons margin to inline stylings
alanlomeli Aug 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Target.create "Docs" (fun _ ->
DotNet.exec
id
"fsdocs"
$"build --clean --properties Configuration=Release --fscoptions \" -r:{semanticVersioning}\""
$"build --clean --properties Configuration=Release --fscoptions \" -r:{semanticVersioning}\" --eval"
|> ignore)

// --------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/.README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

To run the website:

> dotnet fsdocs watch
> dotnet fsdocs watch --eval

To compile the Sass:

Expand All @@ -16,4 +16,4 @@ To build the website:

> dotnet fsi .\docs\\.style\style.fsx

> dotnet fsdocs build
> dotnet fsdocs build --eval
44 changes: 44 additions & 0 deletions docs/.style/fsdocs-custom.sass
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ $headings-font-family: 'Reem Kufi', sans-serif

#fsdocs-content
box-shadow: 0 4px 10px $drop-shadow
table.pre
background-color: $pearl
pre
background-color: $pearl
color: $primary
h1, h2, h3, h4, h5, h6
a
color: $black
Expand All @@ -64,6 +69,16 @@ $headings-font-family: 'Reem Kufi', sans-serif
font-size: 1.2rem
padding: 15px 0 10px 0
font-weight: 400
h4
.green-recommendation, .orange-recommendation, .red-recommendation
vertical-align: 0
margin-right: 0.5rem
font-size: 1.3rem
.gresearch-recommendation
vertical-align: -0.2rem
margin-right: 0.5rem
width: 20px
height: 20px
hr
margin: 0 0 20px 0
li
Expand Down Expand Up @@ -92,6 +107,35 @@ $headings-font-family: 'Reem Kufi', sans-serif
line-height: 1
color: $white

.green-recommendation
color: $success
vertical-align: middle
font-size: 1.4rem
.red-recommendation
color: $danger
vertical-align: middle
font-size: 1.4rem
.orange-recommendation
color: $warning
vertical-align: middle
font-size: 1.4rem
.gresearch-recommendation
padding: 3px
background-color: $gresearch-color
border-radius: 50%

.green-tooltip
.tooltip-inner
background-color: $success
.red-tooltip
.tooltip-inner
background-color: $danger
.orange-tooltip
.tooltip-inner
background-color: $warning
.gresearch-tooltip
.tooltip-inner
background-color: $gresearch-color
.fsdocs-source-link
float: right
text-decoration: none
Expand Down
6 changes: 5 additions & 1 deletion docs/.style/variables.sass
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ $drop-shadow: rgba(22, 22, 22, 0.2)
$white: #FFF
$pearl: #f6f7f7
$menu-open: #347193
$success: #92DC84
$warning: #F5BF4F
$danger: #EA7268
$gresearch-color: #00A8E2
$navbar-light-brand-color: $white
$navbar-light-brand-hover-color: $white
$navbar-light-color: $white
$navbar-light-active-color: $secondary
$navbar-light-hover-color: $white
$navbar-nav-link-padding-x: 0
$navbar-nav-link-padding-x: 0
10 changes: 6 additions & 4 deletions docs/_template.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" data-root="{{root}}">

<head>
<meta charset="utf-8">
Expand All @@ -23,7 +23,6 @@

<body>
<main id="main-container">

<div id="sidebar-wrapper" class="bg-primary h-100 fs-5 collapse show">
<div id="sidebar-header" class="d-flex justify-content-end mt-1">
<button class="btn d-md-none" data-bs-toggle="collapse" data-bs-target="#sidebar-wrapper" data-bs-parent="#main-container" aria-controls="sidebar-wrapper" aria-expanded="false" aria-label="Toggle navigation">
Expand Down Expand Up @@ -84,9 +83,11 @@
</div>
<div id="push"></div>
</div>

</main>
<script type="text/javascript">
window.addEventListener('load', (event) => {
const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')
const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
addEventListener('hide.bs.collapse', (e) => {
if (e.target && e.target.id === 'sidebar-wrapper') {
document.getElementById('main-container').classList.add('toggled');
Expand All @@ -103,6 +104,7 @@
document.getElementById(e.target.id+'-wrapper').classList.add('menu-open');
}
})
});
</script>
<!-- BEGIN SEARCH BOX: this adds support for the search box -->
<link rel="stylesheet"
Expand All @@ -114,6 +116,7 @@
<script type="text/javascript" src="{{root}}content/fsdocs-search.js"></script>
<!-- END SEARCH BOX: this adds support for the search box -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa" crossorigin="anonymous"></script>
<script type="module" src="{{root}}content/fantomas-setting-icon.js"></script>
<script type="module">
import mermaid from "https://cdn.skypack.dev/mermaid";
mermaid.initialize({
Expand All @@ -125,5 +128,4 @@
});
</script>
</body>

</html>
35 changes: 35 additions & 0 deletions docs/content/fantomas-setting-icon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { html } from 'https://cdn.skypack.dev/lit';
import { component } from 'https://cdn.skypack.dev/haunted';


function FantomasSettingIcon({ tooltip, type }) {
let settingType
switch (type) {
case 'green':
settingType = {icon: "bi-check-circle-fill", color: "green-recommendation", tooltip: tooltip?tooltip:"This setting is good to use"}
break;
case 'orange':
settingType = {icon:"bi-exclamation-circle-fill", color:"orange-recommendation", tooltip: tooltip?tooltip:"This setting is not recommended"}
break;
case 'red':
settingType = {icon: "bi-x-circle-fill", color:"red-recommendation", tooltip: tooltip?tooltip:"You shouldn't use this setting"}
break;
}
return html`<i class="bi ${settingType.icon} ${settingType.color} me-2"
data-bs-toggle="tooltip" data-bs-custom-class="${type}-tooltip" data-bs-title="${settingType.tooltip}"></i>`;
}

function FantomasSettingIconGResearch({ tooltip }) {
const root = document.documentElement.dataset.root
const safeTooltip =
tooltip ? tooltip : "If you use one of these you should use all G-Research settings for consistency reasons";

return html`<img class="gresearch-recommendation me-2" data-bs-toggle="tooltip" data-bs-custom-class="gresearch-tooltip"
data-bs-title="${safeTooltip}" data-bs-custom-class="gresearch-tooltip" src="${root}/images/gresearch.svg" alt="G-Research logo"/>`;
}

customElements.define('fantomas-setting-icon', component(FantomasSettingIcon, { useShadowDOM: false,
observedAttributes: [ 'tooltip','type'] }));

customElements.define('fantomas-setting-icon-gresearch', component(FantomasSettingIconGResearch, { useShadowDOM: false,
observedAttributes: [ 'tooltip'] }));
Loading