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 // RuntimeArgs contains all runtime
// arguments available // arguments available
var RuntimeArgs struct { var RuntimeArgs struct {
WikiName string
ExternalIP string ExternalIP string
Port string Port string
DatabaseLocation string DatabaseLocation string
@ -40,6 +41,7 @@ func main() {
flag.StringVar(&RuntimeArgs.AdminKey, "a", "", "key to access admin priveleges") flag.StringVar(&RuntimeArgs.AdminKey, "a", "", "key to access admin priveleges")
flag.StringVar(&RuntimeArgs.ServerCRT, "crt", "", "location of ssl crt") flag.StringVar(&RuntimeArgs.ServerCRT, "crt", "", "location of ssl crt")
flag.StringVar(&RuntimeArgs.ServerKey, "key", "", "location of ssl key") flag.StringVar(&RuntimeArgs.ServerKey, "key", "", "location of ssl key")
flag.StringVar(&RuntimeArgs.WikiName, "w", "AwwKoala", "custom name for wiki")
flag.CommandLine.Usage = func() { flag.CommandLine.Usage = func() {
fmt.Println(`AwwKoala: A Websocket Wiki and Kind Of A List Application 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 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 { if currentVersion {
c.HTML(http.StatusOK, "index.tmpl", gin.H{ c.HTML(http.StatusOK, "index.tmpl", gin.H{
"Title": title, "Title": title,
"WikiName": RuntimeArgs.WikiName,
"ExternalIP": RuntimeArgs.ExternalIP, "ExternalIP": RuntimeArgs.ExternalIP,
"CurrentText": currentText, "CurrentText": currentText,
"NumRows": numRows, "NumRows": numRows,
@ -48,6 +49,7 @@ func editNote(c *gin.Context) {
} else { } else {
c.HTML(http.StatusOK, "index.tmpl", gin.H{ c.HTML(http.StatusOK, "index.tmpl", gin.H{
"Title": title, "Title": title,
"WikiName": RuntimeArgs.WikiName,
"ExternalIP": RuntimeArgs.ExternalIP, "ExternalIP": RuntimeArgs.ExternalIP,
"CurrentText": currentText, "CurrentText": currentText,
"NumRows": numRows, "NumRows": numRows,
@ -112,6 +114,7 @@ func renderMarkdown(c *gin.Context, currentText string, title string, versions [
html2 = strings.Replace(html2, "$", "$", -1) html2 = strings.Replace(html2, "$", "$", -1)
c.HTML(http.StatusOK, "view.tmpl", gin.H{ c.HTML(http.StatusOK, "view.tmpl", gin.H{
"Title": title, "Title": title,
"WikiName": RuntimeArgs.WikiName,
"Body": template.HTML([]byte(html2)), "Body": template.HTML([]byte(html2)),
"Versions": versions, "Versions": versions,
}) })
@ -172,6 +175,7 @@ func renderList(c *gin.Context, title string) {
c.HTML(http.StatusOK, "list.tmpl", gin.H{ c.HTML(http.StatusOK, "list.tmpl", gin.H{
"Title": title, "Title": title,
"WikiName": RuntimeArgs.WikiName,
"ListItems": listItems, "ListItems": listItems,
}) })
} }

View File

@ -55,7 +55,7 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a class="navbar-brand" href="/">AwwKoala</a> <a class="navbar-brand" href="/">{{ .WikiName }}</a>
</div> </div>
<div id="navbar" class="collapse navbar-collapse"> <div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
@ -82,7 +82,7 @@
<form action='#' id="emit" method="post" name="emit"> <form action='#' id="emit" method="post" name="emit">
<div> <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> </div>
</form> </form>

View File

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

View File

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