From 413659303a7dd05e9f1a16ac5545a1a8ad1ab56b Mon Sep 17 00:00:00 2001 From: Kacper Date: Thu, 14 Nov 2024 14:31:47 +0100 Subject: [PATCH] up & fixes --- src/app/report/report.component.ts | 8 +- src/assets/html_report_v2_template.html | 106 +- .../res/highlight.js/11.10.0/highlight.min.js | 1232 +++++++++++++++++ .../marked-highlight/2.2.1/index.umd.min.js | 2 + src/assets/res/marked/15.0.0/marked.min.js | 6 + src/assets/res/marked/4.2.5/marked.min.js | 6 - src/styles.scss | 2 - 7 files changed, 1322 insertions(+), 40 deletions(-) create mode 100644 src/assets/res/highlight.js/11.10.0/highlight.min.js create mode 100644 src/assets/res/marked-highlight/2.2.1/index.umd.min.js create mode 100644 src/assets/res/marked/15.0.0/marked.min.js delete mode 100644 src/assets/res/marked/4.2.5/marked.min.js diff --git a/src/app/report/report.component.ts b/src/app/report/report.component.ts index 824fc656e..33081da3a 100644 --- a/src/app/report/report.component.ts +++ b/src/app/report/report.component.ts @@ -3019,9 +3019,11 @@ Date | Description { "filename": "jquery/3.6.3/jquery.min.js", "integrity": "sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ==" }, { "filename": "crypto-js/4.1.1/crypto-js.min.js", "integrity": "sha512-E8QSvWZ0eCLGk4km3hxSsNmGWbLtSCSUcewDQPQWZF6pEU8GlT8a5fF32wOl1i8ftdMhssTrF/OhyGWwonTcXA==" }, { "filename": "bootstrap/5.2.3/js/bootstrap.bundle.min.js", "integrity": "sha512-i9cEfJwUwViEPFKdC1enz4ZRGBj8YQo6QByFTF92YXHi7waCqyexvRD75S5NVTsSiTv7rKWqG9Y5eFxmRsOn0A==" }, - { "filename": "marked/4.2.5/marked.min.js", "integrity": "sha512-5JZDwulT+S/K8p/KO4tikNKA5t6Ebb+tqPwT7Ma+lVpJuS4G+Z0lSktWcl8hymXeFqCprGEuKGOCrKjyulql/A==" }, + { "filename": "marked/15.0.0/marked.min.js", "integrity": "sha512-/tpw1ej/DTEJDoX8qZM1YY8H9bz2+2T9nhojBmizu9JDVNvjXvgA3zfRjVF96V3bwK6Uf3eIqrYKIKRZx203iA==" }, { "filename": "dompurify/2.4.1/purify.min.js", "integrity": "sha512-uHOKtSfJWScGmyyFr2O2+efpDx2nhwHU2v7MVeptzZoiC7bdF6Ny/CmZhN2AwIK1oCFiVQQ5DA/L9FSzyPNu6Q==" }, - { "filename": "Chart.js/4.4.0/chart.umd.js", "integrity": "sha512-6HrPqAvK+lZElIZ4mZ64fyxIBTsaX5zAFZg2V/2WT+iKPrFzTzvx6QAsLW2OaLwobhMYBog/+bvmIEEGXi0p1w==" } + { "filename": "Chart.js/4.4.0/chart.umd.js", "integrity": "sha512-6HrPqAvK+lZElIZ4mZ64fyxIBTsaX5zAFZg2V/2WT+iKPrFzTzvx6QAsLW2OaLwobhMYBog/+bvmIEEGXi0p1w==" }, + { "filename": "highlight.js/11.10.0/highlight.min.js", "integrity": "sha512-6yoqbrcLAHDWAdQmiRlHG4+m0g/CT/V9AGyxabG8j7Jk8j3r3K6due7oqpiRMZqcYe9WM2gPcaNNxnl2ux+3tA==" }, + { "filename": "marked-highlight/2.2.1/index.umd.min.js", "integrity": "sha512-T5TNAGHd65imlc6xoRDq9hARHowETqOlOGMJ443E+PohphJHbzPpwQNBtcpmcjmHmQKLctZ/W3H2cY/T8EGDPA==" } ]; let ciphertext = ""; @@ -3091,7 +3093,7 @@ Date | Description res = res.replace("", css_String); css_String = ""; - of("jquery/3.6.3/jquery.min.js", "crypto-js/4.1.1/crypto-js.min.js", "bootstrap/5.2.3/js/bootstrap.bundle.min.js", "marked/4.2.5/marked.min.js", "dompurify/2.4.1/purify.min.js", "chart-js/4.4.0/chart.js") + of("jquery/3.6.3/jquery.min.js", "crypto-js/4.1.1/crypto-js.min.js", "bootstrap/5.2.3/js/bootstrap.bundle.min.js", "marked/15.0.0/marked.min.js", "dompurify/2.4.1/purify.min.js", "chart-js/4.4.0/chart.js", "highlight.js/11.10.0/highlight.min.js", "marked-highlight/2.2.1/index.umd.min.js") .pipe( concatMap(ind => { let obs1 = this.http.get('/assets/res/' + ind, { responseType: 'text' }) diff --git a/src/assets/html_report_v2_template.html b/src/assets/html_report_v2_template.html index 47b17c197..8c27bcc58 100644 --- a/src/assets/html_report_v2_template.html +++ b/src/assets/html_report_v2_template.html @@ -69,14 +69,16 @@ font-size: 15px; background-color: #f0f1f2; display: block; - white-space: pre; -webkit-overflow-scrolling: touch; - overflow-x: scroll; max-width: 100%; min-width: 100px; padding-left: 5px; - border-left: 12px solid #16bf6e; border-radius: 5px; + white-space: pre-wrap; /* Since CSS 2.1 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ } pre { @@ -100,6 +102,30 @@ border-left: 3px solid #ccc; } + /* highlight.js style*/ + pre code.hljs{display:block;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#fff;color:#000}.hljs-comment,.hljs-quote,.hljs-variable{color:green}.hljs-built_in,.hljs-keyword,.hljs-name,.hljs-selector-tag,.hljs-tag{color:#00f}.hljs-addition,.hljs-attribute,.hljs-literal,.hljs-section,.hljs-string,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type{color:#a31515}.hljs-deletion,.hljs-meta,.hljs-selector-attr,.hljs-selector-pseudo{color:#2b91af}.hljs-doctag{color:grey}.hljs-attr{color:red}.hljs-bullet,.hljs-link,.hljs-symbol{color:#00b0e8}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} + + .tablemd { + width: 100%; + border: 0px; + border-collapse: collapse; + border: 1px solid #f0f1f2; + } + + thead.tablemd { + border: 1px solid #f0f1f2; + background-color: #f0f1f2; + padding: 8px; + } + + .tableb { + border: 1px solid #f0f1f2; + padding: 8px; + } + + .titlepad { + padding-left: 10px; + }