1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 14:59:36 +02:00

Refactor Docker Compose files, Tailwind config, UserCard component, and page server files

This commit is contained in:
Sean Morley 2024-04-27 16:35:04 +00:00
parent 3299855f86
commit b057ee01b3
7 changed files with 82 additions and 202 deletions

View file

@ -9,7 +9,4 @@ services:
- ORIGIN=http://localhost:3000 - ORIGIN=http://localhost:3000
- SKIP_DB_WAIT=true - SKIP_DB_WAIT=true
# Only necessary for externaly hosted databases such as NeonDB # Only necessary for externaly hosted databases such as NeonDB
volumes:
- ./sql:/sql
# docker compose -f ./compose-dev.yml up --build # docker compose -f ./compose-dev.yml up --build

View file

@ -11,8 +11,6 @@ services:
# Only necessary for externaly hosted databases such as NeonDB # Only necessary for externaly hosted databases such as NeonDB
depends_on: depends_on:
- db - db
volumes:
- ./sql:/sql
db: db:
image: postgres image: postgres
environment: environment:

View file

@ -7,7 +7,10 @@
<div class="card w-96 shadow-xl bg-primary-content"> <div class="card w-96 shadow-xl bg-primary-content">
<div class="card-body"> <div class="card-body">
<h2 class="card-title">{user.first_name} {user.last_name}</h2> <h2 class="card-title">{user.first_name} {user.last_name}</h2>
<p>{user.username} - {user.icon}</p> <p>
{user.username}{#if user.icon}
- {user.icon}{/if}
</p>
<p>Last Login: {user.last_login}</p> <p>Last Login: {user.last_login}</p>
<p>date: {user.signup_date}</p> <p>date: {user.signup_date}</p>
<p>{user.role}</p> <p>{user.role}</p>

View file

@ -1,192 +1,56 @@
{ {
"quotes": [ "quotes": [
{ {
"quote": "Believe you can and you're halfway there.", "quote": "A journey of a thousand miles begins with a single step.",
"author": "Theodore Roosevelt"
},
{
"quote": "The only way to do great work is to love what you do.",
"author": "Steve Jobs"
},
{
"quote": "In the middle of every difficulty lies opportunity.",
"author": "Albert Einstein"
},
{
"quote": "The future belongs to those who believe in the beauty of their dreams.",
"author": "Eleanor Roosevelt"
},
{
"quote": "It does not matter how slowly you go as long as you do not stop.",
"author": "Confucius"
},
{
"quote": "Success is not final, failure is not fatal: It is the courage to continue that counts.",
"author": "Winston Churchill"
},
{
"quote": "The only limit to our realization of tomorrow will be our doubts of today.",
"author": "Franklin D. Roosevelt"
},
{
"quote": "Don't watch the clock; do what it does. Keep going.",
"author": "Sam Levenson"
},
{
"quote": "You are never too old to set another goal or to dream a new dream.",
"author": "C.S. Lewis"
},
{
"quote": "The only person you are destined to become is the person you decide to be.",
"author": "Ralph Waldo Emerson"
},
{
"quote": "Happiness is not something ready-made. It comes from your own actions.",
"author": "Dalai Lama"
},
{
"quote": "Life is what happens when you're busy making other plans.",
"author": "John Lennon"
},
{
"quote": "You miss 100% of the shots you don't take.",
"author": "Wayne Gretzky"
},
{
"quote": "The best time to plant a tree was 20 years ago. The second best time is now.",
"author": "Chinese Proverb"
},
{
"quote": "The only way to achieve the impossible is to believe it is possible.",
"author": "Charles Kingsleigh"
},
{
"quote": "Don't count the days, make the days count.",
"author": "Muhammad Ali"
},
{
"quote": "You don't have to be great to start, but you have to start to be great.",
"author": "Zig Ziglar"
},
{
"quote": "You can't go back and change the beginning, but you can start where you are and change the ending.",
"author": "C.S. Lewis"
},
{
"quote": "Dream big and dare to fail.",
"author": "Norman Vaughan"
},
{
"quote": "The secret of getting ahead is getting started.",
"author": "Mark Twain"
},
{
"quote": "Everything you can imagine is real.",
"author": "Pablo Picasso"
},
{
"quote": "You must be the change you wish to see in the world.",
"author": "Mahatma Gandhi"
},
{
"quote": "If you want to lift yourself up, lift up someone else.",
"author": "Booker T. Washington"
},
{
"quote": "Believe in yourself and all that you are. Know that there is something inside you that is greater than any obstacle.",
"author": "Christian D. Larson"
},
{
"quote": "The journey of a thousand miles begins with one step.",
"author": "Lao Tzu" "author": "Lao Tzu"
}, },
{ {
"quote": "Life isn't about waiting for the storm to pass, it's about learning to dance in the rain.", "quote": "If we were meant to stay in one place, wed have roots instead of feet.",
"author": "Vivian Greene" "author": "Rachel Wolchin"
}, },
{ {
"quote": "You are never too old to set another goal or to dream a new dream.", "quote": "Adventure isnt hanging on a rope off the side of a mountain. Adventure is an attitude that we must apply to the day to day obstacles in life.",
"author": "Les Brown" "author": "John Amatt"
}, },
{ {
"quote": "Your time is limited, don't waste it living someone else's life.", "quote": "Wherever you go, go with all your heart.",
"author": "Steve Jobs" "author": "Confucius"
}, },
{ {
"quote": "Don't let yesterday take up too much of today.", "quote": "Until you step into the unknown, you dont know what youre made of.",
"author": "Will Rogers" "author": "Roy T. Bennett"
}, },
{ {
"quote": "The only thing standing between you and your goal is the story you keep telling yourself as to why you can't achieve it.", "quote": "You cant control the past, but you can control where you go next.",
"author": "Jordan Belfort" "author": "Kirsten Hubbard"
}, },
{ {
"quote": "The future belongs to those who prepare for it today.", "quote": "Life isnt about finding yourself. Life is about creating yourself.",
"author": "Malcolm X" "author": "George Bernard Shaw"
}, },
{ {
"quote": "The greatest glory in living lies not in never falling, but in rising every time we fall.", "quote": "It is not the mountain we conquer, but ourselves.",
"author": "Nelson Mandela" "author": "Edmund Hillary"
}, },
{ {
"quote": "It's not what happens to you, but how you react to it that matters.", "quote": "I am not the same, having seen the moon shine on the other side of the world.",
"author": "Epictetus" "author": "Mary Anne Radmacher"
}, },
{ {
"quote": "When one door of happiness closes, another opens, but often we look so long at the closed door that we do not see the one that has been opened for us.", "quote": "A mind that is stretched by a new experience can never go back to its old dimensions.",
"author": "Helen Keller" "author": "Oliver Wendell Holmes"
}, },
{ {
"quote": "The only thing that stands between you and your dream is the will to try and the belief that it is actually possible.", "quote": "Life is short and the world is wide.",
"author": "Joel Brown" "author": "Simon Raven"
}, },
{ {
"quote": "Success is walking from failure to failure with no loss of enthusiasm.", "quote": "Only those who risk going too far can possibly find out how far they can go.",
"author": "Winston Churchill" "author": "T.S. Eliot"
}, },
{ {
"quote": "Believe in yourself! Have faith in your abilities! Without a humble but reasonable confidence in your own powers you cannot be successful or happy.", "quote": "Believe you can and you're halfway there.",
"author": "Norman Vincent Peale" "author": "Theodore Roosevelt"
},
{
"quote": "The greatest adventure is what lies ahead.",
"author": "J.R.R. Tolkien"
},
{
"quote": "What you get by achieving your goals is not as important as what you become by achieving your goals.",
"author": "Zig Ziglar"
},
{
"quote": "To be yourself in a world that is constantly trying to make you something else is the greatest accomplishment.",
"author": "Ralph Waldo Emerson"
},
{
"quote": "What lies behind us and what lies before us are tiny matters compared to what lies within us.",
"author": "Ralph Waldo Emerson"
},
{
"quote": "The best and most beautiful things in the world cannot be seen or even touched - they must be felt with the heart.",
"author": "Helen Keller"
},
{
"quote": "I can't change the direction of the wind, but I can adjust my sails to always reach my destination.",
"author": "Jimmy Dean"
},
{
"quote": "If you're going through hell, keep going.",
"author": "Winston Churchill"
},
{
"quote": "Nothing is impossible, the word itself says 'I'm possible'!",
"author": "Audrey Hepburn"
},
{
"quote": "Keep your face always toward the sunshine - and shadows will fall behind you.",
"author": "Walt Whitman"
},
{
"quote": "Success is not the key to happiness. Happiness is the key to success. If you love what you are doing, you will be successful.",
"author": "Albert Schweitzer"
} }
] ]
} }

View file

@ -35,9 +35,17 @@ export const actions: Actions = {
// change the theme only if it is one of the allowed themes // change the theme only if it is one of the allowed themes
if ( if (
theme && theme &&
["light", "dark", "night", "retro", "forest", "aqua", "forest"].includes( [
theme "light",
) "dark",
"night",
"retro",
"forest",
"aqua",
"forest",
"garden",
"emerald",
].includes(theme)
) { ) {
cookies.set("colortheme", theme, { cookies.set("colortheme", theme, {
path: "/", path: "/",

View file

@ -8,7 +8,7 @@ import {
userVisitedWorldTravel, userVisitedWorldTravel,
} from "$lib/db/schema"; } from "$lib/db/schema";
import type { DatabaseUser } from "$lib/server/auth"; import type { DatabaseUser } from "$lib/server/auth";
import { count } from "drizzle-orm"; import { count, eq } from "drizzle-orm";
export const load: PageServerLoad = async (event) => { export const load: PageServerLoad = async (event) => {
let users: DatabaseUser[] = []; let users: DatabaseUser[] = [];
@ -26,6 +26,7 @@ export const load: PageServerLoad = async (event) => {
visitCount = (await db visitCount = (await db
.select({ count: count() }) .select({ count: count() })
.from(adventureTable) .from(adventureTable)
.where(eq(adventureTable.type, "mylog"))
.execute()) as unknown as number; .execute()) as unknown as number;
userCount = (await db userCount = (await db
.select({ count: count() }) .select({ count: count() })

View file

@ -6,6 +6,15 @@ export default {
}, },
plugins: [require("@tailwindcss/typography"), require("daisyui")], plugins: [require("@tailwindcss/typography"), require("daisyui")],
daisyui: { daisyui: {
themes: ["light", "dark", "night", "retro", "forest", "aqua", "garden"], themes: [
"light",
"dark",
"night",
"retro",
"forest",
"aqua",
"garden",
"emerald",
],
}, },
}; };