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

feat/css-optimization #158

Merged
merged 1 commit into from
Nov 1, 2024
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
1 change: 1 addition & 0 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react';
import { Routes, Route, Navigate, useNavigate } from 'react-router-dom';
import './globals.css';
import Header from './components/header/Header';
import Dashboard from 'pages/spotnet/dashboard/Dashboard';
import Footer from 'components/Footer/Footer';
Expand Down
50 changes: 8 additions & 42 deletions frontend/src/components/Footer/footer.css
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
@import url("https://fonts.googleapis.com/css2?family=Rethink+Sans:ital,wght@0,400..800;1,400..800&display=swap");
:root {
--text-font: "Rethink Sans", sans-serif;
--primary: #fff;
--footer-bg-color: #1a1c24;
--footer-text-color: #e7ebf5;
--card-bg-color: #0b0c10;
--footer-line-color: rgba(231, 235, 245, 0.2);
}

body {
overflow-x: hidden;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

a {
text-decoration: none;
}

li {
list-style-type: none;
}

.footer-container {
padding: 24px 0;
background-color: var(--footer-bg-color);
Expand All @@ -47,9 +19,6 @@ li {
text-align: center;
color: var(--footer-text-color);
margin-top: 16px;
}

.follow-us-text {
margin-bottom: 0;
}

Expand All @@ -71,25 +40,22 @@ li {
align-items: center;
gap: 6px;
cursor: pointer;
background-color: var(--card-bg-color);
background-color: var(--primary-color);
transition: background-color 0.3s ease;
margin: 0;
font-family: var(--text-font);
font-weight: 500;
font-size: 28px;
text-align: center;
color: var(--primary);
}

.social-card:hover {
background-color: var(--footer-bg-color);
}

.social-card:active {
background-color: var(--card-bg-color);
}

.social-card {
margin: 0;
font-family: var(--text-font);
font-weight: 500;
font-size: 28px;
text-align: center;
color: var(--primary);
background-color: var(--primary-color);
}

.social-card a {
Expand Down
78 changes: 37 additions & 41 deletions frontend/src/components/Telegram/telegramLogin.css
Original file line number Diff line number Diff line change
@@ -1,61 +1,57 @@
.telegram-login {
display: flex;
align-items: center;
display: flex;
align-items: center;
}

.user-info {
background: var(--gradient);
border-radius: 8px;
height: 52px;
width: 190px;
padding: 0 10px;
display: flex;
align-items: center;
justify-content: flex-start;
gap: 10px;
background: var(--gradient);
border-radius: 8px;
height: 52px;
width: 190px;
padding: 0 10px;
display: flex;
align-items: center;
justify-content: flex-start;
gap: 10px;
}

.user-photo {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
}

.user-name {
color: var(--black);
font-size: 16px;
font-family: var(--text-font);
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: var(--black);
font-size: 16px;
font-family: var(--text-font);
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.btn-telegram {
background: var(--button-gradient);
color: var(--black);
border: none;
height: 52px;
padding: 0 20px;
border-radius: 8px;
cursor: pointer;
font-size: 20px;
font-family: var(--text-font);
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
background: var(--button-gradient);
color: var(--black);
border: none;
height: 52px;
padding: 0 20px;
border-radius: 8px;
cursor: pointer;
font-size: 20px;
font-family: var(--text-font);
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
}

.btn-telegram:hover {
background: var(--button-gradient-hover);
background: var(--button-gradient-hover);
}

.btn-telegram:active {
background: var(--button-gradient-active);
background: var(--button-gradient-active);
}

/* div.user-photo-placeholder {
add style to user placeholder
} */
140 changes: 53 additions & 87 deletions frontend/src/components/header/header.css
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
@import url("https://fonts.googleapis.com/css2?family=Rethink+Sans:ital,wght@0,400..800;1,400..800&display=swap");
:root {
--text-font: "Rethink Sans", sans-serif;
--gradient: linear-gradient(73deg, #74d6fd 1.13%, #e01dee 103.45%);
--primary: #fff;
--secondary-color: #1a1c24;
--black: #000;
--primary: #fff;
--button-gradient: linear-gradient(55deg, #74d6fd 0%, #e01dee 100%);
--button-gradient-hover: linear-gradient(55deg, #74d6fd 0%, #74d6fd 100%);
--button-gradient-active: linear-gradient(55deg, #58c4ef 0%, #58c4ef 100%);
--brand: #74d6fd;
--secondary: #e7ecf0;
}

body {
overflow-x: hidden;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

a {
text-decoration: none;
}

li {
list-style-type: none;
}

nav {
height: 80px;
display: flex;
Expand Down Expand Up @@ -62,73 +29,72 @@ nav {
}

.wallet-section {
position: absolute;
right: 10px;
display: flex;
gap: 10px;
position: absolute;
right: 10px;
display: flex;
gap: 10px;
}

.nav-items a {
position: relative;
color: var(--secondary);
font-family:var(--text-font);
font-size: 20px;
transition: color 0.3s;
position: relative;
color: var(--secondary);
font-family: var(--text-font);
font-size: 20px;
transition: color 0.3s;
}

.nav-items a:hover {
color: var(--brand);
}

.nav-items a.active-link {
color: var(--brand);
font-weight: 700;
}

.gradient-button{
border-radius: 8px;
border: none;
height: 52px;
width: 190px;
font-size: 20px;
font-family: var(--text-font);
color: var(--black);
font-weight: 700;
background: var(--button-gradient);
line-height: 100%;
}
color: var(--brand);
font-weight: 700;
}

.gradient-button {
border-radius: 8px;
border: none;
height: 52px;
width: 190px;
font-size: 20px;
font-family: var(--text-font);
color: var(--black);
font-weight: 700;
background: var(--button-gradient);
line-height: 100%;
}

.logout-button {
display: flex;
align-items: center;
justify-content: center;
width: 190px;
height: 52px;
border-radius: 8px;
border: 1px solid var(--brand);
background-color: transparent;
color: #fff;
font-family: var(--text-font, 'Rethink Sans', sans-serif);
font-size: 20px;
font-weight: 700;
line-height: 100%;
transition: all 0.3s ease;
}

.logout-button:hover {
background: var(--button-gradient, linear-gradient(55deg, #74d6fd 0%, #e01dee 100%));
border: none;
}

.logout-button:active {
background: var(--button-gradient-active, linear-gradient(55deg, #58c4ef 0%, #58c4ef 100%));
}

.logout-button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
display: flex;
align-items: center;
justify-content: center;
width: 190px;
height: 52px;
border-radius: 8px;
border: 1px solid var(--brand);
background-color: transparent;
color: var(--primary);
font-family: var(--text-font);
font-size: 20px;
font-weight: 700;
line-height: 100%;
transition: all 0.3s ease;
}

.logout-button:hover {
background: var(--button-gradient-hover);
border: none;
}

.logout-button:active {
background: var(--button-gradient-active);
}

.logout-button:disabled {
opacity: 0.6;
cursor: not-allowed;
}

.gradient-button:hover {
background: var(--button-gradient-hover);
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/spinner/Spinner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import './spinner.css';
const Spinner = ({ loading }) => {
return (
loading && (
<div className='spinner-wrapper'>
<div className='spinner-content'>
<div className='spinner-border text-light' role='status'>
<span className='visually-hidden'>Loading...</span>
<div className="spinner-wrapper">
<div className="spinner-content">
<div className="spinner-border text-light" role="status">
<span className="visually-hidden">Loading...</span>
</div>
<span className='loading-text'>Loading...</span>
<span className="loading-text">Loading...</span>
</div>
</div>
)
Expand Down
11 changes: 1 addition & 10 deletions frontend/src/components/spinner/spinner.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
@import url("https://fonts.googleapis.com/css2?family=Rethink+Sans:ital,wght@0,400..800;1,400..800&display=swap");

:root {
--text-font: "Rethink Sans", sans-serif;
--spinner-bgn: rgba(0, 0, 0, 0.5);
--spinner-content: #393939;
--text-color: #ffffff;
}

.spinner-wrapper {
position: fixed;
top: 0;
Expand Down Expand Up @@ -40,5 +31,5 @@
font-family: var(--text-font);
font-weight: 600;
font-size: 28px;
color: var(--text-color);
color: var(--primary);
}
Loading
Loading