Skip to content

Commit cafac5a

Browse files
committed
feat(docs): added api versioning page
1 parent 7bb6ee8 commit cafac5a

File tree

6 files changed

+174
-3
lines changed

6 files changed

+174
-3
lines changed

app/Http/Controllers/DocumentationController.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,28 @@ public function index()
99
return view('docs.index');
1010
}
1111

12+
public function versions()
13+
{
14+
return view('docs.versions');
15+
}
16+
1217
public function integrations()
1318
{
1419
return view('docs.integrations.index');
1520
}
21+
22+
public function integrationsBingMaps()
23+
{
24+
return view('docs.integrations.bing-maps');
25+
}
26+
27+
public function integrationGoogleMaps()
28+
{
29+
return view('docs.integrations.google-maps');
30+
}
31+
32+
public function integrationsMapbox()
33+
{
34+
return view('docs.integrations.mapbox');
35+
}
1636
}

public/css/app.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,9 @@ video {
10321032
.inline-flex {
10331033
display: inline-flex;
10341034
}
1035+
.table {
1036+
display: table;
1037+
}
10351038
.grid {
10361039
display: grid;
10371040
}
@@ -1291,6 +1294,22 @@ video {
12911294
--tw-text-opacity: 1;
12921295
color: rgb(203 213 225 / var(--tw-text-opacity));
12931296
}
1297+
.text-red-800 {
1298+
--tw-text-opacity: 1;
1299+
color: rgb(153 27 27 / var(--tw-text-opacity));
1300+
}
1301+
.text-red-400 {
1302+
--tw-text-opacity: 1;
1303+
color: rgb(248 113 113 / var(--tw-text-opacity));
1304+
}
1305+
.text-green-400 {
1306+
--tw-text-opacity: 1;
1307+
color: rgb(74 222 128 / var(--tw-text-opacity));
1308+
}
1309+
.text-orange-400 {
1310+
--tw-text-opacity: 1;
1311+
color: rgb(251 146 60 / var(--tw-text-opacity));
1312+
}
12941313
.no-underline {
12951314
-webkit-text-decoration-line: none;
12961315
text-decoration-line: none;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<div class="prose prose-invert max-w-full bg-slate-800 p-12 rounded-xl">
1+
<div {{ $attributes->merge(['class' => 'prose prose-invert max-w-full bg-slate-800 p-12 rounded-xl']) }}>
22
{{ $slot }}
33
</div>

resources/views/components/docs-layout.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div>
88
<div class="mb-6">
99
<a href="/documentation" class="block mb-1">Getting Started</a>
10-
<a href="/documentation/api-versioning" class="block mb-1">API Versioning</a>
10+
<a href="/documentation/versions" class="block mb-1">API Versions</a>
1111
</div>
1212

1313
<div class="mb-6">
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
@extends('layouts.app-nav')
2+
3+
@section('content')
4+
<x-docs-layout>
5+
6+
<x-docs-box class="mb-8">
7+
<x-icon-spectrum icon="fa-boxes" class="opacity-40" iconClass="-mr-12 w-[49px]" />
8+
9+
<h2>API Versions</h2>
10+
11+
<p>
12+
We have a few different versions of our API live. This is because we understand what we offer developers: a
13+
simple reliable service that makes their job easier by ensuring your applications continue to work with
14+
minimal maintenance.
15+
</p>
16+
17+
<table>
18+
<thead>
19+
<tr>
20+
<td>Version</td>
21+
<td>Output Format</td>
22+
<td>Year Introduced</td>
23+
<td>Support Status</td>
24+
<td>Description</td>
25+
</tr>
26+
</thead>
27+
<tbody>
28+
<tr>
29+
<td>Legacy</td>
30+
<td>png</td>
31+
<td>2016</td>
32+
<td class="text-orange-400">DEPRECATED</td>
33+
<td>A POC so basic we didn't see the need for API versioning yet.</td>
34+
</tr>
35+
<tr>
36+
<td>v1</td>
37+
<td>png</td>
38+
<td>2018</td>
39+
<td class="text-green-400">LTS</td>
40+
<td>Our fist versioned API capable of pins, icons, and icon stacks.</td>
41+
</tr>
42+
<tr>
43+
<td>v2</td>
44+
<td>png</td>
45+
<td>2022</td>
46+
<td class="text-green-400">Active</td>
47+
<td>We have learned a few things and made rendering icons even better.</td>
48+
</tr>
49+
</tbody>
50+
</table>
51+
</x-docs-box>
52+
53+
<x-docs-box>
54+
<h2>API Version &amp; Feature Compatibility</h2>
55+
56+
<table>
57+
<thead>
58+
<tr>
59+
<td>Feature</td>
60+
<td>Legacy</td>
61+
<td>v1</td>
62+
<td>v2</td>
63+
</tr>
64+
</thead>
65+
<tbody>
66+
<tr>
67+
<td>Pins with Text</td>
68+
<td class="text-green-400">Yes</td>
69+
<td class="text-green-400">Yes</td>
70+
<td class="text-green-400">Yes</td>
71+
</tr>
72+
<tr>
73+
<td>Pins with Icon</td>
74+
<td class="text-green-400">Yes</td>
75+
<td class="text-green-400">Yes</td>
76+
<td class="text-green-400">Yes</td>
77+
</tr>
78+
<tr>
79+
<td>Icons</td>
80+
<td class="text-green-400">Yes</td>
81+
<td class="text-green-400">Yes</td>
82+
<td class="text-green-400">Yes</td>
83+
</tr>
84+
<tr>
85+
<td>Icon Stacks</td>
86+
<td class="text-green-400">Yes</td>
87+
<td class="text-green-400">Yes</td>
88+
<td class="text-green-400">Yes</td>
89+
</tr>
90+
<tr>
91+
<td>Font-Awesome 4</td>
92+
<td class="text-green-400">Yes</td>
93+
<td class="text-green-400">Yes</td>
94+
<td class="text-red-400">No</td>
95+
</tr>
96+
<tr>
97+
<td>Font-Awesome 5</td>
98+
<td class="text-red-400">No</td>
99+
<td class="text-green-400">Yes</td>
100+
<td class="text-green-400">Yes</td>
101+
</tr>
102+
<tr>
103+
<td>Font-Awesome 6</td>
104+
<td class="text-red-400">No</td>
105+
<td class="text-red-400">No</td>
106+
<td class="text-green-400">Yes</td>
107+
</tr>
108+
<tr>
109+
<td>Improved Auto-Centering</td>
110+
<td class="text-red-400">No</td>
111+
<td class="text-red-400">No</td>
112+
<td class="text-green-400">Yes</td>
113+
</tr>
114+
<tr>
115+
<td>Improved Sizing</td>
116+
<td class="text-red-400">No</td>
117+
<td class="text-red-400">No</td>
118+
<td class="text-green-400">Yes</td>
119+
</tr>
120+
</tbody>
121+
</table>
122+
</x-docs-box>
123+
124+
</x-docs-layout>
125+
@endsection

routes/web.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@
3232
*/
3333
Route::group(['prefix' => 'documentation'], function () {
3434
Route::get('/', [DocumentationController::class, 'index']);
35-
Route::get('/integrations', [DocumentationController::class, 'integrations']);
35+
Route::get('/versions', [DocumentationController::class, 'versions']);
36+
37+
Route::group(['prefix' => 'integrations'], function () {
38+
Route::get('/', [DocumentationController::class, 'integrations']);
39+
Route::get('/bing-maps', [DocumentationController::class, 'integrationsBingMaps']);
40+
Route::get('/google-maps', [DocumentationController::class, 'integrationsGoogleMaps']);
41+
Route::get('/mapbox', [DocumentationController::class, 'integrationsMapbox']);
42+
});
3643
});
3744

3845
/*

0 commit comments

Comments
 (0)