Skip to content

Commit

Permalink
style(frontend): apply new styling rules
Browse files Browse the repository at this point in the history
  • Loading branch information
BrycensRanch committed Dec 2, 2024
1 parent 631fe95 commit f8cc896
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 46 deletions.
4 changes: 2 additions & 2 deletions frontend/append.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { existsSync, appendFileSync } = require('node:fs');
const { join } = require('node:path');
const path = require('node:path');

const standAloneNextServerPath = join(__dirname, '.next', 'standalone', 'server.js');
const standAloneNextServerPath = path.join(__dirname, '.next', 'standalone', 'server.js');
const standAloneNextServerExists = existsSync(standAloneNextServerPath);

// I used the javascript to modify the javascript
Expand Down
2 changes: 1 addition & 1 deletion frontend/cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// eslint-disable-next-line import/no-extraneous-dependencies
// eslint-disable-next-line unicorn/no-anonymous-default-export
const useBabelRC = require('@cypress/code-coverage/use-babelrc');

module.exports = (on, config) => {
Expand Down
1 change: 0 additions & 1 deletion frontend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

const { createServer } = require('node:http');
const { parse } = require('node:url');
const { join } = require('node:path');
const next = require('next');

const development = process.env.NODE_ENV !== 'production';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Medal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const Modal = (properties: IMedalProperties) => {
onClick={() => setShowModal(false)}
data-testid="medal-button2"
>
<span className="block h-6 w-6 bg-transparent text-2xl text-black opacity-5 outline-none focus:outline-none">
<span className="block size-6 bg-transparent text-2xl text-black opacity-5 outline-none focus:outline-none">
×
</span>
</button>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const Navbar = () => {
>
<svg
xmlns="http://www.w3.org/2000/svg"
className="h-6 w-6"
className="size-6"
aria-hidden="true"
fill="none"
viewBox="0 0 24 24"
Expand All @@ -95,7 +95,7 @@ const Navbar = () => {
>
<span className="sr-only">Open user menu</span>
<img
className="h-8 w-8 rounded-full"
className="size-8 rounded-full"
src="https://avatars.githubusercontent.com/u/66782301?s=96&v=4"
alt=""
/>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/dashboard/CardFour.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
const CardFour = () => {
return (
<div className="rounded-sm border border-stroke bg-white px-7.5 py-6 shadow-default dark:border-strokedark dark:bg-boxdark">
<div className="flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4">
<div className="flex size-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4">
<svg
className="fill-primary dark:fill-white"
width="22"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/dashboard/CardOne.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
const CardOne = () => {
return (
<div className="rounded-sm border border-stroke bg-white px-7.5 py-6 shadow-default dark:border-strokedark dark:bg-boxdark">
<div className="flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4">
<div className="flex size-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4">
<svg
className="fill-primary dark:fill-white"
width="22"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/dashboard/CardThree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
const CardThree = () => {
return (
<div className="rounded-sm border border-stroke bg-white px-7.5 py-6 shadow-default dark:border-strokedark dark:bg-boxdark">
<div className="flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4">
<div className="flex size-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4">
<svg
className="fill-primary dark:fill-white"
width="22"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/dashboard/CardTwo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
const CardTwo = () => {
return (
<div className="rounded-sm border border-stroke bg-white px-7.5 py-6 shadow-default dark:border-strokedark dark:bg-boxdark">
<div className="flex h-11.5 w-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4">
<div className="flex size-11.5 items-center justify-center rounded-full bg-meta-2 dark:bg-meta-4">
<svg
className="fill-primary dark:fill-white"
width="20"
Expand Down
28 changes: 14 additions & 14 deletions frontend/src/components/dashboard/ChatCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ const ChatCard = () => {

<div>
<a href="messages.html" className="flex items-center gap-5 px-7.5 py-3 hover:bg-gray-3 dark:hover:bg-meta-4">
<div className="relative h-14 w-14 rounded-full">
<div className="relative size-14 rounded-full">
<Image src="/assets/images/user/user-01.png" alt="User" />
<span className="absolute bottom-0 right-0 h-3.5 w-3.5 rounded-full border-2 border-white bg-meta-3"></span>
<span className="absolute bottom-0 right-0 size-3.5 rounded-full border-2 border-white bg-meta-3"></span>
</div>

<div className="flex flex-1 items-center justify-between">
Expand All @@ -21,15 +21,15 @@ const ChatCard = () => {
<span className="text-xs"> . 12 min</span>
</p>
</div>
<div className="flex h-6 w-6 items-center justify-center rounded-full bg-primary">
<div className="flex size-6 items-center justify-center rounded-full bg-primary">
<span className="text-sm font-medium text-white">3</span>
</div>
</div>
</a>
<a href="messages.html" className="flex items-center gap-5 px-7.5 py-3 hover:bg-gray-3 dark:hover:bg-meta-4">
<div className="relative h-14 w-14 rounded-full">
<div className="relative size-14 rounded-full">
<Image src="/assets/images/user/user-04.png" alt="User" />
<span className="absolute bottom-0 right-0 h-3.5 w-3.5 rounded-full border-2 border-white bg-meta-3"></span>
<span className="absolute bottom-0 right-0 size-3.5 rounded-full border-2 border-white bg-meta-3"></span>
</div>

<div className="flex flex-1 items-center justify-between">
Expand All @@ -43,9 +43,9 @@ const ChatCard = () => {
</div>
</a>
<a href="messages.html" className="flex items-center gap-5 px-7.5 py-3 hover:bg-gray-3 dark:hover:bg-meta-4">
<div className="relative h-14 w-14 rounded-full">
<div className="relative size-14 rounded-full">
<Image src="/assets/images/user/user-05.png" alt="User" />
<span className="absolute bottom-0 right-0 h-3.5 w-3.5 rounded-full border-2 border-white bg-meta-6"></span>
<span className="absolute bottom-0 right-0 size-3.5 rounded-full border-2 border-white bg-meta-6"></span>
</div>

<div className="flex flex-1 items-center justify-between">
Expand All @@ -59,9 +59,9 @@ const ChatCard = () => {
</div>
</a>
<a href="messages.html" className="flex items-center gap-5 px-7.5 py-3 hover:bg-gray-3 dark:hover:bg-meta-4">
<div className="relative h-14 w-14 rounded-full">
<div className="relative size-14 rounded-full">
<Image src="/assets/images/user/user-01.png" alt="User" />
<span className="absolute bottom-0 right-0 h-3.5 w-3.5 rounded-full border-2 border-white bg-meta-3"></span>
<span className="absolute bottom-0 right-0 size-3.5 rounded-full border-2 border-white bg-meta-3"></span>
</div>

<div className="flex flex-1 items-center justify-between">
Expand All @@ -72,15 +72,15 @@ const ChatCard = () => {
<span className="text-xs"> . Sun</span>
</p>
</div>
<div className="flex h-6 w-6 items-center justify-center rounded-full bg-primary">
<div className="flex size-6 items-center justify-center rounded-full bg-primary">
<span className="text-sm font-medium text-white">2</span>
</div>
</div>
</a>
<a href="messages.html" className="flex items-center gap-5 px-7.5 py-3 hover:bg-gray-3 dark:hover:bg-meta-4">
<div className="relative h-14 w-14 rounded-full">
<div className="relative size-14 rounded-full">
<Image src="/assets/images/user/user-02.png" alt="User" />
<span className="absolute bottom-0 right-0 h-3.5 w-3.5 rounded-full border-2 border-white bg-meta-7"></span>
<span className="absolute bottom-0 right-0 size-3.5 rounded-full border-2 border-white bg-meta-7"></span>
</div>

<div className="flex flex-1 items-center justify-between">
Expand All @@ -94,9 +94,9 @@ const ChatCard = () => {
</div>
</a>
<a href="messages.html" className="flex items-center gap-5 px-7.5 py-3 hover:bg-gray-3 dark:hover:bg-meta-4">
<div className="relative h-14 w-14 rounded-full">
<div className="relative size-14 rounded-full">
<Image src="/assets/images/user/user-05.png" alt="User" />
<span className="absolute bottom-0 right-0 h-3.5 w-3.5 rounded-full border-2 border-white bg-meta-6"></span>
<span className="absolute bottom-0 right-0 size-3.5 rounded-full border-2 border-white bg-meta-6"></span>
</div>

<div className="flex flex-1 items-center justify-between">
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/dashboard/CheckboxFive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ const CheckboxFive = () => {
}}
/>
<div
className={`box mr-4 flex h-5 w-5 items-center justify-center rounded-full border border-primary ${
className={`box mr-4 flex size-5 items-center justify-center rounded-full border border-primary ${
isChecked && '!border-4'
}`}
>
<span className="h-2.5 w-2.5 rounded-full bg-white dark:bg-transparent"></span>
<span className="size-2.5 rounded-full bg-white dark:bg-transparent"></span>
</div>
</div>
Checkbox Text
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/dashboard/CheckboxFour.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ const CheckboxFour = () => {
}}
/>
<div
className={`mr-4 flex h-5 w-5 items-center justify-center rounded-full border ${
className={`mr-4 flex size-5 items-center justify-center rounded-full border ${
isChecked && 'border-primary'
}`}
>
<span className={`h-2.5 w-2.5 rounded-full bg-transparent ${isChecked && '!bg-primary'}`}> </span>
<span className={`size-2.5 rounded-full bg-transparent ${isChecked && '!bg-primary'}`}> </span>
</div>
</div>
Checkbox Text
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/dashboard/CheckboxOne.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ const CheckboxOne = () => {
}}
/>
<div
className={`mr-4 flex h-5 w-5 items-center justify-center rounded border ${
className={`mr-4 flex size-5 items-center justify-center rounded border ${
isChecked && 'bg-gray border-primary dark:bg-transparent'
}`}
>
<span className={`h-2.5 w-2.5 rounded-sm ${isChecked && 'bg-primary'}`}></span>
<span className={`size-2.5 rounded-sm ${isChecked && 'bg-primary'}`}></span>
</div>
</div>
Checkbox Text
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/dashboard/CheckboxThree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ const CheckboxThree = () => {
}}
/>
<div
className={`box mr-4 flex h-5 w-5 items-center justify-center rounded border ${
className={`box mr-4 flex size-5 items-center justify-center rounded border ${
isChecked && 'bg-gray border-primary dark:bg-transparent'
}`}
>
<span className={`text-primary opacity-0 ${isChecked && '!opacity-100'}`}>
<svg
className="h-3.5 w-3.5 stroke-current"
className="size-3.5 stroke-current"
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/dashboard/CheckboxTwo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CheckboxTwo = () => {
}}
/>
<div
className={`mr-4 flex h-5 w-5 items-center justify-center rounded border ${
className={`mr-4 flex size-5 items-center justify-center rounded border ${
isChecked && 'bg-gray border-primary dark:bg-transparent'
}`}
>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/dashboard/DarkModeSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const DarkModeSwitcher = () => {
<input
type="checkbox"
onChange={() => setColorMode(colorMode === 'light' ? 'dark' : 'light')}
className="dur absolute top-0 z-50 m-0 h-full w-full cursor-pointer opacity-0"
className="dur absolute top-0 z-50 m-0 size-full cursor-pointer opacity-0"
/>
<span
className={`absolute left-[3px] top-1/2 flex h-6 w-6 -translate-y-1/2 translate-x-0 items-center justify-center rounded-full bg-white shadow-switcher duration-75 ease-linear ${
className={`absolute left-[3px] top-1/2 flex size-6 -translate-y-1/2 translate-x-0 items-center justify-center rounded-full bg-white shadow-switcher duration-75 ease-linear ${
colorMode === 'dark' && '!right-[3px] !translate-x-full'
}`}
>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/dashboard/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const Header = (properties: any) => {
}}
className="z-99999 block rounded-sm border border-stroke bg-white p-1.5 shadow-sm dark:border-strokedark dark:bg-boxdark lg:hidden"
>
<span className="relative block h-5.5 w-5.5 cursor-pointer">
<span className="du-block absolute right-0 h-full w-full">
<span className="relative block size-5.5 cursor-pointer">
<span className="du-block absolute right-0 size-full">
<span
className={`relative left-0 top-0 my-1 block h-0.5 w-0 rounded-sm bg-black delay-[0] duration-200 ease-in-out dark:bg-white ${
!properties.sidebarOpen && '!w-full delay-300'
Expand All @@ -42,7 +42,7 @@ const Header = (properties: any) => {
}`}
></span>
</span>
<span className="absolute right-0 h-full w-full rotate-45">
<span className="absolute right-0 size-full rotate-45">
<span
className={`absolute left-2.5 top-0 block h-full w-0.5 rounded-sm bg-black delay-300 duration-200 ease-in-out dark:bg-white ${
!properties.sidebarOpen && '!h-0 !delay-[0]'
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/dashboard/SwitcherFour.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SwitcherFour = () => {
/>
<div className="block h-8 w-14 rounded-full bg-black"></div>
<div
className={`absolute left-1 top-1 flex h-6 w-6 items-center justify-center rounded-full bg-white transition ${
className={`absolute left-1 top-1 flex size-6 items-center justify-center rounded-full bg-white transition ${
enabled && '!right-1 !translate-x-full'
}`}
></div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/dashboard/SwitcherOne.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SwitcherOne = () => {
/>
<div className="block h-8 w-14 rounded-full bg-meta-9 dark:bg-[#5A616B]"></div>
<div
className={`absolute left-1 top-1 h-6 w-6 rounded-full bg-white transition ${
className={`absolute left-1 top-1 size-6 rounded-full bg-white transition ${
enabled && '!right-1 !translate-x-full !bg-primary dark:!bg-white'
}`}
></div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/dashboard/SwitcherThree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SwitcherThree = () => {
/>
<div className="block h-8 w-14 rounded-full bg-meta-9 dark:bg-[#5A616B]"></div>
<div
className={`dot absolute left-1 top-1 flex h-6 w-6 items-center justify-center rounded-full bg-white transition ${
className={`dot absolute left-1 top-1 flex size-6 items-center justify-center rounded-full bg-white transition ${
enabled && '!right-1 !translate-x-full !bg-primary dark:!bg-white'
}`}
>
Expand All @@ -40,7 +40,7 @@ const SwitcherThree = () => {
</span>
<span className={`${enabled && 'hidden'}`}>
<svg
className="h-4 w-4 stroke-current"
className="size-4 stroke-current"
fill="none"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/dashboard/SwitcherTwo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SwitcherTwo = () => {
/>
<div className="h-5 w-14 rounded-full bg-meta-9 shadow-inner dark:bg-[#5A616B]"></div>
<div
className={`dot absolute -top-1 left-0 h-7 w-7 rounded-full bg-white shadow-switch-1 transition ${
className={`dot absolute -top-1 left-0 size-7 rounded-full bg-white shadow-switch-1 transition ${
enabled && '!right-0 !translate-x-full !bg-primary dark:!bg-white'
}`}
></div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages.disabled/dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const RootDashboard = () => {
id="preloader"
className="fixed left-0 top-0 z-999999 flex h-screen w-screen items-center justify-center bg-white dark:bg-gray-900"
>
<div className="h-16 w-16 animate-spin rounded-full border-4 border-solid border-primary border-t-transparent"></div>
<div className="size-16 animate-spin rounded-full border-4 border-solid border-primary border-t-transparent"></div>
</div>
) : (
<DefaultLayout>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Index = () => {
Get started
<svg
aria-hidden="true"
className="-mr-1 ml-2 h-5 w-5"
className="-mr-1 ml-2 size-5"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
Expand Down

0 comments on commit f8cc896

Please sign in to comment.