Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit 3430223

Browse files
committed
Adding demo styling
1 parent 4c7a8bd commit 3430223

File tree

7 files changed

+35
-19
lines changed

7 files changed

+35
-19
lines changed

components/atoms/Button/Button.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
&:hover,
1717
&:focus,
1818
&:active:not([disabled]) {
19-
@apply no-underline;
19+
@apply underline;
2020
}
2121

2222
/* SIZES */

components/atoms/RichText/RichText.module.css

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
@apply text-center;
44
}
55

6-
/* Paragraph Styles */
7-
&.p {
8-
@apply mb-4;
9-
}
10-
6+
/* List Styles */
117
&.ul,
128
&.ol {
9+
@apply mb-4;
10+
1311
& li {
1412
@apply mb-2 relative pl-6 list-none;
1513
}
@@ -22,7 +20,7 @@
2220

2321
/* Unordered Lists */
2422
&.ul {
25-
& li {
23+
& > li {
2624
&::before {
2725
@apply absolute block rounded-full;
2826

components/molecules/AlgoliaResults/templates/SearchResults.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import RichText from '@/components/atoms/RichText'
12
import PropTypes from 'prop-types'
23
import React from 'react'
34
import {connectStateResults, InfiniteHits} from 'react-instantsearch-dom'
@@ -31,7 +32,7 @@ const SearchResults = connectStateResults(({searchResults, indexName}) => {
3132
<>
3233
<div className={styles.resultsHeader}>
3334
<div>
34-
<h1>Search Results</h1>
35+
<RichText tag="h1">Search Results</RichText>
3536
<p className={styles.total}>
3637
<span>{searchResults.nbHits} Results</span> for{' '}
3738
{searchResults.query}

pages/[...slug].js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import getPostTypeStaticPaths from '@/api/wordpress/_global/getPostTypeStaticPaths'
22
import getPostTypeStaticProps from '@/api/wordpress/_global/getPostTypeStaticProps'
33
import Container from '@/components/atoms/Container'
4+
import RichText from '@/components/atoms/RichText'
45
import BlockGravityForm from '@/components/blocks/Gutenberg/BlockGravityForm'
56
import Layout from '@/components/common/Layout'
67
import Blocks from '@/components/molecules/Blocks'
@@ -24,8 +25,8 @@ export default function Page({post}) {
2425
return (
2526
<Layout seo={{...post?.seo}}>
2627
<Container>
27-
<article>
28-
<h1 dangerouslySetInnerHTML={{__html: post?.title}} />
28+
<article className="innerWrap">
29+
<RichText tag="h1">{post?.title}</RichText>
2930
<Blocks blocks={post?.blocks} />
3031
</article>
3132
{post?.slug === 'form-demo' && (

pages/blog/[[...slug]].js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import getPostTypeStaticProps from '@/api/wordpress/_global/getPostTypeStaticPro
55
import Breadcrumbs from '@/components/atoms/Breadcrumbs'
66
import Container from '@/components/atoms/Container'
77
import Text from '@/components/atoms/Inputs/Text'
8+
import RichText from '@/components/atoms/RichText'
89
import Layout from '@/components/common/Layout'
910
import Blocks from '@/components/molecules/Blocks'
1011
import Form from '@/components/molecules/Form'
@@ -69,11 +70,11 @@ export default function BlogPost({post, archive, posts, pagination}) {
6970
return (
7071
<Layout seo={{...post?.seo}} hasJsonLd={true}>
7172
<Container>
72-
<article>
73+
<article className="innerWrap">
7374
{!!post?.seo?.breadcrumbs && (
7475
<Breadcrumbs breadcrumbs={post.seo.breadcrumbs} />
7576
)}
76-
<h1 dangerouslySetInnerHTML={{__html: post?.title}} />
77+
<RichText tag="h1">{post?.title}</RichText>
7778
<Blocks blocks={post?.blocks} />
7879
<div
7980
dangerouslySetInnerHTML={{

pages/team/[[...slug]].js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import getPostTypeStaticPaths from '@/api/wordpress/_global/getPostTypeStaticPat
33
import getPostTypeStaticProps from '@/api/wordpress/_global/getPostTypeStaticProps'
44
import Breadcrumbs from '@/components/atoms/Breadcrumbs'
55
import Container from '@/components/atoms/Container'
6+
import RichText from '@/components/atoms/RichText'
67
import Layout from '@/components/common/Layout'
78
import Blocks from '@/components/molecules/Blocks'
89
import getPagePropTypes from '@/functions/getPagePropTypes'
@@ -63,11 +64,11 @@ export default function Team({post, archive, posts, pagination}) {
6364
return (
6465
<Layout seo={{...post?.seo}} hasJsonLd={true}>
6566
<Container>
66-
<article>
67+
<article className="innerWrap">
6768
{!!post?.seo?.breadcrumbs && (
6869
<Breadcrumbs breadcrumbs={post.seo.breadcrumbs} />
6970
)}
70-
<h1 dangerouslySetInnerHTML={{__html: post?.title}} />
71+
<RichText tag="h1">{post?.title}</RichText>
7172
<Blocks blocks={post?.blocks} />
7273
</article>
7374
</Container>

styles/demo.css

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
/* This file is for demo purposes only. */
2+
13
#page-content {
2-
/* Body Link Styles */
4+
/* Global Styles */
5+
6+
& .innerWrap {
7+
@apply max-w-5xl m-auto py-2;
8+
}
9+
310
& ul:not(.breadcrumbs),
411
& ol,
512
& p {
@@ -18,22 +25,29 @@
1825
& h2,
1926
& h3,
2027
& h4 {
21-
@apply mb-4 font-semibold;
28+
@apply mb-6 font-semibold;
2229
}
2330

2431
& h1 {
25-
@apply mb-8 text-3xl;
32+
@apply text-4xl;
2633
}
2734

2835
& h2 {
2936
@apply text-2xl;
3037
}
3138

3239
& h3 {
33-
@apply text-xl;
40+
@apply mb-4 text-xl;
3441
}
3542

3643
& h4 {
37-
@apply text-lg;
44+
@apply mb-4 text-lg;
45+
}
46+
47+
/* Rich Text Styles */
48+
& p,
49+
& ul,
50+
& ol {
51+
@apply mb-4;
3852
}
3953
}

0 commit comments

Comments
 (0)