Skip to content

Commit

Permalink
Visual theme adjustments (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
perlun authored Mar 27, 2021
1 parent 01c4122 commit 78e424e
Show file tree
Hide file tree
Showing 9 changed files with 645 additions and 508 deletions.
16 changes: 7 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
###############
# folder #
###############
/**/DROP/
/**/TEMP/
/**/packages/
/**/bin/
/**/obj/
_site
obj/
_site/
.sass-cache
docfx/*.dll
docfx/docfx.exe
docfx/docfx.exe.config

# CSS file is built from SASS source (see Makefile)
darkerfx/styles/main.css
darkerfx/styles/main.css.map
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"cSpell.words": [
"Steffen",
"Wilke",
"darkerfx"
"darkerfx",
"darkfx",
"hljs",
"pscommand",
"sidetoc"
]
}
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@

all: docs

docs: docfx/docfx.exe
docs: docfx/docfx.exe darkerfx/styles/main.css
./docfx/docfx.exe docs/docfx.json

darkerfx/styles/main.css: darkerfx/styles/main.scss
sass $< $(@)

docs-screenshot:
wkhtmltoimage --crop-h 768 http://localhost:8080/articles/intro.html docs/images/darkfx-screenshots.png

Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,23 @@ You can view a demo DocFX project with this template [HERE](https://perlun.githu
}
```

## Acknowledgement
## Acknowledgements
The theme is based on the great [darkFX](https://github.com/steffen-wilke/darkfx) theme by Steffen Wilke. Many thanks to you!

The main changes in this theme compared to darkfx are as follows:

- The light theme follows more closely the default docfx theme. For example, we specifically avoid overwriting non-color-related CSS attributes. The idea is to make this theme "lean and mean", and avoid messing with upstream styles when not absolutely _necessary_.

- The light theme does not use a liquid container, but instead follows the same limited-width as the default docfx theme.

- The dark theme has different colors, more resembling https://docs.microsoft.com.

- The hljs (highlightjs) colors for both the dark theme and the light theme was adjusted to use the following hljs styles:
- https://github.com/highlightjs/highlight.js/blob/main/src/styles/vs.css (light)
- https://github.com/highlightjs/highlight.js/blob/main/src/styles/vs2015.css (dark)

- The CSS variables were renamed to `--theme-*`, again similar to how `docs.microsoft.com` has done it.

- The CSS stylesheet was converted to SASS, which simplifies some things greatly.

darkFX in turn has the following acknowledgement: Many thanks to [Oscar Vásquez](https://github.com/ovasquez) from which I borrowed the example pages and repository structure of his [Material Theme for DocFX](https://github.com/ovasquez/docfx-material).
20 changes: 0 additions & 20 deletions darkerfx/partials/head.tmpl.partial

This file was deleted.

Loading

0 comments on commit 78e424e

Please sign in to comment.