A website written in Go using WebAssembly and Vugu that converts strings to and from various encodings.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
3.3 KiB

<html>
<div>
<!-- Start Navbar -->
<nav class="navbar is-dark">
<a @click="c.ShowNav=!c.ShowNav" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
<div class="container">
<div id="navMenu" :class='"navbar-menu "+func() string {if c.ShowNav {return "is-active"} else {return ""}}()'>
<div class="navbar-start">
<a @click='c.Navigate("/", nil)' class="navbar-item">
Home
</a>
<div :class='"navbar-item has-dropdown "+func() string {if c.ShowEncodingDropdown {return "is-active"} else {return ""}}()'>
<a class="navbar-link" @click="c.ShowEncodingDropdown=!c.ShowEncodingDropdown">
Encodings
</a>
<div class="navbar-dropdown">
<a @click='c.HideDropdowns(); c.Navigate("/hex", nil)' class="navbar-item">
Hex
</a>
<a @click='c.HideDropdowns(); c.Navigate("/base64", nil)' class="navbar-item">
Base64
</a>
<a @click='c.HideDropdowns(); c.Navigate("/base91", nil)' class="navbar-item">
Base91
</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<!-- End Navbar -->
<!-- Start Body -->
<section class="hero is-dark is-fullheight-with-navbar">
<div class="hero-body">
<!-- Start Render Page-specific Body -->
<vg-comp expr="c.Body"></vg-comp>
<!-- End Render Page-specific Body -->
</div>
</section>
<!-- End Body -->
<!-- Start Footer -->
<section class="hero is-small is-dark">
<div class="hero-body">
<div class="container">
<div class="columns">
<div class="column has-text-left">
Copyright &copy; <span vg-content='time.Now().Format("2006")'></span> Arsen Musayelyan
</div>
<div class="column has-text-centered ">
<p vg-content="runtime.Version()"></p>
</div>
<div class="column has-text-right">
This website was written in
<a class="has-text-primary" href="https://golang.org/">Go</a>
using
<a class="has-text-primary" href="https://webassembly.org/">WebAssembly</a>
and
<a class="has-text-primary" href="https://vugu.org">Vugu</a>
</div>
</div>
</div>
</div>
</section>
<!-- End Footer -->
</div>
<script type="application/x-go">
import (
"runtime"
"time"
"github.com/vugu/vgrouter"
)
type Root struct {
vgrouter.NavigatorRef
Body vugu.Builder
ShowNav bool `vugu:"data"`
ShowEncodingDropdown bool `vugu:"data"`
}
func (c *Root) HideDropdowns() {
c.ShowEncodingDropdown = false
}
</script>