Skip to content

Commit

Permalink
Merge pull request #20 from sktbrd/main
Browse files Browse the repository at this point in the history
Seasons
  • Loading branch information
sktbrd authored Oct 28, 2024
2 parents 543b8d7 + c9b7a53 commit b448317
Show file tree
Hide file tree
Showing 10 changed files with 1,497 additions and 283 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ stats.html
.env
.env.production
.env.analyze
.env.local
tsconfig.tsbuildinfo
27 changes: 15 additions & 12 deletions src/common/modals/compositions/MintNogsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@
import { defineEmits, defineProps, withDefaults, watch, onMounted } from 'vue';
import IframeModal from '../IframeModal.vue';
// Emit event for closing the modal
const emit = defineEmits<{
(e: 'update:is-shown', v: boolean): void
}>()
// Define props with defaults
const props = withDefaults(
defineProps<{
isShown: boolean
Expand All @@ -39,23 +37,18 @@ const props = withDefaults(
},
)
// Log when modal props change
watch(() => props.isShown, (newVal) => {
console.log(`Modal isShown prop changed: ${newVal}`);
if (newVal) {
console.log("Modal opened");
} else {
console.log("Modal closed");
}
});
// Function to handle modal closing
function handleModalClose(event: boolean) {
console.log(`Modal closing: ${event}`);
emit('update:is-shown', event); // Emit event to update parent
emit('update:is-shown', event);
}
// Log when component mounts
onMounted(() => {
console.log('mint-nogs-modal component mounted');
});
Expand All @@ -66,13 +59,23 @@ onMounted(() => {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5); /* Dimmed background for modal focus */
z-index: 1000; /* Ensure modal appears on top */
}
.full-size-iframe {
width: 100%;
height: 100%;
width: 80%; /* Adjust width as needed */
max-width: 600px; /* Limit max width */
height: 80%; /* Adjust height as needed */
border: none;
background: #ffffff; /* White background for the iframe content */
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Shadow for depth */
}
</style>
90 changes: 90 additions & 0 deletions src/pages/HomePage/components/Leaderboard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<!-- ../components/Leaderboard.vue -->
<template>
<div class="leaderboard-container">
<h2 class="leaderboard-title">{{ title }}</h2>
<table class="leaderboard-table">
<thead>
<tr>
<th>User</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr v-for="(entry, index) in entries" :key="index">
<td class="user-cell">
<a :href="`https://nounspace.com/s/${entry.username}`" target="_blank" class="user-link">
<img v-if="entry.pfp_url" :src="entry.pfp_url" alt="Profile Picture" class="profile-pic" />
<span>{{ entry.display_name }}</span>
</a>
</td>
<td>{{ entry.amount_received }}</td>
</tr>
</tbody>
</table>
</div>
</template>

<script setup lang="ts">
import { defineProps } from 'vue';

const props = defineProps({
title: {
type: String,
required: true
},
entries: {
type: Array,
required: true
}
});
</script>

<style scoped>
.leaderboard-container {
padding: 10px;
border: 1px solid #eeeeee;
border-radius: 6px;
width: 100%;
}

.leaderboard-title {
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 1rem;
}

.leaderboard-table {
width: 100%;
border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
border: 1px solid #eeeeee;
padding: 8px;
text-align: left;
}

.leaderboard-table th {
background-color: #f4f4f4;
font-weight: 700;
}

.leaderboard-table tbody tr:hover {
background-color: #f0f0f0;
}

.profile-pic {
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 8px;
object-fit: cover;
vertical-align: middle;
}

.user-cell {
display: flex;
align-items: center;
}
</style>
56 changes: 56 additions & 0 deletions src/pages/HomePage/components/MintNogsContainer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!-- ../components/MintNogsContainer.vue -->
<template>
<div class="mint-nogs-container">
<p class="container-title mint-nogs-container-text">Mint nOGs, get rewarded.</p>
<ul class="mint-nogs-list">
<li class="mint-nogs-container-text">Earn $SPACE</li>
<li class="mint-nogs-container-text">Activate $SPACE tip allowance</li>
<li class="mint-nogs-container-text">Access to new features early</li>
<li class="mint-nogs-container-text">Enjoy premium access for life</li>
</ul>
</div>
</template>

<script setup>
</script>

<style scoped>
/* Styles for MintNogsContainer component */

.mint-nogs-container {
background-image: url('@/assets/mint_nogs.png'); /* Ensure the image path is correct */
background-size: cover;
background-position: center;
border-radius: 8px;
padding: 24px; /* Increased padding for better spacing */
color: white; /* Ensures text remains readable on the background */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Adds a shadow to elevate the container */
}

/* Title styling */
.container-title {
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 1rem;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6); /* Add shadow to improve readability */
}

