Skip to content

Commit fbbf0a9

Browse files
author
Alban Bailly
committed
code boxes
1 parent a01083f commit fbbf0a9

File tree

4 files changed

+37
-1
lines changed

4 files changed

+37
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from "react";
2+
3+
const CodeBox = ({ line1, line2, line3, line4, line5 }) => (
4+
<div className="code-box bg-ThemeBeige rounded md:my-8 mx-auto">
5+
<div className="code-box-header border-white flex justify-start py-4 px-6">
6+
<span className="code-box-circle circle-red" />
7+
<span className="code-box-circle circle-yellow" />
8+
<span className="code-box-circle circle-green" />
9+
</div>
10+
<div className="code-box-content py-4 px-6">
11+
<pre>{line1}</pre>
12+
<pre>{line2}</pre>
13+
<pre>{line3}</pre>
14+
<pre>{line4}</pre>
15+
<pre>{line5}</pre>
16+
</div>
17+
</div>
18+
);
19+
20+
export default CodeBox;

src/pages/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { graphql } from "gatsby";
33

44
import Layout from "../components/4_layouts/layout";
55
import SEO from "../components/0_utlilities/seo";
6+
import CodeBox from "../components/2_molecules/code-box";
67

78
const IndexPage = ({ data }) => {
89
const { edges } = data.allMarkdownRemark;
@@ -17,6 +18,10 @@ const IndexPage = ({ data }) => {
1718
<div className="text-2xl my-3 text-center font-light">
1819
All of the functionality of the Manager from the command line.
1920
</div>
21+
<CodeBox
22+
line1="pip install linode-cli"
23+
line2="linode-cli linodes create"
24+
/>
2025
{/* {{ partial "2_molecules/code-box.html" ( dict "Line1" "pip install linode-cli" "Line2" "linode-cli linodes create") }} */}
2126
<div className="mt-6 text-center">
2227
<a

src/pages/kubernetes.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react";
22
import Layout from "../components/4_layouts/layout";
33
import SEO from "../components/0_utlilities/seo";
4+
import CodeBox from "../components/2_molecules/code-box";
45

56
const KubernetesPage = () => {
67
return (
@@ -12,7 +13,12 @@ const KubernetesPage = () => {
1213
<h2 className="font-normal text-BaseGreenDark text-center">
1314
Create a Kubernetes Cluster with One Command
1415
</h2>
15-
<div className="flex justify-center mt-4">code box</div>
16+
<div className="flex justify-center mt-4">
17+
<CodeBox
18+
line1="pip install linode-cli"
19+
line2="linode-cli k8s-alpha create mycluster"
20+
/>
21+
</div>
1622
<div className="flex justify-center mb-10 mt-8 md:mt-0">
1723
<a
1824
className="btn"

src/pages/libraries-tools.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Layout from "../components/4_layouts/layout";
44
import SEO from "../components/0_utlilities/seo";
55
import Libraries from "../components/2_molecules/libraries";
66
import Tools from "../components/2_molecules/tools";
7+
import CodeBox from "../components/2_molecules/code-box";
78

89
const LibToolsPage = () => {
910
return (
@@ -21,6 +22,10 @@ const LibToolsPage = () => {
2122
<div className="flex mx-auto md:-mx-4 items-center md:justify-center flex-col-reverse md:flex-row mb-2 max-w-xs md:max-w-full">
2223
<div className="px-4 flex flex-wrap">
2324
<div style={{ width: 300 }}>
25+
<CodeBox
26+
line1="pip install linode-cli"
27+
line2="linode-cli linodes create"
28+
/>
2429
{/* {{ partial "2_molecules/code-box.html" ( dict "Line1" "pip install linode-cli" "Line2" "linode-cli linodes create") }} */}
2530
</div>
2631
<div className="mt-4 md:hidden flex w-full justify-center">

0 commit comments

Comments
 (0)