diff --git a/packages/fe/assets/scss/main.scss b/packages/fe/assets/scss/main.scss index cdebed5d..4ea193f5 100644 --- a/packages/fe/assets/scss/main.scss +++ b/packages/fe/assets/scss/main.scss @@ -220,6 +220,7 @@ h6, .h6 { line-height: 1.3; font-weight: 500; text-transform: none; + margin-bottom: toRem(18); } h1, .h1 { @@ -319,31 +320,6 @@ p, .p1 { } .markdown { - h1, h2, h3, p, ul, ol, pre { - + h2, + h3 { - margin-top: 3.75rem; - } - } - h1, h2, h3 { - &:not(:last-child) { - margin-bottom: 1rem; - } - + ul, + ol { - margin-top: 2rem; - } - } - p { - &:not(:last-child) { - margin-bottom: 1rem; - } - } - a { - color: darkorange; - font-weight: 600; - &:hover { - text-decoration: underline; - } - } pre, code { font-family: $font_Code; diff --git a/packages/fe/assets/scss/variables.scss b/packages/fe/assets/scss/variables.scss index da3dae79..2a3683ce 100644 --- a/packages/fe/assets/scss/variables.scss +++ b/packages/fe/assets/scss/variables.scss @@ -28,6 +28,10 @@ $athensGray: #E7E9ED; $capeCod: #3C4748; $grayNurse2: #E0E7E0; $dodgerBlue: #3DA2FF; +$blue: #001AFF; +$neptune: #74C3B5; +$iron: #DDDFE3; + // ----------------------------------------------------------------- Breakpoints $breakpoint_Tiny: 25.9375rem; // 415px @@ -57,7 +61,7 @@ $duration: 300ms; width: 2.1875rem; height: 2.1875rem; border-radius: 50%; - border: solid 1px #DDDFE3; + border: solid 1px $iron; display: flex; flex-direction: column; justify-content: center; @@ -102,7 +106,7 @@ $duration: 300ms; } @mixin focusBoxShadow { - box-shadow: 0 0 0 5px rgba(0, 123, 255, 0.5); + box-shadow: 0 0 0 5px rgba($dodgerBlue, 0.5) !important; } @mixin focusBoxShadowSmall { @@ -249,6 +253,13 @@ $duration: 300ms; @return math.div($px-vw * 100vw, $base-vw); } +@mixin truncate($rowCount) { + display: -webkit-box; + -webkit-line-clamp: $rowCount; + -webkit-box-orient: vertical; + overflow: hidden; +} + // ------------------------------------------------------------------- Animation @mixin animation($animate...) { $max: length($animate); diff --git a/packages/fe/components/block-builder.vue b/packages/fe/components/block-builder.vue index ca408819..37965d70 100644 --- a/packages/fe/components/block-builder.vue +++ b/packages/fe/components/block-builder.vue @@ -70,6 +70,7 @@ import TextBlock from '@/components/blocks/text-block' import ImageBlock from '@/components/blocks/image-block' import MarkdownBlock from '@/components/blocks/markdown-block' import CategorySliderBlock from '@/components/blocks/category-slider-block' +import CardListBlock from '@/components/blocks/card-list-block' import CategoryTicker from '@/components/category-ticker' import BlockBuilder from '@/components/block-builder' @@ -83,7 +84,8 @@ export default { BlockBuilder, MarkdownBlock, CategorySliderBlock, - CategoryTicker + CategoryTicker, + CardListBlock }, props: { diff --git a/packages/fe/components/blocks/card-list-block.vue b/packages/fe/components/blocks/card-list-block.vue new file mode 100644 index 00000000..666990b4 --- /dev/null +++ b/packages/fe/components/blocks/card-list-block.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/packages/fe/components/blocks/category-slider-block.vue b/packages/fe/components/blocks/category-slider-block.vue index 491c7031..c96f0c04 100644 --- a/packages/fe/components/blocks/category-slider-block.vue +++ b/packages/fe/components/blocks/category-slider-block.vue @@ -45,9 +45,9 @@ :style="{ 'background-image': `url('/images/categories/${slide.label.replaceAll(' ', '-')}.jpg')` }">
-
+
+
diff --git a/packages/fe/components/breadcrumbs.vue b/packages/fe/components/breadcrumbs.vue index b23f47a5..8c59d942 100644 --- a/packages/fe/components/breadcrumbs.vue +++ b/packages/fe/components/breadcrumbs.vue @@ -7,7 +7,6 @@ v-if="link.url" :key="`link-${index}`" :button="link" - tabindex="0" class="breadcrumb link"> @@ -46,7 +45,8 @@ export default { data () { return { - links: false + links: false, + hidden: false } }, @@ -60,9 +60,6 @@ export default { return this.siteContent.general.breadcrumbs_mapping } return false - }, - hidden () { - return this.links.length < 2 } }, @@ -90,9 +87,11 @@ export default { url: '/', text: breadcrumbs.index }] + this.hidden = true items.forEach((item, i) => { const routeName = items.slice(0, i + 1).join('-') if (breadcrumbs.hasOwnProperty(routeName)) { + this.hidden = false const url = `/${items.slice(0, i + 1).join('/')}` if (i !== items.length - 1 && routeName !== 'dataset') { links.push({ type: 'default', url, text: breadcrumbs[routeName] }) @@ -101,6 +100,7 @@ export default { } } else { if (this.dataset) { + // single dataset links.push({ text: this.dataset.name }) } } @@ -130,11 +130,6 @@ export default { .breadcrumb { white-space: nowrap; - &.link { - &:hover { - text-decoration: underline; - } - } } .link, diff --git a/packages/fe/components/buttons/button-filters.vue b/packages/fe/components/buttons/button-filters.vue index e547d581..d7d9a7eb 100644 --- a/packages/fe/components/buttons/button-filters.vue +++ b/packages/fe/components/buttons/button-filters.vue @@ -9,8 +9,8 @@
- - + +
@@ -56,7 +56,7 @@ export default { diff --git a/packages/fe/components/buttons/button-nav.vue b/packages/fe/components/buttons/button-nav.vue index 69d8fc29..0654c34a 100644 --- a/packages/fe/components/buttons/button-nav.vue +++ b/packages/fe/components/buttons/button-nav.vue @@ -1,7 +1,6 @@

- This dataset hasn’t been onboarded to the network yet + {{ content.notOnboarded }}

({}) + } + }, + data () { return { mobileTable: false, diff --git a/packages/fe/components/form/fields/typeahead.vue b/packages/fe/components/form/fields/typeahead.vue index 7a1d6849..f8b88c5e 100644 --- a/packages/fe/components/form/fields/typeahead.vue +++ b/packages/fe/components/form/fields/typeahead.vue @@ -314,9 +314,6 @@ $height: 3.125rem; cursor: no-drop; border-bottom-color: rgba(227, 211, 192, 0.25); } - &:focus { - box-shadow: none; - } } // //////////////////////////////////////////////////////////////////// Dropdown diff --git a/packages/fe/components/icons/terminal.vue b/packages/fe/components/icons/terminal.vue new file mode 100644 index 00000000..3a93a792 --- /dev/null +++ b/packages/fe/components/icons/terminal.vue @@ -0,0 +1,24 @@ + + + + diff --git a/packages/fe/components/page-home/datasets-card-grid.vue b/packages/fe/components/page-home/datasets-card-grid.vue index fc72b9d8..7a91f135 100644 --- a/packages/fe/components/page-home/datasets-card-grid.vue +++ b/packages/fe/components/page-home/datasets-card-grid.vue @@ -204,10 +204,7 @@ export default { min-height: toRem(116.5); .name { line-height: leading(26, 17); - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; + @include truncate(3); } } @@ -253,8 +250,6 @@ export default { .button { align-self: flex-end; margin-top: auto; - margin-right: toRem(20); - margin-bottom: toRem(20); padding: toRem(10) toRem(20); } diff --git a/packages/fe/components/site-footer.vue b/packages/fe/components/site-footer.vue index c95dae05..43c58d75 100644 --- a/packages/fe/components/site-footer.vue +++ b/packages/fe/components/site-footer.vue @@ -92,7 +92,7 @@ footer { .right { background-color: $rangoonGreen; color: $grayNurse; - padding: 13% 15% 11%; + padding: 13% 15% 9% 15%; border-top-left-radius: toRem(100); border-top-right-radius: toRem(100); border-bottom-left-radius: toRem(100); @@ -114,9 +114,6 @@ footer { @include medium { margin-bottom: toRem(16); } - &:last-child { - margin-bottom: 0; - } } nav { @include tiny { diff --git a/packages/fe/components/site-header.vue b/packages/fe/components/site-header.vue index 675bf835..32967a89 100644 --- a/packages/fe/components/site-header.vue +++ b/packages/fe/components/site-header.vue @@ -154,6 +154,10 @@ export default { margin-right: 0; } } + :deep(.tooltip) { + left: 50%; + transform: translateX(-50%); + } } @include large { @@ -172,6 +176,7 @@ export default { } .logo-link { + display: inherit; z-index: 101; svg { display: block; diff --git a/packages/fe/content/pages/about.json b/packages/fe/content/pages/about.json index 65bc7f05..1ebcd1ea 100644 --- a/packages/fe/content/pages/about.json +++ b/packages/fe/content/pages/about.json @@ -72,7 +72,7 @@ "push_left": "off-1_sm-1_mi-0" }, "label": "Open Panda exists today because a decentralized model offers unique benefits when storing data at scale.", - "description": " The distributed nature of the network means that sources are for data are available in a variety of regions around the world, reducing latency and helping ensure a reliable connection for the download process. Storage Providers maintain significant hardware requirements, which typically include high bandwidth connections to the internet.

Aside from distribution, all content on the network is cryptographically hashed into a unique value called a CID, or content identifier. This means that if any data changes at all, the CID changes. For content within datasets, this adds a unique feature: immutability. Information contained in a dataset becomes tamper proof, because if anything changes, it's immediately evident from the CID being different. This is especially useful when considering the problem of safeguarding data from manipulation by biased parties.

One of Filecoin's core missions is to store humanity's most important information, and the Open Panda project is directly aligned with that mission. At this point in time, downloading and working with the data on the platform still requires an understanding of how Filecoin works and some use of specialized software, but over time we plan to abstract those hurdles away, in the interest of a smoother and more user-friendly experience and a minimal learning curve.", + "description": " The distributed nature of the network means that sources are for data are available in a variety of regions around the world, reducing latency and helping ensure a reliable connection for the download process. Storage Providers maintain significant hardware requirements, which typically include high bandwidth connections to the internet.

Aside from distribution, all content on the network is cryptographically hashed into a unique value called a CID, or content identifier. This means that if any data changes at all, the CID changes. For content within datasets, this adds a unique feature: immutability. Information contained in a dataset becomes tamper proof, because if anything changes, it's immediately evident from the CID being different. This is especially useful when considering the problem of safeguarding data from manipulation by biased parties.

One of Filecoin's core missions is to store humanity's most important information, and the Open Panda project is directly aligned with that mission.

At this point in time, downloading and working with the data on the platform still requires an understanding of how Filecoin works and some use of specialized software, but over time we plan to abstract those hurdles away, in the interest of a smoother and more user-friendly experience and a minimal learning curve.

", "ctas": [ { "type": "solid-tear", diff --git a/packages/fe/content/pages/dataset-single.json b/packages/fe/content/pages/dataset-single.json new file mode 100644 index 00000000..bf4643dd --- /dev/null +++ b/packages/fe/content/pages/dataset-single.json @@ -0,0 +1,23 @@ +{ + "page_content": { + "cidTable": { + "notOnboarded": "This dataset hasn’t been onboarded to the network yet", + "cidCard": { + "tooltipText": "You can access a preview of the files within this CID, however at this time it must be downloaded and unpacked from the zst format. Learn more", + "tooltipBtnText": "Inspect files", + "cidLabel": "CID", + "sizeLabel": "Size", + "typeLabel": "Type", + "replicasLabel": "No. Replicas", + "statusLabel": "Status", + "storageProvidersLabel": "Storage Providers", + "storageProvidersSubLabel": "Select a storage provider to view retrieval commands", + "dealIDLabel": "dealID", + "availUntilLabel": "Available Until", + "availUntilMobileLabel": "Avail. Until", + "retrievalRateLabel": "Retrieval Rate", + "retrievalCommandsLabel": "Retrieval Commands" + } + } + } + } diff --git a/packages/fe/content/pages/general.json b/packages/fe/content/pages/general.json index 25f7ab92..e5390814 100644 --- a/packages/fe/content/pages/general.json +++ b/packages/fe/content/pages/general.json @@ -81,7 +81,7 @@ "label": "Slack" }, { - "href": "https://github.com", + "href": "https://github.com/data-preservation-programs/open-panda", "label": "Github" } ], diff --git a/packages/fe/modules/button/components/button.vue b/packages/fe/modules/button/components/button.vue index ed9f0b90..a0bb9fc7 100644 --- a/packages/fe/modules/button/components/button.vue +++ b/packages/fe/modules/button/components/button.vue @@ -1,16 +1,30 @@ + + diff --git a/packages/fe/modules/tooltip/index.js b/packages/fe/modules/tooltip/index.js new file mode 100644 index 00000000..6b62f0a2 --- /dev/null +++ b/packages/fe/modules/tooltip/index.js @@ -0,0 +1,37 @@ +/* + * + * 📦 [module] tooltip + * + */ + +// ///////////////////////////////////////////////////////////////////// Imports +// ----------------------------------------------------------------------------- +// ///////////////////////////////////////////////////////////////////// General +import Path from 'path' + +// ///////////////////////////////////////////////////////////////////// Plugins +const TooltipPlugin = Path.resolve(__dirname, 'plugins/index.js') + +// /////////////////////////////////////////////////////////////////// Functions +// ----------------------------------------------------------------------------- +// ////////////////////////////////////////////////////////////// registerPlugin +const registerPlugin = (instance, next) => { + return new Promise((next) => { + const TooltipPluginDst = instance.addTemplate({ + src: TooltipPlugin, + fileName: 'tooltip/plugin-index.js' + }).dst + instance.options.plugins.push({ + src: Path.join(instance.options.buildDir, TooltipPluginDst), + ssr: undefined, + mode: undefined + }) + next() + }) +} + +// ////////////////////////////////////////////////////////////////////// Export +// ----------------------------------------------------------------------------- +export default async function () { + await registerPlugin(this) +} diff --git a/packages/fe/modules/tooltip/plugins/index.js b/packages/fe/modules/tooltip/plugins/index.js new file mode 100644 index 00000000..32a35acb --- /dev/null +++ b/packages/fe/modules/tooltip/plugins/index.js @@ -0,0 +1,28 @@ +/* + * + * 🔌 [plugin | tooltip] index + * + */ + +// ///////////////////////////////////////////////////////// Imports & Variables +// ----------------------------------------------------------------------------- +import Store from '@/modules/tooltip/store' + +// /////////////////////////////////////////////////////////////////// Functions +// ----------------------------------------------------------------------------- +// /////////////////////////////////////////////////////////////// registerStore +const registerStore = (store, next) => { + return new Promise((next) => { + store.registerModule('tooltip', Object.assign({ + namespaced: true + }, Store)) + next() + }) + if (next) { return next() } +} + +// ////////////////////////////////////////////////////////////////////// Export +// ----------------------------------------------------------------------------- +export default async function ({ app, store }, inject) { + await registerStore(store) +} diff --git a/packages/fe/modules/tooltip/store/index.js b/packages/fe/modules/tooltip/store/index.js new file mode 100644 index 00000000..e69de29b diff --git a/packages/fe/nuxt.config.js b/packages/fe/nuxt.config.js index 5e8b0639..079c54d4 100644 --- a/packages/fe/nuxt.config.js +++ b/packages/fe/nuxt.config.js @@ -103,7 +103,8 @@ export default { '~/modules/auth', '~/modules/search', '~/modules/form', - '~/modules/button' + '~/modules/button', + '~/modules/tooltip' ], // ///////////////////////////////////////////////////// [Module] Nuxt-content // --------------------------------------------------------------------------- diff --git a/packages/fe/pages/dataset/_id.vue b/packages/fe/pages/dataset/_id.vue index 4ec3aa37..5112e2d2 100644 --- a/packages/fe/pages/dataset/_id.vue +++ b/packages/fe/pages/dataset/_id.vue @@ -186,7 +186,7 @@ data-push-left="off-1_xlg-0_md-1_sm-0" data-push-right="off-1_xlg-0_md-1_sm-0"> - +
@@ -199,6 +199,7 @@ // ====================================================================== Import import { mapGetters, mapActions } from 'vuex' +import DatasetPageData from '@/content/pages/dataset-single.json' import TextBlock from '@/components/blocks/text-block' import CardCutout from '@/components/card-cutout' import CIDTable from '@/components/cid-table' @@ -244,12 +245,17 @@ export default { data () { const id = this.$route.params.id return { + pageTag: 'datasetSingle', id, resize: false, mobile: false } }, + async fetch ({ app, store }) { + await store.dispatch('general/getBaseData', { key: 'datasetSingle', data: DatasetPageData }) + }, + head () { const dataset = this.dataset const siteUrl = this.siteContent.general.og.url @@ -268,6 +274,9 @@ export default { dataset: 'dataset/dataset', cidList: 'cid/cidList' }), + pageContent () { + return this.siteContent[this.pageTag].page_content + }, slug () { return this.dataset.slug }, diff --git a/packages/fe/store/dataset.js b/packages/fe/store/dataset.js index e855ac4a..2dfc4f42 100644 --- a/packages/fe/store/dataset.js +++ b/packages/fe/store/dataset.js @@ -50,4 +50,4 @@ export default { getters, actions, mutations -} +} \ No newline at end of file