This is an automated email from the ASF dual-hosted git repository. bertty pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-wayang-website.git
commit 2fe180304a056820b6e60d76d4a3ebe6a8618f4a Author: Bertty Contreras-Rojas <[email protected]> AuthorDate: Sun Feb 14 17:08:54 2021 -0300 modification style code visualization --- _config.yml | 2 +- _includes/scripts.html | 2 ++ assets/css/monokai.css | 33 ++++++++++++++++++- assets/css/style/darcula.css | 75 -------------------------------------------- assets/css/style/darkula.css | 6 ---- assets/css/syntax.css | 67 --------------------------------------- assets/js/add_numbers.js | 12 +++++++ documentation.md | 25 +++++++-------- 8 files changed, 59 insertions(+), 163 deletions(-) diff --git a/_config.yml b/_config.yml index 15e1944..dc669eb 100644 --- a/_config.yml +++ b/_config.yml @@ -11,4 +11,4 @@ asciidoctor: attributes: - idseparator=_ - source-highlighter=coderay - - icons=font \ No newline at end of file + - icons=font diff --git a/_includes/scripts.html b/_includes/scripts.html index 8edf4fe..33ae094 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -1,2 +1,4 @@ <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script> + +<script src="{{ "assets/js/add_numbers.js" | absolute_url }}"></script> diff --git a/assets/css/monokai.css b/assets/css/monokai.css index e020d51..3e28fa3 100644 --- a/assets/css/monokai.css +++ b/assets/css/monokai.css @@ -1,4 +1,8 @@ -.highlight pre { background-color: #272822; } +.highlight pre { + background-color: #272822; + padding: 0.5em; + border-radius: 25px; +} .highlight .hll { background-color: #272822; } .highlight .c { color: #75715e } /* Comment */ .highlight .err { color: #960050; background-color: #1e0010 } /* Error */ @@ -35,6 +39,7 @@ .highlight .nx { color: #a6e22e } /* Name.Other */ .highlight .py { color: #f8f8f2 } /* Name.Property */ .highlight .nt { color: #f92672 } /* Name.Tag */ +.highlight > code { color: #f8f8f2 } /* Name.Tag */ .highlight .nv { color: #f8f8f2 } /* Name.Variable */ .highlight .ow { color: #f92672 } /* Operator.Word */ .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ @@ -63,3 +68,29 @@ .highlight .gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */ .highlight .gd { color: #f92672; } /* Generic.Deleted & Diff Deleted */ .highlight .gi { color: #a6e22e; } /* Generic.Inserted & Diff Inserted */ + +pre .line-number { + /* Ukuran line-height antara teks di dalam tag <code> dan <span class="line-number"> harus sama! */ + color:black; + display:block; + color: #f8f8f2; +} + +pre .line-number { + float:left; + margin:0 1em 0 -1em; + border-right:1px solid; + text-align:right; +} + +pre .line-number span { + display:block; + padding:0 .5em 0 1em; + margin-left: 0.5em; +} + +pre .cl { + display:block; + clear:both; + color: #f8f8f2; +} \ No newline at end of file diff --git a/assets/css/style/darcula.css b/assets/css/style/darcula.css deleted file mode 100644 index 60f6c15..0000000 --- a/assets/css/style/darcula.css +++ /dev/null @@ -1,75 +0,0 @@ -/* -Darcula color scheme from the JetBrains family of IDEs -*/ - - -.hljs { - display: block; - overflow-x: auto; - padding: 0.5em; - background: #2b2b2b; -} - -.hljs { - color: #bababa; -} - -.hljs-strong, -.hljs-emphasis { - color: #a8a8a2; -} - -.hljs-bullet, -.hljs-quote, -.hljs-link, -.hljs-number, -.hljs-regexp, -.hljs-literal { - color: #6896ba; -} - -.hljs-code, -.hljs-selector-class { - color: #a6e22e; -} - -.hljs-emphasis { - font-style: italic; -} - -.hljs-keyword, -.hljs-selector-tag, -.hljs-section, -.hljs-attribute, -.hljs-name, -.hljs-variable { - color: #cb7832; -} - -.hljs-params { - color: #b9b9b9; -} - -.hljs-string { - color: #6a8759; -} - -.hljs-subst, -.hljs-type, -.hljs-built_in, -.hljs-builtin-name, -.hljs-symbol, -.hljs-selector-id, -.hljs-selector-attr, -.hljs-selector-pseudo, -.hljs-template-tag, -.hljs-template-variable, -.hljs-addition { - color: #e0c46c; -} - -.hljs-comment, -.hljs-deletion, -.hljs-meta { - color: #7f7f7f; -} \ No newline at end of file diff --git a/assets/css/style/darkula.css b/assets/css/style/darkula.css deleted file mode 100644 index fa71ad4..0000000 --- a/assets/css/style/darkula.css +++ /dev/null @@ -1,6 +0,0 @@ -/* - Deprecated due to a typo in the name and left here for compatibility purpose only. - Please use darcula.css instead. -*/ - -@import url('darcula.css'); \ No newline at end of file diff --git a/assets/css/syntax.css b/assets/css/syntax.css deleted file mode 100644 index 62a9818..0000000 --- a/assets/css/syntax.css +++ /dev/null @@ -1,67 +0,0 @@ -/* - * syntax.css - * GitHub syntax highlighting styles - * obtained from https://github.com/mojombo/tpw/blob/master/css/syntax.css - * - */ - -.highlight { background: #ffffff; } -.highlight .c { color: #999988; font-style: italic } /* Comment */ -.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ -.highlight .k { font-weight: bold } /* Keyword */ -.highlight .o { font-weight: bold } /* Operator */ -.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ -.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ -.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ -.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #aa0000 } /* Generic.Error */ -.highlight .gh { color: #999999 } /* Generic.Heading */ -.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ -.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ -.highlight .go { color: #888888 } /* Generic.Output */ -.highlight .gp { color: #555555 } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ -.highlight .gt { color: #aa0000 } /* Generic.Traceback */ -.highlight .kc { font-weight: bold } /* Keyword.Constant */ -.highlight .kd { font-weight: bold } /* Keyword.Declaration */ -.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ -.highlight .kr { font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ -.highlight .m { color: #009999 } /* Literal.Number */ -.highlight .s { color: #d14 } /* Literal.String */ -.highlight .na { color: #008080 } /* Name.Attribute */ -.highlight .nb { color: #0086B3 } /* Name.Builtin */ -.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ -.highlight .no { color: #008080 } /* Name.Constant */ -.highlight .ni { color: #800080 } /* Name.Entity */ -.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ -.highlight .nn { color: #555555 } /* Name.Namespace */ -.highlight .nt { color: #000080 } /* Name.Tag */ -.highlight .nv { color: #008080 } /* Name.Variable */ -.highlight .ow { font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mf { color: #009999 } /* Literal.Number.Float */ -.highlight .mh { color: #009999 } /* Literal.Number.Hex */ -.highlight .mi { color: #009999 } /* Literal.Number.Integer */ -.highlight .mo { color: #009999 } /* Literal.Number.Oct */ -.highlight .sb { color: #d14 } /* Literal.String.Backtick */ -.highlight .sc { color: #d14 } /* Literal.String.Char */ -.highlight .sd { color: #d14 } /* Literal.String.Doc */ -.highlight .s2 { color: #d14 } /* Literal.String.Double */ -.highlight .se { color: #d14 } /* Literal.String.Escape */ -.highlight .sh { color: #d14 } /* Literal.String.Heredoc */ -.highlight .si { color: #d14 } /* Literal.String.Interpol */ -.highlight .sx { color: #d14 } /* Literal.String.Other */ -.highlight .sr { color: #009926 } /* Literal.String.Regex */ -.highlight .s1 { color: #d14 } /* Literal.String.Single */ -.highlight .ss { color: #990073 } /* Literal.String.Symbol */ -.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ -.highlight .vc { color: #008080 } /* Name.Variable.Class */ -.highlight .vg { color: #008080 } /* Name.Variable.Global */ -.highlight .vi { color: #008080 } /* Name.Variable.Instance */ -.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/assets/js/add_numbers.js b/assets/js/add_numbers.js new file mode 100644 index 0000000..3957412 --- /dev/null +++ b/assets/js/add_numbers.js @@ -0,0 +1,12 @@ +(function() { + var pre = document.getElementsByTagName('pre'), + pl = pre.length; + for (var i = 0; i < pl-1; i++) { + pre[i].innerHTML = '<span class="line-number"></span>' + pre[i].innerHTML + '<span class="cl"></span>'; + var num = pre[i].innerHTML.split(/\n/).length; + for (var j = 0; j < num-1; j++) { + var line_num = pre[i].getElementsByTagName('span')[0]; + line_num.innerHTML += '<span>' + (j + 1) + '</span>'; + } + } +})(); \ No newline at end of file diff --git a/documentation.md b/documentation.md index 17a109d..b424af7 100644 --- a/documentation.md +++ b/documentation.md @@ -44,18 +44,18 @@ For the sake of version flexibility, you still have to include your Hadoop (`had In addition, you can obtain the most recent snapshot version of Apache Wayang via Apache's snapshot repository. Just included ```xml - <repositories> - <repository> - <id>apache-snapshots</id> - <url>https://repository.apache.org/content/repositories/snapshots</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> +<repositories> + <repository> + <id>apache-snapshots</id> + <url>https://repository.apache.org/content/repositories/snapshots</url> + <releases> + <enabled>false</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> +</repositories> ``` If you need to rebuild Apache Wayang, e.g., to use a different Scala version, you can simply do so via Maven: @@ -266,7 +266,6 @@ object WordcountScala { println(wordcounts) } } - ```
