Skip to content

Commit 051705a

Browse files
committed
Ditch Vue component in favor of simple scrolling table
Better Algolia indexing and stuff and just simpler overall.
1 parent 25ef019 commit 051705a

File tree

4 files changed

+25
-63
lines changed

4 files changed

+25
-63
lines changed

docs/source/_assets/js/app.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ window.anchors = new anchorJS()
55
window.Vue = require('vue')
66

77
Vue.component('responsive-code-sample', require('./components/ResponsiveCodeSample.vue'))
8-
Vue.component('class-table', require('./components/ClassTable.vue'))
98

109
const app = new Vue({
1110
el: '#app'

docs/source/_assets/js/components/ClassTable.vue

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
1-
<div>
2-
<class-table :rows="{{ json_encode($rows) }}"></class-table>
1+
<div class="border-t border-b border-grey-light">
2+
<div class="max-h-sm overflow-y-scroll">
3+
<table class="w-full text-left table-collapse">
4+
<thead>
5+
<tr>
6+
<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest">Class</th>
7+
<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest">Properties</th>
8+
<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest">Description</th>
9+
</tr>
10+
</thead>
11+
<tbody class="align-baseline">
12+
@foreach ($rows as $row)
13+
<tr>
14+
<td class="p-2 border-t {{ $loop->first ? 'border-smoke' : 'border-smoke-light' }} font-mono text-xs text-purple-dark whitespace-no-wrap">{{ $row[0] }}</td>
15+
<td class="p-2 border-t {{ $loop->first ? 'border-smoke' : 'border-smoke-light' }} font-mono text-xs text-blue-dark whitespace-pre">{{ $row[1] }}</td>
16+
<td class="p-2 border-t {{ $loop->first ? 'border-smoke' : 'border-smoke-light' }} text-sm text-grey-darker whitespace-no-wrap lg:whitespace-normal">{{ $row[2] }}</td>
17+
</tr>
18+
@endforeach
19+
</tbody>
20+
</table>
21+
</div>
322
</div>
4-
{{-- <div class="border-t border-grey-lighter">
5-
<table class="w-full text-left table-collapse">
6-
<thead>
7-
<tr>
8-
<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest">Class</th>
9-
<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest">Properties</th>
10-
<th class="text-sm font-semibold text-grey-darker p-2 bg-grey-lightest">Description</th>
11-
</tr>
12-
</thead>
13-
<tbody class="align-baseline">
14-
@foreach ($rows as $row)
15-
<tr>
16-
<td class="p-2 border-t {{ $loop->first ? 'border-smoke' : 'border-smoke-light' }} font-mono text-xs text-purple-dark whitespace-no-wrap">{{ $row[0] }}</td>
17-
<td class="p-2 border-t {{ $loop->first ? 'border-smoke' : 'border-smoke-light' }} font-mono text-xs text-blue-dark whitespace-pre">{{ $row[1] }}</td>
18-
<td class="p-2 border-t {{ $loop->first ? 'border-smoke' : 'border-smoke-light' }} text-sm text-grey-darker">{{ $row[2] }}</td>
19-
</tr>
20-
@endforeach
21-
</tbody>
22-
</table>
23-
</div>
24-
--}}

docs/tailwind.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ config.height = Object.assign(config.height, {
7070
'7': '1.75rem',
7171
})
7272

73+
config.maxHeight = Object.assign(config.maxHeight, {
74+
'sm': '30rem',
75+
})
76+
7377
config.padding = Object.assign(config.padding, {
7478
'10': '2.5rem',
7579
'12': '3rem',

0 commit comments

Comments
 (0)