From nobody Tue Apr 30 05:42:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1501849922654298.7702119872429; Fri, 4 Aug 2017 05:32:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B036313A4C; Fri, 4 Aug 2017 12:31:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F34E6950F; Fri, 4 Aug 2017 12:31:57 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AE0C91805974; Fri, 4 Aug 2017 12:31:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v74CVAKn018434 for ; Fri, 4 Aug 2017 08:31:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9166B7D901; Fri, 4 Aug 2017 12:31:10 +0000 (UTC) Received: from t460.redhat.com (ovpn-117-145.ams2.redhat.com [10.36.117.145]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96B827D6B2; Fri, 4 Aug 2017 12:31:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B036313A4C Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Fri, 4 Aug 2017 13:31:04 +0100 Message-Id: <20170804123104.21134-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] docs: make website responsive for mobile devices X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 04 Aug 2017 12:32:00 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The website does not look good in a mobile device as the text is far too small and the layout assumes a wide screen. Make the style dynanically adapt based on viewport size, so a mobile device gets a layout more suited to its dimensions. Signed-off-by: Daniel P. Berrange --- docs/main.css | 1 + docs/mobile.css | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++ docs/page.xsl | 34 +++++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 docs/mobile.css diff --git a/docs/main.css b/docs/main.css index 95d5d325d..71f7b7a6a 100644 --- a/docs/main.css +++ b/docs/main.css @@ -1,3 +1,4 @@ @import url(fonts/stylesheet.css); @import url(generic.css); @import url(libvirt.css); +@import url(mobile.css); diff --git a/docs/mobile.css b/docs/mobile.css new file mode 100644 index 000000000..0fc1e9d71 --- /dev/null +++ b/docs/mobile.css @@ -0,0 +1,95 @@ + +@media (max-width: 1000px) { + #home { + width: 100%; + display: block; + margin: 0px; + background: white url(logos/logo-banner-dark-256.png) no-repeat center ce= nter; + height: 94px; + } + #home a { + width: 100%; + } + #search { + width: 100%; + display: block; + margin: 0px; + background: white; + padding: 0px; + } + #search form { + padding: 5px; + } + body.index h1 { + display: none; + } + #jumplinks { + padding: 0px; + display: block; + width: 100%; + text-align: center; + margin: 0px; + height: 1.3em; + font-size: 1em; + border-top: 3px solid rgb(60, 133, 124); + border-bottom: 3px solid rgb(60, 133, 124); + } + #jumplinks ul { + display: block; + padding: 0px; + margin: 0px; + } + #jumplinks li { + margin: 0px; + padding-left: 0.5em; + padding-right: 0.5em; + } + #nav { + border: 0px; + } + + #search.navhide { + display: none !IMPORTANT; + } + #home.navhide { + position: fixed; + top: 0px; + z-index: 9001;=09 + width: 6em; + display: block; + margin: 0px; + background: inherit; + height: 1.3em; + border-top: 3px solid rgb(60, 133, 124); + border-bottom: 3px solid rgb(60, 133, 124); + font-size: 1em; + text-indent: 0px; + font-weight: bold; + padding-left: 1em; + } + #home.navhide a { + color: white; + text-decoration: none; + } + #home.navhide a:hover { + color: rgb(255, 230, 0); + } + #jumplinks.navhide { + position: fixed; + text-align: right; + top: 0px; + z-index: 9000; + background: rgb(0, 95, 97); + } + #jumplinks.navhide ul { + z-index: 9001; + } + #body { + margin-top: 180px; + } + div.panel { + width: 80%; + float: none; + margin-bottom: 2em; + } +} diff --git a/docs/page.xsl b/docs/page.xsl index 7ca4e7bf4..0f762be7d 100644 --- a/docs/page.xsl +++ b/docs/page.xsl @@ -88,6 +88,7 @@ + @@ -97,6 +98,39 @@ libvirt: <xsl:value-of select=3D"html:html/html:body/html:h= 1"/> + + --=20 2.13.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list