Skip to content

Commit

Permalink
feat: redesign 'schedule' page; refactor tailwind theme; remove headl…
Browse files Browse the repository at this point in the history
…essui
  • Loading branch information
ArtemSBulgakov committed Oct 30, 2024
1 parent 94d3948 commit 807896a
Show file tree
Hide file tree
Showing 41 changed files with 236 additions and 648 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@fullcalendar/moment": "^6.1.15",
"@fullcalendar/react": "^6.1.15",
"@fullcalendar/timegrid": "^6.1.15",
"@headlessui/react": "^2.1.8",
"@iconify/json": "^2.2.248",
"@iconify/tailwind": "^1.1.3",
"@mdx-js/mdx": "^3.0.1",
Expand Down
114 changes: 0 additions & 114 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/app/routes/_with_menu/schedule/$category.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Topbar } from "@/components/layout/Topbar.tsx";
import ScheduleList from "@/components/schedule/ScheduleList.tsx";
import SchedulePage from "@/components/schedule/SchedulePage.tsx";
import { getCategoryInfoBySlug } from "@/lib/events/events-view-config.ts";
import { createFileRoute, redirect } from "@tanstack/react-router";
import { Helmet } from "react-helmet-async";
Expand All @@ -20,8 +20,8 @@ export const Route = createFileRoute("/_with_menu/schedule/$category")({
<meta name="description" content={categoryInfo.shortDescription} />
</Helmet>

<Topbar title={`Schedule${categoryInfo.title}`} />
<ScheduleList category={category} />
<Topbar title="Schedule" />
<SchedulePage category={category} />
</>
);
},
Expand Down
5 changes: 3 additions & 2 deletions src/app/routes/_with_menu/schedule/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Topbar } from "@/components/layout/Topbar.tsx";
import { ScheduleMainPage } from "@/components/schedule/ScheduleMainPage.tsx";
import SchedulePage from "@/components/schedule/SchedulePage.tsx";
import { createFileRoute } from "@tanstack/react-router";
import { Helmet } from "react-helmet-async";

Expand All @@ -16,8 +16,9 @@ export const Route = createFileRoute("/_with_menu/schedule/")({
}
/>
</Helmet>

<Topbar title="Schedule" />
<ScheduleMainPage />
<SchedulePage category={null} />
</>
),
});
10 changes: 3 additions & 7 deletions src/app/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ import { createFileRoute, redirect } from "@tanstack/react-router";
export const Route = createFileRoute("/")({
component: () => null,

// Check state
beforeLoad: ({ context }) => {
if (context.isAuthenticated) {
throw redirect({ to: "/dashboard" });
} else {
throw redirect({ to: "/schedule" });
}
// Redirect to Dashboard
beforeLoad: () => {
throw redirect({ to: "/dashboard" });
},
});
23 changes: 7 additions & 16 deletions src/app/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
:root {
@apply bg-base;
color-scheme: light;
accent-color: var(--color-focus);
accent-color: var(--color-brand-violet);

--color-brand-violet: 151 71 255; /* #9747FF */
--color-brand-gradient-start: 154 46 255; /* #9A2EFF */
--color-brand-gradient-end: 209 35 162; /* #D1233E */

--color-base: 255 255 255; /* #FFFFFF */
--color-primary: 235 237 239; /* #EBEDEF */
--color-primary-hover: 223 225 229; /* #DFE1E5 */
Expand All @@ -19,16 +24,11 @@
--color-secondary-hover: 210 212 216; /* #D2D4D8 */
--color-border: 211 211 211; /* #D3D3D3 */
--color-border-hover: 182 182 182;
--color-disabled: 192 192 192; /* #C0C0C0 */
--color-inactive: 138 138 138; /* #8A8A8A */
--color-icon: 0 0 0; /* #00000080 */
--color-icon-hover: 0 0 0; /* #000000BF */
--color-text: 0 0 0; /* #000000 */
--color-text-secondary: 0 0 0; /* #000000BF */
--color-text-transparent: 0 0 0; /* #00000080 */
--color-section-g-start: 154 46 255; /* #9A2EFF */
--color-section-g-end: 209 35 162; /* #D1233E */
--color-focus: 151 71 255; /* #9747FF */
}
:root[class~="dark"] {
color-scheme: dark;
Expand All @@ -41,29 +41,20 @@
--color-secondary-hover: 55 55 55; /* #373737 */
--color-border: 44 44 44; /* #2C2C2C */
--color-border-hover: 60 60 60;
--color-disabled: 43 43 43; /* #2B2B2B */
--color-inactive: 105 105 105; /* #696969 */
--color-icon: 255 255 255; /* #FFFFFF7F */
--color-icon-hover: 255 255 255; /* #FFFFFFBF */
--color-text: 255 255 255; /* #FFFFFF */
--color-text-secondary: 255 255 255; /* #FFFFFFBF */
--color-text-transparent: 255 255 255; /* #FFFFFF7F */
--color-section-g-start: 154 46 255; /* #9A2EFF */
--color-section-g-end: 209 35 162; /* #D1233E */
--color-focus: 151 71 255; /* #9747FF */
}
}

