Skip to content

Commit 5530cbe

Browse files
committed
EN : partial translation : customUI, heading, indexing, integration
1 parent 2c802f0 commit 5530cbe

File tree

4 files changed

+102
-0
lines changed

4 files changed

+102
-0
lines changed

en/customUI.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# 🛠️ Viewer Custom UI
2+
3+
## Full override
4+
5+
1. In **HelpViewer** dir inside file **hvdata/data.zip** you will find these files:
6+
| File | Meaning |
7+
|---|---|
8+
| layout.htm | UI HTML code |
9+
| appmainNext.js | Business logic |
10+
| main.css | CSS style |
11+
12+
1. Extract them
13+
2. Create directory **_base** in root directory of help file repository (as same level as directories with language versions)
14+
3. Copy these files to **_base**
15+
4. Do your desired changes here in these files
16+
17+
## Pure extension
18+
19+
If you only want to add some new functionality, then you can add these files to **_base**:
20+
21+
| File | Meaning |
22+
|---|---|
23+
| plus.css | CSS style which extends or overrides current ones |
24+
| plus.js | Extension of business logic of HelpViewer |
25+
26+
## Result
27+
28+
1. During help publishing there will emerge another archive file **Help-.zip**
29+
2. You need to add this file to your help file distribution. Otherwise changes will not have any impact
30+
3. Your changes will not interfere HelpViewer installation on user computers. It will change only user work mode exactly with help file to whom you will attach these changes
31+
32+
## Work with help file
33+
34+
- When viewing a help file, users need to access the help file in the format: **Help-__.zip**, for HelpViewer to try to search for this new file with changes
35+
- If there is used exact language directly, then HelpViewer will search for these changes inside this help file (and according to distribution process it will not find them here)
36+
- If users will be somewhat limited by your changes, then it will be enough to them to remove file **Help-__.zip** and they will be able to regain back usual functionality of HelpViewer
37+
38+
## 💡 Recommendations
39+
- Source code of interface (unzipped files) can be your inspiration for your own customization
40+
- Ensure if you are implementing usual features which are behaving standard way
41+
- It is desirable that id names of html elements are stable (and also not missing) because of further business logic (you are not changing here) relies on them. You are using all of this logic but in other scenarios you are defining them here
42+
- Further business logic of HelpViewer outside these named files cannot be changed straightly by help file. There is needed to perform HelpViewer source code change if another changes are required.

en/heading.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# 📑 Heading detection
2+
3+
💡 Recommendations:
4+
- Each chapter should start with h1 (1x #) heading which will be the 1st one heading and text on the start of the document.
5+
6+
**HelpViewer** resolves document heading in this order of priority (from most significant):
7+
- **h1** heading text form chapter text if it is on the start of the document text (skips next points lower here)
8+
- TOC item text (📖) when clicked
9+
- Dictionaries item text (📇, 🔎) when clicked.
10+
This serves as a backup heading text. It is also preferred when the user reloads the page.
11+
- Relative path and file name inside help file

en/indexing.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# 🔎 Chapter indexation
2+
3+
Just after the chapter creation there can be suitable to introduce new chapter to some of these lists:
4+
5+
- 📖 TOC tree (tree.lst)
6+
- 📑 File list (files.lst)
7+
- 📇 Keywords dictionary (keywords.lst)
8+
- 📇 Keyword - file relation (keywords-files.lst)
9+
10+
In tree subchapter there are described internal data structures of these files.

en/integration.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# 🤝 Integration with application
2+
3+
## Windows and Microsoft .NET
4+
5+
- Windows Forms - [WebBrowser][WebBrowser].Navigate(URI)
6+
- WPF - [WebView2][WebView2].Source
7+
- Run web browser with URI path
8+
- Run URI with ShellAPI.[ShellExecuteW][ShellExecuteW]:
9+
```
10+
ShellExecuteW(NULL, "open",
11+
"https://helpviewer.github.io/?d=hlp%2FHelp-__.zip&p=ideas.md",
12+
NULL, NULL, SW_SHOWNORMAL);
13+
```
14+
- Run URI with System.Diagnostics.[Process.Start][Process-Start]:
15+
```
16+
Process.Start(new ProcessStartInfo(
17+
"https://helpviewer.github.io/?d=hlp%2FHelp-__.zip&p=ideas.md"
18+
) { UseShellExecute = true });
19+
```
20+
21+
## Web solutions
22+
23+
- Direct a href links to HelpViewer across your web
24+
- HelpViewer as main UI of your web application
25+
- Use iframe with showing of HelpViewer content
26+
27+
## Linux
28+
29+
- xdg-open
30+
```
31+
xdg-open "https://helpviewer.github.io/?d=hlp%2FHelp-__.zip&p=ideas.md"
32+
```
33+
- .desktop link
34+
35+
[WebBrowser]: https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.webbrowser?view=netframework-4.8.1 "WebBrowser"
36+
[WebView2]: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.wpf.webview2?view=webview2-dotnet-1.0.3124.44 "WebView2"
37+
[ShellExecuteW]: https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutew "shellapi.h > ShellExecuteW"
38+
[Process-Start]: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.process.start?view=net-8.0 "System.Diagnostics.Process.Start"
39+

0 commit comments

Comments
 (0)