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