Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/grass/grass_component.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
i.fa-solid.fa-angle-right
- else
.user-grass-nav__next.is-blank
canvas.grass.a-grass data-times="#{times.to_json}" width="650" height="130"
canvas.grass.a-grass data-times="#{times.to_json}" data-dotw=I18n.t('date.abbr_day_names').to_json width="650" height="130"
2 changes: 1 addition & 1 deletion app/javascript/grass.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ document.addEventListener('DOMContentLoaded', () => {
ctx.clearRect(0, 0, 650, 130)

const colors = ['#e2e5ec', '#98A5DA', '#5D72C4', '#223FAF', '#06063e']
const dotw = ['日', '月', '火', '水', '木', '金', '土']
const dotw = JSON.parse(canvas.dataset.dotw)
for (let i = 0; i < dotw.length; i++) {
ctx.strokeText(dotw[i], 0, startY + 8 + (height + spanY) * i)
}
Expand Down