1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-04 13:17:48 +02:00

Add product hunt badge

This commit is contained in:
Phuoc Nguyen
2019-12-02 21:24:01 +07:00
parent 4bcf4f6af1
commit af97b83447
5 changed files with 41 additions and 3 deletions

View File

@@ -1,3 +1,5 @@
[![Vote for me on ProductHunt](https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=176424&theme=light)](https://www.producthunt.com/posts/css-layout?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-css-layout)
# CSS Layout # CSS Layout
A collection of popular layouts and patterns made with CSS: A collection of popular layouts and patterns made with CSS:

View File

@@ -2,7 +2,8 @@ import React from 'react';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import useDocumentTitle from '../hooks/useDocumentTitle'; import useDocumentTitle from '../hooks/useDocumentTitle';
import Layout from './Layout'; import Footer from './Footer';
import ProductHuntBadge from './ProductHuntBadge';
interface DetailsLayoutProps { interface DetailsLayoutProps {
title: string; title: string;
@@ -12,7 +13,10 @@ const DetailsLayout: React.FC<DetailsLayoutProps> = ({ title, children }) => {
useDocumentTitle(`CSS Layout ∙ ${title}`); useDocumentTitle(`CSS Layout ∙ ${title}`);
return ( return (
<Layout> <div style={{ margin: '0 auto 64px auto', maxWidth: '1024px', position: 'relative' }}>
<div style={{ position: 'absolute', right: 0, top: '24px' }}>
<ProductHuntBadge />
</div>
<div <div
style={{ style={{
alignItems: 'center', alignItems: 'center',
@@ -70,7 +74,8 @@ const DetailsLayout: React.FC<DetailsLayoutProps> = ({ title, children }) => {
</h1> </h1>
{children} {children}
</div> </div>
</Layout> <Footer />
</div>
); );
}; };

View File

@@ -0,0 +1,21 @@
import React from 'react';
const ProductHuntBadge: React.FC<{}> = () => {
return (
<a
href="https://www.producthunt.com/posts/css-layout?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-css-layout"
target="_blank"
>
<img
src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=176424&theme=light"
alt="CSS Layout - Most popular layouts and patterns that can be built with CSS | Product Hunt Embed"
style={{
height: '54px',
width: '250px',
}}
/>
</a>
);
};
export default ProductHuntBadge;

View File

@@ -6,6 +6,7 @@ import Heading from '../components/Heading';
import Pattern from '../constants/Pattern'; import Pattern from '../constants/Pattern';
import useDocumentTitle from '../hooks/useDocumentTitle'; import useDocumentTitle from '../hooks/useDocumentTitle';
import Layout from '../layouts/Layout'; import Layout from '../layouts/Layout';
import ProductHuntBadge from '../layouts/ProductHuntBadge';
const ExplorePage = () => { const ExplorePage = () => {
useDocumentTitle('CSS Layout ∙ Explore'); useDocumentTitle('CSS Layout ∙ Explore');
@@ -67,6 +68,10 @@ const ExplorePage = () => {
All covers you see in this page are made with CSS only. Inspect them! 🎉 All covers you see in this page are made with CSS only. Inspect them! 🎉
</div> </div>
<div style={{ margin: '24px 0', textAlign: 'center' }}>
<ProductHuntBadge />
</div>
<section> <section>
<Heading title="Layouts" /> <Heading title="Layouts" />

View File

@@ -7,6 +7,7 @@ import CoverCard from '../components/CoverCard';
import Pattern from '../constants/Pattern'; import Pattern from '../constants/Pattern';
import useDocumentTitle from '../hooks/useDocumentTitle'; import useDocumentTitle from '../hooks/useDocumentTitle';
import Layout from '../layouts/Layout'; import Layout from '../layouts/Layout';
import ProductHuntBadge from '../layouts/ProductHuntBadge';
import MadeOf from './MadeOf'; import MadeOf from './MadeOf';
const HomePage = () => { const HomePage = () => {
@@ -76,6 +77,10 @@ const HomePage = () => {
</div> </div>
</div> </div>
<div style={{ margin: '24px 0', textAlign: 'center' }}>
<ProductHuntBadge />
</div>
<div <div
className="hljs" className="hljs"
style={{ style={{