Skip to content

Commit caa1ed4

Browse files
Merge branch 'prod'
2 parents 8110da8 + 45ae010 commit caa1ed4

File tree

4 files changed

+54
-23
lines changed

4 files changed

+54
-23
lines changed

components/doc/common/docsectionnav.js

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import { DomHandler, ObjectUtils, classNames } from '@/components/lib/utils/Util
33
import Link from 'next/link';
44
import { useRouter } from 'next/router';
55
import { useEffect, useRef, useState } from 'react';
6+
import AppContentContext from '@/components/layout/appcontentcontext';
7+
import { useContext } from 'react';
68

79
export function DocSectionNav({ docs = [] }) {
10+
const { darkMode } = useContext(AppContentContext);
811
const router = useRouter();
912
const [activeId, setActiveId] = useState(null);
1013
const navRef = useRef(null);
@@ -97,8 +100,29 @@ export function DocSectionNav({ docs = [] }) {
97100
};
98101

99102
return (
100-
<ul ref={navRef} className="doc-section-nav">
101-
{docs.map((item) => createItem(item))}
102-
</ul>
103+
<div className="doc-section-nav-container">
104+
<ul ref={navRef} className="doc-section-nav">
105+
{docs.map((item) => createItem(item))}
106+
</ul>
107+
<div className="mt-8 p-3 w-full" style={{
108+
border: '1px solid var(--surface-border)',
109+
backgroundColor: 'var(--surface-0)',
110+
borderRadius: '0.5rem',
111+
}}>
112+
<img src="https://primefaces.org/cdn/discount/primestore-summersale-2025-sm.jpg" className="w-full rounded-lg" alt="Summer Sale 2025" style={{
113+
borderRadius: '0.5rem',
114+
}} />
115+
<div className="text-xl font-semibold flex flex-column gap-2 text-center mt-4">
116+
<span style={{ lineHeight: 1 }}>SUMMER SALE</span>
117+
<span className="text-primary" style={{ lineHeight: 1 }}>2025</span>
118+
</div>
119+
<div className="text-center text-sm mt-4" style={{ color: 'var(--surface-500)', lineHeight: 1.5 }}>Use coupon code <b>PRSM25</b> at checkout to get 50% OFF everything in PrimeStore and PrimeBlocks.</div>
120+
<span className="flex justify-content-center">
121+
<a className="p-button p-button-rounded p-button-sm font-bold mt-3 inline-flex" size="small" href="https://www.primefaces.org/blog/summer-sale-2025" target="_blank" rel="noopener">
122+
Learn More
123+
</a>
124+
</span>
125+
</div>
126+
</div>
103127
);
104128
}

data/news.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"id": 53,
3-
"content": "Introducing PrimeReact v11-alpha 🎉",
4-
"linkText": "Discover Now",
5-
"linkHref": "https://v11.primereact.org",
2+
"id": 54,
3+
"content": "Summer Sale is here 🏖️ Get 50% off with code PRSM25",
4+
"linkText": "Learn More",
5+
"linkHref": "https://www.primefaces.org/blog/summer-sale-2025",
66
"target": "_blank"
77
}

styles/layout/_doc.scss

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
li {
2020
position: relative;
2121
z-index: 1;
22-
22+
2323
button {
2424
background-color: transparent;
2525
border: 0 none;
@@ -177,21 +177,28 @@
177177
}
178178
}
179179

180-
.doc-section-nav {
180+
.doc-section-nav-container {
181181
position: sticky;
182182
top: 6rem;
183183
right: 0;
184184
width: 14rem;
185-
max-height: calc(100vh - 15rem);
186-
list-style: none;
187185
margin: 0;
188-
padding: 0.25rem 0;
189-
margin-left: 4rem;
190-
overflow-y: auto;
191-
overflow-x: hidden;
186+
padding-block: 0.25rem;
187+
padding-inline: 0;
188+
margin-inline-start: 4rem;
189+
display: flex;
190+
flex-direction: column;
192191
align-self: flex-start;
192+
max-height: calc(100vh - 14rem);
193+
}
193194

194-
> .navbar-item {
195+
.doc-section-nav {
196+
list-style: none;
197+
overflow-y: scroll;
198+
overflow-x: hidden;
199+
padding: 0;
200+
201+
>.navbar-item {
195202
.navbar-item-content {
196203
border-left: 1px solid var(--surface-border);
197204
padding-left: .25rem;
@@ -204,7 +211,7 @@
204211
}
205212

206213
.navbar-item {
207-
> .navbar-item-content {
214+
>.navbar-item-content {
208215
display: flex;
209216

210217
.px-link {
@@ -249,9 +256,9 @@
249256
}
250257
}
251258

252-
.doc-section-code {
259+
.doc-section-code {
253260
position: relative;
254-
261+
255262
div {
256263
&::-webkit-scrollbar {
257264
width: 5px;
@@ -283,7 +290,7 @@
283290
padding: 2px;
284291
backdrop-filter: blur(6px);
285292
border: 1px solid rgba(255, 255, 255, .1);
286-
293+
287294
button {
288295
outline: 0 none;
289296
border-radius: 8px;

styles/layout/_responsive.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414

1515
@media screen and (max-width: 1199px) {
16-
.layout-topbar-inner {
16+
.layout-topbar-inner {
1717
padding-left: 2rem;
1818
padding-right: 2rem;
1919

@@ -89,7 +89,7 @@
8989
}
9090
}
9191

92-
.doc-section-nav {
92+
.doc-section-nav-container {
9393
display: none;
9494
}
9595

@@ -174,4 +174,4 @@
174174
display: none;
175175
}
176176
}
177-
}
177+
}

0 commit comments

Comments
 (0)