From 4cfcc4888f0d6ec2ff850c6016e5aa991d47a9ce Mon Sep 17 00:00:00 2001 From: Pelle Nilsson Date: Tue, 18 Jun 2013 22:21:29 +0200 Subject: [PATCH] Counters. --- Makefile | 6 +- examples/counters.gamebook | 24 ++++++ expected/codewords.html | 9 ++- expected/counters.debug | 19 +++++ expected/counters.dot | 13 +++ expected/counters.html | 111 ++++++++++++++++++++++++++ expected/counters.rtf | 62 ++++++++++++++ expected/counters.tex | 83 +++++++++++++++++++ expected/counters.txt | 26 ++++++ expected/format.html | 9 ++- expected/items.html | 9 ++- expected/references.html | 9 ++- expected/unreachable.html | 9 ++- expected/withdemo.html | 9 ++- expected/withoutdemo.html | 9 ++- gamebookformat.css | 7 ++ gamebookformatplay.js | 110 +++++++++++++++++++++++-- output.py | 12 ++- templates/DEFAULT/death.txt | 1 + templates/DEFAULT/dec.txt | 1 + templates/DEFAULT/inc.txt | 1 + templates/DEFAULT/min.txt | 1 + templates/DEFAULT/set.txt | 1 + templates/debug/count.debug | 1 + templates/debug/dec.debug | 1 + templates/debug/inc.debug | 1 + templates/debug/min.debug | 1 + templates/debug/set.debug | 1 + templates/html/count.html | 2 + templates/html/counters.html | 2 + templates/html/countertemplate.html | 5 ++ templates/html/dec.html | 2 + templates/html/end.html | 2 + templates/html/inc.html | 2 + templates/html/min.html | 2 + templates/html/set.html | 2 + templates/rtf/introsectionheading.rtf | 1 + todo.org | 6 +- 38 files changed, 551 insertions(+), 21 deletions(-) create mode 100644 examples/counters.gamebook create mode 100644 expected/counters.debug create mode 100644 expected/counters.dot create mode 100644 expected/counters.html create mode 100644 expected/counters.rtf create mode 100644 expected/counters.tex create mode 100644 expected/counters.txt create mode 100644 templates/DEFAULT/death.txt create mode 100644 templates/DEFAULT/dec.txt create mode 100644 templates/DEFAULT/inc.txt create mode 100644 templates/DEFAULT/min.txt create mode 100644 templates/DEFAULT/set.txt create mode 100644 templates/debug/count.debug create mode 100644 templates/debug/dec.debug create mode 100644 templates/debug/inc.debug create mode 100644 templates/debug/min.debug create mode 100644 templates/debug/set.debug create mode 100644 templates/html/count.html create mode 100644 templates/html/counters.html create mode 100644 templates/html/countertemplate.html create mode 100644 templates/html/dec.html create mode 100644 templates/html/inc.html create mode 100644 templates/html/min.html create mode 100644 templates/html/set.html diff --git a/Makefile b/Makefile index 897ea73..891d5db 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,10 @@ uploadto=$(shell cat .uploadto) readme.html: readme.org emacs -Q --batch --visit=readme.org --funcall org-export-as-html-batch -examples/gamebookformatplay.js: +examples/gamebookformatplay.js: gamebookformatplay.js cp gamebookformatplay.js $@ -examples/gamebookformat.css: +examples/gamebookformat.css: gamebookformat.css cp gamebookformat.css $@ %.rtf: %.gamebook *.py templates/rtf/*.rtf @@ -57,7 +57,7 @@ expected: all checkexpected: clean rtf tex html debug dot txt diff -r -x "*.aux" -x "*.gamebook" -x "*.log" -x "*.out" -x "*.png" \ -x "*.pdf" -x .gitignore -x "*.js" -x "*.css" \ - -q examples expected + -x "*.options" -q examples expected unittests=$(wildcard test_*.py) diff --git a/examples/counters.gamebook b/examples/counters.gamebook new file mode 100644 index 0000000..09b4ab4 --- /dev/null +++ b/examples/counters.gamebook @@ -0,0 +1,24 @@ +title = Counters Example += Introduction +This example gamebook shows how to use counters. +* 1 start +This is where the gamebook starts. +We have counters for [count life]Life Points[/count] and for +[count gold]Gold[/count]. You start the adventure with +[set life]10[/set] and [set gold]12[/set]. +You can never have less than [min gold]0[/min]. FIXME need to +figure out best syntax for death when life points go below 1. +Go to [[getgold]] to get more Gold or [[dangerous]] to lose some Life Points. + +* getgold +Congratulations, you found [inc gold]2[/gold]. +You can go to [[dangerous]] to lose some life or to [[losegold]] to drop +some gold. + +* dangerous +You lose [dec life]1[/dec]. +You can go to [[getgold]] to get some Gold. + +* losegold +You drop [dec gold]5[/dec]. It should not be possible to +go below 0. Then go on to get gold at [[getgold]] or lose life at [[dangerous]]. diff --git a/expected/codewords.html b/expected/codewords.html index 9f78db1..78fef0c 100644 --- a/expected/codewords.html +++ b/expected/codewords.html @@ -123,7 +123,14 @@ if (this.gamebook) { if (this.gamebook) { gamebook.addSection(9, document.getElementById('section9')); } -
+
+
+
+ + +
+
+
diff --git a/expected/counters.debug b/expected/counters.debug new file mode 100644 index 0000000..2d17c54 --- /dev/null +++ b/expected/counters.debug @@ -0,0 +1,19 @@ +BEGIN DEBUG OUTPUT +Book title: Counters Example +Number of sections: 4 +Introduction + This example gamebook shows how to use counters. + + +Turn to 1 to begin. +1 (start) - This is where the gamebook starts. We have counters for Life Points and for Gold. You start the adventure with 10 Life Points + and 12 Gold +. You can never have less than 0 Gold +. FIXME need to figure out best syntax for death when life points go below 1. Go to 4 to get more Gold or 3 to lose some Life Points. +2 (losegold) - You drop 5 Gold +. It should not be possible to go below 0. Then go on to get gold at 4 or lose life at 3. +3 (dangerous) - You lose 1 Life Points +. You can go to 4 to get some Gold. +4 (getgold) - Congratulations, you found 2 Gold +. You can go to 3 to lose some life or to 2 to drop some gold. +END DEBUG OUTPUT diff --git a/expected/counters.dot b/expected/counters.dot new file mode 100644 index 0000000..fa7663d --- /dev/null +++ b/expected/counters.dot @@ -0,0 +1,13 @@ +digraph gamebook { + + 1->3 + +1->4 +2->4 + +2->3 +3->4 +4->2 + +4->3 +} diff --git a/expected/counters.html b/expected/counters.html new file mode 100644 index 0000000..abea302 --- /dev/null +++ b/expected/counters.html @@ -0,0 +1,111 @@ + + + + + + Counters Example + + + + + + +
+
+
Introduction
+
+ This example gamebook shows how to use counters. +
+
+ + + + + +
+
1
+
+ This is where the gamebook starts. We have counters for Life Points and for Gold. You start the adventure with 10 Life Points and 12 Gold. You can never have less than 0 Gold +. FIXME need to figure out best syntax for death when life points go below 1. Go to 4 to get more Gold or 3 to lose some Life Points. +
+
+
+
2
+
+ You drop 5 Gold. It should not be possible to go below 0. Then go on to get gold at 4 or lose life at 3. +
+
+
+
3
+
+ You lose 1 Life Points. You can go to 4 to get some Gold. +
+
+
+
4
+
+ Congratulations, you found 2 Gold. You can go to 3 to lose some life or to 2 to drop some gold. +
+
+
+
+
+ + +
+
+
+
+
+ + +
+
+ + + + + diff --git a/expected/counters.rtf b/expected/counters.rtf new file mode 100644 index 0000000..358bda6 --- /dev/null +++ b/expected/counters.rtf @@ -0,0 +1,62 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw11900\paperh16840\margl1440\margr1440\vieww14140\viewh14860\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural + +\f0\b\fs24 \cf0 + +\b \qc Counters Example +\b0\ +\b \qc Introduction +\b0\ + + + +\ql This example gamebook shows how to use counters. \ +\ + +\b Turn to 1 to begin. +\b0\ +\ +\b \qc 1 +\b0\ +\ql This is where the gamebook starts. We have counters for Life Points and for Gold. You start the adventure with 10 Life Points + and 12 Gold +. You can never have less than 0 Gold +. FIXME need to figure out best syntax for death when life points go below 1. Go to \b 4 +\b0 + to get more Gold or \b 3 +\b0 + to lose some Life Points. \ +\ + +\b \qc 2 +\b0\ +\ql You drop 5 Gold +. It should not be possible to go below 0. Then go on to get gold at \b 4 +\b0 + or lose life at \b 3 +\b0 +. \ +\ + +\b \qc 3 +\b0\ +\ql You lose 1 Life Points +. You can go to \b 4 +\b0 + to get some Gold. \ +\ + +\b \qc 4 +\b0\ +\ql Congratulations, you found 2 Gold +. You can go to \b 3 +\b0 + to lose some life or to \b 2 +\b0 + to drop some gold. \ +\ + +} diff --git a/expected/counters.tex b/expected/counters.tex new file mode 100644 index 0000000..5db329c --- /dev/null +++ b/expected/counters.tex @@ -0,0 +1,83 @@ +\documentclass[a5paper,onecolumn]{book} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[hidelinks]{hyperref} +\usepackage{graphicx} + +\usepackage[top=3.3cm, bottom=3.3cm, left=2cm, right=2cm]{geometry} +\newif\ifpdf +\ifx\pdfoutput\undefined + \pdffalse +\else + \ifnum\pdfoutput=1 + \pdftrue + \else + \pdffalse + \fi +\fi + +\title{Counters Example} +\author{} +\date{} + +\newcounter{sectionnr} + +\begin{document} + +\maketitle + +\thispagestyle{empty} + +\pagestyle{empty} + +\clearpage + +\subsection*{\begin{center} \textbf{Introduction} \end{center}} + + + \noindent + This example gamebook shows how to use counters. +\vspace{1em} + + +Turn to 1 to begin. +\phantomsection +\refstepcounter{sectionnr} +\label{section1} +\subsection*{\begin{center} \textbf{1} \end{center}} + + \noindent + This is where the gamebook starts. We have counters for Life Points and for Gold. You start the adventure with 10 Life Points + and 12 Gold +. You can never have less than 0 Gold +. FIXME need to figure out best syntax for death when life points go below 1. Go to \textbf{\autoref{section4}} to get more Gold or \textbf{\autoref{section3}} to lose some Life Points. +\vspace{1em} +\phantomsection +\refstepcounter{sectionnr} +\label{section2} +\subsection*{\begin{center} \textbf{2} \end{center}} + + \noindent + You drop 5 Gold +. It should not be possible to go below 0. Then go on to get gold at \textbf{\autoref{section4}} or lose life at \textbf{\autoref{section3}}. +\vspace{1em} +\phantomsection +\refstepcounter{sectionnr} +\label{section3} +\subsection*{\begin{center} \textbf{3} \end{center}} + + \noindent + You lose 1 Life Points +. You can go to \textbf{\autoref{section4}} to get some Gold. +\vspace{1em} +\phantomsection +\refstepcounter{sectionnr} +\label{section4} +\subsection*{\begin{center} \textbf{4} \end{center}} + + \noindent + Congratulations, you found 2 Gold +. You can go to \textbf{\autoref{section3}} to lose some life or to \textbf{\autoref{section2}} to drop some gold. +\vspace{1em} +\end{document} diff --git a/expected/counters.txt b/expected/counters.txt new file mode 100644 index 0000000..1bc22b3 --- /dev/null +++ b/expected/counters.txt @@ -0,0 +1,26 @@ + Counters Example + +Introduction + This example gamebook shows how to use counters. + + + +Turn to 1 to begin. +1 + This is where the gamebook starts. We have counters for Life Points and for Gold. You start the adventure with 10 Life Points + and 12 Gold +. You can never have less than 0 Gold +. FIXME need to figure out best syntax for death when life points go below 1. Go to 4 to get more Gold or 3 to lose some Life Points. + +2 + You drop 5 Gold +. It should not be possible to go below 0. Then go on to get gold at 4 or lose life at 3. + +3 + You lose 1 Life Points +. You can go to 4 to get some Gold. + +4 + Congratulations, you found 2 Gold +. You can go to 3 to lose some life or to 2 to drop some gold. + diff --git a/expected/format.html b/expected/format.html index f9eb8af..f1e9576 100644 --- a/expected/format.html +++ b/expected/format.html @@ -72,7 +72,14 @@ if (this.gamebook) { if (this.gamebook) { gamebook.addSection(3, document.getElementById('section3')); } -
+
+
+
+ + +
+
+
diff --git a/expected/items.html b/expected/items.html index dbcc1ea..00d5a9b 100644 --- a/expected/items.html +++ b/expected/items.html @@ -158,7 +158,14 @@ if (this.gamebook) { if (this.gamebook) { gamebook.addSection(11, document.getElementById('section11')); } -
+
+
+
+ + +
+
+
diff --git a/expected/references.html b/expected/references.html index 3a53ff3..0d3abc2 100644 --- a/expected/references.html +++ b/expected/references.html @@ -86,7 +86,14 @@ if (this.gamebook) { if (this.gamebook) { gamebook.addSection(400, document.getElementById('section400')); } -
+
+
+
+ + +
+
+
diff --git a/expected/unreachable.html b/expected/unreachable.html index 8fa7cc8..23fcb04 100644 --- a/expected/unreachable.html +++ b/expected/unreachable.html @@ -80,7 +80,14 @@ if (this.gamebook) { if (this.gamebook) { gamebook.addSection(6, document.getElementById('section6')); } -
+
+
+
+ + +
+
+
diff --git a/expected/withdemo.html b/expected/withdemo.html index 39d508e..81ffc67 100644 --- a/expected/withdemo.html +++ b/expected/withdemo.html @@ -80,7 +80,14 @@ if (this.gamebook) { if (this.gamebook) { gamebook.addSection(5, document.getElementById('section5')); } -
+
+
+
+ + +
+
+
diff --git a/expected/withoutdemo.html b/expected/withoutdemo.html index 5714c53..ba768fa 100644 --- a/expected/withoutdemo.html +++ b/expected/withoutdemo.html @@ -110,7 +110,14 @@ if (this.gamebook) { if (this.gamebook) { gamebook.addSection(8, document.getElementById('section8')); } -
+
+
+
+ + +
+
+
diff --git a/gamebookformat.css b/gamebookformat.css index a4da120..e7996ab 100644 --- a/gamebookformat.css +++ b/gamebookformat.css @@ -32,12 +32,19 @@ .collectionheading {} .collectionheading::after {content: ": ";} .collectioncontents {} +.counters {margin-top: 4em;} +.counter {background: #eee;} +.counterheading {} +.counterheading::after {content: ": ";} +.countercontents {} .collect {} .add {font-weight: bold;} .drop {font-style: italic;} .has {font-style: italic;} .hasnot {font-style: italic;} .collectionTemplate {display: none;} +.counterTemplate {display: none;} .sectionimage {width: 100%; padding: 1em;} .nodisplay {display: none;} .resumenr {font-weight: bold;} +.counterChange {font-weight: bold;} \ No newline at end of file diff --git a/gamebookformatplay.js b/gamebookformatplay.js index 2929504..ce4175c 100644 --- a/gamebookformatplay.js +++ b/gamebookformatplay.js @@ -3,6 +3,7 @@ var gamebook = { 'started' : false, 'currentSection' : -1, 'collections' : {}, + counters : {}, 'collect' : function(type, name) { if (type in this.collections) { @@ -33,6 +34,37 @@ var gamebook = { gamebook.addCollectionView(type, name); }, + count : function(type, name) { + if (type in this.counters) { + return; + }; + this.counters[type] = { + name : name, + value : 0, + minValue : null, //no minimum set + inc : function(amount) { + this.value += amount; + }, + dec : function(amount) { + this.value -= amount; + this.ensureNotBelowMin(); + }, + set : function(value) { + this.value = value; + this.ensureNotBelowMin(); + }, + min : function(limit) { + this.minValue = limit; + }, + ensureNotBelowMin : function() { + if (this.minValue !== null && this.value < this.minValue) { + this.value = this.minValue; + } + } + }; + gamebook.addCounterView(type, name); + }, + 'add' : function(type, what) { this.collections[type].add(what); gamebook.updateCollectionsView(); @@ -47,10 +79,30 @@ var gamebook = { return this.collections[type].has(what); }, + inc : function(type, amount) { + this.counters[type].inc(amount); + gamebook.updateCountersView(); + }, + + dec : function(type, amount) { + this.counters[type].dec(amount); + gamebook.updateCountersView(); + }, + + min : function(type, limit) { + this.counters[type].min(limit); + }, + + set : function(type, amount) { + this.counters[type].set(amount); + gamebook.updateCountersView(); + }, + 'getState' : function() { return JSON.stringify({ 'collections' : this.collections, - 'currentSection' : this.currentSection + 'currentSection' : this.currentSection, + 'counters' : this.counters }); }, @@ -67,6 +119,16 @@ var gamebook = { this.collections[c].contents = collection.contents; this.collections[c].dropped = collection.dropped; } + for (var c in parsedState.counters) { + var counter = parsedState.counters[c]; + if (c in this.counters) { + this.counters[c].name = counter.name; + } else { + this.count(c, counter.name); + } + this.counters[c].minValue = counter.minValue; + this.counters[c].value = counter.value; + } } }, @@ -102,11 +164,11 @@ var gamebook = { var section = this.sections[this.player.currentSection]; section.element.style.display = 'none'; } + this.player.currentSection = nr; + this.saveGame(); var e = this.sections[nr].element; this.runActions(e.getElementsByClassName('sectiontext')[0]); e.style.display = 'block'; - this.player.currentSection = nr; - this.saveGame(); }, //FIXME move out from gamebook object @@ -204,6 +266,20 @@ var gamebook = { gamebook.player.add(c.dataset.type, c.dataset.what); } else if (c.classList.contains('drop')) { gamebook.player.drop(c.dataset.type, c.dataset.what); + } else if (c.classList.contains('count')) { + gamebook.player.count(c.dataset.type, c.dataset.name); + } else if (c.classList.contains('set')) { + gamebook.player.set(c.dataset.type, + parseInt(c.dataset.amount)); + } else if (c.classList.contains('inc')) { + gamebook.player.inc(c.dataset.type, + parseInt(c.dataset.amount)); + } else if (c.classList.contains('dec')) { + gamebook.player.dec(c.dataset.type, + parseInt(c.dataset.amount)); + } else if (c.classList.contains('min')) { + gamebook.player.min(c.dataset.type, + parseInt(c.dataset.limit)); } else if (c.classList.contains('has')) { enableNextLink = gamebook.player.has(c.dataset.type, c.dataset.what); @@ -260,11 +336,19 @@ var gamebook = { }, 'addCollectionView' : function(type, name) { - var ce = document.getElementById('collections'); - var template = document.getElementById('collectionTemplate'); + this.addView('collection', type, name); + }, + + addCounterView : function(type, name) { + this.addView('counter', type, name); + }, + + addView : function(view, type, name) { + var ce = document.getElementById(view + 's'); + var template = document.getElementById(view + 'Template'); var e = template.cloneNode(true); - e.className = "collection"; - e.getElementsByClassName('collectionheading')[0].innerHTML = name; + e.className = view; + e.getElementsByClassName(view + 'heading')[0].innerHTML = name; e.dataset.type = type; ce.appendChild(e); }, @@ -281,6 +365,18 @@ var gamebook = { }); }, + 'updateCountersView' : function() { + var ce = document.getElementById('counters'); + Array.prototype.forEach.call(ce.childNodes, function(c) { + if (c.className === 'counter') { + var type = c.dataset.type; + var counter = gamebook.player.counters[type]; + var cc = c.getElementsByClassName('countercontents')[0]; + cc.innerHTML = counter.value; + } + }); + }, + 'getTurnToFunction' : function(nr) { if (nr in this.turnToFunctions) { return this.turnToFunctions[nr]; diff --git a/output.py b/output.py index 57f55b1..3a83853 100644 --- a/output.py +++ b/output.py @@ -2,11 +2,15 @@ import os import os.path import sys +COUNTER_CREATE_TAG = 'count' +COUNTER_USE_TAGS = set(['set', 'inc', 'dec', 'min']) + class OutputFormat (object): "Handles book output. Big FIXME required to make sense." def __init__(self, templates, quote): self.templates = templates self.quote = quote + self.counter_names = {} def format_begin(self, bookconfig): # FIXME make sure book config is properly quoted @@ -99,9 +103,15 @@ class OutputFormat (object): tag, self.name)) inner = section.text[tag_end+1:end_tag_start] # FIXME this pollutes the mutable references object - references['inner'] = self.quote(self.quote(inner)) + references['inner'] = self.quote(inner) for i, arg in enumerate(tagparts[1:]): references['arg%d' % (i+1)] = self.quote(arg) + if tagname == COUNTER_CREATE_TAG and len(tagparts) > 1: + self.counter_names[tagparts[1]] = self.quote(inner) + references['counter'] = self.quote(inner) + elif tagname in COUNTER_USE_TAGS and len(tagparts) > 1: + if tagparts[1] in self.counter_names: + references['counter'] = self.counter_names[tagparts[1]] f = self.format_with_template(tagname, references) if len(f) > 0: diff --git a/templates/DEFAULT/death.txt b/templates/DEFAULT/death.txt new file mode 100644 index 0000000..098b9d5 --- /dev/null +++ b/templates/DEFAULT/death.txt @@ -0,0 +1 @@ +%(inner)s %(counter)s diff --git a/templates/DEFAULT/dec.txt b/templates/DEFAULT/dec.txt new file mode 100644 index 0000000..098b9d5 --- /dev/null +++ b/templates/DEFAULT/dec.txt @@ -0,0 +1 @@ +%(inner)s %(counter)s diff --git a/templates/DEFAULT/inc.txt b/templates/DEFAULT/inc.txt new file mode 100644 index 0000000..098b9d5 --- /dev/null +++ b/templates/DEFAULT/inc.txt @@ -0,0 +1 @@ +%(inner)s %(counter)s diff --git a/templates/DEFAULT/min.txt b/templates/DEFAULT/min.txt new file mode 100644 index 0000000..098b9d5 --- /dev/null +++ b/templates/DEFAULT/min.txt @@ -0,0 +1 @@ +%(inner)s %(counter)s diff --git a/templates/DEFAULT/set.txt b/templates/DEFAULT/set.txt new file mode 100644 index 0000000..098b9d5 --- /dev/null +++ b/templates/DEFAULT/set.txt @@ -0,0 +1 @@ +%(inner)s %(counter)s diff --git a/templates/debug/count.debug b/templates/debug/count.debug new file mode 100644 index 0000000..2bf9972 --- /dev/null +++ b/templates/debug/count.debug @@ -0,0 +1 @@ +[COUNT %(arg1)s]%(inner)s[/COUNT] \ No newline at end of file diff --git a/templates/debug/dec.debug b/templates/debug/dec.debug new file mode 100644 index 0000000..b3604d0 --- /dev/null +++ b/templates/debug/dec.debug @@ -0,0 +1 @@ +[DEC %(arg1)s]%(inner)s[/DEC] \ No newline at end of file diff --git a/templates/debug/inc.debug b/templates/debug/inc.debug new file mode 100644 index 0000000..1d62680 --- /dev/null +++ b/templates/debug/inc.debug @@ -0,0 +1 @@ +[INC %(arg1)s]%(inner)s[/INC] \ No newline at end of file diff --git a/templates/debug/min.debug b/templates/debug/min.debug new file mode 100644 index 0000000..02e381f --- /dev/null +++ b/templates/debug/min.debug @@ -0,0 +1 @@ +[MIN %(arg1)s]%(inner)s[/MIN] \ No newline at end of file diff --git a/templates/debug/set.debug b/templates/debug/set.debug new file mode 100644 index 0000000..adaff1b --- /dev/null +++ b/templates/debug/set.debug @@ -0,0 +1 @@ +[SET %(arg1)s]%(inner)s[/SET] \ No newline at end of file diff --git a/templates/html/count.html b/templates/html/count.html new file mode 100644 index 0000000..c5b6c0c --- /dev/null +++ b/templates/html/count.html @@ -0,0 +1,2 @@ +%(inner)s \ No newline at end of file diff --git a/templates/html/counters.html b/templates/html/counters.html new file mode 100644 index 0000000..2312e58 --- /dev/null +++ b/templates/html/counters.html @@ -0,0 +1,2 @@ +
+
diff --git a/templates/html/countertemplate.html b/templates/html/countertemplate.html new file mode 100644 index 0000000..ac6d0c2 --- /dev/null +++ b/templates/html/countertemplate.html @@ -0,0 +1,5 @@ +
+ + +
+
diff --git a/templates/html/dec.html b/templates/html/dec.html new file mode 100644 index 0000000..9b9a1e5 --- /dev/null +++ b/templates/html/dec.html @@ -0,0 +1,2 @@ +%(inner)s %(counter)s \ No newline at end of file diff --git a/templates/html/end.html b/templates/html/end.html index e8cf2e3..aca877b 100644 --- a/templates/html/end.html +++ b/templates/html/end.html @@ -1,3 +1,5 @@ +#include "counters" +#include "countertemplate" #include "collections" #include "collectiontemplate"