/* Text color and styling for list items */
.mint-nogs-container-text {
color: #ffffff; /* Ensures text color is white for readability */
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6); /* Adds shadow to text for better contrast */
}

/* Styling for the unordered list */
.mint-nogs-list {
padding-left: 1.5rem;
list-style-type: disc;
margin: 0;
}

.mint-nogs-list li {
font-weight: 500;
margin: 0.5rem 0;
line-height: 1.4;
}
</style>
61 changes: 61 additions & 0 deletions src/pages/HomePage/components/SpaceButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!-- ../components/SpaceButton.vue -->
<template>
<button :class="['app-view__container', buttonClass]" @click="onClick">
<p class="container-title">{{ title }}</p>
</button>
</template>

<script setup>
import { defineProps, defineEmits } from 'vue';

const props = defineProps({
title: String,
buttonClass: String,
});

const emit = defineEmits(['click']);

function onClick() {
emit('click');
}
</script>

<style scoped>
/* Base button style */
.app-view__container {
border-radius: 6px;
padding: 20px;
text-align: center;
cursor: pointer;
transition: box-shadow 0.3s ease, background-color 0.3s ease;
color: #ffffff; /* Ensures text color is always white */
font-weight: 700;
}

/* Title style */
.container-title {
margin: 0;
font-size: 1.25rem;
}

/* Styles for specific button classes */
.space-drop-button {
background-color: #00ff00; /* Green background */
width: 100%; /* Full width */
}

.space-drop-button:hover {
background-color: #00cc00;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Shadow on hover */
}

.mint-nogs-button {
background-color: #FF5A1F; /* Orange background */
width: 100%; /* Full width */
}

.mint-nogs-button:hover {
background-color: #e04e1a;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Shadow on hover */
}
</style>
72 changes: 72 additions & 0 deletions src/pages/HomePage/components/TabsContainer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<template>
<div class="tabs-container">
<div class="tabs">
<button
:class="{ active: activeTab === 0 }"
@click="selectTab(0)"
>
Season 2
</button>
<button
:class="{ active: activeTab === 1 }"
@click="selectTab(1)"
>
Season 1
</button>
</div>
</div>
</template>

<script setup lang="ts">
import { defineProps, defineEmits } from 'vue';
const props = defineProps({
activeTab: {
type: Number,
required: true
}
});
const emit = defineEmits(['changeTab']);
function selectTab(tabIndex: number) {
emit('changeTab', tabIndex);
}
</script>

<style scoped>
.tabs-container {
display: flex;
flex-direction: column;
width: 100%;
}
.tabs {
display: flex;
margin-bottom: 1rem;
justify-content: center; /* Center the tabs horizontally */
}
.tabs button {
padding: 10px 20px;
margin: 0 5px; /* Add spacing between buttons */
cursor: pointer;
border: none;
background-color: #eeeeee;
color: black;
font-weight: bold;
transition: background-color 0.3s ease, color 0.3s ease;
}
/* Add extra specificity here to ensure the active state takes effect */
.tabs button.active {
background-color: #00cc00 !important;
color: white !important;
font-weight: bold;
border-bottom: 3px solid #007b00;
}
.tabs button:not(.active):hover {
background-color: #cccccc; /* Hover effect for inactive buttons */
}
</style>
Loading

0 comments on commit b448317

Please sign in to comment.