Добавлена минификация для старого формата html и поправлены стили
This commit is contained in:
@@ -62,7 +62,7 @@ namespace SQLLinter.CLI
|
|||||||
|
|
||||||
//linter.Run(@"C:\Users\frost\Desktop\DISTR-2599\test.sql");
|
//linter.Run(@"C:\Users\frost\Desktop\DISTR-2599\test.sql");
|
||||||
|
|
||||||
var formatter = new HtmlReportFormatter_v2();
|
var formatter = new HtmlReportFormatter_v1();
|
||||||
var content = formatter.Format(rep.Violations, bpmn);
|
var content = formatter.Format(rep.Violations, bpmn);
|
||||||
|
|
||||||
File.WriteAllText(@"C:\Users\frost\Downloads\Telegram Desktop\test.html", content);
|
File.WriteAllText(@"C:\Users\frost\Downloads\Telegram Desktop\test.html", content);
|
||||||
|
|||||||
@@ -37,14 +37,14 @@ public class HtmlReportFormatter_v1 : IReportFormatter
|
|||||||
sb.AppendLine("td.line, td.column { width: 60px; text-align: center; }");
|
sb.AppendLine("td.line, td.column { width: 60px; text-align: center; }");
|
||||||
sb.AppendLine("td.rule { width: 300px; text-align: left; }");
|
sb.AppendLine("td.rule { width: 300px; text-align: left; }");
|
||||||
sb.AppendLine("td.index { width: 40px; text-align: center; }");
|
sb.AppendLine("td.index { width: 40px; text-align: center; }");
|
||||||
sb.AppendLine(".critical { border-left: 4px solid #d13438; padding: 10px; margin-bottom: 20px; background-color: #fde7e9; }");
|
sb.AppendLine(".critical { border-left: 4px solid #d13438; padding: 10px; margin-bottom: 20px; margin-top: 20px; background-color: #fde7e9; }");
|
||||||
sb.AppendLine(".warning { border-left: 4px solid #ffaa44; padding: 10px; margin-bottom: 20px; background-color: #fff4ce; }");
|
sb.AppendLine(".warning { border-left: 4px solid #ffaa44; padding: 10px; margin-bottom: 20px; background-color: #fff4ce; }");
|
||||||
sb.AppendLine(".info { border-left: 4px solid #0078d4; padding: 10px; margin-bottom: 20px; background-color: #deecf9; }");
|
sb.AppendLine(".info { border-left: 4px solid #0078d4; padding: 10px; margin-bottom: 20px; background-color: #deecf9; }");
|
||||||
sb.AppendLine(".tabs { position: fixed; bottom: 0; left: 0; right: 0; background-color: #ffffff; border-top: 1px solid #ccc; padding: 10px; display: flex; overflow-x: auto; scrollbar-width: thin; justify-content: flex-start; box-shadow: 0 -2px 6px rgba(0,0,0,0.1); }");
|
sb.AppendLine(".tabs { position: fixed; bottom: 0; left: 0; right: 0; background-color: #ffffff; border-top: 1px solid #ccc; padding: 10px; display: flex; overflow-x: auto; scrollbar-width: thin; justify-content: flex-start; box-shadow: 0 -2px 6px rgba(0,0,0,0.1); }");
|
||||||
sb.AppendLine(".tab { margin-right: 10px; padding: 8px 16px; border-radius: 4px; background-color: #f3f2f1; cursor: pointer; transition: background-color 0.2s; }");
|
sb.AppendLine(".tab { margin-right: 10px; padding: 8px 16px; border-radius: 4px; background-color: #f3f2f1; cursor: pointer; transition: background-color 0.2s; }");
|
||||||
sb.AppendLine(".tab:hover { background-color: #e1dfdd; }");
|
sb.AppendLine(".tab:hover { background-color: #e1dfdd; }");
|
||||||
sb.AppendLine(".tab.active { background-color: #0078d4; color: white; }");
|
sb.AppendLine(".tab.active { background-color: #0078d4; color: white; }");
|
||||||
sb.AppendLine(".file-report { display: none; padding: 20px 0; }");
|
sb.AppendLine(".file-report { display: none; padding: 0 0; }");
|
||||||
sb.AppendLine(".file-report.active { display: block; }");
|
sb.AppendLine(".file-report.active { display: block; }");
|
||||||
|
|
||||||
// Тёмная тема
|
// Тёмная тема
|
||||||
@@ -143,6 +143,6 @@ public class HtmlReportFormatter_v1 : IReportFormatter
|
|||||||
sb.AppendLine("</body>");
|
sb.AppendLine("</body>");
|
||||||
sb.AppendLine("</html>");
|
sb.AppendLine("</html>");
|
||||||
|
|
||||||
return sb.ToString();
|
return HtmlMinifier.MinifyHtml(sb.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user