Skip to content

Commit

Permalink
add wtg logo and landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
jlyon1 committed Apr 5, 2019
1 parent d515f00 commit cf5d935
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
49 changes: 49 additions & 0 deletions index.html
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello Bulma!</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600,800" rel="stylesheet">

<style>
.has-text-wtg {
color: #ED1C24;
}

.wtg-font-bold {
font-family: 'Open Sans', sans-serif;
font-weight: 800;
}

.wtg-font {
font-family: 'Open Sans', sans-serif;
font-weight: 600;
}
</style>
</head>

<body>
<section class="section">
<div class="container has-text-centered">
<h1 class="title wtg-font-bold">
Identity
</h1>
<p class="subtitle wtg-font">
A <a href="https://github.com/wtg/" class="has-text-wtg">WebTech</a> project, see more <a
class="has-text-wtg" href="https://www.github.com/wtg/identity">here</a>
</p>
<a href="https://github.com/wtg/">
<img style="width: 100px;" src="https://webtech.union.rpi.edu/static/wtg.svg" />

</a>
</div>

</section>

</body>

</html>
6 changes: 6 additions & 0 deletions main.go
Expand Up @@ -53,6 +53,11 @@ type RCSPostBody struct {
RCSID string `json:"rcs_id"`
}

// IndexHandler serves index.html
func (a *API) IndexHandler(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "index.html")
}

// ValidRCSChecker checks if the rcs id is valid
func (a *API) ValidRCSChecker(w http.ResponseWriter, r *http.Request) {
key := r.Header.Get("Authorization")
Expand Down Expand Up @@ -167,6 +172,7 @@ func main() {

r := chi.NewRouter()
r.Get("/valid/{rcsid}", api.ValidRCSChecker)
r.Get("/", api.IndexHandler)
log.Info("Serving at ", "0.0.0.0:"+strconv.Itoa(config.Port))

if err := http.ListenAndServe("0.0.0.0:"+strconv.Itoa(config.Port), r); err != nil {
Expand Down

0 comments on commit cf5d935

Please sign in to comment.