github kepano/obsidian-minimal 4.4.0

latest releases: 7.5.4, 7.5.3, 7.5.2...
2 years ago

Cards, new documentation, and switch to SCSS

minimal-4-4

The big new feature in the release is Cards, a useful and beautiful new way to display your Dataview tables as sortable cards.

This update also includes a complete rewrite of the documentation, and major changes to the architecture of the theme. You can find the new documentation and loads of new screenshots by going to the Minimal home page.

Cards

Cards takes Dataview tables and turns them into sortable cards. To use this feature you'll need the latest version of Minimal, Dataview plugin, and Sortable plugin.

Here's a demo video.

For this release, I have collaborated with @chhoumann to add a superfly script for his wonderful QuickAdd plugin that helps you pull in metadata and poster images from IMDB. Check it out!

minimal-4-4b

2022-01-03 14 06 56

Usage

Using cards is as simple as adding the following to the top of any note with Dataview table:

---
cssClasses: cards
---

Helper classes

The following helper classes can be used. Note that cards must be present for the others to work.

Class Description
cards Set all Dataview tables to card layout
cards-align-bottom Align the last element of a card to the bottom
cards-cover Images are resized to fill the defined space
cards-16-9 Fit images in cards to 16:9 ratio
cards-1-1 Fit images in cards to 1:1 ratio (square)
cards-2-1 Fit images in cards to 2:1 ratio
cards-2-3 Fit images in cards to 2:3 ratio

Style Settings

A few granular options are available if you use the Style Settings plugin:

  • Minimum width
  • Padding size
  • Maximum image height
  • Border width
  • Background color (light and dark mode)

Architecture changes

The following is nerdy stuff mainly for developers.

Minimal has been split from a single monolothic CSS file into dozens of SCSS partials that are compiled and minified using Grunt for distribution on the Obsidian theme store. Every feature and plugin now has its own file.

This change has several benefits. First, it will make Minimal easier for me to maintain. Second, it will make it easier to receive contributions for plugin stylesheets and other modular bits of CSS. Finally, it allows new features that I develop to be used as standalone snippets.

Most of the files in src/scss/features can be used as snippets with very little to no modification. Please respect the licensing requirements of Minimal if you plan to redistribute portions of the code.

Build instructions can be found in the documentation. This may be of use to other theme developers looking to use a similar architecture. Further detail can also be found in the Gruntfile comments.


Thanks for reading. If you found any of this useful, please support me by buying me a coffee.

Don't miss a new obsidian-minimal release

NewReleases is sending notifications on new releases.