diff --git a/.bookignore b/.bookignore index 1cdaf41d..f08278d8 100644 --- a/.bookignore +++ b/.bookignore @@ -1,2 +1 @@ -*.js *.pdf \ No newline at end of file diff --git a/_layouts/layout.html b/_layouts/layout.html index 0c9abf12..a3a1586f 100644 --- a/_layouts/layout.html +++ b/_layouts/layout.html @@ -17,6 +17,7 @@ {% endif %} {% endfor %} {% endblock %} + {% block head %}{% endblock %} diff --git a/_layouts/website/page.html b/_layouts/website/page.html index b87137c0..2c3b0b86 100644 --- a/_layouts/website/page.html +++ b/_layouts/website/page.html @@ -124,5 +124,6 @@ gitbook.page.hasChanged({{ template.getJSContext()|dump|safe }}); }); + {% endblock %} \ No newline at end of file diff --git a/cn/_layouts/layout.html b/cn/_layouts/layout.html new file mode 100644 index 00000000..a3a1586f --- /dev/null +++ b/cn/_layouts/layout.html @@ -0,0 +1,27 @@ + + + + + {% block title %}{{ config.title|d("HonKit", true) }}{% endblock %} + + + + {% if config.author %}{% endif %} + {% if config.isbn %}{% endif %} + {% block style %} + {% for resource in plugins.resources.css %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} + {% endblock %} + + {% block head %}{% endblock %} + + + {% block body %}{% endblock %} + {% block javascript %}{% endblock %} + + \ No newline at end of file diff --git a/cn/_layouts/website/header.html b/cn/_layouts/website/header.html new file mode 100644 index 00000000..9f44acc8 --- /dev/null +++ b/cn/_layouts/website/header.html @@ -0,0 +1,13 @@ +{% block book_header %} + +{% endblock %} \ No newline at end of file diff --git a/cn/_layouts/website/languages.html b/cn/_layouts/website/languages.html new file mode 100644 index 00000000..b8dfadf0 --- /dev/null +++ b/cn/_layouts/website/languages.html @@ -0,0 +1,444 @@ +{% extends "./layout.html" %} + +{% block title %}{{ "LANGS_CHOOSE"|t }} · {{ super() }}{% endblock %} + +{% block head %} +{{ super() }} + +{% endblock %} + +{% block body %} +
+ +
+
+

Learn JavaScript

+

Beginner's Edition

+
First Edition
+ +
+ Web Version + Updated: 2025-05-21 +
+
+ +
+ Learn JavaScript Book Cover +
+
+
+ + +
+
+

{{ "LANGS_CHOOSE"|t }}

+

Select your preferred language to begin your JavaScript journey

+
+ +
+ {% for lang in languages.list %} +
+
+
+ +
+

{{ lang.title }}

