Skip to content

Commit

Permalink
server/assets/images: Added the 'favicion' and 'logo'
Browse files Browse the repository at this point in the history
They are simple logos that I generated that more or less look good so for now they'll do.

I also like the icon as it's a possible maze you can do in the game so that's why this
may not change in the future just the stile of it
  • Loading branch information
xescugc committed Jan 11, 2024
1 parent b5f4b03 commit 3b9668a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import (

// Assets defines the embedded files
//
//go:embed css/* js/* wasm/*
//go:embed css/* js/* wasm/* images/*
var Assets embed.FS
4 changes: 4 additions & 0 deletions server/assets/css/cover.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ body {
* Header
*/

.logo{
height: 40px;
}

.nav-masthead .nav-link {
color: rgba(255, 255, 255, .5);
border-bottom: .25rem solid transparent;
Expand Down
Binary file added server/assets/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added server/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified server/assets/wasm/maze-wars.wasm
Binary file not shown.
1 change: 1 addition & 0 deletions server/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func New(ad *ActionDispatcher, s *Store, opt Options) error {
hmux.Handle("/css/", http.FileServer(http.FS(assets.Assets)))
hmux.Handle("/js/", http.FileServer(http.FS(assets.Assets)))
hmux.Handle("/wasm/", http.FileServer(http.FS(assets.Assets)))
hmux.Handle("/images/", http.FileServer(http.FS(assets.Assets)))

svr := &http.Server{
Addr: fmt.Sprintf(":%s", opt.Port),
Expand Down
7 changes: 5 additions & 2 deletions server/templates/views/layouts/layout.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</title>
<link href="/css/bootstrap.min.css" rel="stylesheet" />
<link href="/css/cover.css" rel="stylesheet" />
<link rel="icon" type="image/png" href="images/favicon.png" />
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-8W1NGJ7X95"></script>
Expand All @@ -20,10 +21,12 @@

<body class="d-flex h-100 text-center text-bg-dark">
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
<header class="mb-auto">
<header class="mb-auto" >
<div>
<h3 class="float-md-start mb-0">
<a class="text-decoration-none text-reset" href="/">Maze Wars</a>
<a class="text-decoration-none text-reset" href="/">
<img class="img-fluid logo" src="images/logo.png"/>
</a>
</h3>
<nav class="nav nav-masthead justify-content-center float-md-end">
<a class="nav-link fw-bold py-1 px-0 active" href="/">Home</a>
Expand Down

0 comments on commit 3b9668a

Please sign in to comment.