From f290227150bb13c72c87012e20a9ff7959f31a5f Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Wed, 3 Jan 2007 18:22:47 +0000 Subject: Moved *.ecpp to pages and *.css to css subdir, added images dir --- Makefile | 28 ++++----------- channels.ecpp | 29 --------------- css/Makefile | 39 +++++++++++++++++++++ css/styles.css | 93 +++++++++++++++++++++++++++++++++++++++++++++++++ menu.ecpp | 7 ---- pages/Makefile | 51 +++++++++++++++++++++++++++ pages/channels.ecpp | 29 +++++++++++++++ pages/menu.ecpp | 7 ++++ pages/schedule.ecpp | 45 ++++++++++++++++++++++++ pages/whats_on_now.ecpp | 65 ++++++++++++++++++++++++++++++++++ schedule.ecpp | 45 ------------------------ styles.css | 93 ------------------------------------------------- whats_on_now.ecpp | 65 ---------------------------------- 13 files changed, 335 insertions(+), 261 deletions(-) delete mode 100644 channels.ecpp create mode 100644 css/Makefile create mode 100644 css/styles.css delete mode 100644 menu.ecpp create mode 100644 pages/Makefile create mode 100644 pages/channels.ecpp create mode 100644 pages/menu.ecpp create mode 100644 pages/schedule.ecpp create mode 100644 pages/whats_on_now.ecpp delete mode 100644 schedule.ecpp delete mode 100644 styles.css delete mode 100644 whats_on_now.ecpp diff --git a/Makefile b/Makefile index 6a71c4e..1cbb2c6 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile,v 1.12 2007/01/03 16:22:19 lordjaxom Exp $ +# $Id: Makefile,v 1.13 2007/01/03 18:22:47 tadi Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -51,14 +51,15 @@ INCLUDES += -I$(VDRDIR)/include -Ihttpd DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' LIBS += httpd/libhttpd.a -SUBDIRS = httpd +SUBDIRS = httpd pages ### The object files (add further files here): PLUGINOBJS = $(PLUGIN).o thread.o tntconfig.o setup.o i18n.o WEBOBJS = tools.o -WEBSITE = styles.o menu.o channels.o schedule.o whats_on_now.o +WEBLIBS = pages/libpages.a \ + css/libcss.a ### Default rules: @@ -71,21 +72,6 @@ all: SUBDIRS libvdr-$(PLUGIN).so libtnt-$(PLUGIN).so %.o: %.cpp $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< -%.cpp: %.ecpp - $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $< - -%.cpp: %.gif - $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_GIF) -b $< - -%.cpp: %.jpg - $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_JPG) -b $< - -%.cpp: %.css - $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b $< - -%.cpp: %.js - $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_JS) -b $< - # Dependencies: MAKEDEP = $(CXX) -MM -MG @@ -106,7 +92,7 @@ libvdr-$(PLUGIN).so: $(PLUGINOBJS) $(LIBS) $(CXX) $(LDFLAGS) -shared -o $@ $^ $(LIBS) @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -libtnt-$(PLUGIN).so: $(WEBOBJS) $(WEBSITE) +libtnt-$(PLUGIN).so: $(WEBOBJS) $(WEBLIBS) $(CXX) $(LDFLAGS) -shared -o $@ $^ @cp --remove-destination $@ $(LIBDIR)/$@ @@ -119,9 +105,7 @@ dist: clean @echo Distribution package created as $(PACKAGE).tgz clean: - @-rm -f $(PLUGINOBJS) $(WEBOBJS) $(WEBSITE) $(WEBSITE:%.o=%.cpp) $(DEPFILE) *.so *.tgz core* *~ + @-rm -f $(PLUGINOBJS) $(WEBOBJS) $(DEPFILE) *.so *.tgz core* *~ @for dir in $(SUBDIRS); do \ make -C $$dir clean ; \ done - - diff --git a/channels.ecpp b/channels.ecpp deleted file mode 100644 index aa48f03..0000000 --- a/channels.ecpp +++ /dev/null @@ -1,29 +0,0 @@ -<%pre> -#include -#include -#include - - - - <$ tr("channels") $> - - - -
-<{ - - for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { - if (!channel->GroupSep() && *channel->Name()) { -}> - -<{ - } - } - - -}> -
- - diff --git a/css/Makefile b/css/Makefile new file mode 100644 index 0000000..006548e --- /dev/null +++ b/css/Makefile @@ -0,0 +1,39 @@ +CXX ?= g++ +AR ?= ar +ECPPC ?= ecppc + +CXXFLAGS ?= -O2 -Woverloaded-virtual -Wall -fPIC + +CXXFLAGS += `tntnet-config --cxxflags` +LDFLAGS += `tntnet-config --libs` + +INCLUDES += -I.. + +### The directory environment: +VDRDIR ?= ../../../.. + +### The object files (add further files here): + +OBJS = styles.o + +### Default rules: + +.PHONY: all clean + +### Implicit rules: + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< + +%.cpp: %.css + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b $< + +### Targets: + +all: libcss.a + +libcss.a: $(OBJS) + $(AR) r $@ $^ + +clean: + @rm -f *~ *.o core* libcss.a $(OBJS:%.o=%.cpp) diff --git a/css/styles.css b/css/styles.css new file mode 100644 index 0000000..e3df546 --- /dev/null +++ b/css/styles.css @@ -0,0 +1,93 @@ +body { + margin: 0px; + padding: 0px; + font-size: 12px; + font-family: Helvetica,Arial,sans-serif; +} + +div.left_area { + width: 150px; + float: left; + margin: 5px; +} + +div.inhalt { + float: left; + margin: 5px; +} + +div.menu { + border: 1px solid #6D96A9; + color: #6D96A9; + padding: 5px; +} + +div.menu a { + text-decoration: none; +} + +div.menu a:hover { + text-decoration: none; + background: #DEE6EE; +} + + +div.head_box { + border: 1px solid #6D96A9; + background: #DEE6EE; + margin: 2px; + padding: 5px; + font-weight: bold; + font-size: 14px; + color: black; +} + + + +div.event { + width: 250px; + float: left; + border: 1px solid #6D96A9; + margin: 2px; +} + +div.event div.tools { + width: 20px; + height: 225px; + float: left; + background: #DEE6EE; + padding: 2px; + margin: 0px; +} + +div.event div.content { + float: left; + margin: 0; + padding: 5px; + height: 225px; +} + +div.event div.content. div.description { + overflow: auto; +} + +div.event div.content p { + +} + +div.event .station { + background: #6D96A9; + color: white; + font-weight: bold; + margin: 0; + padding: 3px 3px 3px 10px; +} + +div.event div.content .title { + font-weight: bold; +} + +div.event div.content .short { + font-size: 11px; +} + diff --git a/menu.ecpp b/menu.ecpp deleted file mode 100644 index e461ad1..0000000 --- a/menu.ecpp +++ /dev/null @@ -1,7 +0,0 @@ -<%pre> -#include -#include - - \ No newline at end of file diff --git a/pages/Makefile b/pages/Makefile new file mode 100644 index 0000000..3c77712 --- /dev/null +++ b/pages/Makefile @@ -0,0 +1,51 @@ +CXX ?= g++ +AR ?= ar +ECPPC ?= ecppc + +CXXFLAGS ?= -O2 -Woverloaded-virtual -Wall -fPIC + +CXXFLAGS += `tntnet-config --cxxflags` +LDFLAGS += `tntnet-config --libs` + +INCLUDES += -I.. + +### The directory environment: +VDRDIR ?= ../../../.. + +### The object files (add further files here): + +OBJS = styles.o menu.o channels.o schedule.o whats_on_now.o + +### Default rules: + +.PHONY: all clean + +### Implicit rules: + +%.o: %.cpp + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< + +%.cpp: %.ecpp + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $< + +%.cpp: %.gif + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_GIF) -b $< + +%.cpp: %.jpg + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_JPG) -b $< + +%.cpp: %.css + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CSS) -b $< + +%.cpp: %.js + $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_JS) -b $< + +### Targets: + +all: libpages.a + +libpages.a: $(OBJS) + $(AR) r $@ $^ + +clean: + @rm -f *~ *.o core* libpages.a $(OBJS:%.o=%.cpp) diff --git a/pages/channels.ecpp b/pages/channels.ecpp new file mode 100644 index 0000000..aa48f03 --- /dev/null +++ b/pages/channels.ecpp @@ -0,0 +1,29 @@ +<%pre> +#include +#include +#include + + + + <$ tr("channels") $> + + + +
+<{ + + for (cChannel *channel = Channels.First(); channel; channel = Channels.Next(channel)) { + if (!channel->GroupSep() && *channel->Name()) { +}> + +<{ + } + } + + +}> +
+ + diff --git a/pages/menu.ecpp b/pages/menu.ecpp new file mode 100644 index 0000000..e461ad1 --- /dev/null +++ b/pages/menu.ecpp @@ -0,0 +1,7 @@ +<%pre> +#include +#include + + \ No newline at end of file diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp new file mode 100644 index 0000000..76659b4 --- /dev/null +++ b/pages/schedule.ecpp @@ -0,0 +1,45 @@ +<%pre> +#include +#include +#include +#include + + +<%args> +int channel; + + + + ecpp-application testproject + + + + Programm für Channel Nummer <$ channel $>
+ +<{ + cSchedulesLock schedulesLock; + const cSchedules* schedules = cSchedules::Schedules(schedulesLock); + + cChannel* Channel = Channels.GetByNumber(channel); + if (Channel) { + const cSchedule *Schedule = schedules->GetSchedule(Channel); + if (Schedule) { + for (const cEvent *ev = Schedule->Events()->First(); ev; ev = Schedule->Events()->Next(ev)) { +}> + <$ ev->Title() $>
+ +<{ + } + } else { +}> + Kein Schedule für Channel <$ Channel->Number() $> +<{ + } + } else { +}> + Kein Channel mit der Nummer <$ channel $> +<{ + } +}> + + diff --git a/pages/whats_on_now.ecpp b/pages/whats_on_now.ecpp new file mode 100644 index 0000000..3511105 --- /dev/null +++ b/pages/whats_on_now.ecpp @@ -0,0 +1,65 @@ +<%pre> +#include +#include +#include +#include +#include +#include "tools.h" + +using namespace vdrlive; + + +<%args> + +<{ + +cSchedulesLock schedulesLock; +const cSchedules* Schedules = cSchedules::Schedules(schedulesLock); + + +}> + + + VDR-Live - <$ tr("What's on now?") $> + + + +
+<& menu > +
+
+
+ <$ tr("What's running at") $> <$ FormatDateTime(tr("%I.%M %p"), time(0)) $> +
+ +<{ + for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { + if (!Channel->GroupSep()) { + const cSchedule *Schedule = Schedules->GetSchedule(Channel); + if (Schedule) { + const cEvent *Event = Schedule->GetPresentEvent(); + if (Event) { + std::string title(Event->Title() ? Event->Title() : ""); + std::string short_description(Event->ShortText() ? Event->ShortText() : ""); + std::string description(Event->Description() ? Event->Description() : ""); +}> +
+
<$ Channel->Name() $>
+
+   +
+
+ <$ title $>
+ <$ short_description $> +
<$ description $>
+
+
+<{ + } + } + } + } +}> +
+ + diff --git a/schedule.ecpp b/schedule.ecpp deleted file mode 100644 index 76659b4..0000000 --- a/schedule.ecpp +++ /dev/null @@ -1,45 +0,0 @@ -<%pre> -#include -#include -#include -#include - - -<%args> -int channel; - - - - ecpp-application testproject - - - - Programm für Channel Nummer <$ channel $>
- -<{ - cSchedulesLock schedulesLock; - const cSchedules* schedules = cSchedules::Schedules(schedulesLock); - - cChannel* Channel = Channels.GetByNumber(channel); - if (Channel) { - const cSchedule *Schedule = schedules->GetSchedule(Channel); - if (Schedule) { - for (const cEvent *ev = Schedule->Events()->First(); ev; ev = Schedule->Events()->Next(ev)) { -}> - <$ ev->Title() $>
- -<{ - } - } else { -}> - Kein Schedule für Channel <$ Channel->Number() $> -<{ - } - } else { -}> - Kein Channel mit der Nummer <$ channel $> -<{ - } -}> - - diff --git a/styles.css b/styles.css deleted file mode 100644 index e3df546..0000000 --- a/styles.css +++ /dev/null @@ -1,93 +0,0 @@ -body { - margin: 0px; - padding: 0px; - font-size: 12px; - font-family: Helvetica,Arial,sans-serif; -} - -div.left_area { - width: 150px; - float: left; - margin: 5px; -} - -div.inhalt { - float: left; - margin: 5px; -} - -div.menu { - border: 1px solid #6D96A9; - color: #6D96A9; - padding: 5px; -} - -div.menu a { - text-decoration: none; -} - -div.menu a:hover { - text-decoration: none; - background: #DEE6EE; -} - - -div.head_box { - border: 1px solid #6D96A9; - background: #DEE6EE; - margin: 2px; - padding: 5px; - font-weight: bold; - font-size: 14px; - color: black; -} - - - -div.event { - width: 250px; - float: left; - border: 1px solid #6D96A9; - margin: 2px; -} - -div.event div.tools { - width: 20px; - height: 225px; - float: left; - background: #DEE6EE; - padding: 2px; - margin: 0px; -} - -div.event div.content { - float: left; - margin: 0; - padding: 5px; - height: 225px; -} - -div.event div.content. div.description { - overflow: auto; -} - -div.event div.content p { - -} - -div.event .station { - background: #6D96A9; - color: white; - font-weight: bold; - margin: 0; - padding: 3px 3px 3px 10px; -} - -div.event div.content .title { - font-weight: bold; -} - -div.event div.content .short { - font-size: 11px; -} - diff --git a/whats_on_now.ecpp b/whats_on_now.ecpp deleted file mode 100644 index 3511105..0000000 --- a/whats_on_now.ecpp +++ /dev/null @@ -1,65 +0,0 @@ -<%pre> -#include -#include -#include -#include -#include -#include "tools.h" - -using namespace vdrlive; - - -<%args> - -<{ - -cSchedulesLock schedulesLock; -const cSchedules* Schedules = cSchedules::Schedules(schedulesLock); - - -}> - - - VDR-Live - <$ tr("What's on now?") $> - - - -
-<& menu > -
-
-
- <$ tr("What's running at") $> <$ FormatDateTime(tr("%I.%M %p"), time(0)) $> -
- -<{ - for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { - if (!Channel->GroupSep()) { - const cSchedule *Schedule = Schedules->GetSchedule(Channel); - if (Schedule) { - const cEvent *Event = Schedule->GetPresentEvent(); - if (Event) { - std::string title(Event->Title() ? Event->Title() : ""); - std::string short_description(Event->ShortText() ? Event->ShortText() : ""); - std::string description(Event->Description() ? Event->Description() : ""); -}> -
-
<$ Channel->Name() $>
-
-   -
-
- <$ title $>
- <$ short_description $> -
<$ description $>
-
-
-<{ - } - } - } - } -}> -
- - -- cgit v1.2.3