Bachir Soussi Chiadmi 7 years ago
parent
commit
b36ca5bcc0
4 changed files with 21 additions and 13 deletions
  1. 0 1
      sys/css/lightbox.min.css
  2. 8 8
      sys/gulpfile.js
  3. 2 0
      sys/style.tpl.html
  4. 11 4
      sys/tex2html.sh

File diff suppressed because it is too large
+ 0 - 1
sys/css/lightbox.min.css


+ 8 - 8
sys/gulpfile.js

@@ -24,17 +24,17 @@ gulp.task('scss', function() {
     .pipe(wrap('<style type="text/css">\n<%= contents %>\n</style>'))
     .pipe(gulp.dest('css'));
 });
-
-gulp.task('wrap', function(){
-  return gulp.src( 'bower_components/lightbox2/dist/css/lightbox.min.css')
-    .pipe(wrap('<style type="text/css">\n<%= contents %>\n</style>'))
-    .pipe(gulp.dest('css'));
-})
+//
+// gulp.task('wrap', function(){
+//   return gulp.src( 'bower_components/lightbox2/dist/css/lightbox.min.css')
+//     .pipe(wrap('<style type="text/css">\n<%= contents %>\n</style>'))
+//     .pipe(gulp.dest('css'));
+// })
 
 // Watch Files For Changes
 gulp.task('dev-watch', function() {
-  gulp.watch( 'scss/*.scss', ['scss', 'wrap']);
+  gulp.watch( 'scss/*.scss', ['scss']);
 });
 
 // Default Task
-gulp.task('default', ['scss', 'wrap']);
+gulp.task('default', ['scss']);

+ 2 - 0
sys/style.tpl.html

@@ -0,0 +1,2 @@
+<link rel="stylesheet" href="bower_components/lightbox2/dist/css/lightbox.min.css">
+<link rel="stylesheet" href="css/main.css">

+ 11 - 4
sys/tex2html.sh

@@ -4,6 +4,7 @@
 
 echo "generating complete file"
 
+echo "creating folders"
 if [ ! -d ../output/images ]; then
   mkdir ../output/images
 fi
@@ -23,6 +24,7 @@ touch content.textile
 
 echo "" > /tmp/summary
 
+echo "reading content"
  #                  _             _
  #                 | |           | |
  #   ___ ___  _ __ | |_ ___ _ __ | |_
@@ -32,12 +34,13 @@ echo "" > /tmp/summary
 echo "<section id='main'>" >> content.textile
 for i in ../content/*; do
   # if folder if not sys if not modele
-  if [ -d "$i" ] && [ "$i" != "../model" ]; then
+  if [ -d "$i" ] && [[ ! "$i" =~ "model" ]]; then
     # if readme exists
     if [ -f "$i/readme.textile" ]; then
       # user name
       # record readme content on variable
       cont=$(cat "$i/readme.textile")
+      echo "  $i"
 
       # echo "$cont"
       # user=$(grep "h1\.\s*.+" "$i/readme.textile")
@@ -69,6 +72,7 @@ for i in ../content/*; do
       #  |_|_| |_| |_|\__,_|\__, |\___||___/
       #                      __/ |
       #                     |___/
+      echo "    images"
       images=""
       l=0
       echo "<section class='images'>"$'\n' >> content.textile
@@ -109,6 +113,7 @@ for i in ../content/*; do
       #  (__  ) /_/ / /_/ / /  / /__/  __(__  )
       # /____/\____/\__,_/_/   \___/\___/____/
       #
+      echo "    sources"
       echo "<section class='sources'>"$'\n' >> content.textile
       for src in $i/sources/*; do
         # echo "patch : $src"
@@ -141,6 +146,7 @@ echo "</section>" >> content.textile
  # | '_ \ / _ \/ _` |/ _` |/ _ \ '__|
  # | | | |  __/ (_| | (_| |  __/ |
  # |_| |_|\___|\__,_|\__,_|\___|_|
+echo "header"
 touch /tmp/header
 echo "<header id='header'>"$'\n' > /tmp/header
 echo "h1. OLA#3 Documentation"$'\n' >> /tmp/header
@@ -151,16 +157,17 @@ echo "</header>" >> /tmp/header
 
 cat /tmp/header|cat - content.textile > /tmp/out && mv /tmp/out content.textile
 
-
+echo "Pandoc"
 pandoc -s \
   -f textile \
   -t html5 -o ../output/index.html \
-  -H css/lightbox.min.css \
-  -H css/main.css \
+  -H style.tpl.html \
   -A script.tpl.html \
   content.textile
 
+  # -H css/main.css \
 
+cp -r css ../output/
 cp -r fonts ../output/
 cp -r bower_components ../output/
 

Some files were not shown because too many files changed in this diff