diff --git a/www/data/css/styles.css b/www/data/css/styles.css index f042f34..a390bdb 100644 --- a/www/data/css/styles.css +++ b/www/data/css/styles.css @@ -234,7 +234,6 @@ html, body { -moz-hyphens: none; -ms-hyphens: none; hyphens: none; } - .bc_markdown pre { font-size: 14px; display: block; @@ -250,41 +249,48 @@ html, body { -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; } - .bc_markdown blockquote { padding: 0 0 0 15px; margin: 0 0 20px; border-left: 5px solid #CCC; } - -.mdtable_container { - overflow-x: auto; } - -.mdtable { +.bc_markdown img { + max-width: 100%; } +.bc_markdown table { border-collapse: collapse; text-align: left; width: 100%; border: 1px solid #666; } - .mdtable td, .mdtable th { + .bc_markdown table td, .bc_markdown table th { padding: 3px 10px; } - .mdtable thead th { + .bc_markdown table thead th { background-color: #7D7D7D; color: #FFFFFF; font-weight: bold; border-left: 1px solid #444; } - .mdtable thead th:first-child { + .bc_markdown table thead th:first-child { border: none; } - .mdtable tbody td { + .bc_markdown table tbody td { border-left: 1px solid #666; font-weight: normal; } - .mdtable tbody .alt td { + .bc_markdown table tbody .alt td { background: #EBEBEB; } - .mdtable tbody td:first-child { + .bc_markdown table tbody td:first-child { border-left: none; } - .mdtable tbody tr:last-child td { + .bc_markdown table tbody tr:last-child td { border-bottom: none; } - .mdtable tbody tr:nth-child(odd) { + .bc_markdown table tbody tr:nth-child(odd) { background-color: #ccc; } +.mdtable_container { + overflow-x: auto; } + +.notable { + width: unset !important; + border: none !important; } + .notable th, .notable td, .notable tr { + border: none !important; + background: transparent !important; } + #PEB_tableProblems .PEB_tablerowProblems:hover { background-color: #888; } #PEB_tableProblems .PEB_TC_Value { @@ -611,7 +617,7 @@ html, body { white-space: pre; font-family: Consolas, Monaco, "Courier New", Menlo, monospace; padding: 9.5px; - font-size: 11pt; } + font-size: 10pt; } .bce_code .bce_code_ctrl { background: #BBB; display: flex; diff --git a/www/data/css/styles.min.css b/www/data/css/styles.min.css index 94dfa61..8d92922 100644 --- a/www/data/css/styles.min.css +++ b/www/data/css/styles.min.css @@ -51,16 +51,19 @@ html,body{margin:0;padding:0;height:100%} .bc_markdown code{font-family:Consolas,Monaco,"Courier New",Menlo,monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;-moz-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none} .bc_markdown pre{font-size:14px;display:block;padding:9.5px;margin:0 0 10px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre-wrap;background-color:#f8f8f8;color:black;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px} .bc_markdown blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #CCC} +.bc_markdown img{max-width:100%} +.bc_markdown table{border-collapse:collapse;text-align:left;width:100%;border:1px solid #666} +.bc_markdown table td,.bc_markdown table th{padding:3px 10px} +.bc_markdown table thead th{background-color:#7d7d7d;color:#fff;font-weight:bold;border-left:1px solid #444} +.bc_markdown table thead th:first-child{border:0} +.bc_markdown table tbody td{border-left:1px solid #666;font-weight:normal} +.bc_markdown table tbody .alt td{background:#ebebeb} +.bc_markdown table tbody td:first-child{border-left:0} +.bc_markdown table tbody tr:last-child td{border-bottom:0} +.bc_markdown table tbody tr:nth-child(odd){background-color:#ccc} .mdtable_container{overflow-x:auto} -.mdtable{border-collapse:collapse;text-align:left;width:100%;border:1px solid #666} -.mdtable td,.mdtable th{padding:3px 10px} -.mdtable thead th{background-color:#7d7d7d;color:#fff;font-weight:bold;border-left:1px solid #444} -.mdtable thead th:first-child{border:0} -.mdtable tbody td{border-left:1px solid #666;font-weight:normal} -.mdtable tbody .alt td{background:#ebebeb} -.mdtable tbody td:first-child{border-left:0} -.mdtable tbody tr:last-child td{border-bottom:0} -.mdtable tbody tr:nth-child(odd){background-color:#ccc} +.notable{width:unset !important;border:none !important} +.notable th,.notable td,.notable tr{border:none !important;background:transparent !important} #PEB_tableProblems .PEB_tablerowProblems:hover{background-color:#888} #PEB_tableProblems .PEB_TC_Value{font-family:Consolas,Monaco,"Courier New",Menlo,monospace} #PEB_tableProblems .PEB_TC_Value:not(:hover){color:transparent;-o-transition:.5s;-ms-transition:.5s;-moz-transition:.5s;-webkit-transition:.5s;transition:.5s} @@ -160,7 +163,7 @@ html,body{margin:0;padding:0;height:100%} .bfjoust_runner_owner #run_speed{width:70px} .bfjoust_runner_owner #board{background-color:#FFF;border-radius:6px;border:1px solid #CCC} .bce_code{background:#f8f8f8;color:black;border:1px solid rgba(0,0,0,0.15)} -.bce_code .bce_code_data{overflow-x:auto;white-space:pre;font-family:Consolas,Monaco,"Courier New",Menlo,monospace;padding:9.5px;font-size:11pt} +.bce_code .bce_code_data{overflow-x:auto;white-space:pre;font-family:Consolas,Monaco,"Courier New",Menlo,monospace;padding:9.5px;font-size:10pt} .bce_code .bce_code_ctrl{background:#BBB;display:flex;flex-direction:row} .bce_code .bce_code_ctrl .ctrl_btn_left,.bce_code .bce_code_ctrl .ctrl_btn_right{display:flex;flex-direction:row} .bce_code .bce_code_ctrl .ctrl_btn_left{margin-right:auto} diff --git a/www/data/css/styles_befungerunner.scss b/www/data/css/styles_befungerunner.scss index f9933d1..baed089 100644 --- a/www/data/css/styles_befungerunner.scss +++ b/www/data/css/styles_befungerunner.scss @@ -11,7 +11,7 @@ font-family: $FONT_CODE; padding: 9.5px; - font-size: 11pt; + font-size: 10pt; } .bce_code_ctrl { diff --git a/www/data/css/styles_blogview.scss b/www/data/css/styles_blogview.scss index b511b07..fd23774 100644 --- a/www/data/css/styles_blogview.scss +++ b/www/data/css/styles_blogview.scss @@ -18,88 +18,102 @@ padding: 8px; } -.bc_markdown code { - font-family: $FONT_CODE; - direction: ltr; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - -moz-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; -} +.bc_markdown { -.bc_markdown pre { - font-size: 14px; - display: block; - padding: 9.5px; - margin: 0 0 10px; - line-height: 20px; - word-break: break-all; - word-wrap: break-word; - white-space: pre-wrap; - background-color: $COL_BACKGROUND_3; - color: black; - border: 1px solid rgba(0,0,0,.15); - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} + code { + font-family: $FONT_CODE; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + -moz-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + } -.bc_markdown blockquote { - padding: 0 0 0 15px; - margin: 0 0 20px; - border-left: 5px solid #CCC; + pre { + font-size: 14px; + display: block; + padding: 9.5px; + margin: 0 0 10px; + line-height: 20px; + word-break: break-all; + word-wrap: break-word; + white-space: pre-wrap; + background-color: $COL_BACKGROUND_3; + color: black; + border: 1px solid rgba(0,0,0,.15); + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + } + + blockquote { + padding: 0 0 0 15px; + margin: 0 0 20px; + border-left: 5px solid #CCC; + } + + img { + max-width: 100%; + } + + table { + border-collapse: collapse; + text-align: left; + width: 100%; + border: 1px solid #666; + + td, th { + padding: 3px 10px; + } + + thead th { + background-color: #7D7D7D; + color: #FFFFFF; + font-weight: bold; + border-left: 1px solid #444; + } + + thead th:first-child { + border: none; + } + + tbody td { + border-left: 1px solid #666; + font-weight: normal; + } + + tbody .alt td { + background: #EBEBEB; + } + + tbody td:first-child { + border-left: none; + } + + tbody tr:last-child td { + border-bottom: none; + } + + tbody tr:nth-child(odd) { + background-color: #ccc; + } + } } .mdtable_container {overflow-x: auto;} -.mdtable { - border-collapse: collapse; - text-align: left; - width: 100%; - border: 1px solid #666; +.notable { + width: unset !important; + border: none !important; - td, th { - padding: 3px 10px; + th,td,tr { + border: none !important; + background: transparent !important; } - - thead th { - background-color: #7D7D7D; - color: #FFFFFF; - font-weight: bold; - border-left: 1px solid #444; - } - - thead th:first-child { - border: none; - } - - tbody td { - border-left: 1px solid #666; - font-weight: normal; - } - - tbody .alt td { - background: #EBEBEB; - } - - tbody td:first-child { - border-left: none; - } - - tbody tr:last-child td { - border-bottom: none; - } - - tbody tr:nth-child(odd) { - background-color: #ccc; - } - } - - diff --git a/www/data/images/github_band.png b/www/data/images/blog/github_band.png similarity index 100% rename from www/data/images/github_band.png rename to www/data/images/blog/github_band.png diff --git a/www/data/images/blog/p015.gif b/www/data/images/blog/p015.gif new file mode 100644 index 0000000..2c07c68 Binary files /dev/null and b/www/data/images/blog/p015.gif differ diff --git a/www/data/images/blog/p068_1.gif b/www/data/images/blog/p068_1.gif new file mode 100644 index 0000000..3af62ad Binary files /dev/null and b/www/data/images/blog/p068_1.gif differ diff --git a/www/data/images/blog/p068_2.gif b/www/data/images/blog/p068_2.gif new file mode 100644 index 0000000..f92952c Binary files /dev/null and b/www/data/images/blog/p068_2.gif differ diff --git a/www/data/images/blog/p085.gif b/www/data/images/blog/p085.gif new file mode 100644 index 0000000..17617c5 Binary files /dev/null and b/www/data/images/blog/p085.gif differ diff --git a/www/data/images/blog/p090.gif b/www/data/images/blog/p090.gif new file mode 100644 index 0000000..bcf5d6e Binary files /dev/null and b/www/data/images/blog/p090.gif differ diff --git a/www/data/images/blog/p091_1.gif b/www/data/images/blog/p091_1.gif new file mode 100644 index 0000000..664c771 Binary files /dev/null and b/www/data/images/blog/p091_1.gif differ diff --git a/www/data/images/blog/p091_2.gif b/www/data/images/blog/p091_2.gif new file mode 100644 index 0000000..a59a5bf Binary files /dev/null and b/www/data/images/blog/p091_2.gif differ diff --git a/www/data/images/blog/rapla_logo.png b/www/data/images/blog/rapla_logo.png new file mode 100644 index 0000000..23fa84f Binary files /dev/null and b/www/data/images/blog/rapla_logo.png differ diff --git a/www/data/images/blog/rapla_preview.png b/www/data/images/blog/rapla_preview.png new file mode 100644 index 0000000..7acc749 Binary files /dev/null and b/www/data/images/blog/rapla_preview.png differ diff --git a/www/data/images/blog/sudoku.png b/www/data/images/blog/sudoku.png new file mode 100644 index 0000000..12dc124 Binary files /dev/null and b/www/data/images/blog/sudoku.png differ diff --git a/www/data/javascript/blogpost_BFJoustBot_script.js b/www/data/javascript/blogpost_BFJoustBot_script.js index 4ac8d74..a86bf15 100644 --- a/www/data/javascript/blogpost_BFJoustBot_script.js +++ b/www/data/javascript/blogpost_BFJoustBot_script.js @@ -770,11 +770,15 @@ function collapse(code) { //###################################################### -document.getElementById("a_expand").onclick = onExpandClicked; -document.getElementById("a_collapse").onclick = onCollapseClicked; -document.getElementById("a_run").onclick = onRunClicked; -document.getElementById("a_stop").onclick = onStopClicked; -document.getElementById("a_arena").onclick = onArenaClicked; +window.onload = function () +{ + document.getElementById("a_expand").onclick = onExpandClicked; + document.getElementById("a_collapse").onclick = onCollapseClicked; + document.getElementById("a_run").onclick = onRunClicked; + document.getElementById("a_stop").onclick = onStopClicked; + document.getElementById("a_arena").onclick = onArenaClicked; +}; + function onExpandClicked() { var source1 = document.getElementById("source_1"); diff --git a/www/data/javascript/blogpost_bef93runner.js b/www/data/javascript/blogpost_bef93runner.js new file mode 100644 index 0000000..e69de29 diff --git a/www/extern/ParsedownExtra.php b/www/extern/ParsedownExtra.php new file mode 100644 index 0000000..be6966d --- /dev/null +++ b/www/extern/ParsedownExtra.php @@ -0,0 +1,526 @@ +BlockTypes[':'] []= 'DefinitionList'; + $this->BlockTypes['*'] []= 'Abbreviation'; + + # identify footnote definitions before reference definitions + array_unshift($this->BlockTypes['['], 'Footnote'); + + # identify footnote markers before before links + array_unshift($this->InlineTypes['['], 'FootnoteMarker'); + } + + # + # ~ + + function text($text) + { + $markup = parent::text($text); + + # merge consecutive dl elements + + $markup = preg_replace('/<\/dl>\s+
'.$backLinksMarkup.'
'; + } + + $Element['text'][1]['text'] []= array( + 'name' => 'li', + 'attributes' => array('id' => 'fn:'.$definitionId), + 'text' => "\n".$text."\n", + ); + } + + return $Element; + } + + # ~ + + protected function parseAttributeData($attributeString) + { + $Data = array(); + + $attributes = preg_split('/[ ]+/', $attributeString, - 1, PREG_SPLIT_NO_EMPTY); + + foreach ($attributes as $attribute) + { + if ($attribute[0] === '#') + { + $Data['id'] = substr($attribute, 1); + } + else # "." + { + $classes []= substr($attribute, 1); + } + } + + if (isset($classes)) + { + $Data['class'] = implode(' ', $classes); + } + + return $Data; + } + + # ~ + + protected function processTag($elementMarkup) # recursive + { + # http://stackoverflow.com/q/1148928/200145 + libxml_use_internal_errors(true); + + $DOMDocument = new DOMDocument; + + # http://stackoverflow.com/q/11309194/200145 + $elementMarkup = mb_convert_encoding($elementMarkup, 'HTML-ENTITIES', 'UTF-8'); + + # http://stackoverflow.com/q/4879946/200145 + $DOMDocument->loadHTML($elementMarkup); + $DOMDocument->removeChild($DOMDocument->doctype); + $DOMDocument->replaceChild($DOMDocument->firstChild->firstChild->firstChild, $DOMDocument->firstChild); + + $elementText = ''; + + if ($DOMDocument->documentElement->getAttribute('markdown') === '1') + { + foreach ($DOMDocument->documentElement->childNodes as $Node) + { + $elementText .= $DOMDocument->saveHTML($Node); + } + + $DOMDocument->documentElement->removeAttribute('markdown'); + + $elementText = "\n".$this->text($elementText)."\n"; + } + else + { + foreach ($DOMDocument->documentElement->childNodes as $Node) + { + $nodeMarkup = $DOMDocument->saveHTML($Node); + + if ($Node instanceof DOMElement and ! in_array($Node->nodeName, $this->textLevelElements)) + { + $elementText .= $this->processTag($nodeMarkup); + } + else + { + $elementText .= $nodeMarkup; + } + } + } + + # because we don't want for markup to get encoded + $DOMDocument->documentElement->nodeValue = 'placeholder\x1A'; + + $markup = $DOMDocument->saveHTML($DOMDocument->documentElement); + $markup = str_replace('placeholder\x1A', $elementText, $markup); + + return $markup; + } + + # ~ + + protected function sortFootnotes($A, $B) # callback + { + return $A['number'] - $B['number']; + } + + # + # Fields + # + + protected $regexAttribute = '(?:[#.][-\w]+[ ]*)'; +} diff --git a/www/fragments/befunge93_runner.php b/www/fragments/befunge93_runner.php new file mode 100644 index 0000000..cf0f97f --- /dev/null +++ b/www/fragments/befunge93_runner.php @@ -0,0 +1,31 @@ +' . "\n"; +$result .= 'Interpreter steps: | diff --git a/www/fragments/blogview_markdown.php b/www/fragments/blogview_markdown.php index f2d3755..efd341c 100644 --- a/www/fragments/blogview_markdown.php +++ b/www/fragments/blogview_markdown.php @@ -1,7 +1,7 @@ |