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

Edge functions and TailwindCSS (#1) #7

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
23 changes: 23 additions & 0 deletions app/components/LoadingDots.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import styles from "./../loading-dots.module.css";

const LoadingDots = ({
color = "#000",
style = "small",
}: {
color: string;
style: string;
}) => {
return (
<span className={style == "small" ? styles.loading2 : styles.loading}>
<span style={{ backgroundColor: color }} />
<span style={{ backgroundColor: color }} />
<span style={{ backgroundColor: color }} />
</span>
);
};

export default LoadingDots;

LoadingDots.defaultProps = {
style: "small",
};
278 changes: 126 additions & 152 deletions app/globals.css
Original file line number Diff line number Diff line change
@@ -1,172 +1,146 @@
@import url("https://fonts.googleapis.com/css?family=Roboto+Mono:400,500");
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@800;900&display=swap');

:root {
background-color: #230041;
--max-width: 1100px;
--border-radius: 12px;

--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;

--primary-glow: conic-gradient(
from 180deg at 50% 50%,
#16abff33 0deg,
#0885ff33 55deg,
#54d6ff33 120deg,
#0071ff33 160deg,
transparent 360deg
);
--secondary-glow: radial-gradient(
rgba(255, 255, 255, 1),
rgba(255, 255, 255, 0)
);

--tile-start-rgb: 239, 245, 249;
--tile-end-rgb: 228, 232, 233;
--tile-border: conic-gradient(
#00000080,
#00000040,
#00000030,
#00000020,
#00000010,
#00000010,
#00000080
);

--callout-rgb: 238, 240, 241;
--callout-border-rgb: 172, 175, 176;
--card-rgb: 180, 185, 188;
--card-border-rgb: 131, 134, 135;
}

li {
color: white
}


* {
box-sizing: border-box;
padding: 0;
margin: 0;
font-family: "Roboto Mono", Helvetica, sans-serif;

}

p {
color: white;
}

html,
body {
max-width: 100vw;
overflow-x: hidden;
height: 100%;
margin: 0;
}

.wrapper {
min-height: calc(100% - 70px);

/* Equal to height of footer */
/* But also accounting for potential margin-bottom of last child */
margin-bottom: -50px;
}

.footer{
height: 50px;
display: flex;
justify-content: center;
align-items: center;
background-color: #c683ff;
margin-top: 70px;
}
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
:root {
background-color: #230041;
--max-width: 1100px;
--border-radius: 12px;

--foreground-rgb: 0, 0, 0;
--background-start-rgb: 214, 219, 220;
--background-end-rgb: 255, 255, 255;

--primary-glow: conic-gradient(
from 180deg at 50% 50%,
#16abff33 0deg,
#0885ff33 55deg,
#54d6ff33 120deg,
#0071ff33 160deg,
transparent 360deg
);
--secondary-glow: radial-gradient(
rgba(255, 255, 255, 1),
rgba(255, 255, 255, 0)
);

--tile-start-rgb: 239, 245, 249;
--tile-end-rgb: 228, 232, 233;
--tile-border: conic-gradient(
#00000080,
#00000040,
#00000030,
#00000020,
#00000010,
#00000010,
#00000080
);

--callout-rgb: 238, 240, 241;
--callout-border-rgb: 172, 175, 176;
--card-rgb: 180, 185, 188;
--card-border-rgb: 131, 134, 135;
}

.footer p {
color: #551a8b;
margin: 0;
text-align: center;
margin-left: 10px;
}
* {
@apply box-border p-0 m-0;
}

.footer a {
color: #551a8b;
}
li {
@apply text-white;
}

body {
color: rgb(var(--foreground-rgb));
}
p {
@apply text-white;
}

a {
text-decoration: none;
color: #c683ff;
}
html,
body {
@apply max-w-[100vw] overflow-x-hidden h-full m-0;
}

a p {
color: #c683ff;
body {
color: rgb(var(--foreground-rgb));
}

a {
@apply no-underline text-[#c683ff];
}

a p {
@apply text-[#c683ff];
}

input {
@apply text-black;
}
}

input {
color: black;
}
@layer components {
.wrapper {
min-height: calc(100% - 70px);

/* Equal to height of footer */
/* But also accounting for potential margin-bottom of last child */
@apply -mb-[50px];
}

.footer {
@apply h-[50px] flex justify-center items-center bg-[#c683ff] mt-[70px];
}

.footer p {
@apply text-[#551a8b] m-0 text-center ml-[10px];
}

.footer a {
@apply text-[#551a8b];
}

.input-button {
margin-top: 5px;
border: none;
outline: none;
padding: 14px 25px;
cursor: pointer;
background-color: #c683ff;
color: #230041;
font-weight: bold;
border-radius: 50px;
transition: all .35s;
font-size: 18px;
}
.input-button {
@apply mt-[5px] border-0 px-[25px] py-[14px] text-[#230041] bg-[#c683ff] cursor-pointer font-bold rounded-[50px] transition-all duration-[.35s] text-[18px];
outline: none;
}

.app-container {
padding: 20px;
min-height: 100%;
}
.app-container {
@apply p-5 min-h-full;
}

.form-container {
width: 500px;
}
.form-container {
@apply w-[500px];
}

.results-container {
width: 800px;
padding-top: 55px;
margin:0 auto;
}
.results-container {
@apply w-[800px] pt-[55px];
margin: 0 auto;
}

.input-button:hover {
background-color: #a955f1;
}
.input-button:hover {
@apply bg-[#a955f1];
}

@media screen and (max-width: 500px) {
.form-container {
width: 100%;
@media screen and (max-width: 500px) {
.form-container {
@apply w-full;
}
}
}

@media screen and (max-width: 600px) {
.sponsor {
display: none;
@media screen and (max-width: 600px) {
.sponsor {
@apply hidden;
}
}
}

@media screen and (max-width: 900px) {
.results-container {
width: 100%;
padding-left: 15px;
padding-right: 15px;
padding-top: 30px;
@media screen and (max-width: 900px) {
.results-container {
@apply w-full px-[15px] pt-[30px];
}
}
}

@media screen and (max-width: 450px) {
.hero-header {
line-height: 70px;
@media screen and (max-width: 450px) {
.hero-header {
@apply leading-[70px];
}
}
}
}
9 changes: 7 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { Roboto_Mono, Poppins } from '@next/font/google'
import './globals.css'
import { AnalyticsWrapper } from './components/analytics';
import { AnalyticsWrapper } from '@components/analytics';
import Image from 'next/image'

const RobotoMono = Roboto_Mono({
subsets: ['latin']
})

export default function RootLayout({
children,
}: {
Expand All @@ -14,7 +19,7 @@ export default function RootLayout({
head.tsx. Find out more at https://beta.nextjs.org/docs/api-reference/file-conventions/head
*/}
<head />
<body>
<body className={RobotoMono.className}>
<div className="wrapper">
{children}
<AnalyticsWrapper />
Expand Down
Loading