diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-08-19 19:57:57 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-08-19 19:57:57 +0200 |
commit | 329fc73b94852697f7a057957a714d961a2e9e3b (patch) | |
tree | 6c6ab199d838bc56ddb93e7eeecb721afcec127b /web/pw-server | |
parent | 87f6a9c455726ad0cf502a316d98db8da1d1806a (diff) | |
download | planetwars.dev-329fc73b94852697f7a057957a714d961a2e9e3b.tar.xz planetwars.dev-329fc73b94852697f7a057957a714d961a2e9e3b.zip |
create global scss styles
Diffstat (limited to 'web/pw-server')
-rw-r--r-- | web/pw-server/src/routes/__layout.svelte | 4 | ||||
-rw-r--r-- | web/pw-server/src/routes/bots/[bot_name].svelte | 11 | ||||
-rw-r--r-- | web/pw-server/src/routes/matches/index.svelte | 25 | ||||
-rw-r--r-- | web/pw-server/src/styles/buttons.scss | 27 | ||||
-rw-r--r-- | web/pw-server/src/styles/global.scss | 2 | ||||
-rw-r--r-- | web/pw-server/src/styles/variables.scss | 3 |
6 files changed, 32 insertions, 40 deletions
diff --git a/web/pw-server/src/routes/__layout.svelte b/web/pw-server/src/routes/__layout.svelte index 065a82c..53eb265 100644 --- a/web/pw-server/src/routes/__layout.svelte +++ b/web/pw-server/src/routes/__layout.svelte @@ -14,8 +14,8 @@ <slot /> </div> -<style lang="scss"> - @import "src/styles/variables.scss"; +<style lang="scss" global> + @import "src/styles/global.scss"; .outer-container { width: 100vw; diff --git a/web/pw-server/src/routes/bots/[bot_name].svelte b/web/pw-server/src/routes/bots/[bot_name].svelte index 99278df..471e530 100644 --- a/web/pw-server/src/routes/bots/[bot_name].svelte +++ b/web/pw-server/src/routes/bots/[bot_name].svelte @@ -97,7 +97,7 @@ <MatchList {matches} /> {#if matches.length > 0} <div class="btn-container"> - <a class="btn-view-more" href={`/matches?bot=${bot["name"]}`}>All matches</a> + <a class="btn" href={`/matches?bot=${bot["name"]}`}>All matches</a> </div> {/if} </div> @@ -118,7 +118,6 @@ </div> <style lang="scss"> - @import "src/styles/variables.scss"; .container { width: 800px; max-width: 80%; @@ -151,14 +150,6 @@ padding: 24px; text-align: center; } - .btn-view-more { - color: $btn-text-color; - font-size: 14px; - text-decoration: none; - padding: 6px 16px; - border: 1px solid $btn-border-color; - border-radius: 5px; - } .versions { margin: 30px 0; diff --git a/web/pw-server/src/routes/matches/index.svelte b/web/pw-server/src/routes/matches/index.svelte index 3ae6603..a2e352c 100644 --- a/web/pw-server/src/routes/matches/index.svelte +++ b/web/pw-server/src/routes/matches/index.svelte @@ -107,35 +107,10 @@ </div> <style lang="scss"> - @import "src/styles/variables.scss"; .container { width: 800px; margin: 0 auto; } - .btn { - color: $btn-text-color; - font-size: 14px; - text-decoration: none; - padding: 6px 16px; - border: 1px solid $btn-border-color; - border-radius: 5px; - } - - .btn-group { - display: flex; - } - - .btn-group .btn:not(:last-child) { - border-right: none; - } - - .btn-group .btn:first-child { - border-radius: 5px 0 0 5px; - } - - .btn-group .btn:last-child { - border-radius: 0 5px 5px 0; - } .page-controls { display: flex; diff --git a/web/pw-server/src/styles/buttons.scss b/web/pw-server/src/styles/buttons.scss new file mode 100644 index 0000000..2aa7535 --- /dev/null +++ b/web/pw-server/src/styles/buttons.scss @@ -0,0 +1,27 @@ +$btn-text-color: rgb(9, 105, 218); +$btn-border-color: rgba(27, 31, 36, 0.25); + +.btn { + color: $btn-text-color; + font-size: 14px; + text-decoration: none; + padding: 6px 16px; + border: 1px solid $btn-border-color; + border-radius: 5px; +} + +.btn-group { + display: flex; +} + +.btn-group .btn:not(:last-child) { + border-right: none; +} + +.btn-group .btn:first-child { + border-radius: 5px 0 0 5px; +} + +.btn-group .btn:last-child { + border-radius: 0 5px 5px 0; +} diff --git a/web/pw-server/src/styles/global.scss b/web/pw-server/src/styles/global.scss new file mode 100644 index 0000000..9ead606 --- /dev/null +++ b/web/pw-server/src/styles/global.scss @@ -0,0 +1,2 @@ +@forward "./variables.scss"; +@forward "./buttons.scss"; diff --git a/web/pw-server/src/styles/variables.scss b/web/pw-server/src/styles/variables.scss index 5ff08b6..257a67e 100644 --- a/web/pw-server/src/styles/variables.scss +++ b/web/pw-server/src/styles/variables.scss @@ -1,4 +1 @@ $bg-color: rgb(41, 41, 41); - -$btn-text-color: rgb(9, 105, 218); -$btn-border-color: rgba(27, 31, 36, 0.25); |