Skip to content

Commit 6b1aa3e

Browse files
committed
Improve visual aspect of quality reports
1 parent a164f22 commit 6b1aa3e

File tree

4 files changed

+96
-29
lines changed

4 files changed

+96
-29
lines changed

deployment/deploy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ copy_files() {
2828
mkdir -p $2/quality/img
2929
cd $1/tm-git/src/quality/img
3030
cp squ* $2/quality/img
31+
mkdir -p $2/quality/css
32+
cd $1/tm-git/src/quality/css
33+
cp *.css $2/quality/css
3134
}
3235

3336

src/quality/css/report.css

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
.twocolumns {
2+
-webkit-column-count: 2; /* Chrome, Safari, Opera */
3+
-moz-column-count: 2; /* Firefox */
4+
column-count: 2;
5+
}
6+
7+
.hiddenSpellError {
8+
padding-bottom: 2px;
9+
background-image: url("../img/squiggle_red.png");
10+
background-repeat: repeat-x;
11+
background-position: left bottom;
12+
cursor: default;
13+
}
14+
15+
.hiddenGrammarError {
16+
padding-bottom: 2px;
17+
background-image: url("../img/squiggle_blue.png");
18+
background-repeat: repeat-x;
19+
background-position: left bottom;
20+
cursor: default;
21+
}
22+
23+
.hiddenGreenError {
24+
padding-bottom: 2px;
25+
background-image: url("../img/squiggle_green.png");
26+
background-repeat: repeat-x;
27+
background-position: left bottom;
28+
cursor: default;
29+
}
30+
31+
body {
32+
font-family: Arial, sans-serif;
33+
line-height: 1.6;
34+
background-color: #f8f9fa;
35+
color: #333;
36+
padding: 20px;
37+
}
38+
39+
h1, h2 {
40+
color: #0056b3;
41+
border-bottom: 2px solid #ddd;
42+
padding-bottom: 5px;
43+
margin-bottom: 15px;
44+
}
45+
46+
hr {
47+
border: 0;
48+
height: 1px;
49+
background: #ccc;
50+
margin: 20px 0;
51+
}
52+
53+
a {
54+
color: #007bff;
55+
text-decoration: none;
56+
font-weight: bold;
57+
}
58+
59+
a:hover {
60+
text-decoration: underline;
61+
}
62+
63+
.table {
64+
width: 100%;
65+
border-collapse: collapse;
66+
margin-top: 15px;
67+
background: white;
68+
}
69+
70+
.table tr:nth-child(even) {
71+
background: #f2f2f2;
72+
}
73+
74+
.table th, .table td {
75+
padding: 10px;
76+
text-align: left;
77+
border: 1px solid #ddd;
78+
}
79+
80+
.twocolumns {
81+
display: flex;
82+
gap: 20px;
83+
}
84+
85+
.error-highlight {
86+
background-color: #ffdddd;
87+
padding: 3px 6px;
88+
border-radius: 4px;
89+
font-weight: bold;
90+
}
91+

src/quality/lt/header.mustache

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,7 @@
44
<title>Anàlisi LanguageTool i Pology</title>
55
<meta charset="UTF-8"/>
66
<meta name="robots" content="noindex">
7-
<style type="text/css">
8-
.twocolumns {
9-
-webkit-column-count: 2; /* Chrome, Safari, Opera */
10-
-moz-column-count: 2; /* Firefox */
11-
column-count: 2;
12-
}
13-
.hiddenSpellError {
14-
padding-bottom: 2px;
15-
background-image: url("img/squiggle_red.png");
16-
background-repeat: repeat-x;
17-
background-position: left bottom;
18-
cursor: default;
19-
}
20-
.hiddenGrammarError {
21-
padding-bottom: 2px;
22-
background-image: url("img/squiggle_blue.png");
23-
background-repeat: repeat-x;
24-
background-position: left bottom;
25-
cursor: default;
26-
}
27-
.hiddenGreenError {
28-
padding-bottom: 2px;
29-
background-image: url("img/squiggle_green.png");
30-
background-repeat: repeat-x;
31-
background-position: left bottom;
32-
cursor: default;
33-
}
34-
</style>
7+
<link rel="stylesheet" type="text/css" href="css/report.css">
358
</head>
369
<body>
3710
<p>Aquest informe és generat el {{date}} amb les eines {{languagetool}} i Pology (amb aquestes <a href='https://github.com/Softcatala/translation-memory-tools/blob/main/cfg/quality/parameters.yaml'>regles</a>). El seu contingut és orientatiu i cal que useu el vostre propi criteri a l'hora d'aplicar les esmenes que considereu adients. Tingueu en compte que les eines poden donar falsos positius i pot haver-hi qüestions estilístiques o terminològiques en les quals vulgueu aplicar altres criteris. Aquest informe es generà setmanalment.

src/quality/lt/lt-results.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<a id="inici{{uuid}}"></a>
22
<h1>Fitxer analitzat: {{filename}}</h1>
33
{{#hasunknownwords}}
4-
<hr/>Ves a: [<a href="#inici{{uuid}}">Inici</a>] [<a href="#indexregles{{uuid}}">Índex de regles</a>]<hr/>
4+
Ves a: [<a href="#inici{{uuid}}">Inici</a>] [<a href="#indexregles{{uuid}}">Índex de regles</a>]<hr/>
55
<h2>Paraules desconegudes ({{.}})</h2>
66
<!--<p>{{#unknownwords}}{{.}}, {{/unknownwords}}</p>-->
77
{{/hasunknownwords}}

0 commit comments

Comments
 (0)