-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
43 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package app | ||
|
||
import "github.com/gin-gonic/gin" | ||
|
||
type errorBag struct { | ||
baseBag | ||
Message error | ||
} | ||
|
||
func errorResponse(c *gin.Context, code int, err error) { | ||
data := errorBag{ | ||
Message: err, | ||
} | ||
|
||
c.HTML(code, "error.gohtml", data) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,5 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
{{ template "header.gohtml" . }} | ||
|
||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta charset="utf-8"> | ||
<title>Guess My Word</title> | ||
<strong>Error: {{ . }}</strong> | ||
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | ||
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" | ||
crossorigin="anonymous"> | ||
<link rel="icon" href="/assets/favicon.png" /> | ||
<link rel="stylesheet" href="/assets/index.css" /> | ||
</head> | ||
|
||
<body> | ||
<noscript> | ||
<strong>We're sorry but Guess My Word doesn't work properly without JavaScript enabled. | ||
Please enable it to continue.</strong> | ||
</noscript> | ||
|
||
<div id="app"> | ||
<div class="container"> | ||
<header> | ||
<h1> | ||
<a href="/"> | ||
<img src="/assets/logo.svg" | ||
alt="Question by Gregor Cresnar from the Noun Project, https://thenounproject.com/search/?q=question&i=540041" /> | ||
</a> | ||
Guess My Word | ||
</h1> | ||
</header> | ||
|
||
<div class="row"> | ||
<div class="col-md-12"> | ||
<p> | ||
This application hosts a daily word game. Guessing using the form | ||
below will place your guess above or below the box based on its place | ||
in the alphabet relative to today's word. Every day a new word will | ||
become guessable. Good luck! | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<hr /> | ||
|
||
<strong>Error: {{ . }}</strong> | ||
|
||
<hr /> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> | ||
{{ template "footer.gohtml" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters