From patchwork Thu Jun 3 19:50:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Felipe X-Patchwork-Id: 29878 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 9EF1E27BC81; Thu, 3 Jun 2021 20:51:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C668F27BC78 for ; Thu, 3 Jun 2021 20:51:08 +0100 (BST) Received: from localhost ([::1]:51634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lotMx-0001y2-U0 for patchwork@mira.cbaines.net; Thu, 03 Jun 2021 15:51:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lotMr-0001xP-UY for guix-patches@gnu.org; Thu, 03 Jun 2021 15:51:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lotMr-0006ks-MG for guix-patches@gnu.org; Thu, 03 Jun 2021 15:51:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lotMr-0001UN-LM for guix-patches@gnu.org; Thu, 03 Jun 2021 15:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48637] [PATCH] website: Add publications page Resent-From: Luis Felipe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 03 Jun 2021 19:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48637 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , "48637@debbugs.gnu.org" <48637@debbugs.gnu.org> Received: via spool by 48637-submit@debbugs.gnu.org id=B48637.16227498585712 (code B ref 48637); Thu, 03 Jun 2021 19:51:01 +0000 Received: (at 48637) by debbugs.gnu.org; 3 Jun 2021 19:50:58 +0000 Received: from localhost ([127.0.0.1]:44699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lotMi-0001Tz-Uq for submit@debbugs.gnu.org; Thu, 03 Jun 2021 15:50:58 -0400 Received: from mail-4319.protonmail.ch ([185.70.43.19]:43225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lotMf-0001Ti-ML for 48637@debbugs.gnu.org; Thu, 03 Jun 2021 15:50:51 -0400 Date: Thu, 03 Jun 2021 19:50:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1622749843; bh=s6TX/99IFvBE5voj8SmixmIbE6lwcmCcKCUMnvpb0mY=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=E2DQVH94Gg2bjZfvh/otpEqcfaCCsLmlWorWIuzvH08Vbxr0jULnf8iXUktiTfRu3 aKqmT3Y1PGjSvXgSmHGsYpZrsAJCeWLrsGqAXzvb5d5Ko0HyORK6HGQDqVQeNWvShW sjg5t/uavvED5PMw8sH2A3FNz0nz4BvZpj+UUgfQ= Message-ID: In-Reply-To: References: <4BtcqLwBY7LgeYhUd41lhUUAcT5n2Zn9OTJUzGswTuBpLla8nBHyrQ3kJzwEMI9E7MPEnr6wBqSeCMqByldZ6i5jPR8B7ZtEi0XhwextyQo=@protonmail.com> <87bl8vi0d8.fsf@gnu.org> <4jhiBWvAzsdTXmZFj_GgZTPWkIZncoQeId2pbbzXXMRNFk0FPGJXxIrp8ysGXNwuZk54pS5l5Ba2jkRcqE8omsfVgItw1gMcDJW1tqMPn-M=@protonmail.com> <87fsxzwaji.fsf@gnu.org> <853F24B0-F5DE-461C-8163-71FCD8581FD7@lepiller.eu> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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" Reply-to: Luis Felipe X-ACL-Warn: , Luis Felipe via Guix-patches X-Patchwork-Original-From: Luis Felipe via Guix-patches via From: Luis Felipe X-getmail-retrieved-from-mailbox: Patches On Thursday, June 3, 2021 1:39 PM, Luis Felipe wrote: > On Thursday, June 3, 2021 10:37 AM, Julien Lepiller wrote: > >> Yeah, good idea, though we need to make it accessible (alt="scientific" or something). > > So, a publication is either scientific or not, right? So just add "publication-scientific?", right? I went ahead and added that "publication-scientific?" field and the suggested cap to scientific publications (patch attached). Let me know what you think. From eea05bba2778e9b968a13ba30d64c1b6b4f60bf6 Mon Sep 17 00:00:00 2001 From: Luis Felipe Date: Thu, 3 Jun 2021 14:22:14 -0500 Subject: [PATCH] website: publications: Add scientific publication mark. * website/apps/media/types.scm (): Add "scientific?" field. * website/apps/media/data.scm (publications): Use the new field. * website/apps/media/templates/components.scm (publication->shtml): Show graduate cap for scientific publications. * website/static/media/css/publications.css (.scientific-mark): New class. * website/static/media/img/scientific-mark.svg: New image. --- website/apps/media/data.scm | 3 +- website/apps/media/templates/components.scm | 12 ++ website/apps/media/types.scm | 14 +- website/static/media/css/publications.css | 7 + website/static/media/img/scientific-mark.svg | 154 +++++++++++++++++++ 5 files changed, 185 insertions(+), 5 deletions(-) create mode 100644 website/static/media/img/scientific-mark.svg diff --git a/website/apps/media/data.scm b/website/apps/media/data.scm index 812f9e3..079a6d3 100644 --- a/website/apps/media/data.scm +++ b/website/apps/media/data.scm @@ -137,7 +137,8 @@ Alexander Gosdschan, Katarzyna Wreczycka, Jonathan Ronen, Altuna Akalin" #:url "https://ambrevar.xyz/guix-advance/index.html" #:authors "Pierre Neidhardt" #:date (string->date "2019-01-14" "~Y-~m-~d") - #:type (C_ "publication type" "Article")) + #:type (C_ "publication type" "Article") + #:scientific? #false) (publication #:title "Scalable Workflows and Reproducible Data Analysis for Genomics" #:url "https://link.springer.com/protocol/10.1007%2F978-1-4939-9074-0_24" diff --git a/website/apps/media/templates/components.scm b/website/apps/media/templates/components.scm index 20fa3a9..a1a6072 100644 --- a/website/apps/media/templates/components.scm +++ b/website/apps/media/templates/components.scm @@ -42,6 +42,18 @@ (h3 (@ (lang ,(publication-language publication)) (class "publication-title")) + ,(if (publication-scientific? publication) + `((img + (@ (class "scientific-mark") + (src ,(guix-url "static/media/img/scientific-mark.svg")) + ;; TRANSLATORS: This is a tag that indicates a + ;; publication is scientific. + (alt ,(G_ "[Scientific]")) + ;; TRANSLATORS: This is a help text indicating a + ;; publication is scientific. + (title ,(G_ "Scientific")))) + " ") + "") ,(publication-title publication)) (p diff --git a/website/apps/media/types.scm b/website/apps/media/types.scm index 2c219e5..ac9bbda 100644 --- a/website/apps/media/types.scm +++ b/website/apps/media/types.scm @@ -8,6 +8,7 @@ #:export (publication publication? publication-authors + publication-scientific? publication-date publication-language publication-title @@ -71,22 +72,27 @@ ;;; The kind of publication. See the list of publications in the ;;; (apps media data) module for examples. ;;; +;;; scientific? (boolean) +;;; Whether the publication is scientific or not. +;;; ;;; (define-record-type - (make-publication title url authors date language type) + (make-publication title url authors date language type scientific?) publication? (title publication-title) (url publication-url) (authors publication-authors) (date publication-date) (language publication-language) - (type publication-type)) + (type publication-type) + (scientific? publication-scientific?)) ;;; Helper procedures. -(define* (publication #:key title url authors date (language "en") type) +(define* (publication #:key title url authors date (language "en") type + (scientific? #true)) "Return a object with the given attributes." - (make-publication title url authors date language type)) + (make-publication title url authors date language type scientific?)) ;;; Screenshot (record type) diff --git a/website/static/media/css/publications.css b/website/static/media/css/publications.css index 797918f..11a8542 100644 --- a/website/static/media/css/publications.css +++ b/website/static/media/css/publications.css @@ -33,3 +33,10 @@ .publication-info { margin-bottom: 0px; } + +.scientific-mark { + display: inline-block; + cursor: help; + height: 28px; + width: 28px; +} diff --git a/website/static/media/img/scientific-mark.svg b/website/static/media/img/scientific-mark.svg new file mode 100644 index 0000000..d301307 --- /dev/null +++ b/website/static/media/img/scientific-mark.svg @@ -0,0 +1,154 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + + base-commit: 89dffa68995c39261b0bf30466a982c42294fd48 -- 2.31.1