diff options
| author | Al <gabriel.cortesi@outlook.com> | 2019-07-14 01:55:08 +0200 |
|---|---|---|
| committer | Al <gabriel.cortesi@outlook.com> | 2019-07-14 01:55:08 +0200 |
| commit | a2aa4270e9d8516ece2a6e013ff6a13918dd1efc (patch) | |
| tree | a5cdf6a2dda202f577abfcc2ebec4407376a920e | |
| parent | 23b71ca21f15288f9d2e7e04a37de95b8ae8ca18 (diff) | |
Added full Spoiler support to the nexus Description viewer.
| -rw-r--r-- | src/bbcode.cpp | 2 | ||||
| -rw-r--r-- | src/modinfodialognexus.cpp | 26 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/bbcode.cpp b/src/bbcode.cpp index 3d7b2ba2..51c461e6 100644 --- a/src/bbcode.cpp +++ b/src/bbcode.cpp @@ -140,6 +140,8 @@ private: "<figure class=\"quote\"><blockquote>\\1</blockquote></figure>");
m_TagMap["quote="] = std::make_pair(QRegExp("\\[quote=([^\\]]*)\\](.*)\\[/quote\\]"),
"<figure class=\"quote\"><blockquote>\\2</blockquote></figure>");
+ m_TagMap["spoiler"] = std::make_pair(QRegExp("\\[spoiler\\](.*)\\[/spoiler\\]"),
+ "<details><summary>Spoiler: <div class=\"bbc_spoiler_show\">Show</div></summary><div class=\"spoiler_content\">\\1</div></details>");
m_TagMap["code"] = std::make_pair(QRegExp("\\[code\\](.*)\\[/code\\]"),
"<code>\\1</code>");
m_TagMap["heading"]= std::make_pair(QRegExp("\\[heading\\](.*)\\[/heading\\]"),
diff --git a/src/modinfodialognexus.cpp b/src/modinfodialognexus.cpp index 180c72f0..e606525c 100644 --- a/src/modinfodialognexus.cpp +++ b/src/modinfodialognexus.cpp @@ -238,6 +238,32 @@ void NexusTab::onModChanged() padding: 0; } + div.spoiler_content { + background: #262626; + border: 1px dashed #3b3b3b; + padding: 5px; + margin: 5px; + } + + div.bbc_spoiler_show{ + border: 1px solid black; + background-color: #454545; + font-size: 11px; + padding: 3px; + color: #E6E6E6; + border-radius: 3px; + display: inline-block; + cursor: pointer; + } + + details summary::-webkit-details-marker { + display:none; + } + + summary:focus { + outline: 0; + } + a { /*should avoid overflow with long links forcing wordwrap regardless of spaces*/ |
