Skip to content

Commit

Permalink
Added missing module install infos
Browse files Browse the repository at this point in the history
  • Loading branch information
Clooos authored Feb 14, 2025
1 parent 148f342 commit 642910d
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 10 deletions.
14 changes: 11 additions & 3 deletions dist/bubble-card.js

Large diffs are not rendered by default.

Binary file modified dist/bubble-card.js.gz
Binary file not shown.
18 changes: 14 additions & 4 deletions dist/bubble-modules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@
#
# - To edit or add modules (global styles and templates), first copy the
# "bubble-modules.yaml" file from "/www/community/Bubble-Card/" (if installed via HACS)
# to "/www/bubble/" (Create the folder if it doesn't exist).
# to "/www/bubble/" (you'll need to create this folder).
#
# - You can share/find modules here:
# github.com/Clooos/Bubble-Card/discussions/categories/share-your-modules
# Then add these lines in your "configuration.yaml" under "homeassistant:":
#
# homeassistant:
# allowlist_external_dirs:
# - /config/www/bubble
# # Not needed if you already have this line:
# - /config/www
#
# Then save and restart Home Assistant.
#
# - After making changes, you need to refresh your page to apply the modifications.
#
# - Styles and templates defined under the "default:" key are applied globally to all cards by default.
# - Styles and templates defined under "default:" are applied globally to all cards by default.
#
# - You can share/find modules here:
# github.com/Clooos/Bubble-Card/discussions/categories/share-your-modules


default:
Expand Down
10 changes: 9 additions & 1 deletion src/editor/bubble-card-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -963,11 +963,19 @@ class BubbleCardEditor extends LitElement {
<ha-icon icon="mdi:open-in-new"></ha-icon>
Community Modules
</a>
<ha-alert alert-type="warning" style="display: ${!window.bubbleYamlWarning ? 'none' : ''}">
<b>If you want to edit or add modules here</b>, first copy
<code>bubble-modules.yaml</code> from <code>/www/community/Bubble-Card/</code> (if installed via HACS) to
<code>/www/bubble/</code> (you'll need to create this folder). Make sure to refresh your page after each modification.
<code>/www/bubble/</code> (you'll need to create this folder).
<br><br>Then add these lines in your <code>configuration.yaml</code> under <code>homeassistant:</code>:
<br><br><code-block><pre>
<i>homeassistant:</i>
<i> allowlist_external_dirs:</i>
<i> - /config/www/bubble</pre></code-block></i>
<br>Now save and restart Home Assistant, then <b>check if this warning is gone</b>. Make sure to refresh your page after each modification.
</ha-alert>
<ha-alert alert-type="info">
Modules are the best way to apply <a href="https://github.com/Clooos/Bubble-Card#styling">custom styles</a> and/or <a href="https://github.com/Clooos/Bubble-Card#templates">custom templates</a> to your cards, as they are managed in a single external YAML file.
This makes it easy to change things like the styles of all your cards, and for advanced users, to add or modify features. <br><br>The best approach when starting is to first test your changes in the "Custom styles & templates" editor under "Styling options" for a live preview, and once it's working, try to add it as a module.
Expand Down
7 changes: 6 additions & 1 deletion src/editor/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,16 @@ code-block {
}

code-block pre {
white-space: pre;
white-space: pre-line;
overflow: auto;
margin: 8px;
}

code-block pre > i {
white-space: pre;
font-style: normal;
}

img {
max-width: 100%;
margin: 14px 0;
Expand Down
2 changes: 1 addition & 1 deletion src/var/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export let version = 'v2.5.0-beta.3';
export let version = 'v2.5.0-beta.4';

0 comments on commit 642910d

Please sign in to comment.