mgmeyers / obsidian-kanban

Create markdown-backed Kanban boards in Obsidian.
https://publish.obsidian.md/kanban/
GNU General Public License v3.0
3.24k stars 190 forks source link

[Feature]: Banners for Kanban #544

Open gabrielcarus opened 2 years ago

gabrielcarus commented 2 years ago

Goal or desired outcome of this feature

Something like the image but with the kanban view on the bottom:

image

Describe the feature

Kanban view with banners

In the "kanban" view in Notion there's the possibility of inserting a banner on the top of the page, would be awesome to have this possibility enhancing the aesthetics of the plugin. I would personally appreciate that if possible make this feature accessible to non-programmers, or at least with a very simple code that is possible to copy and paste. I think that this would be possible with an integration with the "Banners" plugin, is a possibility.

Can you think of any alternatives or work-arounds?

No response

Screenshots, mockups, or videos

No response

SleepiPanda commented 2 years ago

I just tackled this locally and might submit a more robust pr. In the mean time a workaround is to add a snippet that looks a little like this


.view-content {
    z-index: 0;
  }

.kanban-plugin::before {
    content:"";
    display:block;
    width: 100%;
    height: 25%;
    margin: 0px auto -80px auto;
    -webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)));
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
    background:url("app://local/path/to/banner/kanban_background.jpg");
    opacity: 0.7;
    z-index: -1;
}

Here is an example image

LamFTS commented 2 years ago

Dear SleepiPanda, thanks for your snippet, I wonder can this snippet allow to show the full size of the image, after using this snippet, picture in the top of kanban is always trimmed. This is what it looks like in kanban 图片 This is what it looks like in banner 图片 Would you please tell how to modify the code. Thank you a lot.