+
+
+ {% if lang.id == 'de' or lang.id == 'cn' %} + + Preview + + {% else %} + + Preview + + + PDF + + {% endif %} +
+
+ {% endfor %} +
+
+ + + +
+ + +{% endblock %} \ No newline at end of file diff --git a/cn/_layouts/website/layout.html b/cn/_layouts/website/layout.html new file mode 100644 index 00000000..a299217f --- /dev/null +++ b/cn/_layouts/website/layout.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} + +{% block head %} + {{ super() }} + + + + + + + + +{% endblock %} + +{% block style %} + {### Include theme css before plugins css ###} + + + {{ super() }} + + {### Custom stylesheets for the book ###} + + {% for type, style in config.styles %} + {% if fileExists(style) and type == "website" %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %}{% endblock %} \ No newline at end of file diff --git a/cn/_layouts/website/page.html b/cn/_layouts/website/page.html new file mode 100644 index 00000000..2c3b0b86 --- /dev/null +++ b/cn/_layouts/website/page.html @@ -0,0 +1,129 @@ +{% extends "./layout.html" %} + +{% block title %}{{ page.title }} · {{ super() }}{% endblock %} + +{% block description %}{{ page.description }}{% endblock %} + +{% block head %} + {{ super() }} + {% if page.next and page.next.path %} + + {% endif %} + {% if page.previous and page.previous.path %} + + {% endif %} +{% endblock %} + +{% block javascript %} + + + + + {% for resource in plugins.resources.js %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %} +
+
+ {% block book_sidebar %} + {% block search_input %}{% endblock %} + {% block book_summary %} + + {% endblock %} + {% endblock %} +
+ +
+ {% block book_body %} +
+ {% block book_inner %} + {% include "website/header.html" %} + +
+
+ {% block search_results %} +
+ {% block page %} + {{ page.content|safe }} + {% endblock %} +
+ {% endblock %} +
+
+ {% endblock %} +
+ + {% block book_navigation %} + {% if page.previous and page.previous.path %} + + + + {% endif %} + {% if page.next and page.next.path %} + + + + {% endif %} + {% endblock %} + {% endblock %} +
+ + + +
+{% endblock %} \ No newline at end of file diff --git a/cn/_layouts/website/summary.html b/cn/_layouts/website/summary.html new file mode 100644 index 00000000..090fb219 --- /dev/null +++ b/cn/_layouts/website/summary.html @@ -0,0 +1,61 @@ +{% macro articles(_articles) %} + {% for article in _articles %} +
  • + {% if article.path and getPageByPath(article.path) %} + + {% elif article.url %} + + {% else %} + + {% endif %} + {% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %} + {{ article.level }}. + {% endif %} + {{ article.title }} + {% if article.path or article.url %} + + {% else %} + + {% endif %} + + {% if article.articles.length > 0 %} + + {% endif %} +
  • + {% endfor %} +{% endmacro %} + + \ No newline at end of file diff --git a/de/_layouts/layout.html b/de/_layouts/layout.html new file mode 100644 index 00000000..a3a1586f --- /dev/null +++ b/de/_layouts/layout.html @@ -0,0 +1,27 @@ + + + + + {% block title %}{{ config.title|d("HonKit", true) }}{% endblock %} + + + + {% if config.author %}{% endif %} + {% if config.isbn %}{% endif %} + {% block style %} + {% for resource in plugins.resources.css %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} + {% endblock %} + + {% block head %}{% endblock %} + + + {% block body %}{% endblock %} + {% block javascript %}{% endblock %} + + \ No newline at end of file diff --git a/de/_layouts/website/header.html b/de/_layouts/website/header.html new file mode 100644 index 00000000..9f44acc8 --- /dev/null +++ b/de/_layouts/website/header.html @@ -0,0 +1,13 @@ +{% block book_header %} + +{% endblock %} \ No newline at end of file diff --git a/de/_layouts/website/languages.html b/de/_layouts/website/languages.html new file mode 100644 index 00000000..b8dfadf0 --- /dev/null +++ b/de/_layouts/website/languages.html @@ -0,0 +1,444 @@ +{% extends "./layout.html" %} + +{% block title %}{{ "LANGS_CHOOSE"|t }} · {{ super() }}{% endblock %} + +{% block head %} +{{ super() }} + +{% endblock %} + +{% block body %} +
    + +
    +
    +

    Learn JavaScript

    +

    Beginner's Edition

    +
    First Edition
    + +
    + Web Version + Updated: 2025-05-21 +
    +
    + +
    + Learn JavaScript Book Cover +
    +
    +
    + + +
    +
    +

    {{ "LANGS_CHOOSE"|t }}

    +

    Select your preferred language to begin your JavaScript journey

    +
    + +
    + {% for lang in languages.list %} +
    +
    +
    + +
    +

    {{ lang.title }}

    +
    +
    + {% if lang.id == 'de' or lang.id == 'cn' %} + + Preview + + {% else %} + + Preview + + + PDF + + {% endif %} +
    +
    + {% endfor %} +
    +
    + + + +
    + + +{% endblock %} \ No newline at end of file diff --git a/de/_layouts/website/layout.html b/de/_layouts/website/layout.html new file mode 100644 index 00000000..a299217f --- /dev/null +++ b/de/_layouts/website/layout.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} + +{% block head %} + {{ super() }} + + + + + + + + +{% endblock %} + +{% block style %} + {### Include theme css before plugins css ###} + + + {{ super() }} + + {### Custom stylesheets for the book ###} + + {% for type, style in config.styles %} + {% if fileExists(style) and type == "website" %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %}{% endblock %} \ No newline at end of file diff --git a/de/_layouts/website/page.html b/de/_layouts/website/page.html new file mode 100644 index 00000000..2c3b0b86 --- /dev/null +++ b/de/_layouts/website/page.html @@ -0,0 +1,129 @@ +{% extends "./layout.html" %} + +{% block title %}{{ page.title }} · {{ super() }}{% endblock %} + +{% block description %}{{ page.description }}{% endblock %} + +{% block head %} + {{ super() }} + {% if page.next and page.next.path %} + + {% endif %} + {% if page.previous and page.previous.path %} + + {% endif %} +{% endblock %} + +{% block javascript %} + + + + + {% for resource in plugins.resources.js %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %} +
    +
    + {% block book_sidebar %} + {% block search_input %}{% endblock %} + {% block book_summary %} + + {% endblock %} + {% endblock %} +
    + +
    + {% block book_body %} +
    + {% block book_inner %} + {% include "website/header.html" %} + +
    +
    + {% block search_results %} +
    + {% block page %} + {{ page.content|safe }} + {% endblock %} +
    + {% endblock %} +
    +
    + {% endblock %} +
    + + {% block book_navigation %} + {% if page.previous and page.previous.path %} + + + + {% endif %} + {% if page.next and page.next.path %} + + + + {% endif %} + {% endblock %} + {% endblock %} +
    + + + +
    +{% endblock %} \ No newline at end of file diff --git a/de/_layouts/website/summary.html b/de/_layouts/website/summary.html new file mode 100644 index 00000000..090fb219 --- /dev/null +++ b/de/_layouts/website/summary.html @@ -0,0 +1,61 @@ +{% macro articles(_articles) %} + {% for article in _articles %} +
  • + {% if article.path and getPageByPath(article.path) %} + + {% elif article.url %} + + {% else %} + + {% endif %} + {% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %} + {{ article.level }}. + {% endif %} + {{ article.title }} + {% if article.path or article.url %} + + {% else %} + + {% endif %} + + {% if article.articles.length > 0 %} + + {% endif %} +
  • + {% endfor %} +{% endmacro %} + + \ No newline at end of file diff --git a/en/_layouts/layout.html b/en/_layouts/layout.html new file mode 100644 index 00000000..a3a1586f --- /dev/null +++ b/en/_layouts/layout.html @@ -0,0 +1,27 @@ + + + + + {% block title %}{{ config.title|d("HonKit", true) }}{% endblock %} + + + + {% if config.author %}{% endif %} + {% if config.isbn %}{% endif %} + {% block style %} + {% for resource in plugins.resources.css %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} + {% endblock %} + + {% block head %}{% endblock %} + + + {% block body %}{% endblock %} + {% block javascript %}{% endblock %} + + \ No newline at end of file diff --git a/en/_layouts/website/header.html b/en/_layouts/website/header.html new file mode 100644 index 00000000..9f44acc8 --- /dev/null +++ b/en/_layouts/website/header.html @@ -0,0 +1,13 @@ +{% block book_header %} + +{% endblock %} \ No newline at end of file diff --git a/en/_layouts/website/languages.html b/en/_layouts/website/languages.html new file mode 100644 index 00000000..b8dfadf0 --- /dev/null +++ b/en/_layouts/website/languages.html @@ -0,0 +1,444 @@ +{% extends "./layout.html" %} + +{% block title %}{{ "LANGS_CHOOSE"|t }} · {{ super() }}{% endblock %} + +{% block head %} +{{ super() }} + +{% endblock %} + +{% block body %} +
    + +
    +
    +

    Learn JavaScript

    +

    Beginner's Edition

    +
    First Edition
    + +
    + Web Version + Updated: 2025-05-21 +
    +
    + +
    + Learn JavaScript Book Cover +
    +
    +
    + + +
    +
    +

    {{ "LANGS_CHOOSE"|t }}

    +

    Select your preferred language to begin your JavaScript journey

    +
    + +
    + {% for lang in languages.list %} +
    +
    +
    + +
    +

    {{ lang.title }}

    +
    +
    + {% if lang.id == 'de' or lang.id == 'cn' %} + + Preview + + {% else %} + + Preview + + + PDF + + {% endif %} +
    +
    + {% endfor %} +
    +
    + + + +
    + + +{% endblock %} \ No newline at end of file diff --git a/en/_layouts/website/layout.html b/en/_layouts/website/layout.html new file mode 100644 index 00000000..a299217f --- /dev/null +++ b/en/_layouts/website/layout.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} + +{% block head %} + {{ super() }} + + + + + + + + +{% endblock %} + +{% block style %} + {### Include theme css before plugins css ###} + + + {{ super() }} + + {### Custom stylesheets for the book ###} + + {% for type, style in config.styles %} + {% if fileExists(style) and type == "website" %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %}{% endblock %} \ No newline at end of file diff --git a/en/_layouts/website/page.html b/en/_layouts/website/page.html new file mode 100644 index 00000000..2c3b0b86 --- /dev/null +++ b/en/_layouts/website/page.html @@ -0,0 +1,129 @@ +{% extends "./layout.html" %} + +{% block title %}{{ page.title }} · {{ super() }}{% endblock %} + +{% block description %}{{ page.description }}{% endblock %} + +{% block head %} + {{ super() }} + {% if page.next and page.next.path %} + + {% endif %} + {% if page.previous and page.previous.path %} + + {% endif %} +{% endblock %} + +{% block javascript %} + + + + + {% for resource in plugins.resources.js %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %} +
    +
    + {% block book_sidebar %} + {% block search_input %}{% endblock %} + {% block book_summary %} + + {% endblock %} + {% endblock %} +
    + +
    + {% block book_body %} +
    + {% block book_inner %} + {% include "website/header.html" %} + +
    +
    + {% block search_results %} +
    + {% block page %} + {{ page.content|safe }} + {% endblock %} +
    + {% endblock %} +
    +
    + {% endblock %} +
    + + {% block book_navigation %} + {% if page.previous and page.previous.path %} + + + + {% endif %} + {% if page.next and page.next.path %} + + + + {% endif %} + {% endblock %} + {% endblock %} +
    + + + +
    +{% endblock %} \ No newline at end of file diff --git a/en/_layouts/website/summary.html b/en/_layouts/website/summary.html new file mode 100644 index 00000000..090fb219 --- /dev/null +++ b/en/_layouts/website/summary.html @@ -0,0 +1,61 @@ +{% macro articles(_articles) %} + {% for article in _articles %} +
  • + {% if article.path and getPageByPath(article.path) %} + + {% elif article.url %} + + {% else %} + + {% endif %} + {% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %} + {{ article.level }}. + {% endif %} + {{ article.title }} + {% if article.path or article.url %} + + {% else %} + + {% endif %} + + {% if article.articles.length > 0 %} + + {% endif %} +
  • + {% endfor %} +{% endmacro %} + + \ No newline at end of file diff --git a/es/_layouts/layout.html b/es/_layouts/layout.html new file mode 100644 index 00000000..a3a1586f --- /dev/null +++ b/es/_layouts/layout.html @@ -0,0 +1,27 @@ + + + + + {% block title %}{{ config.title|d("HonKit", true) }}{% endblock %} + + + + {% if config.author %}{% endif %} + {% if config.isbn %}{% endif %} + {% block style %} + {% for resource in plugins.resources.css %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} + {% endblock %} + + {% block head %}{% endblock %} + + + {% block body %}{% endblock %} + {% block javascript %}{% endblock %} + + \ No newline at end of file diff --git a/es/_layouts/website/header.html b/es/_layouts/website/header.html new file mode 100644 index 00000000..9f44acc8 --- /dev/null +++ b/es/_layouts/website/header.html @@ -0,0 +1,13 @@ +{% block book_header %} + +{% endblock %} \ No newline at end of file diff --git a/es/_layouts/website/languages.html b/es/_layouts/website/languages.html new file mode 100644 index 00000000..b8dfadf0 --- /dev/null +++ b/es/_layouts/website/languages.html @@ -0,0 +1,444 @@ +{% extends "./layout.html" %} + +{% block title %}{{ "LANGS_CHOOSE"|t }} · {{ super() }}{% endblock %} + +{% block head %} +{{ super() }} + +{% endblock %} + +{% block body %} +
    + +
    +
    +

    Learn JavaScript

    +

    Beginner's Edition

    +
    First Edition
    + +
    + Web Version + Updated: 2025-05-21 +
    +
    + +
    + Learn JavaScript Book Cover +
    +
    +
    + + +
    +
    +

    {{ "LANGS_CHOOSE"|t }}

    +

    Select your preferred language to begin your JavaScript journey

    +
    + +
    + {% for lang in languages.list %} +
    +
    +
    + +
    +

    {{ lang.title }}

    +
    +
    + {% if lang.id == 'de' or lang.id == 'cn' %} + + Preview + + {% else %} + + Preview + + + PDF + + {% endif %} +
    +
    + {% endfor %} +
    +
    + + + +
    + + +{% endblock %} \ No newline at end of file diff --git a/es/_layouts/website/layout.html b/es/_layouts/website/layout.html new file mode 100644 index 00000000..a299217f --- /dev/null +++ b/es/_layouts/website/layout.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} + +{% block head %} + {{ super() }} + + + + + + + + +{% endblock %} + +{% block style %} + {### Include theme css before plugins css ###} + + + {{ super() }} + + {### Custom stylesheets for the book ###} + + {% for type, style in config.styles %} + {% if fileExists(style) and type == "website" %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %}{% endblock %} \ No newline at end of file diff --git a/es/_layouts/website/page.html b/es/_layouts/website/page.html new file mode 100644 index 00000000..2c3b0b86 --- /dev/null +++ b/es/_layouts/website/page.html @@ -0,0 +1,129 @@ +{% extends "./layout.html" %} + +{% block title %}{{ page.title }} · {{ super() }}{% endblock %} + +{% block description %}{{ page.description }}{% endblock %} + +{% block head %} + {{ super() }} + {% if page.next and page.next.path %} + + {% endif %} + {% if page.previous and page.previous.path %} + + {% endif %} +{% endblock %} + +{% block javascript %} + + + + + {% for resource in plugins.resources.js %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %} +
    +
    + {% block book_sidebar %} + {% block search_input %}{% endblock %} + {% block book_summary %} + + {% endblock %} + {% endblock %} +
    + +
    + {% block book_body %} +
    + {% block book_inner %} + {% include "website/header.html" %} + +
    +
    + {% block search_results %} +
    + {% block page %} + {{ page.content|safe }} + {% endblock %} +
    + {% endblock %} +
    +
    + {% endblock %} +
    + + {% block book_navigation %} + {% if page.previous and page.previous.path %} + + + + {% endif %} + {% if page.next and page.next.path %} + + + + {% endif %} + {% endblock %} + {% endblock %} +
    + + + +
    +{% endblock %} \ No newline at end of file diff --git a/es/_layouts/website/summary.html b/es/_layouts/website/summary.html new file mode 100644 index 00000000..090fb219 --- /dev/null +++ b/es/_layouts/website/summary.html @@ -0,0 +1,61 @@ +{% macro articles(_articles) %} + {% for article in _articles %} +
  • + {% if article.path and getPageByPath(article.path) %} + + {% elif article.url %} + + {% else %} + + {% endif %} + {% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %} + {{ article.level }}. + {% endif %} + {{ article.title }} + {% if article.path or article.url %} + + {% else %} + + {% endif %} + + {% if article.articles.length > 0 %} + + {% endif %} +
  • + {% endfor %} +{% endmacro %} + + \ No newline at end of file diff --git a/fr/_layouts/layout.html b/fr/_layouts/layout.html new file mode 100644 index 00000000..a3a1586f --- /dev/null +++ b/fr/_layouts/layout.html @@ -0,0 +1,27 @@ + + + + + {% block title %}{{ config.title|d("HonKit", true) }}{% endblock %} + + + + {% if config.author %}{% endif %} + {% if config.isbn %}{% endif %} + {% block style %} + {% for resource in plugins.resources.css %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} + {% endblock %} + + {% block head %}{% endblock %} + + + {% block body %}{% endblock %} + {% block javascript %}{% endblock %} + + \ No newline at end of file diff --git a/fr/_layouts/website/header.html b/fr/_layouts/website/header.html new file mode 100644 index 00000000..9f44acc8 --- /dev/null +++ b/fr/_layouts/website/header.html @@ -0,0 +1,13 @@ +{% block book_header %} + +{% endblock %} \ No newline at end of file diff --git a/fr/_layouts/website/languages.html b/fr/_layouts/website/languages.html new file mode 100644 index 00000000..b8dfadf0 --- /dev/null +++ b/fr/_layouts/website/languages.html @@ -0,0 +1,444 @@ +{% extends "./layout.html" %} + +{% block title %}{{ "LANGS_CHOOSE"|t }} · {{ super() }}{% endblock %} + +{% block head %} +{{ super() }} + +{% endblock %} + +{% block body %} +
    + +
    +
    +

    Learn JavaScript

    +

    Beginner's Edition

    +
    First Edition
    + +
    + Web Version + Updated: 2025-05-21 +
    +
    + +
    + Learn JavaScript Book Cover +
    +
    +
    + + +
    +
    +

    {{ "LANGS_CHOOSE"|t }}

    +

    Select your preferred language to begin your JavaScript journey

    +
    + +
    + {% for lang in languages.list %} +
    +
    +
    + +
    +

    {{ lang.title }}

    +
    +
    + {% if lang.id == 'de' or lang.id == 'cn' %} + + Preview + + {% else %} + + Preview + + + PDF + + {% endif %} +
    +
    + {% endfor %} +
    +
    + + + +
    + + +{% endblock %} \ No newline at end of file diff --git a/fr/_layouts/website/layout.html b/fr/_layouts/website/layout.html new file mode 100644 index 00000000..a299217f --- /dev/null +++ b/fr/_layouts/website/layout.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} + +{% block head %} + {{ super() }} + + + + + + + + +{% endblock %} + +{% block style %} + {### Include theme css before plugins css ###} + + + {{ super() }} + + {### Custom stylesheets for the book ###} + + {% for type, style in config.styles %} + {% if fileExists(style) and type == "website" %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %}{% endblock %} \ No newline at end of file diff --git a/fr/_layouts/website/page.html b/fr/_layouts/website/page.html new file mode 100644 index 00000000..2c3b0b86 --- /dev/null +++ b/fr/_layouts/website/page.html @@ -0,0 +1,129 @@ +{% extends "./layout.html" %} + +{% block title %}{{ page.title }} · {{ super() }}{% endblock %} + +{% block description %}{{ page.description }}{% endblock %} + +{% block head %} + {{ super() }} + {% if page.next and page.next.path %} + + {% endif %} + {% if page.previous and page.previous.path %} + + {% endif %} +{% endblock %} + +{% block javascript %} + + + + + {% for resource in plugins.resources.js %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %} +
    +
    + {% block book_sidebar %} + {% block search_input %}{% endblock %} + {% block book_summary %} + + {% endblock %} + {% endblock %} +
    + +
    + {% block book_body %} +
    + {% block book_inner %} + {% include "website/header.html" %} + +
    +
    + {% block search_results %} +
    + {% block page %} + {{ page.content|safe }} + {% endblock %} +
    + {% endblock %} +
    +
    + {% endblock %} +
    + + {% block book_navigation %} + {% if page.previous and page.previous.path %} + + + + {% endif %} + {% if page.next and page.next.path %} + + + + {% endif %} + {% endblock %} + {% endblock %} +
    + + + +
    +{% endblock %} \ No newline at end of file diff --git a/fr/_layouts/website/summary.html b/fr/_layouts/website/summary.html new file mode 100644 index 00000000..090fb219 --- /dev/null +++ b/fr/_layouts/website/summary.html @@ -0,0 +1,61 @@ +{% macro articles(_articles) %} + {% for article in _articles %} +
  • + {% if article.path and getPageByPath(article.path) %} + + {% elif article.url %} + + {% else %} + + {% endif %} + {% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %} + {{ article.level }}. + {% endif %} + {{ article.title }} + {% if article.path or article.url %} + + {% else %} + + {% endif %} + + {% if article.articles.length > 0 %} + + {% endif %} +
  • + {% endfor %} +{% endmacro %} + + \ No newline at end of file diff --git a/id/_layouts/layout.html b/id/_layouts/layout.html new file mode 100644 index 00000000..a3a1586f --- /dev/null +++ b/id/_layouts/layout.html @@ -0,0 +1,27 @@ + + + + + {% block title %}{{ config.title|d("HonKit", true) }}{% endblock %} + + + + {% if config.author %}{% endif %} + {% if config.isbn %}{% endif %} + {% block style %} + {% for resource in plugins.resources.css %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} + {% endblock %} + + {% block head %}{% endblock %} + + + {% block body %}{% endblock %} + {% block javascript %}{% endblock %} + + \ No newline at end of file diff --git a/id/_layouts/website/header.html b/id/_layouts/website/header.html new file mode 100644 index 00000000..9f44acc8 --- /dev/null +++ b/id/_layouts/website/header.html @@ -0,0 +1,13 @@ +{% block book_header %} + +{% endblock %} \ No newline at end of file diff --git a/id/_layouts/website/languages.html b/id/_layouts/website/languages.html new file mode 100644 index 00000000..b8dfadf0 --- /dev/null +++ b/id/_layouts/website/languages.html @@ -0,0 +1,444 @@ +{% extends "./layout.html" %} + +{% block title %}{{ "LANGS_CHOOSE"|t }} · {{ super() }}{% endblock %} + +{% block head %} +{{ super() }} + +{% endblock %} + +{% block body %} +
    + +
    +
    +

    Learn JavaScript

    +

    Beginner's Edition

    +
    First Edition
    + +
    + Web Version + Updated: 2025-05-21 +
    +
    + +
    + Learn JavaScript Book Cover +
    +
    +
    + + +
    +
    +

    {{ "LANGS_CHOOSE"|t }}

    +

    Select your preferred language to begin your JavaScript journey

    +
    + +
    + {% for lang in languages.list %} +
    +
    +
    + +
    +

    {{ lang.title }}

    +
    +
    + {% if lang.id == 'de' or lang.id == 'cn' %} + + Preview + + {% else %} + + Preview + + + PDF + + {% endif %} +
    +
    + {% endfor %} +
    +
    + + + +
    + + +{% endblock %} \ No newline at end of file diff --git a/id/_layouts/website/layout.html b/id/_layouts/website/layout.html new file mode 100644 index 00000000..a299217f --- /dev/null +++ b/id/_layouts/website/layout.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} + +{% block head %} + {{ super() }} + + + + + + + + +{% endblock %} + +{% block style %} + {### Include theme css before plugins css ###} + + + {{ super() }} + + {### Custom stylesheets for the book ###} + + {% for type, style in config.styles %} + {% if fileExists(style) and type == "website" %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %}{% endblock %} \ No newline at end of file diff --git a/id/_layouts/website/page.html b/id/_layouts/website/page.html new file mode 100644 index 00000000..2c3b0b86 --- /dev/null +++ b/id/_layouts/website/page.html @@ -0,0 +1,129 @@ +{% extends "./layout.html" %} + +{% block title %}{{ page.title }} · {{ super() }}{% endblock %} + +{% block description %}{{ page.description }}{% endblock %} + +{% block head %} + {{ super() }} + {% if page.next and page.next.path %} + + {% endif %} + {% if page.previous and page.previous.path %} + + {% endif %} +{% endblock %} + +{% block javascript %} + + + + + {% for resource in plugins.resources.js %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %} +
    +
    + {% block book_sidebar %} + {% block search_input %}{% endblock %} + {% block book_summary %} + + {% endblock %} + {% endblock %} +
    + +
    + {% block book_body %} +
    + {% block book_inner %} + {% include "website/header.html" %} + +
    +
    + {% block search_results %} +
    + {% block page %} + {{ page.content|safe }} + {% endblock %} +
    + {% endblock %} +
    +
    + {% endblock %} +
    + + {% block book_navigation %} + {% if page.previous and page.previous.path %} + + + + {% endif %} + {% if page.next and page.next.path %} + + + + {% endif %} + {% endblock %} + {% endblock %} +
    + + + +
    +{% endblock %} \ No newline at end of file diff --git a/id/_layouts/website/summary.html b/id/_layouts/website/summary.html new file mode 100644 index 00000000..090fb219 --- /dev/null +++ b/id/_layouts/website/summary.html @@ -0,0 +1,61 @@ +{% macro articles(_articles) %} + {% for article in _articles %} +
  • + {% if article.path and getPageByPath(article.path) %} + + {% elif article.url %} + + {% else %} + + {% endif %} + {% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %} + {{ article.level }}. + {% endif %} + {{ article.title }} + {% if article.path or article.url %} + + {% else %} + + {% endif %} + + {% if article.articles.length > 0 %} + + {% endif %} +
  • + {% endfor %} +{% endmacro %} + + \ No newline at end of file diff --git a/np/_layouts/layout.html b/np/_layouts/layout.html new file mode 100644 index 00000000..a3a1586f --- /dev/null +++ b/np/_layouts/layout.html @@ -0,0 +1,27 @@ + + + + + {% block title %}{{ config.title|d("HonKit", true) }}{% endblock %} + + + + {% if config.author %}{% endif %} + {% if config.isbn %}{% endif %} + {% block style %} + {% for resource in plugins.resources.css %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} + {% endblock %} + + {% block head %}{% endblock %} + + + {% block body %}{% endblock %} + {% block javascript %}{% endblock %} + + \ No newline at end of file diff --git a/np/_layouts/website/header.html b/np/_layouts/website/header.html new file mode 100644 index 00000000..9f44acc8 --- /dev/null +++ b/np/_layouts/website/header.html @@ -0,0 +1,13 @@ +{% block book_header %} + +{% endblock %} \ No newline at end of file diff --git a/np/_layouts/website/languages.html b/np/_layouts/website/languages.html new file mode 100644 index 00000000..b8dfadf0 --- /dev/null +++ b/np/_layouts/website/languages.html @@ -0,0 +1,444 @@ +{% extends "./layout.html" %} + +{% block title %}{{ "LANGS_CHOOSE"|t }} · {{ super() }}{% endblock %} + +{% block head %} +{{ super() }} + +{% endblock %} + +{% block body %} +
    + +
    +
    +

    Learn JavaScript

    +

    Beginner's Edition

    +
    First Edition
    + +
    + Web Version + Updated: 2025-05-21 +
    +
    + +
    + Learn JavaScript Book Cover +
    +
    +
    + + +
    +
    +

    {{ "LANGS_CHOOSE"|t }}

    +

    Select your preferred language to begin your JavaScript journey

    +
    + +
    + {% for lang in languages.list %} +
    +
    +
    + +
    +

    {{ lang.title }}

    +
    +
    + {% if lang.id == 'de' or lang.id == 'cn' %} + + Preview + + {% else %} + + Preview + + + PDF + + {% endif %} +
    +
    + {% endfor %} +
    +
    + + + +
    + + +{% endblock %} \ No newline at end of file diff --git a/np/_layouts/website/layout.html b/np/_layouts/website/layout.html new file mode 100644 index 00000000..a299217f --- /dev/null +++ b/np/_layouts/website/layout.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} + +{% block head %} + {{ super() }} + + + + + + + + +{% endblock %} + +{% block style %} + {### Include theme css before plugins css ###} + + + {{ super() }} + + {### Custom stylesheets for the book ###} + + {% for type, style in config.styles %} + {% if fileExists(style) and type == "website" %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %}{% endblock %} \ No newline at end of file diff --git a/np/_layouts/website/page.html b/np/_layouts/website/page.html new file mode 100644 index 00000000..2c3b0b86 --- /dev/null +++ b/np/_layouts/website/page.html @@ -0,0 +1,129 @@ +{% extends "./layout.html" %} + +{% block title %}{{ page.title }} · {{ super() }}{% endblock %} + +{% block description %}{{ page.description }}{% endblock %} + +{% block head %} + {{ super() }} + {% if page.next and page.next.path %} + + {% endif %} + {% if page.previous and page.previous.path %} + + {% endif %} +{% endblock %} + +{% block javascript %} + + + + + {% for resource in plugins.resources.js %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %} +
    +
    + {% block book_sidebar %} + {% block search_input %}{% endblock %} + {% block book_summary %} + + {% endblock %} + {% endblock %} +
    + +
    + {% block book_body %} +
    + {% block book_inner %} + {% include "website/header.html" %} + +
    +
    + {% block search_results %} +
    + {% block page %} + {{ page.content|safe }} + {% endblock %} +
    + {% endblock %} +
    +
    + {% endblock %} +
    + + {% block book_navigation %} + {% if page.previous and page.previous.path %} + + + + {% endif %} + {% if page.next and page.next.path %} + + + + {% endif %} + {% endblock %} + {% endblock %} +
    + + + +
    +{% endblock %} \ No newline at end of file diff --git a/np/_layouts/website/summary.html b/np/_layouts/website/summary.html new file mode 100644 index 00000000..090fb219 --- /dev/null +++ b/np/_layouts/website/summary.html @@ -0,0 +1,61 @@ +{% macro articles(_articles) %} + {% for article in _articles %} +
  • + {% if article.path and getPageByPath(article.path) %} + + {% elif article.url %} + + {% else %} + + {% endif %} + {% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %} + {{ article.level }}. + {% endif %} + {{ article.title }} + {% if article.path or article.url %} + + {% else %} + + {% endif %} + + {% if article.articles.length > 0 %} + + {% endif %} +
  • + {% endfor %} +{% endmacro %} + + \ No newline at end of file diff --git a/tr/_layouts/layout.html b/tr/_layouts/layout.html new file mode 100644 index 00000000..a3a1586f --- /dev/null +++ b/tr/_layouts/layout.html @@ -0,0 +1,27 @@ + + + + + {% block title %}{{ config.title|d("HonKit", true) }}{% endblock %} + + + + {% if config.author %}{% endif %} + {% if config.isbn %}{% endif %} + {% block style %} + {% for resource in plugins.resources.css %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} + {% endblock %} + + {% block head %}{% endblock %} + + + {% block body %}{% endblock %} + {% block javascript %}{% endblock %} + + \ No newline at end of file diff --git a/tr/_layouts/website/header.html b/tr/_layouts/website/header.html new file mode 100644 index 00000000..9f44acc8 --- /dev/null +++ b/tr/_layouts/website/header.html @@ -0,0 +1,13 @@ +{% block book_header %} + +{% endblock %} \ No newline at end of file diff --git a/tr/_layouts/website/languages.html b/tr/_layouts/website/languages.html new file mode 100644 index 00000000..b8dfadf0 --- /dev/null +++ b/tr/_layouts/website/languages.html @@ -0,0 +1,444 @@ +{% extends "./layout.html" %} + +{% block title %}{{ "LANGS_CHOOSE"|t }} · {{ super() }}{% endblock %} + +{% block head %} +{{ super() }} + +{% endblock %} + +{% block body %} +
    + +
    +
    +

    Learn JavaScript

    +

    Beginner's Edition

    +
    First Edition
    + +
    + Web Version + Updated: 2025-05-21 +
    +
    + +
    + Learn JavaScript Book Cover +
    +
    +
    + + +
    +
    +

    {{ "LANGS_CHOOSE"|t }}

    +

    Select your preferred language to begin your JavaScript journey

    +
    + +
    + {% for lang in languages.list %} +
    +
    +
    + +
    +

    {{ lang.title }}

    +
    +
    + {% if lang.id == 'de' or lang.id == 'cn' %} + + Preview + + {% else %} + + Preview + + + PDF + + {% endif %} +
    +
    + {% endfor %} +
    +
    + + + +
    + + +{% endblock %} \ No newline at end of file diff --git a/tr/_layouts/website/layout.html b/tr/_layouts/website/layout.html new file mode 100644 index 00000000..a299217f --- /dev/null +++ b/tr/_layouts/website/layout.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} + +{% block head %} + {{ super() }} + + + + + + + + +{% endblock %} + +{% block style %} + {### Include theme css before plugins css ###} + + + {{ super() }} + + {### Custom stylesheets for the book ###} + + {% for type, style in config.styles %} + {% if fileExists(style) and type == "website" %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %}{% endblock %} \ No newline at end of file diff --git a/tr/_layouts/website/page.html b/tr/_layouts/website/page.html new file mode 100644 index 00000000..2c3b0b86 --- /dev/null +++ b/tr/_layouts/website/page.html @@ -0,0 +1,129 @@ +{% extends "./layout.html" %} + +{% block title %}{{ page.title }} · {{ super() }}{% endblock %} + +{% block description %}{{ page.description }}{% endblock %} + +{% block head %} + {{ super() }} + {% if page.next and page.next.path %} + + {% endif %} + {% if page.previous and page.previous.path %} + + {% endif %} +{% endblock %} + +{% block javascript %} + + + + + {% for resource in plugins.resources.js %} + {% if resource.url %} + + {% else %} + + {% endif %} + {% endfor %} +{% endblock %} + +{% block body %} +
    +
    + {% block book_sidebar %} + {% block search_input %}{% endblock %} + {% block book_summary %} + + {% endblock %} + {% endblock %} +
    + +
    + {% block book_body %} +
    + {% block book_inner %} + {% include "website/header.html" %} + +
    +
    + {% block search_results %} +
    + {% block page %} + {{ page.content|safe }} + {% endblock %} +
    + {% endblock %} +
    +
    + {% endblock %} +
    + + {% block book_navigation %} + {% if page.previous and page.previous.path %} + + + + {% endif %} + {% if page.next and page.next.path %} + + + + {% endif %} + {% endblock %} + {% endblock %} +
    + + + +
    +{% endblock %} \ No newline at end of file diff --git a/tr/_layouts/website/summary.html b/tr/_layouts/website/summary.html new file mode 100644 index 00000000..090fb219 --- /dev/null +++ b/tr/_layouts/website/summary.html @@ -0,0 +1,61 @@ +{% macro articles(_articles) %} + {% for article in _articles %} +
  • + {% if article.path and getPageByPath(article.path) %} + + {% elif article.url %} + + {% else %} + + {% endif %} + {% if article.level != "0" and config.pluginsConfig['theme-default'].showLevel %} + {{ article.level }}. + {% endif %} + {{ article.title }} + {% if article.path or article.url %} + + {% else %} + + {% endif %} + + {% if article.articles.length > 0 %} + + {% endif %} +
  • + {% endfor %} +{% endmacro %} + + \ No newline at end of file diff --git a/website/copy-code.css b/website/copy-code.css new file mode 100644 index 00000000..c5f27b8f --- /dev/null +++ b/website/copy-code.css @@ -0,0 +1,41 @@ +.code-wrapper { + position: relative; +} + +.copy-code-button { + position: absolute; + top: 6px; + right: 6px; + padding: 6px; + background-color: #f7f7f7; + border: 1px solid transparent; + border-radius: 4px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + color: #6a737d; + opacity: 0.8; + transition: all 0.2s ease; + z-index: 10; +} + +.copy-code-button:hover { + opacity: 1; + background-color: #eeeeee; + border-color: #d1d5da; + color: #24292e; +} + +.copy-code-button.success { + color: #28a745; +} + +.copy-code-button svg { + display: block; +} + +.code-wrapper pre { + margin-top: 0 !important; + padding-right: 42px !important; +} \ No newline at end of file diff --git a/website/copy-code.js b/website/copy-code.js new file mode 100644 index 00000000..4a340065 --- /dev/null +++ b/website/copy-code.js @@ -0,0 +1,71 @@ +(function () { + // Overlapping sheets (Copy) and Checkmark (Success) + var copyIcon = ''; + var successIcon = ''; + + function initCopyCodeButtons() { + var root = document.querySelector(".page-inner .markdown-section") || document; + var codeBlocks = root.querySelectorAll("pre"); + + codeBlocks.forEach(function (codeBlock) { + if (codeBlock.parentElement && codeBlock.parentElement.classList.contains("code-wrapper")) return; + + var copyButton = document.createElement("button"); + copyButton.className = "copy-code-button"; + copyButton.type = "button"; + copyButton.ariaLabel = "Copy code"; + copyButton.innerHTML = copyIcon; + + var container = document.createElement("div"); + container.className = "code-wrapper"; + codeBlock.parentNode.insertBefore(container, codeBlock); + container.appendChild(codeBlock); + container.appendChild(copyButton); + + copyButton.addEventListener("click", function () { + var code = codeBlock.querySelector("code") || codeBlock; + var text = code.innerText; + + function showSuccess() { + copyButton.innerHTML = successIcon; + copyButton.classList.add("success"); + setTimeout(function () { + copyButton.innerHTML = copyIcon; + copyButton.classList.remove("success"); + }, 2000); + } + + if (!navigator.clipboard || !navigator.clipboard.writeText) { + var textarea = document.createElement("textarea"); + textarea.value = text; + textarea.style.position = "fixed"; + textarea.style.left = "-9999px"; + document.body.appendChild(textarea); + textarea.select(); + try { + document.execCommand("copy"); + showSuccess(); + } catch (e) { + console.error("Could not copy text", e); + } finally { + document.body.removeChild(textarea); + } + return; + } + + navigator.clipboard.writeText(text).then(showSuccess); + }); + }); + } + + function scheduleInit() { + initCopyCodeButtons(); + setTimeout(initCopyCodeButtons, 150); + } + + document.addEventListener("DOMContentLoaded", scheduleInit); + if (window.gitbook && window.gitbook.events) { + window.gitbook.events.on("page.change", scheduleInit); + } + scheduleInit(); +})(); \ No newline at end of file