Skip to content

Commit

Permalink
Use NE prefix for custom component & Replace External & Internal link…
Browse files Browse the repository at this point in the history
…s with NELink
  • Loading branch information
Nitrrine committed Jul 13, 2024
1 parent 848fd21 commit f302ba4
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 38 deletions.
14 changes: 0 additions & 14 deletions components/InternalLink.vue

This file was deleted.

File renamed without changes.
13 changes: 7 additions & 6 deletions components/ExternalLink.vue → components/NELink.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<template>
<a
:href="to"
target="_blank"
rel="noopener noreferrer"
class="inline-flex flex-row items-center gap-1 font-bold text-[var(--brand-blue)]"
<NuxtLink
:to="to"
:target="external ? '_blank' : ''"
:rel="external ? 'noopener noreferrer' : ''"
class="inline-flex flex-row items-center gap-1 font-bold text-[var(--brand-blue)] duration-300 active:scale-95"
>
<LucideExternalLink v-if="showIcon" />
<slot />
</a>
</NuxtLink>
</template>

<script setup>
const props = defineProps({
to: String,
external: Boolean,
showIcon: Boolean,
})
</script>
File renamed without changes.
4 changes: 2 additions & 2 deletions components/ProjectCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</div>
<!-- Buttons -->
<div class="flex flex-row flex-wrap gap-3 mb-5">
<Button v-for="(link, index) in urls" :to="link" secondary external>
<NEButton v-for="(link, index) in urls" :to="link" secondary external>
<LucideDownload />{{ index }}
</Button>
</NEButton>
</div>
</div>
</template>
Expand Down
25 changes: 13 additions & 12 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@
<div
class="flex flex-col gap-1 font-[500] text-[var(--text-colour)] text-sm"
>
<ExternalLink
<NELink
class="font-medium text-white hover:underline"
to="https://github.com/blryface/notessential"
>{{ $t("layout.footer.open_source") }}</ExternalLink
external
>{{ $t("layout.footer.open_source") }}</NELink
>
</div>
</div>
Expand All @@ -62,14 +63,14 @@
}}</span>
<span
>{{ $t("layout.footer.credit_creator") }}
<ExternalLink to="https://blurryface.xyz"
>Blurryface</ExternalLink
<NELink to="https://blurryface.xyz" external
>Blurryface</NELink
></span
>
<span
>{{ $t("layout.footer.credit_designed") }}
<ExternalLink to="https://worldwidepixel.ca"
>WorldWidePixel</ExternalLink
<NELink to="https://worldwidepixel.ca" external
>WorldWidePixel</NELink
></span
>
</div>
Expand All @@ -79,24 +80,24 @@
<span class="font-bold text-base">{{
$t("layout.footer.resources")
}}</span>
<InternalLink to="/contributing"
<NELink to="/contributing"
><LucidePenBox class="h-5" />{{
$t("layout.footer.contributing")
}}
</InternalLink>
</NELink>
</div>
<div
class="flex flex-col gap-2 font-[500] text-[var(--text-colour)] text-sm"
>
<span class="font-bold text-base">{{
$t("layout.footer.interact")
}}</span>
<ExternalLink to="https://crowdin.com/project/notessential"
<NELink to="https://crowdin.com/project/notessential" external
><LucideGlobe class="h-5" />Crowdin
</ExternalLink>
<ExternalLink to="https://discord.gg/wncdz7e8jy"
</NELink>
<NELink to="https://discord.gg/wncdz7e8jy" external
><LucideMessageCircle class="h-5" />Discord
</ExternalLink>
</NELink>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions pages/flags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

<p>Available langagues:</p>

<Select v-on:change="handleLanguageChange">
<NESelect v-on:change="handleLanguageChange">
<option
v-for="locale in availableLocales"
:value="locale.code"
@click="setLocale(locale.code)"
>
{{ locale.name }}
</option>
</Select>
</NESelect>
</div>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
</span>
<!-- THE WORD 'MINECRAFT' AND THE 'NOTESSENTIAL' NAME SHOULD NOT BE LOCALISED. -->

<Link to="/" show-icon>test.com</Link>

<p class="text-2xl">
{{ $t("landing.reason") }}
</p>

<Button class="w-fit sm:px-20 px-15 py-8" to="/alternatives">
<NEButton class="w-fit sm:px-20 px-15 py-8" to="/alternatives">
<LucideArrowUpRight /> {{ $t("landing.buttons.alternatives") }}
</Button>
</NEButton>
</div>
</template>

Expand Down

0 comments on commit f302ba4

Please sign in to comment.