# HG changeset patch # User David Demelier # Date 1456813904 -3600 # Node ID cc368e32db24706acd262c7fc2f3489914f29dc9 # Parent 510ba33d678c796dae00584d9670ffb3aa96d9a7 Split template into separate files diff -r 510ba33d678c -r cc368e32db24 CMakeLists.txt --- a/CMakeLists.txt Tue Feb 23 15:40:48 2016 +0100 +++ b/CMakeLists.txt Tue Mar 01 07:31:44 2016 +0100 @@ -24,8 +24,11 @@ find_package(Pandoc REQUIRED) # Some variables -set(URL http://releases.malikania.fr/irccd/irccd-2.0.0-rc1.zip) + +#set(URL http://releases.malikania.fr/irccd/irccd-2.0.0.tar.xz) +set(URL file:///tmp/irccd-2.0.0.tar.xz) set(TEMPLATE ${irccd-web_SOURCE_DIR}/templates/template.html) +set(TEMPLATE_DOC ${irccd-web_SOURCE_DIR}/templates/template-doc.html) set(OUTPUT ${CMAKE_BINARY_DIR}/html) set(SOURCE ${CMAKE_SOURCE_DIR}) set(JS ${CMAKE_SOURCE_DIR}/js/joke.js) @@ -40,7 +43,7 @@ irccd URL ${URL} CMAKE_ARGS -DWITH_SSL=Off -DWITH_TESTS=Off -DWITH_DOXYGEN=Off -DWITH_DOCDIR=_DOCS_ - PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${TEMPLATE} ${IRCCD_SOURCE_DIR}/doc/html/resources + PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${TEMPLATE_DOC} ${IRCCD_SOURCE_DIR}/doc/html/resources/template.html BUILD_COMMAND COMMAND ${CMAKE_COMMAND} --build . --target docs COMMAND ${CMAKE_COMMAND} --build . --target plugins @@ -60,7 +63,7 @@ pandoc( OUTPUT ${OUTPUT}/${f}.html SOURCES ${SOURCE}/${f}.md - VARIABLE baseurl:. general:1 ${${f}_VARS} + VARIABLE baseurl:. ${${f}_VARS} FROM markdown TO html5 ARGS --no-highlight @@ -74,7 +77,7 @@ add_custom_target( files - SOURCES ${SOURCES} ${TEMPLATE} ${CSS} ${JS} + SOURCES ${SOURCES} ${TEMPLATE} ${TEMPLATE_DOC} ${CSS} ${JS} DEPENDS ${OUTPUTS} ) @@ -88,4 +91,4 @@ COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/js ${OUTPUT}/js COMMAND ${CMAKE_COMMAND} -E copy_directory ${IRCCD_BINARY_DIR}/fakeroot/_DOCS_ ${OUTPUT} DEPENDS files -) \ No newline at end of file +) diff -r 510ba33d678c -r cc368e32db24 templates/template-doc.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/template-doc.html Tue Mar 01 07:31:44 2016 +0100 @@ -0,0 +1,198 @@ + + + + + + + + + + + $title$ + + + + + + + +$if(guide)$ + +$endif$ + + + + + + + + +
+
+ + + +
+ +$if(js)$ + + + $if(event)$ +

Event: $event$

+ $endif$ + + + $if(module)$ +

Module: $module$

+ $endif$ + + + $if(function)$ +

Function: $function$

+ $endif$ + + + $if(method)$ +

Method: $method$

+ $endif$ + + +
+$summary$ + +$if(synopsis)$ +

Synopsis

+ + +
$synopsis$
+$endif$ + + +$if(arguments)$ +

Arguments

+
    +$for(arguments)$ +
  • $arguments$
  • +$endfor$ +
+$endif$ + +$if(returns)$ +

Returns

+

$returns$

+$endif$ + +$body$ + +
+$endif$ + + +$if(guide)$ +
+ + $if(header)$ +

$header$

+ $endif$ + +$body$ +
+$endif$ +
+
+
+
+

© 2013-2016 David Demelier.

+
+
+ + + + + + + + + + + + + diff -r 510ba33d678c -r cc368e32db24 templates/template.html --- a/templates/template.html Tue Feb 23 15:40:48 2016 +0100 +++ b/templates/template.html Tue Mar 01 07:31:44 2016 +0100 @@ -15,14 +15,6 @@ -$if(doc)$ - -$endif$ - -$if(guide)$ - -$endif$ - -$if(doc)$ -
-$endif$ -$if(general)$ -
-$endif$ - -$if(doc)$ -
- - - -
- -$if(js)$ - - - $if(event)$ -

Event: $event$

- $endif$ - - - $if(module)$ -

Module: $module$

- $endif$ - - - $if(function)$ -

Function: $function$

- $endif$ - - - $if(method)$ -

Method: $method$

- $endif$ - - -
-$summary$ - -$if(synopsis)$ -

Synopsis

- - -
$synopsis$
-$endif$ - - -$if(arguments)$ -

Arguments

-
    -$for(arguments)$ -
  • $arguments$
  • -$endfor$ -
-$endif$ - -$if(returns)$ -

Returns

-

$returns$

-$endif$ - +
$body$ - -
-$endif$ - - -$if(guide)$ -
- - $if(header)$ -

$header$

- $endif$ - -$body$ -
-$endif$ -
-
-$endif$ - -$if(general)$ -$body$ -$endif$

© 2013-2016 David Demelier.

+