Skip to content

Commit 90856ad

Browse files
author
Luca Bruno
committed
Add favicon and reduce top space
1 parent a624aed commit 90856ad

File tree

5 files changed

+8
-17
lines changed

5 files changed

+8
-17
lines changed

config.json

-11
This file was deleted.

default.nix

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ in
3131
propagatedBuildInputs = [ python gevent ];
3232

3333
inherit (python) sitePackages;
34+
NIXPASTE_CONFIG = configjson;
35+
GUNICORN_ARGS = gunicornArgs;
3436

3537
buildCommand = ''
3638
mkdir -p $out/bin
@@ -44,7 +46,7 @@ in
4446
--prefix PYTHONPATH : "$out/$sitePackages:$PYTHONPATH" \
4547
--set NIXPASTE_CONFIG ${configjson} \
4648
--set GUNICORN_ARGS '"''${GUNICORN_ARGS:-${gunicornArgs}}"' \
47-
--prefix PATH : $PATH
49+
--prefix PATH : ${python}/bin:${gunicorn}/bin
4850
patchShebangs $out
4951
'';
5052
}

nixpaste

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env bash
2-
exec gunicorn ${GUNICORN_ARGS:--b 0.0.0.0:8080 -t 10} nixpaste:app
2+
exec gunicorn $GUNICORN_ARGS nixpaste:app

nixpaste.py

+4
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ def get (self, hashname):
122122
def index():
123123
return template ("index.tpl", **app.config)
124124

125+
@app.get("/favicon.ico")
126+
def favicon():
127+
return static_file ("favicon.ico", os.path.join (app.config["STATIC"], "img"))
128+
125129
@app.get("/about")
126130
def index():
127131
return template ("about.tpl", **app.config)

static/css/nixpaste-site.css

-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ textarea {
1111
widht: 100%;
1212
}
1313

14-
.jumbotron {
15-
margin-bottom: 25px;
16-
}
17-
1814
.about {
1915
margin-top: 25px;
2016
}

0 commit comments

Comments
 (0)