diff --git a/components/dataset/About.tsx b/components/dataset/About.tsx
index 2f9fd992..663ab14b 100644
--- a/components/dataset/About.tsx
+++ b/components/dataset/About.tsx
@@ -1,32 +1,31 @@
export default function About({ datapackage }) {
return (
<>
-
{ datapackage.title || datapackage.name }
-
+
- | Files |
- Size |
- Format |
- Created |
- Updated |
- License |
- Source |
+ Files |
+ Size |
+ Format |
+ Created |
+ Updated |
+ License |
+ Source |
- | { datapackage.resources.length } |
- { datapackage.size || 'N\A' } |
-
-
- |
- { datapackage.created } |
- { datapackage.modified } |
-
+ | { datapackage.resources.length } |
+ { datapackage.size || 'N\A' } |
+
|
-
+ | { datapackage.created } |
+ { datapackage.modified } |
+
+
+ |
+
|
diff --git a/components/dataset/Org.tsx b/components/dataset/Org.tsx
index 206d3b00..fb8a5688 100644
--- a/components/dataset/Org.tsx
+++ b/components/dataset/Org.tsx
@@ -2,8 +2,11 @@ import Link from 'next/link'
export default function Org({ org }) {
return (
-
- { org.title || org.name }
-
+
+
+
+ { org.title || org.name }
+
+
)
}
diff --git a/components/dataset/Resources.tsx b/components/dataset/Resources.tsx
index e3889168..0b9539ed 100644
--- a/components/dataset/Resources.tsx
+++ b/components/dataset/Resources.tsx
@@ -2,15 +2,39 @@ import Link from 'next/link'
export default function Resources({ resources }) {
return (
-
+ <>
+ Data Files
+
+
+
+ | File |
+ Format |
+ Created |
+ Updated |
+ Link |
+
+
+
+ {resources.map((resource, index) => (
+
+ |
+
+ { resource.title || resource.name }
+
+ |
+ { resource.format } |
+ { resource.created } |
+ { resource.last_modified } |
+
+
+ Preview
+
+ |
+
+ )
+ )}
+
+
+ >
)
}
diff --git a/mocks/index.js b/mocks/index.js
index aa9885a6..f82e43ee 100644
--- a/mocks/index.js
+++ b/mocks/index.js
@@ -7,13 +7,21 @@ const gdp = {
"resources": [
{
"name": "gdp",
- "title": "GDP data"
+ "title": "GDP data",
+ "format": "csv",
+ "created": "2019-03-07T12:00:36.273495",
+ "last_modified": "2020-05-07T12:00:36.273495"
}
],
"organization": {
"title": "World Bank",
"name": "world-bank",
- }
+ "description": "The World Bank is an international financial institution that provides loans and grants to the governments of poorer countries for the purpose of pursuing capital projects.",
+ "created": "2019-03-07T11:51:13.758844",
+ "image_url": "https://github.com/datahq/frontend/raw/master/public/img/avatars/world-bank.jpg"
+ },
+ "metadata_created": "2019-03-07T11:56:19.696257",
+ "metadata_modified": "2019-03-07T12:03:58.817280"
}
const population = {
@@ -23,12 +31,18 @@ const population = {
"resources": [
{
"name": "population",
- "title": "Population data"
+ "title": "Population data",
+ "format": "csv",
+ "created": "2019-03-07T12:00:36.273495",
+ "last_modified": "2020-05-07T12:00:36.273495"
}
],
"organization": {
"title": "World Bank",
"name": "world-bank",
+ "description": "The World Bank is an international financial institution that provides loans and grants to the governments of poorer countries for the purpose of pursuing capital projects.",
+ "created": "2019-03-07T11:51:13.758844",
+ "image_url": "https://github.com/datahq/frontend/raw/master/public/img/avatars/world-bank.jpg"
}
}
diff --git a/pages/[org]/[dataset]/index.tsx b/pages/[org]/[dataset]/index.tsx
index c89eedd2..66e02b99 100644
--- a/pages/[org]/[dataset]/index.tsx
+++ b/pages/[org]/[dataset]/index.tsx
@@ -1,6 +1,8 @@
import { GetServerSideProps } from 'next'
import config from '../../../config'
import utils from '../../../utils'
+import Head from 'next/head'
+import Nav from '../../../components/Nav'
import About from '../../../components/dataset/About'
import Org from '../../../components/dataset/Org'
import Resources from '../../../components/dataset/Resources'
@@ -8,9 +10,19 @@ import Resources from '../../../components/dataset/Resources'
function Dataset({ datapackage }) {
return (
<>
-
-
-
+
+ Portal | {datapackage.title || datapackage.name}
+
+
+
+
+
+ { datapackage.title || datapackage.name }
+
+
+
+
+
>
)
}