Show More
@@ -24,7 +24,3 b' class Tripcode:' | |||
|
24 | 24 | def get_full_text(self): |
|
25 | 25 | return self.tripcode |
|
26 | 26 | |
|
27 | def get_view(self): | |
|
28 | return '<span class="tripcode" title="{title}" style="border: solid 2px #{color}; border-left: solid 1ex #{color};">{text}</span>'\ | |
|
29 | .format(title=self.get_full_text(), color=self.get_color(), | |
|
30 | text=self.get_short_text()) |
@@ -30,14 +30,14 b' class AbstractViewer:' | |||
|
30 | 30 | def get_view(self): |
|
31 | 31 | return '<div class="image">'\ |
|
32 | 32 | '{}'\ |
|
33 | '<div class="image-metadata">{}, {}</div>'\ | |
|
34 | '</div>'.format(self.get_format_view(), | |
|
33 | '<div class="image-metadata"><a href="{}" download >{}, {}</a></div>'\ | |
|
34 | '</div>'.format(self.get_format_view(), self.file.url, | |
|
35 | 35 | self.file_type, filesizeformat(self.file.size)) |
|
36 | 36 | |
|
37 | 37 | def get_format_view(self): |
|
38 | 38 | return '<a href="{}">'\ |
|
39 | 39 | '<img src="{}" width="200" height="150"/>'\ |
|
40 | '</a>'.format(self.file.url,static(FILE_STUB_IMAGE)) | |
|
40 | '</a>'.format(self.file.url, static(FILE_STUB_IMAGE)) | |
|
41 | 41 | |
|
42 | 42 | |
|
43 | 43 | class VideoViewer(AbstractViewer): |
@@ -99,7 +99,9 b' class PostImage(models.Model, Viewable):' | |||
|
99 | 99 | ' data-width="{}"' \ |
|
100 | 100 | ' data-height="{}" />' \ |
|
101 | 101 | '</a>' \ |
|
102 |
'<div class="image-metadata"> |
|
|
102 | '<div class="image-metadata">'\ | |
|
103 | '<a href="{full}" download>{image_meta}</a>'\ | |
|
104 | '</div>' \ | |
|
103 | 105 | '</div>'\ |
|
104 | 106 | .format(CSS_CLASS_IMAGE, CSS_CLASS_THUMB, |
|
105 | 107 | self.image.url_200x150, |
General Comments 0
You need to be logged in to leave comments.
Login now