[dataset][m]: improved dataset page to have better layout + added more details to the mocks.
This commit is contained in:
@@ -1,32 +1,31 @@
|
||||
export default function About({ datapackage }) {
|
||||
return (
|
||||
<>
|
||||
<h1 className="text-4xl font-semibold text-primary">{ datapackage.title || datapackage.name }</h1>
|
||||
<table className="table info no-left-padding">
|
||||
<table className="table-auto w-full text-sm text-left my-6">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Files</th>
|
||||
<th>Size</th>
|
||||
<th>Format</th>
|
||||
<th>Created</th>
|
||||
<th>Updated</th>
|
||||
<th>License</th>
|
||||
<th>Source</th>
|
||||
<th className="px-4 py-2">Files</th>
|
||||
<th className="px-4 py-2">Size</th>
|
||||
<th className="px-4 py-2">Format</th>
|
||||
<th className="px-4 py-2">Created</th>
|
||||
<th className="px-4 py-2">Updated</th>
|
||||
<th className="px-4 py-2">License</th>
|
||||
<th className="px-4 py-2">Source</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className="col-xs-1">{ datapackage.resources.length }</td>
|
||||
<td className="col-xs-1">{ datapackage.size || 'N\A' }</td>
|
||||
<td className="col-xs-2 format-list">
|
||||
|
||||
</td>
|
||||
<td className="col-xs-2">{ datapackage.created }</td>
|
||||
<td className="col-xs-2">{ datapackage.modified }</td>
|
||||
<td className="col-xs-2">
|
||||
<td className="px-4 py-2">{ datapackage.resources.length }</td>
|
||||
<td className="px-4 py-2">{ datapackage.size || 'N\A' }</td>
|
||||
<td className="px-4 py-2">
|
||||
|
||||
</td>
|
||||
<td className="col-xs-2">
|
||||
<td className="px-4 py-2">{ datapackage.created }</td>
|
||||
<td className="px-4 py-2">{ datapackage.modified }</td>
|
||||
<td className="px-4 py-2">
|
||||
|
||||
</td>
|
||||
<td className="px-4 py-2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -2,8 +2,11 @@ import Link from 'next/link'
|
||||
|
||||
export default function Org({ org }) {
|
||||
return (
|
||||
<Link href={`/@${org.name}`}>
|
||||
<a className="text-2xl font-semibold text-primary">{ org.title || org.name }</a>
|
||||
</Link>
|
||||
<organization>
|
||||
<img src={org.image_url} className="h-5 w-5 mr-2 inline-block" />
|
||||
<Link href={`/@${org.name}`}>
|
||||
<a className="font-semibold text-primary underline">{ org.title || org.name }</a>
|
||||
</Link>
|
||||
</organization>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -2,15 +2,39 @@ import Link from 'next/link'
|
||||
|
||||
export default function Resources({ resources }) {
|
||||
return (
|
||||
<ul>
|
||||
{resources.map((resource, index) => (
|
||||
<li key={index}>
|
||||
<Link href={`r/${resource.name}`}>
|
||||
<a className="text-xl font-semibold text-primary">{ resource.title || resource.name }</a>
|
||||
</Link>
|
||||
</li>
|
||||
)
|
||||
)}
|
||||
</ul>
|
||||
<>
|
||||
<h3 className="text-xl font-semibold">Data Files</h3>
|
||||
<table className="table-auto w-full text-sm text-left mb-6">
|
||||
<thead>
|
||||
<tr>
|
||||
<th className="px-4 py-2">File</th>
|
||||
<th className="px-4 py-2">Format</th>
|
||||
<th className="px-4 py-2">Created</th>
|
||||
<th className="px-4 py-2">Updated</th>
|
||||
<th className="px-4 py-2">Link</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{resources.map((resource, index) => (
|
||||
<tr key={index}>
|
||||
<td className="px-4 py-2">
|
||||
<Link href={`r/${resource.name}`}>
|
||||
<a className="underline">{ resource.title || resource.name }</a>
|
||||
</Link>
|
||||
</td>
|
||||
<td className="px-4 py-2">{ resource.format }</td>
|
||||
<td className="px-4 py-2">{ resource.created }</td>
|
||||
<td className="px-4 py-2">{ resource.last_modified }</td>
|
||||
<td className="px-4 py-2">
|
||||
<Link href={`r/${resource.name}`}>
|
||||
<a className="underline">Preview</a>
|
||||
</Link>
|
||||
</td>
|
||||
</tr>
|
||||
)
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user