Skip to content

Commit

Permalink
Refactored promo pages
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrogenous committed Jan 9, 2024
1 parent 5768735 commit 8993432
Show file tree
Hide file tree
Showing 28 changed files with 1,046 additions and 1,011 deletions.
36 changes: 20 additions & 16 deletions components/templates/TemplateConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,31 @@ const TemplateConfiguration = ({
description = "",
}) => {
return (
<div className='template-configuration-outer'>
<div className='template-configuration'>
<div className='template-configuration-screen'>
<div className='template-configuration-screen-top'>
<div className='template-configuration-screen-top-close template-configuration-screen-top-circle'></div>
<div className='template-configuration-screen-top-minimize template-configuration-screen-top-circle'></div>
<div className='template-configuration-screen-top-zoom template-configuration-screen-top-circle'></div>
<div className="template-configuration-wrapper">
<div className="template-configuration">
<div className="template-configuration-screen">
<div className="template-configuration-screen-top">
<div className="template-configuration-screen-top-close template-configuration-screen-top-circle"></div>
<div className="template-configuration-screen-top-minimize template-configuration-screen-top-circle"></div>
<div className="template-configuration-screen-top-zoom template-configuration-screen-top-circle"></div>
</div>
<div className='template-configuration-screen-bottom'>
<p>&gt; npm install -g angular-cli</p>
<p>&gt; ng new my-apollo-app</p>
<p>&gt; cd my-apollo-app</p>
<p>&gt; ng serve</p>
<img className='template-configuration-screen-bottom-logo' src={'/images/templates/react-3d-logo.png'} alt='Angular 3D Logo' />
<div className="template-configuration-screen-bottom">
<p>
&gt;npm install <span className="text-gray-500">or yarn</span>
</p>
<p>
&gt;npm run dev <span className="text-gray-500">or yarn dev</span>
</p>
<br />
<br />
<img className="template-configuration-screen-bottom-logo" src={'/images/templates/react-3d-logo.png'} alt="Angular 3D Logo" />
</div>
</div>
<h3 className='template-configuration-title'>{title}</h3>
<p className='template-configuration-description'>{description}</p>
<h3 className="template-configuration-title">{title}</h3>
<p className="template-configuration-description">{description}</p>
</div>
</div>
)
);
}

export default TemplateConfiguration
54 changes: 54 additions & 0 deletions components/templates/TemplateFeatures.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React from 'react';

const TemplateFeatures = ({ featuresData, displayType }) => {
const renderHorizontalFeatures = () => {
return (
<div className="template-features-horizontal-wrapper">
<div className="template-features-horizontal">
{featuresData.map((data, i) => (
<div key={i} className="template-features-horizontal-card">
<div className="template-features-horizontal-card-top">
<img src={data.src} alt={data.title}></img>
</div>
<div className="template-features-horizontal-card-bottom">
<h5 className="template-features-horizontal-card-bottom-title">{data.title}</h5>
<p className="template-features-horizontal-card-bottom-description">{data.description}</p>
</div>
</div>
))}
</div>
</div>
);
};

const renderVerticalFeatures = () => {
const firstColumnData = featuresData.slice(0, Math.ceil(featuresData.length / 2));
const secondColumnData = featuresData.slice(Math.ceil(featuresData.length / 2));

return (
<div className="template-features-vertical-wrapper">
<div className="template-features-vertical">
{Array(2)
.fill(null)
.map((_, i) => (
<div key={i} className="template-features-vertical-col">
{(i === 0 ? firstColumnData : secondColumnData).map((data, j) => (
<div key={j} className={`template-features-vertical-card `}>
<div className="template-features-vertical-card-image">
<img src={data.src} alt={data.title} />
</div>
<h2>{data.title}</h2>
<p>{data.description}</p>
</div>
))}
</div>
))}
</div>
</div>
);
};

return <div className="template-features">{displayType === 'vertical' ? renderVerticalFeatures() : renderHorizontalFeatures()}</div>;
};

export default TemplateFeatures;
27 changes: 0 additions & 27 deletions components/templates/TemplateFeaturesType1.js

This file was deleted.

30 changes: 0 additions & 30 deletions components/templates/TemplateFeaturesType2.js

