diff --git a/README.md b/README.md index 86d9385a..bec4d625 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,12 @@ Documentation for Whisky. ### How to Contribute + 1. Install [rust](https://www.rust-lang.org/tools/install) 2. Install mdbook and the required preprocessors ``` cargo install mdbook cargo install mdbook-alerts - cargo isntall mdbook-template + cargo install mdbook-template ``` 3. You can preview changes to the book with `mdbook serve --open` diff --git a/book.toml b/book.toml index ba11e5ca..a25f9657 100644 --- a/book.toml +++ b/book.toml @@ -10,9 +10,11 @@ title = "Whisky Documentation" [preprocessor.template] [output.html] -default-theme = "dark" +default-theme = "whisky" +preferred-dark-theme = "whisky" git-repository-url = "https://github.com/Whisky-App/Whisky" git-repository-icon = "fa-github" +edit-url-template = "https://github.com/Whisky-App/whisky-book/edit/main/{path}" input-404 = "not-found.md" [output.html.print] diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 4f2b180f..d621805f 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -3,17 +3,32 @@ - [Guide](./guide.md) - [Common Issues](./common-issues.md) - [What's Where?](./paths.md) +- [WhiskyCmd](./whiskycmd.md) - [Whisky vs. CrossOver](./cx.md) - [Game Support](./game-support/README.md) + - [Armored Core VI: Fires of Rubicon](./game-support/armored-core-6.md) + - [Blasphemous 2](./game-support/blasphemous-2.md) - [Cities: Skylines II](./game-support/cities-skylines-2.md) + - [Control](./game-support/control.md) - [Counter-Strike 2](./game-support/counter-strike-2.md) + - [Cyberpunk 2077](./game-support/cyberpunk-2077.md) + - [Dark Souls III](./game-support/dark-souls-3.md) - [Diablo IV (Battle.net)](./game-support/diablo-4-battle-net.md) - [Diablo IV (Steam)](./game-support/diablo-4-steam.md) + - [Dorfromantik](./game-support/dorfromantik.md) - [Elden Ring](./game-support/elden-ring.md) - [Elite Dangerous](./game-support/elite-dangerous.md) + - [Grand Theft Auto V](./game-support/gta-5.md) - [Horizon Zero Dawn](./game-support/horizon-zero-dawn.md) + - [Kenshi](./game-support/kenshi.md) + - [Metal Gear Solid V: The Phantom Pain](./game-support/mgs-5.md) + - [Monster Hunter World: Iceborne](./game-support/monster-hunter-world-iceborne.md) + - [Overwatch 2](./game-support/overwatch-2.md) - [Persona 3 Reload](./game-support/p3r.md) - [Palworld](./game-support/palworld.md) - [r2modman](./game-support/r2modman.md) + - [Sekiro: Shadows Die Twice](./game-support/sekiro.md) - [Skyrim SE](./game-support/skyrim-se.md) - - [Star Wars Jedi: Fallen Order](./game-support/sw-fallen-order.md) \ No newline at end of file + - [Star Wars Jedi: Fallen Order](./game-support/sw-fallen-order.md) + - [Star Wars: Squadron](./game-support/sw-squadrons.md) + - [Warframe](./game-support/warframe.md) diff --git a/src/common-issues.md b/src/common-issues.md index fdf34c43..6df44d80 100644 --- a/src/common-issues.md +++ b/src/common-issues.md @@ -1,11 +1,11 @@ -## Common Issues +# Common Issues Several things can lead to a program not working. The most common reasons are listed below. -|Problem|Solution| -|-------|---------| -|My game crashes due to "invalid instruction".|Your game is likely using [AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) instructions. These are more common in console ports. AVX instructions are x86 specific, and Rosetta doesn't translate them. Unless you can find a way to disable or bypass them (check online), then your game won't work.| -|I want to play a competitive multiplayer game, but it won't load.|Competitive multiplayer games, especially battle royales and other FPS games (like PUBG, Fortnite, Apex Legends, Valorant), often have some form of driver-level anti-cheat. These won't work under Wine.| -|My DirectX 9 game has graphical issues, or doesn't work at all.|DirectX 9 games are handled through Wine's own `wined3d`. Whisky focuses on modern titles using DX11 or 12, and you may run into issues with DX9 games. CrossOver is a better choice in this scenario, as it runs on Wine 8 instead of Wine 7, and has a more up-to-date version of `wined3d`. If you're not sure what Graphics API your game is using, you can check on the [PCGamingWiki](https://www.pcgamingwiki.com/wiki/Home).| -|My game crashes out of the box, or complains about missing dependencies.|Make sure to check Wine's [AppDB](https://appdb.winehq.org/) and [ProtonDB](https://www.protondb.com/), which can often provide information on the necessary workarounds or Winetricks you need to use to get your game running. If you can't find anything or you are unable to make it work, make an issue.| \ No newline at end of file +| Problem | Solution | +|--------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| My game crashes due to "invalid instruction". | Your game is likely using [AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions) instructions. These are more common in console ports. AVX instructions are x86 specific, and Rosetta doesn't translate them. Unless you can find a way to disable or bypass them (check online), then your game won't work. | +| I want to play a competitive multiplayer game, but it won't load. | Competitive multiplayer games, especially battle royales and other FPS games (like PUBG, Fortnite, Apex Legends, Valorant), often have some form of driver-level anti-cheat. These won't work under Wine. | +| My DirectX 9 game has graphical issues, or doesn't work at all. | DirectX 9 games are handled through Wine's own `wined3d`. Whisky focuses on modern titles using DX11 or 12, and you may run into issues with DX9 games. CrossOver is a better choice in this scenario, as it runs on Wine 9 instead of Wine 7, and has a more up-to-date version of `wined3d`. If you're not sure what Graphics API your game is using, you can check on the [PCGamingWiki](https://www.pcgamingwiki.com/wiki/Home). | +| My game crashes out of the box, or complains about missing dependencies. | Make sure to check Wine's [AppDB](https://appdb.winehq.org/) and [ProtonDB](https://www.protondb.com/), which can often provide information on the necessary workarounds or Winetricks you need to use to get your game running. If you can't find anything or you are unable to make it work, make an issue. | \ No newline at end of file diff --git a/src/cx.md b/src/cx.md index 8aa5bf7d..a6b6f15b 100644 --- a/src/cx.md +++ b/src/cx.md @@ -1,4 +1,4 @@ -## Whisky or CrossOver? +# Whisky or CrossOver? There are a lot of questions about which is better, here's an easy chart: diff --git a/src/game-support/README.md b/src/game-support/README.md index c763b0c0..a338ca2c 100644 --- a/src/game-support/README.md +++ b/src/game-support/README.md @@ -3,29 +3,43 @@ This is by no means an exhaustive list of games that run in Whisky. Neither is it an exhaustive list of fixes for games that need them. If a game you want to play isn't working and is missing from this list, -be sure to contribute to these docs on GitHub. +be sure to contribute to these docs on GitHub. ### Categories Explained + Game support status is rated on a scale. The placement of a particular title is partially left to the article author, but some general guidelines apply. | Status | Description | -|---------|------------------------------------------------------------------------------------------------| +| ------- | ---------------------------------------------------------------------------------------------- | | Gold | Game works out-of-the-box with no issues and/or requires minimal workarounds. | | Silver | Game requires some workarounds, but they are simple and/or there are minor in-game issues | | Bronze | Game is very difficult to get working and/or has severe in-game issues that limit playability. | | Garbage | Game does not work at all. | ### Index + +- [Armored Core VI: Fires of Rubicon](./armored-core-6.md) +- [Blasphemous 2](./blasphemous-2.md) - [Cities: Skylines II](./cities-skylines-2.md) +- [Control](./control.md) - [Counter-Strike 2](./counter-strike-2.md) +- [Cyberpunk 2077](./cyberpunk-2077.md) +- [Dark Souls III](./dark-souls-3.md) - [Diablo IV (Battle.net)](./diablo-4-battle-net.md) - [Diablo IV (Steam)](./diablo-4-steam.md) +- [Dorfromantik](./dorfromantik.md) - [Elden Ring](./elden-ring.md) - [Elite Dangerous](./elite-dangerous.md) +- [Grand Theft Auto V](./gta-5.md) - [Horizon Zero Dawn](./horizon-zero-dawn.md) +- [Kenshi](./kenshi.md) +- [Metal Gear Solid V: The Phantom Pain](./mgs-5.md) +- [Monster Hunter World: Iceborne](./monster-hunter-world-iceborne.md) +- [Overwatch 2](./overwatch-2.md) - [Persona 3 Reload](./p3r.md) - [Palworld](./palworld.md) - [r2modman](./r2modman.md) +- [Sekiro: Shadows Die Twice](./sekiro.md) - [Skyrim SE](./skyrim-se.md) -- [Star Wars Jedi: Fallen Order](./sw-fallen-order.md) \ No newline at end of file +- [Star Wars Jedi: Fallen Order](./sw-fallen-order.md) diff --git a/src/game-support/armored-core-6.md b/src/game-support/armored-core-6.md new file mode 100644 index 00000000..6c06e3c3 --- /dev/null +++ b/src/game-support/armored-core-6.md @@ -0,0 +1,8 @@ +# Armored Core VI: Fires of Rubicon + +{{#template ../templates/rating.md status=Gold date=08/09/23 installs=Yes opens=Yes}} + +## Setup +- Disable DXVK + +{{#template ../templates/steam.md id=1888160}} \ No newline at end of file diff --git a/src/game-support/blasphemous-2.md b/src/game-support/blasphemous-2.md new file mode 100644 index 00000000..1c2cc93d --- /dev/null +++ b/src/game-support/blasphemous-2.md @@ -0,0 +1,5 @@ +# Blasphemous 2 + +{{#template ../templates/rating.md status=Gold date=08/09/23 installs=Yes opens=Yes}} + +{{#template ../templates/steam.md id=2114740}} \ No newline at end of file diff --git a/src/game-support/control.md b/src/game-support/control.md new file mode 100644 index 00000000..56a007aa --- /dev/null +++ b/src/game-support/control.md @@ -0,0 +1,5 @@ +# Control + +{{#template ../templates/rating.md status=Gold date=05/11/23 installs=Yes opens=Yes}} + +{{#template ../templates/steam.md id=870780}} \ No newline at end of file diff --git a/src/game-support/cyberpunk-2077.md b/src/game-support/cyberpunk-2077.md new file mode 100644 index 00000000..9bcd0413 --- /dev/null +++ b/src/game-support/cyberpunk-2077.md @@ -0,0 +1,5 @@ +# Cyberpunk 2077 + +{{#template ../templates/rating.md status=Gold date=04/11/23 installs=Yes opens=Yes}} + +{{#template ../templates/steam.md id=1091500}} \ No newline at end of file diff --git a/src/game-support/dark-souls-3.md b/src/game-support/dark-souls-3.md new file mode 100644 index 00000000..101b2d07 --- /dev/null +++ b/src/game-support/dark-souls-3.md @@ -0,0 +1,5 @@ +# Dark Souls III + +{{#template ../templates/rating.md status=Gold date=04/09/23 installs=Yes opens=Yes}} + +{{#template ../templates/steam.md id=374320}} \ No newline at end of file diff --git a/src/game-support/dorfromantik.md b/src/game-support/dorfromantik.md new file mode 100644 index 00000000..adc5008d --- /dev/null +++ b/src/game-support/dorfromantik.md @@ -0,0 +1,5 @@ +# Dorfromantik + +{{#template ../templates/rating.md status=Gold date=29/09/23 installs=Yes opens=Yes}} + +{{#template ../templates/steam.md id=1455840}} \ No newline at end of file diff --git a/src/game-support/gta-5.md b/src/game-support/gta-5.md new file mode 100644 index 00000000..1aa275e2 --- /dev/null +++ b/src/game-support/gta-5.md @@ -0,0 +1,7 @@ +# Grand Theft Auto V + +{{#template ../templates/rating.md status=Garbage date=09/10/23 installs=No opens=Yes}} + +Due to an issue with the Rockstar Launcher, Grand Theft Auto V is currently **unplayable** in Whisky. + +{{#template ../templates/steam.md id=271590}} \ No newline at end of file diff --git a/src/game-support/kenshi.md b/src/game-support/kenshi.md new file mode 100644 index 00000000..a43d61c9 --- /dev/null +++ b/src/game-support/kenshi.md @@ -0,0 +1,5 @@ +# Kenshi + +{{#template ../templates/rating.md status=Gold date=03/04/24 installs=Yes opens=Yes}} + +{{#template ../templates/steam.md id=233860}} diff --git a/src/game-support/mgs-5.md b/src/game-support/mgs-5.md new file mode 100644 index 00000000..f870ada6 --- /dev/null +++ b/src/game-support/mgs-5.md @@ -0,0 +1,5 @@ +# Metal Gear Solid V: The Phantom Pain + +{{#template ../templates/rating.md status=Gold date=29/09/23 installs=Yes opens=Yes}} + +{{#template ../templates/steam.md id=287700}} \ No newline at end of file diff --git a/src/game-support/monster-hunter-world-iceborne.md b/src/game-support/monster-hunter-world-iceborne.md new file mode 100644 index 00000000..c3cd45e0 --- /dev/null +++ b/src/game-support/monster-hunter-world-iceborne.md @@ -0,0 +1,8 @@ +# Monster Hunter World: Iceborne + +{{#template ../templates/rating.md status=Gold date=12/10/23 installs=Yes opens=Yes}} + +- Do not enable DirectX 12, it will cause the game to crash. +- A black screen may show instead of the Capcom logo. + +{{#template ../templates/steam.md id=1118010}} \ No newline at end of file diff --git a/src/game-support/overwatch-2.md b/src/game-support/overwatch-2.md new file mode 100644 index 00000000..8e242041 --- /dev/null +++ b/src/game-support/overwatch-2.md @@ -0,0 +1,5 @@ +# Overwatch 2 + +{{#template ../templates/rating.md status=Garbage date=12/10/23 installs=Yes opens=No}} + +{{#template ../templates/steam.md id=2357570}} \ No newline at end of file diff --git a/src/game-support/sekiro.md b/src/game-support/sekiro.md new file mode 100644 index 00000000..80b95054 --- /dev/null +++ b/src/game-support/sekiro.md @@ -0,0 +1,5 @@ +# Sekiro: Shadows Die Twice + +{{#template ../templates/rating.md status=Gold date=05/09/23 installs=Yes opens=Yes}} + +{{#template ../templates/steam.md id=814380}} \ No newline at end of file diff --git a/src/game-support/sw-squadrons.md b/src/game-support/sw-squadrons.md new file mode 100644 index 00000000..50ff006f --- /dev/null +++ b/src/game-support/sw-squadrons.md @@ -0,0 +1,5 @@ +# Star Wars: Squadrons + +{{#template ../templates/rating.md status=Gold date=05/11/23 installs=Yes opens=Yes}} + +{{#template ../templates/steam.md id=1222730}} \ No newline at end of file diff --git a/src/game-support/warframe.md b/src/game-support/warframe.md new file mode 100644 index 00000000..1e2b8b9e --- /dev/null +++ b/src/game-support/warframe.md @@ -0,0 +1,9 @@ +# Warframe + +{{#template ../templates/rating.md status=Bronze date=16/11/23 installs=Yes opens=Yes}} + +## Setup +- Go to Bottle Configuration -> Open Wine Configuration -> Libraries +- Add `dwrite` library and set it to disabled + +{{#template ../templates/steam.md id=230410}} \ No newline at end of file diff --git a/src/guide.md b/src/guide.md index 0fe90c19..f95280b9 100644 --- a/src/guide.md +++ b/src/guide.md @@ -2,8 +2,7 @@ Glad you're here. Here's how to get up and running in a breeze. -1. Download Whisky - - Download the latest release [here](https://github.com/IsaacMarovitz/Whisky/releases) +1. [Download Whisky](https://github.com/IsaacMarovitz/Whisky/releases) 2. Move Whisky to your Applications folder 3. Open Whisky 4. Follow on-screen instructions @@ -12,7 +11,9 @@ Glad you're here. Here's how to get up and running in a breeze. ## Making your first bottle -Bottles are the bread and butter of Wine. Bottles are like little Windows filesystems, and they appear on your computer as a normal folder. In a bottle, you'll find programs, registry files, and everything else you need to install and configure your Windows 'machine'. Each bottle is self-contained and will only have the programs you installed in that bottle. +Bottles are the bread and butter of Wine. Bottles are like little Windows filesystems, and they appear on your computer as a normal folder. +In a bottle, you'll find programs, registry files, and everything else you need to install and configure your Windows 'machine'. +Each bottle is self-contained and will only have the programs you installed in that bottle. 1. Press the plus button in the top right-hand corner 2. Give your bottle a name, and select the Windows version you want @@ -22,7 +23,8 @@ Bottles are the bread and butter of Wine. Bottles are like little Windows filesy Programs are installed much like you would on a regular Windows machine. -1. Download the program you want to run. It should be the *Windows* version (`.exe` or `.msi`); 64-bit programs are preferable +1. Download the program you want to run. It should be the *Windows* version (`.exe` or `.msi`); + > 64-bit programs are preferable. 2. Click on the bottle you want to install your program into 3. Press the `Run...` button in the bottom right 4. Navigate to where you downloaded your `.exe` or `.msi` file in Finder @@ -32,8 +34,16 @@ Whisky will then open and run the program. It may take a few seconds for the win ## Configuring your bottle -In the `Config` menu of your bottle, you can adjust a number of parameters, including the Windows version and build the number of your bottle, enable and disable the Metal HUD, configure ESync, and open Wine's many configuration tools like the Control Panel, Registry Editor, and Wine Configuration dialogues. +In the `Config` menu of your bottle, you can adjust a number of parameters, +including the Windows version and build the number of your bottle, enable and disable the Metal HUD, +configure ESync, and open Wine's many configuration tools like the Control Panel, Registry Editor, and Wine Configuration dialogues. ## When should I make a new bottle? -The usual convention is to limit a bottle to one game, as dependencies and such can get messy with more installed in one place. If a game requires more extensive configuration to get working, it's usually a good idea to keep it contained. Overal, trust your judgment and separate where it feels right. \ No newline at end of file +The usual convention is to limit a bottle to one game, as dependencies and such can get messy with more installed in one place. +If a game requires more extensive configuration to get working, it's usually a good idea to keep it contained. +Overall, trust your judgment and separate where it feels right. + +For Steam games, you can create one shared Windows game library that you use between all of your bottles. +This helps keep your game installations detached from your bottle instances, +so you won't have to re-download everything if your bottle mucks up. \ No newline at end of file diff --git a/src/not-found.md b/src/not-found.md index e69de29b..22f0b640 100644 --- a/src/not-found.md +++ b/src/not-found.md @@ -0,0 +1,3 @@ +# We couldn't find that page + +Return [home](guide.md). \ No newline at end of file diff --git a/src/paths.md b/src/paths.md index 8ae1006c..9c692bee 100644 --- a/src/paths.md +++ b/src/paths.md @@ -1,8 +1,25 @@ -## What's where? +# What's Where? + +Whisky installs files to the following locations: | Item | Location | |-----------|--------------------------------------------------------------------| | GPTK | `~/Library/Application Support/com.isaacmarovitz.Whisky/Libraries` | | Bottles | `~/Library/Containers/com.isaacmarovitz.Whisky/Bottles` | | Logs | `~/Library/Logs/com.isaacmarovitz.Whisky` | -| WhiskyCMD | `/usr/local/bin/whisky` | \ No newline at end of file +| WhiskyCmd | `/usr/local/bin/whisky` | + +# Uninstalling Whisky + +If you're looking to do a complete uninstall, remove the following files and folders: +- `~/Library/Application Support/com.isaacmarovitz.Whisky` +- `~/Library/Containers/com.isaacmarovitz.Whisky` +- `~/Library/Logs/com.isaacmarovitz.Whisky` +- `/usr/local/bin/whisky` (if it exists) +- `/Applications/Whisky.app` (or wherever you have it installed) + +> [!NOTE] +> This will not delete any bottles that have been created outside the default folder. +> Make sure you delete those in app by `Right Clicking > Remove...` and selecting `Delete files from disk`. +> If you forget to do this before deleting Whisky, or some of your bottles have become orphaned, +> you can remove them manually in Finder. \ No newline at end of file diff --git a/src/whiskycmd.md b/src/whiskycmd.md new file mode 100644 index 00000000..b5e10e25 --- /dev/null +++ b/src/whiskycmd.md @@ -0,0 +1,85 @@ +# WhiskyCmd + +WhiskyCmd is an optional CLI tool that allows you to list, create, and delete bottles, +as well as run programs directly from the command line. +This can be helpful if you're trying to automate certain tasks in Whisky, +or want to use Whisky bottles from another app. + +## Installation + +WhiskyCmd can be installed through the app by clicking `Whisky > Install Whisky CLI...`. +This will create a symlink between `/Applications/Whisky.app/Contents/Resources/WhiskyCmd` and `/usr/local/bin/whisky`. +When you update the main Whisky app, the CLI tool will automatically link to the updated binary. + +## Running Commands + +After installing WhiskyCmd, it will be available on PATH. In a new terminal session, +verify that the installation is working by typing `whisky`, you should see the following or similar output: + +```shell +$ whisky + +OVERVIEW: A CLI interface for Whisky. + +USAGE: whisky + +OPTIONS: + -h, --help Show help information. + +SUBCOMMANDS: + list List existing bottles. + create Create a new bottle. + add Add an existing bottle. + delete Delete an existing bottle from disk. + remove Remove an existing bottle from Whisky. + run Run a program with Whisky. + + See 'whisky help ' for detailed help. +``` + +## List + +List takes no arguments, and returns an ASCII table of all bottles registered to `BottleVM.plist`, +located at `~/Library/Containers/com.isaacmarovitz.Whisky/BottleVM.plist`. + +**Example Output:** + +```shell +$ whisky list + ++-------+-----------------+--------------------------------------------------------------------------+ +| Name | Windows Version | Path | ++-------+-----------------+--------------------------------------------------------------------------+ +| Steam | Windows 10 | ~/Library/Containers/Whisky/Bottles/72DC05EA-4D0C-47E5-8A16-9A5DAE62A118 | ++-------+-----------------+--------------------------------------------------------------------------+ +``` + +## Create + +Create takes a name for a new bottle to be made at your default bottle creation directory, +as specified in the UI. It is currently not possible to specify a desired Windows version, +it will always default to Windows 10. + +> [!CAUTION] +> This command currently does not actually initialise the bottle with Wine. +> This will be resolved in a future version of WhiskyCmd. + +```shell +$ whisky create Example + +Created new bottle "Example". +``` + +## Add + +Takes a path to an existing `Metadata.plist` and adds it to your `BottleVM.plist`. + +> [!CAUTION] +> This path is not sanitised as a valid Whisky bottle. +> Specifying the wrong path may have unintended consequences. + +```shell +$ whisky add ~/Library/Containers/Whisky/Bottles/Example/Metadata.plist + +Bottle "Example" added. +``` \ No newline at end of file diff --git a/theme/css/general.css b/theme/css/general.css new file mode 100644 index 00000000..d3959c92 --- /dev/null +++ b/theme/css/general.css @@ -0,0 +1,238 @@ +/* Base styles and content styles */ + +@import 'variables.css'; + +:root { + /* Browser default font-size is 16px, this way 1 rem = 10px */ + font-size: 62.5%; + color-scheme: var(--color-scheme); +} + +html { + font-family: "Open Sans", sans-serif; + color: var(--fg); + background-color: var(--bg); + text-size-adjust: none; + -webkit-text-size-adjust: none; +} + +body { + margin: 0; + font-size: 1.6rem; + overflow-x: hidden; +} + +code { + font-family: var(--mono-font) !important; + font-size: var(--code-font-size); + direction: ltr !important; +} + +/* make long words/inline code not x overflow */ +main { + overflow-wrap: break-word; +} + +/* make wide tables scroll if they overflow */ +.table-wrapper { + overflow-x: auto; +} + +/* Don't change font size in headers. */ +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + font-size: unset; +} + +.left { float: left; } +.right { float: right; } +.boring { opacity: 0.6; } +.hide-boring .boring { display: none; } +.hidden { display: none !important; } + +h1 > a { + background-image: linear-gradient(to right, rgb(245 158 11) 0%, rgb(239 68 68) 100%); + -webkit-background-clip: text; + background-clip: text; + color: transparent !important; +} + +.header + .header h3, +.header + .header h4, +.header + .header h5 { + margin-block-start: 1em; +} + +h1:target::before, +h2:target::before, +h3:target::before, +h4:target::before, +h5:target::before, +h6:target::before { + display: inline-block; + content: "»"; + margin-inline-start: -30px; + width: 30px; +} + +/* This is broken on Safari as of version 14, but is fixed + in Safari Technology Preview 117 which I think will be Safari 14.2. + https://bugs.webkit.org/show_bug.cgi?id=218076 +*/ +:target { + /* Safari does not support logical properties */ + scroll-margin-top: calc(var(--menu-bar-height) + 0.5em); +} + +.page { + outline: 0; + padding: 0 var(--page-padding); + margin-block-start: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */ +} +.page-wrapper { + box-sizing: border-box; + background-color: var(--bg); +} +.no-js .page-wrapper, +.js:not(.sidebar-resizing) .page-wrapper { + transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */ +} +[dir=rtl] .js:not(.sidebar-resizing) .page-wrapper { + transition: margin-right 0.3s ease, transform 0.3s ease; /* Animation: slide away */ +} + +.content { + overflow-y: auto; + padding: 0 5px 50px 5px; +} +.content main { + margin-inline-start: auto; + margin-inline-end: auto; + max-width: var(--content-max-width); +} +.content p { line-height: 1.45em; } +.content ol { line-height: 1.45em; } +.content ul { line-height: 1.45em; } +.content a { text-decoration: none; } +.content a:hover { text-decoration: underline; } +.content img, .content video { max-width: 100%; } +.content .header:link, +.content .header:visited { + color: var(--fg); +} +.content .header:link, +.content .header:visited:hover { + text-decoration: none; +} + +table { + margin: 0 auto; + border-collapse: collapse; +} +table td { + padding: 3px 20px; + border: 1px var(--table-border-color) solid; +} +table thead { + background: var(--table-header-bg); +} +table thead td { + font-weight: 700; + border: none; +} +table thead th { + padding: 3px 20px; +} +table thead tr { + border: 1px var(--table-header-bg) solid; +} +/* Alternate background colors for rows */ +table tbody tr:nth-child(2n) { + background: var(--table-alternate-bg); +} + + +blockquote { + margin: 20px 0; + padding: 0 20px; + color: var(--fg); + background-color: var(--quote-bg); + border-block-start: .1em solid var(--quote-border); + border-block-end: .1em solid var(--quote-border); +} + +.warning { + margin: 20px; + padding: 0 20px; + border-inline-start: 2px solid var(--warning-border); +} + +.warning:before { + position: absolute; + width: 3rem; + height: 3rem; + margin-inline-start: calc(-1.5rem - 21px); + content: "ⓘ"; + text-align: center; + background-color: var(--bg); + color: var(--warning-border); + font-weight: bold; + font-size: 2rem; +} + +blockquote .warning:before { + background-color: var(--quote-bg); +} + +kbd { + background-color: var(--table-border-color); + border-radius: 4px; + border: solid 1px var(--theme-popup-border); + box-shadow: inset 0 -1px 0 var(--theme-hover); + display: inline-block; + font-size: var(--code-font-size); + font-family: var(--mono-font); + line-height: 10px; + padding: 4px 5px; + vertical-align: middle; +} + +:not(.footnote-definition) + .footnote-definition, +.footnote-definition + :not(.footnote-definition) { + margin-block-start: 2em; +} +.footnote-definition { + font-size: 0.9em; + margin: 0.5em 0; +} +.footnote-definition p { + display: inline; +} + +.tooltiptext { + position: absolute; + visibility: hidden; + color: #fff; + background-color: #333; + transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */ + left: -8px; /* Half of the width of the icon */ + top: -35px; + font-size: 0.8em; + text-align: center; + border-radius: 6px; + padding: 5px 8px; + margin: 5px; + z-index: 1000; +} +.tooltipped .tooltiptext { + visibility: visible; +} + +.chapter li.part-title { + color: var(--sidebar-fg); + margin: 5px 0px; + font-weight: bold; +} + +.result-no-output { + font-style: italic; +} \ No newline at end of file diff --git a/theme/css/variables.css b/theme/css/variables.css new file mode 100644 index 00000000..5ce72b52 --- /dev/null +++ b/theme/css/variables.css @@ -0,0 +1,54 @@ +:root { + --sidebar-width: 300px; + --sidebar-resize-indicator-width: 8px; + --sidebar-resize-indicator-space: 2px; + --page-padding: 15px; + --content-max-width: 750px; + --menu-bar-height: 50px; + --mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace; + --code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */ +} + +.whisky { + --bg: rgb(17, 24, 39); + --fg: #ffffff; + + --sidebar-bg: rgb(31, 41, 55); + --sidebar-fg: rgb(255, 255, 255); + --sidebar-non-existant: #505254; + --sidebar-active: rgb(245, 158, 11); + --sidebar-spacer: #393939; + + --scrollbar: var(--sidebar-fg); + + --icons: rgb(107, 114, 128); + --icons-hover: #b3c0cc; + + --links: rgb(245, 158, 11); + + --inline-code-color: #c5c8c6; + + --theme-popup-bg: #141617; + --theme-popup-border: #43484d; + --theme-hover: #1f2124; + + --quote-bg: hsl(234, 21%, 18%); + --quote-border: hsl(234, 21%, 23%); + + --warning-border: #ff8e00; + + --table-border-color: rgba(255, 255, 255, 15%); + --table-header-bg: transparent; + --table-alternate-bg: rgba(255, 255, 255, 15%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #b7b7b7; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #666; + --searchresults-border-color: #98a3ad; + --searchresults-li-bg: #2b2b2f; + --search-mark-bg: #355c7d; + + --color-scheme: dark; +} \ No newline at end of file diff --git a/theme/index.hbs b/theme/index.hbs new file mode 100644 index 00000000..7c88c9a3 --- /dev/null +++ b/theme/index.hbs @@ -0,0 +1,265 @@ + + + + + + {{ title }} + {{#if is_print }} + + {{/if}} + {{#if base_url}} + + {{/if}} + + + + {{> head}} + + + + + + {{#if favicon_svg}} + + {{/if}} + {{#if favicon_png}} + + {{/if}} + + + + {{#if print_enable}} + + {{/if}} + + + + {{#if copy_fonts}} + + {{/if}} + + + + + + + + {{#each additional_css}} + + {{/each}} + + {{#if mathjax_support}} + + + {{/if}} + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ {{> header}} + + + + {{#if search_enabled}} + + {{/if}} + + + + +
+
+ {{{ content }}} +
+
+
+
+ + {{#if live_reload_endpoint}} + + + {{/if}} + + {{#if playground_line_numbers}} + + {{/if}} + + {{#if playground_copyable}} + + {{/if}} + + {{#if playground_js}} + + + + + + {{/if}} + + {{#if search_js}} + + + + {{/if}} + + + + + + + {{#each additional_js}} + + {{/each}} + + {{#if is_print}} + {{#if mathjax_support}} + + {{else}} + + {{/if}} + {{/if}} + +
+ + \ No newline at end of file