|
4 | 4 | <meta charset="utf-8">
|
5 | 5 | <title>OG Image</title>
|
6 | 6 | <style>
|
7 |
| - body { |
| 7 | + /* Use a wrapper to act as our canvas and positioning context */ |
| 8 | + .canvas { |
| 9 | + position: relative; |
| 10 | + width: 1200px; |
| 11 | + height: 630px; |
8 | 12 | margin: 0;
|
9 | 13 | padding: 0;
|
| 14 | + background-color: #f9fafb; |
| 15 | + font-family: 'Inter', Arial, sans-serif; |
| 16 | + overflow: hidden; /* Important to clip anything that goes outside */ |
| 17 | + } |
| 18 | + |
| 19 | + /* The watermark is now a simple, absolutely positioned image */ |
| 20 | + .watermark { |
| 21 | + position: absolute; |
| 22 | + z-index: 1; /* Behind the content */ |
| 23 | + opacity: 0.25; |
| 24 | + /* Position at bottom-left, partially off-screen */ |
| 25 | + bottom: -50px; |
| 26 | + left: 370px; |
| 27 | + /* Set an explicit size */ |
| 28 | + width: 900px; |
| 29 | + height: auto; |
| 30 | + transform: rotate(-15deg); |
| 31 | + } |
| 32 | + |
| 33 | + /* The main content card, also absolutely positioned */ |
| 34 | + .container { |
| 35 | + position: absolute; |
| 36 | + z-index: 2; /* On top of the watermark */ |
10 | 37 | width: 1200px;
|
11 | 38 | height: 630px;
|
12 |
| - font-family: 'Inter', Arial, sans-serif; |
13 |
| - background-color: BACKGROUND_COLOR_PLACEHOLDER; /* e.g., #f8f9fa or your site's light bg */ |
14 |
| - display: flex; |
15 |
| - align-items: center; |
16 |
| - justify-content: center; |
| 39 | + padding: 50px 60px; |
17 | 40 | box-sizing: border-box;
|
| 41 | + display: flex; /* Flexbox for internal alignment is fine */ |
| 42 | + flex-direction: column; |
18 | 43 | }
|
19 | 44 |
|
20 |
| - .container { |
21 |
| - width: 1100px; |
22 |
| - max-height: 550px; |
23 |
| - padding: 50px 60px; /* Increased padding for more whitespace */ |
| 45 | + .main-content { |
| 46 | + width: 100%; |
| 47 | + height: 100%; |
24 | 48 | display: flex;
|
25 | 49 | flex-direction: column;
|
26 |
| - align-items: flex-start; /* Align content to the left */ |
27 |
| - justify-content: center; /* Try to center content vertically if it's short */ |
28 |
| - box-sizing: border-box; |
29 |
| - overflow: hidden; |
30 |
| - border-radius: 12px; /* Optional: slightly rounded corners for the content box */ |
31 |
| - /* background-color: #ffffff; /* Optional: if you want a white card on a colored body bg */ |
| 50 | + justify-content: center; |
| 51 | + } |
| 52 | + |
| 53 | + .header { |
| 54 | + position: relative; |
| 55 | + width: 100%; |
| 56 | + height: 80px; |
| 57 | + margin-bottom: 30px; |
32 | 58 | }
|
33 | 59 |
|
34 | 60 | .logo {
|
35 |
| - height: 60px; /* Reduced height for better proportion with text */ |
| 61 | + position: absolute; |
| 62 | + top: 0; |
| 63 | + left: 0; |
| 64 | + height: 80px; |
36 | 65 | width: auto;
|
37 |
| - max-width: 100%; /* Ensure logo doesn't overflow */ |
38 |
| - margin-bottom: 30px; |
39 |
| - display: block; |
40 | 66 | }
|
41 | 67 | img.logo[src=""] {
|
42 | 68 | display: none;
|
43 | 69 | }
|
44 | 70 |
|
| 71 | + .logo-text { |
| 72 | + position: absolute; |
| 73 | + top: 0; |
| 74 | + left: 110px; |
| 75 | + height: 80px; |
| 76 | + line-height: 80px; |
| 77 | + font-size: 54px; |
| 78 | + font-weight: 700; |
| 79 | + color: #1f2937; |
| 80 | + white-space: nowrap; |
| 81 | + } |
| 82 | + |
45 | 83 | .title {
|
46 |
| - font-size: 60px; /* Larger title for more impact */ |
47 |
| - font-weight: 700; /* Bolder title */ |
| 84 | + font-size: 60px; |
| 85 | + font-weight: 700; |
48 | 86 | line-height: 1.15;
|
49 |
| - color: TITLE_TEXT_COLOR_PLACEHOLDER; /* e.g., #1a202c */ |
| 87 | + color: #1f2937; |
50 | 88 | margin: 0 0 20px 0;
|
51 | 89 | display: -webkit-box;
|
52 |
| - -webkit-line-clamp: 2; /* Limit to 2 lines to keep it punchy */ |
| 90 | + -webkit-line-clamp: 2; |
53 | 91 | -webkit-box-orient: vertical;
|
54 | 92 | overflow: hidden;
|
55 | 93 | text-overflow: ellipsis;
|
56 | 94 | text-align: left;
|
57 | 95 | }
|
58 | 96 |
|
59 |
| - hr { |
60 |
| - border: 0; |
61 |
| - height: 2px; |
62 |
| - background-color: PRIMARY_COLOR_PLACEHOLDER; /* Use primary color for HR */ |
63 |
| - opacity: 0.3; |
64 |
| - width: 150px; /* Shorter decorative HR */ |
65 |
| - margin: 0 0 25px 0; /* Margin below HR */ |
66 |
| - } |
67 |
| - |
68 | 97 | .description {
|
69 | 98 | font-size: 32px;
|
70 | 99 | font-weight: 400;
|
71 | 100 | line-height: 1.45;
|
72 |
| - color: DESCRIPTION_TEXT_COLOR_PLACEHOLDER; /* e.g., #4a5568 */ |
| 101 | + color: #4b5563; |
73 | 102 | margin: 0 0 20px 0;
|
74 | 103 | display: -webkit-box;
|
75 | 104 | -webkit-line-clamp: 4;
|
|
81 | 110 |
|
82 | 111 | .site-name {
|
83 | 112 | font-size: 28px;
|
84 |
| - font-weight: 500; /* Medium weight */ |
85 |
| - color: PRIMARY_COLOR_PLACEHOLDER; /* e.g., #4299e1 or your site's primary */ |
| 113 | + font-weight: 500; |
| 114 | + color: #667eea; |
86 | 115 | margin-top: auto;
|
87 | 116 | text-align: left;
|
88 |
| - padding-top: 10px; /* Add some space above site name */ |
| 117 | + padding-top: 10px; |
89 | 118 | }
|
90 | 119 | </style>
|
91 | 120 | <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
92 | 121 | </head>
|
93 | 122 | <body>
|
94 |
| -<div class="container"> |
95 |
| - <img src="LOGO_SRC" alt="Site Logo" class="logo"> |
96 |
| - <h1 class="title">PAGE_TITLE</h1> |
97 |
| - <p class="description">PAGE_DESCRIPTION</p> |
98 |
| - <div class="site-name">open-neuromorphic.org</div> |
| 123 | +<div class="canvas"> |
| 124 | + <!-- Layer 1: The Watermark Image --> |
| 125 | + <img src="BACKGROUND_URL" class="watermark" alt=""/> |
| 126 | + |
| 127 | + <!-- Layer 2: The Content Container --> |
| 128 | + <div class="container"> |
| 129 | + <div class="main-content"> |
| 130 | + <div class="header"> |
| 131 | + <img src="LOGO_SRC" alt="Site Logo" class="logo"> |
| 132 | + <div class="logo-text">Open Neuromorphic</div> |
| 133 | + </div> |
| 134 | + <h1 class="title">PAGE_TITLE</h1> |
| 135 | + <p class="description">PAGE_DESCRIPTION</p> |
| 136 | + <div class="site-name">open-neuromorphic.org</div> |
| 137 | + </div> |
| 138 | + </div> |
99 | 139 | </div>
|
100 | 140 | </body>
|
101 | 141 | </html>
|
0 commit comments