Getting portfolio stuff working
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
package blog
|
||||||
|
|
||||||
|
import (
|
||||||
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
|
)
|
||||||
|
|
||||||
|
type project struct {
|
||||||
|
Title string `bson:"_id"`
|
||||||
|
Repository string `bson:"respository"`
|
||||||
|
Description string `bson:"description"`
|
||||||
|
Languages []struct {
|
||||||
|
Language string `bson:"language"`
|
||||||
|
Dates string `bson:"dates"`
|
||||||
|
} `bson:"language"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func portfolio(client *mongo.Client) {
|
||||||
|
//TODO
|
||||||
|
}
|
||||||
+7
-6
@@ -1,9 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
const (
|
||||||
"go.mongodb.org/mongo-driver/mongo"
|
portfolioSelector = "<p>Language Filter: <select id='langSelect' name='langSelect'>%v</select></p>"
|
||||||
|
portfolioSelectorOption = "<option value='%v'%v>%v</option>"
|
||||||
|
portfolioHeader = "<h2 class='portfolio-header'>%v</h2>"
|
||||||
|
portfolioLink = "<p class='portfolio-link'><a href='%v'>%v</a>"
|
||||||
|
portfolioLanguage = "<p class='portfolio-language'><b>%v</b>: %v</p>"
|
||||||
|
portfolioDesc = "<p class='portfolio-description'>%v</p>"
|
||||||
)
|
)
|
||||||
|
|
||||||
func portfolio(client *mongo.Client) {
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -28,3 +28,7 @@ func sendIndexWithContent(w http.ResponseWriter, content string) {
|
|||||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||||
w.Write(dat)
|
w.Write(dat)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func blogHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
//TODO
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user