update information
This commit is contained in:
parent
c80aa21eb8
commit
5bd39081f9
10 changed files with 521 additions and 414 deletions
24
main.go
24
main.go
|
|
@ -13,7 +13,7 @@ import (
|
|||
"time"
|
||||
|
||||
// "github.com/jackc/pgx/v5"
|
||||
"github.com/joho/godotenv"
|
||||
// "github.com/joho/godotenv"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
)
|
||||
|
|
@ -29,34 +29,12 @@ func main() {
|
|||
// listen to SIGTERM and SIGINT (ctrl-c)
|
||||
signal.Notify(sigChan, syscall.SIGTERM, syscall.SIGINT, os.Interrupt)
|
||||
|
||||
// Load connection string from .env file
|
||||
if os.Getenv("GO_ENV") != "production" {
|
||||
fmt.Println("Loading env...")
|
||||
err := godotenv.Load()
|
||||
if err != nil {
|
||||
log.Fatal("failed to load env", err)
|
||||
}
|
||||
}
|
||||
|
||||
templates, err := template.New("").ParseGlob("views/*.html")
|
||||
if err != nil {
|
||||
log.Fatalf("Error initializing templates: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// conn, err := pgx.Connect(context.Background(), os.Getenv("DB_URL"))
|
||||
// if err != nil {
|
||||
// log.Fatalf("Error connecting to database: %v\n", err)
|
||||
// }
|
||||
// defer func() {
|
||||
// // shutdown database connection
|
||||
// if err := conn.Close(context.Background()); err != nil {
|
||||
// log.Printf("Error closing database connection: %v\n", err)
|
||||
// } else {
|
||||
// log.Println("Database connection closed gracefully.")
|
||||
// }
|
||||
// }()
|
||||
|
||||
e := echo.New()
|
||||
e.Renderer = &TemplateRenderer{
|
||||
templates: templates,
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
DROP TABLE projects;
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
CREATE TABLE projects (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
repository_url VARCHAR(255),
|
||||
description VARCHAR(255) NOT NULL
|
||||
);
|
||||
|
|
@ -1 +0,0 @@
|
|||
DROP TABLE technologies;
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
CREATE TABLE technologies (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name VARCHAR(25) NOT NULL UNIQUE,
|
||||
url TEXT NOT NULL
|
||||
);
|
||||
|
|
@ -1 +0,0 @@
|
|||
DROP TABLE projects_technologies;
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
CREATE TABLE projects_technologies (
|
||||
project_id INTEGER NOT NULL REFERENCES projects(id),
|
||||
technology_id INTEGER NOT NULL REFERENCES technologies(id),
|
||||
PRIMARY KEY (project_id, technology_id) -- ensures a project-technology pair is unique
|
||||
);
|
||||
110
page.go
110
page.go
|
|
@ -26,6 +26,92 @@ type Page struct {
|
|||
func renderPage(c echo.Context) error {
|
||||
data := Page{}
|
||||
data.Projects = []Project{
|
||||
{
|
||||
Name: "Hermes",
|
||||
URL: "",
|
||||
Description: "The user-friendly terminal API client for those who are in love and addicted to do everything on the terminal.",
|
||||
Repo: "https://github.com/juancwu/hermes",
|
||||
Classes: "border-orange-400",
|
||||
TechList: []Tech{
|
||||
{
|
||||
TechName: "Rust",
|
||||
TechURL: "https://www.rust-lang.org/",
|
||||
TechClasses: "",
|
||||
},
|
||||
{
|
||||
TechName: "Ratatui",
|
||||
TechURL: "https://ratatui.rs/",
|
||||
TechClasses: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "Konbini",
|
||||
URL: "",
|
||||
Description: "A \"convenient store\" with API services to manage projects' secrets or environment variables with the ability to separate the variables into their own environment.",
|
||||
Repo: "https://github.com/juancwu/konbini",
|
||||
Classes: "border-sky-500",
|
||||
TechList: []Tech{
|
||||
{
|
||||
TechName: "Golang",
|
||||
TechURL: "https://go.dev/",
|
||||
TechClasses: "transition bg-zinc-950 text-zinc-100",
|
||||
},
|
||||
{
|
||||
TechName: "Echo",
|
||||
TechURL: "https://echo.labstack.com/",
|
||||
TechClasses: "bg-zinc-950 text-zinc-100",
|
||||
},
|
||||
{
|
||||
TechName: "PostgreSQL",
|
||||
TechURL: "https://www.postgresql.org/",
|
||||
TechClasses: "bg-zinc-950 text-zinc-100",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "EmojiScript",
|
||||
URL: "https://emojiscript.juancwu.dev/",
|
||||
Description: "A silly project started for a brain rot hackathon host by Audrey Chen. Please give it a shot if you are interested!",
|
||||
Repo: "https://github.com/KonferCA/EmojiScript",
|
||||
Classes: "border-green-400",
|
||||
TechList: []Tech{
|
||||
{
|
||||
TechName: "Typescript",
|
||||
TechURL: "https://www.typescriptlang.org/",
|
||||
TechClasses: "",
|
||||
},
|
||||
{
|
||||
TechName: "Devpost",
|
||||
TechURL: "https://brainrot-jia-seed-hackathon.devpost.com/",
|
||||
TechClasses: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "Konfer Website",
|
||||
URL: "https://konfer.ca",
|
||||
Description: "The official landing site for Konfer Inc.",
|
||||
Repo: "https://github.com/KonferCA/Konfer.ca",
|
||||
Classes: "border-indigo-300",
|
||||
TechList: []Tech{
|
||||
{
|
||||
TechName: "React",
|
||||
TechURL: "https://react.dev/",
|
||||
TechClasses: "",
|
||||
},
|
||||
{
|
||||
TechName: "Firebase",
|
||||
TechURL: "https://firebase.google.com/",
|
||||
TechClasses: "",
|
||||
},
|
||||
{
|
||||
TechName: "TailwindCSS",
|
||||
TechURL: "https://tailwindcss.com/",
|
||||
TechClasses: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "HawkHacks Website",
|
||||
URL: "https://hawkhacks.ca",
|
||||
|
|
@ -98,30 +184,6 @@ func renderPage(c echo.Context) error {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "Konbini",
|
||||
URL: "",
|
||||
Description: "A \"convenient store\" with API services to manage projects' secrets or environment variables with the ability to separate the variables into their own environment.",
|
||||
Repo: "https://github.com/juancwu/konbini",
|
||||
Classes: "border-sky-500",
|
||||
TechList: []Tech{
|
||||
{
|
||||
TechName: "Golang",
|
||||
TechURL: "https://go.dev/",
|
||||
TechClasses: "transition bg-zinc-950 text-zinc-100",
|
||||
},
|
||||
{
|
||||
TechName: "Echo",
|
||||
TechURL: "https://echo.labstack.com/",
|
||||
TechClasses: "bg-zinc-950 text-zinc-100",
|
||||
},
|
||||
{
|
||||
TechName: "PostgreSQL",
|
||||
TechURL: "https://www.postgresql.org/",
|
||||
TechClasses: "bg-zinc-950 text-zinc-100",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "Hachi-Bitto",
|
||||
URL: "",
|
||||
|
|
|
|||
750
pnpm-lock.yaml
generated
750
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -110,27 +110,20 @@
|
|||
<p class="text-md text-zinc-300 lg:text-xl">
|
||||
Hello there <span aria-hidden="true">👋</span>,
|
||||
</p>
|
||||
<p class="text-5xl font-bold text-zinc-100 md:text-6xl lg:text-7xl xl:text-9xl">
|
||||
I am Juan
|
||||
<p class="text-4xl font-bold text-zinc-100 lg:text-5xl xl:text-7xl">
|
||||
I am Juan,
|
||||
</p>
|
||||
<p class="text-2xl text-zinc-300 md:text-2xl lg:text-3xl xl:text-4xl">
|
||||
I am a Software Developer during the day
|
||||
a computer science student who <br> <span class="font-bold text-zinc-200">loves software development</span> <br> and <br> <span class="font-bold text-zinc-200">tinkers with hardware</span>!
|
||||
</p>
|
||||
<p class="text-2xl text-zinc-300 md:text-2xl lg:text-3xl xl:text-4xl">
|
||||
<span aria-label="and">&</span>
|
||||
work at
|
||||
<a href="https://lauriercs.ca" target="_blank" rel="noopener noreferrer"
|
||||
class="relative z-0 whitespace-nowrap font-medium underline decoration-sky-400 transition-all after:absolute after:left-0 after:top-0 after:-z-10 after:h-full after:w-0 after:bg-sky-500 after:transition-all hover:text-white hover:decoration-sky-500 hover:after:w-full focus:text-white focus:decoration-sky-500 focus:after:w-full">LCS</a>
|
||||
,
|
||||
<a href="https://hawkhacks.ca" target="_blank" rel="noopener noreferrer"
|
||||
class="relative z-0 whitespace-nowrap font-medium underline decoration-sky-400 transition-all after:absolute after:left-0 after:top-0 after:-z-10 after:h-0 after:w-full after:bg-sky-500 after:transition-all hover:text-white hover:decoration-sky-500 hover:after:h-full focus:text-white focus:decoration-sky-500 focus:after:h-full">HawkHacks</a>
|
||||
I currently work at
|
||||
<a href="https://konfer.ca" target="_blank" rel="noopener noreferrer"
|
||||
class="relative z-0 whitespace-nowrap font-medium underline decoration-sky-400 transition-all after:absolute after:left-0 after:top-0 after:-z-10 after:h-full after:w-0 after:bg-sky-500 after:transition-all hover:text-white hover:decoration-sky-500 hover:after:w-full focus:text-white focus:decoration-sky-500 focus:after:w-full">Konfer</a>
|
||||
and
|
||||
<a href="https://www.fitdrop.xyz" target="_blank" rel="noopener noreferrer"
|
||||
class="relative z-0 whitespace-nowrap font-medium underline decoration-sky-400 transition-all after:absolute after:left-0 after:top-0 after:-z-10 after:h-0 after:w-full after:bg-sky-500 after:transition-all hover:text-white hover:decoration-sky-500 hover:after:h-full focus:text-white focus:decoration-sky-500 focus:after:h-full">
|
||||
Fitdrop</a>
|
||||
at night
|
||||
<a href="https://hawkhacks.ca" target="_blank" rel="noopener noreferrer"
|
||||
class="relative z-0 whitespace-nowrap font-medium underline decoration-sky-400 transition-all after:absolute after:left-0 after:top-0 after:-z-10 after:h-0 after:w-full after:bg-sky-500 after:transition-all hover:text-white hover:decoration-sky-500 hover:after:h-full focus:text-white focus:decoration-sky-500 focus:after:h-full">HawkHacks</a>.
|
||||
</p>
|
||||
<p class="text-xs">(send help, I have been enslaved)</p>
|
||||
<div class="h-4" aria-hidden="true"></div>
|
||||
<p class="text-4xl font-medium md:inline-block lg:text-5xl">
|
||||
Check out my
|
||||
|
|
@ -156,12 +149,11 @@
|
|||
<span class="relative text-xl font-medium text-zinc-300 md:text-2xl">Welcome to</span>
|
||||
<span
|
||||
class="relative inline-block before:absolute before:-inset-1 before:block before:-skew-y-3 before:scale-90 before:bg-gradient-to-r before:from-purple-500 before:to-pink-500 before:opacity-60 before:transition-all hover:before:scale-100">
|
||||
<span class="relative"> Project Graveyard </span>
|
||||
</span>
|
||||
<span class="group relative"> Project Backyard </span>
|
||||
</h1>
|
||||
<a href="https://shoto.at/l/dumb-projects"
|
||||
<a href="https://github.com/juancwu" target="_blank" rel="noopener noreferrer"
|
||||
class="relative underline decoration-sky-400 after:absolute after:left-0 after:top-0 after:-z-10 after:h-full after:w-0 after:bg-sky-500 after:transition-all hover:text-white hover:decoration-sky-500 hover:after:w-full focus:text-white focus:decoration-sky-500 focus:after:w-full">
|
||||
Juan's dumb projects archive
|
||||
Checkout my GitHub for more projects!
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -173,7 +165,7 @@
|
|||
<div>
|
||||
<div class="flex flex-col items-center justify-between gap-4 md:flex-row md:gap-0">
|
||||
{{ if gt (len .URL) 1 }}
|
||||
<a href="{{ .URL }}"
|
||||
<a href="{{ .URL }}" target="_blank" rel="noopener noreferrer"
|
||||
class="relative flex items-center gap-2 transition-colors hover:text-sky-400">
|
||||
<h3 class="text-2xl font-medium">
|
||||
{{ .Name }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue