Skip to content

Commit

Permalink
Merge pull request #272 from biothings/redesign
Browse files Browse the repository at this point in the history
fix: footer, grant, resource canonical url, misc
  • Loading branch information
marcodarko authored Jul 30, 2024
2 parents 56f71b7 + 3750925 commit 34c49ed
Show file tree
Hide file tree
Showing 22 changed files with 188 additions and 124 deletions.
20 changes: 10 additions & 10 deletions .github/ISSUE_TEMPLATE/data-portal-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,38 @@ assignees: marcodarko

<img src="https://discovery.biothings.io/dde-logo-o.png" alt="dde" width="100"/>

#Data Discovery Engine | Data Portal Application
*Data Discovery Engine | Data Portal Application

###Data Discovery Engine allows creating project-specific portals to manage all the needs of metadata management for a given project, more specifically:
***Data Discovery Engine allows creating project-specific portals to manage all the needs of metadata management for a given project, more specifically:
- Register a custom schema and keep it up to date automatically.
- Get access to advanced metadata intake guides based on your schema.
- Share and embed your metadata easily!
- Metadata field coverage.
- No setup required on your side, we help you get your portal up and running.

##To get started we just need some information..
**To get started we just need some information..

------------


####What is the name of your project?
****What is the name of your project?

####Tell us a little bit about your project.
****Tell us a little bit about your project.

####Is this project funded by a government entity (Y/N)
****Is this project funded by a government entity (Y/N)

####Name of the team, person or organization responsible for this project?
****Name of the team, person or organization responsible for this project?

####What benefit(s) that the DDE provide most interest you?
****What benefit(s) that the DDE provide most interest you?
- [ ] Custom schema builder
- [ ] FAIR data-sharing practices
- [ ] Metadata intake forms
- [ ] Shareable Metadata via API and embedding
- [ ] Other - Please explain

####Is there a URL available we can visit to learn more about your project?
****Is there a URL available we can visit to learn more about your project?

####Is there anything in particular you are looking to get from this portal? Do you have any suggestions for us?
****Is there anything in particular you are looking to get from this portal? Do you have any suggestions for us?


Great! We will get in touch with you once we review this information! Thank you!
8 changes: 4 additions & 4 deletions discovery/handlers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ def get(self): # frontend API
) # dict(user) to convert UserInfo type to dict, self.finish cannot accept UserInfo


