From c45b33b43a4f8927c739f7bceb2e9054e2b1111d Mon Sep 17 00:00:00 2001 From: Amos Date: Wed, 1 May 2024 14:05:53 +0200 Subject: [PATCH] ui: css updates - colors.css --- app/blog/page.tsx | 18 +++++++++++++++--- app/layout.tsx | 1 + components/Header.tsx | 6 +++--- components/Image.tsx | 5 +---- components/Tag.tsx | 2 +- css/colors.css | 41 +++++++++++++++++++++++++++++++++++++++++ css/tailwind.css | 18 +++++++++++++++++- 7 files changed, 79 insertions(+), 12 deletions(-) create mode 100644 css/colors.css diff --git a/app/blog/page.tsx b/app/blog/page.tsx index 35186c5..12199b1 100644 --- a/app/blog/page.tsx +++ b/app/blog/page.tsx @@ -40,7 +40,7 @@ export default function BlogPage() { direction *= -1 parallaxTexts.push( - + {sortedTags.slice(left, right).map((tag, j) => ( ))} @@ -59,9 +59,21 @@ export default function BlogPage() { return (
+
+
+ + ABCDEFGHIJKLMNOPQRSTUVWXYZ + +
+
+
+
+
+
+
{createParallaxTexts()}
diff --git a/app/layout.tsx b/app/layout.tsx index 746264e..17856f1 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,5 +1,6 @@ import 'css/tailwind.css' import 'css/fonts.css' +import 'css/colors.css' import 'pliny/search/algolia.css' import { Pangolin, ZCOOL_KuaiLe, Orbitron } from 'next/font/google' diff --git a/components/Header.tsx b/components/Header.tsx index 9539f59..7cad968 100644 --- a/components/Header.tsx +++ b/components/Header.tsx @@ -99,9 +99,9 @@ const Header = () => { {link.title} diff --git a/components/Image.tsx b/components/Image.tsx index 6fc685e..573b086 100644 --- a/components/Image.tsx +++ b/components/Image.tsx @@ -1,10 +1,7 @@ import NextImage, { ImageProps } from 'next/image' const Image = ({ ...rest }: ImageProps) => ( - + ) export default Image diff --git a/components/Tag.tsx b/components/Tag.tsx index 06d27fd..e6d11ae 100644 --- a/components/Tag.tsx +++ b/components/Tag.tsx @@ -9,7 +9,7 @@ const Tag = ({ text, className }: Props) => { return ( {text.split(' ').join('-')} diff --git a/css/colors.css b/css/colors.css new file mode 100644 index 0000000..bcd7973 --- /dev/null +++ b/css/colors.css @@ -0,0 +1,41 @@ +.bg-light-blue-pink { + background: rgb(238,174,202); + background: linear-gradient(280deg, rgba(238,174,202,0.1) 0%, rgba(199,180,215,0.3) 40%, rgba(148,187,233,0.1) 100%); +} + +.bg-light-blue-pink:is(.dark *) { + background: rgb(238,174,202); + background: linear-gradient(280deg, rgba(238,174,202,1) 0%, rgba(185,185,225,1) 40%, rgba(148,187,233,1) 100%); +} + +.bg-light-pink-blue { + background: rgb(238,174,202); + background: linear-gradient(100deg, rgba(238,174,202,0.1) 0%, rgba(199,180,215,0.3) 40%, rgba(148,192,233,0.1) 100%); +} + +.bg-light-pink-blue:is(.dark *) { + background: rgb(238,174,202); + background: linear-gradient(100deg, rgba(238,174,202,1) 0%, rgba(185,185,225,1) 40%, rgba(148,192,233,1) 100%); +} + + + + +/* Animation */ +.bg-pink-blue-animated { + background: linear-gradient(90deg, rgba(238,174,202,.3), rgba(148, 192, 233, .3)); + background-size: 400% 400%; + animation: bg-pink-blue-animated 6s ease infinite; +} + +.bg-pink-blue-animated:is(.dark *){ + background: linear-gradient(90deg, rgba(238,174,202,1), rgba(148, 192, 233, 1)); + background-size: 400% 400%; + animation: bg-pink-blue-animated 6s ease infinite; +} + +@keyframes bg-pink-blue-animated { + 0%{background-position:0% 50%} + 50%{background-position:100% 50%} + 100%{background-position:0% 50%} +} \ No newline at end of file diff --git a/css/tailwind.css b/css/tailwind.css index be53d22..3838d5f 100644 --- a/css/tailwind.css +++ b/css/tailwind.css @@ -50,6 +50,22 @@ input:-webkit-autofill:focus { vertical-align: middle; } -body { +body, header { @apply transition-colors duration-1000; } + +.card { + @apply rounded-md shadow-lg; +} + +.card:is(.dark *) { + @apply shadow-gray-800; +} + +.text-primary { + @apply text-primary-300; +} + +.text-primary:is(.dark *) { + @apply text-primary-100; +} \ No newline at end of file