git ssb

30+

cel / git-ssb-web



Commit 5c317888ac03e12b594e51393886ad4496c105e3

Note ssb_appname in header

Charles Lehner committed on 3/8/2016, 6:18:55 AM
Parent: cce7638c52883b7a1e6aeb5c21028f6bf3f62e21

Files changed

index.jschanged
server.jschanged
static/styles.csschanged
index.jsView
@@ -168,8 +168,9 @@
168168 var ssb, reconnect, myId, getRepo, getVotes, getMsg
169169 var about = function (id, cb) { cb(null, {name: id}) }
170170 var reqQueue = []
171171 var isPublic = opts.public
172+ var ssbAppname = opts.appname || 'ssb'
172173
173174 var addr = parseAddr(opts.listenAddr, {host: 'localhost', port: 7718})
174175 http.createServer(onRequest).listen(addr.port, addr.host, onListening)
175176
@@ -321,9 +322,11 @@
321322 '<link rel=stylesheet href="/styles.css"/>',
322323 '</head>\n',
323324 '<body>',
324325 '<header>',
325- '<h1><a href="/">git ssb</a></h1>',
326+ '<h1><a href="/">git ssb</a>' +
327+ (ssbAppname != 'ssb' ? ' <sub>' + ssbAppname + '</sub>' : '') +
328+ '</h1>',
326329 '</header>',
327330 '<article>']),
328331 renderTry(read),
329332 pull.once('</article></body></html>')
server.jsView
@@ -12,8 +12,9 @@
1212 .loadOrCreateSync(require('path').join(config.path, 'secret'))
1313
1414 var opts = config
1515 opts.listenAddr = opts._[1]
16+opts.appname = appName
1617
1718 require('.')(opts, function (err, server) {
1819 require('ssb-reconnect')(function (cb) {
1920 ssbClient(keys, config, cb)
static/styles.cssView
@@ -20,8 +20,14 @@
2020 header h1 a {
2121 color: #666;
2222 }
2323
24+header h1 sub {
25+ color: #444;
26+ font-style: oblique;
27+ font-size: small;
28+}
29+
2430 /* content */
2531
2632 article {
2733 max-width: 45em;

Built with git-ssb-web