scaffold: Epic 1 — project scaffold
Add the full Rust + GTK4 + libadwaita project skeleton: - Cargo.toml with all dependencies (gtk4 0.11, libadwaita 0.9, webkit6 0.6, reqwest, serde, tokio, libsecret) - build.rs that compiles Blueprint .blp files and bundles a GResource - data/ui/window.blp — AdwApplicationWindow with AdwNavigationSplitView, sidebar with refresh button/spinner and primary menu, content page with article menu - data/resources.gresource.xml bundling UI, HTML, and CSS - data/net.jeena.FeedTheMonkey.gschema.xml with all GSettings keys - html/content.html and html/content.css (minimal placeholders) - src/main.rs, src/app.rs — AdwApplication with APP_ID net.jeena.FeedTheMonkey - src/window.rs — AdwApplicationWindow GObject subclass loading the Blueprint template and persisting window size in GSettings - COPYING (GPL-3.0) restored from master The app compiles and the binary is ready to open a blank window.
This commit is contained in:
parent
3196988c98
commit
3339bb5ec8
15 changed files with 3761 additions and 2 deletions
18
html/content.css
Normal file
18
html/content.css
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
body {
|
||||
font-family: sans-serif;
|
||||
margin: 1em 2em;
|
||||
line-height: 1.6;
|
||||
color: #222;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
color: #ddd;
|
||||
background: #1e1e1e;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
19
html/content.html
Normal file
19
html/content.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>FeedTheMonkey</title>
|
||||
<link rel="stylesheet" href="content.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="content"></div>
|
||||
<script>
|
||||
function setArticle(article) {
|
||||
document.title = article.title || '';
|
||||
document.getElementById('content').innerHTML =
|
||||
'<h1>' + (article.title || '') + '</h1>' +
|
||||
(article.content || '');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue