Skip to content

Commit

Permalink
Merge pull request #12 from danice/main
Browse files Browse the repository at this point in the history
fix: download css for theme error
  • Loading branch information
wuda-io authored Jul 7, 2024
2 parents fe35986 + 4a91af3 commit 94f7598
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h4>Color Scheme</h4>
<label>Primary Color</label>
<input type="color" id="color-picker" value="#0000ff" />
</div>
<button type="button" class="btn" onclick="downloadCss()">Download css style</button>
<button id="downloadCss" type="button" class="btn">Download css style</button>
</div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect btn-flat">Close</a>
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ document.addEventListener("DOMContentLoaded", async function () {
toggleColorsButton?.addEventListener("change", () => {
themes.setThemePrimaryColor(toggleColorsButton.value);
});
const downloadCssButton = document.querySelector("#downloadCss");
downloadCssButton.addEventListener("click", (e) => {

Check failure on line 211 in src/main.ts

View workflow job for this annotation

GitHub Actions / Build

'e' is declared but its value is never read.
themes.downloadCss();
});

//---------------------------------------------------------------

Expand Down

0 comments on commit 94f7598

Please sign in to comment.