Skip to content

Commit fba8db1

Browse files
committed
improved index style
1 parent b3b8399 commit fba8db1

File tree

6 files changed

+165
-15
lines changed

6 files changed

+165
-15
lines changed

main.go

+1-15
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
11
package main
22

33
import (
4-
"fmt"
54
"log"
65
"net/http"
76
"os"
87
)
98

10-
const INDEX = `<!DOCTYPE html>
11-
<html>
12-
<head>
13-
<title>Powered By Paketo Buildpacks</title>
14-
</head>
15-
<body>
16-
<img style="display: block; margin-left: auto; margin-right: auto; width: 50%;" src="https://paketo.io/images/paketo-logo-full-color.png"></img>
17-
</body>
18-
</html>`
19-
209
func main() {
21-
http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
22-
fmt.Fprint(w, INDEX)
23-
})
24-
10+
http.Handle("/", http.FileServer(http.Dir("./static")))
2511
log.Fatal(http.ListenAndServe(":"+os.Getenv("PORT"), nil))
2612
}

manifest.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: sample
2+
configuration:
3+
environment:
4+
BP_KEEP_FILES: "static/*"

static/index.html

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<title>Epinio Sample App</title>
6+
7+
<style>
8+
body {
9+
background-color: #a2d3da;
10+
font-family: sans-serif;
11+
}
12+
13+
.center {
14+
margin: auto;
15+
width: 50%;
16+
padding: 10px;
17+
text-align: center;
18+
}
19+
</style>
20+
</head>
21+
22+
<body>
23+
<div class="center">
24+
<h1>Hello World!</h1>
25+
<img style="width: 400px;" src="logo-epinio.svg" />
26+
27+
<div style="margin-top: 50px;">
28+
<p>Made with ❤️</p>
29+
30+
<div style="display: flex; justify-content: center;">
31+
<img style="width: 200px;" src="logo-rancher.svg" />
32+
<img style="width: 200px;" src="logo-suse.svg" />
33+
</div>
34+
</div>
35+
</div>
36+
</body>
37+
38+
</html>

static/logo-epinio.svg

+61
Loading

static/logo-rancher.svg

+51
Loading

static/logo-suse.svg

+10
Loading

0 commit comments

Comments
 (0)