Unique documentation is collapsable

This commit is contained in:
Yair Morgenstern
2022-02-24 10:22:47 +02:00
parent a3fd04bb59
commit 40918db1b0
5 changed files with 983 additions and 963 deletions

View File

@ -70,12 +70,12 @@ class UniqueDocsWriter {
continue
}
val uniqueText = if (targetType.key == UniqueTarget.Conditional) "<${uniqueType.text}>"
val uniqueText = if (targetType.key == UniqueTarget.Conditional) "&lt;${uniqueType.text}&gt;"
else uniqueType.text
lines += "### &#x1F537; $uniqueText"
lines += "??? example \"$uniqueText\"" // collapsable material mkdocs block, see https://squidfunk.github.io/mkdocs-material/reference/admonitions/?h=%3F%3F%3F#collapsible-blocks
if (uniqueType.text.contains('['))
lines += "Example: \"${replaceExamples(uniqueText)}\"\n"
lines += "Applicable to: " + uniqueType.targetTypes.sorted().joinToString()
lines += "\tExample: \"${replaceExamples(uniqueText)}\"\n"
lines += "\tApplicable to: " + uniqueType.targetTypes.sorted().joinToString()
lines += ""
}
}
@ -90,6 +90,6 @@ class UniqueDocsWriter {
lines += " - \"${deprecatedUnique.text}\" - $deprecationText"
}
File("../../docs/uniques.md").writeText(lines.joinToString("\n"))
File("../../docs/Modders/uniques.md").writeText(lines.joinToString("\n"))
}
}

View File

@ -5,7 +5,6 @@ These are split into two categories:
- `Text that looks like this`. This last one must be used exactly the same
Note that all of these are case-sensitive!
## action
An action that a unit can preform. Currently, there are only two actions part of this:
- `Spread Religion`

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
# Translating
## Starting out
The translation files are at [/android/assets/jsons/translations](/jsons/translations)

View File

@ -1,4 +1,4 @@
site_name: Unciv documentation
site_name: Unciv
theme:
name: material
@ -14,4 +14,23 @@ theme:
accent: amber
toggle:
icon: material/lightbulb-outline
name: Switch to dark mode
name: Switch to dark mode
icon:
repo: fontawesome/brands/github
repo_name: yairm210/unciv
repo_url: https://github.com/yairm210/unciv
#markdown_extensions:
# - abbr
# - pymdownx.snippets
# - attr_list
# - md_in_html
# - pymdownx.superfences
markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.details # For collapsable admonitions - see https://squidfunk.github.io/mkdocs-material/reference/admonitions/?h=%3F%3F%3F#collapsible-blocks