Skip to content

Commit

Permalink
fix: grid check not working
Browse files Browse the repository at this point in the history
  • Loading branch information
krmanik committed Mar 14, 2024
1 parent 0ed5e67 commit 7836d55
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
15 changes: 9 additions & 6 deletions card templates/Card 5/front-xiehanzi-3.0.html

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion card templates/Card 5/front.html
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,9 @@ <h3 class="brand-title">写汉字</h3>
playAudio();
};

var grid_data = `<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' class='grid-color' id='grid-background-target'><g id="char_grid"><line x1='0' y1='0' x2='100%' y2='100%' stroke='var(--surface1)' /><line x1='100%' y1='0' x2='0' y2='100%' stroke='var(--surface1)' /><line x1='50%' y1='0' x2='50%' y2='100%' stroke='var(--surface1)' /><line x1='0' y1='50%' x2='100%' y2='50%' stroke='var(--surface1)' /></g></svg>`;
var stroke = document.getElementById("text-grid").checked ? "var(--surface1)" : "";

var grid_data = `<svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%' class='grid-color' id='grid-background-target'><g id="char_grid"><line x1='0' y1='0' x2='100%' y2='100%' stroke='${stroke}' /><line x1='100%' y1='0' x2='0' y2='100%' stroke='${stroke}' /><line x1='50%' y1='0' x2='50%' y2='100%' stroke='${stroke}' /><line x1='0' y1='50%' x2='100%' y2='50%' stroke='${stroke}' /></g></svg>`;

var characters = document.getElementById("practice-select").selectedIndex == "0"
? document.getElementById('char_sim').innerHTML
Expand Down
2 changes: 1 addition & 1 deletion card templates/styling-xiehanzi-3.0.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
src: local("Material Icons"), local("MaterialIcons-Regular"),
url(_MaterialIcons-Regular.woff2) format("woff2"),
url(_MaterialIcons-Regular.woff) format("woff"),
url(_MaterialIcons-Regular.ttf) format("truetype");
url(https://fonts.gstatic.com/s/materialicons/v141/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}

.material-icons {
Expand Down
2 changes: 1 addition & 1 deletion card templates/styling.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
src: local("Material Icons"), local("MaterialIcons-Regular"),
url(_MaterialIcons-Regular.woff2) format("woff2"),
url(_MaterialIcons-Regular.woff) format("woff"),
url(_MaterialIcons-Regular.ttf) format("truetype");
url(https://fonts.gstatic.com/s/materialicons/v141/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}

.material-icons {
Expand Down

0 comments on commit 7836d55

Please sign in to comment.