1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Added glyphicons

This commit is contained in:
Zack Scholl 2016-02-10 16:47:02 -05:00
parent 566767d94f
commit b0b5bd7319
5 changed files with 10 additions and 4 deletions

View File

@ -21,6 +21,7 @@ var AllowedIPs = map[string]bool{
// RuntimeArgs contains all runtime
// arguments available
var RuntimeArgs struct {
WikiName string
ExternalIP string
Port string
DatabaseLocation string
@ -40,6 +41,7 @@ func main() {
flag.StringVar(&RuntimeArgs.AdminKey, "a", "", "key to access admin priveleges")
flag.StringVar(&RuntimeArgs.ServerCRT, "crt", "", "location of ssl crt")
flag.StringVar(&RuntimeArgs.ServerKey, "key", "", "location of ssl key")
flag.StringVar(&RuntimeArgs.WikiName, "w", "AwwKoala", "custom name for wiki")
flag.CommandLine.Usage = func() {
fmt.Println(`AwwKoala: A Websocket Wiki and Kind Of A List Application
run this to start the server and then visit localhost at the port you specify

View File

@ -40,6 +40,7 @@ func editNote(c *gin.Context) {
if currentVersion {
c.HTML(http.StatusOK, "index.tmpl", gin.H{
"Title": title,
"WikiName": RuntimeArgs.WikiName,
"ExternalIP": RuntimeArgs.ExternalIP,
"CurrentText": currentText,
"NumRows": numRows,
@ -48,6 +49,7 @@ func editNote(c *gin.Context) {
} else {
c.HTML(http.StatusOK, "index.tmpl", gin.H{
"Title": title,
"WikiName": RuntimeArgs.WikiName,
"ExternalIP": RuntimeArgs.ExternalIP,
"CurrentText": currentText,
"NumRows": numRows,
@ -112,6 +114,7 @@ func renderMarkdown(c *gin.Context, currentText string, title string, versions [
html2 = strings.Replace(html2, "$", "$", -1)
c.HTML(http.StatusOK, "view.tmpl", gin.H{
"Title": title,
"WikiName": RuntimeArgs.WikiName,
"Body": template.HTML([]byte(html2)),
"Versions": versions,
})
@ -172,6 +175,7 @@ func renderList(c *gin.Context, title string) {
c.HTML(http.StatusOK, "list.tmpl", gin.H{
"Title": title,
"WikiName": RuntimeArgs.WikiName,
"ListItems": listItems,
})
}

View File

@ -55,7 +55,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">AwwKoala</a>
<a class="navbar-brand" href="/">{{ .WikiName }}</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
@ -82,7 +82,7 @@
<form action='#' id="emit" method="post" name="emit">
<div>
<textarea autofocus rows={{ .NumRows }} class='auto_submit_item' id="emit_data" name="emit_data" placeholder="Start typing, it will save automatically. Go to awwkoala.com/{{ .Title }} to reload your note. Do not post anything private since anyone with the URL can access this note.">{{ .CurrentText }}</textarea>
<textarea autofocus rows={{ .NumRows }} class='auto_submit_item' id="emit_data" name="emit_data" placeholder="Start typing, it will save automatically. Go to {{ .ExternalIP }}/{{ .Title }} to reload your note. Do not post anything private since anyone with the URL can access this note.">{{ .CurrentText }}</textarea>
</div>
</form>

View File

@ -28,7 +28,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">AwwKoala</a>
<a class="navbar-brand" href="/">{{ .WikiName }}</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">

View File

@ -24,7 +24,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">AwwKoala</a>
<a class="navbar-brand" href="/">{{ .WikiName }}</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">