From 7f66e3ebe0d7195dfddd49930a1a966b76c2aa48 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Sun, 4 Dec 2016 15:10:15 +0100 Subject: [PATCH] cleaned css --- sys/css/main.css | 16 +-------- sys/js/main.js | 88 ---------------------------------------------- sys/scss/main.scss | 24 ++++++------- sys/tex2html.sh | 4 +++ 4 files changed, 17 insertions(+), 115 deletions(-) diff --git a/sys/css/main.css b/sys/css/main.css index e757bf0..aa783a9 100644 --- a/sys/css/main.css +++ b/sys/css/main.css @@ -42,21 +42,11 @@ h1, h2, h3, h4, h5, h6 { font-family: 'ola',sans-serif; margin: 0; } -#main h1, #main h2 { - border: 2px solid #000; - padding: 5px; - display: inline-block; - position: absolute; } - #main h1 { - padding: 5px 1rem; - top: 100px; white-space: nowrap; } #main h2 { - top: 0; white-space: nowrap; - padding: 5px 1rem; font-size: 1rem; } p { @@ -73,7 +63,6 @@ img { max-width: 100%; } code { - border: 1px solid #000; padding: 5px; } header#header { @@ -83,7 +72,6 @@ header#header { padding: 0 1rem; } header#header h1 { font-size: 1rem; - border-bottom: 2px solid #000; margin-bottom: 1em; } header#header #menu li p { margin-top: 0; @@ -100,7 +88,6 @@ div.user { div.user header { min-height: 200px; } div.user .content { - border: 2px solid #000; padding: 1rem; width: 100%; margin-bottom: 2rem; } @@ -108,8 +95,7 @@ div.user { width: 105%; } div.user section.images ul li { line-height: 0; - margin: 1rem 0; - border: 2px solid #000; } + margin: 1rem 0; } div.user section.images ul li img { max-width: 100%; width: 100%; } diff --git a/sys/js/main.js b/sys/js/main.js index b9d9a74..cd1b9e4 100644 --- a/sys/js/main.js +++ b/sys/js/main.js @@ -5,13 +5,6 @@ $(document).ready(function(){ wrapHTML(); getOutImages(); - - randomPosition($('div.user h1:first')); - randomPosition($('div.user h2:first')); - createLineHeader(); - createLineContent(); - createLineContentImages(); - createLineImages(); } function wrapHTML(){ @@ -29,87 +22,6 @@ $(document).ready(function(){ }); } - function createLineHeader(){ - - _$users.each(function(){ - var h2Height = $(this).find('h2:first').outerHeight(); - - var h1Width = $(this).find('h1:first').outerWidth(); - - var x1 = $(this).find('h2:first').position().left + 50; - var y1 = $(this).find('h2:first').position().top + h2Height; - var x2 = $(this).find('h1:first').position().left + (h1Width / 2); - var y2 = $(this).find('h1:first').position().top; - // console.log(x1, x2, y1, y2); - var linediv = $(this).line(x1, y1, x2, y2, {width: 2}); - }); - - } - - function createLineContent(){ - _$users.each(function(){ - var h1Height = $(this).find('h1:first').outerHeight(); - // var h1Width = $(this).find('h1').outerWidth(); - - var x1 = $(this).find('h1:first').position().left + 50; - var y1 = $(this).find('h1:first').position().top + h1Height; - var x2 = $(this).find('.content').position().left; - var y2 = $(this).find('.content').position().top; - // console.log(x1, x2, y1, y2); - var linediv = $(this).line(x1, y1, x2, y2, {width: 2}); - }); - } - - function createLineContentImages(){ - _$users.each(function(){ - var contentHeight = $(this).find('.content').outerHeight(); - // var h1Width = $(this).find('h1').outerWidth(); - - var x1 = $(this).find('.content').position().left; - var y1 = $(this).find('.content').position().top + contentHeight; - var x2 = $(this).find('.images').position().left + 100; - var y2 = $(this).find('.images').position().top + 10; - // console.log(x1, x2, y1, y2); - - if($(this).find('.images').find('li').length){ - var linediv = $(this).line(x1, y1, x2, y2, {width: 2}); - } - - }); - } - - function createLineImages(){ - _$users.each(function(){ - $(this).find('.images').find('li').each(function(){ - var height = $(this).outerHeight(); - var width = $(this).outerWidth(); - - if($(this).next().length){ - // console.log($(this)); - var x1 = $(this).position().left + width ; - var y1 = $(this).position().top + height + 15; - var x2 = $(this).next().position().left + width - 100; - var y2 = $(this).next().position().top + 16; - var linediv = $(this).line(x1, y1, x2, y2, {width: 2}); - // console.log(y1); - } - }); - - }); - } - - function randomPosition($element){ - $element.each(function(){ - var randomPos = Math.random() * (_$users.width()- $(this).width()); - var width = $(this).width(); - $(this).css({ - 'left': randomPos, - 'width': width - }); - - }); - } - init(); diff --git a/sys/scss/main.scss b/sys/scss/main.scss index 87f6bd2..fcdaa22 100644 --- a/sys/scss/main.scss +++ b/sys/scss/main.scss @@ -59,23 +59,23 @@ h1, h2, h3, h4, h5, h6{ #main{ h1, h2{ - border: 2px solid #000; - padding: 5px; - display: inline-block; - position: absolute; + // border: 2px solid #000; + // padding: 5px; + // display: inline-block; + // position: absolute; } h1{ // text-transform: uppercase; - padding: 5px 1rem; - top: 100px; + // padding: 5px 1rem; + // top: 100px; white-space: nowrap; } h2{ - top:0; + // top:0; white-space: nowrap; - padding: 5px 1rem; + // padding: 5px 1rem; font-size: 1rem; } } @@ -93,7 +93,7 @@ li{ img{max-width:100%;} code{ - border: 1px solid #000; + // border: 1px solid #000; padding: 5px; } @@ -105,7 +105,7 @@ header#header{ padding: 0 1rem; h1{ font-size: 1rem; - border-bottom: 2px solid #000; + // border-bottom: 2px solid #000; margin-bottom: 1em; } #menu{ @@ -134,7 +134,7 @@ div.user{ } .content{ - border: 2px solid #000; + // border: 2px solid #000; padding: 1rem; width: 100%; margin-bottom: 2rem; @@ -144,7 +144,7 @@ div.user{ li{ line-height: 0; margin: 1rem 0; - border: 2px solid #000; + // border: 2px solid #000; img{ max-width: 100%; width: 100%; diff --git a/sys/tex2html.sh b/sys/tex2html.sh index e13d03b..93a8aa0 100755 --- a/sys/tex2html.sh +++ b/sys/tex2html.sh @@ -2,6 +2,7 @@ # 06-07-2016 # Licence : GPLv3 +echo "generating complete file" if [ ! -d ../output/images ]; then mkdir ../output/images @@ -148,6 +149,9 @@ pandoc -s \ -A script.tpl.html \ content.textile +cp -r fonts ../output/ + + # echo "export markdown as html" # pandoc -s \ # -f markdown+hard_line_breaks+auto_identifiers+ascii_identifiers+tex_math_dollars+pipe_tables+all_symbols_escapable \