Skip to content

Commit 02a38cd

Browse files
committed
change styling and add new section
1 parent 63fa197 commit 02a38cd

7 files changed

Lines changed: 106 additions & 7 deletions

File tree

docs/docusaurus.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type * as Preset from '@docusaurus/preset-classic';
44

55
const config: Config = {
66
title: 'Postcodes.io',
7-
tagline: 'Postcode & geolocation API for the UK',
7+
tagline: 'Free, Open Source and based solely on Open Data',
88
favicon: 'img/favicon.ico',
99

1010
// Set the production url of your site here

docs/src/components/Demos/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default function HomepageDemos(): JSX.Element {
135135
<section className={styles.features}>
136136
<div className={styles.container}>
137137
<div className={styles.header}>
138-
<h2>API Endpoint & Methods</h2>
138+
<h3>API Endpoint & Methods</h3>
139139
<select
140140
value={selectedDemo}
141141
onChange={(e) => setSelectedDemo(e.target.value)}

docs/src/components/Demos/styles.module.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.features {
22
padding: 2rem 0;
33
width: 100%;
4-
margin-top: 100px;
54
}
65

76
.container {
@@ -43,8 +42,6 @@
4342
justify-content: center;
4443
align-items: center;
4544
margin: 50px 0 50px 0;
46-
padding-bottom: 50px;
47-
border-bottom: 1px solid #888;
4845
}
4946

5047
.endpointContainer {
@@ -88,6 +85,11 @@
8885
margin-left: -10px;
8986
}
9087

88+
.payload,
89+
.result {
90+
text-align: left;
91+
}
92+
9193
button {
9294
margin-left: auto;
9395
font-size: 1em;

docs/src/components/HomepageFeatures/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ export default function HomepageFeatures(): JSX.Element {
6565
return (
6666
<section className={styles.features}>
6767
<div className="container">
68+
<div className={clsx(styles.intro, "row")}>
69+
<p>
70+
A short paragraph about postcodes.io and something like built by
71+
developers for developers. e.g Postcodes.io is an open-source
72+
project maintained by Ideal Postcodes, offering a free resource for
73+
developers to query UK postcode data via a JSON HTTP API.{" "}
74+
</p>
75+
</div>
6876
<div className="row">
6977
{FeatureList.map((props, idx) => (
7078
<Feature key={idx} {...props} />

docs/src/components/HomepageFeatures/styles.module.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
.intro {
2+
padding: 0 100px 0 100px;
3+
margin-bottom: 80px;
4+
text-align: center;
5+
}
6+
17
.features {
28
display: flex;
39
align-items: center;
410
padding: 2rem 0;
511
width: 100%;
6-
margin-top: 100px;
12+
margin: 180px 0;
713
}
814

915
.featureSvg {

docs/src/pages/index.module.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,30 @@
1010
overflow: hidden;
1111
}
1212

13+
.section {
14+
margin: 180px 0;
15+
text-align: center;
16+
}
17+
18+
.sectionAlt {
19+
margin: 180px 0;
20+
text-align: center;
21+
background-color: var(--ifm-color-emphasis-100);
22+
padding: 80px 100px;
23+
}
24+
25+
.section h2,
26+
.sectionAlt h2 {
27+
font-size: 2.5rem;
28+
margin-bottom: 5rem;
29+
}
30+
31+
.section h3,
32+
.sectionAlt h3 {
33+
font-size: 1.5rem;
34+
margin-bottom: 2rem;
35+
}
36+
1337
@media screen and (max-width: 996px) {
1438
.heroBanner {
1539
padding: 2rem;

docs/src/pages/index.tsx

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,66 @@ export default function Home(): JSX.Element {
5050
<HomepageHeader />
5151
<main>
5252
<HomepageFeatures />
53-
<HomepageDemos />
53+
<section className={styles.section}>
54+
<div className="container">
55+
<div className="row">
56+
<div className="col">
57+
<h2 className="text--center">How to use Postcodes.io</h2>
58+
</div>
59+
</div>
60+
<div className="row">
61+
<div className="col">
62+
<h3 className="text--center">Use Our Endpoints </h3>
63+
<p className="text--center">
64+
Easiest and quickest way to get started is to use our public,
65+
hosted endpoints to query data directly. No installation
66+
required
67+
</p>
68+
</div>
69+
<div className="col">
70+
<h3 className="text--center">Self-host the Service </h3>
71+
<p className="text--center">
72+
For complete control over the data and environment, just clone
73+
the repository and run it on your own servers. SQL?
74+
</p>
75+
</div>
76+
<div className="col">
77+
<h3 className="text--center">Contribute or Fork </h3>
78+
<p className="text--center">
79+
We love community input! Tailor Postcodes.io to your needs by
80+
adding features or modify the functionality.
81+
</p>
82+
</div>
83+
</div>
84+
<div className="row" style={{ marginTop: "3rem" }}>
85+
<div className="col text--center">
86+
<HomepageDemos />
87+
<Link
88+
className="button button--primary button--lg"
89+
to="/docs/overview"
90+
>
91+
View the Documentation
92+
</Link>
93+
</div>
94+
</div>
95+
</div>
96+
</section>
97+
<section className={styles.sectionAlt}>
98+
<div className="container">
99+
<div className="row">
100+
<div className="col col--6 col--offset-3">
101+
<h3 className="text--center">
102+
When You Need More Than Open Data
103+
</h3>
104+
<p className="text--center">
105+
Postcodes.io is a free, open source API for postcode data.
106+
It's a great way to get started with postcode data, but if you
107+
need more, we recommend using a commercial postcode service.
108+
</p>
109+
</div>
110+
</div>
111+
</div>
112+
</section>
54113
</main>
55114
</Layout>
56115
);

0 commit comments

Comments
 (0)