Skip to content

Commit

Permalink
Merge branch 'main' into 9242-modal-width
Browse files Browse the repository at this point in the history
  • Loading branch information
prury authored Mar 29, 2024
2 parents b424bf6 + af2cff1 commit 0661fa7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 84 deletions.
89 changes: 16 additions & 73 deletions components/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,55 +83,21 @@
</ul>
</div>
</section>
<section class="footer-container-socials flex flex-col">
<h2 class="subtitle is-5">
{{ $t('footer.join') }}
</h2>
<ul class="footer-container-socials-list flex mb-6">
<li
v-for="item in socials"
:key="item.url"
class="footer-container-socials-list-item flex items-center justify-center">
<NeoTooltip :label="item.name" position="top">
<a
v-safe-href="item.url"
class="flex items-center justify-center hover:text-text-color"
rel="nofollow noopener noreferrer"
target="_blank"
role="link"
:aria-label="item.name">
<!-- substack doesnt have a font awesome icon -->
<svg
v-if="item.icon === 'substack'"
width="16"
height="16"
viewBox="0 0 448 512"
fill="none"
xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_6104_83750)">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M0 0H448V62.804H0V0ZM0 229.083H448V511.471L223.954 385.808L0 511.471V229.083ZM0 114.541H448V177.345H0V114.541Z"
fill="currentColor" />
</g>
<defs>
<clipPath id="clip0_6104_83750">
<rect width="448" height="511.471" fill="currentColor" />
</clipPath>
</defs>
</svg>
<!-- farcaster doesnt have a font awesome icon -->
<FarcasterIcon
v-else-if="item.icon === 'farcaster'"
width="20"
height="20" />
<NeoIcon
v-else
:pack="item.pack || item.name == 'Swag' ? 'fasr' : 'fab'"
:icon="item.icon" />
</a>
</NeoTooltip>
<section class="footer-container-info flex flex-col">
<h2 class="subtitle is-5">{{ $t('footer.join') }}</h2>
<ul
class="footer-container-list columns-1"
data-testid="footer-social-list">
<li v-for="item in socials" :key="item.url">
<a
v-if="item.url"
v-safe-href="item.url"
target="_blank"
rel="nofollow noopener noreferrer"
class="flex items-center">
{{ item.name }}
<NeoIcon icon="arrow-up-right" class="ml-1 text-k-grey" />
</a>
</li>
</ul>
</section>
Expand All @@ -146,11 +112,7 @@
</template>

<script lang="ts" setup>
import { NeoIcon, NeoTooltip } from '@kodadot1/brick'
const FarcasterIcon = defineAsyncComponent(
() => import('@/assets/icons/farcaster-icon.svg?component'),
)
import { NeoIcon } from '@kodadot1/brick'
interface Menu {
name: string
Expand Down Expand Up @@ -240,49 +202,30 @@ const socials = [
{
name: 'Twitter',
url: 'https://twitter.com/KodaDot',
icon: 'x-twitter',
},
{
name: 'Farcaster',
url: 'https://warpcast.com/~/channel/koda',
icon: 'farcaster',
},
{
name: 'Telegram',
url: 'https://t.me/koda_eco',
icon: 'telegram',
},
{
name: 'Beehiiv',
url: 'https://kodadotweeklyroundup.beehiiv.com',
icon: 'newspaper',
pack: 'fal',
},
{
name: 'Linkedin',
url: 'https://www.linkedin.com/company/kodadot',
icon: 'linkedin',
},
{
name: 'Medium',
url: 'https://medium.com/kodadot',
icon: 'medium',
},
{
name: 'Youtube',
url: 'https://www.youtube.com/channel/UCEULduld5NrqOL49k1KVjoA/',
icon: 'youtube',
},
{
name: 'Instagram',
url: 'https://instagram.com/kodadot.xyz',
icon: 'instagram',
},
{
name: 'Reddit',
url: 'https://www.reddit.com/r/KodaDot',
icon: 'reddit-alien',
},
]
</script>
2 changes: 1 addition & 1 deletion queries/subsquid/general/topCollections.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ query topCollections(
volume
floor
nftCount
ownerCount
ownerCount: distribution
}
}
12 changes: 2 additions & 10 deletions tests/e2e/footer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ const footerSocialMediaLinks = [
linkName: 'Youtube',
linkAddress: 'UCEULduld5NrqOL49k1KVjoA',
},
{
linkName: 'Instagram',
linkAddress: 'kodadot.xyz',
},
{
linkName: 'Reddit',
linkAddress: 'KodaDot',
},
]

test('Check Footer Subscription', async ({ page }) => {
Expand Down Expand Up @@ -110,9 +102,9 @@ test('Check blog link', async ({ page }) => {
test('Check Social Media Links', async ({ page }) => {
await page.goto(pageWithFooter)
for (const data of footerSocialMediaLinks) {
const socialMedia = page.locator('.footer-container-socials-list')
const socialMedia = page.getByTestId('footer-social-list')
const newTabPromise = page.waitForEvent('popup')
await socialMedia.locator(`[aria-label="${data.linkName}"]`).click()
await socialMedia.getByRole('link', { name: data.linkName }).first().click()
const newTab = await newTabPromise
await expect(newTab).toHaveURL(new RegExp(`${data.linkAddress}`))
await newTab.close()
Expand Down

0 comments on commit 0661fa7

Please sign in to comment.