From: Daniel Karbach Date: Wed, 18 Jan 2023 11:00:24 +0000 (+0100) Subject: snes button icons X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=18759929710746d45d0f69e4f09205db3ddc74af;p=alttp.git snes button icons --- diff --git a/public/icon/dpad-d.svg b/public/icon/dpad-d.svg new file mode 100644 index 0000000..5643bd2 --- /dev/null +++ b/public/icon/dpad-d.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icon/dpad-dl.svg b/public/icon/dpad-dl.svg new file mode 100644 index 0000000..79aefea --- /dev/null +++ b/public/icon/dpad-dl.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icon/dpad-dr.svg b/public/icon/dpad-dr.svg new file mode 100644 index 0000000..df5bbb8 --- /dev/null +++ b/public/icon/dpad-dr.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icon/dpad-l.svg b/public/icon/dpad-l.svg new file mode 100644 index 0000000..6da61e2 --- /dev/null +++ b/public/icon/dpad-l.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icon/dpad-r.svg b/public/icon/dpad-r.svg new file mode 100644 index 0000000..af6ba8c --- /dev/null +++ b/public/icon/dpad-r.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icon/dpad-u.svg b/public/icon/dpad-u.svg new file mode 100644 index 0000000..92430f8 --- /dev/null +++ b/public/icon/dpad-u.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icon/dpad-ul.svg b/public/icon/dpad-ul.svg new file mode 100644 index 0000000..c1bab1b --- /dev/null +++ b/public/icon/dpad-ul.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icon/dpad-ur.svg b/public/icon/dpad-ur.svg new file mode 100644 index 0000000..4d4387d --- /dev/null +++ b/public/icon/dpad-ur.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icon/dpad.svg b/public/icon/dpad.svg new file mode 100644 index 0000000..f013f75 --- /dev/null +++ b/public/icon/dpad.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/sass/common.scss b/resources/sass/common.scss index c8528e1..83e5b90 100644 --- a/resources/sass/common.scss +++ b/resources/sass/common.scss @@ -41,6 +41,125 @@ h1 { } } +.snes-button-a, +.snes-button-b, +.snes-button-x, +.snes-button-y { + display: inline-block; + width: 1.5em; + height: 0; + padding: .75em 0; + box-shadow: .125ex .125ex .125ex rgba(0, 0, 0, .5); + border-radius: .75em; + font-size: 90%; + font-weight: bold; + text-align: center; + text-transform: uppercase; + line-height: 0; +} +.snes-button-a { + background: #c1121c; + color: white; +} +.snes-button-b { + background: #f7ba0b; + color: black; +} +.snes-button-x { + background: #00387b; + color: white; +} +.snes-button-y { + background: #007243; + color: white; +} +.snes-shoulder-l, +.snes-shoulder-r { + display: inline-block; + width: 3em; + height: 0; + padding: .75em 0; + box-shadow: .125ex .125ex .125ex rgba(0, 0, 0, .5); + border-radius: .75em; + font-size: 90%; + font-weight: bold; + text-align: center; + text-transform: uppercase; + line-height: 0; + background: #b2b4b2; + color: #54585a; +} +.snes-start, +.snes-select { + display: inline-flex; + flex-direction: column; + align-items: center; + vertical-align: middle; + font-size: 50%; + text-transform: uppercase; + + &::before { + display: inline-block; + content: ''; + background: #54585a; + width: 2em; + height: 0.7em; + border-radius: 0.35em; + transform: rotate(-40deg); + margin-bottom: 0.75em; + border: thin solid black; + } +} +.snes-dpad, +.snes-dpad-r, +.snes-dpad-dr, +.snes-dpad-d, +.snes-dpad-dl, +.snes-dpad-l, +.snes-dpad-ul, +.snes-dpad-u, +.snes-dpad-ur { + display: inline-block; + + &::before { + display: inline-block; + content: ''; + width: 2em; + height: 2em; + margin-right: 0.5ex; + vertical-align: middle; + background-repeat: no-repeat; + background-size: contain; + } + + &.compact { + position: relative; + > span { + display: none; + position: absolute; + left: -50%; + top: -125%; + background: $dark; + padding: 0.5ex 1ex; + white-space: nowrap; + } + &:active > span, + &:focus > span, + &:hover > span { + display: block; + } + } +} +.snes-dpad::before { background-image: url(/icon/dpad.svg); } +.snes-dpad-r::before { background-image: url(/icon/dpad-r.svg); } +.snes-dpad-dr::before { background-image: url(/icon/dpad-dr.svg); } +.snes-dpad-d::before { background-image: url(/icon/dpad-d.svg); } +.snes-dpad-dl::before { background-image: url(/icon/dpad-dl.svg); } +.snes-dpad-l::before { background-image: url(/icon/dpad-l.svg); } +.snes-dpad-ul::before { background-image: url(/icon/dpad-ul.svg); } +.snes-dpad-u::before { background-image: url(/icon/dpad-u.svg); } +.snes-dpad-ur::before { background-image: url(/icon/dpad-ur.svg); } + .spoiler { border-radius: 0.5ex; padding: 0 0.5ex;