You've already forked AstralRinth
forked from xxxOFFxxx/AstralRinth
* launcher base gui initial * Bootstraps router, Omorphia, and prettier. * Adds pages. Adds Vuex. SideBar nav contains user section and pages section. * Adds Instance markup. Instances added to Home page. * Adds News to home page. * Adds settings to nav. Other touches. * Polishing initial base GUI. * Moves some styling to assets. Changes px values to rem. * Removes pointless border-radius CSS. * Implements Omorphia vars. * Adds trending mods section. * Updates home page. * Swaps Vuex implementation for Pinia. * Fixes invalid CSS on instance list item hover. * Adds @ path resolve for imports. * Fix some styling of row display * Cleaning up styles and markup. * Fixes overall layout issues. * Cleans up more styling. Modifies AppBar coloring. * Allows pagination arrows to conditionally appear in RowDisplay. * Adds paging behavior in RowDisplay. * Updates nav and settings button styling. * Brings in Knossos style for trending mods. Polishes News CSS. * Updates Omorphia. Starts addressing PR comments. * Addresses some more PR comments. * Changes side navigation styling. Active route class implemented. * Combines trending and popular row. * Makes images more realistic. Adds CTA to instances. * Converts all instances to card style. Converts more styles to rem. * Moves Navigation and UserSection into App.vue * Adds Modrinth favicon. * Removes unused styling. * Adds transition to news card. --------- Co-authored-by: Jai A <jaiagr+gpg@pm.me> Co-authored-by: CodexAdrian <83074853+CodexAdrian@users.noreply.github.com>
128 lines
2.5 KiB
Vue
128 lines
2.5 KiB
Vue
<script setup>
|
|
import { RouterLink } from 'vue-router'
|
|
import { Card, PlusIcon } from 'omorphia'
|
|
|
|
const props = defineProps({
|
|
display: String,
|
|
instance: Object,
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<RouterLink v-if="display === 'list'" class="instance-list-item" :to="`${props.instance.id}`">{{
|
|
props.instance.name
|
|
}}</RouterLink>
|
|
<Card class="instance-card-item" v-else-if="display === 'card'">
|
|
<img :src="props.instance.img" alt="Trending mod card" />
|
|
<div class="project-info">
|
|
<p class="title">{{ props.instance.name }}</p>
|
|
<p class="description">{{ props.instance.version }}</p>
|
|
</div>
|
|
<div class="cta"><PlusIcon /></div>
|
|
</Card>
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="scss" scoped>
|
|
.instance-list-item {
|
|
display: inline-block;
|
|
margin: 0.25rem auto;
|
|
cursor: pointer;
|
|
transition: all ease-out 0.1s;
|
|
font-size: 0.8rem;
|
|
color: var(--color-primary);
|
|
|
|
&:hover {
|
|
text-decoration: none;
|
|
filter: brightness(150%);
|
|
}
|
|
}
|
|
|
|
.instance-card-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
width: 180px;
|
|
padding: 0.75rem;
|
|
transition: 0.1s ease-in-out all;
|
|
|
|
&:hover {
|
|
filter: brightness(0.85);
|
|
|
|
.cta {
|
|
opacity: 1;
|
|
bottom: 4.5rem;
|
|
}
|
|
}
|
|
|
|
.cta {
|
|
position: absolute;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--color-brand);
|
|
border-radius: var(--radius-lg);
|
|
width: 3rem;
|
|
height: 3rem;
|
|
right: 1rem;
|
|
bottom: 3.5rem;
|
|
opacity: 0;
|
|
transition: 0.3s ease-in-out bottom, 0.1s ease-in-out opacity;
|
|
cursor: pointer;
|
|
|
|
svg {
|
|
color: #fff;
|
|
}
|
|
|
|
&:hover {
|
|
filter: brightness(0.75);
|
|
box-shadow: var(--shadow-floating);
|
|
}
|
|
}
|
|
|
|
img {
|
|
width: 160px;
|
|
border-radius: var(--radius-sm);
|
|
filter: none !important;
|
|
}
|
|
|
|
.project-info {
|
|
margin-top: 1rem;
|
|
width: 100%;
|
|
|
|
.title {
|
|
color: var(--color-contrast);
|
|
max-width: 6rem;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
margin: 0;
|
|
font-weight: 600;
|
|
font-size: 1rem;
|
|
line-height: 110%;
|
|
display: inline-block;
|
|
}
|
|
|
|
.description {
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
font-weight: 500;
|
|
font-size: 0.775rem;
|
|
line-height: 125%;
|
|
margin: 0.25rem 0 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.dark-mode {
|
|
.cta > svg {
|
|
color: #000;
|
|
}
|
|
}
|
|
</style>
|