This file was deleted.

14 changes: 7 additions & 7 deletions components/templates/TemplateRelated.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import React from 'react'

const TemplateRelated = ({ relatedData }) => {
return (
<div className='template-related-outer'>
<div className='template-related'>
<h2 className='template-related-title'>Related Layouts</h2>
<div className='template-related-slide'>
<div className="template-related-wrapper">
<div className="template-related">
<h2 className="template-related-title">Related Layouts</h2>
<div className="template-related-slide">
{relatedData.map((data, i) => (
<a href={data.href} key={i} className='template-related-slide-card'>
<img src={data.src} alt={"Related Image " + i} />
<a href={data.href} key={i} className="template-related-slide-card">
<img src={data.src} alt={'Related Image ' + i} />
</a>
))}
</div>
</div>
</div>
)
);
}

export default TemplateRelated
10 changes: 3 additions & 7 deletions components/templates/TemplateSeparator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@ import React from 'react'

const TemplateSeparator = ({ separatorLogo }) => {
return (
<div className='' style={{ display: "flex", alignItems: "center", gap: "1.5rem" }}>
<span className='' style={{ flex: "1", height: "1px", backgroundColor: "var(--surface-border)" }}></span>
<span style={{ display: "flex", alignItems: "center", justifyContent: "center", height: "3rem", width: "3rem", }}>
{separatorLogo}
</span>
<span className='' style={{ flex: "1", height: "1px", backgroundColor: "var(--surface-border)" }}></span>
<div className="template-seperator">
<span className="template-seperator-icon">{separatorLogo}</span>
</div>
)
);
}

export default TemplateSeparator
56 changes: 39 additions & 17 deletions components/templates/TemplateYoutube.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,64 @@
import React, { useState } from 'react'
import { Dialog } from '../lib/primereact.all'

const PlayIcon = React.memo(() => (
<svg xmlns="http://www.w3.org/2000/svg" width="180" height="180" viewBox="0 0 180 180" fill="none">
<g filter="url(#filter0_d_918_49700)">
<rect x="50" y="46" width="80" height="80" rx="40" fill="white" />
<rect x="50.5" y="46.5" width="79" height="79" rx="39.5" stroke="#DFE7EF" />
<path
d="M103.062 84.7896C104.085 85.5904 104.085 87.1386 103.062 87.9394L85.3123 101.834C83.9995 102.862 82.0795 101.926 82.0795 100.259L82.0795 72.47C82.0795 70.8028 83.9995 69.8674 85.3123 70.8951L103.062 84.7896Z"
fill="var(--primary-400)"
/>
</g>
<defs>
<filter id="filter0_d_918_49700" x="0" y="0" width="180" height="180" filterUnits="userSpaceOnUse" colorInterpolationFilters="sRGB">
<feFlood floodOpacity="0" result="BackgroundImageFix" />
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
<feOffset dy="4" />
<feGaussianBlur stdDeviation="25" />
<feComposite in2="hardAlpha" operator="out" />
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0" />
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_918_49700" />
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_918_49700" result="shape" />
</filter>
</defs>
</svg>
));

const TemplateYoutube = ({
playIcon,
imgSrc,
title = ["Integration with", "Existing Vite Applications"],
description = "Only the folders that are related to the layout needs to move in to your project. We‘ve already created a short tutorial with details for Sakai Vue. The both templates have the same implementation.",
youtubeLink = "https://www.youtube.com/embed/Y07edRJd5QM"
title = ['Integration with', 'Existing Vite Applications'],
description = 'Only the folders that are related to the layout needs to move in to your project. We‘ve already created a short tutorial with details for Sakai Vue. The both templates have the same implementation.',
youtubeLink = 'https://www.youtube.com/embed/Y07edRJd5QM'
}) => {
const [youtubeVideoVisible, setYoutubeVideoVisible] = useState(false);

return (
<div className='template-youtube-outer'>
<div className='template-youtube'>
<div className='template-youtube-title'>
<div className="template-youtube-wrapper">
<div className="template-youtube">
<div className="template-youtube-title">
{title.map((data, i) => (
<h2 key={i}>{data}</h2>
))}
</div>
<div className='template-youtube-description'>
{description}
</div>
<div className='template-youtube-screen' onClick={() => setYoutubeVideoVisible(true)}>
<div className='template-youtube-screen-blur'>
<div className='template-youtube-screen-play'>
{playIcon}
<div className="template-youtube-description">{description}</div>
<div className="template-youtube-screen" onClick={() => setYoutubeVideoVisible(true)}>
<div className="template-youtube-screen-blur">
<div className="template-youtube-screen-play">
<PlayIcon />
</div>
</div>
<img src={imgSrc} alt="Template Youtube Screen" />
</div>
<Dialog header="Video Content" visible={youtubeVideoVisible} style={{ width: '70vw' }} onHide={() => setYoutubeVideoVisible(false)}>
<div className='template-youtube-video'>
<div className="template-youtube-video">
<iframe src={youtubeLink} title="PrimeNG 2023 Roadmap" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
</Dialog>
</div>
</div>
)
}
);
};

