Merge lp:~franku/widelands-website/css_changes into lp:widelands-website

Proposed by kaputtnik
Status: Merged
Merged at revision: 398
Proposed branch: lp:~franku/widelands-website/css_changes
Merge into: lp:widelands-website
Diff against target: 350 lines (+46/-93)
9 files modified
README.txt (+12/-0)
media/css/base.css (+17/-10)
media/css/forum.css (+6/-6)
media/css/help.css (+1/-1)
media/css/navigation.css (+5/-6)
media/css/poll.css (+0/-58)
media/css/wiki.css (+5/-9)
templates/wiki/view.html (+0/-2)
templates/wlpoll/base.html (+0/-1)
To merge this branch: bzr merge lp:~franku/widelands-website/css_changes
Reviewer Review Type Date Requested Status
SirVer Approve
Review via email: mp+271388@code.launchpad.net

Description of the change

This branch contains changes to font-size and line height and changes them from fixed to relative. This will pay attention to font related settings of a browser. See https://wl.widelands.org/forum/topic/1797/ for the main reason. Some other css changes are also included. In detail:

* changed fixed font-size to relative font sizes.
* changed fixed line-height to relative line-height
* add more space between two paragraphs
* Border of tables in forum gets better visibility (dark gray instead of black)
* top and bottom margins of headers are now the same in forum and wiki
* removed small code in template "/wiki/view.html" because a link to "Create this article?" is already shown
* removed poll.css because it's unused (the css-styles for displaying polls are all done in the javascript code)
* removed general shadowing of fonts, instead adding a new class "shaded" which could be used where it is needed
* small corrections of colors, where i feel it would look better (f.e.text shadow)

I tried to get as close to the current state while changing the values.

The stylesheets for the developers documentation is untouched, because i couldn't verify the results yet.

Some disadvantages of the font-size changes:

1.Text in codeblocks are mostly displayed smaller than with fixed font-size, depending on the browser a user uses. Thats because each browser has his own font-settings for codeblocks. In firefox they are much smaller than in chrome. If needed we could set a fixed font-size for codeblocks.

2.Bold formatted texts looks a little bit blurry. I noticed it f.e. on the "Latest Post" block on the right. That's because the translation of relative values into pixels results mostly in something like "14.234 pixel" which most displays couldn't display. See http://www.w3.org/Style/Examples/007/units.de.html#font-size for an explanation.

Please ask for screenshots if you are unsure about some things.

To post a comment you must log in.
Revision history for this message
GunChleoc (gunchleoc) wrote :

I haven't found the time to try to resolve my local website deployment problems. Code LGTM though.

Maybe you could create a screenshot to post on the forums for people to give feedback?

Revision history for this message
kaputtnik (franku) wrote :

Please wait with merging, there are some changes and i will update the branch soon.

399. By kaputtnik

shodow_reverted

Revision history for this message
kaputtnik (franku) wrote :

Uodated... damn, there is unused code. I have to update again :-S

400. By kaputtnik

removed unused code

Revision history for this message
kaputtnik (franku) wrote :

Updated.

Changes to text-shadow are reverted, so text-shadow is like the current state.

Additional changes: The menu entries are font-size dependent in width. So if someone changes the font size in his browser, the width of the entries gets adjusted too.

I provide screenshots in the forum topic https://wl.widelands.org/forum/topic/1797/

401. By kaputtnik

adjusted font-size for codeblocks

Revision history for this message
SirVer (sirver) wrote :

Merged and deployed! Thanks.

review: Approve
Revision history for this message
kaputtnik (franku) wrote :

Thanks, all works as suspected :-)

