1
0

refactor: use html resource to replace manual html in code

This commit is contained in:
2026-07-06 20:34:41 +08:00
parent cdd0b764a7
commit 319fd64fc6
8 changed files with 190 additions and 115 deletions

29
assets/plain/about.html Normal file
View File

@@ -0,0 +1,29 @@
<center>
<p>
<img width='128' height='128' src=':/icons/app-icon.svg'/>
<br/>
<!-- Application name -->
<span>%1</span>
<br/>
<!-- Version info -->
<span>%2</span>
</p>
<hr/>
<p>
<!-- Upstream author and fork author -->
<span>%3</span><span>:&nbsp;</span><a href='https://github.com/BLumia'>@BLumia</a>
<br/>
<span>%4</span><span>:&nbsp;</span><a href='https://github.com/yyc12345'>@yyc12345</a>
<br/>
<!-- Icon author -->
<span>%5</span><span>:&nbsp;</span><a href='https://github.com/Lovelyblack'>@Lovelyblack</a>
</p>
<hr/>
<p>
<!-- Built Qt version info -->
<span>%6</span>
<br/>
<!-- Source code -->
<span>%7</span><span>:&nbsp;</span><a href='https://github.com/BLumia/pineapple-pictures'>GitHub</a>
</p>
</center>

24
assets/plain/help.html Normal file
View File

@@ -0,0 +1,24 @@
<!-- General help -->
<h1 align='center'>%1</h1>
<ul>
<li>
<span>%2</span>
<ul>
<li>%3</li>
<li>%4</li>
</ul>
</li>
<li>%5</li>
<li>%6</li>
</ul>
<hr/>
<!-- Context menu option help -->
<h1 align='center'>%7</h1>
<!-- Context menu option list -->
<ul>
<li>
<b>%8</b><span>:</span>
<br/>
<span>%9</span>
</li>
</ul>

29
assets/plain/license.html Normal file
View File

@@ -0,0 +1,29 @@
<!-- License -->
<h1 align='center'><b>%1</b></h1>
<p>%2</p>
<hr/>
<!-- VErbatime license -->
<h1 align='center'><b>%3</b></h1>
<pre>
Expat/MIT License
Copyright &copy; 2026 BLumia
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
</pre>

View File

@@ -0,0 +1,32 @@
<!-- Contributor title -->
<h1 align='center'>%1</h1>
<!-- Contributor list -->
<a href='https://github.com/BLumia/pineapple-pictures/graphs/contributors'>%2</a>
<!-- The message to thank these contributors -->
<p>%3</p>
<!-- Translator title -->
<h1 align='center'>%4</h1>
<!-- The message to thank these translators -->
<p>%5</p>
<ul>
<li><u>Catalan</u>: Toni Estévez</li>
<li><u>Chinese (Simplified)</u>: Percy Hong</li>
<li><u>Dutch</u>: Heimen Stoffels</li>
<li><u>French</u>: J. Lavoie, K. Herbert, Maxime Leroy</li>
<li><u>German</u>: K. Herbert, J. Lavoie, sal0max</li>
<li><u>Indonesian</u>: liimee, Reza Almanda</li>
<li><u>Italian</u>: albanobattistella</li>
<li><u>Japanese</u>: Black Cat, mmahhi, Percy Hong</li>
<li><u>Korean</u>: VenusGirl</li>
<li><u>Norwegian Bokmål</u>: Allan Nordhøy, ovl-1</li>
<li><u>Punjabi (Pakistan)</u>: bgo-eiu</li>
<li><u>Russian</u>: Sergey Shornikov, Artem, Andrey</li>
<li><u>Sinhala</u>: HelaBasa</li>
<li><u>Slovenian</u>: Andrej Poženel - SDT</li>
<li><u>Spanish</u>: Toni Estévez, Génesis Toxical, William(ѕ)ⁿ, gallegonovato</li>
<li><u>Tamil</u>: தமிழ்நேரம் (TamilNeram)</li>
<li><u>Turkish</u>: E-Akcaer, Oğuz Ersen, Sabri Ünal</li>
<li><u>Ukrainian</u>: Dan, volkov, Сергій</li>
<li><u>Vietnamese</u>: Loc Huynh</li>
</ul>

View File

@@ -0,0 +1,15 @@
<!-- Title -->
<h1 align='center'><b>%1</b></h1>
<!-- List intro message -->
<p>%2</p>
<p>%3</p>
<ul>
<li>
<a href='https://www.qt.io/'>Qt</a><span>: </span>
<span>GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3</span>
</li>
<li style="display: none;">
<a href='https://www.exiv2.org/'>Exiv2</a><span>: </span>
<span>GPLv2</span>
</li>
</ul>

View File

@@ -10,6 +10,10 @@
<file>icons/window-close.svg</file>
<file>icons/go-next.svg</file>
<file>icons/go-previous.svg</file>
<file>plain/translators.html</file>
<file>plain/help.html</file>
<file>plain/about.html</file>
<file>plain/special-thanks.html</file>
<file>plain/license.html</file>
<file>plain/third-party-libs.html</file>
</qresource>
</RCC>