Skip to content

Commit c34634d

Browse files
V-Shadboltredocly[bot]Vincent Shadbolt
authored
[no ticket] chore: Upgrade Redocly Developer Portal to Reunite (#216)
Migrated the Redocly developer portal to Redocly Reunite --------- Co-authored-by: redocly[bot] <136722170+redocly[bot]@users.noreply.github.com> Co-authored-by: Vincent Shadbolt <[email protected]>
1 parent 19f9a72 commit c34634d

File tree

118 files changed

+12827
-33403
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+12827
-33403
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
20.19.0

404.mdx

Lines changed: 0 additions & 15 deletions
This file was deleted.

404.page.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import * as React from 'react';
2+
3+
export default function Page() {
4+
return (
5+
<main style={{ padding: '4rem 1rem', textAlign: 'center' }}>
6+
<h1 style={{ marginTop: 0 }}>Page not found</h1>
7+
<p style={{ color: '#555' }}>The page may have been removed or renamed.</p>
8+
<div style={{ marginTop: '1rem' }}>
9+
<a href="/" style={{ padding: '0.5rem 1rem', background: '#0D67FE', color: '#fff', borderRadius: 6, textDecoration: 'none' }}>Return home</a>
10+
</div>
11+
</main>
12+
);
13+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import * as React from 'react';
2+
3+
export function DeveloperSurvey() {
4+
return (
5+
<div className="margin-top-bottom-30">
6+
<div className="developer-survey">
7+
<h2>
8+
Help us improve our products!
9+
</h2>
10+
<p>
11+
We're always looking for ways to improve how developers use and integrate our products into their applications. We'd love to hear about your experience to help us get better.
12+
</p>
13+
<div className="developer-survey-actions">
14+
<button
15+
data-tf-slider="uHPQyHO6"
16+
data-tf-width="550"
17+
data-tf-iframe-props="title=Developer Research Survey"
18+
data-tf-medium="snippet"
19+
>
20+
Take Our Developer Survey
21+
</button>
22+
<button
23+
data-tf-slider="OC87toiF"
24+
data-tf-width="550"
25+
data-tf-iframe-props="title=Developer Research Survey"
26+
data-tf-medium="snippet"
27+
>
28+
Take Our Partner API Survey
29+
</button>
30+
</div>
31+
</div>
32+
</div>
33+
);
34+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import React, { useState, useEffect } from 'react';
2+
3+
const quotes = [
4+
{
5+
text: "Integrating Unstoppable into Ebisu's Bay was seamless, their team made the process quick, clear, and hassle-free. Best of all, our community loves having custom domains they can truly own and show off. It's been a win all around.",
6+
author: "Ebisu's Bay"
7+
},
8+
{
9+
text: "The integration was exceptionally smooth! We integrated the Partner API which was well documented and straight forward to utilize, having just a few steps. The logical flow of searching, checking availability, and then registering was very efficient - all without any blockchain calls. The addition of a sandbox environment to test it all is a huge plus.",
10+
author: "Permission"
11+
},
12+
];
13+
14+
const QuoteContent: React.FC<{ quote: typeof quotes[0] | undefined }> = ({ quote }) => {
15+
if (!quote) return null;
16+
17+
return (
18+
<>
19+
<blockquote>
20+
"{quote.text}"
21+
</blockquote>
22+
{quote.author && (
23+
<p>{quote.author}</p>
24+
)}
25+
</>
26+
);
27+
};
28+
29+
export const RotatingQuotes: React.FC = () => {
30+
const [currentQuoteIndex, setCurrentQuoteIndex] = useState(0);
31+
const [isTransitioning, setIsTransitioning] = useState(false);
32+
33+
useEffect(() => {
34+
if (quotes.length <= 1) return;
35+
36+
const interval = setInterval(() => {
37+
setIsTransitioning(true);
38+
setTimeout(() => {
39+
setCurrentQuoteIndex((prevIndex) => (prevIndex + 1) % quotes.length);
40+
setIsTransitioning(false);
41+
}, 1000);
42+
}, 8000);
43+
44+
return () => clearInterval(interval);
45+
}, []);
46+
47+
const currentQuote = quotes[currentQuoteIndex];
48+
const nextQuote = quotes[(currentQuoteIndex + 1) % quotes.length];
49+
50+
return (
51+
<>
52+
<div className="quotes-wrapper">
53+
<div className="quote-box">
54+
<div className={`quote-container ${isTransitioning ? 'slide-out' : ''}`}>
55+
<QuoteContent quote={currentQuote} />
56+
</div>
57+
{isTransitioning && quotes.length > 1 && (
58+
<div className="quote-container slide-in">
59+
<QuoteContent quote={nextQuote} />
60+
</div>
61+
)}
62+
</div>
63+
</div>
64+
</>
65+
);
66+
};

components/Video.tsx renamed to @theme/components/Video.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default function Video(props) {
66
let parsed_height = parse_dimension_value(props?.height);
77

88
// Retrieve and/or calculate video-container styles
9-
let container_styles : React.CSSProperties = {margin: props.centered ? "auto" : ""};
9+
let container_styles : React.CSSProperties = {};
1010

1111
if (parsed_width) container_styles["--video-max-width"] = parsed_width;
1212
if (props?.type === "iframe") {
@@ -18,13 +18,12 @@ export default function Video(props) {
1818
container_styles["--video-aspect-ratio"] = `calc(${parseFloat(parsed_height)} / ${parseFloat(parsed_width)})`;
1919
}
2020
} else if (props?.type === "video") {
21-
container_styles.height = "auto";
22-
container_styles.paddingBottom = "0";
21+
// For direct <video> embeds we toggle an additional class that adjusts container behavior
2322
}
2423

2524
// Create video container and select embed type
2625
let video_container = (
27-
<div className={props.type ? "video-container" : ""} style={container_styles}>
26+
<div className={`${props.type ? "video-container" : ""} ${props?.type === "video" ? "is-video" : ""} ${props.centered ? "video-centered" : ""}`} style={container_styles}>
2827

2928
{ props.type === "iframe" ?
3029
<iframe
@@ -35,14 +34,13 @@ export default function Video(props) {
3534
/>
3635
: props.type === "video" ?
3736
<video
38-
style={{width: "100%"}}
3937
src = {props.src}
4038
title = {props?.title}
4139
autoPlay = {props?.autoplay || false}
4240
loop = {props?.loop || false}
4341
/>
4442
:
45-
<div style={{color: "red", textAlign: "center"}}>Invalid type property. Specify either "iframe" or "video."</div>
43+
<div className="video-error">Invalid type property. Specify either "iframe" or "video."</div>
4644
}
4745
</div>
4846
);

0 commit comments

Comments
 (0)