Browse Source

first server version added

master
Christian Müller 8 years ago
parent
commit
0833852238
  1. 57
      Gopkg.lock
  2. 3
      Gopkg.toml
  3. 7
      assets/public/index.html
  4. 24
      assets/public/style.css
  5. 18
      server.go

57
Gopkg.lock generated

@ -0,0 +1,57 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
name = "github.com/labstack/echo"
packages = ["."]
revision = "cec7629194fe4bf83b0c72d9a02d340c7a1468ac"
version = "3.2.3"
[[projects]]
name = "github.com/labstack/gommon"
packages = ["color","log"]
revision = "779b8a8b9850a97acba6a3fe20feb628c39e17c1"
version = "0.2.2"
[[projects]]
name = "github.com/mattn/go-colorable"
packages = ["."]
revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072"
version = "v0.0.9"
[[projects]]
name = "github.com/mattn/go-isatty"
packages = ["."]
revision = "fc9e8d8ef48496124e79ae0df75490096eccf6fe"
version = "v0.0.2"
[[projects]]
branch = "master"
name = "github.com/valyala/bytebufferpool"
packages = ["."]
revision = "e746df99fe4a3986f4d4f79e13c1e0117ce9c2f7"
[[projects]]
branch = "master"
name = "github.com/valyala/fasttemplate"
packages = ["."]
revision = "dcecefd839c4193db0d35b88ec65b4c12d360ab0"
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
packages = ["acme","acme/autocert"]
revision = "81e90905daefcd6fd217b62423c0908922eadb30"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = ["unix"]
revision = "a5054c7c1385fd50d9394475365355a87a7873ec"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "e1534696ddba3fee15190f7971602342df68b7eba8217a1438fd7dd150d82ba1"
solver-name = "gps-cdcl"
solver-version = 1

3
Gopkg.toml

@ -0,0 +1,3 @@
[[constraint]]
name = "github.com/labstack/echo"
version = "3.1.0"

7
assets/public/index.html

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>NoteHub &mdash; Free Pastebin for One-Off Markdown Publishing</title> <title>NoteHub &mdash; Pastebin for One-Off Markdown Publishing</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="width=device-width, initial-scale=1.0" name="viewport">
<link href="/style.css" rel="stylesheet" type="text/css" /> <link href="/style.css" rel="stylesheet" type="text/css" />
@ -9,7 +9,7 @@
<body> <body>
<div id="hero"> <div id="hero">
<h1>NoteHub</h1> <h1>NoteHub</h1>
<h2>Free and Hassle-free Pastebin for Markdown Notes</h2> <h2>Pastebin for One-Off Markdown Publishing</h2>
<br> <br>
<a class="landing-button demo" href="/Demo.md" style="color: white">See Demo Note</a> <a class="landing-button demo" href="/Demo.md" style="color: white">See Demo Note</a>
<a class="landing-button" href="/new" style="color: white">New Note</a> <a class="landing-button" href="/new" style="color: white">New Note</a>
@ -18,8 +18,7 @@
<article class="bottom-space"> <article class="bottom-space">
<h2>Changelog</h2> <h2>Changelog</h2>
<ul> <ul>
<li><strong>2017-08</strong>: NoteHub 3.0 released.</li> <li><strong>2017-08</strong>: NoteHub 3.0 released: rewritten in Go; all features but essential dropped.</li>
<li><strong>2016-08</strong>: Syntax highlighting for code blocks added (thanks to <a href="https://github.com/maciejsmolinski">Maciej</a>).</li>
<li><strong>2016-03</strong>: Note deletion feature added.</li> <li><strong>2016-03</strong>: Note deletion feature added.</li>
<li><strong>2015-10</strong>: NoteHub rewritten in Node.js.</li> <li><strong>2015-10</strong>: NoteHub rewritten in Node.js.</li>
<li><strong>2015-10</strong>: NoteHub API and note styling discontinued due to low adoption.</li> <li><strong>2015-10</strong>: NoteHub API and note styling discontinued due to low adoption.</li>

24
assets/public/style.css

@ -18,13 +18,24 @@ html, body {
padding-top: 5em; padding-top: 5em;
} }
#hero h1 {
font-family: Impact;
font-size: 2.5em;
}
#hero h2 {
margin: 2em;
font-family: sans-serif;
font-weight: 300;
}
.ui-border { .ui-border {
border-radius: 3px; border-radius: 3px;
border: 1px solid #333; border: 1px solid #333;
} }
a { a {
border-bottom: 1px dotted;
text-decoration: none; text-decoration: none;
color: #097; color: #097;
} }
@ -34,7 +45,7 @@ a:hover {
} }
a:visited { a:visited {
color: #054; color: #075;
} }
.button { .button {
@ -119,15 +130,6 @@ h6 {
font-size: 1.0em; font-size: 1.0em;
} }
#hero h1 {
font-size: 2.5em;
}
#hero h2 {
margin: 2em;
font-weight: 300;
}
#dashed-line { #dashed-line {
border-bottom: 1px dashed#888; border-bottom: 1px dashed#888;
} }

18
server.go

@ -0,0 +1,18 @@
package main
import (
"net/http"
"github.com/labstack/echo"
)
func main() {
e := echo.New()
e.Static("/", "assets/public")
e.GET("/", func(c echo.Context) error {
return c.String(http.StatusOK, "Hello, World!")
})
e.Logger.Fatal(e.Start(":3000"))
}
Loading…
Cancel
Save