From patchwork Mon Dec 27 13:21:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo-Andres Hofmann X-Patchwork-Id: 4942 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4JMyxc0Pywz3wt5 for ; Mon, 27 Dec 2021 13:21:56 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4JMyxY4pw4z28g; Mon, 27 Dec 2021 13:21:53 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4JMyxY45rWz30HK; Mon, 27 Dec 2021 13:21:53 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4JMyxX5Z75z2y51 for ; Mon, 27 Dec 2021 13:21:52 +0000 (UTC) Received: from arche.uberspace.de (arche.uberspace.de [185.26.156.147]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4JMyxR2R5Pzpg for ; Mon, 27 Dec 2021 13:21:47 +0000 (UTC) Received: (qmail 17988 invoked by uid 990); 27 Dec 2021 13:21:46 -0000 From: Leo-Andres Hofmann To: development@lists.ipfire.org Subject: [PATCH 2/2] pakfire.cgi: Improve HTML output and layout Date: Mon, 27 Dec 2021 14:21:37 +0100 Message-Id: <20211227132137.1355-2-hofmann@leo-andres.de> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20211227132137.1355-1-hofmann@leo-andres.de> References: <20211202153955.1126-1-hofmann@leo-andres.de> <20211227132137.1355-1-hofmann@leo-andres.de> MIME-Version: 1.0 X-Rspamd-Bar: - X-Rspamd-Report: R_MISSING_CHARSET(0.5) MID_CONTAINS_FROM(1) MIME_HTML_ONLY(0.2) BAYES_HAM(-3) X-Rspamd-Score: -1.3 Received: from unknown (HELO unkown) (::1) by arche.uberspace.de (Haraka/2.8.28) with ESMTPSA; Mon, 27 Dec 2021 14:21:46 +0100 ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1640611307; a=rsa-sha256; cv=none; b=P70kTMAlxWtxXXcY0PMEgeRTRB2X6lQRBgWK8D/pvjFxtuO2cIs45p/X72w81GQX+nBWmi xj24WKU+pPGyqLYyRUwn2H3KxiouL8xTMSw7gInwJLgTcCcucwAS+ZTMGHjCEHohst4yLX 5n9zsPUQY2V00GVborZN6fP4Xf9nzatnVp79mPkFvjKsKxofwcnTIbJy8k6x3ki9iRahN1 OPCBYvp2SsPHmQARhSxI1Hm0ka1oMaQWvJQ2LvVAFsOwLYa0v8+O1LllSz9cR2lHsEAtIN mskCqBpoiL5tU3sortoIqGhkLYrUIpovncIynHe73QO2Co/AZ+5eKuyW2CvN/A== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=none; dmarc=pass (policy=quarantine) header.from=leo-andres.de; spf=pass (mail01.ipfire.org: domain of hofmann@leo-andres.de designates 185.26.156.147 as permitted sender) smtp.mailfrom=hofmann@leo-andres.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1640611307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P2z1vnSVU8NxHtxcMpFjY7s9So5iqTYOc4dXXBhPLwU=; b=jL2II8QmvvKkYzli2IC3tjiKcb4upcsZy5YOARTlTdZRtGXZwabef4HsuB+LNsIKbvtEHs 0/SJ2lt/5CpTC9GioVjVB0Sp1Eiv7ppylwvCMlEga8mCEI74WAS5I2obAAYB7W5ANbH9H7 MVCiMElXYn15nT7Q1gu3alIiHqWmKPLT6i6McHDvoU32oOYg6HXnrbNQ7AZeL9ksYg1JbB piRe4k+XVMyxoKIHqrTRCpLPhL6SwsELp6socIF+hop0qJUTG6tmkTvG7r3SziO4nNz2j+ zVWRLdviHYyi6F93tAksLyYbO3sxqkciQ3cDRYuoxrSuEH1kNKf+GaI8bKEEPw== Authentication-Results: mail01.ipfire.org; dkim=none; dmarc=pass (policy=quarantine) header.from=leo-andres.de; spf=pass (mail01.ipfire.org: domain of hofmann@leo-andres.de designates 185.26.156.147 as permitted sender) smtp.mailfrom=hofmann@leo-andres.de X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-1.69 / 11.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; SPF_REPUTATION_HAM(-0.91)[-0.90940212585203]; NEURAL_SPAM(0.72)[0.724]; R_MISSING_CHARSET(0.50)[]; MX_INVALID(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[leo-andres.de,quarantine]; MIME_HTML_ONLY(0.20)[]; R_SPF_ALLOW(-0.20)[+mx]; IP_REPUTATION_HAM(-0.01)[asn: 205766(0.00), country: DE(-0.01), ip: 185.26.156.147(0.00)]; MIME_TRACE(0.00)[0:~]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:205766, ipnet:185.26.156.0/24, country:DE]; R_DKIM_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; TO_DN_NONE(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4JMyxR2R5Pzpg X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Add missing closing tags, indentation and CSS styling. Add link to reboot notice, left-align info list and resize packages lists for better readability. Signed-off-by: Leo-Andres Hofmann Acked-by: Peter Müller --- Hi all, this patch series implements everything that came up in the discussion so far and fixes a few HTML issues I found along the way. Because more changes are probably needed, I have not yet created a new patchset. Instead, this patch builds on the first proposal. To test it, the following patches must therefore also be applied: https://patchwork.ipfire.org/patch/4842 https://patchwork.ipfire.org/project/ipfire/list/?series=2452 I hope this doesn't cause confusion again, if it does, I can of course build a new patchset :) Happy holidays! Leo html/cgi-bin/pakfire.cgi | 137 ++++++++++++++++++++++++--------------- 1 file changed, 84 insertions(+), 53 deletions(-) diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi index 8516b07b1..51f586aa2 100644 --- a/html/cgi-bin/pakfire.cgi +++ b/html/cgi-bin/pakfire.cgi @@ -100,6 +100,32 @@ if($cgiparams{'ACTION'} eq 'json-getstatus') { ###--- HTML HEAD ---### my $extraHead = < + /* Main screen */ + table#pfmain { + width: 100%; + border-style: hidden; + table-layout: fixed; + } + + #pfmain td { + padding: 5px 20px 0; + text-align: center; + } + #pfmain tr:not(:last-child) > td { + padding-bottom: 1.5em; + } + #pfmain tr > td.heading { + padding: 0; + font-weight: bold; + background-color: $color{'color20'}; + } + + .pflist { + width: 100%; + text-align: left; + margin-bottom: 0.8em; + } + /* Pakfire log viewer */ section#pflog-header { width: 100%; @@ -173,20 +199,23 @@ END print "$_\n"; } print < - $Lang::tr{'pakfire accept all'} -   + + $Lang::tr{'pakfire accept all'} +  
+
+ + END &Header::closebox(); @@ -210,20 +239,23 @@ END print "$_\n"; } print < - $Lang::tr{'pakfire uninstall all'} -   + + $Lang::tr{'pakfire uninstall all'} +  
+
+ + END &Header::closebox(); @@ -311,70 +343,69 @@ my $packages_update_age = &General::age("/opt/pakfire/db/lists/packages_list.db" &Header::openbox("100%", "center", "Pakfire"); print < + END if ( -e "/var/run/need_reboot") { - print ""; - print "" + print "\t\t\n"; } print < - - + + + + + + + - + +
$Lang::tr{'needreboot'}!
 
$Lang::tr{'needreboot'}!
$Lang::tr{'pakfire system state'}: - - $Lang::tr{'available updates'}:
$Lang::tr{'pakfire core update level'}: $core_release
- $Lang::tr{'pakfire last update'} $core_update_age $Lang::tr{'pakfire ago'}
- $Lang::tr{'pakfire last serverlist update'} $server_update_age $Lang::tr{'pakfire ago'}
- $Lang::tr{'pakfire last core list update'} $corelist_update_age $Lang::tr{'pakfire ago'}
+
$Lang::tr{'pakfire system state'}:$Lang::tr{'available updates'}:
$Lang::tr{'pakfire core update level'}: $core_release +
+
+ $Lang::tr{'pakfire last update'} $core_update_age $Lang::tr{'pakfire ago'}
+ $Lang::tr{'pakfire last serverlist update'} $server_update_age $Lang::tr{'pakfire ago'}
+ $Lang::tr{'pakfire last core list update'} $corelist_update_age $Lang::tr{'pakfire ago'}
$Lang::tr{'pakfire last package update'} $packages_update_age $Lang::tr{'pakfire ago'} -
-
-
-
-
-
+
- + +
+
+
+
+
$Lang::tr{'pakfire available addons'}$Lang::tr{'pakfire installed addons'}
  -
$Lang::tr{'pakfire available addons'} - $Lang::tr{'pakfire installed addons'} -
-

$Lang::tr{'pakfire install description'}

-
-

$Lang::tr{'pakfire install description'}

+ + - - - -
-

$Lang::tr{'pakfire uninstall description'}

-
- + +
+

$Lang::tr{'pakfire uninstall description'}

+
+ - -
+ &Pakfire::dblist("installed", "forweb"); + print < + + + +
END