on master help sign in
use larger typescale for blog, events, grants and media
commit7f77cf5cc30883f72529eecd674e0f3dc34bb06a authorGavin Atkinson <gvnatknsn@protonmail.com> dateThu 5 Aug 2021, 12:44 (5 years ago) parent2b365ba
13 files changed+202−187
components/BasicPage.js+1−1 pages/blog/[slug].js+1−2 pages/community/[[...slug]].js+1−2 pages/docs/[[...slug]].js+2−2 pages/events/[slug].js+2−2 pages/getting-started/[[...slug]].js+2−2 pages/grants/[slug].js+1−2 pages/media/[slug].js+2−2 pages/understanding-urbit/[[...slug]].js+2−2 pages/updates/[slug].js+2−2 pages/using/[[...slug]].js+2−2 styles/globals.css+184 styles/markdown.module.css−166
components/BasicPage.js+1−1
@@ -26,7 +26,7 @@ export default function BasicPage({ post, markdown, search }) {
2626 <Section narrow>
2727 <h1>{post.title}</h1>
2828 </Section>
29− <Section narrow className={markdownStyles["markdown"]}>
29+ <Section narrow className="markdown">
3030 <article
3131 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
3232 ></article>
pages/blog/[slug].js+1−2
@@ -17,7 +17,6 @@ import SingleColumn from "../../components/SingleColumn";
1717import Section from "../../components/Section";
1818import Contact from "../../components/Contact";
1919import PostPreview from "../../components/PostPreview";
20−import markdownStyles from "../../styles/markdown.module.css";
2120import { decode } from "html-entities";
2221
2322export default function Post({
@@ -53,7 +52,7 @@ export default function Post({
5352 {formatDate(new Date(post.date))}
5453 </div>
5554 </Section>
56− <Section narrow className={markdownStyles["markdown"]}>
55+ <Section narrow className="markdown large-typescale">
5756 <article
5857 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
5958 ></article>
pages/community/[[...slug]].js+1−2
@@ -9,7 +9,6 @@ import Meta from "../../components/Meta";
99import Markdown from "../../components/Markdown";
1010import ContentArea from "../../components/ContentArea";
1111import Sidebar from "../../components/Sidebar";
12−import markdownStyles from "../../styles/markdown.module.css";
1312import { decode } from "html-entities";
1413
1514const breadcrumbs = (posts, paths) => {
@@ -78,7 +77,7 @@ export default function UsingLayout({ posts, data, params, search, markdown }) {
7877 section={"Community"}
7978 params={params}
8079 >
81− <div className={markdownStyles["markdown"]}>
80+ <div className="markdown">
8281 <article
8382 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
8483 ></article>
pages/docs/[[...slug]].js+2−2
@@ -15,7 +15,7 @@ import Pagination from "../../components/Pagination";
1515import Markdown from "../../components/Markdown";
1616import ContentArea from "../../components/ContentArea";
1717import Sidebar from "../../components/Sidebar";
18−import markdownStyles from "../../styles/markdown.module.css";
18+
1919import { decode } from "html-entities";
2020
2121const breadcrumbs = (posts, paths) => {
@@ -145,7 +145,7 @@ export default function DocsLayout({
145145 section="Urbit Documentation"
146146 params={params}
147147 >
148− <div className={markdownStyles["markdown"]}>
148+ <div className="markdown">
149149 <article
150150 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
151151 ></article>
pages/events/[slug].js+2−2
@@ -16,7 +16,7 @@ import SingleColumn from "../../components/SingleColumn";
1616import Contact from "../../components/Contact";
1717import EventPreview from "../../components/EventPreview";
1818import Section from "../../components/Section";
19−import markdownStyles from "../../styles/markdown.module.css";
19+
2020import { decode } from "html-entities";
2121
2222export default function Event({
@@ -73,7 +73,7 @@ export default function Event({
7373 ></iframe>
7474 ) : null}
7575 </Section>
76− <Section narrow className={markdownStyles["markdown"]}>
76+ <Section narrow className="markdown large-typescale">
7777 <article
7878 className="pt-12 w-full"
7979 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
pages/getting-started/[[...slug]].js+2−2
@@ -8,7 +8,7 @@ import { buildPageTree, getPage } from "../../lib/lib";
88import Markdown from "../../components/Markdown";
99import ContentArea from "../../components/ContentArea";
1010import Sidebar from "../../components/Sidebar";
11−import markdownStyles from "../../styles/markdown.module.css";
11+
1212import { decode } from "html-entities";
1313
1414const breadcrumbs = (posts, paths) => {
@@ -95,7 +95,7 @@ export default function UsingLayout({ posts, data, params, search, markdown }) {
9595 section={"Getting Started"}
9696 params={params}
9797 >
98− <div className={markdownStyles["markdown"]}>
98+ <div className="markdown">
9999 <article
100100 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
101101 ></article>
pages/grants/[slug].js+1−2
@@ -17,7 +17,6 @@ import Footer from "../../components/Footer";
1717import SingleColumn from "../../components/SingleColumn";
1818import GrantPreview from "../../components/GrantPreview";
1919import Section from "../../components/Section";
20−import markdownStyles from "../../styles/markdown.module.css";
2120
2221export default function Grant({ post, markdown, search, similarGrants }) {
2322 const router = useRouter();
@@ -68,7 +67,7 @@ export default function Grant({ post, markdown, search, similarGrants }) {
6867 ))}
6968 </div>
7069 </Section>
71− <Section narrow className={markdownStyles["markdown"]}>
70+ <Section narrow className="markdown large-typescale">
7271 <article dangerouslySetInnerHTML={{ __html: decode(markdown) }} />
7372 </Section>
7473 {canApply && (
pages/media/[slug].js+2−2
@@ -10,7 +10,7 @@ import Footer from "../../components/Footer";
1010import SingleColumn from "../../components/SingleColumn";
1111import Contact from "../../components/Contact";
1212import Section from "../../components/Section";
13−import markdownStyles from "../../styles/markdown.module.css";
13+
1414import { decode } from "html-entities";
1515
1616export default function MediaPage({ post, markdown, search }) {
@@ -63,7 +63,7 @@ export default function MediaPage({ post, markdown, search }) {
6363 ></iframe>
6464 ) : null}
6565 </Section>
66− <Section narrow className={markdownStyles["markdown"]}>
66+ <Section narrow className="markdown large-typescale">
6767 <article
6868 className="pt-12 w-full"
6969 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
pages/understanding-urbit/[[...slug]].js+2−2
@@ -14,7 +14,7 @@ import Markdown from "../../components/Markdown";
1414import ContentArea from "../../components/ContentArea";
1515import Sidebar from "../../components/Sidebar";
1616import Pagination from "../../components/Pagination";
17−import markdownStyles from "../../styles/markdown.module.css";
17+
1818import { decode } from "html-entities";
1919
2020const breadcrumbs = (posts, paths) => {
@@ -108,7 +108,7 @@ export default function UnderstandingLayout({
108108 section={"Understanding Urbit"}
109109 params={params}
110110 >
111− <div className={markdownStyles["markdown"]}>
111+ <div className="markdown">
112112 <article
113113 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
114114 ></article>
pages/updates/[slug].js+2−2
@@ -16,7 +16,7 @@ import Footer from "../../components/Footer";
1616import SingleColumn from "../../components/SingleColumn";
1717import Section from "../../components/Section";
1818import Contact from "../../components/Contact";
19−import markdownStyles from "../../styles/markdown.module.css";
19+
2020import { decode } from "html-entities";
2121
2222export default function Post({
@@ -52,7 +52,7 @@ export default function Post({
5252 {formatDate(new Date(post.date))}
5353 </div>
5454 </Section>
55− <Section narrow className={markdownStyles["markdown"]}>
55+ <Section narrow className="markdown">
5656 <article
5757 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
5858 ></article>
pages/using/[[...slug]].js+2−2
@@ -9,7 +9,7 @@ import { getDocs, formatDate, buildPageTree, getPage } from "../../lib/lib";
99import Markdown from "../../components/Markdown";
1010import ContentArea from "../../components/ContentArea";
1111import Sidebar from "../../components/Sidebar";
12−import markdownStyles from "../../styles/markdown.module.css";
12+
1313import { decode } from "html-entities";
1414
1515const breadcrumbs = (posts, paths) => {
@@ -115,7 +115,7 @@ export default function UsingLayout({ posts, data, params, search, markdown }) {
115115 section={"Operator's Manual"}
116116 params={params}
117117 >
118− <div className={markdownStyles["markdown"]}>
118+ <div className="markdown">
119119 <article
120120 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
121121 ></article>
styles/globals.css+184
@@ -207,3 +207,187 @@ a:hover {
207207 position: static !important;
208208 border-radius: 0 !important;
209209}
210+
211+.markdown *:last-child {
212+ @apply pb-0 mb-0;
213+}
214+
215+.markdown *:first-child {
216+ @apply pt-0 mt-0;
217+}
218+
219+.markdown *:first-child figure {
220+ @apply pt-0 mt-0;
221+}
222+
223+.markdown p,
224+.markdown ul,
225+.markdown ol,
226+.markdown blockquote {
227+ @apply my-8;
228+}
229+
230+.markdown h1 {
231+ @apply text-3xl md:text-4xl lg:text-5xl font-bold mt-24 mb-12;
232+}
233+
234+.markdown.large-typescale h1 {
235+ @apply text-4xl md:text-5xl lg:text-6xl font-bold mt-24 mb-12;
236+}
237+
238+.markdown h2 {
239+ @apply text-2xl md:text-3xl lg:text-4xl font-bold mt-16 mb-12;
240+}
241+
242+.markdown.large-typescale h2 {
243+ @apply text-3xl md:text-4xl lg:text-5xl font-bold mt-16 mb-12;
244+}
245+
246+.markdown h3 {
247+ @apply text-lg md:text-xl lg:text-2xl font-semibold mt-8 mb-8;
248+}
249+
250+.markdown.large-typescale h3 {
251+ @apply text-xl md:text-2xl lg:text-3xl font-semibold mt-8 mb-8;
252+}
253+
254+.markdown h4 {
255+ @apply text-base md:text-lg lg:text-xl font-semibold mt-4 mb-4;
256+}
257+
258+.markdown.large-typescale h4 {
259+ @apply text-lg md:text-xl lg:text-2xl font-semibold mt-4 mb-4;
260+}
261+
262+.markdown p {
263+ @apply text-base md:text-lg lg:text-xl leading-relaxed;
264+}
265+
266+.markdown.large-typescale p {
267+ @apply text-lg md:text-xl lg:text-2xl leading-relaxed;
268+}
269+
270+.markdown img {
271+ width: 100%;
272+ height: auto;
273+ @apply rounded-lg;
274+}
275+
276+.markdown figure {
277+ position: relative;
278+ @apply mt-12 mb-12 z-0;
279+}
280+
281+.markdown figure {
282+ width: 100%;
283+ left: 0;
284+}
285+
286+@media (min-width: 768px) {
287+ .markdown figure {
288+ width: 125%;
289+ left: -12.5%;
290+ }
291+}
292+
293+.markdown pre,
294+.markdown pre[class*="language-"] {
295+}
296+
297+.markdown code,
298+.markdown code[class*="language-"] {
299+ @apply px-2 py-0.5 bg-wall rounded-md;
300+}
301+
302+.markdown a code,
303+.markdown a code[class*="language-"] {
304+ @apply bg-washedGreen;
305+}
306+
307+.markdown pre code,
308+.markdown pre[class*="language-"] code {
309+ @apply p-4 md:p-8 rounded-xl;
310+}
311+
312+.markdown ul {
313+ list-style: outside;
314+ list-style-type: disc;
315+}
316+
317+.markdown ol {
318+ list-style: outside;
319+ list-style-type: decimal;
320+}
321+
322+.markdown li {
323+ @apply py-2 ml-6 text-base md:text-lg lg:text-xl;
324+}
325+
326+.markdown.large-typescale li {
327+ @apply py-2 ml-6 text-lg md:text-xl lg:text-2xl;
328+}
329+
330+.markdown li a,
331+.markdown h3 a,
332+.markdown h2 a {
333+ @apply text-green;
334+}
335+
336+.markdown blockquote {
337+ @apply border-l-4 border-deepWall pl-6 italic;
338+}
339+.markdown blockquote cite {
340+ @apply not-italic font-semibold;
341+}
342+
343+.markdown table {
344+ border-collapse: separate;
345+ border-spacing: 0;
346+ min-width: 350px;
347+}
348+
349+.markdown table tr th,
350+.markdown table tr td {
351+ border-right-width: 2px;
352+ border-right-style: solid;
353+ border-bottom-width: 2px;
354+ border-bottom-style: solid;
355+ padding: 8px !important;
356+ @apply border-wall;
357+}
358+
359+.markdown table tr th:first-child,
360+.markdown table tr td:first-child {
361+ border-left-width: 2px;
362+ border-left-style: solid;
363+ @apply border-wall;
364+}
365+
366+.markdown table tr th {
367+ background: rgba(240, 239, 236, 0.33);
368+ border-top-width: 2px;
369+ border-top-style: solid;
370+ text-align: left;
371+ vertical-align: middle;
372+ @apply border-wall;
373+}
374+
375+/* top-left border-radius */
376+.markdown table tr:first-child th:first-child {
377+ border-top-left-radius: 8px;
378+}
379+
380+/* top-right border-radius */
381+.markdown table tr:first-child th:last-child {
382+ border-top-right-radius: 8px;
383+}
384+
385+/* bottom-left border-radius */
386+.markdown table tr:last-child td:first-child {
387+ border-bottom-left-radius: 8px;
388+}
389+
390+/* bottom-right border-radius */
391+.markdown table tr:last-child td:last-child {
392+ border-bottom-right-radius: 8px;
393+}
styles/markdown.module.cssdeleted−166
@@ -1,166 +0,0 @@
1−.markdown {
2− /* @apply leading-relaxed; */
3− /* max-width: ; */
4− /* @apply w-full md:w-8/12 px-4 md:px-0 pb-20 md:pb-32 lg:pb-48; */
5−}
6−
7−.markdown *:last-child {
8− @apply pb-0 mb-0;
9−}
10−
11−.markdown *:first-child {
12− @apply pt-0 mt-0;
13−}
14−
15−.markdown *:first-child figure {
16− @apply pt-0 mt-0;
17−}
18−
19−.markdown p,
20−.markdown ul,
21−.markdown ol,
22−.markdown blockquote {
23− @apply my-8;
24−}
25−
26−.markdown h1 {
27− @apply text-3xl md:text-4xl lg:text-5xl font-bold mt-24 mb-12;
28−}
29−
30−.markdown h2 {
31− @apply text-2xl md:text-3xl lg:text-4xl font-bold mt-16 mb-12;
32−}
33−
34−.markdown h3 {
35− @apply text-lg md:text-xl lg:text-2xl font-semibold mt-8 mb-8;
36−}
37−
38−.markdown h4 {
39− @apply text-base md:text-lg lg:text-xl font-semibold mt-4 mb-4;
40−}
41−
42−.markdown p {
43− @apply text-base md:text-lg lg:text-xl leading-relaxed;
44−}
45−
46−.markdown img {
47− width: 100%;
48− height: auto;
49− @apply rounded-lg;
50−}
51−
52−.markdown figure {
53− position: relative;
54− @apply mt-12 mb-12 z-0;
55−}
56−
57−.markdown figure {
58− width: 100%;
59− left: 0;
60−}
61−
62−@media (min-width: 768px) {
63− .markdown figure {
64− width: 125%;
65− left: -12.5%;
66− }
67−}
68−
69−.markdown pre,
70−.markdown pre[class*="language-"] {
71−}
72−
73−.markdown code,
74−.markdown code[class*="language-"] {
75− @apply px-2 py-0.5 bg-wall rounded-md;
76−}
77−
78−.markdown a code,
79−.markdown a code[class*="language-"] {
80− @apply bg-washedGreen;
81−}
82−
83−.markdown pre code,
84−.markdown pre[class*="language-"] code {
85− @apply p-4 md:p-8 rounded-xl;
86−}
87−
88−.markdown ul {
89− list-style: outside;
90− list-style-type: disc;
91−}
92−
93−.markdown ol {
94− list-style: outside;
95− list-style-type: decimal;
96−}
97−
98−.markdown li {
99− font-size: 20px;
100− @apply py-2 ml-6 text-base md:text-lg lg:text-xl;
101−}
102−
103−.markdown li a,
104−.markdown h3 a,
105−.markdown h2 a {
106− @apply text-green;
107−}
108−
109−.markdown blockquote {
110− @apply border-l-4 border-deepWall pl-6 italic;
111−}
112−.markdown blockquote cite {
113− @apply not-italic font-semibold;
114−}
115−
116−.markdown table {
117− border-collapse: separate;
118− border-spacing: 0;
119− min-width: 350px;
120−}
121−
122−.markdown table tr th,
123−.markdown table tr td {
124− border-right-width: 2px;
125− border-right-style: solid;
126− border-bottom-width: 2px;
127− border-bottom-style: solid;
128− padding: 8px !important;
129− @apply border-wall;
130−}
131−
132−.markdown table tr th:first-child,
133−.markdown table tr td:first-child {
134− border-left-width: 2px;
135− border-left-style: solid;
136− @apply border-wall;
137−}
138−
139−.markdown table tr th {
140− background: rgba(240, 239, 236, 0.33);
141− border-top-width: 2px;
142− border-top-style: solid;
143− text-align: left;
144− vertical-align: middle;
145− @apply border-wall;
146−}
147−
148−/* top-left border-radius */
149−.markdown table tr:first-child th:first-child {
150− border-top-left-radius: 8px;
151−}
152−
153−/* top-right border-radius */
154−.markdown table tr:first-child th:last-child {
155− border-top-right-radius: 8px;
156−}
157−
158−/* bottom-left border-radius */
159−.markdown table tr:last-child td:first-child {
160− border-bottom-left-radius: 8px;
161−}
162−
163−/* bottom-right border-radius */
164−.markdown table tr:last-child td:last-child {
165− border-bottom-right-radius: 8px;
166−}