[libvirt PATCH v3 3/4] docs: Move all CSS files to a subdirectory

Andrea Bolognani abologna at redhat.com
Tue Jan 4 13:56:01 UTC 2022


This unclutters the top-level docs directory.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 docs/{ => css}/generic.css |  0
 docs/{ => css}/libvirt.css |  4 ++--
 docs/{ => css}/main.css    |  2 +-
 docs/css/meson.build       | 16 ++++++++++++++++
 docs/{ => css}/mobile.css  |  2 +-
 docs/meson.build           |  5 +----
 docs/page.xsl              |  2 +-
 7 files changed, 22 insertions(+), 9 deletions(-)
 rename docs/{ => css}/generic.css (100%)
 rename docs/{ => css}/libvirt.css (98%)
 rename docs/{ => css}/main.css (66%)
 create mode 100644 docs/css/meson.build
 rename docs/{ => css}/mobile.css (95%)

diff --git a/docs/generic.css b/docs/css/generic.css
similarity index 100%
rename from docs/generic.css
rename to docs/css/generic.css
diff --git a/docs/libvirt.css b/docs/css/libvirt.css
similarity index 98%
rename from docs/libvirt.css
rename to docs/css/libvirt.css
index 5195588a8f..b08271ea4d 100644
--- a/docs/libvirt.css
+++ b/docs/css/libvirt.css
@@ -10,7 +10,7 @@
 }
 
 #home {
-    background-image: url(logos/logo-banner-light-256.png);
+    background-image: url(../logos/logo-banner-light-256.png);
     background-repeat: no-repeat;
     background-position: left center;
     height: 100px;
@@ -419,7 +419,7 @@ div.panel h2,
 #index.document h1 {
     border: 0px;
     text-indent: 100%; white-space: nowrap; overflow: hidden;
-    background: url(logos/logo-banner-dark-800.png) no-repeat center center;
+    background: url(../logos/logo-banner-dark-800.png) no-repeat center center;
     height: 300px;
 }
 
diff --git a/docs/main.css b/docs/css/main.css
similarity index 66%
rename from docs/main.css
rename to docs/css/main.css
index 71f7b7a6a0..8961f1a4b4 100644
--- a/docs/main.css
+++ b/docs/css/main.css
@@ -1,4 +1,4 @@
- at import url(fonts/stylesheet.css);
+ at import url(../fonts/stylesheet.css);
 @import url(generic.css);
 @import url(libvirt.css);
 @import url(mobile.css);
diff --git a/docs/css/meson.build b/docs/css/meson.build
new file mode 100644
index 0000000000..35e56347a6
--- /dev/null
+++ b/docs/css/meson.build
@@ -0,0 +1,16 @@
+docs_css_files = [
+  'generic.css',
+  'libvirt.css',
+  'main.css',
+  'mobile.css',
+]
+
+install_data(docs_css_files, install_dir: docs_html_dir / 'css')
+
+foreach file : docs_css_files
+  # This hack enables us to view the web pages
+  # from within the uninstalled build tree
+  configure_file(input: file, output: file, copy: true)
+
+  install_web_files += '@0@:@1@'.format(meson.current_source_dir() / file, docs_html_dir / 'css')
+endforeach
diff --git a/docs/mobile.css b/docs/css/mobile.css
similarity index 95%
rename from docs/mobile.css
rename to docs/css/mobile.css
index 366d0f1a5d..ae833b6eea 100644
--- a/docs/mobile.css
+++ b/docs/css/mobile.css
@@ -3,7 +3,7 @@
 	width: 100%;
 	display: block;
 	margin: 0px;
-	background: white url(logos/logo-banner-dark-256.png) no-repeat center center;
+	background: white url(../logos/logo-banner-dark-256.png) no-repeat center center;
 	height: 94px;
     }
     #home a {
diff --git a/docs/meson.build b/docs/meson.build
index 6f1ca5c6ff..3e912f21ad 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -13,11 +13,7 @@ docs_assets = [
   'favicon.ico',
   'favicon-16x16.png',
   'favicon-32x32.png',
-  'generic.css',
-  'libvirt.css',
-  'main.css',
   'manifest.json',
-  'mobile.css',
   'mstile-150x150.png',
 ]
 
@@ -288,6 +284,7 @@ html_xslt_gen = []
 
 # --- end of XSLT processing ---
 
+subdir('css')
 subdir('fonts')
 subdir('go')
 subdir('html')
diff --git a/docs/page.xsl b/docs/page.xsl
index 580387ac59..fd67918d3b 100644
--- a/docs/page.xsl
+++ b/docs/page.xsl
@@ -91,7 +91,7 @@
       <head>
         <meta charset="UTF-8"/>
         <meta name="viewport" content="width=device-width, initial-scale=1"/>
-        <link rel="stylesheet" type="text/css" href="{$href_base}main.css"/>
+        <link rel="stylesheet" type="text/css" href="{$href_base}css/main.css"/>
         <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/>
         <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/>
         <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/>
-- 
2.31.1




More information about the libvir-list mailing list