mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-30 15:17:25 +00:00
parent
aca30901be
commit
ed878f01ac
3 changed files with 90 additions and 0 deletions
|
@ -300,3 +300,7 @@ data = slint.loader.app.MyData(name = "Simon")
|
|||
data.age = 10
|
||||
main_window.data = data
|
||||
```
|
||||
|
||||
## Third-Party Licenses
|
||||
|
||||
For a list of the third-party licenses of all dependencies, see the separate [Third-Party Licenses page](thirdparty.html).
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
import slint
|
||||
import pdoc
|
||||
import pathlib
|
||||
import subprocess
|
||||
|
||||
|
||||
doc = pdoc.doc.Module(slint)
|
||||
|
@ -29,3 +30,7 @@ index = pdoc.render.html_index(all_modules)
|
|||
|
||||
search = pdoc.render.search_index(all_modules)
|
||||
(output_directory / "search.js").write_bytes(search.encode())
|
||||
|
||||
subprocess.call(
|
||||
"cargo about generate thirdparty.hbs -o docs/thirdparty.html", shell=True
|
||||
)
|
||||
|
|
81
api/python/thirdparty.hbs
Normal file
81
api/python/thirdparty.hbs
Normal file
|
@ -0,0 +1,81 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- Copyright © SixtyFPS GmbH <info@slint.dev> ; SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 -->
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<style>
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background: #333;
|
||||
color: white;
|
||||
}
|
||||
|
||||
a {
|
||||
color: skyblue;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
font-family: sans-serif;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.intro {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.licenses-list {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.license-used-by {
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
.license-text {
|
||||
max-height: 200px;
|
||||
overflow-y: scroll;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main class="container">
|
||||
<div class="intro">
|
||||
<h1>Third Party Licenses</h1>
|
||||
<p>This page lists the licenses of the dependencies used by Slint.</p>
|
||||
</div>
|
||||
|
||||
<h2>Overview of licenses:</h2>
|
||||
<ul class="licenses-overview">
|
||||
{{#each overview}}
|
||||
<li><a href="#{{id}}">{{name}}</a> ({{count}})</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
<h2>All license text:</h2>
|
||||
<ul class="licenses-list">
|
||||
{{#each licenses}}
|
||||
<li class="license">
|
||||
<h3 id="{{id}}">{{name}}</h3>
|
||||
<h4>Used by:</h4>
|
||||
<ul class="license-used-by">
|
||||
{{#each used_by}}
|
||||
<li><a
|
||||
href="{{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}}">{{crate.name}}
|
||||
{{crate.version}}</a></li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
<pre class="license-text">{{text}}</pre>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
<main>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue