From 703055e580bbe7ea3c00b3477fe9f3e6f3a60e93 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Sun, 8 Oct 2017 20:34:49 +0100 Subject: [PATCH] Show parts at top left of tune. --- abctemplate.py | 2 ++ dottes.html.tune | 19 +++++++++++-------- dottes.tex | 14 +++++++------- dottes.tex.tune | 2 +- singletuneweb.fmt | 2 +- web/css/dottes.css | 11 +++++++++++ 6 files changed, 33 insertions(+), 17 deletions(-) diff --git a/abctemplate.py b/abctemplate.py index 6c4e0fd..43aa265 100755 --- a/abctemplate.py +++ b/abctemplate.py @@ -24,6 +24,7 @@ # * tradition. The Morris tradition the dance tune is from. # * composer. The tune composer. # * key. The tune key. +# * parts. The tune parts order (A(AB2)3 etc.). # * changefile. The name of the 'change' file, if any. # * changename. The change file base name. # * changetitle. The change file tune title. @@ -70,6 +71,7 @@ if __name__ == "__main__": vars["tradition"] = getFieldDisplayText(lines, fdir, "A", latex=args.latex) vars["composer"] = getFieldDisplayText(lines, fdir, "C", latex=args.latex) vars["key"] = getFieldDisplayText(lines, fdir, "K", latex=args.latex) + vars["parts"] = getFieldDisplayText(lines, fdir, "P", latex=args.latex) vars["notes"] = getFieldDisplayText(lines, fdir, "N", starts="Dottes:", latex=args.latex) if vars["notes"]: vars["notesvisibility"] = "yes" diff --git a/dottes.html.tune b/dottes.html.tune index c2831cd..b8fb50a 100644 --- a/dottes.html.tune +++ b/dottes.html.tune @@ -25,14 +25,17 @@
- - Learner - - - Tune index - +

+ + Learner + + + Tune index + + ${parts} +

${title}

diff --git a/dottes.tex b/dottes.tex index 25907c2..2906dfc 100644 --- a/dottes.tex +++ b/dottes.tex @@ -45,13 +45,12 @@ \makeatother % Show the main tune graphic and optional change. -% Args are tune name, tune title, tune subtitle, tradition, composer, +% Args are tune name, tune title, tune subtitle, tradition, composer, parts, % tune graphic, filename, notes, history. -\newcommand{\showtune}[8]{% +\newcommand{\showtune}[9]{% \phantomsection \begin{tabularx}{\textwidth}{LCR} - \addcontentsline{toc}{section}{#2} - & \hypertarget{#1}{\Large{#2}} & \emph{#5} \tabularnewline + #6 & \hypertarget{#1}{\Large{#2}} & \emph{#5} \tabularnewline \ifemptyarg{#3}{}{% & #3 & \tabularnewline } @@ -59,12 +58,13 @@ & \emph{#4} & \tabularnewline } \multicolumn{3}{c}{% - \includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{#6}% + \includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{#7}% }\tabularnewline \end{tabularx} - #7 - + \addcontentsline{toc}{section}{#2} #8 + + #9 \vfill } diff --git a/dottes.tex.tune b/dottes.tex.tune index 39b88b3..8d161c7 100644 --- a/dottes.tex.tune +++ b/dottes.tex.tune @@ -1 +1 @@ -\showtune{$name}{$title}{$subtitle}{$tradition}{$composer}{$graphicsdir/$name}{$notes}{$history} +\showtune{$name}{$title}{$subtitle}{$tradition}{$composer}{$parts}{$graphicsdir/$name}{$notes}{$history} diff --git a/singletuneweb.fmt b/singletuneweb.fmt index a4cec91..c35d6a4 100644 --- a/singletuneweb.fmt +++ b/singletuneweb.fmt @@ -2,7 +2,7 @@ partsbox true measurenb false scale 0.9 -titleformat T0 C1 +titleformat P-1 T0 C1 % I don't want any info fields in the graphics. To turn off the % fields, give a blank infoname for that letter. infoname S diff --git a/web/css/dottes.css b/web/css/dottes.css index f3f7e68..a23be71 100644 --- a/web/css/dottes.css +++ b/web/css/dottes.css @@ -155,6 +155,12 @@ div.dottes-tune-header-row div.dottes-tune-header-icons { display: table-cell; + vertical-align: middle; +} + +div.dottes-tune-header-icons p +{ + vertical-align: middle; } div.dottes-tune-header-title @@ -289,6 +295,11 @@ a.dottes-tune-icon-link text-decoration: none; } +a.dottes-tune-icon-link img +{ + vertical-align: middle; +} + ul.tune-type-list { list-style-type: none;