Automatically create new template details XML file

This commit is contained in:
Christian Wolf 2022-04-04 14:01:18 +02:00
parent f809bbff20
commit 2ba77e7a9e
3 changed files with 110 additions and 1 deletions

View File

@ -19,7 +19,7 @@ npm:
cd slt; npm run sass
.PHONY: slt.tar.gz
slt.tar.gz: npm
slt.tar.gz: npm slt/templateDetails.xml
# cd slt ; tar czf ../$@ *
tar czf $@ -C slt \
css/dynamic-styles.css.php css/index.html css/style.css css/.htaccess \
@ -34,6 +34,10 @@ slt.tar.gz: npm
template_thumbnail.png \
templateDetails.xml
.PHONY: slt/templateDetails.xml
slt/templateDetails.xml:
./scripts/create-details-xml.sh
.PHONY: release
release: slt.tar.gz
./scripts/create-release.sh

View File

@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.6//DTD template 1.0//EN" "http://www.joomla.org/xml/dtd/1.6/template-install.dtd">
<!-- MUSS Seit Joomla 1.6 ist der Installer universell. Also wichtig, version="2.5" type="template" client="site" angeben -->
<extension
version="3.0"
method="upgrade"
type="template"
client="site">
<!-- SOLLTE, Der Annzeige-Name in Joomla -->
<name>SLT</name>
<title>Template des Saarländischen Landesverbands für Tanzsport e.V.</title>
<creationDate>${DATE}</creationDate>
<version>${VERSION}</version>
<author>Christian Wolf</author>
<authorEmail>homepage@slt.wolf-stuttgart.net</authorEmail>
<authorUrl>https://git.christian-wolf.click/slt/template</authorUrl>
<!-- SOLLTE, Die Template-Beschreibung wird hier als Joomla language mit einem Platzhalter versehen. In diesem Template-Ordner befindet sich die Sprachdatei in der TPL_TEST_TEMPLATE_XML_DESCRIPTION hinterlegt ist -->
<!--<description>TPL_TEST_TEMPLATE_XML_DESCRIPTION</description>-->
<files>
<folder>css</folder>
<folder>images</folder>
<folder>language</folder>
<folder>js</folder>
<folder>html</folder>
<filename>index.php</filename>
<filename>index.html</filename>
<filename>favicon.ico</filename>
<filename>templateDetails.xml</filename>
<filename>template_preview.png</filename>
<filename>template_thumbnail.png</filename>
<!-- SOLLTE, in dieser Datei kann eine individuelle Fehlerseite erstellt werden (404) -->
<!--<filename>error.php</filename>-->
</files>
<positions>
<position>topmenu</position>
<position>slideshow</position>
<position>mobile_menu</position>
<position>left_menu</position>
<position>footline</position>
<position>impressum</position>
<position>footer</position>
<position>current_page_menu</position>
</positions>
<!--Sollte, Sollten unterschiedliche Sprachen genutzt werden, ist hier der richtige Platz um diese zu installieren-->
<!--<languages folder="language">
<language tag="de-DE">de-DE/de-DE.tpl_test_template.sys.ini</language>
<language tag="de-DE">de-DE/de-DE.tpl_test_template.ini</language>
<language tag="de-DE">en-GB/en-GB.tpl_test_template.sys.ini</language>
<language tag="de-DE">en-GB/en-GB.tpl_test_template.ini</language>
</languages>-->
<!-- Parameter Block start -->
<config>
<fields name="params">
<fieldset name="advanced">
<field name="titlepage" type="list" default="0" label="Switch to titlepage mode" description="">
<option value="0">No</option>
<option value="1">Yes</option>
</field>
</fieldset>
<fieldset name='TPL_SLT_COLORS_TOPMENU'>
<field name="topfgcolor1" type='color' default='#fff' label='TPL_SLT_FOREGROUND_COLOR_TOP'></field>
<field name="topbgcolor1" type='color' default='#000' label='TPL_SLT_BACKGROUND_COLOR_TOP'></field>
<field name="topfgcolor2" type='color' default='#000' label='TPL_SLT_FOREGROUND_COLOR_TOP_DARK'></field>
<field name="topbgcolor2" type='color' default='#bbb' label='TPL_SLT_BACKGROUND_COLOR_TOP_DARK'></field>
<field name="topfgcolor3" type='color' default='#000' label='TPL_SLT_FOREGROUND_COLOR_TOP_LIGHT'></field>
<field name="topbgcolor3" type='color' default='#ddd' label='TPL_SLT_BACKGROUND_COLOR_TOP_LIGHT'></field>
</fieldset>
<fieldset name='TPL_SLT_COLORS_MAIN'>
<!--<field name="fgcolor1" type='color' default='#fff' label='TPL_SLT_FOREGROUND_COLOR_1'></field>-->
<field name="mainfgcolor" type='color' default='#000' label='TPL_SLT_FOREGROUND_COLOR_MAIN'></field>
<field name="mainlicolor" type='color' default='#222' label='TPL_SLT_LINK_COLOR_MAIN'></field>
<field name="mainbgcolortop" type='color' default='#ddd' label='TPL_SLT_BACKGROUND_COLOR_MAIN_TOP'></field>
<field name="mainbgcolorbot" type='color' default='#fff' label='TPL_SLT_BACKGROUND_COLOR_MAIN_BOTTOM'></field>
<field name="fgcolor1" type='color' default='#000' label='TPL_SLT_FOREGROUND_COLOR_1'></field>
<field name="licolor1" type='color' default='#222' label='TPL_SLT_LINK_COLOR_1'></field>
<field name="bgcolor1" type='color' default='#ddd' label='TPL_SLT_BACKGROUND_COLOR_1' format='rgba'></field>
<field name="fgcolor2" type='color' default='#000' label='TPL_SLT_FOREGROUND_COLOR_2'></field>
<field name="licolor2" type='color' default='#222' label='TPL_SLT_LINK_COLOR_2'></field>
<field name="bgcolor2" type='color' default='#bbb' label='TPL_SLT_BACKGROUND_COLOR_2' format='rgba'></field>
<field name="fgcolor3" type='color' default='#000' label='TPL_SLT_FOREGROUND_COLOR_3'></field>
<field name="licolor3" type='color' default='#222' label='TPL_SLT_LINK_COLOR_3'></field>
<field name="bgcolor3" type='color' default='#888' label='TPL_SLT_BACKGROUND_COLOR_3' format='rgba'></field>
<field name="bgcolorside" type='color' default='#ebebeb' label='TPL_SLT_BACKGROUND_COLOR_AT_SIDES'></field>
<field name="imgleft" type='media' directory='' label='TPL_SLT_LEFT_BACKGROUND_IMAGE'></field>
<field name="imgright" type='media' directory='' label='TPL_SLT_RIGHT_BACKGROUND_IMAGE'></field>
</fieldset>
</fields>
</config>
<!-- Parameter Block ende -->
<updateservers>
<server type="extension" name="SLT Update Site of Christian Wolf" priority="1">http://slt.wolf-stuttgart.net/update/template/slt-update.xml</server>
</updateservers>
</extension>

10
scripts/create-details-xml.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
MAJOR=`cat serial/major`
MINOR=`cat serial/minor`
RELEASE=`cat serial/release`
export DATE=`date '+%Y-%m-%d'`
export VERSION="$MAJOR.$MINOR.$RELEASE"
cat res/templateDetails.tmpl.xml | envsubst > slt/templateDetails.xml