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:
parent
3299855f86
commit
b057ee01b3
7 changed files with 82 additions and 202 deletions
|
@ -9,7 +9,4 @@ services:
|
|||
- ORIGIN=http://localhost:3000
|
||||
- SKIP_DB_WAIT=true
|
||||
# Only necessary for externaly hosted databases such as NeonDB
|
||||
volumes:
|
||||
- ./sql:/sql
|
||||
|
||||
# docker compose -f ./compose-dev.yml up --build
|
|
@ -11,8 +11,6 @@ services:
|
|||
# Only necessary for externaly hosted databases such as NeonDB
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
- ./sql:/sql
|
||||
db:
|
||||
image: postgres
|
||||
environment:
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
<div class="card w-96 shadow-xl bg-primary-content">
|
||||
<div class="card-body">
|
||||
<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>date: {user.signup_date}</p>
|
||||
<p>{user.role}</p>
|
||||
|
|
|
@ -1,192 +1,56 @@
|
|||
{
|
||||
"quotes": [
|
||||
{
|
||||
"quote": "Believe you can and you're halfway there.",
|
||||
"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.",
|
||||
"quote": "A journey of a thousand miles begins with a single step.",
|
||||
"author": "Lao Tzu"
|
||||
},
|
||||
{
|
||||
"quote": "Life isn't about waiting for the storm to pass, it's about learning to dance in the rain.",
|
||||
"author": "Vivian Greene"
|
||||
"quote": "If we were meant to stay in one place, we’d have roots instead of feet.",
|
||||
"author": "Rachel Wolchin"
|
||||
},
|
||||
{
|
||||
"quote": "You are never too old to set another goal or to dream a new dream.",
|
||||
"author": "Les Brown"
|
||||
"quote": "Adventure isn’t 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": "John Amatt"
|
||||
},
|
||||
{
|
||||
"quote": "Your time is limited, don't waste it living someone else's life.",
|
||||
"author": "Steve Jobs"
|
||||
"quote": "Wherever you go, go with all your heart.",
|
||||
"author": "Confucius"
|
||||
},
|
||||
{
|
||||
"quote": "Don't let yesterday take up too much of today.",
|
||||
"author": "Will Rogers"
|
||||
"quote": "Until you step into the unknown, you don’t know what you’re made of.",
|
||||
"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.",
|
||||
"author": "Jordan Belfort"
|
||||
"quote": "You can’t control the past, but you can control where you go next.",
|
||||
"author": "Kirsten Hubbard"
|
||||
},
|
||||
{
|
||||
"quote": "The future belongs to those who prepare for it today.",
|
||||
"author": "Malcolm X"
|
||||
"quote": "Life isn’t about finding yourself. Life is about creating yourself.",
|
||||
"author": "George Bernard Shaw"
|
||||
},
|
||||
{
|
||||
"quote": "The greatest glory in living lies not in never falling, but in rising every time we fall.",
|
||||
"author": "Nelson Mandela"
|
||||
"quote": "It is not the mountain we conquer, but ourselves.",
|
||||
"author": "Edmund Hillary"
|
||||
},
|
||||
{
|
||||
"quote": "It's not what happens to you, but how you react to it that matters.",
|
||||
"author": "Epictetus"
|
||||
"quote": "I am not the same, having seen the moon shine on the other side of the world.",
|
||||
"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.",
|
||||
"author": "Helen Keller"
|
||||
"quote": "A mind that is stretched by a new experience can never go back to its old dimensions.",
|
||||
"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.",
|
||||
"author": "Joel Brown"
|
||||
"quote": "Life is short and the world is wide.",
|
||||
"author": "Simon Raven"
|
||||
},
|
||||
{
|
||||
"quote": "Success is walking from failure to failure with no loss of enthusiasm.",
|
||||
"author": "Winston Churchill"
|
||||
"quote": "Only those who risk going too far can possibly find out how far they can go.",
|
||||
"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.",
|
||||
"author": "Norman Vincent Peale"
|
||||
},
|
||||
{
|
||||
"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"
|
||||
"quote": "Believe you can and you're halfway there.",
|
||||
"author": "Theodore Roosevelt"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -35,9 +35,17 @@ export const actions: Actions = {
|
|||
// change the theme only if it is one of the allowed themes
|
||||
if (
|
||||
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, {
|
||||
path: "/",
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
userVisitedWorldTravel,
|
||||
} from "$lib/db/schema";
|
||||
import type { DatabaseUser } from "$lib/server/auth";
|
||||
import { count } from "drizzle-orm";
|
||||
import { count, eq } from "drizzle-orm";
|
||||
|
||||
export const load: PageServerLoad = async (event) => {
|
||||
let users: DatabaseUser[] = [];
|
||||
|
@ -26,6 +26,7 @@ export const load: PageServerLoad = async (event) => {
|
|||
visitCount = (await db
|
||||
.select({ count: count() })
|
||||
.from(adventureTable)
|
||||
.where(eq(adventureTable.type, "mylog"))
|
||||
.execute()) as unknown as number;
|
||||
userCount = (await db
|
||||
.select({ count: count() })
|
||||
|
|
|
@ -6,6 +6,15 @@ export default {
|
|||
},
|
||||
plugins: [require("@tailwindcss/typography"), require("daisyui")],
|
||||
daisyui: {
|
||||
themes: ["light", "dark", "night", "retro", "forest", "aqua", "garden"],
|
||||
themes: [
|
||||
"light",
|
||||
"dark",
|
||||
"night",
|
||||
"retro",
|
||||
"forest",
|
||||
"aqua",
|
||||
"garden",
|
||||
"emerald",
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue