Enhance documentation and update it's dependencies
This commit is contained in:
2
.github/workflows/build-deploy-docs.yml
vendored
2
.github/workflows/build-deploy-docs.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
contents: write # to push pages branch (peaceiris/actions-gh-pages)
|
||||
|
||||
if: github.repository == 'laradock/laradock'
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
defaults:
|
||||
|
||||
@@ -4,7 +4,7 @@ import type * as Preset from '@docusaurus/preset-classic';
|
||||
|
||||
const config: Config = {
|
||||
title: 'Laradock',
|
||||
tagline: 'Full PHP development environment on Docker.',
|
||||
tagline: 'A Docker setup that lets you run a full PHP development environment in seconds.',
|
||||
favicon: 'laradock.ico',
|
||||
|
||||
// Set the production url of your site here
|
||||
@@ -123,7 +123,7 @@ const config: Config = {
|
||||
// ],
|
||||
// },
|
||||
],
|
||||
copyright: `Copyright © 2016 - ${new Date().getFullYear()} - Laradock - By <a href="https://zalt.me" target="_blank" rel="noopener noreferrer">Mahmoud Zalt</a>.`,
|
||||
copyright: `Copyright © 2015 - ${new Date().getFullYear()} - Laradock - By <a href="https://zalt.me" target="_blank" rel="noopener noreferrer">Mahmoud Zalt</a>.`,
|
||||
},
|
||||
prism: {
|
||||
theme: prismThemes.github,
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sista/ai-assistant-react": "^3.3.21",
|
||||
"@docusaurus/core": "3.3.0",
|
||||
"@docusaurus/preset-classic": "3.3.0",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"@sista/ai-assistant-react": "^2.2.0",
|
||||
"clsx": "^2.0.0",
|
||||
"prism-react-renderer": "^2.3.0",
|
||||
"react": "^18.0.0",
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { AiAssistantButton, useAiAssistant } from "@sista/ai-assistant-react";
|
||||
|
||||
const AiAssistant = () => {
|
||||
const { registerFunctions } = useAiAssistant();
|
||||
const history = useHistory();
|
||||
|
||||
const navigateToPage = ({ page }) => {
|
||||
history.push(`/${page}`);
|
||||
};
|
||||
|
||||
const navigateToExternalUrl = ({ url }) => {
|
||||
window.location.href = url;
|
||||
};
|
||||
|
||||
const goToNextPage = () => {
|
||||
const nextPageButton = document.querySelector(
|
||||
"a.pagination-nav__link.pagination-nav__link--next"
|
||||
) as HTMLElement;
|
||||
if (nextPageButton) {
|
||||
nextPageButton.click();
|
||||
}
|
||||
};
|
||||
|
||||
const goToPreviousPage = () => {
|
||||
const previousPageButton = document.querySelector(
|
||||
"a.pagination-nav__link.pagination-nav__link--prev"
|
||||
) as HTMLElement;
|
||||
if (previousPageButton) {
|
||||
previousPageButton.click();
|
||||
}
|
||||
};
|
||||
|
||||
const switchTheme = () => {
|
||||
const themeToggle = document.querySelector(
|
||||
'button[title^="Switch between dark and light mode"][class*="ColorModeToggle-styles-module"]'
|
||||
) as HTMLElement;
|
||||
if (themeToggle) {
|
||||
themeToggle.click();
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const aiFunctions = [
|
||||
{
|
||||
function: {
|
||||
handler: navigateToPage,
|
||||
description:
|
||||
"Go to a specific page. Navigate to a page. Internal pages. This is what the user often wants, when asking for navigation. Each page contains info about the specific topic, as you can tell from the page name.",
|
||||
parameters: {
|
||||
type: "object",
|
||||
properties: {
|
||||
page: {
|
||||
type: "string",
|
||||
description: "The page to navigate to.",
|
||||
enum: [
|
||||
"/?page=home",
|
||||
"docs/intro/",
|
||||
|
||||
"docs/getting-started",
|
||||
"docs/usage",
|
||||
"docs/help",
|
||||
"docs/related-projects",
|
||||
"docs/contributing",
|
||||
],
|
||||
},
|
||||
},
|
||||
required: ["page"],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
function: {
|
||||
handler: navigateToExternalUrl,
|
||||
description: "Navigate to an external URL.",
|
||||
parameters: {
|
||||
type: "object",
|
||||
properties: {
|
||||
url: {
|
||||
type: "string",
|
||||
description:
|
||||
"The URL to navigate to. For 'Github' go to 'https://github.com/laradock/laradock'. For 'Sista' go to 'https://smart.sista.ai/?utm_source=docs_laradock&utm_medium=ai_assistant&utm_campaign=user_request_for_navigation'.",
|
||||
},
|
||||
},
|
||||
required: ["url"],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
function: {
|
||||
handler: goToNextPage,
|
||||
description:
|
||||
"Navigate to the next page. Go to the next page. Click on the next page. Next. Next Page.",
|
||||
},
|
||||
},
|
||||
{
|
||||
function: {
|
||||
handler: goToPreviousPage,
|
||||
description:
|
||||
"Navigate to the previous page. Go to the previous page. Click on the previous page. Previous. Previous Page.",
|
||||
},
|
||||
},
|
||||
{
|
||||
function: {
|
||||
handler: switchTheme,
|
||||
description:
|
||||
"Turn On / Off the light. Change theme color. Switches between dark and light modes. Toggle the theme.",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
if (registerFunctions) {
|
||||
registerFunctions(aiFunctions);
|
||||
}
|
||||
}, [registerFunctions]);
|
||||
|
||||
return <AiAssistantButton />;
|
||||
};
|
||||
|
||||
export default AiAssistant;
|
||||
@@ -10,11 +10,11 @@ type SponsorItem = {
|
||||
|
||||
const SponsorList: SponsorItem[] = [
|
||||
{
|
||||
link: "https://smart.sista.ai/?utm_source=docs_laradock&utm_medium=sponsor&utm_campaign=landing_page_welcome",
|
||||
link: "https://smart.sista.ai/?utm_source=laradock&utm_medium=sponsor_banner&utm_campaign=landing_page",
|
||||
imageUrl: "/img/sponsors/sista-ai-logo.png",
|
||||
description: (
|
||||
<>
|
||||
<b>Make Your Apps Smarter with a Plug-and-Play AI Voice Assistant.</b>
|
||||
<b>Plug-and-Play <a href="https://smart.sista.ai/?utm_source=laradock&utm_medium=sponsor_banner&utm_campaign=landing_page" target="_blank" style={{ color: '#8098f8' }}>AI Agents</a> for Apps & Websites</b>
|
||||
</>
|
||||
),
|
||||
},
|
||||
@@ -25,12 +25,25 @@ function Sponsor({ link, imageUrl, description }: SponsorItem) {
|
||||
<div className={clsx("col col--12")}>
|
||||
<div className="text--center">
|
||||
<a href={link} target="_blank" rel="noopener noreferrer">
|
||||
<img src={imageUrl} className={sponsorsStyles.sponsorImg} role="img" />
|
||||
<img
|
||||
src={imageUrl}
|
||||
className={sponsorsStyles.sponsorImg}
|
||||
role="img"
|
||||
style={{
|
||||
maxWidth: '100%',
|
||||
minWidth: '350px',
|
||||
height: 'auto'
|
||||
}}
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div className="text--center padding-horiz--md">
|
||||
|
||||
<p>{description}</p>
|
||||
<p style={{
|
||||
fontSize: 'clamp(1rem, 2vw, 1.2em)',
|
||||
lineHeight: 1.5,
|
||||
margin: '1rem 0'
|
||||
}}>{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -4,7 +4,10 @@ import styles from './styles.module.css';
|
||||
export default function WelcomePage() {
|
||||
return (
|
||||
<section className={styles.welcome}>
|
||||
<h1>Fully Dockerized PHP Environment, Ready to Go!</h1>
|
||||
<div className={styles.heroContent}>
|
||||
<h1>Full PHP Dev Environment For Docker</h1>
|
||||
</div>
|
||||
<div className={styles.overlay} />
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,15 +8,38 @@
|
||||
/* background-position: center 40%; */
|
||||
color: white;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
.welcome h1 {
|
||||
font-size: 3.5rem;
|
||||
color: #242526;
|
||||
font-weight: 800;
|
||||
text-shadow: 2px 4px 8px rgba(255, 255, 255, 0.8);
|
||||
font-size: 3.7rem;
|
||||
color: #fff;
|
||||
font-family: "Inter", "Segoe UI", Arial, sans-serif;
|
||||
font-weight: 900;
|
||||
text-shadow: 0 6px 32px rgba(204, 30, 69, 0.5),
|
||||
0 1.5px 0 rgb(125, 87, 194, 0.5);
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
letter-spacing: 2px;
|
||||
line-height: 1.1;
|
||||
letter-spacing: 2.5px;
|
||||
line-height: 1.08;
|
||||
transition: transform 0.3s ease-in-out;
|
||||
}
|
||||
[data-theme="dark"] .welcome h1 {
|
||||
color: var(--ifm-color-primary);
|
||||
}
|
||||
.heroContent {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
z-index: 1;
|
||||
pointer-events: none;
|
||||
}
|
||||
[data-theme="dark"] .overlay {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ function HomepageHeader() {
|
||||
<Heading as="h1" className="hero__title">
|
||||
{siteConfig.title}
|
||||
</Heading>
|
||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||
<p className="hero__subtitle" style={{ maxWidth: '480px' }}>{siteConfig.tagline}</p>
|
||||
<div className={styles.buttons}>
|
||||
<Link
|
||||
className={clsx("button", styles.bigColorfulButton)}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import React from "react";
|
||||
import OriginalLayout from "@theme-original/Layout";
|
||||
import AiAssistant from "../components/AiAssistant";
|
||||
import { AiAssistantProvider } from "@sista/ai-assistant-react";
|
||||
import { AiAssistantProvider, AiAssistantButton } from "@sista/ai-assistant-react";
|
||||
const config = require("../config");
|
||||
|
||||
const Layout = (props) => {
|
||||
return (
|
||||
<OriginalLayout {...props}>
|
||||
{props.children}
|
||||
<AiAssistant />
|
||||
<AiAssistantButton />
|
||||
</OriginalLayout>
|
||||
);
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user