Skip to content

Commit

Permalink
style(frontend): move scripts below template
Browse files Browse the repository at this point in the history
  • Loading branch information
tfuent1 committed Jan 17, 2025
1 parent 00b292e commit 69952ef
Show file tree
Hide file tree
Showing 66 changed files with 301 additions and 173 deletions.
2 changes: 1 addition & 1 deletion frontend/components/EmptyState.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
</template>

<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
import { i18nMap } from "~/types/i18n-map";

defineProps<{
pageType:
Expand Down
9 changes: 4 additions & 5 deletions frontend/components/btn/BtnRoadMap.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
</script>

<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
<template>
<NuxtLink
Expand All @@ -14,3 +9,7 @@ import { i18nMap } from '~/types/i18n-map';
{{ $t(i18nMap.components._global.roadmap) }}
</NuxtLink>
</template>

<script setup lang="ts">
import { i18nMap } from "~/types/i18n-map";
</script>
15 changes: 11 additions & 4 deletions frontend/components/card/CardConnect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,26 @@
<PopupNewField
@on-cta-clicked="emit('on-new-account')"
@on-close-clicked="onClose(close)"
:title="$t(i18nMap.components.card_connect.app_account_popup_title)"
:title="
$t(i18nMap.components.card_connect.app_account_popup_title)
"
:fieldNamePrompt="
$t(
i18nMap.components.card_connect.app_account_popup_field_name_prompt
i18nMap.components.card_connect
.app_account_popup_field_name_prompt
)
"
:fieldLabelPrompt="
$t(
i18nMap.components.card_connect.app_account_popup_field_label_prompt
i18nMap.components.card_connect
.app_account_popup_field_label_prompt
)
"
:ctaBtnLabel="
$t(i18nMap.components.card_connect.app_account_popup_cta_btn_label)
$t(
i18nMap.components.card_connect
.app_account_popup_cta_btn_label
)
"
:ctaBtnAriaLabel="
$t(i18nMap.components.card_connect.new_account_aria_label)
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/card/CardDangerZone.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</template>

<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
import { i18nMap } from "~/types/i18n-map";

defineProps<{
description: string;
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/card/CardMetricsOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</template>

<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
import { i18nMap } from "~/types/i18n-map";

interface Metrics {
[key: string]: number;
Expand Down
4 changes: 3 additions & 1 deletion frontend/components/card/CardTopicSelection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
@keydown="resetTabIndex()"
id="query"
:display-value="() => query"
:placeholder="$t(i18nMap.components.card_topic_selection.selector_placeholder)"
:placeholder="
$t(i18nMap.components.card_topic_selection.selector_placeholder)
"
class="topicInput elem-shadow-sm focus-brand w-full rounded-md bg-layer-0 py-2 pl-4 text-distinct-text"
/>
<ul class="hidden gap-2 sm:flex sm:flex-wrap">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
</script>

<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
<template>
<CardChangeAccountInfo
Expand All @@ -29,7 +24,10 @@ import { i18nMap } from '~/types/i18n-map';
id="old-email"
class="peer rounded-sm border border-primary-text bg-transparent px-3 py-1"
:placeholder="
$t(i18nMap.components.card_change_account_info_email.enter_old_email)
$t(
i18nMap.components.card_change_account_info_email
.enter_old_email
)
"
/>
</div>
Expand All @@ -44,7 +42,10 @@ import { i18nMap } from '~/types/i18n-map';
id="new-email"
class="peer rounded-sm border border-primary-text bg-transparent px-3 py-1"
:placeholder="
$t(i18nMap.components.card_change_account_info_email.enter_new_email)
$t(
i18nMap.components.card_change_account_info_email
.enter_new_email
)
"
/>
</div>
Expand All @@ -62,3 +63,7 @@ import { i18nMap } from '~/types/i18n-map';
</div>
</CardChangeAccountInfo>
</template>

<script setup lang="ts">
import { i18nMap } from "~/types/i18n-map";
</script>
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
</script>

<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
<template>
<CardChangeAccountInfo
:ctaLabel="$t(i18nMap.components.card_change_account_info_password.header_cta)"
:ctaLabel="
$t(i18nMap.components.card_change_account_info_password.header_cta)
"
:ctaAriaLabel="
$t(i18nMap.components.card_change_account_info_password.cta_aria_label)
"
>
<div class="space-y-4 pb-1 lg:grow">
<div class="flex items-center space-x-4">
<h3 class="responsive-h3 font-bold">
{{ $t(i18nMap.components.card_change_account_info_password.header_cta) }}
{{
$t(i18nMap.components.card_change_account_info_password.header_cta)
}}
</h3>
</div>
<div class="flex flex-col gap-4 lg:flex-row lg:gap-8">
<div class="flex w-full flex-col lg:w-1/3">
<label for="current-password" class="responsive-h4 pb-2 font-bold"
>{{
$t(
i18nMap.components.card_change_account_info_password.current_password
i18nMap.components.card_change_account_info_password
.current_password
)
}}
*</label
Expand All @@ -32,15 +32,19 @@ import { i18nMap } from '~/types/i18n-map';
class="peer rounded-sm border border-primary-text bg-transparent px-3 py-1"
:placeholder="
$t(
i18nMap.components.card_change_account_info_password.enter_current_password
i18nMap.components.card_change_account_info_password
.enter_current_password
)
"
/>
</div>
<div class="flex w-full flex-col lg:w-1/3">
<label for="new-password" class="responsive-h4 pb-2 font-bold"
>{{
$t(i18nMap.components.card_change_account_info_password.new_password)
$t(
i18nMap.components.card_change_account_info_password
.new_password
)
}}
*</label
>
Expand All @@ -49,7 +53,8 @@ import { i18nMap } from '~/types/i18n-map';
class="peer rounded-sm border border-primary-text bg-transparent px-3 py-1"
:placeholder="
$t(
i18nMap.components.card_change_account_info_password.enter_new_password
i18nMap.components.card_change_account_info_password
.enter_new_password
)
"
/>
Expand All @@ -63,7 +68,8 @@ import { i18nMap } from '~/types/i18n-map';
class="peer rounded-sm border border-primary-text bg-transparent px-3 py-1"
:placeholder="
$t(
i18nMap.components.card_change_account_info_password.enter_repeat_password
i18nMap.components.card_change_account_info_password
.enter_repeat_password
)
"
/>
Expand All @@ -72,3 +78,7 @@ import { i18nMap } from '~/types/i18n-map';
</div>
</CardChangeAccountInfo>
</template>

<script setup lang="ts">
import { i18nMap } from "~/types/i18n-map";
</script>
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
</script>

<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
<template>
<CardChangeAccountInfo
:ctaLabel="$t(i18nMap.components.card_change_account_info_username.header_cta)"
:ctaLabel="
$t(i18nMap.components.card_change_account_info_username.header_cta)
"
:ctaAriaLabel="
$t(i18nMap.components.card_change_account_info_username.cta_aria_label)
"
>
<div class="space-y-4 pb-1">
<div class="flex items-center space-x-4">
<h3 class="responsive-h3 font-bold">
{{ $t(i18nMap.components.card_change_account_info_username.header_cta) }}
{{
$t(i18nMap.components.card_change_account_info_username.header_cta)
}}
</h3>
</div>
<div class="flex flex-col gap-4 lg:flex-row lg:gap-8">
<div class="flex w-full flex-col lg:w-1/2">
<label for="new-username" class="responsive-h4 font-bold"
>{{
$t(i18nMap.components.card_change_account_info_username.new_username)
$t(
i18nMap.components.card_change_account_info_username
.new_username
)
}}
*</label
>
Expand All @@ -30,7 +32,8 @@ import { i18nMap } from '~/types/i18n-map';
class="peer rounded-sm border border-primary-text bg-transparent px-3 py-1"
:placeholder="
$t(
i18nMap.components.card_change_account_info_username.enter_new_username
i18nMap.components.card_change_account_info_username
.enter_new_username
)
"
/>
Expand All @@ -49,3 +52,7 @@ import { i18nMap } from '~/types/i18n-map';
</div>
</CardChangeAccountInfo>
</template>

<script setup lang="ts">
import { i18nMap } from "~/types/i18n-map";
</script>
4 changes: 3 additions & 1 deletion frontend/components/card/discussion/CardDiscussionInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@
id="message"
rows="4"
class="focus-brand block w-full rounded-lg border border-section-div bg-layer-0 p-2.5 text-sm text-primary-text placeholder-distinct-text"
:placeholder="$t(i18nMap.components.card_discussion_input.leave_comment)"
:placeholder="
$t(i18nMap.components.card_discussion_input.leave_comment)
"
></textarea>
</div>
<div class="flex items-center justify-between px-1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
<p>
{{
$t(
i18nMap.components.card_get_involved_organization.join_organization_no_info,
i18nMap.components.card_get_involved_organization
.join_organization_no_info,
{
entity_name: organization.name,
}
Expand Down
5 changes: 4 additions & 1 deletion frontend/components/card/search-result/CardSearchResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
}"
:src="imageUrl"
:alt="
$t(i18nMap.components.card_search_result.organization_img_alt_text) +
$t(
i18nMap.components.card_search_result
.organization_img_alt_text
) +
' ' +
organization.name
"
Expand Down
9 changes: 4 additions & 5 deletions frontend/components/discussion/DiscussionHeader.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
</script>

<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
<template>
<div class="space-y-2">
Expand All @@ -12,3 +7,7 @@ import { i18nMap } from '~/types/i18n-map';
<hr />
</div>
</template>

<script setup lang="ts">
import { i18nMap } from "~/types/i18n-map";
</script>
2 changes: 1 addition & 1 deletion frontend/components/feed/FeedItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
>
<div class="flex items-center space-x-3 pb-2">
<Icon
v-if="(item.itemType = 'group')"
v-if="item.itemType = 'group'"
:name="IconMap.PEOPLE"
size="1.5em"
/>
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/footer/flex/FooterFlex.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
</template>

<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
import { i18nMap } from "~/types/i18n-map";

const localePath = useLocalePath();

Expand Down
2 changes: 1 addition & 1 deletion frontend/components/footer/flex/FooterFlexCol.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
</template>

<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
import { i18nMap } from "~/types/i18n-map";

const localePath = useLocalePath();

Expand Down
8 changes: 6 additions & 2 deletions frontend/components/form/radio/FormRadioGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
:for="customValueType"
class="sr-only"
>{{
$t(i18nMap.components.form_radio_group.custom_numeric_value_placeholder)
$t(
i18nMap.components.form_radio_group.custom_numeric_value_placeholder
)
}}</label
>
<input
Expand All @@ -36,7 +38,9 @@
class="w-full flex-1 rounded-l-md border border-r-0 border-interactive bg-layer-2 pl-4 pr-2 font-bold text-distinct-text outline-none"
:type="customValueType"
:placeholder="
$t(i18nMap.components.form_radio_group.custom_numeric_value_placeholder)
$t(
i18nMap.components.form_radio_group.custom_numeric_value_placeholder
)
"
/>
<button
Expand Down
13 changes: 7 additions & 6 deletions frontend/components/grid/GridSupporters.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<script setup lang="ts">
import { i18nMap } from '~/types/i18n-map';
</script>

<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
<template>
<div
Expand All @@ -26,8 +21,14 @@ import { i18nMap } from '~/types/i18n-map';
imageName="ImpactHub"
imageLink="https://belgrade.impacthub.net"
:aria-label="
$t(i18nMap.components.grid_supporters.impact_hub_belgrade_logo_aria_label)
$t(
i18nMap.components.grid_supporters.impact_hub_belgrade_logo_aria_label
)
"
/>
</div>
</template>

<script setup lang="ts">
import { i18nMap } from "~/types/i18n-map";
</script>
Loading

0 comments on commit 69952ef

Please sign in to comment.