export default TemplateYoutube
52 changes: 24 additions & 28 deletions components/templates/templateHero/TemplateHero.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,38 @@ import React from 'react'
import TemplateHeroRectangle from './TemplateHeroRectangle'
import TemplateHeroLight from './TemplateHeroLight'

const TemplateHero = ({
logo,
pattern,
rectangle,
light,
dashboard1,
dashboard2,
liveHref
}) => {
const TemplateHero = ({ logo, pattern, rectangle, light, dashboard1, dashboard2, description, liveHref, docHref }) => {
return (
<div className='template-hero'>
{!!pattern && <img className='template-hero-pattern' src={pattern} alt='Template Hero Pattern' />}
{!!light && <TemplateHeroLight/>}
{!!rectangle && <TemplateHeroRectangle/>}
<div className='template-hero-card'>
<div className='template-hero-card-logo'>{logo}</div>
<p>Angular CLI template with mode options, menu layouts, sample apps, pre-made pages, and 24 PrimeNG themes.</p>
<div className='template-hero-card-buttons'>
<a href={liveHref} target='_blank' className='template-hero-card-buttons-btn1 p-button'>Live Demo</a>
<a href='https://www.primefaces.org/store/' target='_blank' className='template-hero-card-buttons-btn2 p-button'>Buy Now</a>
<div className="template-hero">
{!!pattern && <img className="template-hero-pattern" src={pattern} alt="Template Hero Pattern" />}
{!!light && <TemplateHeroLight />}
{!!rectangle && <TemplateHeroRectangle />}
<div className="template-hero-card">
<div className="template-hero-card-logo ">{logo}</div>
<p>{description}</p>
<div className="template-hero-card-buttons">
<a href={liveHref} target="_blank" className="template-hero-card-buttons-btn1 p-button ">
Live Demo
</a>
<a href="https://www.primefaces.org/store/" target="_blank" className="template-hero-card-buttons-btn2 p-button">
Buy Now
</a>
</div>
<div className='template-hero-card-links'>
<a href='#'>
<i className="pi pi-github" style={{ fontSize: '1rem' }}></i>
<div className="template-hero-card-links ">
<a href="https://github.com/orgs/primefaces/discussions/categories/primereact-templates" target="_blank">
<i className="pi pi-github " style={{ fontSize: '1rem' }}></i>
<span>Get Support</span>
</a>
<a href='#'>
<i className="pi pi-book" style={{ fontSize: '1rem' }}></i>
<a href={docHref} target="_blank">
<i className="pi pi-book " style={{ fontSize: '1rem' }}></i>
<span>Read Doc</span>
</a>
</div>
</div>
{!!dashboard1 && <img className='template-hero-dashboard1' src={dashboard1} alt='Template Dashboard Image 1' />}
{!!dashboard2 && <img className='template-hero-dashboard2' src={dashboard2} alt='Template Dashboard Image 2' />}
{!!dashboard1 && <img className="template-hero-dashboard1" src={dashboard1} alt="Template Dashboard Image 1" />}
{!!dashboard2 && <img className="template-hero-dashboard2" src={dashboard2} alt="Template Dashboard Image 2" />}
</div>
)
}
);
};

export default TemplateHero
Loading

0 comments on commit 8993432

Please sign in to comment.