mirror of
https://github.com/dtomlinson91/anno-production-chain-renderer.git
synced 2025-12-22 06:15:45 +00:00
move info card into own component
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<q-list separator class="big-font text-left">
|
<q-list separator class="big-font text-left">
|
||||||
<InfoCardItemWorld
|
<InfoCardItemWorld
|
||||||
v-for="item in worldItemData"
|
v-for="item in itemWorldData"
|
||||||
:key="item.icon"
|
:key="item.icon"
|
||||||
v-bind="item"
|
v-bind="item"
|
||||||
></InfoCardItemWorld>
|
></InfoCardItemWorld>
|
||||||
<InfoCardItem
|
<InfoCardItem
|
||||||
v-for="item in itemDataBase"
|
v-for="item in itemData"
|
||||||
:key="item.icon"
|
:key="item.icon"
|
||||||
v-bind="item"
|
v-bind="item"
|
||||||
></InfoCardItem>
|
></InfoCardItem>
|
||||||
@@ -16,7 +16,15 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import InfoCardItem from './InfoCard/InfoCardItem.vue';
|
import InfoCardItem from './InfoCard/InfoCardItem.vue';
|
||||||
import InfoCardItemWorld from './InfoCard/InfoCardItemWorld.vue';
|
import InfoCardItemWorld from './InfoCard/InfoCardItemWorld.vue';
|
||||||
import { itemDataBase, worldItemData } from 'src/pages/data/info-card';
|
import {
|
||||||
|
InfoCardItem as InfoCardItemModel,
|
||||||
|
InfoCardWorldItem as InfoCardWorldItemModel
|
||||||
|
} from 'pages/data/models';
|
||||||
|
|
||||||
|
defineProps<{
|
||||||
|
itemData?: InfoCardItemModel[];
|
||||||
|
itemWorldData?: InfoCardWorldItemModel[];
|
||||||
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<template>
|
|
||||||
<q-list separator class="big-font text-left">
|
|
||||||
<InfoCardItem
|
|
||||||
v-for="item in itemDataExpansions"
|
|
||||||
:key="item.id"
|
|
||||||
v-bind="item"
|
|
||||||
></InfoCardItem>
|
|
||||||
</q-list>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import InfoCardItem from './InfoCard/InfoCardItem.vue';
|
|
||||||
import { itemDataExpansions } from 'src/pages/data/info-card';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.big-font {
|
|
||||||
font-size: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-icon {
|
|
||||||
width: 100px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-small-icon {
|
|
||||||
width: 50px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -12,7 +12,10 @@
|
|||||||
:col-break="false"
|
:col-break="false"
|
||||||
class="masonry-col item"
|
class="masonry-col item"
|
||||||
>
|
>
|
||||||
<InfoCardBase></InfoCardBase>
|
<InfoCard
|
||||||
|
:item-data="itemDataBase"
|
||||||
|
:item-world-data="worldItemDataBase"
|
||||||
|
></InfoCard>
|
||||||
</ChainTiers>
|
</ChainTiers>
|
||||||
<ChainTiers
|
<ChainTiers
|
||||||
v-for="tier in productionChainsBase"
|
v-for="tier in productionChainsBase"
|
||||||
@@ -39,13 +42,16 @@
|
|||||||
// Production Chain Data
|
// Production Chain Data
|
||||||
import { productionChainsBase } from './data/production-chains-base';
|
import { productionChainsBase } from './data/production-chains-base';
|
||||||
|
|
||||||
|
// Info Card Data
|
||||||
|
import { itemDataBase, worldItemDataBase } from 'src/pages/data/info-card';
|
||||||
|
|
||||||
// Mermaid
|
// Mermaid
|
||||||
import { initialiseMermaid } from 'composables/mermaid';
|
import { initialiseMermaid } from 'composables/mermaid';
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import ChainTiers from 'components/ChainTiers.vue';
|
import ChainTiers from 'components/ChainTiers.vue';
|
||||||
import ProductionChain from 'components/ProductionChain.vue';
|
import ProductionChain from 'components/ProductionChain.vue';
|
||||||
import InfoCardBase from 'components/InfoCardBase.vue';
|
import InfoCard from 'components/InfoCard.vue';
|
||||||
|
|
||||||
initialiseMermaid();
|
initialiseMermaid();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
class="masonry-col item"
|
class="masonry-col item"
|
||||||
:col-break="false"
|
:col-break="false"
|
||||||
>
|
>
|
||||||
<InfoCardExpansions></InfoCardExpansions>
|
<InfoCard :item-data="itemDataExpansions"></InfoCard>
|
||||||
</ChainTiers>
|
</ChainTiers>
|
||||||
<ChainTiers
|
<ChainTiers
|
||||||
v-for="tier in productionChainsExpansions"
|
v-for="tier in productionChainsExpansions"
|
||||||
@@ -38,13 +38,16 @@
|
|||||||
// Production Chain Data
|
// Production Chain Data
|
||||||
import { productionChainsExpansions } from './data/production-chains-expansions';
|
import { productionChainsExpansions } from './data/production-chains-expansions';
|
||||||
|
|
||||||
|
// Info Card Data
|
||||||
|
import { itemDataExpansions } from 'src/pages/data/info-card';
|
||||||
|
|
||||||
// Mermaid
|
// Mermaid
|
||||||
import { initialiseMermaid } from 'composables/mermaid';
|
import { initialiseMermaid } from 'composables/mermaid';
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
import ChainTiers from 'components/ChainTiers.vue';
|
import ChainTiers from 'components/ChainTiers.vue';
|
||||||
import ProductionChain from 'components/ProductionChain.vue';
|
import ProductionChain from 'components/ProductionChain.vue';
|
||||||
import InfoCardExpansions from 'components/InfoCardExpansions.vue';
|
import InfoCard from 'components/InfoCard.vue';
|
||||||
|
|
||||||
initialiseMermaid();
|
initialiseMermaid();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import * as icons from './icons';
|
|||||||
import fullChainMultiplierIcon from 'assets/productionChainMultiplier.svg';
|
import fullChainMultiplierIcon from 'assets/productionChainMultiplier.svg';
|
||||||
import { InfoCardItem, InfoCardWorldItem } from './models';
|
import { InfoCardItem, InfoCardWorldItem } from './models';
|
||||||
|
|
||||||
export const worldItemData: InfoCardWorldItem[] = [
|
export const worldItemDataBase: InfoCardWorldItem[] = [
|
||||||
{
|
{
|
||||||
id: 'furs',
|
id: 'furs',
|
||||||
icon: icons.fursIcon,
|
icon: icons.fursIcon,
|
||||||
|
|||||||
Reference in New Issue
Block a user