From 7994abe07c61df326223171c3e9b036d11275664 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 12 Sep 2021 14:38:07 +0200 Subject: Add templates --- templates/bandcamp.html.erb | 1 + templates/sheet_music.html.erb | 2 ++ templates/song.html.erb | 23 +++++++++++++++++++++++ templates/song.tex.erb | 24 ++++++++++++++++++++++++ templates/tag.html.erb | 9 +++++++++ templates/template.html.erb | 15 +++++++++++++++ templates/youtube.html.erb | 1 + 7 files changed, 75 insertions(+) create mode 100644 templates/bandcamp.html.erb create mode 100644 templates/sheet_music.html.erb create mode 100644 templates/song.html.erb create mode 100644 templates/song.tex.erb create mode 100644 templates/tag.html.erb create mode 100644 templates/template.html.erb create mode 100644 templates/youtube.html.erb diff --git a/templates/bandcamp.html.erb b/templates/bandcamp.html.erb new file mode 100644 index 0000000..d5bddb2 --- /dev/null +++ b/templates/bandcamp.html.erb @@ -0,0 +1 @@ + diff --git a/templates/sheet_music.html.erb b/templates/sheet_music.html.erb new file mode 100644 index 0000000..69ddbc3 --- /dev/null +++ b/templates/sheet_music.html.erb @@ -0,0 +1,2 @@ +

Nuty

+ diff --git a/templates/song.html.erb b/templates/song.html.erb new file mode 100644 index 0000000..2c4164f --- /dev/null +++ b/templates/song.html.erb @@ -0,0 +1,23 @@ +

<%= song.title -%>

+[PDF] + +<% song.split_lyrics.each do |paragraph| -%> +

+ <%- paragraph.each do |line| -%> + <%= line %>
+ <%- end -%> +

+<%- end -%> + +<%- if File.file?(src (song_ly song.id)) -%> + +<%- end -%> + +<%- if !song.recordings.empty? -%> +

Nagrania

+<%- song.recordings.each do |recording| -%> +

+<%= recording.render -%> +

+<%- end -%> +<%- end -%> diff --git a/templates/song.tex.erb b/templates/song.tex.erb new file mode 100644 index 0000000..1e98547 --- /dev/null +++ b/templates/song.tex.erb @@ -0,0 +1,24 @@ +\documentclass{article} +\usepackage{graphicx} +\usepackage{alltt} + +\title{<%= song.title %>} +\date{} + +\begin{document} + +\maketitle + +\begin{alltt} \rmfamily +<%= song.lyrics %> +\end{alltt} + +<%- p "tmp sheet file: #{tmp(song_sheet_pdf song.id)}" -%> +<%- if File.file? tmp(song_sheet_pdf song.id) -%> +\begin{figure} + \centering + \includegraphics[width=\textwidth]{<%= tmp(song_sheet_pdf song.id) %>} +\end{figure} +<%- end -%> + +\end{document} diff --git a/templates/tag.html.erb b/templates/tag.html.erb new file mode 100644 index 0000000..829be5d --- /dev/null +++ b/templates/tag.html.erb @@ -0,0 +1,9 @@ +

<%= tag %>

+