[bootlin/training-materials updates] master: Bootlin theme: distinguish hyperlinks (731f2e56)
Michael Opdenacker
michael.opdenacker at bootlin.com
Tue Sep 1 21:02:55 CEST 2020
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/731f2e563bb2c01f1c26b021a87593bb8b30f16c
>---------------------------------------------------------------
commit 731f2e563bb2c01f1c26b021a87593bb8b30f16c
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date: Tue Sep 1 21:02:55 2020 +0200
Bootlin theme: distinguish hyperlinks
- Allows to distinguish hyperlinks from regular text
- This applies to Elixir links too which previously
could not be distinguished from regular \code text.
Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>
>---------------------------------------------------------------
731f2e563bb2c01f1c26b021a87593bb8b30f16c
common/beamerthemeBootlin.sty | 5 +++++
common/common.sty | 28 ++++++++++++++--------------
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/common/beamerthemeBootlin.sty b/common/beamerthemeBootlin.sty
index 1c9d7969..f8c465e6 100644
--- a/common/beamerthemeBootlin.sty
+++ b/common/beamerthemeBootlin.sty
@@ -28,10 +28,15 @@
\definecolor{fecodebg}{rgb}{0.9,0.9,0.9}
\setbeamercolor{block body}{bg=fecodebg}
+\definecolor{fedarkblue}{rgb}{0.25,0.25,0.75}
+\setbeamercolor{darkblue}{fg=fedarkblue}
+\hypersetup{colorlinks,linkcolor=,urlcolor=fedarkblue}
+
\setbeamertemplate{blocks}[rounded][shadow=false]
% Custom Bootlin commands
\newcommand{\code}[1]{{\usebeamercolor[fg]{code} \path{#1}}}
+\newcommand{\codelink}[1]{{\usebeamercolor[fg]{darkblue} \path{#1}}}
\newcommand{\codewithhash}[1]{{\usebeamercolor[fg]{code} \tt{#1}}}
\usepackage{listings}
diff --git a/common/common.sty b/common/common.sty
index 87db68e1..0761d6f6 100644
--- a/common/common.sty
+++ b/common/common.sty
@@ -1,21 +1,21 @@
% Common Bootlin commands
% Generic commands
-\newcommand\projdir[2]{\href{https://elixir.bootlin.com/#1/latest/source/#2/}{\code{#2/}}}
-\newcommand\projfile[2]{\href{https://elixir.bootlin.com/#1/latest/source/#2}{\code{#2}}}
+\newcommand\projdir[2]{\href{https://elixir.bootlin.com/#1/latest/source/#2/}{\codelink{#2/}}}
+\newcommand\projfile[2]{\href{https://elixir.bootlin.com/#1/latest/source/#2}{\codelink{#2}}}
% Linux commands
-\newcommand\kfunc[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{#1()}}}
-\newcommand\ksym[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{#1}}}
-\newcommand\kstruct[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\code{struct #1}}}
+\newcommand\kfunc[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\codelink{#1()}}}
+\newcommand\ksym[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\codelink{#1}}}
+\newcommand\kstruct[1]{\href{https://elixir.bootlin.com/linux/latest/ident/#1}{\codelink{struct #1}}}
\newcommand\kfile[1]{\projfile{linux}{#1}}
-\newcommand\krelfile[2]{\href{https://elixir.bootlin.com/linux/latest/source/#1/#2}{\code{#2}}} % For relative file paths
-\newcommand\kfileversion[2]{\href{https://elixir.bootlin.com/linux/v#2/source/#1}{\code{#1}}}
+\newcommand\krelfile[2]{\href{https://elixir.bootlin.com/linux/latest/source/#1/#2}{\codelink{#2}}} % For relative file paths
+\newcommand\kfileversion[2]{\href{https://elixir.bootlin.com/linux/v#2/source/#1}{\codelink{#1}}}
\newcommand\kdir[1]{\projdir{linux}{#1}}
-\newcommand\kreldir[2]{\href{https://elixir.bootlin.com/linux/latest/source/#1/#2}{\code{#2/}}} % For relative directory paths
-\newcommand\ksubarch[1]{\href{https://elixir.bootlin.com/linux/latest/source/arch/#1/}{\code{#1}}}
-\newcommand\kconfig[1]{\href{https://elixir.bootlin.com/linux/latest/K/ident/#1}{\code{#1}}}
-\newcommand\kconfigval[2]{\href{https://elixir.bootlin.com/linux/latest/K/ident/#1}{\code{#1=#2}}}
-\newcommand\kerneldoctext[1]{\href{https://kernel.org/doc/Documentation/#1}{\code{Documentation/#1}}}
-\newcommand\kerneldochtml[1]{\href{https://www.kernel.org/doc/html/latest/#1.html}{\code{#1}}}
-\newcommand\kerneldochtmlsection[3]{\href{https://www.kernel.org/doc/html/latest/#1/index.html\##2}{\code{#1} (section {\em #3})}}
+\newcommand\kreldir[2]{\href{https://elixir.bootlin.com/linux/latest/source/#1/#2}{\codelink{#2/}}} % For relative directory paths
+\newcommand\ksubarch[1]{\href{https://elixir.bootlin.com/linux/latest/source/arch/#1/}{\codelink{#1}}}
+\newcommand\kconfig[1]{\href{https://elixir.bootlin.com/linux/latest/K/ident/#1}{\codelink{#1}}}
+\newcommand\kconfigval[2]{\href{https://elixir.bootlin.com/linux/latest/K/ident/#1}{\codelink{#1=#2}}}
+\newcommand\kerneldoctext[1]{\href{https://kernel.org/doc/Documentation/#1}{\codelink{Documentation/#1}}}
+\newcommand\kerneldochtml[1]{\href{https://www.kernel.org/doc/html/latest/#1.html}{\codelink{#1}}}
+\newcommand\kerneldochtmlsection[3]{\href{https://www.kernel.org/doc/html/latest/#1/index.html\##2}{\codelink{#1} (section {\em #3})}}
More information about the training-materials-updates
mailing list