Skip to content

Commit

Permalink
configurable font
Browse files Browse the repository at this point in the history
  • Loading branch information
StuxVT committed Mar 8, 2024
1 parent dfd46b1 commit 084edf9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
5 changes: 3 additions & 2 deletions widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@



<div id="timer"></div>
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet">
<div id="timer"></div>







<!--
PLACE YOUR WIDGET.HTML CODE ABOVE
-->
Expand Down
3 changes: 2 additions & 1 deletion widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ window.addEventListener('onWidgetLoad', function (obj) {
let initialMessage = fieldData.initialMessage
let expiredMessage = fieldData.expiredMessage

// set bg color
// visuals
timerElement.style.backgroundColor = fieldData.backgroundColor
timerElement.style.fontFamily = fieldData.font

// seconds -> min:sec format
function formatTime(time) {
Expand Down
20 changes: 20 additions & 0 deletions widget.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,25 @@ let fieldData={
"label": "Background Color",
"type": "colorpicker",
"value": "rgba(0, 0, 0, 0.5)"
},
"font": {
"label": "Font",
"type": "dropdown",
"value": "Montserrat",
"options": {
"Montserrat": "Montserrat",
"Arial": "Arial",
"Helvetica": "Helvetica",
"Times New Roman": "Times New Roman",
"Courier New": "Courier New",
"Verdana": "Verdana",
"Georgia": "Georgia",
"Garamond": "Garamond",
"Bookman": "Bookman",
"Comic Sans MS": "Comic Sans MS",
"Trebuchet MS": "Trebuchet MS",
"Arial Black": "Arial Black",
"Impact": "Impact"
}
}
}

0 comments on commit 084edf9

Please sign in to comment.