-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Allow auto dark mode and forcing theme #153
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
<div x-data="{visible: true}" markdown="0"> | ||
<div class="notification {{ include.status | default: 'is-warning' }}" x-show.transition.duration.300ms="visible"> | ||
<div | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add margin to top and bottom of notifications |
||
class="notification {{ include.status | default: 'is-warning' }} my-4" | ||
x-show.transition.duration.300ms="visible" | ||
> | ||
{% if include.dismissable %} | ||
<button class="delete" x-on:click="visible = false"></button> | ||
{% endif %} | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -11,6 +11,13 @@ show_sidebar: false | |||||
|
||||||
Bulma Clean Theme uses the Bulma frontend framework. Check out the [Bulma docs](https://bulma.io/documentation/) for more information. | ||||||
|
||||||
## Bulma Themes | ||||||
|
||||||
Bulma v1 has the concept of [themes](https://bulma.io/documentation/features/themes/) and auto detects the browsers choice for dark or light theme. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
To disable this behaviour and force a theme, set the `force_theme:` in the _config.yml to either 'dark' or 'light'. | ||||||
|
||||||
|
||||||
## Setting the Primary Colour | ||||||
|
||||||
To overwrite the primary theme colour, create a new file called `assets/css/app.scss`. Copy and paste the below into the `app.scss` file. | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,12 +10,56 @@ toc: true | |||||
|
||||||
Version 1 of Bulma Clean Theme uses version 1 of Bulma. Bulma v1 has been updated to use dart sass and Jekyll was updated to use dart sass from version 4.3 and up, so this is now the minimum supported version of Jekyll for this theme. | ||||||
|
||||||
## Updating dependencies | ||||||
|
||||||
One way of updating Jekyll and the theme is by using bundle. First update the versions in your Gemfile as follows: | ||||||
|
||||||
```ruby | ||||||
# Gemfile | ||||||
gem "jekyll", "~> 4.3" | ||||||
gem "bulma-clean-theme", '1.0.0' | ||||||
``` | ||||||
|
||||||
Then use bundle to update from your command line. | ||||||
|
||||||
```bash | ||||||
$ bundle update | ||||||
``` | ||||||
|
||||||
## Using remote_theme | ||||||
|
||||||
If you are using Jekyll Remote Theme, then you can [add a version number](https://github.com/benbalter/jekyll-remote-theme?tab=readme-ov-file#declaring-your-theme) in your _config.yml to specify which version you want to use. | ||||||
|
||||||
```yaml | ||||||
# _config.yml | ||||||
remote_theme: chrisrhymes/bulma-clean-theme@v1.0.0 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you like this to be consistent with the README and installation pages? Both worked in my testing, so this isn't wrong.
Suggested change
|
||||||
``` | ||||||
|
||||||
## Changes to Bulma | ||||||
|
||||||
Please read through the [Bulma migration guide](https://bulma.io/documentation/start/migrating-to-v1/) for any changes to Bulma that may affect your site. | ||||||
|
||||||
### Dark mode | ||||||
|
||||||
Bulma v1 has a concept of themes and [automatic dark mode](https://bulma.io/documentation/features/dark-mode/). | ||||||
|
||||||
> Modern browsers come with a way to detect if a user has set their theme preference to light or dark by using the prefers-color-scheme keyword. | ||||||
|
||||||
To disable this behaviour and force a theme, set the `force_theme:` in the _config.yml to either 'dark' or 'light'. | ||||||
|
||||||
```yaml | ||||||
# _config.yml | ||||||
force_theme: light | ||||||
``` | ||||||
|
||||||
## GitHub pages deploy | ||||||
|
||||||
As stated above, the minimum supported version is now Jekyll <= 4.3. The standard build for GitHub pages works with Jekyll 3.9, so you will need to migrate to using a GitHub action to build and deploy your site. | ||||||
|
||||||
Please read through the [Jekyll docs for GitHub Actions](https://jekyllrb.com/docs/continuous-integration/github-actions/) for more information. | ||||||
Please read through the [Jekyll docs for GitHub Actions](https://jekyllrb.com/docs/continuous-integration/github-actions/) for more information. | ||||||
|
||||||
### Additional gems | ||||||
|
||||||
The [GitHub pages gem](https://rubygems.org/gems/github-pages/versions/231) had a lot of additional gems included, which may not be included when you use GitHub actions to build your site. | ||||||
|
||||||
If you are using any additional gems in your site, such as `jekyll-github-metadata`, then ensure you install them following their documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much clearer, thank you! I didn't know that you could pin the version of a remote theme. That looks like a simple solution to start with.