@layer components {
.selected {
@apply bg-gradient-to-r from-section_g_start to-section_g_end bg-clip-text text-transparent;
@apply bg-gradient-to-r from-brand-gradient-start to-brand-gradient-end bg-clip-text text-transparent;
}
}

body {
overflow-y: scroll;
}

.rubles-input {
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='48px' width='192px'><text x='164' y='27' fill='gray' font-size='18px' font-family='sans-serif'>₽</text></svg>");
background-repeat: no-repeat;
Expand Down
2 changes: 1 addition & 1 deletion src/components/account/ConnectTelegramPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function ConnectTelegramPage() {
</div>
<div className="flex items-center justify-center">
<button
className="border-focus_color flex h-14 w-fit items-center justify-center gap-4 rounded-2xl border-2 bg-base px-6 py-2 text-xl font-medium hover:bg-primary-hover"
className="flex h-14 w-fit items-center justify-center gap-4 rounded-2xl border-2 border-brand-violet bg-base px-6 py-2 text-xl font-medium hover:bg-primary-hover"
onClick={() => {
const searchParams = new URLSearchParams(searchStr);
const bot = searchParams.get("bot");
Expand Down
4 changes: 2 additions & 2 deletions src/components/calendar/styles-calendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
--fc-page-bg-color: theme("colors.base");
--fc-border-color: theme("colors.inactive/0.5");
--fc-list-event-hover-bg-color: theme("colors.primary.hover");
--fc-event-bg-color: theme("colors.section_g_end");
--fc-event-border-color: theme("colors.focus");
--fc-event-bg-color: theme("colors.brand.violet");
--fc-event-border-color: theme("colors.brand.violet");
--fc-button-bg-color: theme("colors.primary.main");
--fc-button-hover-bg-color: theme("colors.primary.hover");
--fc-button-active-bg-color: theme("colors.primary.hover");
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/SignInButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const SignInButton = forwardRef(function SignInButton_(
ref={ref}
rel="nofollow noindex"
className={clsx(
"flex h-14 w-fit items-center justify-center gap-4 rounded-2xl border-2 border-focus bg-base px-6 py-2 text-xl font-medium hover:bg-primary-hover",
"flex h-14 w-fit items-center justify-center gap-4 rounded-2xl border-2 border-brand-violet bg-base px-6 py-2 text-xl font-medium hover:bg-primary-hover",
className,
)}
onClick={(e) => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/dashboard/DashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ export function DashboardPage() {
className="group flex flex-row gap-4 rounded-2xl bg-primary-main px-4 py-6 hover:bg-secondary-main"
>
<div className="w-12">
<span className="icon-[ic--baseline-telegram] text-5xl text-[#9747FF]" />
<span className="icon-[ic--baseline-telegram] text-5xl text-brand-violet" />
</div>
<div className="flex flex-col gap-2">
<p className="text-2xl font-semibold text-text-main">
Telegram channel
</p>
<p className="text-lg text-text-secondary/75">
Join <span className="text-[#9747FF]">one-zero-eight</span>{" "}
Join <span className="text-brand-violet">one-zero-eight</span>{" "}
channel in Telegram for all important information about
InNoHassle.
</p>
Expand Down Expand Up @@ -109,7 +109,7 @@ export function DashboardPage() {
name={
<span className="flex items-center">
Moodle
<span className="ml-2 rounded-full bg-focus px-2 py-1 text-xs font-semibold text-white">
<span className="ml-2 rounded-full bg-brand-violet px-2 py-1 text-xs font-semibold text-white">
NEW
</span>
</span>
Expand Down
6 changes: 3 additions & 3 deletions src/components/dorms/DormsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function DormsPage() {
<div className="flex flex-col gap-4">
<div className="group flex flex-row gap-4 rounded-2xl bg-primary-main px-4 py-6">
<div className="w-12">
<span className="icon-[material-symbols--quick-reference-outline-rounded] text-5xl text-[#9747FF]" />
<span className="icon-[material-symbols--quick-reference-outline-rounded] text-5xl text-brand-violet" />
</div>
<div className="flex flex-col gap-2">
<p className="flex items-center text-2xl font-semibold text-text-main">
Expand Down Expand Up @@ -44,7 +44,7 @@ export function DormsPage() {
className="group flex flex-row gap-4 rounded-2xl bg-primary-main px-4 py-6 hover:bg-secondary-main"
>
<div className="w-12">
<span className="icon-[mdi--robot-excited-outline] text-5xl text-[#9747FF]" />
<span className="icon-[mdi--robot-excited-outline] text-5xl text-brand-violet" />
</div>
<div className="flex flex-col gap-2">
<p className="flex items-center text-2xl font-semibold text-text-main">
Expand All @@ -62,7 +62,7 @@ export function DormsPage() {
className="group flex flex-row gap-4 rounded-2xl bg-primary-main px-4 py-6 hover:bg-secondary-main"
>
<div className="w-12">
<span className="icon-[ic--baseline-telegram] text-5xl text-[#9747FF]" />
<span className="icon-[ic--baseline-telegram] text-5xl text-brand-violet" />
</div>
<div className="flex flex-col gap-2">
<p className="flex items-center text-2xl font-semibold text-text-main">
Expand Down
Loading

0 comments on commit 807896a

Please sign in to comment.