commit 9a4c281db32c12f4f38719181ddb938f57807bac Author: Crow Date: Wed Mar 29 01:06:21 2017 +0200 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6905afb --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +node_modules +gulpfile.js +.sftp-config.json +build +meikan \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..f999be5 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +A [Meikan](https://git.fuyu.moe/Fuyu/meikan) client with a twist. Lets hope it will be beautiful. diff --git a/meikan.go b/meikan.go new file mode 100644 index 0000000..07e221d --- /dev/null +++ b/meikan.go @@ -0,0 +1,44 @@ +package main + +import ( + "html/template" + "log" + "net" + "net/http" + "os" + + "github.com/julienschmidt/httprouter" +) + +const sockPath = "/srv/kumori.moe/sock/meikan.sock" + +var templates = template.Must(template.ParseGlob("templates/*.html")) + +func main() { + os.Remove(sockPath) + sock, err := net.Listen("unix", sockPath) + + if err != nil { + log.Fatalln(err) + return + } + + router := httprouter.New() + + router.GET("/", index) + router.ServeFiles("/static/*filepath", http.Dir("static/")) + + if err := os.Chmod(sockPath, 0770); err != nil { + log.Fatalln(err) + return + } + + log.Fatal(http.Serve(sock, router)) +} + +func index(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + err := templates.ExecuteTemplate(w, "home.html", nil) + if err != nil { + println(err) + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..5980f9c --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "devDependencies": { + "gulp": "^3.9.1", + "gulp-sass": "^3.1.0", + "gulp-scp2": "^0.2.0", + "gulp-sftp": "^0.1.5", + "gulp-sftp-with-callbacks": "^0.1.8", + "scp2": "^0.5.0" + } +} diff --git a/sass/base.scss b/sass/base.scss new file mode 100644 index 0000000..66dc130 --- /dev/null +++ b/sass/base.scss @@ -0,0 +1,237 @@ +@font-face +{ + font-family: 'Roboto'; + font-weight: 400; + font-style: normal; + + src: local('Roboto'), local('Roboto-Regular'), url(/static/fonts/roboto.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; +} + +@font-face +{ + font-family: 'Material Icons'; + font-weight: 400; + font-style: normal; + + src: local('Material Icons'), local('MaterialIcons-Regular'), url(/static/fonts/material-icons.woff2) format('woff2'); +} + +@import 'variables'; + +* +{ + box-sizing: border-box; +} + +html, +body +{ + font-family: 'Roboto', sans-serif; + + height: 100%; + margin: 0; +} + +body +{ + &:after + { + position: absolute; + top: 65px; + left: 0; + + width: 100%; + height: calc(100% - 65px); + + content: ''; + + opacity: .05; + background: url('/static/img/bg.svg'); + background-size: cover; + } + .material-icons + { + font-family: 'Material Icons'; + font-size: 24px; + font-weight: normal; + font-style: normal; + line-height: 1; + + display: inline-block; + + white-space: nowrap; + letter-spacing: normal; + text-transform: none; + word-wrap: normal; + + direction: ltr; + -webkit-font-feature-settings: 'liga'; + -webkit-font-smoothing: antialiased; + } + .container + { + position: relative; + + width: 1240px; + margin: 0 auto; + } + .menu +{ + font-size: 0; + + position: relative; + z-index: 2; + + height: 65px; + margin: 0; + padding: 0; + + background: #fff; + box-shadow: 0 3px 6px rgba(0,0,0,.23), 0 3px 6px rgba(0,0,0,.16); + a + { + font-size: 22px; + font-variant: small-caps; + line-height: 65px; + + display: inline-block; + + height: 100%; + padding: 0 30px; + + transition: background .1s, color .1s; + vertical-align: middle; + text-decoration: none; + + color: rgba(0,0,0,.52); + &:first-child + { + font-size: 30px; + font-variant: normal; + + padding-left: 0; + + color: #ff4081; + > i { + height: inherit; + line-height: inherit; + vertical-align: top; + font-size: 30px; + } + > span + { + margin-left: 10px; + } + } + &:not(:first-child):hover, + &:not(:first-child).open + { + color: #fff; + background: #ff4081; + } + } +} +.submenu +{ + position: relative; + z-index: 1; + + overflow: hidden; + + width: 100%; + height: 0; + + transition: height .5s; + + background: #212121; + box-shadow: inset 0 3px 6px rgba(0,0,0,.23); + + will-change: height; + &.open + { + height: 350px; + } + .container + { + height: 350px; + .group + { + position: absolute; + top: 0; + left: 0; + + display: flex; + + width: 100%; + height: 100%; + + pointer-events: none; + + opacity: 0; + &.open + { + opacity: 1; + } + .column + { + display: flex; + flex-direction: column; + + margin: 20px 10px; + + color: #fff; + + flex: 1; + .groupTitle + { + line-height: 20px; + + max-height: 20px; + } + > * + { + display: flex; + + height: 100%; + } + ul + { + display: flex; + flex-direction: column; + + margin: 20px 0 0 10px; + padding: 10px 20px; + + list-style: none; + + border-left: 2px rgba(255,255,255,.1) solid; + li + { + position: relative; + + flex: 1; + .title + { + font-size: 16px; + + display: block; + + margin-bottom: 3px; + + color: #ff80ab; + } + .info + { + font-size: .8em; + font-weight: light; + + color: #aaa; + } + } + } + } + } + } +} +} diff --git a/sass/menu.scss b/sass/menu.scss new file mode 100644 index 0000000..266ee6f --- /dev/null +++ b/sass/menu.scss @@ -0,0 +1,158 @@ +.menu +{ + font-size: 0; + + position: relative; + z-index: 2; + + height: 65px; + margin: 0; + padding: 0; + + background: #fff; + box-shadow: 0 3px 6px rgba(0,0,0,.23), 0 3px 6px rgba(0,0,0,.16); + a + { + font-size: 22px; + font-variant: small-caps; + line-height: 65px; + + display: inline-block; + + height: 100%; + padding: 0 30px; + + transition: background .1s, color .1s; + vertical-align: middle; + text-decoration: none; + + color: rgba(0,0,0,.52); + &:first-child + { + font-size: 30px; + font-variant: normal; + + padding-left: 0; + + color: #ff4081; + > i { + height: inherit; + line-height: inherit; + vertical-align: top; + font-size: 30px; + } + > span + { + margin-left: 10px; + } + } + &:not(:first-child):hover, + &:not(:first-child).open + { + color: #fff; + background: #ff4081; + } + } +} +.submenu +{ + position: relative; + z-index: 1; + + overflow: hidden; + + width: 100%; + height: 0; + + transition: height .5s; + + background: #212121; + box-shadow: inset 0 3px 6px rgba(0,0,0,.23); + + will-change: height; + &.open + { + height: 350px; + } + .container + { + height: 350px; + .group + { + position: absolute; + top: 0; + left: 0; + + display: flex; + + width: 100%; + height: 100%; + + pointer-events: none; + + opacity: 0; + &.open + { + opacity: 1; + } + .column + { + display: flex; + flex-direction: column; + + margin: 20px 10px; + + color: #fff; + + flex: 1; + .groupTitle + { + line-height: 20px; + + max-height: 20px; + } + > * + { + display: flex; + + height: 100%; + } + ul + { + display: flex; + flex-direction: column; + + margin: 20px 0 0 10px; + padding: 10px 20px; + + list-style: none; + + border-left: 2px rgba(255,255,255,.1) solid; + li + { + position: relative; + + flex: 1; + .title + { + font-size: 16px; + + display: block; + + margin-bottom: 3px; + + color: #ff80ab; + } + .info + { + font-size: .8em; + font-weight: light; + + color: #aaa; + } + } + } + } + } + } +} \ No newline at end of file diff --git a/sass/variables.scss b/sass/variables.scss new file mode 100644 index 0000000..e69de29 diff --git a/static/css/base.css b/static/css/base.css new file mode 100644 index 0000000..d49bc12 --- /dev/null +++ b/static/css/base.css @@ -0,0 +1 @@ +@font-face{font-family:'Roboto';font-weight:400;font-style:normal;src:local("Roboto"),local("Roboto-Regular"),url(/static/fonts/roboto.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215}@font-face{font-family:'Material Icons';font-weight:400;font-style:normal;src:local("Material Icons"),local("MaterialIcons-Regular"),url(/static/fonts/material-icons.woff2) format("woff2")}*{box-sizing:border-box}html,body{font-family:'Roboto', sans-serif;height:100%;margin:0}body:after{position:absolute;top:65px;left:0;width:100%;height:calc(100% - 65px);content:'';opacity:.05;background:url("/static/img/bg.svg");background-size:cover}body .material-icons{font-family:'Material Icons';font-size:24px;font-weight:normal;font-style:normal;line-height:1;display:inline-block;white-space:nowrap;letter-spacing:normal;text-transform:none;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:'liga';-webkit-font-smoothing:antialiased}body .container{position:relative;width:1240px;margin:0 auto}body .menu{font-size:0;position:relative;z-index:2;height:65px;margin:0;padding:0;background:#fff;box-shadow:0 3px 6px rgba(0,0,0,0.23),0 3px 6px rgba(0,0,0,0.16)}body .menu a{font-size:22px;font-variant:small-caps;line-height:65px;display:inline-block;height:100%;padding:0 30px;transition:background .1s, color .1s;vertical-align:middle;text-decoration:none;color:rgba(0,0,0,0.52)}body .menu a:first-child{font-size:30px;font-variant:normal;padding-left:0;color:#ff4081}body .menu a:first-child>i{height:inherit;line-height:inherit;vertical-align:top;font-size:30px}body .menu a:first-child>span{margin-left:10px}body .menu a:not(:first-child):hover,body .menu a:not(:first-child).open{color:#fff;background:#ff4081}body .submenu{position:relative;z-index:1;overflow:hidden;width:100%;height:0;transition:height .5s;background:#212121;box-shadow:inset 0 3px 6px rgba(0,0,0,0.23);will-change:height}body .submenu.open{height:350px}body .submenu .container{height:350px}body .submenu .container .group{position:absolute;top:0;left:0;display:flex;width:100%;height:100%;pointer-events:none;opacity:0}body .submenu .container .group.open{opacity:1}body .submenu .container .group .column{display:flex;flex-direction:column;margin:20px 10px;color:#fff;flex:1}body .submenu .container .group .column .groupTitle{line-height:20px;max-height:20px}body .submenu .container .group .column>*{display:flex;height:100%}body .submenu .container .group .column ul{display:flex;flex-direction:column;margin:20px 0 0 10px;padding:10px 20px;list-style:none;border-left:2px rgba(255,255,255,0.1) solid}body .submenu .container .group .column ul li{position:relative;flex:1}body .submenu .container .group .column ul li .title{font-size:16px;display:block;margin-bottom:3px;color:#ff80ab}body .submenu .container .group .column ul li .info{font-size:.8em;font-weight:light;color:#aaa} diff --git a/static/css/menu.css b/static/css/menu.css new file mode 100644 index 0000000..5d0d225 --- /dev/null +++ b/static/css/menu.css @@ -0,0 +1 @@ +.menu{font-size:0;position:relative;z-index:2;height:65px;margin:0;padding:0;background:#fff;box-shadow:0 3px 6px rgba(0,0,0,0.23),0 3px 6px rgba(0,0,0,0.16)}.menu a{font-size:22px;font-variant:small-caps;line-height:65px;display:inline-block;height:100%;padding:0 30px;transition:background .1s, color .1s;vertical-align:middle;text-decoration:none;color:rgba(0,0,0,0.52)}.menu a:first-child{font-size:30px;font-variant:normal;padding-left:0;color:#ff4081}.menu a:first-child>i{height:inherit;line-height:inherit;vertical-align:top;font-size:30px}.menu a:first-child>span{margin-left:10px}.menu a:not(:first-child):hover,.menu a:not(:first-child).open{color:#fff;background:#ff4081}.submenu{position:relative;z-index:1;overflow:hidden;width:100%;height:0;transition:height .5s;background:#212121;box-shadow:inset 0 3px 6px rgba(0,0,0,0.23);will-change:height}.submenu.open{height:350px}.submenu .container{height:350px}.submenu .container .group{position:absolute;top:0;left:0;display:flex;width:100%;height:100%;pointer-events:none;opacity:0}.submenu .container .group.open{opacity:1}.submenu .container .group .column{display:flex;flex-direction:column;margin:20px 10px;color:#fff;flex:1}.submenu .container .group .column .groupTitle{line-height:20px;max-height:20px}.submenu .container .group .column>*{display:flex;height:100%}.submenu .container .group .column ul{display:flex;flex-direction:column;margin:20px 0 0 10px;padding:10px 20px;list-style:none;border-left:2px rgba(255,255,255,0.1) solid}.submenu .container .group .column ul li{position:relative;flex:1}.submenu .container .group .column ul li .title{font-size:16px;display:block;margin-bottom:3px;color:#ff80ab}.submenu .container .group .column ul li .info{font-size:.8em;font-weight:light;color:#aaa} diff --git a/static/css/variables.css b/static/css/variables.css new file mode 100644 index 0000000..e69de29 diff --git a/static/fonts/material-icons.woff2 b/static/fonts/material-icons.woff2 new file mode 100644 index 0000000..e6274b0 Binary files /dev/null and b/static/fonts/material-icons.woff2 differ diff --git a/static/fonts/roboto.woff2 b/static/fonts/roboto.woff2 new file mode 100644 index 0000000..120796b Binary files /dev/null and b/static/fonts/roboto.woff2 differ diff --git a/static/img/bg.svg b/static/img/bg.svg new file mode 100644 index 0000000..6323ac3 --- /dev/null +++ b/static/img/bg.svg @@ -0,0 +1,362 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/img/construction.png b/static/img/construction.png new file mode 100644 index 0000000..ce04cd7 Binary files /dev/null and b/static/img/construction.png differ diff --git a/static/img/construction1.png b/static/img/construction1.png new file mode 100644 index 0000000..f72f23e Binary files /dev/null and b/static/img/construction1.png differ diff --git a/static/img/construction2.png b/static/img/construction2.png new file mode 100644 index 0000000..e8d77d7 Binary files /dev/null and b/static/img/construction2.png differ diff --git a/templates/home.html b/templates/home.html new file mode 100644 index 0000000..c82e324 --- /dev/null +++ b/templates/home.html @@ -0,0 +1,586 @@ + + + + Meikan - Home + + + + + + + + + + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..1fed498 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,13 @@ + + + + Meikan + + + +
+ +
Under construction
+
+ + \ No newline at end of file