From patchwork Wed Jul 10 17:04:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 14557 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 562A1171E2; Wed, 10 Jul 2019 18:06:00 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 1C621171DD for ; Wed, 10 Jul 2019 18:06:00 +0100 (BST) Received: from localhost ([::1]:35496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlG2Z-00058a-Pb for patchwork@mira.cbaines.net; Wed, 10 Jul 2019 13:05:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42274) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlG1h-0004Ot-A7 for guix-patches@gnu.org; Wed, 10 Jul 2019 13:05:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlG1g-0001IC-8D for guix-patches@gnu.org; Wed, 10 Jul 2019 13:05:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55906) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlG1f-0001HR-DX for guix-patches@gnu.org; Wed, 10 Jul 2019 13:05:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hlG1f-0000yD-84 for guix-patches@gnu.org; Wed, 10 Jul 2019 13:05:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36579] [PATCH] website: Add "permalinks" to package entries in package-list. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Jul 2019 17:05:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36579 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 36579@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15627782883688 (code B ref -1); Wed, 10 Jul 2019 17:05:03 +0000 Received: (at submit) by debbugs.gnu.org; 10 Jul 2019 17:04:48 +0000 Received: from localhost ([127.0.0.1]:36492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlG1Q-0000xQ-74 for submit@debbugs.gnu.org; Wed, 10 Jul 2019 13:04:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:44261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hlG1N-0000xH-K9 for submit@debbugs.gnu.org; Wed, 10 Jul 2019 13:04:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42163) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlG1M-0004JT-Fm for guix-patches@gnu.org; Wed, 10 Jul 2019 13:04:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlG1L-0000nU-7g for guix-patches@gnu.org; Wed, 10 Jul 2019 13:04:44 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:45576) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hlG1K-0000fG-UG for guix-patches@gnu.org; Wed, 10 Jul 2019 13:04:43 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 45kQXR0PWKz1rWTR for ; Wed, 10 Jul 2019 19:04:38 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 45kQXQ6f8jz1qqkC for ; Wed, 10 Jul 2019 19:04:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 1ksh6WO976Wa for ; Wed, 10 Jul 2019 19:04:38 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-60-166.dynamic.mnet-online.de [188.174.60.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Wed, 10 Jul 2019 19:04:38 +0200 (CEST) Received: from lenashee.goebel-consult.de (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 6CCFF600AB for ; Wed, 10 Jul 2019 19:04:41 +0200 (CEST) From: Hartmut Goebel Date: Wed, 10 Jul 2019 19:04:37 +0200 Message-Id: <20190710170437.3672-1-h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * website/apps/packages/templates/components.scm (detailed-package-preview): Add an id attribute and a link to itself to each package entry headline. * website/static/packages/css/package-list.css: Add style rules to show the permalink symbol only when hovering over the headline. --- .../apps/packages/templates/components.scm | 8 ++++++-- website/static/packages/css/package-list.css | 19 ++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/website/apps/packages/templates/components.scm b/website/apps/packages/templates/components.scm index 96e4296..7352402 100644 --- a/website/apps/packages/templates/components.scm +++ b/website/apps/packages/templates/components.scm @@ -41,13 +41,17 @@ `(div (@ (class "package-preview")) (h3 - (@ (class "package-name")) + (@ (class "package-name") (id ,(package-name package))) ,(package-name package) " " ,(package-version package) " " ,(if (package-issues? package) '(span (@ (class "red-tag")) "") " ") (span (@ (class "package-synopsis")) " — " - ,(package-synopsis-shtml package))) + ,(package-synopsis-shtml package)) + (a + (@ (class "headerlink") (title "Permalink to this package") + (href ,(string-append "#" (package-name package)))) + " ¶")) (div (@ (class "package-description")) diff --git a/website/static/packages/css/package-list.css b/website/static/packages/css/package-list.css index 10f079b..2e9e352 100644 --- a/website/static/packages/css/package-list.css +++ b/website/static/packages/css/package-list.css @@ -40,4 +40,21 @@ display: inline-block; height: 13px; width: 22px; -} \ No newline at end of file +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +}