Skip to content

Commit

Permalink
style(web): applies a new skin (#139)
Browse files Browse the repository at this point in the history
- fix(web): does not closes login's credential fields when clearing them
- feat(web): displays a message in radial menu when there are no actions
- feat(web): uses more granular step when rotating camera
- refactor(web): improves control help with stylable SVG
- style(web): applies new blue-sky skin!
- style(web): logo
- style(games): 3d covers
  • Loading branch information
feugy authored Mar 3, 2023
1 parent e63bab8 commit 3accde3
Show file tree
Hide file tree
Showing 175 changed files with 11,553 additions and 9,486 deletions.
Binary file modified apps/games/chess/catalog/cover.webp
Binary file not shown.
Binary file modified apps/games/draughts/catalog/cover.webp
Binary file not shown.
Binary file modified apps/games/playground/catalog/cover.webp
Binary file not shown.
2 changes: 2 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"@fastify/cors": "^8.2.0",
"@fastify/static": "^6.6.0",
"@fastify/websocket": "^7.1.1",
"@fontsource/carter-one": "^4.5.9",
"@fontsource/lexend": "^4.5.15",
"@playwright/test": "^1.29.0",
"@rollup/plugin-graphql": "^2.0.2",
"@rollup/plugin-yaml": "^4.0.1",
Expand Down
Binary file removed apps/web/public/favicon.png
Binary file not shown.
102 changes: 102 additions & 0 deletions apps/web/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/web/public/images/help/double-left-object.webp
Binary file not shown.
Binary file not shown.
Binary file removed apps/web/public/images/help/left-drag-object.webp
Binary file not shown.
Binary file not shown.
Binary file removed apps/web/public/images/help/left-drag.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/left-object.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed apps/web/public/images/help/long-left-object.webp
Binary file not shown.
Binary file not shown.
Binary file removed apps/web/public/images/help/long-pointer-object.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/middle-drag.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/mouse-wheel.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/new-camera.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/pinch.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/pointer-drag-object.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/pointer-drag-select.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/pointer-drag.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/pointer-object.webp
Binary file not shown.
Binary file not shown.
Binary file removed apps/web/public/images/help/restore-camera.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/right-drag.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/right-object.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/three-pointers-drag.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/two-pointers-drag.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/two-pointers-object.webp
Binary file not shown.
Binary file removed apps/web/public/images/help/update-camera.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/web/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<link rel="icon" href="%sveltekit.assets%/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
%sveltekit.head%
</head>
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/components/Aside.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { isLobby as checkIfLobby } from '@src/utils'
import { _ } from 'svelte-intl'
import ControlsHelp from './ControlsHelp/index.js'
import ControlsHelp from './ControlsHelp.svelte'
import Discussion from './Discussion.svelte'
import FriendList from './FriendList.svelte'
import MinimizableSection from './MinimizableSection.svelte'
Expand Down Expand Up @@ -127,7 +127,7 @@
<style lang="postcss">
aside {
@apply bg-$base-lightest z-10;
@apply z-10 bg-$base-lighter;
}
.content {
Expand All @@ -146,7 +146,7 @@
@apply italic p-8 pb-12;
}
.avatars {
@apply flex-1 grid place-items-center grid-flow-col;
grid-template-rows: repeat(auto-fit, minmax(150px, 1fr));
@apply flex-1 grid place-items-center grid-flow-row;
grid-template-columns: repeat(auto-fill, minmax(max(50%, 150px), 1fr));
}
</style>
28 changes: 16 additions & 12 deletions apps/web/src/components/Breadcrumb.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@
const lastRank = steps?.length - 1
</script>
{#if steps?.length > 0}
<ol>
{#each steps as { href, label }, rank}
<li><a href={rank === lastRank ? null : href}>{label}</a></li>
{#if rank !== lastRank}
<li>></li>
{/if}
{/each}
</ol>
{/if}
<div>
{#if steps?.length > 0}
<span class="material-icons">home_filled</span>
<ol>
{#each steps as { href, label }, rank}
<li><a href={rank === lastRank ? null : href}>{label}</a></li>
{#if rank !== lastRank}
<li></li>
{/if}
{/each}
</ol>
{/if}
</div>
<style lang="postcss">
ol {
@apply flex gap-2 text-sm text-$primary;
@apply inline-flex gap-2 text-sm;
}
li {
@apply inline-block;
&:last-child {
&:last-child a {
@apply text-$ink;
}
}
Expand Down
139 changes: 116 additions & 23 deletions apps/web/src/components/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
export let text = null
export let icon = null
export let badge = null
export let secondary = false
export let primary = false
export let transparent = false
export let ref = null
</script>

<button
{...$$restProps}
class:secondary
class:primary
class:transparent
class:has-text={Boolean(text)}
bind:this={ref}
on:click
on:keyup
Expand All @@ -27,37 +28,135 @@

<style lang="postcss">
button {
@apply py-2 px-4 inline-flex justify-center items-center rounded relative bg-$primary text-$primary-lightest
transition-all duration-$short;
&:focus {
@apply bg-$primary-light;
}
@apply py-2 px-4 inline-flex justify-center items-center relative transition-all duration-$short;
--shadow-drop: 3px 3px;
filter: drop-shadow(var(--shadow-drop) 0px var(--shadow-color));
&:hover:not(:disabled) {
@apply bg-$primary-light transform-gpu scale-105;
@apply transform-gpu scale-105;
}
&.secondary:disabled,
&.primary:disabled,
&:disabled {
@apply bg-$disabled text-$disabled-dark;
@apply bg-$disabled text-$ink-dark;
}
&.has-text:not(.transparent) {
@apply bg-transparent;
&:before {
@apply absolute inset-0 transition-all duration-$short;
z-index: -1;
content: '';
--corner-cut: 8px;
clip-path: polygon(
0 var(--corner-cut),
var(--corner-cut) 0,
100% 0,
100% calc(100% - var(--corner-cut)),
calc(100% - var(--corner-cut)) 100%,
0 100%
);
}
&.primary:disabled,
&:disabled {
&:before {
@apply bg-$disabled;
}
}
}
& .badge {
@apply absolute rounded-full leading-4 text-xs p-0.5
flex justify-center items-center bg-$primary-darker
text-$ink-dark -top-2 -left-2 min-w-5;
}
}
button.secondary {
@apply bg-$secondary text-$secondary-dark;
button {
@apply bg-$secondary text-$ink;
&:focus,
&:hover:not(:disabled) {
@apply bg-$secondary-light;
&.has-text {
@apply bg-transparent;
&:before {
@apply bg-$secondary;
}
&:focus,
&:hover:not(:disabled) {
@apply bg-transparent text-$ink;
&:before {
@apply bg-$secondary-light;
}
}
}
&:not(.has-text) {
&:focus,
&:hover:not(:disabled) {
@apply bg-$secondary-light text-$ink;
}
}
& .badge {
@apply bg-$secondary-darker;
}
}
button.primary {
@apply bg-$primary text-$ink;
&.has-text {
@apply bg-transparent;
&:before {
@apply bg-$primary;
}
&:focus,
&:hover:not(:disabled) {
@apply bg-transparent text-$ink;
&:before {
@apply bg-$primary-light;
}
}
}
&:not(.has-text) {
&:focus,
&:hover:not(:disabled) {
@apply bg-$primary-light text-$ink;
}
}
& .badge {
@apply bg-$primary-darker;
}
}
button.transparent {
@apply bg-transparent text-$secondary-darkest;
@apply bg-transparent text-$secondary-darker;
filter: none;
&.primary {
@apply text-$primary-dark;
}
&:focus,
&:hover:not(:disabled) {
@apply bg-transparent text-$secondary-darkest;
&.primary {
@apply text-$primary-darker;
}
}
&.has-text:before {
@apply bg-transparent;
}
}
Expand All @@ -72,10 +171,4 @@
.icon:not(:last-child) {
@apply -ml-1;
}
.badge {
@apply absolute rounded-full leading-4 text-xs p-0.5
flex justify-center items-center bg-$disabled
text-$disabled-dark -top-2 -left-2 min-w-5;
}
</style>
2 changes: 1 addition & 1 deletion apps/web/src/components/ConfirmDialogue.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
<slot />
<svelte:fragment slot="buttons">
<Button
secondary
text={cancelText}
bind:ref={cancelButtonRef}
on:click={() => (open = false)}
/>
<Button
primary
text={confirmText}
on:click={() => {
confirmed = true
Expand Down
Loading

2 comments on commit 3accde3

@vercel
Copy link

@vercel vercel bot commented on 3accde3 Mar 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tabulous – ./apps/web

tabulous-feugy.vercel.app
tabulous.fr
tabulous-git-main-feugy.vercel.app
tabulous.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 3accde3 Mar 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

tabulous-atelier – ./apps/web

tabulous-atelier-feugy.vercel.app
tabulous-atelier.vercel.app
tabulous-atelier-git-main-feugy.vercel.app

Please sign in to comment.