From 270dca58af07aaa7548f341e166b56493d9eae30 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 1 Jul 2011 15:41:44 +0200 Subject: [PATCH 01/11] Style comments (first draft only) --- mediagoblin/static/css/base.css | 14 +++++++++++++ .../mediagoblin/user_pages/media.html | 20 +++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/mediagoblin/static/css/base.css b/mediagoblin/static/css/base.css index 31573820..537cc35c 100644 --- a/mediagoblin/static/css/base.css +++ b/mediagoblin/static/css/base.css @@ -223,6 +223,20 @@ a.mediagoblin_logo:hover { width:280px; } +/* comments */ + +.comment_author { + margin-bottom:40px; + font-size:14px; + text-align:right; + border-top:1px solid #393939; + padding-top:4px; +} + +.comment_content p { + margin-bottom:4px; +} + /* media galleries */ ul.media_thumbnail { diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 3cebe2f9..0a88921a 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -68,13 +68,18 @@

Comments

{% for comment in comments %}
-
By: + +
+ {% autoescape False %} + {{ comment.content_html }} + {% endautoescape %} +
+ - -
- {% autoescape False %} - {{ comment.content_html }} - {% endautoescape %} -
{% endfor %} {% include "mediagoblin/utils/pagination.html" %} From 68c6521e0441775c116f4240631103425367aa06 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 1 Jul 2011 15:43:05 +0200 Subject: [PATCH 02/11] Add feed icon --- mediagoblin/static/images/iconFeed.png | Bin 0 -> 522 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mediagoblin/static/images/iconFeed.png diff --git a/mediagoblin/static/images/iconFeed.png b/mediagoblin/static/images/iconFeed.png new file mode 100644 index 0000000000000000000000000000000000000000..11e5b1e76b8e0e6c357a58e8ff018b170b5cec68 GIT binary patch literal 522 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6T^Q6s zP-xZKRG%tiFY)wsWxvhN$g9A2BsBdz(3CDu7sn8b(@Q6B z>^kHi(6*mN#3iSOwOg@CK$}%tdv!@xdUE1KyFau3|Ic!E!N7UXS88Ld5PH=cdg zV39`9w%o_N^je)9)msufUhm>zYmWCkQ}KDLgu?8zm)@31^0n{Ry2zEaRqAJr-04jl zbh>@i7EjLGF1<8}^RPjHm#yXnmi4Re=3RbS;-MlWReknztvt|BrA2r5#^_~P&D9bN zR9ZCc^in(S!vT*Adw*7K&YTsZCHm~M<=3jYX`4L-SQwTBtuzldJy>C*#=#`l&(83& zWLDhz_Qw_`QoQfJTQeL@ni#hF>q&v_A56=3&z)9lHFrwKin{&lHy(btAo>E!_1B?m z!?b-j-G5(tFvSRH*}3PNkKMB|;AxK0JD#+W;Xt9x+D$Qf%o+OozABgrB$!As7TCx! zdZ Date: Fri, 1 Jul 2011 15:47:37 +0200 Subject: [PATCH 03/11] Fix first part of issue 402 - small images are no longer enlarged to 640px --- mediagoblin/templates/mediagoblin/user_pages/media.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 0a88921a..fd079378 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -26,7 +26,7 @@

{{media.title}}

-

Uploaded on From 6ef36a15f2e0dcab276f8ac0a97d2890d0d1c050 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 1 Jul 2011 17:20:22 +0200 Subject: [PATCH 04/11] Add delete and edit icons --- mediagoblin/static/css/base.css | 26 +++++++++++++++++++++++ mediagoblin/static/images/iconDelete.png | Bin 0 -> 472 bytes mediagoblin/static/images/iconEdit.png | Bin 0 -> 297 bytes 3 files changed, 26 insertions(+) create mode 100644 mediagoblin/static/images/iconDelete.png create mode 100644 mediagoblin/static/images/iconEdit.png diff --git a/mediagoblin/static/css/base.css b/mediagoblin/static/css/base.css index 537cc35c..0d594169 100644 --- a/mediagoblin/static/css/base.css +++ b/mediagoblin/static/css/base.css @@ -254,3 +254,29 @@ li.media_thumbnail { zoom:1; . *display:inline; } + +/* icons */ + +.iconFeed{ + width:16px; + height:16px; + background-image:url('../images/iconFeed.png'); + float:left; + margin-right:5px; +} + +.iconEdit{ + width:16px; + height:16px; + background-image:url('../images/iconEdit.png'); + float:left; + margin-right:5px; +} + +.iconDelete{ + width:16px; + height:16px; + background-image:url('../images/iconDelete.png'); + float:left; + margin-right:5px; +} diff --git a/mediagoblin/static/images/iconDelete.png b/mediagoblin/static/images/iconDelete.png new file mode 100644 index 0000000000000000000000000000000000000000..9d76a5db0080cadb4f8bdf11da279efe1de5b604 GIT binary patch literal 472 zcmV;}0Vn>6P)Px#24YJ`L;xoMCjciBs;y-J000SaNLh0L01ejw01ejxLMWSf00007bV*G`2ipe$ z4-p<5JEV6200CG@L_t(I%dL|?s=`1J#((CS8(2=iENqe9E2Py57}S?n`34q-`SZ=pH#;MxROC&pwHRYC#sJ{G$9vCiw|fs| z^Z-bbgvDY(S(c<}N(h0bX#mh#BO+X{SE{OFzu$Aa-R=lVsi?J%&bioiU3AVxrPSbi zj?r32rBwWyOeWvU<&yb)&UU+Hy2$hx(6((~x$C;vb=|M( z&vxfrY}+;}rD9^OB~4SxvV5sl*Y%(d^gLN>85?5=A@t5H%ld@F;qa1}Wm&I>5HQA& z7-M?2p94b(hzKG=2;n6eplO;r03XWOdym$7aQ??=B0^o)FI{M@@!peo?-7wf!ty*P z&+|c_h~T~de2rs(s;XG6Ruo0?i>&tz6h*;wI%Tuj{LfeZ_?SkYp7RfY@htYek(Q7E O0000%tiFY)wsWxvhN$S14(QsrzcP-vy6i(`nz>8X=9 z^0q37F!&$l>-i8><(?qowxNv0eN#G1wE6(()78&qol`;+0Jqp}XaE2J literal 0 HcmV?d00001 From 13b4cbf01436ba2b734358743ad82c466a9110b8 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 1 Jul 2011 17:25:15 +0200 Subject: [PATCH 05/11] Put comment author/date on the left --- mediagoblin/static/css/base.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/mediagoblin/static/css/base.css b/mediagoblin/static/css/base.css index 0d594169..924d68b2 100644 --- a/mediagoblin/static/css/base.css +++ b/mediagoblin/static/css/base.css @@ -227,9 +227,6 @@ a.mediagoblin_logo:hover { .comment_author { margin-bottom:40px; - font-size:14px; - text-align:right; - border-top:1px solid #393939; padding-top:4px; } From c13ce79abbff3a93f1d940d2578f1e80adeb70f3 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 1 Jul 2011 17:28:55 +0200 Subject: [PATCH 06/11] Reorganize media.html, comment part --- .../mediagoblin/user_pages/media.html | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index fd079378..175e5c60 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -58,42 +58,38 @@

{% endif %} - {# {{ wtforms_util.render_textarea_div(submit_form.description) }} {{ wtforms_util.render_field_div(submit_form.file) }} #} - {% if comments %}

Comments

{% for comment in comments %}
-
{% autoescape False %} {{ comment.content_html }} {% endautoescape %} -
- -
+ +
— + + {{ comment['author']['username'] }} at + + + {{ "%4d-%02d-%02d %02d:%02d"|format(comment.created.year, + comment.created.month, + comment.created.day, + comment.created.hour, + comment.created.minute) }} + +
+ {% endfor %} {% include "mediagoblin/utils/pagination.html" %} {% endif %} -

This is a sidebar! Yay!

From b611476c94c8a44d93a4488152fe729793e6b594 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 1 Jul 2011 18:59:07 +0200 Subject: [PATCH 07/11] Reorder media.html (comments, icons, links, layout) --- mediagoblin/static/css/base.css | 25 ++---------- .../mediagoblin/user_pages/media.html | 39 ++++++++++--------- 2 files changed, 23 insertions(+), 41 deletions(-) diff --git a/mediagoblin/static/css/base.css b/mediagoblin/static/css/base.css index 924d68b2..2dd276b0 100644 --- a/mediagoblin/static/css/base.css +++ b/mediagoblin/static/css/base.css @@ -254,26 +254,7 @@ li.media_thumbnail { /* icons */ -.iconFeed{ - width:16px; - height:16px; - background-image:url('../images/iconFeed.png'); - float:left; - margin-right:5px; -} - -.iconEdit{ - width:16px; - height:16px; - background-image:url('../images/iconEdit.png'); - float:left; - margin-right:5px; -} - -.iconDelete{ - width:16px; - height:16px; - background-image:url('../images/iconDelete.png'); - float:left; - margin-right:5px; +img.media_icon{ + margin:0 4px; + vertical-align:sub; } diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 175e5c60..8ed25f9d 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -23,38 +23,32 @@ {# temporarily, an "image gallery" that isn't one really ;) #} {% if media %}
-

- {{media.title}} -

+

+ {{media.title}} +

+ {% autoescape False %} +

{{ media.description_html }}

+ {% endautoescape %}

- Uploaded on + — uploaded on {{ "%4d-%02d-%02d"|format(media.created.year, media.created.month, media.created.day) }} by {{- media.uploader().username }} -

- - {% autoescape False %} -

{{ media.description_html }}

- {% endautoescape %} - - {% if media['uploader'] == request.user['_id'] %} -

Edit

- {% endif %} +

+

+

Comments

{% if request.user %}
-

Post a comment!

{{ wtforms_util.render_field_div(comment_form.comment) }}
- +
{% endif %} @@ -63,7 +57,6 @@ {{ wtforms_util.render_field_div(submit_form.file) }} #} {% if comments %} -

Comments

{% for comment in comments %}
@@ -91,7 +84,15 @@
{% endif %}
-

This is a sidebar! Yay!

+

Sidebar content here!

+

+ {% if media['uploader'] == request.user['_id'] %} +

edit

+

delete

+ {% endif %} +

{% else %}

Sorry, no such media found.

From eed7e0587cc84a3e0261e77f34abac49aa0e9245 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 1 Jul 2011 19:57:23 +0200 Subject: [PATCH 08/11] Remove strong style from pagination --- mediagoblin/templates/mediagoblin/utils/pagination.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mediagoblin/templates/mediagoblin/utils/pagination.html b/mediagoblin/templates/mediagoblin/utils/pagination.html index 2be0b92e..bdf40496 100644 --- a/mediagoblin/templates/mediagoblin/utils/pagination.html +++ b/mediagoblin/templates/mediagoblin/utils/pagination.html @@ -29,7 +29,7 @@ {% if page != pagination.page %} {{ page }} {% else %} - {{ page }} + {{ page }} {% endif %} {% else %} From f188463b4684c6f9cccb07364a5f3e098c832b4f Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Fri, 1 Jul 2011 20:08:12 +0200 Subject: [PATCH 09/11] Fix tiny pagination error: missing end tag --- mediagoblin/templates/mediagoblin/utils/pagination.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/utils/pagination.html b/mediagoblin/templates/mediagoblin/utils/pagination.html index bdf40496..016ae986 100644 --- a/mediagoblin/templates/mediagoblin/utils/pagination.html +++ b/mediagoblin/templates/mediagoblin/utils/pagination.html @@ -21,13 +21,13 @@