[LNT] r253463 - [html] Center content using style attribute. NFC.

Arnaud A. de Grandmaison via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 07:12:12 PST 2015


Author: aadg
Date: Wed Nov 18 09:12:10 2015
New Revision: 253463

URL: http://llvm.org/viewvc/llvm-project?rev=253463&view=rev
Log:
[html] Center content using style attribute. NFC.

The <center> tag is deprecated, see
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center.
Instead, CSS text-align property should be used. In our case, we can
not use the CSS directly, because the page may be in an email, and some
mail clients like Gmail ignore the CSS. So pass the text-align property
in the style attribute of all child nodes of <center>.

Modified:
    lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html

Modified: lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html?rev=253463&r1=253462&r2=253463&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html (original)
+++ lnt/trunk/lnt/server/ui/templates/reporting/daily_report.html Wed Nov 18 09:12:10 2015
@@ -8,7 +8,7 @@
 <body style="{{ styles['body'] }}">
 {% endif %}
 
-<center><h2>{#
+<h2 style="text-align:center">{#
   #}(<a href="{{ts_url}}/daily_report/{{
                  report.prior_days[1].year}}/{{
                  report.prior_days[1].month}}/{{
@@ -31,10 +31,11 @@
 		 report.get_query_parameters_string()
 		 }}">next</a>){#
 #}</h2>
+<p style="text-align:center">
 (day start is considered to be at UTC+{{ "%02d:%02d" % (
     report.day_start_offset.seconds // 3600,
     (report.day_start_offset.seconds // 60) % 60,)}})
-</center>
+</p>
 
 {% if report.error is not none %}
 




More information about the llvm-commits mailing list