Skip to content

Commit

Permalink
Feature/navbar (#21)
Browse files Browse the repository at this point in the history
* finalize navbar

* Update Navbar.tsx

* lints

* cleanup
  • Loading branch information
steezeburger authored Oct 16, 2024
1 parent 86b101b commit d203cf6
Show file tree
Hide file tree
Showing 13 changed files with 120 additions and 44 deletions.
9 changes: 1 addition & 8 deletions web/src/components/DepositCard/DepositCard.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import type React from "react";
import {
useCallback,
useContext,
useEffect,
useMemo,
useState,
useRef,
} from "react";
import { useContext, useEffect, useMemo, useState, useRef } from "react";

import { Dec, DecUtils } from "@keplr-wallet/unit";
import AnimatedArrowSpacer from "components/AnimatedDownArrowSpacer/AnimatedDownArrowSpacer";
Expand Down
34 changes: 30 additions & 4 deletions web/src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type React from "react";
import { useState } from "react";
import { Link } from "react-router-dom";
import logo from "../../logo.svg";
import logo from "../../logo-flame-w-text.svg";

function Navbar() {
const [isMobileMenuActive, setIsMobileMenuActive] = useState(false);
Expand All @@ -10,7 +10,9 @@ function Navbar() {
setIsMobileMenuActive((prev) => !prev);
};

const brandLink = "/";
const brandLink = "https://www.astria.org/";
const swapLink = "https://flame.astria.org/";
const poolLink = "https://flame.astria.org/";

return (
<nav
Expand All @@ -37,10 +39,34 @@ function Navbar() {

<div
id="topNavbar"
className={`navbar-menu ${isMobileMenuActive && "is-active"}`}
className={`navbar-menu ${
isMobileMenuActive && "navbar-menu-dropdown is-active"
}`}
>
<div className="navbar-start" />
<div className="navbar-middle has-text-weight-medium is-family-monospace">
<Link to="/" className="navbar-item">
BRIDGE
</Link>
<a
target="_blank"
href={swapLink}
className="navbar-item"
rel="noreferrer"
>
SWAP
</a>
<a
target="_blank"
href={poolLink}
className="navbar-item"
rel="noreferrer"
>
POOL
</a>
</div>
</div>

<div className="navbar-placeholder-end" />
</nav>
);
}
Expand Down
24 changes: 24 additions & 0 deletions web/src/logo-flame-w-text.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/src/styles/astria-colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $astria-white: #f5f5f5;
$astria-whitest: #fff;
$astria-grey-dark: #333;
$astria-grey-light: hsl(0, 0%, 60%);
$astria-grey-lighter: hsl(0, 0%, 20%);
$astria-black: hsl(203deg 45% 4%);
$astria-red: #BB3631;
$astria-orange: #df5822;
Expand Down
2 changes: 1 addition & 1 deletion web/src/styles/button-customizations.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import './astria-colors';
@import 'astria-colors';

.button.is-square {
border-radius: 0;
Expand Down
3 changes: 2 additions & 1 deletion web/src/styles/button-overrides.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import './astria-colors';
@import 'astria-colors';

$button-color: $astria-text-dark;
$button-hover-color: $astria-grey-light;
$label-color: $astria-text-light;
$control-radius: 12px; // buttons
4 changes: 2 additions & 2 deletions web/src/styles/card-customizations.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import './astria-colors';
@import './fonts';
@import 'astria-colors';
@import 'fonts';

.error-card {
background-color: $astria-error-lighter;
Expand Down
2 changes: 1 addition & 1 deletion web/src/styles/dropdown-customizations.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import './dropdown-overrides.scss';
@import 'dropdown-overrides.scss';

.dropdown {
width: 100%;
Expand Down
2 changes: 1 addition & 1 deletion web/src/styles/dropdown-overrides.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import './astria-colors';
@import 'astria-colors';

$dropdown-content-background-color: $astria-black;

Expand Down
2 changes: 1 addition & 1 deletion web/src/styles/form-customizations.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import './astria-colors';
@import 'astria-colors';

div.control > input {
color: $astria-text-light;
Expand Down
26 changes: 2 additions & 24 deletions web/src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ html, body {
}

// fonts
@import './fonts';
@import 'fonts';
// custom styles
@import 'icons';

Expand Down Expand Up @@ -35,6 +35,7 @@ html, body {
@import 'dropdown-customizations';
@import 'form-customizations';
@import 'modal-customizations';
@import 'navbar-customizations';


// body reset
Expand All @@ -44,29 +45,6 @@ body {
background-color: $astria-black;
}

// navbar customizations
.navbar {
background-color: transparent;
padding: 1rem 2rem;

.navbar-menu.is-active {
background: radial-gradient(144.23% 141.13% at 50.15% 0%, #221F1F 0%, #050A0D 100%);
box-shadow: 1px 1px 1px -1px hsla(0, 0%, 100%, 0.5) inset;
}

&.is-transparent {
.navbar-dropdown {
background: radial-gradient(144.23% 141.13% at 50.15% 0%, #221F1F 0%, #050A0D 100%);
box-shadow: 1px 1px 1px -1px hsla(0, 0%, 100%, 0.5) inset;

a.navbar-item:focus, a.navbar-item:hover {
color: $astria-text-light;
}
}
}

}

.is-fullheight-with-navbar {
// viewport height minus navbar height minus footer height minus margins
min-height: calc(100vh - 72px - 24px)
Expand Down
2 changes: 1 addition & 1 deletion web/src/styles/modal-overrides.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import './astria-colors';
@import 'astria-colors';

$modal-card-head-background-color: transparent;
$modal-card-body-background-color: transparent;
Expand Down
53 changes: 53 additions & 0 deletions web/src/styles/navbar-customizations.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@import 'astria-colors';

.navbar {
background-color: transparent;
padding: 1rem 2rem;
border-bottom: 1px solid $astria-grey-lighter;

.navbar-menu {
.navbar-middle {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
}
&.navbar-menu-dropdown.is-active {
background: none;
border: none;
box-shadow: none;
.navbar-middle {
display: block;
background: none;
.navbar-item {
&:focus-within, &:hover, &.is-active {
//background: radial-gradient(144.23% 141.13% at 50.15% 0%, #221F1F 0%, #050A0D 100%);
background: none;
box-shadow: none;
border: none;
}
}
}
}

&.is-active {
background: radial-gradient(144.23% 141.13% at 50.15% 0%, #221F1F 0%, #050A0D 100%);
box-shadow: 1px 1px 1px -1px hsla(0, 0%, 100%, 0.5) inset;
}
}

&.is-transparent {
.navbar-dropdown {
background: radial-gradient(144.23% 141.13% at 50.15% 0%, #221F1F 0%, #050A0D 100%);
box-shadow: 1px 1px 1px -1px hsla(0, 0%, 100%, 0.5) inset;

a.navbar-item:focus, a.navbar-item:hover {
color: $astria-text-light;
}
}
}

.navbar-placeholder-end {
width: 185px;
}
}

0 comments on commit d203cf6

Please sign in to comment.