[DOC-WEB] [web-doc] master: make all pages similar

1 view
Skip to first unread message

Nilgün Belma Bugüner

unread,
Jan 14, 2022, 1:17:55 AM1/14/22
to doc...@lists.php.net
Author: Nilgün Belma Bugüner (nilgun)
Date: 2022-01-14T09:17:43+03:00

Commit: https://github.com/php/web-doc/commit/3aab49146fb665c308b5678705ecbc7fafd231d4
Raw diff: https://github.com/php/web-doc/commit/3aab49146fb665c308b5678705ecbc7fafd231d4.diff

make all pages similar

Changed paths:
M include/lib_general.inc.php
M www/revcheck.php


Diff:

diff --git a/include/lib_general.inc.php b/include/lib_general.inc.php
index 36af693..69033de 100644
--- a/include/lib_general.inc.php
+++ b/include/lib_general.inc.php
@@ -42,15 +42,16 @@ function site_header()
require __DIR__ . '/../shared/templates/header.inc';
echo <<<END_OF_MULTILINE
<style type="text/css">
-table { margin-left: auto; margin-right: auto; text-align: left; border-spacing: 2px; font-size:14px;}
+table { margin-left: auto; margin-right: auto; text-align: left; border-spacing: 2px; font-size: 14px;}
th { color: white; background-color: #666699; padding: 0.2em; text-align: center; vertical-align: middle; }
-td { padding: 0.2em 0.3em; }
-.oc { white-space: nowrap; overflow: hidden; max-width: 6em; }
+td { background-color: #dcdcdc; padding: 0.2em 0.3em; }
+.c { text-align: center; }
+.n { white-space: nowrap; }
+.o3 { overflow: hidden; max-width: 3em; }
+.o6 { overflow: hidden; max-width: 6em; }
.copy { margin:0; padding: 0; font-size:small; }
.copy:hover { text-transform: uppercase; }
.copy:active { background: aqua; font-weight: bold; }
-.o { white-space: nowrap; overflow: hidden; max-width: 3em; }
-.c { text-align: center; }
</style>
END_OF_MULTILINE;
echo '<section class="mainscreen">';
diff --git a/www/revcheck.php b/www/revcheck.php
index a43ddd9..17f6e9d 100644
--- a/www/revcheck.php
+++ b/www/revcheck.php
@@ -65,7 +65,7 @@
}

echo <<<TRANSLATORS_HEAD
-<table border="0" cellpadding="4" cellspacing="1">
+<table class="c">
<tr>
<th rowspan="2">Name</th>
<th rowspan="2">Nick</th>
@@ -102,7 +102,7 @@
echo '<p>All files translated? Would be nice... but it\'s probably an error :(</p>';
} else {
$num = count($missfiles);
- echo '<table border="0" cellpadding="3" cellspacing="1" style="text-align:center">';
+ echo '<table class="c">';
echo '<tr><th rowspan="1">Available for translation ('.$num.' files):</th><th>Commit Hash</th><th colspan="1">kB</th></tr>';

$last_dir = false;
@@ -131,7 +131,7 @@
echo '<p>Good, it seems that this translation doesn\'t contain any file which is not present in English tree.</p>';
} else {
$num = count($oldfiles);
- echo '<table width="400" border="0" cellpadding="3" cellspacing="1" style="text-align:center">';
+ echo '<table class="c">';
echo '<tr><th rowspan="1">Not in EN tree ('.$num.' files):</th><th colspan="1">kB</th></tr>';

$last_dir = false;
@@ -141,7 +141,7 @@
echo '<tr><th colspan="2">'.$old['dir'].'</th></tr>';
$last_dir = $old['dir'];
}
- echo '<tr><td>', $old['file'], '</td><td class="r">'.$old['size'].'</td></tr>';
+ echo '<tr><td>', $old['file'], '</td><td>'.$old['size'].'</td></tr>';
$total_size += $old['size'];
// flush every 200 kbytes
if (($total_size % 200) == 0)
@@ -160,7 +160,7 @@
echo '<p>Good, all files contain revision numbers.</p>';
} else {
$num = count($misstags);
- echo '<table border="0" cellpadding="3" cellspacing="1" style="text-align:center">';
+ echo '<table class="c">';
echo '<tr><th rowspan="2">Files without EN-Revision number ('.$num.' files):</th><th colspan="3">Sizes in kB</th></tr>';
echo '<tr><th>en</th><th>'.$lang.'</th><th>diff</th></tr>';

@@ -191,7 +191,7 @@
$files_wip[1] = $files_wip[1] > 0 ? $files_wip[1] : 0;
$files_notinen[1] = $files_notinen[1] > 0 ? $files_notinen[1] : 0;

- echo '<table border="0" cellpadding="4" cellspacing="1" style="text-align:center;">';
+ echo '<table class="c">';
echo '<tr><th>File status type</th><th>Number of files</th><th>Percent of files</th><th>Size of files (kB)</th><th>Percent of size</th></tr>';

$percent[0] = 0;
@@ -372,14 +372,15 @@
$ch = "<span style='color: darkgreen;'>+{$r['additions']}</span> <span style='color: firebrick;'>-{$r['deletions']}</span>";

// Write out the line for the current file (get file name shorter)
+
echo <<<END_OF_MULTILINE
-<tr style='background-color: #dcdcdc;'>
- <td style='white-space:nowrap'>{$nm}</td>
- <td class='c'>{$ch}</td>
- <td class="oc">{$h1}</td>
- <td class='o'>{$h2}</td>
- <td class='c'>{$r['maintainer']}</td>
- <td class='c'>{$r['status']}</td>
+<tr>
+<td class='n'>{$nm}</td>
+<td class='c'>{$ch}</td>
+<td class='n o6'>{$h1}</td>
+<td class='n o3'>{$h2}</td>
+<td class='c'>{$r['maintainer']}</td>
+<td class='c'>{$r['status']}</td>
</tr>
END_OF_MULTILINE;
}

--
Documentation Website Mailing List (http://doc.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply all
Reply to author
Forward
0 new messages