Skip to content

Commit

Permalink
add announcement page
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiritin committed Aug 27, 2023
1 parent eb9e8c0 commit e2f3f47
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 0 deletions.
1 change: 1 addition & 0 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function run(): void

// Wild Times Seeder
$this->call(WildTimesSeeder::class);
$this->call(EurofurenceSeeder::class);

if (App::isLocal()) {
User::firstOrCreate([
Expand Down
62 changes: 62 additions & 0 deletions database/seeders/EurofurenceSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,67 @@ public function run(): void
'component' => "SingleRoom",
'schema' => [],
]);

$announcementPage = $project->pages()->updateOrCreate([
'component' => 'Announcement',
], [
'name' => 'Announcement',
'component' => 'Announcement',
'schema' => [
[
"name" => "Header",
"property" => "title",
"type" => "TextInput"
],
[
"name" => "Text",
"property" => "text",
"type" => "RichEditor"
],
[
"name" => "centerContent",
"property" => "centerContent",
"type" => "Checkbox"
],
[
"name" => "Header Size",
"property" => "headerSize",
"type" => "Select",
"options" => [
"text-3xl" => "text-3xl",
"text-4xl" => "text-4xl",
"text-5xl" => "text-5xl",
"text-6xl" => "text-6xl",
"text-7xl" => "text-7xl",
"text-8xl" => "text-8xl",
"text-9xl" => "text-9xl",
"text-10xl" => "text-10xl",
"text-11xl" => "text-11xl",
"text-12xl" => "text-12xl",
"text-13xl" => "text-13xl",
"text-14xl" => "text-14xl",
]
],
[
"name" => "Text Size",
"property" => "textSize",
"type" => "Select",
"options" => [
"text-3xl" => "text-3xl",
"text-4xl" => "text-4xl",
"text-5xl" => "text-5xl",
"text-6xl" => "text-6xl",
"text-7xl" => "text-7xl",
"text-8xl" => "text-8xl",
"text-9xl" => "text-9xl",
"text-10xl" => "text-10xl",
"text-11xl" => "text-11xl",
"text-12xl" => "text-12xl",
"text-13xl" => "text-13xl",
"text-14xl" => "text-14xl",
]
]
]
]);
}
}
59 changes: 59 additions & 0 deletions resources/js/Projects/EF27/Pages/Announcement.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<script setup>
const preserveClasses = [
"text-3xl",
"text-4xl",
"text-5xl",
"text-6xl",
"text-7xl",
"text-8xl",
"text-9xl",
"text-10xl",
"text-11xl",
"text-12xl",
"text-13xl",
"text-14xl",
]
defineProps({
title: {
type: String,
default: "Announcement"
},
text: {
type: String,
default: "Welp!\n\nLooks like there's no announcement right now."
},
centerContent: {
type: Boolean,
default: false
},
headerSize: {
type: String,
default: "text-12xl"
},
textSize: {
type: String,
default: "text-9xl"
},
})
</script>

<template>
<div class="h-full flex flex-col justify-center items-center z-50 bgImage bg-no-repeat bg-cover bg-center magicTextColor" :class="{'text-center': centerContent}">
<div class="p-16" :class="{'bg-white bg-opacity-80 max-w-7xl mx-auto min-h-full': useContainer}">
<h1 class="themeFont mb-12" :class="headerSize">{{ title }}</h1>
<p class="font-semibold themeFontSecondary leading-normal mx-auto whitespace-pre-wrap" :class="textSize">
<div class="textscreen" v-html="text"></div>
</p>
</div>
</div>
</template>

<style>
figcaption {
display: none;
}
.textscreen img {
padding:60px;
margin:auto;
}
</style>

0 comments on commit e2f3f47

Please sign in to comment.