Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neroist/nimitheme
Make nimib look beautiful with nimitheme
https://github.com/neroist/nimitheme
beautiful nim nimib nimibex nimibex-extension nimitheme theme
Last synced: 27 days ago
JSON representation
Make nimib look beautiful with nimitheme
- Host: GitHub
- URL: https://github.com/neroist/nimitheme
- Owner: neroist
- License: mit
- Created: 2023-03-26T01:17:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-28T03:44:34.000Z (6 months ago)
- Last Synced: 2024-10-25T05:54:15.984Z (3 months ago)
- Topics: beautiful, nim, nimib, nimibex, nimibex-extension, nimitheme, theme
- Language: Nim
- Homepage: https://neroist.github.io/nimitheme/
- Size: 1.21 MB
- Stars: 10
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nimitheme
![nimitheme presentation image](https://raw.githubusercontent.com/neroist/nimitheme/main/docs/images/nimitheme.png)
> *Make nimib look **beautiful** with nimitheme*
Nimitheme is a Nimble package that provides additional themes for
[nimib](https://github.com/pietroppeter/nimib).You can view the index of all the themes available in nimitheme here:
.In addition, support for
[Dark Reader](https://github.com/darkreader/darkreader) and
[highlight.js](https://highlightjs.org/) are available.## Installation
Execute this command in a terminal or shell:
```sh
nimble install nimitheme
```## Usage
Either pass the theme into `nbInit` like so:
```nim
nbInit(useAwsmBigStone)
```or call the function directly:
```nim
nbInitnb.useAwsmBigStone()
```### Dark Reader Support
You can enable Dark Reader in your nimib document by calling `useDarkReader`
on the `nb` variable injected by `nbInit`, like so:```nim
nb.useDarkReader()
```### Highlight.js support
You can also further stylize your code via setting a specific highlight.js
code theme (outside of Android Dark and Atom One light). You can do this by
using the `highlight=` template. For example, you can do something like this:```nim
nb.highlight = materialPalenight
```to set the highlight.js theme your nimib document uses.
***All*** highlight.js themes are available (see
[`highlight_js.nim`](src/nimitheme/highlight_js.nim)).For themes that have the same name as a base16 theme, the base16 theme's
name is postfixed with `_base16`.### Edit CSS Variables
Many CSS libraries that nimitheme uses allow you to customize the style of
your document using CSS variables the user can manually set. Nimitheme allows
you to set such variables via the `setCssVar` template. For example, you can
do stuff like this:```nim
nbInit(useTerminal)nb.setCssVar("global-font-size", "16px")
# Set multiple variables at once
nb.setCssVar({
"primary-color": "purple",
"secondary-color": "pink"
})
```## License
This project is licensed under the MIT license.
###### Made with Nim with ❤️