Skip to content

Commit c80ede9

Browse files
authored
Merge pull request open-neuromorphic#227 from neural-loop/design-adjustments
Design adjustments
2 parents af54ee9 + 53b93f2 commit c80ede9

File tree

11 files changed

+189
-395
lines changed

11 files changed

+189
-395
lines changed

assets/images/ONM.png

89.1 KB
Loading

assets/images/og-image.png

-625 KB
Binary file not shown.

assets/og-template/template.html

Lines changed: 82 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,72 +4,101 @@
44
<meta charset="utf-8">
55
<title>OG Image</title>
66
<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;
812
margin: 0;
913
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 */
1037
width: 1200px;
1138
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;
1740
box-sizing: border-box;
41+
display: flex; /* Flexbox for internal alignment is fine */
42+
flex-direction: column;
1843
}
1944

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%;
2448
display: flex;
2549
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;
3258
}
3359

3460
.logo {
35-
height: 60px; /* Reduced height for better proportion with text */
61+
position: absolute;
62+
top: 0;
63+
left: 0;
64+
height: 80px;
3665
width: auto;
37-
max-width: 100%; /* Ensure logo doesn't overflow */
38-
margin-bottom: 30px;
39-
display: block;
4066
}
4167
img.logo[src=""] {
4268
display: none;
4369
}
4470

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+
4583
.title {
46-
font-size: 60px; /* Larger title for more impact */
47-
font-weight: 700; /* Bolder title */
84+
font-size: 60px;
85+
font-weight: 700;
4886
line-height: 1.15;
49-
color: TITLE_TEXT_COLOR_PLACEHOLDER; /* e.g., #1a202c */
87+
color: #1f2937;
5088
margin: 0 0 20px 0;
5189
display: -webkit-box;
52-
-webkit-line-clamp: 2; /* Limit to 2 lines to keep it punchy */
90+
-webkit-line-clamp: 2;
5391
-webkit-box-orient: vertical;
5492
overflow: hidden;
5593
text-overflow: ellipsis;
5694
text-align: left;
5795
}
5896

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-
6897
.description {
6998
font-size: 32px;
7099
font-weight: 400;
71100
line-height: 1.45;
72-
color: DESCRIPTION_TEXT_COLOR_PLACEHOLDER; /* e.g., #4a5568 */
101+
color: #4b5563;
73102
margin: 0 0 20px 0;
74103
display: -webkit-box;
75104
-webkit-line-clamp: 4;
@@ -81,21 +110,32 @@
81110

82111
.site-name {
83112
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;
86115
margin-top: auto;
87116
text-align: left;
88-
padding-top: 10px; /* Add some space above site name */
117+
padding-top: 10px;
89118
}
90119
</style>
91120
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
92121
</head>
93122
<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>
99139
</div>
100140
</body>
101141
</html>

layouts/blog/single.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
<div class="content mb-10">
1515
{{ .Content }}
1616
</div>
17-
{{ partial "components/share-cta.html" . }}
17+
1818
{{ partial "components/author-bios.html" . }}
1919

20+
{{ partial "components/share-cta.html" . }}
2021
</article>
2122

2223
{{ partial "components/sidebar-toc-shared.html" . }}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="share-cta-section mt-12 pt-8">
1+
<div class="share-cta-section mt-12 pt-8 border-t border-border dark:border-darkmode-border">
22
<div class="text-center">
33
<h2 class="text-3xl font-bold mb-4">Enjoy this content? Share it!</h2>
44
<p class="max-w-2xl mx-auto mb-8 text-lg text-gray-600 dark:text-gray-400">
@@ -7,4 +7,8 @@ <h2 class="text-3xl font-bold mb-4">Enjoy this content? Share it!</h2>
77
</div>
88

99
{{ partial "components/og-preview.html" . }}
10+
11+
<p class="text-center mt-6 text-sm text-gray-500">
12+
Hover over the image to reveal sharing options.
13+
</p>
1014
</div>

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"postcss-cli": "^11.0.1",
2020
"tailwind-bootstrap-grid": "^5.1.0",
2121
"tailwindcss": "^3.4.17",
22-
"toml": "^3.0.0",
2322
"mime-types": "^3.0.1"
2423
}
2524
}

0 commit comments

Comments
 (0)