class DatasetSitemapHandler(tornado.web.RequestHandler):
class ResourceSitemapHandler(tornado.web.RequestHandler):
def get(self):
ids = datasets.get_ids()
tpl = tornado.template.Template(
"""
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://discovery.biothings.io/dataset</loc>
<loc>https://discovery.biothings.io/resource</loc>
</url>
{% for _id in ids %}
{% block _id %}
<url>
<loc>{{ "https://discovery.biothings.io/dataset/" + escape(_id) }}</loc>
<loc>{{ "https://discovery.biothings.io/resource/" + escape(_id) }}</loc>
</url>
{% end %}
{% end %}
Expand All @@ -73,6 +73,6 @@ def get(self):
HANDLERS = [
(r"/user/?", UserInfoHandler),
(r"/logout/?", LogoutHandler),
(r"/sitemap/dataset.xml", DatasetSitemapHandler),
(r"/sitemap/resource.xml", ResourceSitemapHandler),
(r"/dataset/(geo/.+)", RedirectHandler, {"url": "http://metadataplus.biothings.io/{0}"}),
]
Binary file added nuxt-app/assets/img/sulab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed nuxt-app/assets/img/translator.jpg
Binary file not shown.
20 changes: 14 additions & 6 deletions nuxt-app/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
>
<ul>
<li>
<nuxt-link class="text-light" to="/dataset"
>Metadata Registry</nuxt-link
<nuxt-link class="text-light" to="/resource"
>Resource Registry</nuxt-link
>
</li>
<li>
Expand Down Expand Up @@ -98,10 +98,18 @@
>
</div>
</div>
<div class="d-flex justify-content-around flex-wrap mt-3">
<img src="@/assets/img/wulab.png" alt="wulab" height="100" />
<img src="@/assets/img/scripps.png" alt="scripps" height="100" />
<img src="@/assets/img/translator.jpg" alt="translator" height="80" />
<div
class="d-flex justify-content-around align-items-center flex-wrap mt-3"
>
<a href="https://wulab.io/" target="_blank" rel="nonreferrer">
<img src="@/assets/img/wulab.png" alt="wulab" height="100" />
</a>
<a href="https://sulab.org/" target="_blank" rel="nonreferrer">
<img src="@/assets/img/sulab.png" alt="sulab" height="50" />
</a>
<a href="https://www.scripps.edu/" target="_blank" rel="nonreferrer">
<img src="@/assets/img/scripps.png" alt="scripps" height="100" />
</a>
</div>
<p class="rights text-light text-center" style="margin: 0px">
<small>
Expand Down
2 changes: 1 addition & 1 deletion nuxt-app/components/Nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ let menu = ref(false);
>
<nuxt-link
class="dropdown-item mainTextLight text-left"
to="/dataset"
to="/resource"
>
<img :src="res_reg" width="20" height="20" alt="Validator" />
Resource Registry <i class="fas fa-chevron-right"></i
Expand Down
4 changes: 2 additions & 2 deletions nuxt-app/components/ResourceRegistryItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@click="goTo(item)"
>
<img :src="imgIcon" width="20" :alt="item.name" class="mr-1" />
<nuxt-link :to="{ path: '/dataset/' + item._id }">{{
<nuxt-link :to="{ path: '/resource/' + item._id }">{{
item.name
}}</nuxt-link>
<span
Expand Down Expand Up @@ -140,7 +140,7 @@ export default {
}
},
detailLink: function () {
return "/dataset/" + this.item._id;
return "/resource/" + this.item._id;
},
last_updated: function () {
if (
Expand Down
50 changes: 25 additions & 25 deletions nuxt-app/components/global/ResourceFieldBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<template v-if="type == 'array'">
<div class="row m-0">
<div class="text-left">
<small
<span
class="text-primary"
@click="expandArray = !expandArray"
style="cursor: pointer"
Expand All @@ -19,7 +19,7 @@
>)
<b v-if="!expandArray">+</b>
<b v-if="expandArray">-</b>
</small>
</span>
</div>
<div class="col-sm-12" v-if="expandArray">
<div>
Expand Down Expand Up @@ -112,30 +112,30 @@
<div class="d-flex">
<template v-if="isUrl(content)">
<div class="text-left">
<small class="mainTextDark">
<span class="mainTextDark">
<b v-text="readable_name"></b>
<font-awesome-icon v-if="!readable_name" icon="fas fa-circle" />
<span v-else>:</span>
</small>
</span>
</div>
<div class="ml-1">
<a :href="content" target="_blank" rel="nonreferrer">
<small
<span
><span v-text="content"></span>
<font-awesome-icon icon="fas fa-external-link-alt" class="ml-1"
/></small>
/></span>
</a>
</div>
</template>
<template v-else
<div class="d-flex">
<small class="mainTextDark">
<span class="mainTextDark">
<b
v-text="readable_name ? readable_name + ' :' : ''"
class="mr-1"
></b>
</small>
</span>
</div>
<div class="d-flex">
<a
Expand All @@ -147,25 +147,25 @@
rel="nonreferrer"
></a>
<template v-else>
<small>
<span>
<font-awesome-icon
v-if="name == '@type' && content == 'Person'"
icon="fas fa-user"
class="text-muted"
class="text-dark"
/>
<font-awesome-icon
v-if="name == '@type' && content == 'Organization'"
icon="fas fa-building"
class="text-muted"
class="text-dark"
/>
<font-awesome-icon
v-if="name == '@type' && content == 'CreativeWork'"
icon="fas fa-lightbulb"
class="text-muted"
class="text-dark"
/>
</small>
</span>
&nbsp;
<small class="text-muted text-left" v-html="content"></small>
<span class="text-dark text-left" v-html="content"></span>
</template>
</div>
</template>
Expand All @@ -175,10 +175,10 @@
<template v-if="type == 'object'">
<div class="d-flex">
<div class="d-flex justify-content-start align-items-center">
<small class="mainTextDark">
<span class="mainTextDark">
<b v-text="readable_name"></b>
<font-awesome-icon icon="fas fa-chevron-right" class="mr-1" />
</small>
</span>
</div>
<div>
<template v-for="(value, key) in content" :key="key + 'child'">
Expand All @@ -195,32 +195,32 @@
<template v-if="type == 'boolean'">
<div class="d-flex">
<div class="d-flex justify-content-start align-items-center">
<small class="mainTextDark">
<span class="mainTextDark">
<b v-text="readable_name"></b> :&nbsp;
</small>
</span>
</div>
<div>
<small v-if="content === true"
<span v-if="content === true"
><font-awesome-icon icon="fas fa-check" class="text-success" />
<span v-text="content"></span
></small>
<small v-else
></span>
<span v-else
><font-awesome-icon icon="fas fa-times" class="text-danger" />
<span v-text="content"></span
></small>
></span>
</div>
</div>
</template>
<!-- 🌈 Number 🌈 -->
<template v-if="type == 'number'">
<div class="d-flex">
<div class="d-flex justify-content-start align-items-center">
<small class="mainTextDark">
<span class="mainTextDark">
<b v-text="readable_name"></b> :&nbsp;
</small>
</span>
</div>
<div>
<small><span v-text="content"></span></small>
<span><span v-text="content"></span></span>
</div>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion nuxt-app/components/guide/IdentifierSpecial.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<b class="d-block">
<small>
<span class="text-dark" v-text="hit.name"></span>.
<a :href="'/dataset/' + hit['_id']" target="_blank"
<a :href="'/resource/' + hit['_id']" target="_blank"
>Show me this dataset
<font-awesome-icon
icon="fas fa-chevron-right"
Expand Down
8 changes: 4 additions & 4 deletions nuxt-app/components/guide/JSONItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<summary>🛎️ You've already registered this metadata.</summary>
<small
>Here's a link to
<router-link target="_blank" :to="'/dataset/' + exists"
<router-link target="_blank" :to="'/resource/' + exists"
>that record</router-link
>. If you choose to update this record it will replace the
previously registered metadata completely.
Expand All @@ -38,7 +38,7 @@
<summary>🚨 Already registered by someone else.</summary>
<small
>The identifier provided has already been used to register
<a target="_blank" :href="'/dataset/' + exists">this record</a>.
<a target="_blank" :href="'/resource/' + exists">this record</a>.
Looks like you won't be able to make any changes to this item.
</small>
</template>
Expand Down Expand Up @@ -398,7 +398,7 @@ export default {
self.loading = false;
if (res.data.success) {
self.successMSG =
`<a class="btn btn-sm alert-success" href="/dataset/` +
`<a class="btn btn-sm alert-success" href="/resource/` +
res.data.id +
`" target="_blank" rel="nonreferrer">
View Registration</a>`;
Expand Down Expand Up @@ -445,7 +445,7 @@ export default {
value: self.exists,
});
self.successMSGUpdate =
`<a class="btn btn-sm alert-info" href="/dataset/` +
`<a class="btn btn-sm alert-info" href="/resource/` +
self.exists +
`" target="_blank" rel="nonreferrer">
View Update</a>`;
Expand Down
2 changes: 1 addition & 1 deletion nuxt-app/components/guide/NameSpecial.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<b class="d-block">
<small>
<span class="text-dark" v-text="hit.name"></span>.
<a :href="'/dataset/' + hit['_id']" target="_blank"
<a :href="'/resource/' + hit['_id']" target="_blank"
>Show me this dataset
<font-awesome-icon
icon="fas fa-chevron-right"
Expand Down
4 changes: 2 additions & 2 deletions nuxt-app/middleware/viewer-rerouting.global.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default defineNuxtRouteMiddleware((to, from) => {
if (to.fullPath.includes("/view") && !to.fullPath.includes("/api")) {
return navigateTo(to.fullPath.replace("/view", "/ns"));
}
if (to.fullPath.includes("/resource") && !to.fullPath.includes("/api")) {
return navigateTo(to.fullPath.replace("/resource", "/dataset"));
if (to.fullPath.includes("/dataset") && !to.fullPath.includes("/api")) {
return navigateTo(to.fullPath.replace("/dataset", "/resource"));
}
});
2 changes: 1 addition & 1 deletion nuxt-app/pages/best-practices/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="text-center mb-5">
<div class="col-md-8 col-sm-12 m-auto p-3 container text-left text-dark">
<p class="d-flex justify-content-center align-items-center">
<nuxt-link to="/dataset">Metadata Registry</nuxt-link>
<nuxt-link to="/resource">Metadata Registry</nuxt-link>
<span class="mx-2">|</span>
<nuxt-link to="/coverage">Metadata Coverage</nuxt-link>
</p>
Expand Down
2 changes: 1 addition & 1 deletion nuxt-app/pages/contributor/[[username]].vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
class="col-sm-7 p-1 bg-dark actions d-flex align-items-center justify-content-around"
>
<div>
<nuxt-link :to="{ path: '/dataset/' + item._id }">
<nuxt-link :to="{ path: '/resource/' + item._id }">
<span
class="fa-stack fa-1x pointer tip"
data-tippy-content="View Dataset"
Expand Down
4 changes: 2 additions & 2 deletions nuxt-app/pages/dashboard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
class="col-sm-12 col-md-8 p-1 mainBackLight d-flex align-items-center justify-content-between"
>
<nuxt-link
:to="'/dataset/' + item._id"
:to="'/resource/' + item._id"
class="m-2 text-light d-block"
:title="item.name"
>
Expand All @@ -306,7 +306,7 @@
class="col-sm-12 col-md-4 p-1 bg-dark actions d-flex align-items-center justify-content-around"
>
<div>
<nuxt-link :to="'/dataset/' + item._id">
<nuxt-link :to="'/resource/' + item._id">
<span
class="fa-stack fa-1x pointer tip"
data-tippy-content="View Dataset"
Expand Down
Loading

0 comments on commit 34c49ed

Please sign in to comment.