[education/rkward] rkward: Allow for speczialing layout of some pages
Thomas Friedrichsmeier
null at kde.org
Wed Apr 20 14:02:40 BST 2022
Git commit e0f8d8e39156668fd1735fa36aff805977ad454b by Thomas Friedrichsmeier.
Committed on 19/04/2022 at 10:29.
Pushed by tfry into branch 'master'.
Allow for speczialing layout of some pages
M +15 -0 rkward/pages/rkward_help.css
M +1 -1 rkward/pages/rkward_welcome.rkh
M +3 -2 rkward/windows/rkhtmlwindow.cpp
https://invent.kde.org/education/rkward/commit/e0f8d8e39156668fd1735fa36aff805977ad454b
diff --git a/rkward/pages/rkward_help.css b/rkward/pages/rkward_help.css
index f7a21ed5..4a2527a0 100644
--- a/rkward/pages/rkward_help.css
+++ b/rkward/pages/rkward_help.css
@@ -23,6 +23,21 @@ a:link {
color: var(--anchor-color);
}
+#rkward_welcome #main {
+ width: 95%;
+}
+
+#rkward_welcome #navigation {
+ display: none;
+}
+
+#rkward_welcome div {
+ display: inline-block;
+ width: 40%;
+ padding: 2.5%;
+ float: left;
+}
+
#main {
margin-right: 11em;
}
diff --git a/rkward/pages/rkward_welcome.rkh b/rkward/pages/rkward_welcome.rkh
index 59d190c5..5b929ceb 100644
--- a/rkward/pages/rkward_welcome.rkh
+++ b/rkward/pages/rkward_welcome.rkh
@@ -1,5 +1,5 @@
<!DOCTYPE rkhelp>
-<document>
+<document pageid="rkward_welcome">
<title>Welcome to RKWard</title>
<summary>
diff --git a/rkward/windows/rkhtmlwindow.cpp b/rkward/windows/rkhtmlwindow.cpp
index b859a214..2e84adb4 100644
--- a/rkward/windows/rkhtmlwindow.cpp
+++ b/rkward/windows/rkhtmlwindow.cpp
@@ -1061,8 +1061,9 @@ bool RKHelpRenderer::renderRKHelp (const QUrl &url, RKHTMLWindow* container) {
element = help_xml_helper.getChildElement (help_doc_element, "title", DL_WARNING);
page_title = help_xml_helper.i18nElementText (element, false, DL_WARNING);
}
- writeHTML ("<html><head><title>" + page_title + "</title><link rel=\"stylesheet\" type=\"text/css\" href=\"" + css_filename + "\">"
- "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head>\n<body><div id=\"main\">\n<h1>" + page_title + "</h1>\n");
+ writeHTML("<html><head><title>" + page_title + "</title><link rel=\"stylesheet\" type=\"text/css\" href=\"" + css_filename + "\">"
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head>\n"
+ "<body id=\"" + help_xml_helper.getStringAttribute(help_doc_element, "pageid", "standard", DL_INFO) + "\"><div id=\"main\">\n<h1>" + page_title + "</h1>\n");
if (help_doc_element.isNull ()) {
RK_ASSERT (for_component);
More information about the rkward-tracker
mailing list