Skip to content

Commit

Permalink
Updated macOS widget style for Big Sur
Browse files Browse the repository at this point in the history
  • Loading branch information
tech189 committed Sep 15, 2021
1 parent a99d4e6 commit 8cc47cf
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions auc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


# this is the shell command that gets executed every time this widget refreshes
command: "/usr/local/bin/python3 ab-urbe-condita.widget/auc.py --now --json"
command: "/usr/local/bin/python3 ab-urbe-condita.widget/auc.py --json"

# the refresh frequency in milliseconds
refreshFrequency: 60000
Expand All @@ -27,11 +27,11 @@ update: (output, domEl) ->

data = JSON.parse(output)

$(domEl).find(".normal").text data["normal"]["day"] + ", " + data["normal"]["date"]
$(domEl).find(".normal").text data["normal"]["day"] + ", " + data["normal"]["date"] + " " + data["normal"]["year"] + " AD"
$(domEl).find(".time").text data["roman"]["time"]
$(domEl).find(".day").text data["roman"]["day"]
$(domEl).find(".date").text data["roman"]["date"]
$(domEl).find(".year").text data["roman"]["year"]
$(domEl).find(".year").text data["roman"]["idiomatic_year"]

# the CSS style for this widget, written using Stylus
# (http://learnboost.github.io/stylus/)
Expand All @@ -40,23 +40,29 @@ update: (output, domEl) ->
style: """
@media (prefers-color-scheme: light) {
background: rgba(#fff, 0.50)
-webkit-backdrop-filter: blur(100px)
-webkit-backdrop-filter: blur(10px) brightness(110%) contrast(105%) saturate(105%)
color: black
}
@media (prefers-color-scheme: dark) {
background: rgba(#000, 0.35)
-webkit-backdrop-filter: blur(100px)
-webkit-backdrop-filter: blur(10px) brightness(110%) contrast(105%) saturate(105%)
color: white
}
border-radius: 3px
top: 2%
left: 1%
max-width: 30%
box-sizing: border-box
font-family: -apple-system
font-weight: 400
right: 1%
line-height: 1.5
padding: 0.75rem 1.2rem
top: 2%
text-align: left
border-radius: 9px
border: 1px solid rgba(255, 255, 255, 0.15)
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
//alternative shadows for busier wallpapers:
//box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
//box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
"""

0 comments on commit 8cc47cf

Please sign in to comment.