matt HOFFNER commited on
Commit
9f52969
β€’
1 Parent(s): 8426b1e

macos inspired css

Browse files
Files changed (2) hide show
  1. app/page.module.css +41 -8
  2. app/page.tsx +1 -0
app/page.module.css CHANGED
@@ -1,15 +1,48 @@
1
-
2
-
3
  .main {
 
4
  display: flex;
5
  flex-direction: column;
6
- height: 100vh;
7
  justify-content: space-between;
8
- padding: 2rem;
9
- background-image: url('https://512pixels.net/downloads/macos-wallpapers-thumbs/10-2--thumb.png'); /* URL of the wallpaper */
10
- background-size: cover; /* Ensure it covers the entire area */
11
- background-position: center; /* Center the image in the element */
12
- background-repeat: no-repeat; /* Don't repeat the image */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  }
14
 
15
  .card span {
 
 
 
1
  .main {
2
+ padding: 2rem;
3
  display: flex;
4
  flex-direction: column;
 
5
  justify-content: space-between;
6
+ min-height: 100vh; /* Full viewport height */
7
+ position: relative; /* Needed for absolute positioning of pseudo-elements */
8
+ overflow: hidden; /* Ensures pseudo-element doesn't overflow */
9
+ }
10
+
11
+ .background {
12
+ position: absolute;
13
+ top: 0; right: 0; bottom: 0; left: 0;
14
+ background-color: #1E90FF; /* Solid color fallback */
15
+ background-image:
16
+ radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3), transparent 70%),
17
+ radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.3), transparent 70%);
18
+ background-blend-mode: screen;
19
+ background-size: cover;
20
+ background-position: center;
21
+ background-repeat: no-repeat;
22
+ z-index: -1; /* Place it behind the content */
23
+ }
24
+
25
+ .background::before {
26
+ content: '';
27
+ position: absolute;
28
+ top: -50%; right: -50%; bottom: -50%; left: -50%;
29
+ background-image: radial-gradient(closest-side, rgba(255, 255, 255, 0.2), transparent);
30
+ background-repeat: no-repeat;
31
+ background-position: 50%;
32
+ transform: rotate(45deg) scale(1.5);
33
+ backdrop-filter: blur(30px);
34
+ }
35
+
36
+ .background::after {
37
+ content: '';
38
+ position: absolute;
39
+ top: -50%; right: -50%; bottom: -50%; left: -50%;
40
+ background-image: radial-gradient(closest-side, rgba(255, 255, 255, 0.2), transparent);
41
+ background-repeat: no-repeat;
42
+ background-position: 50%;
43
+ transform: rotate(-45deg) scale(1.5);
44
+ backdrop-filter: blur(30px);
45
+ pointer-events: none; /* Allows clicks to pass through to elements below */
46
  }
47
 
48
  .card span {
app/page.tsx CHANGED
@@ -120,6 +120,7 @@ const Page: React.FC = () => {
120
 
121
  return (
122
  <main className={styles.main}>
 
123
  <div className={styles.messages}>
124
  {messages.length > 0 ? (
125
  messages.map((message, i) => {
 
120
 
121
  return (
122
  <main className={styles.main}>
123
+ <div className={styles.background}></div>
124
  <div className={styles.messages}>
125
  {messages.length > 0 ? (
126
  messages.map((message, i) => {