[libvirt PATCH v2 5/6] docs: Move all CSS files to a subdirectory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This unclutters the top-level docs directory.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 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 @@
-@import url(fonts/stylesheet.css);
+@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 3795597234..860f3e108d 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -7,11 +7,7 @@ docs_builddir = join_paths(meson.current_build_dir(), '')
 
 docs_assets = [
   'browserconfig.xml',
-  'generic.css',
-  'libvirt.css',
-  'main.css',
   'manifest.json',
-  'mobile.css',
 ]
 
 docs_html_in_files = [
@@ -281,6 +277,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 139c53e328..959d5593f6 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="/icons/apple-touch-icon.png"/>
         <link rel="shortcut icon" href="/icons/favicon.ico"/>
         <link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png"/>
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux