Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add tooltip, misc bug fixes, a11y fixes #59

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4675a77
feat: tooltip
joannaong Mar 7, 2023
e608c06
feat: tooltip
joannaong Mar 7, 2023
d8d8841
feat: tooltip
joannaong Mar 7, 2023
8b7b40b
fix: breadcrumb should not show in 404
joannaong Mar 8, 2023
9187089
fix: tooltip positioning on desktop nav
joannaong Mar 8, 2023
2bbf601
Merge branch 'develop' of https://github.com/data-preservation-progra…
joannaong Mar 8, 2023
478bd3d
feat: mobile tooltip in progress
joannaong Mar 8, 2023
997655d
fix: mobile cid card styling
joannaong Mar 8, 2023
8ad38be
fix: styling for cid cards
joannaong Mar 8, 2023
4eb3fc3
feat: add mock feature flag
joannaong Mar 8, 2023
98353c6
fix: about page
joannaong Mar 8, 2023
f196bcd
fix: add back card-list-block
joannaong Mar 8, 2023
df1a780
Merge branch 'develop' of github.com:data-preservation-programs/open-…
timelytree Mar 9, 2023
fcbef17
fix: move id page copy to json, minor fixes
joannaong Mar 9, 2023
f6cfe69
fix: abstract tooltip
joannaong Mar 9, 2023
54625da
fix: focus on logo
joannaong Mar 9, 2023
f967727
fix: button and focus-visible
joannaong Mar 10, 2023
0bc0d00
fix: copy to content
joannaong Mar 10, 2023
4724f3d
merge develop
joannaong Mar 14, 2023
c5ef30b
fix: inspect url
joannaong Mar 14, 2023
15a0429
feat: tooltip module
joannaong Mar 14, 2023
ef95b8e
feat: add focus ring on category and see all / less toggle
joannaong Mar 14, 2023
5a1accf
fix: hover selected filter button
joannaong Mar 15, 2023
0bb09c0
merge dev
joannaong Mar 16, 2023
0b3b7eb
fix: hover selected button filter
joannaong Mar 17, 2023
66f6136
fix: filter button, focus visible
joannaong Mar 17, 2023
273e666
feat: truncate mixin
joannaong Mar 17, 2023
b3df0ec
fix: styling on cid card
joannaong Mar 17, 2023
d3782ba
fix: tooltip mobile error
joannaong Mar 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/fe/assets/scss/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ $athensGray: #E7E9ED;
$capeCod: #3C4748;
$grayNurse2: #E0E7E0;
$dodgerBlue: #3DA2FF;
$blue: #001AFF;
$neptune: #74C3B5;
$iron: #DDDFE3;


// ----------------------------------------------------------------- Breakpoints
$breakpoint_Tiny: 25.9375rem; // 415px
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion packages/fe/components/block-builder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -83,7 +84,8 @@ export default {
BlockBuilder,
MarkdownBlock,
CategorySliderBlock,
CategoryTicker
CategoryTicker,
CardListBlock
},

props: {
Expand Down
75 changes: 75 additions & 0 deletions packages/fe/components/blocks/card-list-block.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<template>
<div :class="['card-list-block', `type__${cardType}`]">
<div :class="['card-list', direction]">

<template v-for="(card, i) in cards">
<component
:is="cardComponent"
:key="`card-${i}`"
:index="i + 1"
:card="card"
class="card" />
</template>

</div>
</div>
</template>

<script>
// ====================================================================== Import
import FAQCard from '@/components/faq-card'

// ====================================================================== Export
export default {
name: 'CardListBlock',

components: {
FAQCard
},

props: {
block: {
type: Object,
required: true,
default: () => ({})
}
},

computed: {
cardType () {
return this.block.card_type
},
direction () {
return ['row', 'column', 'row-reverse', 'column-reverse'].includes(this.block.direction) ? this.block.direction : 'row'
},
cardComponent () {
switch (this.cardType) {
case 'faq': return 'FAQCard'
default : return 'FAQCard'
}
},
cards () {
return this.block.cards
}
}
}
</script>

<style lang="scss" scoped>
// ///////////////////////////////////////////////////////////////////// General
.card-list {
display: flex;
&.row {
flex-direction: row;
}
&.column {
flex-direction: column;
}
&.row-reverse {
flex-direction: row-reverse;
}
&.column-reverse {
flex-direction: column-reverse;
}
}
</style>
9 changes: 5 additions & 4 deletions packages/fe/components/breadcrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export default {

data () {
return {
links: false
links: false,
hidden: false
}
},

Expand All @@ -60,9 +61,6 @@ export default {
return this.siteContent.general.breadcrumbs_mapping
}
return false
},
hidden () {
return this.links.length < 2
}
},

Expand Down Expand Up @@ -90,9 +88,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] })
Expand All @@ -101,6 +101,7 @@ export default {
}
} else {
if (this.dataset) {
// single dataset
links.push({ text: this.dataset.name })
}
}
Expand Down
Loading