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

Modern theme #861

Merged
merged 71 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
4b406e6
Basic site structure.
nojaf Oct 15, 2023
777e7a4
Only refresh when file has extension.
nojaf Oct 16, 2023
a57c6bb
Style content responsively.
nojaf Oct 16, 2023
22f2579
Toggle between dark and light.
nojaf Oct 16, 2023
020c3d7
Watch default template folder as well.
nojaf Oct 16, 2023
7509baa
Tweak variables.
nojaf Oct 16, 2023
95f3a40
Separate spacing and font size chart.
nojaf Oct 17, 2023
4787205
Test theming story in Telplin.
nojaf Oct 17, 2023
1bf6afe
Avoid double background coloring in code snippets.
nojaf Oct 17, 2023
8ccacc5
Move dark theme variable closer to light theme.
nojaf Oct 17, 2023
41d8074
Custom scrollbar styling.
nojaf Oct 17, 2023
be3205c
Rename spacing variables and increase margins slightly.
nojaf Oct 18, 2023
00b99b0
Restore deleted example files, replace FsDocsNavbarPosition with CSS …
nojaf Oct 18, 2023
e7dbe14
Add some shadows.
nojaf Oct 23, 2023
1f33356
Use lighter shadow for main.
nojaf Oct 23, 2023
c36000c
Allow additional html injection from a _head.html and _body.html file.
nojaf Oct 23, 2023
6084ba0
Fix MathJax example.
nojaf Oct 23, 2023
a8b5895
Minor tweaks + {{fsdocs-favicon-src}}
nojaf Oct 30, 2023
ba8da70
Add active class for menu item in navigation.
nojaf Oct 30, 2023
7ac178f
Add on this page section.
nojaf Nov 2, 2023
9cc492c
Use regex parsing instead of xml.
nojaf Nov 2, 2023
5972b48
Tweaks after testing F# Compiler site.
nojaf Nov 3, 2023
1ec3a50
Update release notes for v20 alpha 1.
nojaf Nov 3, 2023
fdd9af4
Fix failing unit test
nojaf Nov 3, 2023
1a4a830
Migrate to keep a change log.
nojaf Nov 3, 2023
de3a20c
Remove previously generated file.
nojaf Nov 3, 2023
3a25f3c
Add action to trigger nuget push.
nojaf Nov 3, 2023
47810ca
Only add {{root}} in extra templates.
nojaf Nov 3, 2023
25c1e1d
Add changelog entry for alpha 2
nojaf Nov 3, 2023
c4eb606
Move 'On this page' section outside main element.
nojaf Nov 4, 2023
63e67ac
Overflow ellipsis menu aside links.
nojaf Nov 6, 2023
aff05bd
Add link around project name in header.
nojaf Nov 6, 2023
0f0b99c
Add release notes for alpha 3
nojaf Nov 6, 2023
fa47daf
Add some padding for level 3 and 4.
nojaf Nov 6, 2023
9fe95a7
Improve styling of blockquote.
nojaf Nov 8, 2023
40983a5
Disable font ligatures.
nojaf Nov 8, 2023
1231ae7
Replace fsdocs-list-of-namespaces with an empty string when there are…
nojaf Nov 8, 2023
415fa4d
Add changelog entry for alpha 4.
nojaf Nov 8, 2023
5e7c08a
Improve API doc styling.
nojaf Nov 9, 2023
d833ecb
Make mobile menu scrollable.
nojaf Nov 9, 2023
aae9281
Add releases notes for alpha 5.
nojaf Nov 9, 2023
d6eac94
Initial attempt at search using fuse.js.
nojaf Nov 9, 2023
7003b7d
Smaller scrollbars on mobile.
nojaf Nov 9, 2023
33db919
Add some fallback if there is a Directory.Build.props in the pwd.
nojaf Nov 9, 2023
a5affc4
Add fsdocs-body-class substitution.
nojaf Nov 9, 2023
9897ea8
Add releases notes for alpha 007.
nojaf Nov 10, 2023
c6fd9c5
Format code
nojaf Nov 10, 2023
a1a673d
Add max-width to tooltip.
nojaf Nov 10, 2023
5348810
Add release notes for alpha 8
nojaf Nov 10, 2023
2050ead
Return original prop when no Directory.Build.props is used as fallback.
nojaf Nov 11, 2023
e6f54db
Add release notes for alpha 9.
nojaf Nov 11, 2023
8354931
Update styling for blockquote.
nojaf Nov 14, 2023
9836cd0
Update search documentation.
nojaf Nov 14, 2023
c3608f2
Tweak dark theme colors.
nojaf Nov 14, 2023
a65f72d
Allow for more fine-grained styling control.
nojaf Nov 15, 2023
b101e70
Loosen the header link search restriction.
nojaf Nov 15, 2023
49b4961
Improve custom theme icon.
nojaf Nov 15, 2023
13e78a7
Correct fsdocs-menu-item-active-class value.
nojaf Nov 15, 2023
4268b1a
Fix example of Right-Side navigation.
nojaf Nov 15, 2023
964ed92
Add release notes for 20.0.0-alpha-010
nojaf Nov 15, 2023
8afe8d6
Take `<UseArtifactsOutput>` into account during the project restore c…
nojaf Nov 16, 2023
82859b4
Add more options to customize colors.
nojaf Nov 17, 2023
783940e
Add release notes for 20.0.0-alpha-012
nojaf Nov 17, 2023
7540f79
Add variables for dialog colors.
nojaf Nov 17, 2023
bae7d74
Add border variable for code snippets.
nojaf Nov 17, 2023
458ca79
Add additional variables for dialog colors.
nojaf Nov 21, 2023
7241784
Mark as unreleased
nojaf Nov 21, 2023
02bebbd
Remove unused fsdocs-collection-name-link.
nojaf Nov 21, 2023
33860a5
Add documentation about CSS styling.
nojaf Nov 21, 2023
f689a99
Format ProjectCracker.fs
nojaf Nov 21, 2023
3487b2f
Remove excessive blank lines.
nojaf Nov 21, 2023
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
38 changes: 18 additions & 20 deletions docs/commandline.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,22 @@ report an error (e.g. "Problem loading...", "Connection was reset").

