diff options
author | Ctibor Brančík <ctibor@brancik.cz> | 2017-04-25 19:36:57 +0200 |
---|---|---|
committer | Ctibor Brančík <ctibor@brancik.cz> | 2017-04-25 19:36:57 +0200 |
commit | 11340cccc2743c519f8625843e9cf631e83e5ada (patch) | |
tree | bdfa61e4aaf5157094645cb062c425bba1128384 /cgi-bin | |
parent | b4382e7d04836cfcf2f1ff402829890a044f09cb (diff) | |
download | hnizdo-11340cccc2743c519f8625843e9cf631e83e5ada.tar.gz hnizdo-11340cccc2743c519f8625843e9cf631e83e5ada.tar.bz2 |
Add link to full size image.
Diffstat (limited to 'cgi-bin')
-rwxr-xr-x[-rw-r--r--] | cgi-bin/config.py | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | cgi-bin/display.py | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | cgi-bin/link.py | 6 |
3 files changed, 7 insertions, 0 deletions
diff --git a/cgi-bin/config.py b/cgi-bin/config.py index fafb2a5..fafb2a5 100644..100755 --- a/cgi-bin/config.py +++ b/cgi-bin/config.py diff --git a/cgi-bin/display.py b/cgi-bin/display.py index 72d2589..e20f9d9 100644..100755 --- a/cgi-bin/display.py +++ b/cgi-bin/display.py @@ -35,6 +35,7 @@ class Body: print ("<article id=\"now\">") print (self.a.imglink(self.a.img, '440', 'now')) print ("<p>"+self.a.timestamp(self.a.img)+"</p>") + print ("<p>"+self.a.full(self.a.img, 'plná velikost')+"</p>") print ("</article>") print ("<article id=\"next\">") print (self.a.imglink(self.a.delta('-m'), '180', 'next')) diff --git a/cgi-bin/link.py b/cgi-bin/link.py index 2b870bb..334184a 100644..100755 --- a/cgi-bin/link.py +++ b/cgi-bin/link.py @@ -73,6 +73,12 @@ class Link: return "<a href=\""+self.href(target)+"\">"+link+"</a>" else: return "<span>"+link+"</span>" + + def full(self, target, link): + if self.detect(target): + return "<a href=\"/img/"+target+"-full.jpeg\">"+link+"</a>" + else: + return "<span>"+link+"</span>" def delta(self, delta): date=os.path.split(self.img) |