Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve contact form #41

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 46 additions & 2 deletions src/components/MeetingCard.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<div class="event-container" :style="background ? {background} : {}">
<div class="event-container" :class="{ 'future-meeting': isFutureMeeting, 'past-meeting': isPastMeeting }" :style="background ? {background} : {}">
<div class="meeting-status" v-if="isFutureMeeting || isPastMeeting">
{{ isFutureMeeting ? 'Upcoming' : 'Past Meeting' }}
</div>
<div class="cover-photo" v-if="event.photo" :style="{backgroundImage: `url(${event.photo})`}" />
<div class="event">
<component class="event-title" :is="event.link ? 'a' : 'span'" :href="event.link" target="_blank" style="color:white">
Expand All @@ -23,12 +26,18 @@
</template>

<script setup>
defineProps(["event", "solo", "background"]);
const props = defineProps(["event", "solo", "background"]);

const formatDate = (dateString) => {
return new Date(dateString + "T19:00:00") // that day at 7pm
.toLocaleDateString("en-us", {month: "long", day: "numeric", year: "numeric"});
}

const currentDate = new Date();
const meetingDate = new Date(props.event.date + "T19:00:00");

const isPastMeeting = meetingDate < currentDate;
const isFutureMeeting = meetingDate > currentDate;
</script>

<style scoped lang="scss">
Expand All @@ -40,6 +49,7 @@ const formatDate = (dateString) => {
flex-direction: column;
justify-content: center;
margin: 0 auto 80px auto;
position: relative;
&:first-of-type {
margin-top: 50px;
}
Expand All @@ -55,6 +65,7 @@ const formatDate = (dateString) => {
min-height: 0;
flex-shrink: 1;
}

.event {
&>* {
padding: 0 24px;
Expand All @@ -78,18 +89,21 @@ const formatDate = (dateString) => {
margin: 0;
}
}

.cover-photo {
width: 100%;
padding-bottom: 40%;
background-size: cover;
background-position: center;
}

.event-title {
margin: 12px 0 8px;
// text-decoration: none;
display: flex;
align-items: center;
}

.event-text {
scrollbar-width: thin;
&::-webkit-scrollbar {
Expand All @@ -100,6 +114,7 @@ const formatDate = (dateString) => {
min-height: 0;
flex-shrink: 1;
}

.event-footer {
display:flex;
justify-content: space-between;
Expand All @@ -109,10 +124,39 @@ const formatDate = (dateString) => {
margin: 2px -4px;
}
}

.external-link {
margin-right: 10px;
}

strong {
font-weight: 600;
}

.meeting-status {
position: absolute;
top: 10px;
right: 10px;
background-color: rgba(0, 0, 0, 0.6);
color: white;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
z-index: 1;
}

.future-meeting {
border: 2px solid #2ecc71;
.meeting-status {
background-color: #2ecc71;
}
}

.past-meeting {
opacity: 0.8;
.meeting-status {
background-color: rgba(0, 0, 0, 0.4);
}
}
</style>
1 change: 1 addition & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<title>HacKSU</title>
</head>
<body>
Expand Down
100 changes: 89 additions & 11 deletions src/views/Admin.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,96 @@
<template>
<div style="padding: 100px; color: black" v-if="loggedIn">
<h2>Admin Stuff</h2>
<ul>
<li><router-link to="/admin/redirects">Redirect Links</router-link></li>
<li><router-link to="/admin/staff">Staff Page Editor</router-link></li>
<li><router-link to="/admin/events">Events Editor</router-link></li>
<li><router-link to="/admin/informations">Information Cards Editor</router-link></li>
<li><router-link to="/admin/notes">Meeting Notes (edit)</router-link></li>
<li><router-link to="/admin/meetings">Meeting Notes (view)</router-link></li>
<li><a href="/audit-log">DB Edit Log</a></li>
</ul>
<div class="admin-container" v-if="loggedIn">
<div class="admin-content">
<h1 class="admin-title">Admin Dashboard</h1>
<div class="admin-grid">
<router-link to="/admin/redirects" class="admin-card">
<h3>Redirect Links</h3>
<p>Manage URL redirects and short links</p>
</router-link>
<router-link to="/admin/staff" class="admin-card">
<h3>Staff Page</h3>
<p>Edit staff members and roles</p>
</router-link>
<router-link to="/admin/events" class="admin-card">
<h3>Events</h3>
<p>Manage upcoming and past events</p>
</router-link>
<router-link to="/admin/informations" class="admin-card">
<h3>Information Cards</h3>
<p>Edit information and announcements</p>
</router-link>
<router-link to="/admin/notes" class="admin-card">
<h3>Meeting Notes</h3>
<p>Edit meeting notes and minutes</p>
</router-link>
<router-link to="/admin/meetings" class="admin-card">
<h3>View Meetings</h3>
<p>Browse all meeting notes</p>
</router-link>
<a href="/audit-log" class="admin-card">
<h3>DB Edit Log</h3>
<p>View database change history</p>
</a>
</div>
</div>
</div>
</template>

<script setup>
import { loggedIn } from "../globals.js";
</script>

<style scoped lang="scss">
.admin-container {
min-height: 100vh;
background-color: #f5f5f5;
padding: 2rem;
}

.admin-content {
max-width: 1200px;
margin: 0 auto;
padding-top: 80px;
}

.admin-title {
color: #333;
font-size: 2.5rem;
margin-bottom: 2rem;
text-align: center;
}

.admin-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.5rem;
padding: 1rem;
}

.admin-card {
background: white;
border-radius: 12px;
padding: 1.5rem;
text-decoration: none;
color: inherit;
transition: transform 0.2s, box-shadow 0.2s;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

&:hover {
transform: translateY(-4px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

h3 {
color: #2c3e50;
margin: 0 0 0.5rem 0;
font-size: 1.25rem;
}

p {
color: #666;
margin: 0;
font-size: 0.9rem;
}
}
</style>
Loading