## Searchable docs

When using the command-line tool a Lunr search index is automatically generated in `index.json`.

A search box is included in the default template. To add a search box
to your own `_template.html`, include `fsdocs-search.js`, which is added to the `content`
by default.

[lang=text]
...
<div id="header">
<div class="searchbox">
<label for="search-by">
<i class="fas fa-search"></i>
</label>
<input data-search-input="" id="search-by" type="search" placeholder="Search..." />
<span data-search-clear="">
<i class="fas fa-times"></i>
</span>
</div>
When using the command-line tool a [Fuse](https://www.fusejs.io/) search index is automatically generated in `index.json`.
A search box is included in the default template via an [HTML Dialog element](https://developer.mozilla.org/docs/Web/HTML/Element/dialog).
To add search to your own `_template.html`:

- include an HTML element with id `search-btn`
- include a `dialog` element
- include `fsdocs-search.js` script

```html
<button id="search-btn">Open search dialog</button>
<dialog>
<input type="search" placeholder="Search docs" />
<div class="results">
<ul></ul>
<p class="empty">Type something to start searching.</p>
</div>
...

</dialog>
<script type="module" src="{`{root}}content/fsdocs-search.js"></script>
```
2 changes: 1 addition & 1 deletion docs/content.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Content that is not `*.fsx` or `*.md` is copied across.

## Default Styling Content

By default additional content such as `fsdocs-search.js`, `fsdocs-tips.js` and `fsdocs-styles.css` are included in the
By default additional content such as `fsdocs-search.js`, `fsdocs-tips.js` and `fsdocs-default.css` are included in the
the `content` directory of the output. This can be suppressed with `--nodefaultcontent` or by having your own
copy of this content in your `content` directory.

Expand Down
12 changes: 6 additions & 6 deletions docs/content/fsdocs-default.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
--text-color: #F7F7F7;
--text-hover: #FFF;
--heading-color: rgb(229, 231, 235);
--code-background: #3e3e42;
--code-background: #28282D;
--code-color: #f5f5f6;
--header-background: #0c1318;
--header-border: #9b9b9b;
Expand All @@ -119,26 +119,26 @@
--link-color: #c5eff7;
--search-background: #020202;
--nav-category: rgb(207, 211, 215);
--code-strings-color: #5adfec;
--code-strings-color: #86b4b9;
--code-printf-color: #6B2FBA;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--code-printf-color: #6B2FBA;
--code-printf-color: #e786f4;

--code-escaped-color: #EA8675;
--code-identifiers-color: #d1b3f5;
--code-module-color: #15e1e1;
--code-reference-color: #7a9cee;
--code-value-color: #66d73d;
--code-reference-color: #40fddd;
--code-value-color: #ffb4e9;
--code-interface-color: #43AEC6;
--code-typearg-color: #43AEC6;
--code-disposable-color: #6dd6f1;
--code-property-color: #6acfe7;
--code-punctuation-color: #43AEC6;
--code-punctuation2-color: var(--text-color);
--code-function-color: #6B2FBA;
--code-function2-color: #da9d9d;
--code-function2-color: #cbda9d;
--code-activepattern-color: #4ec9b0;
--code-unioncase-color: #4ec9b0;
--code-enumeration-color: #8C6C41;
--code-keywords-color: #a7c2f8;
--code-comment-color: #dcd8d8;
--code-comment-color: #84d16e;
--code-operators-color: #b4c6ee;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--code-operators-color: #b4c6ee;
--code-operators-color: #00d8ff;

--code-numbers-color: #009999;
--code-linenumbers-color: #80b0b0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--code-mutable-color: ffb000;

Expand Down
6 changes: 3 additions & 3 deletions docs/content/fsdocs-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ function debounce(mainFunction, delay) {
mainFunction(...args);
}, delay);
};
};
}

const root = document.documentElement.getAttribute("data-root");
if (root) {
if (root && searchBtn) {
let fuse = null;
const searchIndexUrl = `${root}/index.json`;
fetch(searchIndexUrl, {})
Expand Down Expand Up @@ -114,7 +114,7 @@ if (root) {

window.addEventListener('keyup', ev => {
if (ev.key === 'Escape' && searchDialog.open) {
searchDialog.closeModal();
searchDialog.close();
}

if (ev.key === '/' && !searchDialog.open) {
Expand Down