From eea05bba2778e9b968a13ba30d64c1b6b4f60bf6 Mon Sep 17 00:00:00 2001
From: Luis Felipe <luis.felipe.la@protonmail.com>
Date: Thu, 3 Jun 2021 14:22:14 -0500
Subject: [PATCH] website: publications: Add scientific publication mark.
* website/apps/media/types.scm (<publication>): 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
@@ -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"
@@ -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
@@ -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 <publication>
- (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 <publication> 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)
@@ -33,3 +33,10 @@
.publication-info {
margin-bottom: 0px;
}
+
+.scientific-mark {
+ display: inline-block;
+ cursor: help;
+ height: 28px;
+ width: 28px;
+}
new file mode 100644
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="180"
+ height="180"
+ id="svg2"
+ version="1.1"
+ inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="scientific-mark.svg"
+ inkscape:export-filename="manual-latest-icon.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1"
+ inkscape:cx="338.63228"
+ inkscape:cy="-97.758331"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:showpageshadow="false"
+ inkscape:snap-global="false"
+ inkscape:snap-nodes="true"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:document-rotation="0"
+ inkscape:snap-grids="false"
+ inkscape:snap-to-guides="false"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-page="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3245"
+ empspacing="1"
+ visible="true"
+ enabled="true"
+ snapvisiblegridlinesonly="true"
+ spacingx="100"
+ spacingy="100"
+ originx="40"
+ originy="40" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ <dc:date />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title />
+ </cc:Agent>
+ </dc:creator>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title />
+ </cc:Agent>
+ </dc:rights>
+ <cc:license
+ rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Cap"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-872.36218)">
+ <path
+ id="rect240"
+ style="fill:#333333;fill-opacity:1;stroke-width:1.99999"
+ d="M 90.000198,939.32109 5.5123166,969.80392 v 4.56318 l 42.5012864,15.33389 v 32.52601 h 0.01118 a 42.779802,11.407948 0 0 0 42.768622,11.1763 42.779802,11.407948 0 0 0 42.770885,-11.1763 h 0.008 v -33.09864 l 40.91539,-14.76126 v -4.56318 z m 0.494643,5.18926 -77.050437,30.24445 -4.1509766,-1.68669 z m -3.328805,20.4452 c 0.202755,-4.6e-4 0.405519,-4.6e-4 0.608275,0 18.149719,-3.6e-4 34.458049,3.62068 41.133229,9.13302 -8.25757,-3.90965 -21.87171,-6.24378 -36.414081,-6.24316 -7.194884,3.6e-4 -14.280885,0.57398 -20.643484,1.67107 v 39.96792 c -5.644696,0.7436 -10.700536,2.001 -14.525079,3.5828 v -39.53564 c -5.876691,2.51653 -9.060375,5.59376 -9.061743,8.75872 2.96e-4,0.20282 0.01367,0.40563 0.04011,0.60828 v 3.01909 c -3.127233,-2.01991 -4.757427,-4.25157 -4.759253,-6.51501 -0.004,-7.90175 19.430896,-14.33837 43.622026,-14.44709 z m 3.014639,50.85215 a 33.418522,6.440439 0 0 1 0.612731,0 33.418522,6.440439 0 0 1 33.419484,6.4417 33.418522,6.440439 0 0 1 -33.419484,6.4392 33.418522,6.440439 0 0 1 -33.417264,-6.4392 33.418522,6.440439 0 0 1 32.804533,-6.4417 z" />
+ <g
+ transform="translate(-1160.0177,610.69615)"
+ inkscape:label="referencia"
+ id="layer2-3" />
+ <g
+ inkscape:label="Layer 1"
+ id="g3194"
+ transform="translate(-381.66039,1217.4341)" />
+ <g
+ id="layer2"
+ inkscape:label="referencia"
+ transform="translate(-577.51401,231.92014)"
+ sodipodi:insensitive="true" />
+ <g
+ transform="translate(200.84331,838.65809)"
+ id="g3194-5"
+ inkscape:label="Layer 1" />
+ <g
+ inkscape:label="Layer 1"
+ id="g7737"
+ transform="translate(415.21682,1076.3667)" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Bitstream Vera Sans';fill:#000000;fill-opacity:1;stroke:none"
+ x="-225.51039"
+ y="1257.8601"
+ id="text3665"><tspan
+ sodipodi:role="line"
+ id="tspan3667"
+ x="-225.51039"
+ y="1257.8601"
+ style="font-size:40px;line-height:1.25"> </tspan></text>
+ <circle
+ style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:2"
+ id="path256"
+ cx="161.13716"
+ cy="994.64807"
+ r="4.4626188" />
+ <path
+ id="rect258"
+ style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:2"
+ d="m 159.53711,1001.2723 c -2.216,0 -3.80552,1.3775 -4,3.0723 l -2,17.4277 c -0.19448,1.6947 1.784,3.0723 4,3.0723 h 7.19922 c 2.216,0 4.19448,-1.3776 4,-3.0723 l -2,-17.4277 c -0.19448,-1.6948 -1.784,-3.0723 -4,-3.0723 z m -0.11914,2.334 -1.125,19.0254 c -1.15101,0 -1.46128,0.136 -2.22852,-0.834 l 2.12891,-16.8164 z" />
+ <path
+ id="rect263"
+ style="fill:#333333;fill-opacity:1;stroke:none;stroke-width:2"
+ d="m 159.35468,983.98439 3.56496,-1.28041 V 990.92 h -3.56496 z"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+</svg>
base-commit: 89dffa68995c39261b0bf30466a982c42294fd48
--
2.31.1