aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorGeorg Gadinger <nilsding@nilsding.org>2021-04-16 19:38:16 +0200
committerGeorg Gadinger <nilsding@nilsding.org>2021-04-16 19:42:18 +0200
commit3f1b7213af69fa8d8426294de512686d7b8e9c38 (patch)
tree5adfb0d47e8f56959897bc4ac33ba57da26b94b2 /templates
downloadrockbox-theme-ipawbmini-3f1b7213af69fa8d8426294de512686d7b8e9c38.tar.gz
rockbox-theme-ipawbmini-3f1b7213af69fa8d8426294de512686d7b8e9c38.tar.bz2
rockbox-theme-ipawbmini-3f1b7213af69fa8d8426294de512686d7b8e9c38.zip
Initial commit
Diffstat (limited to 'templates')
-rw-r--r--templates/base.liquid73
-rw-r--r--templates/fms.liquid67
-rw-r--r--templates/sbs.liquid44
-rw-r--r--templates/wps.liquid77
4 files changed, 261 insertions, 0 deletions
diff --git a/templates/base.liquid b/templates/base.liquid
new file mode 100644
index 0000000..da4ad7d
--- /dev/null
+++ b/templates/base.liquid
@@ -0,0 +1,73 @@
+# {{ theme_name }} Rockbox theme
+# Generated using gen_theme.rb at {{ generated_at }}
+#
+# Theme made by Georg Gadinger <nilsding@nilsding.org> in 2021.
+# Licensed under CC BY-NC-SA
+
+# Disable status bar and clear backdrop
+%wd
+%X(d)
+
+####################
+# Fonts and images #
+####################
+%Fl(2,10-Espy Sans-Bold.fnt)
+{{- fonts }}
+
+%xl(battery,batt.bmp,0,0,16)
+%xl(battery_charging,battchrg.bmp,0,0,16)
+%xl(playmodes,playmodes.bmp,0,0,9)
+%xl(hold,hold.bmp,0,0)
+{{- images }}
+
+#############
+# Viewports #
+#############
+%Vd(playbackmode)
+%?if(%mh, =, h)<%Vd(hold_lock)|>
+%Vd(title)
+%?if(%St(battery display), =, numeric)<%Vd(batteryn)|%Vd(batteryg)>
+
+%Vd(topbar)
+{{- viewports }}
+
+#########################
+# Playback status icons #
+#########################
+%Vl(playbackmode,1,3,20,10,-)
+%xd(playmodes,%mp)
+
+########################
+# Lock for hold switch #
+########################
+%Vl(hold_lock,13,3,8,10,-)
+%xd(hold)
+
+##############
+# Menu title #
+##############
+%Vl(title,20,3,95,13,2)
+#%?if(%lh, =, h)<%HDD|>
+%ac%?Lt<%?if(%Lt, =, Rockbox)<{{ default_title | default: main_menu_title }}|%?if(%Lt, =, Database)<Music|%Lt>>|{{ default_title | default: main_menu_title }}>
+
+#######################
+# Battery (graphical) #
+#######################
+%Vl(batteryg,111,3,25,10,-)
+%?if(%bp, =, p)<%?if(%bl, >, 94)<%xd(battery_charging, 16)|%?if(%bl, >, 88)<%xd(battery_charging, 15)|%?if(%bl, >, 81)<%xd(battery_charging, 14)|%?if(%bl, >, 75)<%xd(battery_charging, 13)|%?if(%bl, >, 69)<%xd(battery_charging, 12)|%?if(%bl, >, 63)<%xd(battery_charging, 11)|%?if(%bl, >, 56)<%xd(battery_charging, 10)|%?if(%bl, >, 50)<%xd(battery_charging, 9)|%?if(%bl, >, 44)<%xd(battery_charging, 8)|%?if(%bl, >, 38)<%xd(battery_charging, 7)|%?if(%bl, >, 31)<%xd(battery_charging, 6)|%?if(%bl, >, 25)<%xd(battery_charging, 5)|%?if(%bl, >, 19)<%xd(battery_charging, 4)|%?if(%bl, >, 13)<%xd(battery_charging, 3)|%?if(%bl, >, 6)<%xd(battery_charging, 2)|%xd(battery_charging, 1)>>>>>>>>>>>>>>>|%?if(%bl, >, 94)<%xd(battery, 16)|%?if(%bl, >, 88)<%xd(battery, 15)|%?if(%bl, >, 81)<%xd(battery, 14)|%?if(%bl, >, 75)<%xd(battery, 13)|%?if(%bl, >, 69)<%xd(battery, 12)|%?if(%bl, >, 63)<%xd(battery, 11)|%?if(%bl, >, 56)<%xd(battery, 10)|%?if(%bl, >, 50)<%xd(battery, 9)|%?if(%bl, >, 44)<%xd(battery, 8)|%?if(%bl, >, 38)<%xd(battery, 7)|%?if(%bl, >, 31)<%xd(battery, 6)|%?if(%bl, >, 25)<%xd(battery, 5)|%?if(%bl, >, 19)<%xd(battery, 4)|%?if(%bl, >, 13)<%xd(battery, 3)|%?if(%bl, >, 6)<%xd(battery, 2)|%xd(battery, 1)>>>>>>>>>>>>>>>>
+
+#######################
+# Battery (numerical) #
+#######################
+%Vl(batteryn,110,1,27,10,2)
+%ar%?if(%bc, =, c)<+|>%bl%%
+
+##########################
+# Top Bar Separator Line #
+##########################
+%Vl(topbar,0,17,138,1,-)
+%dr(0,0,138,1)
+
+## {{ filename }} starts below this line ##
+
+{{ content }}
diff --git a/templates/fms.liquid b/templates/fms.liquid
new file mode 100644
index 0000000..19d43db
--- /dev/null
+++ b/templates/fms.liquid
@@ -0,0 +1,67 @@
+{% capture fonts %}
+%Fl(3,09-Espy Sans-Bold.fnt)
+{% endcapture %}
+
+{% capture images %}
+%xl(pbs,progressbar_slider.bmp,0,0)
+{% endcapture %}
+
+{% capture viewports %}
+%Vd(metadata)
+%?mv<%Vd(volume)|%Vd(frequency)>
+{% endcapture %}
+
+{% capture default_title %}FM Radio{% endcapture %}
+
+#################
+# Preset number #
+#################
+%Vl(metadata,4,23,130,9,3)
+%al%?Ti<%Ti of %Tc|Scan mode>
+
+# Preset Name or RDS Name
+%Vl(metadata,0,44,138,12,-)
+%s%ac%?Tn<%Tn|%?ty<%ty|%tf MHz>>
+
+# RDS Text
+%Vl(metadata,0,60,138,12,-)
+%s%ac%?tz<%tz|...no RDS info...>
+
+###################
+# Frequency + bar #
+###################
+# the value
+%Vl(frequency,4,98,129,10,2)
+%al%tf MHz%ar%?ts<Stereo|Mono>
+# the bar, borders drawn by hand to avoid flickering
+%Vl(frequency,4,85,129,11,-)
+# x = 6 (+ 4 _2_); y = 85
+%dr(2, 0, 125, 1)
+%dr(1, 1, 1, 1)
+%dr(127, 1, 1, 1)
+%dr(0, 2, 1, 7)
+%dr(128, 2, 1, 7)
+%dr(1, 9, 1, 1)
+%dr(127, 9, 1, 1)
+%dr(2, 10, 125, 1)
+%Vl(frequency,6,87,125,7,-)
+%pb(0,0,-,-,nobar,nofill,slider,pbs)
+
+#######################
+# Volume + volume bar #
+#######################
+# the value
+%Vl(volume,4,98,129,10,2)
+%ac%?if(%pv, >, 0)<+|>%pvdB
+# the bar, borders drawn by hand to avoid flickering
+%Vl(volume,4,85,129,11,-)
+%dr(2, 0, 125, 1)
+%dr(1, 1, 1, 1)
+%dr(127, 1, 1, 1)
+%dr(0, 2, 1, 7)
+%dr(128, 2, 1, 7)
+%dr(1, 9, 1, 1)
+%dr(127, 9, 1, 1)
+%dr(2, 10, 125, 1)
+%Vl(volume,6,87,125,7,-)
+%pv(0,0,-,-,nobar,nofill,slider,pbs)
diff --git a/templates/sbs.liquid b/templates/sbs.liquid
new file mode 100644
index 0000000..117dc02
--- /dev/null
+++ b/templates/sbs.liquid
@@ -0,0 +1,44 @@
+{% capture images %}
+%xl(directory,directory.bmp,0,0,2)
+{% endcapture %}
+
+{% capture viewports %}
+# Always define scroll bar viewport as I have no idea how to properly resize the list items/main viewport.
+%Vd(scrollbar)
+{%- comment %}
+# maybe via something like that? list_[no]scroll would be the %Vi viewport ...
+#%?LB<%Vd(scrollbar)%Vd(list_scroll)|%Vd(list_noscroll)>
+{% endcomment %}
+{% endcapture %}
+
+###################################
+# Menus / Lists (including items) #
+###################################
+
+# Define list item viewport
+%Lb(item,138,18)
+# TODO: SCROLL BAR -- figure out how to make use of %?LB properly to show/hide it when required
+# Scroll bar - outer border
+%Vl(scrollbar,129,17,9,92,-)%Vf(0)%dr(0,0,-,-)
+# Scroll bar - inner border
+%Vl(scrollbar,130,18,7,90,-)%Vf(3)%dr(0,0,-,-)
+# Scroll bar - actual bar
+%Vl(scrollbar,131,19,5,88,-)%Vb(3)%Vf(0)
+%LB(-,-,-,-, invert, noborder, vertical)
+# Main list viewport
+%Vi(-,0,19,128,91,-)
+{%- comment %}
+#%Vl(list_scroll,0,19,128,91,-)
+#%Vi(list_scroll,0,19,128,91,-)
+#%Vl(list_noscroll,0,19,137,91,-)
+#%Vi(list_noscroll,0,19,137,91,-)
+{% endcomment %}
+# Rectangle around list item
+%Vl(item,0,0,128,18,-)%Vf(0)%Vb(0)
+%?Lc<%dr(0,0,128,-)>
+# Draw directory arrow first, otherwise %s gets confused about it
+%Vl(item,114,5,12,9,-)
+%?if(%LI, >=, 0)<%?Lc<%xd(directory, 2)|%xd(directory, 1)>>
+# Position text inside list item (108 = 128 - 6(=x position) - 12(=width of > arrow) - 2(= to make it look nicer :-))
+%Vl(item,6,3,108,13,-)
+%?Lc<%Vs(invert)|%Vs(clear)>%s%?if(%cs, =, 1)<%?if(%LT, =, Database)<Music|%?if(%LT, =, Playlist Catalogue)<Playlists|%LT>>|%LT>
diff --git a/templates/wps.liquid b/templates/wps.liquid
new file mode 100644
index 0000000..3eafe21
--- /dev/null
+++ b/templates/wps.liquid
@@ -0,0 +1,77 @@
+{% capture fonts %}
+%Fl(3,09-Espy Sans-Bold.fnt)
+{% endcapture %}
+
+{% capture images %}
+%xl(pbbd,progressbar_backdrop.bmp,0,0)
+%xl(pbs,progressbar_slider.bmp,0,0)
+{% endcapture %}
+
+{% capture viewports %}
+%Vd(playlist_entry)
+# Viewport conditionals for album art (the `A` prefix is our indicator if the current track has some)
+%?C<%Vd(Ametadata)|%Vd(metadata)>
+%?C<%Vd(Aartist)|%Vd(artist)>
+# This one displays the volume slider if there is a change in volume, the track position otherwise
+%?mv<%Vd(volume)|%Vd(trackpos)>
+{% endcapture %}
+
+{% capture default_title %}Now playing{% endcapture %}
+
+#############
+# Album art #
+#############
+%ax%Vl(Ametadata,4,36,44,44,-)
+%Cl(0,0,44,44,c,c)
+%Cd
+
+##################
+# Playlist entry #
+##################
+%Vl(playlist_entry,4,23,130,9,3)
+%al%pp of %pe
+
+############################
+# Track title or file name #
+############################
+%Vl(Ametadata,52,44,82,12,-)
+%s%al%?it<%it|%fn>
+%Vl(metadata,0,44,138,12,-)
+%s%ac%?it<%it|%fn>
+
+##################
+# (Album) artist #
+##################
+%Vl(Aartist,52,60,82,12,-)
+%s%al%?ia<%ia|%?iA<%iA|Unknown Artist>>
+%Vl(artist,0,60,138,12,-)
+%s%ac%?ia<%ia|%?iA<%iA|Unknown Artist>>
+
+##################
+# Track position #
+##################
+# the value
+%Vl(trackpos,4,98,129,10,2)
+%al%pc%ar-%pr
+# the bar
+%Vl(trackpos,4,85,129,11,-)
+%pb(0,0,129,11,image,progressbar.bmp,backdrop,pbbd)
+
+#######################
+# Volume + volume bar #
+#######################
+# the value
+%Vl(volume,4,98,129,10,2)
+%ac%?if(%pv, >, 0)<+|>%pvdB
+# the bar, borders drawn by hand to avoid flickering
+%Vl(volume,4,85,129,11,-)
+%dr(2, 0, 125, 1)
+%dr(1, 1, 1, 1)
+%dr(127, 1, 1, 1)
+%dr(0, 2, 1, 7)
+%dr(128, 2, 1, 7)
+%dr(1, 9, 1, 1)
+%dr(127, 9, 1, 1)
+%dr(2, 10, 125, 1)
+%Vl(volume,6,87,125,7,-)
+%pv(0,0,-,-,nobar,nofill,slider,pbs)