Add missing slashes and tidy stuff up

This commit is contained in:
Eliot Whalan 2016-06-23 11:46:50 +10:00
parent 8f9a335488
commit 6abfd68c13
2 changed files with 6 additions and 7 deletions

View File

@ -11,10 +11,10 @@
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700"> <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Roboto:300,400,500,700">
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/icon?family=Material+Icons"> <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/icon?family=Material+Icons">
<!-- Bootstrap --> <!-- Bootstrap -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet"> <link href="/assets/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap-material-design.css"> <link rel="stylesheet" type="text/css" href="/assets/css/bootstrap-material-design.css">
<link rel="stylesheet" type="text/css" href="assets/css/ripples.min.css"> <link rel="stylesheet" type="text/css" href="/assets/css/ripples.min.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@ -41,8 +41,8 @@
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed --> <!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="assets/js/bootstrap.min.js"></script> <script src="/assets/js/bootstrap.min.js"></script>
<script src="assets/js/main.js"></script> <script src="/assets/js/main.js"></script>
</body> </body>
</html> </html>

View File

@ -219,8 +219,7 @@ func main() {
router.HandleFunc("/save", saveHandler) router.HandleFunc("/save", saveHandler)
router.HandleFunc("/save/{output}", saveHandler) router.HandleFunc("/save/{output}", saveHandler)
router.HandleFunc("/del/{pasteId}/{delKey}", delHandler) router.HandleFunc("/del/{pasteId}/{delKey}", delHandler)
router.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("static/")))) router.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("assets/"))))
router.PathPrefix("/assets").Handler(http.StripPrefix("/assets", http.FileServer(http.Dir("assets/"))))
err := http.ListenAndServe(PORT, router) err := http.ListenAndServe(PORT, router)
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)