forked from primefaces/primeflex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9cc5ed2
commit f50ccfe
Showing
20 changed files
with
493 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { DocSectionCode } from '../common/docsectioncode'; | ||
|
||
const Guide = ({ framework }) => { | ||
return ( | ||
<div className="guide"> | ||
<div className="guide-steps"> | ||
{framework.guide.map((step, index) => ( | ||
<div key={index} className="guide-step"> | ||
<div className="step-content-section md:w-5"> | ||
<span className="step-number">{step.stepId}</span> | ||
<div className="step-content"> | ||
<span className="step-content-title">{step.title}</span> | ||
<p>{step.description}</p> | ||
</div> | ||
</div> | ||
<div className="step-code-section w-full md:w-7"> | ||
<DocSectionCode code={step.code} /> | ||
</div> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Guide; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Link from 'next/link'; | ||
import { frameworks } from '../../../data/frameworks'; | ||
import { DocSectionText } from '../common/docsectiontext'; | ||
|
||
export function FrameworkGuidesDoc(props) { | ||
return ( | ||
<> | ||
<DocSectionText {...props}> | ||
<p>Explore our detailed guides, specifically crafted for various frameworks, to learn the best practices for integrating PrimeFlex into a wide range of popular development environments.</p> | ||
</DocSectionText> | ||
<div className="frameworks"> | ||
{frameworks.map((framework, index) => ( | ||
<Link key={index} href={`/guides/${framework.name.toLowerCase()}`}> | ||
<div className="framework"> | ||
<div className="logo"> | ||
<img src={framework.logo}></img> | ||
</div> | ||
<div className="content"> | ||
<div className="title"> | ||
<h5>{framework.name}</h5> | ||
<i className="pi pi-arrow-up-right"></i> | ||
</div> | ||
<span>Add the PrimeFlex CSS file to your project.</span> | ||
</div> | ||
</div> | ||
</Link> | ||
))} | ||
</div> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
export const frameworks = [ | ||
{ | ||
id: 'nextjs', | ||
name: 'Nextjs', | ||
logo: '/images/frameworks/nextjs.png', | ||
guide: [ | ||
{ | ||
stepId: '1', | ||
title: 'Create your project', | ||
description: 'Start by creating a new Next.js project if you don’t have one set up already. The most common approach is to use Create Next App.', | ||
code: `npx create-next-app@latest my-project --typescript --eslint | ||
cd my-project | ||
` | ||
}, | ||
{ | ||
stepId: '2', | ||
title: 'Install Primeflex', | ||
description: `Install tailwindcss and its peer dependencies via npm, and then run the init command to generate both tailwind.config.js and postcss.config.js.`, | ||
code: `npm install -D tailwindcss postcss autoprefixer | ||
npx tailwindcss init -p | ||
` | ||
}, | ||
{ | ||
stepId: '3', | ||
title: 'Configure your template paths', | ||
description: `Add the paths to all of your template files in your tailwind.config.js file. `, | ||
code: `/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: [ | ||
"./app/**/*.{js,ts,jsx,tsx,mdx}", | ||
"./pages/**/*.{js,ts,jsx,tsx,mdx}", | ||
"./components/**/*.{js,ts,jsx,tsx,mdx}", | ||
// Or if using 'src' directory: | ||
"./src/**/*.{js,ts,jsx,tsx,mdx}", | ||
], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
} | ||
` | ||
}, | ||
{ | ||
stepId: '4', | ||
title: 'Start your build process', | ||
description: `Install tailwindcss and its peer dependencies via npm, and then run the init command to generate both tailwind.config.js and postcss.config.js.`, | ||
code: `npm run dev | ||
` | ||
}, | ||
{ | ||
stepId: '5', | ||
title: 'Start using Primeflex in your project', | ||
description: `Install tailwindcss and its peer dependencies via npm, and then run the init command to generate both tailwind.config.js and postcss.config.js.`, | ||
code: `export default function Home() { | ||
return ( | ||
<h1 className="text-3xl font-bold underline"> | ||
Hello world! | ||
</h1> | ||
) | ||
} | ||
` | ||
} | ||
] | ||
}, | ||
{ | ||
id: 'angular', | ||
name: 'Angular', | ||
logo: '/images/frameworks/nextjs.png', | ||
guide: [ | ||
{ | ||
stepId: '1', | ||
title: 'Step 1 for Angular', | ||
description: 'Description for Step 1 for Angular.', | ||
code: `Code for Step 1 for Angular | ||
` | ||
} | ||
] | ||
}, | ||
{ | ||
id: 'nuxt', | ||
name: 'Nuxt', | ||
logo: '/images/frameworks/nextjs.png', | ||
guide: [ | ||
{ | ||
stepId: '1', | ||
title: 'Step 1 for Nuxt', | ||
description: 'Description for Step 1 for Nuxt.', | ||
code: `Code for Step 1 for Nuxt | ||
` | ||
}, | ||
{ | ||
stepId: '2', | ||
title: 'Step 2 for Nuxt', | ||
description: 'Description for Step 1 for Nuxt.', | ||
code: `Code for Step 1 for Nuxt | ||
` | ||
} | ||
] | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Head from 'next/head'; | ||
import { useRouter } from 'next/router'; | ||
import Guide from '../../components/doc/guides'; | ||
import { frameworks } from '../../data/frameworks'; | ||
|
||
const GuidePage = (props) => { | ||
const router = useRouter(); | ||
const { framework } = router.query; | ||
const currentFramework = frameworks.find((frm) => frm.id === framework); | ||
|
||
return ( | ||
<div> | ||
<Head> | ||
<title>Guide for {currentFramework.name} - PrimeFlex</title> | ||
<meta name="description" content={`PrimeFlex guide for ${currentFramework.name}`} /> | ||
</Head> | ||
<div className="doc"> | ||
<div className="doc-main"> | ||
<div className="doc-intro"> | ||
<span>Guide for {currentFramework.name}</span> | ||
<h1>Step by step guide for {currentFramework.name}</h1> | ||
<p>Setting up Primeflex in a {currentFramework.name} project.</p> | ||
</div> | ||
<Guide framework={currentFramework}></Guide> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default GuidePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
.layout-content { | ||
margin-left: 250px; | ||
margin-left: 300px; | ||
padding-top: 5rem; | ||
z-index: 2; | ||
position: relative; | ||
|
Oops, something went wrong.