Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

Commit 49edb7c

Browse files
committed
Clean up styles in markdown pages
1 parent 334cb57 commit 49edb7c

3 files changed

Lines changed: 39 additions & 5 deletions

File tree

OpenTabletDriver.Web/Models/MarkdownViewModel.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ private IHtmlContent GetHtmlContent(StringWriter sw)
5353
var html = sw.ToString()!;
5454

5555
var formattedHtml = HeaderRegex.Replace(html, "<hr><h3")
56-
.Replace("<h3", "<h3 class=\"wiki-nav-item pb-2\"")
57-
.Replace("<table>", "<table class=\"table table-hover ms-3\">")
58-
.Replace("<p>", "<p class=\"ms-3\">");
56+
.Replace("<h3", "<h3 class=\"wiki-nav-item\"")
57+
.Replace("<table>", "<table class=\"table table-hover\">");
5958

6059
return new HtmlString(formattedHtml);
6160
}

OpenTabletDriver.Web/Views/Wiki/Development/Configurations.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ pinpoint devices.
7676
| Feature Initialization Report | `List<byte[]>` | A list of feature reports to be sent to the device to perform the device's initialization sequence. |
7777
| Output Initialization Report | `List<byte[]>` | A list of output reports to be sent to the device to perform the device's initialization sequence. |
7878
| Device Strings | `Dictionary<byte, string>` | A list of regular expressions to be matched against specific indexes of strings contained within the device's firmware. They can be retrieved via the device string reader. This is optional, however it is commonly used to improve detection precision. |
79-
| Initialization String Indexes | `byte[]` | A list of indexes to be retrieved from the device as part of the device's initialization sequence. This is optional, and very infrequently used. Note: Byte arrays (`byte[]`) are serialized as Base64 in JSON.NET, the library that serializes and deserializes configurations. |
79+
| Initialization String Indexes | `byte[]` | A list of indexes to be retrieved from the device as part of the device's initialization sequence. This is optional, and very infrequently used. |
80+
81+
> Note: Byte arrays (`byte[]`) are serialized as Base64 in JSON.NET, the library that serializes and deserializes configurations.
8082
8183
### Attributes
8284

OpenTabletDriver.Web/Views/Wiki/WikiMarkdownPage.cshtml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,37 @@
44
ViewBag.Title = Model!.Metadata["title"];
55
}
66

7-
@Model.Content
7+
<div class="markdown-content">
8+
@Model.Content
9+
</div>
10+
11+
@section Styles
12+
{
13+
<style>
14+
.markdown-content > table > thead > tr > th:last-child,
15+
.markdown-content > table > tbody > tr > td:last-child {
16+
width: 65%;
17+
}
18+
19+
.markdown-content > table {
20+
margin-left: 1rem;
21+
width: calc(100% - 1rem)
22+
}
23+
24+
.markdown-content > h3 {
25+
margin-bottom: .5rem
26+
}
27+
.markdown-content > h4 {
28+
margin-left: 1rem
29+
}
30+
.markdown-content > p {
31+
margin-left: 1rem
32+
}
33+
34+
.markdown-content > blockquote > p {
35+
color: #888;
36+
font-size: small;
37+
margin-left: 2rem
38+
}
39+
</style>
40+
}

0 commit comments

Comments
 (0)