I think no one would notice the changes... but if there are any unwanted changes, please report in the forum topic: https://wl.widelands.org/forum/topic/1797/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README.txt'
--- README.txt 2012-12-19 20:31:27 +0000
+++ README.txt 2015-09-20 16:32:14 +0000
@@ -62,6 +62,18 @@
6262
63 $ ln -s local_urls.py.sample local_urls.py63 $ ln -s local_urls.py.sample local_urls.py
64 $ ln -s local_settings.py.sample local_settings.py64 $ ln -s local_settings.py.sample local_settings.py
65
66There has to be some corrections to get into the admin pages:
67
68Either copy the folders "media" and "templates"
69
70 from: ~/wlwebsite/django/contrib/admin
71 to: ~/wlwebsite/lib/python2.7/site-packages/django/contrib/admin/
72
73or create symlinks:
74
75 $ ln -s ~/wlwebsite/django/contrib/admin/templates/ ~/wlwebsite/lib/python2.7/site-packages/django/contrib/admin/templates
76 $ ln -s ~/wlwebsite/django/contrib/admin/media/ ~/wlwebsite/lib/python2.7/site-packages/django/contrib/admin/media
6577
66Setting up the database78Setting up the database
67^^^^^^^^^^^^^^^^^^^^^^^79^^^^^^^^^^^^^^^^^^^^^^^
6880
=== modified file 'media/css/base.css'
--- media/css/base.css 2015-01-08 21:40:25 +0000
+++ media/css/base.css 2015-09-20 16:32:14 +0000
@@ -9,10 +9,10 @@
9 background-color: #e9c78a;9 background-color: #e9c78a;
10 background-image: url("../img/parchment.png");10 background-image: url("../img/parchment.png");
11 font-family: sans-serif;11 font-family: sans-serif;
12 font-size: 14px;12 font-size: 0.88em;
13 line-height: 20px;13 line-height: 1.4em;
14 color: #ffffee;14 color: #ffffee;
15 text-shadow: #000000 1px 1px 0px;15 text-shadow: 1px 1px 0px #000000;
16}16}
1717
18/*+++++++++++++++++++++++++*/18/*+++++++++++++++++++++++++*/
@@ -84,6 +84,7 @@
8484
85code {85code {
86 background-image: url("../img/black50.png");86 background-image: url("../img/black50.png");
87 font-size: 14px;
87}88}
88/*No double background*/89/*No double background*/
89pre > code {90pre > code {
@@ -100,17 +101,16 @@
100 background-image: url("../img/black50.png");101 background-image: url("../img/black50.png");
101 outline: none;102 outline: none;
102 color: #ffffff;103 color: #ffffff;
103 text-shadow: #000000 1px 1px 0px;
104 vertical-align: middle;104 vertical-align: middle;
105 cursor: pointer;105 cursor: pointer;
106 font-family: inherit;106 font-family: inherit;
107 font-size: 12px;107 font-size: 0.85em;
108 font-weight: bold;108 font-weight: bold;
109}109}
110110
111textarea {111textarea {
112 font-weight: normal;112 font-weight: normal;
113 font-size: 14px;113 font-size: 0.9em;
114}114}
115115
116input:hover, button:hover, textarea:hover {116input:hover, button:hover, textarea:hover {
@@ -129,13 +129,18 @@
129 font-weight: normal;129 font-weight: normal;
130}130}
131131
132/* different margin for headers where text could be written */
133div.blogEntry h1, h2, h3, h4, h5, h6 {
134 margin: 0.8em 0em 0.5em 0em;
135}
136
132svg {137svg {
133 text-shadow: none;138 text-shadow: none;
134}139}
135140
136td {141td {
137 vertical-align: top;142 vertical-align: top;
138 line-height: 20px;143 line-height: 1.4em;
139}144}
140145
141.posLeft {146.posLeft {
@@ -174,7 +179,7 @@
174 color: #ffffee;179 color: #ffffee;
175}180}
176.small {181.small {
177 font-size: 12px;182 font-size: 0.83em;
178}183}
179184
180a.small {185a.small {
@@ -271,11 +276,12 @@
271 margin: 0px;276 margin: 0px;
272 padding: 0px;277 padding: 0px;
273 list-style-type: none;278 list-style-type: none;
274 line-height: 18px;279 line-height: 1.5em;
275}280}
276281
277div.loginBox h4 {282div.loginBox h4 {
278 margin-bottom: 5px;283 margin-bottom: 5px;
284 margin-top: 0px;
279}285}
280286
281div.loginBox input {287div.loginBox input {
@@ -325,6 +331,7 @@
325 border-radius: 4px;331 border-radius: 4px;
326}332}
327333
334
328div.columnModuleBox h4 {335div.columnModuleBox h4 {
329 color: #ffffee;336 color: #ffffee;
330 padding: 8px;337 padding: 8px;
@@ -370,7 +377,7 @@
370 display: block;377 display: block;
371 padding: 8px;378 padding: 8px;
372 border-top: 1px solid black;379 border-top: 1px solid black;
373 font-size: 12px;380 font-size: 0.8em;
374}381}
375382
376div.columnModuleBox ul li:first-child {383div.columnModuleBox ul li:first-child {
377384
=== modified file 'media/css/forum.css'
--- media/css/forum.css 2015-04-01 20:01:41 +0000
+++ media/css/forum.css 2015-09-20 16:32:14 +0000
@@ -54,7 +54,7 @@
54/******************/54/******************/
5555
56tr.spacer {56tr.spacer {
57 height: 10px;57 height: 1em;
58 border: none;58 border: none;
59}59}
6060
@@ -71,8 +71,8 @@
7171
72.authorStats {72.authorStats {
73 text-align: left;73 text-align: left;
74 font-size: 10px;74 font-size: 0.7em;
75 line-height: 12px;75 line-height: 1.1em;
76}76}
7777
78/*****************/78/*****************/
@@ -94,7 +94,7 @@
94}94}
9595
96div.blogEntry .post p {96div.blogEntry .post p {
97 margin-bottom: 4px;97 margin-bottom: 0.5em;
98}98}
9999
100.post blockquote {100.post blockquote {
@@ -114,12 +114,12 @@
114114
115.post th {115.post th {
116 padding: 0 1em 0 1em;116 padding: 0 1em 0 1em;
117 border: 1px solid black;117 border: 1px solid #474444;
118}118}
119119
120.post td {120.post td {
121 padding: 0 1em 0 1em;121 padding: 0 1em 0 1em;
122 border: 1px solid black;122 border: 1px solid #474444;
123}123}
124124
125/*****************/125/*****************/
126126
=== modified file 'media/css/help.css'
--- media/css/help.css 2012-05-19 19:55:15 +0000
+++ media/css/help.css 2015-09-20 16:32:14 +0000
@@ -11,7 +11,7 @@
11table.help th {11table.help th {
12 padding: 4px;12 padding: 4px;
13 font-weight: normal;13 font-weight: normal;
14 font-size: 12px;14 font-size: 0.8em;
15 text-align: left;15 text-align: left;
16}16}
1717
1818
=== modified file 'media/css/navigation.css'
--- media/css/navigation.css 2013-10-27 11:49:24 +0000
+++ media/css/navigation.css 2015-09-20 16:32:14 +0000
@@ -58,13 +58,12 @@
5858
59ul.menu li a {59ul.menu li a {
60 display: block;60 display: block;
61 width: 120px;61 width: 8.5em;
62 height: 50px;62 height: 50px;
63 line-height: 50px;63 line-height: 3.5em;
64 float: left;64 float: left;
65 border-right: 1px solid black;65 border-right: 1px solid black;
66 text-align: center;66 text-align: center;
67 vertical-align: middle;
68 color: #ffffff;67 color: #ffffff;
69 text-transform: uppercase;68 text-transform: uppercase;
70 font-weight: normal;69 font-weight: normal;
@@ -106,12 +105,12 @@
106105
107ul.menu li ul li a {106ul.menu li ul li a {
108 display: block;107 display: block;
109 width: 255px;108 width: 21.5em;
110 height: 20px;109 height: 20px;
111 line-height: 20px;110 line-height: 1.7em;
112 padding: 4px;111 padding: 4px;
113 text-align: left;112 text-align: left;
114 font-size: 12px;113 font-size: 0.8em;
115 border: none;114 border: none;
116}115}
117116
118117
=== removed file 'media/css/poll.css'
--- media/css/poll.css 2009-03-28 13:38:44 +0000
+++ media/css/poll.css 1970-01-01 00:00:00 +0000
@@ -1,58 +0,0 @@
1
2.poll_plot {
3 text-align: center;
4 width: 100%;
5}
6
7.post_date { font-size: 90%;}
8
9.poll {
10 border: 1px solid rgb(9, 9, 9);
11 width: 100%;
12}
13
14.poll h3.title {
15 font-weight: bold;
16 font-size: 12px;
17 padding-left: 12px;
18 background-image: url('../img/Navbar.png');
19 background-repeat: repeat-x;
20 border-left: 0px solid #999999;
21 border-right: 0px solid #999999;
22 border-bottom: 0px solid #999999;
23 padding-top: 2px;
24 padding-bottom: 0px;
25 margin: 0px;
26}
27.poll .content {
28 line-height: 120%;
29 border: 0px;
30 padding: 2px;
31 padding-top: 5px;
32 padding-left: 15px;
33 background-color: #3F3F3F;
34 background: url(../img/background-3F3F3F.png);
35}
36
37.poll .info_line {
38 text-align: right;
39 padding: 3px;
40 margin: 0px;
41 background-color: #222222;
42 background: url(../img/background-222.png);
43}
44
45.poll .bottom_line {
46 background-color: #222222;
47 background: url(../img/background-222.png);
48 table-layout: fixed;
49}
50.poll .comments {
51 text-align: left;
52}
53.poll .admin {
54 text-align: center;
55}
56
57
58
590
=== modified file 'media/css/wiki.css'
--- media/css/wiki.css 2015-04-01 20:01:41 +0000
+++ media/css/wiki.css 2015-09-20 16:32:14 +0000
@@ -3,15 +3,15 @@
3 display: inline-block;3 display: inline-block;
4 padding: 0px 8px;4 padding: 0px 8px;
5 background-image: url("../img/black20.png");5 background-image: url("../img/black20.png");
6 font-size: 12px;6 font-size: 0.8em;
7 margin: 0em 0em 1em 1em;7 margin: 0em 0em 1em 1em;
8 line-height: 18px;8 line-height: 1.5em;
9 float: right;9 float: right;
10 max-width: 20em;10 max-width: 20em;
11}11}
1212
13.toc ul {13.toc ul {
14 padding-left: 20px;14 padding-left: 1.8em;
15}15}
1616
17/***********/17/***********/
@@ -93,12 +93,8 @@
93 margin-top: 4px; /*Correction for donatebox*/93 margin-top: 4px; /*Correction for donatebox*/
94}94}
9595
96h1, h2, h3, h4, h5, h6 {
97 margin: 1em 0em 0.5em 0em;
98}
99
100h1:first-child, h2:first-child {96h1:first-child, h2:first-child {
101 margin-top: 0.5em;97 margin-top: 0.2em !important;
102}98}
10399
104100
105101
=== modified file 'templates/wiki/view.html'
--- templates/wiki/view.html 2012-09-10 10:13:04 +0000
+++ templates/wiki/view.html 2015-09-20 16:32:14 +0000
@@ -26,8 +26,6 @@
26 <a class="invertedColor" href="{% url wiki_observe article.title %}">{% trans "Observe" %}</a>26 <a class="invertedColor" href="{% url wiki_observe article.title %}">{% trans "Observe" %}</a>
27 {% endif %}27 {% endif %}
28 {% endif %}28 {% endif %}
29 {% else %}
30 <a class="invertedColor" href="{% url wiki_edit article.title %}">{% trans "Create this article" %}</a>
31 {% endif %}29 {% endif %}
32</div>30</div>
33<h1>{{ article.title }}</h1>31<h1>{{ article.title }}</h1>
3432
=== modified file 'templates/wlpoll/base.html'
--- templates/wlpoll/base.html 2015-02-18 22:30:08 +0000
+++ templates/wlpoll/base.html 2015-09-20 16:32:14 +0000
@@ -6,7 +6,6 @@
6{% block extra_head %}6{% block extra_head %}
7{{block.super}}7{{block.super}}
8<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/comments.css" />8<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/comments.css" />
9<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/poll.css" />
10<script src="{{ MEDIA_URL }}js/highcharts_219/highcharts.js" type="text/javascript"></script>9<script src="{{ MEDIA_URL }}js/highcharts_219/highcharts.js" type="text/javascript"></script>
11{% endblock %}10{% endblock %}
1211

Subscribers

People subscribed via source and target branches