Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bridge-ui-v2): complying with design #14376

Merged
merged 11 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions packages/bridge-ui-v2/src/components/Card/Card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
import { classNames } from '$libs/util/classNames';

const styles = `
md:card
w-full
md:rounded-xl
md:border
md:border-neutral-background
md:bg-gradient-to-r from-glass-gradient-from to-glass-gradient-to
backdrop-blur-sm
md:bg-gray-800/30`;
w-full
md:card
md:rounded-xl
md:border
md:border-divider-border
md:glassy-gradient-card`;

export let title: string;
export let text = '';
Expand All @@ -18,7 +16,7 @@
</script>

<div class={classes}>
<div class="card-body body-regular p-0 md:p-[50px] gap-0">
<div class="card-body body-regular p-4 md:p-[50px] gap-0">
<h2 class="card-title title-screen-bold">{title}</h2>
{#if text}
<p>{text}</p>
Expand Down
10 changes: 3 additions & 7 deletions packages/bridge-ui-v2/src/components/Header/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
$: isBridgePage = $page.route.id === '/' || $page.route.id === '/nft';
</script>

<!-- <DesktopOrLarger bind:is={isDesktopOrLarger} /> -->

<header
class="
sticky-top
Expand All @@ -27,13 +25,11 @@
md:px-10
md:py-7
">
<LogoWithText width={150} height={50} class="md:hidden" />
<LogoWithText width={77} height={21} class="md:hidden" />

<div class="flex justify-end md:f-between-center w-full">
<div class="flex justify-end w-full">
{#if isBridgePage}
<BridgeTabs class="hidden md:flex" />
{:else}
<div></div>
jscriptcoder marked this conversation as resolved.
Show resolved Hide resolved
<BridgeTabs class="hidden md:flex md:flex-1" />
{/if}

<ConnectButton connected={$account?.isConnected} />
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-ui-v2/src/components/Page/Page.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="f-center w-full px-4 md:px-10 py-[50px] md:py-[60px]">
<div class="f-center w-full px-0 md:px-10 py-[50px] md:py-[60px]">
<slot />
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Slow transitions can be pretty annoying after a while.
Let's reduce it to 100ms for a better experience.
-->
<div class="w-h-full !duration-100">
<div class="w-h-full bg-primary-background !duration-100">
<header class="flex justify-end py-[20px] px-4 md:hidden">
<button on:click={closeDrawer} class="h-9">
<Icon type="x-close" fillClass="fill-primary-icon" size={24} />
Expand Down Expand Up @@ -106,3 +106,26 @@
</div>
</div>
</div>

<style>
.drawer-content {
/* No grid background by default */
background-image: url(/bg/spotlights.svg), linear-gradient(180deg, rgb(11 16 27 / 70%) 0%, rgb(11 16 27 / 0%) 100%);
background-size: cover, cover;
background-blend-mode: lighten, multiply;
background-attachment: fixed;
}

@media (min-width: 768px) {
.drawer-content {
/* Desktop of larger screens (md) have grid */
/* TODO: Ask Jane if we have the right svgs here */
background-image:
url(/bg/grid.svg),
url(/bg/spotlights.svg),
/* grey-900/70 => grey-900/0 */ linear-gradient(180deg, rgb(11 16 27 / 70%) 0%, rgb(11 16 27 / 0%) 100%);
background-size: 840px, cover, cover;
background-blend-mode: color-dodge, lighten, multiply;
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
aria-haspopup="listbox"
aria-controls={id}
aria-expanded={menuOpen}
class="f-between-center w-full px-6 py-[14px] input-box"
class="f-between-center w-full px-6 py-[14px] input-box bg-neutral-background"
on:click={openMenu}
on:focus={openMenu}>
<div class="space-x-2">
Expand Down
4 changes: 0 additions & 4 deletions packages/bridge-ui-v2/src/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,5 @@
html,
body {
height: 100%;
background-image: url(/bg/grid.svg), url(/bg/spotlights.svg), linear-gradient(270deg, #1f1f1f 0%, #000000 100%);
background-size: 840px, cover, cover;
background-blend-mode: color-dodge, lighten, multiply;
background-attachment: fixed;
}
}
9 changes: 8 additions & 1 deletion packages/bridge-ui-v2/src/styles/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

/* border */
/* border-primary-border */
shadow-[0_0_0_1px_#5d636f]
/* shadow-[0_0_0_1px_#5d636f] */

/* hover:border-2 */
/* hover:border-primary-border-hover */
Expand Down Expand Up @@ -122,5 +122,12 @@
@apply modal-backdrop bg-overlay-background rounded-xl;
}

.glassy-gradient-card {
/* Trying to be consistent with design */
/* grey-500/10 => grey-800/20 */
background: linear-gradient(226deg, rgba(93, 99, 111, 0.1) 1.26%, rgba(25, 30, 40, 0.2) 100%);
backdrop-filter: blur(10px);
}

/* TODO: add more components here */
}
3,060 changes: 3,060 additions & 0 deletions packages/bridge-ui-v2/static/bg-md.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions packages/bridge-ui-v2/static/bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions packages/bridge-ui-v2/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,6 @@ export default {
'overlay-background': 'var(--overlay-background)',

'divider-border': 'var(--divider-border)',

'glass-gradient-from': 'var(--glass-gradient-from)',
'glass-gradient-to': 'var(--glass-gradient-to)',
},
},
},
Expand Down Expand Up @@ -227,9 +224,6 @@ export default {

'--divider-border': '#444A55', // grey-600

'--glass-gradient-from': 'rgba(93, 99, 111, 0.10)',
'--glass-gradient-to': 'rgba(25, 30, 40, 0.20)',

// ================================ //

primary: '#C8047D', // pink-500,
Expand Down