Commit Graph

8 Commits

Author SHA1 Message Date
Andrew Jorgensen
b8c8871191
fix: code highlighting using Chroma (#20)
Chroma sets `color` (usually) and `background-color` directly on a
`<pre>` element under a `<div class="highlight">` but the theme was
interfering with those color settings from both the `code` and `pre
code` selectors. Since Chroma highlighting is under a `highlight` class
we can `unset` the colors that are set by the `code` selector elsewhere,
so that under a `<code>` element that's under a `<div
class="highlight">` it will just inherit from the `<pre>` above it where
Chroma sets all it's colors.

The `color: initial;` instead of `color: unset;` is needed because some
Chroma styles don't set a default text color, and if you use `unset`
instead that lets the browser use a lighter default text color when
using a dark color scheme.

That's a sort of long winded way of saying that I think I've fixed the
color interference problem in a way that won't mess with anything else
in the theme. I've tested this on a wide selection of Chroma styles,
with both light and dark color schemes and it seems to work correctly in
all cases. Which is to say that Chroma appears to have full control of
both `color` and `background-color` for code blocks that it's
highlighting.

Fixes #19
2021-04-13 17:24:30 +02:00
Akira Baruah
be0ba327e3 feat: enable optional custom date format
Adds a .Site.Params.dateFormat setting to let users specify a Hugo-style
date format string for content. Previously, the date format was
hardcoded to "02 Jan, 2006", presumably to match the original BearBlog
style. This format gets used by default if the new "dateFormat" setting
is absent from the site config.
2021-04-12 17:18:41 +02:00
Jan Raasch
ed4cda1ac4 fix: improve accessibility on mobile
Fixes #6.

To be honest I did not think about this at all. I simply copied the code from the original »Bear Blog«

https://github.com/HermanMartinus/bearblog/blob/master/templates/base.html#L7

It seems like iOS ignores the declarations of user-scalable, minimum-scale, and maximum-scale, as of iOS 10, see https://sitebulb.com/hints/mobile-friendly/the-viewport-meta-tag-prevents-the-user-from-scaling/ so we might as well remove this.
2020-10-02 15:57:36 +02:00
Jan Raasch
39dbab8f8a chore: remove unused partial 🤷🏼‍♂️ 😇 2020-10-02 15:52:44 +02:00
Jan Raasch
6e2f054d42 fix: styling of ul.blog-posts
see 0c3efa6
2020-10-01 16:12:16 +02:00
Jan Raasch
0c3efa646d feat: add dark color scheme for dark mode
see https://github.com/HermanMartinus/bearblog/pull/51
2020-10-01 15:33:23 +02:00
Nick Badal
dcff8a4f85
feat: hide blog link if page not created (#4)
Allows this theme to be used for sites that do not have a blog.
2020-09-17 07:35:58 +02:00
Jan Raasch
5880538157 chore: initial commit 2020-09-03 20:22:23 +02:00