mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
Merge branch 'master' into feature/search-tweaks
This commit is contained in:
commit
2b7be08d20
@ -5,5 +5,5 @@
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
margin-bottom: $spacer / $line-height;
|
margin-bottom: $spacer / $line-height;
|
||||||
background-color: $brand-grey-lighter;
|
background-color: $body-background;
|
||||||
}
|
}
|
||||||
|
@ -33,75 +33,108 @@ import theology from '../../img/categories/theology.jpg'
|
|||||||
import transport from '../../img/categories/transport.jpg'
|
import transport from '../../img/categories/transport.jpg'
|
||||||
import urbanplanning from '../../img/categories/urbanplanning.jpg'
|
import urbanplanning from '../../img/categories/urbanplanning.jpg'
|
||||||
import visualart from '../../img/categories/visualart.jpg'
|
import visualart from '../../img/categories/visualart.jpg'
|
||||||
|
import fallback from '@oceanprotocol/art/jellyfish/jellyfish-back.svg'
|
||||||
|
|
||||||
const categoryImageFile = (category: string) => {
|
const categoryImageFile = (category: string) => {
|
||||||
switch (category) {
|
switch (category) {
|
||||||
|
case 'Agriculture & Bio Engineering':
|
||||||
case 'agriculture':
|
case 'agriculture':
|
||||||
return agriculture
|
return agriculture
|
||||||
|
case 'Anthropology & Archeology':
|
||||||
case 'anthroarche':
|
case 'anthroarche':
|
||||||
return anthroarche
|
return anthroarche
|
||||||
|
case 'Space & Astronomy':
|
||||||
case 'astronomy':
|
case 'astronomy':
|
||||||
return astronomy
|
return astronomy
|
||||||
|
case 'Biology':
|
||||||
case 'biology':
|
case 'biology':
|
||||||
return biology
|
return biology
|
||||||
|
case 'Business & Management':
|
||||||
case 'business':
|
case 'business':
|
||||||
return business
|
return business
|
||||||
|
case 'Chemistry':
|
||||||
case 'chemistry':
|
case 'chemistry':
|
||||||
return chemistry
|
return chemistry
|
||||||
|
case 'Communication & Journalism':
|
||||||
case 'communication':
|
case 'communication':
|
||||||
return communication
|
return communication
|
||||||
|
case 'Computer Technology':
|
||||||
case 'computer':
|
case 'computer':
|
||||||
return computer
|
return computer
|
||||||
|
case 'Dataset Of Datasets':
|
||||||
case 'dataofdata':
|
case 'dataofdata':
|
||||||
return dataofdata
|
return dataofdata
|
||||||
|
case 'Deep Learning':
|
||||||
case 'deeplearning':
|
case 'deeplearning':
|
||||||
return deeplearning
|
return deeplearning
|
||||||
|
case 'Demography':
|
||||||
case 'demographics':
|
case 'demographics':
|
||||||
return demographics
|
return demographics
|
||||||
|
case 'Earth & Climate':
|
||||||
case 'earth':
|
case 'earth':
|
||||||
return earth
|
return earth
|
||||||
|
case 'Economics & Finance':
|
||||||
case 'economics-and-finance':
|
case 'economics-and-finance':
|
||||||
return economics
|
return economics
|
||||||
|
case 'Engineering':
|
||||||
case 'engineering':
|
case 'engineering':
|
||||||
return engineering
|
return engineering
|
||||||
|
case 'History':
|
||||||
case 'history':
|
case 'history':
|
||||||
return history
|
return history
|
||||||
|
case 'Image Recognition':
|
||||||
case 'imagesets':
|
case 'imagesets':
|
||||||
return imagesets
|
return imagesets
|
||||||
|
case 'Language':
|
||||||
case 'language':
|
case 'language':
|
||||||
return language
|
return language
|
||||||
|
case 'Law':
|
||||||
case 'law':
|
case 'law':
|
||||||
return law
|
return law
|
||||||
|
case 'Mathematics':
|
||||||
case 'mathematics':
|
case 'mathematics':
|
||||||
return mathematics
|
return mathematics
|
||||||
|
case 'Medicine':
|
||||||
case 'medicine':
|
case 'medicine':
|
||||||
return medicine
|
return medicine
|
||||||
|
case 'Other':
|
||||||
case 'other':
|
case 'other':
|
||||||
return other
|
return other
|
||||||
|
case 'Performing Arts':
|
||||||
case 'performingarts':
|
case 'performingarts':
|
||||||
return performingarts
|
return performingarts
|
||||||
|
case 'Philosophy':
|
||||||
case 'philosophy':
|
case 'philosophy':
|
||||||
return philosophy
|
return philosophy
|
||||||
|
case 'Physics & Energy':
|
||||||
case 'physics':
|
case 'physics':
|
||||||
return physics
|
return physics
|
||||||
|
case 'Politics':
|
||||||
case 'politics':
|
case 'politics':
|
||||||
return politics
|
return politics
|
||||||
|
case 'Psychology':
|
||||||
case 'psychology':
|
case 'psychology':
|
||||||
return psychology
|
return psychology
|
||||||
|
case 'Sociology':
|
||||||
case 'sociology':
|
case 'sociology':
|
||||||
return sociology
|
return sociology
|
||||||
|
case 'Sports & Recreation':
|
||||||
case 'sports':
|
case 'sports':
|
||||||
return sports
|
return sports
|
||||||
|
case 'Theology':
|
||||||
case 'theology':
|
case 'theology':
|
||||||
return theology
|
return theology
|
||||||
|
case 'Transportation':
|
||||||
case 'transport':
|
case 'transport':
|
||||||
return transport
|
return transport
|
||||||
|
case 'Urban Plannin':
|
||||||
case 'urbanplanning':
|
case 'urbanplanning':
|
||||||
return urbanplanning
|
return urbanplanning
|
||||||
|
case 'Visual Arts & Design':
|
||||||
case 'visualart':
|
case 'visualart':
|
||||||
return visualart
|
return visualart
|
||||||
default:
|
default:
|
||||||
break
|
return fallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,12 +98,7 @@ export default class Input extends PureComponent<InputProps, InputState> {
|
|||||||
options
|
options
|
||||||
.sort((a, b) => a.localeCompare(b))
|
.sort((a, b) => a.localeCompare(b))
|
||||||
.map((option: string, index: number) => (
|
.map((option: string, index: number) => (
|
||||||
<option
|
<option key={index} value={option}>
|
||||||
key={index}
|
|
||||||
value={slugify(option, {
|
|
||||||
lower: true
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{option}
|
{option}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"name": {
|
"name": {
|
||||||
"label": "Title",
|
"label": "Title",
|
||||||
"placeholder": "i.e. Almond sales data",
|
"placeholder": "e.g. Almond sales data",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"required": true,
|
"required": true,
|
||||||
"help": "Enter a concise title. You will be able to enter a more thorough description in the next step."
|
"help": "Enter a concise title. You will be able to enter a more thorough description in the next step."
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
"label": "Files",
|
"label": "Files",
|
||||||
"placeholder": "i.e. https://file.com/file.json",
|
"placeholder": "e.g. https://file.com/file.json",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"required": true,
|
"required": true,
|
||||||
"help": "Provide one or multiple urls to your data set files."
|
"help": "Provide one or multiple urls to your data set files."
|
||||||
@ -27,7 +27,7 @@
|
|||||||
"description": {
|
"description": {
|
||||||
"label": "Description",
|
"label": "Description",
|
||||||
"help": "Add a thorough description with as much detail as possible.",
|
"help": "Add a thorough description with as much detail as possible.",
|
||||||
"placeholder": "i.e. Almond sales data ",
|
"placeholder": "e.g. Almond sales data ",
|
||||||
"type": "textarea",
|
"type": "textarea",
|
||||||
"required": true,
|
"required": true,
|
||||||
"rows": 5
|
"rows": 5
|
||||||
@ -68,6 +68,8 @@
|
|||||||
"Business & Management",
|
"Business & Management",
|
||||||
"Sports & Recreation",
|
"Sports & Recreation",
|
||||||
"Communication & Journalism",
|
"Communication & Journalism",
|
||||||
|
"Deep Learning",
|
||||||
|
"Law",
|
||||||
"Other"
|
"Other"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -85,13 +87,13 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"author": {
|
"author": {
|
||||||
"label": "Author",
|
"label": "Author",
|
||||||
"placeholder": "i.e. Jelly McJellyfish",
|
"placeholder": "e.g. Jelly McJellyfish",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
"copyrightHolder": {
|
"copyrightHolder": {
|
||||||
"label": "Copyright Holder",
|
"label": "Copyright Holder",
|
||||||
"placeholder": "i.e. Marine Institute of Jellyfish",
|
"placeholder": "e.g. Marine Institute of Jellyfish",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
|
@ -4,20 +4,20 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"name": {
|
"name": {
|
||||||
"label": "Your name",
|
"label": "Your name",
|
||||||
"placeholder": "i.e. Jelly McJellyfish",
|
"placeholder": "e.g. Jelly McJellyfish",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"required": true,
|
"required": true,
|
||||||
"help": "Help me"
|
"help": "Help me"
|
||||||
},
|
},
|
||||||
"email": {
|
"email": {
|
||||||
"label": "Your email",
|
"label": "Your email",
|
||||||
"placeholder": "i.e. jelly@mcjellyfish.com",
|
"placeholder": "e.g. jelly@mcjellyfish.com",
|
||||||
"type": "email",
|
"type": "email",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"label": "Your message",
|
"label": "Your message",
|
||||||
"placeholder": "i.e. jelly@mcjellyfish.com",
|
"placeholder": "e.g. jelly@mcjellyfish.com",
|
||||||
"type": "textarea",
|
"type": "textarea",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
@ -41,7 +41,7 @@
|
|||||||
},
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"label": "Date",
|
"label": "Date",
|
||||||
"placeholder": "i.e. 2019-08-12",
|
"placeholder": "e.g. 2019-08-12",
|
||||||
"type": "date",
|
"type": "date",
|
||||||
"required": true
|
"required": true
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class Home extends Component<HomeProps, HomeState> {
|
|||||||
type="search"
|
type="search"
|
||||||
name="search"
|
name="search"
|
||||||
label="Search for data sets"
|
label="Search for data sets"
|
||||||
placeholder="i.e. almond sales data"
|
placeholder="e.g. almond sales data"
|
||||||
value={this.state.search}
|
value={this.state.search}
|
||||||
onChange={this.inputChange}
|
onChange={this.inputChange}
|
||||||
group={
|
group={
|
||||||
|
Loading…
Reference in New Issue
Block a user