Added java badge
This commit is contained in:
parent
a304e81aac
commit
3c6689c75d
20
main.go
20
main.go
|
@ -1,12 +1,12 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"log"
|
||||
"html/template"
|
||||
"strings"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Index struct {
|
||||
|
@ -50,7 +50,7 @@ type VideoItems struct {
|
|||
Thumbnail string
|
||||
}
|
||||
|
||||
var data = &Index {
|
||||
var data = &Index{
|
||||
WebpageTitle: "Keyemail",
|
||||
WebpageIcon: "/src/assets/main/favicon.ico",
|
||||
WebpageKeywords: "keyemail",
|
||||
|
@ -63,7 +63,7 @@ var data = &Index {
|
|||
|
||||
var currentData = &Index{}
|
||||
|
||||
var galleryItems = []GalleryItems {
|
||||
var galleryItems = []GalleryItems{
|
||||
{"/src/assets/gallery/2_cats.jpg", 1, "Resting Day"},
|
||||
{"/src/assets/gallery/friend_cat.jpg", 2, "Orange Furr"},
|
||||
{"/src/assets/gallery/miku_poster.jpg", 3, "Miku Spotted"},
|
||||
|
@ -81,7 +81,7 @@ var galleryItems = []GalleryItems {
|
|||
{"/src/assets/gallery/japanese_garden_6.jpg", 15, "Beautiful Pond"},
|
||||
}
|
||||
|
||||
var socialItems = []SocialItems {
|
||||
var socialItems = []SocialItems{
|
||||
{"https://discord.gg/VTEn4zuh", "Discord", "keyemail", "/src/assets/icons/discord.svg", "5865F2"},
|
||||
{"https://github.com/Keyemail", "GitHub", "Keyemail", "/src/assets/icons/github.svg", "171515"},
|
||||
{"https://steamcommunity.com/id/keyemail/", "Steam", "Keyemail", "/src/assets/icons/steam.svg", "000000"},
|
||||
|
@ -90,15 +90,15 @@ var socialItems = []SocialItems {
|
|||
{"https://www.instagram.com/keyemail1?igsh=OGQ5ZDc2ODk2ZA%3D%3D&utm_source=qr", "Instagram", "keyemail1", "/src/assets/icons/instagram.svg", "C13584"},
|
||||
}
|
||||
|
||||
var videoItems = []VideoItems {
|
||||
var videoItems = []VideoItems{
|
||||
{"/src/assets/videos/JP-Installing-Windows-Project.mp4", 1, "JP Installing Windows Project", "This is a guide in japanese where I teach you how to install windows completely. This was made because of a JP Project I had to do.", "/src/assets/video_thumbnails/JP-Installing-Windows-Project.png"},
|
||||
{"/src/assets/videos/orange-cat.mp4", 2, "Orange Cat", "Cute little orange cat that my friend has!! Hes so cute lol.", "/src/assets/video_thumbnails/orange-cat.png"},
|
||||
}
|
||||
|
||||
func renderTemplate(w http.ResponseWriter, tmpl string, data *Index, nav bool) {
|
||||
var templateFiles[]string
|
||||
var templateFiles []string
|
||||
|
||||
templateFiles = append(templateFiles, "src/pages/" + tmpl + ".tmpl", "src/index.tmpl", "src/components/navbar.tmpl")
|
||||
templateFiles = append(templateFiles, "src/pages/"+tmpl+".tmpl", "src/index.tmpl", "src/components/navbar.tmpl")
|
||||
|
||||
templates, err := template.ParseFiles(templateFiles...)
|
||||
if err != nil {
|
||||
|
@ -152,7 +152,7 @@ func videoContentHandler(w http.ResponseWriter, req *http.Request) {
|
|||
if len(parts) == 3 && parts[1] == "videos" {
|
||||
idStr := parts[2]
|
||||
id, err := strconv.Atoi(idStr)
|
||||
if err!= nil || id < 1 || id > len(videoItems) {
|
||||
if err != nil || id < 1 || id > len(videoItems) {
|
||||
renderTemplate(w, "404", data, true)
|
||||
return
|
||||
}
|
||||
|
|
1
src/assets/badges/java.svg
Normal file
1
src/assets/badges/java.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="#ed2025" d="M277.7 312.9c9.8-6.7 23.4-12.5 23.4-12.5s-38.7 7-77.2 10.2c-47.1 3.9-97.7 4.7-123.1 1.3-60.1-8 33-30.1 33-30.1s-36.1-2.4-80.6 19c-52.5 25.4 130 37 224.5 12.1zm-85.4-32.1c-19-42.7-83.1-80.2 0-145.8C296 53.2 242.8 0 242.8 0c21.5 84.5-75.6 110.1-110.7 162.6-23.9 35.9 11.7 74.4 60.2 118.2zm114.6-176.2c.1 0-175.2 43.8-91.5 140.2 24.7 28.4-6.5 54-6.5 54s62.7-32.4 33.9-72.9c-26.9-37.8-47.5-56.6 64.1-121.3zm-6.1 270.5a12.2 12.2 0 0 1 -2 2.6c128.3-33.7 81.1-118.9 19.8-97.3a17.3 17.3 0 0 0 -8.2 6.3 70.5 70.5 0 0 1 11-3c31-6.5 75.5 41.5-20.6 91.4zM348 437.4s14.5 11.9-15.9 21.2c-57.9 17.5-240.8 22.8-291.6 .7-18.3-7.9 16-19 26.8-21.3 11.2-2.4 17.7-2 17.7-2-20.3-14.3-131.3 28.1-56.4 40.2C232.8 509.4 401 461.3 348 437.4zM124.4 396c-78.7 22 47.9 67.4 148.1 24.5a185.9 185.9 0 0 1 -28.2-13.8c-44.7 8.5-65.4 9.1-106 4.5-33.5-3.8-13.9-15.2-13.9-15.2zm179.8 97.2c-78.7 14.8-175.8 13.1-233.3 3.6 0-.1 11.8 9.7 72.4 13.6 92.2 5.9 233.8-3.3 237.1-46.9 0 0-6.4 16.5-76.2 29.7zM260.6 353c-59.2 11.4-93.5 11.1-136.8 6.6-33.5-3.5-11.6-19.7-11.6-19.7-86.8 28.8 48.2 61.4 169.5 25.9a60.4 60.4 0 0 1 -21.1-12.8z"/></svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -58,6 +58,10 @@
|
|||
<img src="/src/assets/badges/nginx.svg" aria-label="NGINX"/>
|
||||
<div>nginx</div>
|
||||
</li>
|
||||
<li>
|
||||
<img src="/src/assets/badges/java.svg" aria-label="JAVA"/>
|
||||
<div>Java</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</header>
|
||||
|
|
Loading…
Reference in a new issue