1 /** 2 Copyright: Copyright (c) 2018, Joakim Brännström. All rights reserved. 3 License: MPL-2 4 Author: Joakim Brännström (joakim.brannstrom@gmx.com) 5 6 This Source Code Form is subject to the terms of the Mozilla Public License, 7 v.2.0. If a copy of the MPL was not distributed with this file, You can obtain 8 one at http://mozilla.org/MPL/2.0/. 9 */ 10 module dextool.plugin.mutate.backend.report.html.constants; 11 12 import arsd.dom : Element; 13 import std.format : format; 14 15 struct Html { 16 static immutable ext = ".html"; 17 static immutable dir = "html"; 18 static immutable fileDir = "files"; 19 static immutable testCaseDir = "test_cases"; 20 } 21 22 // CSS style 23 24 struct TableStat { 25 static immutable style = "stat_tbl"; 26 } 27 28 struct Table { 29 static immutable hdrStyle = "tg-g59y"; 30 static immutable rowStyle = "tg-0lax"; 31 static immutable rowDarkStyle = "tg-0lax_dark"; 32 } 33 34 struct MatrixTable { 35 static immutable style = "vertical_tbl"; 36 static immutable hdrStyle = "tg"; 37 } 38 39 struct DashboardCss { 40 static Element h2(Element root, string txt) @trusted { 41 return root.addChild("h2", txt).addClass("sub-header"); 42 } 43 44 static Element h3(Element root, string txt) @trusted { 45 return root.addChild("h3", txt).addClass("sub-header"); 46 } 47 48 static Element defaultTable(Element root) @trusted { 49 return root.addClass("table table-striped"); 50 } 51 52 static Element sortableTableDiv(Element root) @trusted { 53 return root.addClass("table-sortable-div"); 54 } 55 56 static Element sortableTable(Element root) @trusted { 57 return root.addClass("table-sortable"); 58 } 59 60 static Element sortableTableCol(Element root) @trusted { 61 return root.addClass("table-col-sortable"); 62 } 63 }