<commit_before>{% extends 'base.html' %}

{% block head_preload %}
    <link rel="preload" href="/assets/fonts/Inter/Inter-Regular.woff2" as="font">
    <link rel="preload" href="/assets/fonts/Inter/Inter-Bold.woff2" as="font">

    <link rel="preload" href="/assets/fonts/JetBrainsMono/JetBrainsMono-Regular.woff2" as="font">
    <link rel="preload" href="/assets/fonts/JetBrainsMono/JetBrainsMono-Bold.woff2" as="font">
    <link rel="preload" href="/assets/fonts/JetBrainsMono/JetBrainsMono-Italic.woff2" as="font">
{% endblock %}

{% block body_class %}page__index-new{% endblock %}

{% block page_outer_content %}
    {% include 'inc/pages/index/intro.html' %}

    <section class="kto-overview-section kto-overview-section_mode_dark kotlin-banner-section">
        <h2 class="kto-overview-section__title_size_s g-layout">Kotlin 近期动态</h2>
        <div class="kotlin-banner-section__banner">
            <a target="_blank" class="kotlin-banner-section__link g-layout"
               href="https://www.jetbrains.com/promo/kotlin-heroes/">
                <img
                    alt="kotlin heroes 2020" width="960"
                    src="/assets/images/index/banners/kt_heroes_2020.svg"
                >
            </a>
        </div>
    </section>

    <section class="kto-overview-section kto-overview-section_mode_dark kotlin-news-section">
        <div class="g-layout">
            <div class="kotlin-news-section-news">
                {% for news in site.data["last-news"] %}
                    {% set domain_link = get_domain(news.link) %}
                    <a class="kotlin-news-section-news__item" href="{{ news.link }}"{% if domain_link %} target="_blank"{% endif %}>
                        <span class="kotlin-news-section-news__title">
                            {{ news.title }}<span class="kotlin-news-section-news__title-arrow">&nbsp;→</span>
                        </span>
                        <span class="kotlin-news-section-news__tag">
                            {% if news.tag %}{{ news.tag }}
                            {% elif domain_link %}{{ domain_link }}
                            {% else %}Overview{% endif %}
                        </span>
                    </a>
                {% endfor %}
            </div>
        </div>
    </section>

    <section class="kto-overview-section kto-overview-section_mode_dark kotlin-jump-section">
        <div class="kotlin-jump-section__wrapper g-layout">
            <div class="kotlin-jump-section__content">
                <h2 class="kotlin-jump-section__title">Kotlin 抢先体验预览</h2>
                <p>在正式版发布前试用最新的 Kotlin 特性</p>
            </div>
            <a class="kto-button kto-button_theme_dark kto-button_size_m kto-button_mode_outline" href="/eap/">了解更多</a>
        </div>
    </section>

    {% include 'inc/pages/index/code-examples.html' %}

    <section class="kto-overview-section kotlin-why-section">
        <div class="g-layout">
            <h2 id="why-kotlin" class="kto-overview-section__title">
                <a class="kto-overview-section__title_link" href="#why-kotlin">为什么选择 Kotlin？</a>
            </h2>
            <ul class="kto-features-list">
                {% for feature in features %}
                    <li class="kto-features-list__feature kto-features-list__feature_{{ feature.id }}">
                        <div class="kto-features-list__short-info">
                            <h3 class="kto-features-list__title">{{ feature.title | safe }}</h3>
                            <p class="kto-features-list__description">{{ feature.description | safe }}</p>
                        </div>
                        <div class="kto-features-list__content">
                            {{ feature.content | safe }}

                            {% if feature.id == "工具友好" %}
                                <ul class="kto-getting-list g-layout">
                                    {% macro render_get_kotlin_item(id, title, description, instructions, download, className="") -%}
                                        <li class="kto-getting-item kto-getting-item_{{ id }} {{ className }}">
                                            <div class="kto-getting-item__content">
                                                <h3 class="kto-getting-item__title">{{ title }}</h3>
                                                <p class="kto-getting-item__description"> {{ caller() }}</p>
                                            </div>
                                            <div>
                                                {% if download %}<a href="{{ download }}" target="_blank" class="kto-getting-item__download">下载</a>{% endif %}
                                                <a href="{{ instructions }}" class="kto-getting-item__instruction">使用说明</a>
                                            </div>
                                        </li>
                                    {%- endmacro %}

                                    {% call render_get_kotlin_item(id="intellij-idea", title="IntelliJ IDEA", className="jetbrains-logo _logo-intellij-idea",
                                                instructions="/docs/tutorials/getting-started.html", download="https://www.jetbrains.com/idea/download/") %}
                                        IntelliJ IDEA 社区版与 IntelliJ IDEA Ultimate 中均已自带
                                    {% endcall %}

                                    {% call render_get_kotlin_item(id="android-studio", title="Android Studio",
                                                instructions="/docs/tutorials/kotlin-android.html",  download="https://developer.android.com/studio/") %}
                                        Android Studio 已自带
                                    {% endcall %}

                                    {% call render_get_kotlin_item(id="eclipse", title="Eclipse", instructions="/docs/tutorials/getting-started-eclipse.html") %}
                                        从 Eclipse Marketplace 安装插件
                                    {% endcall %}

                                    {% call render_get_kotlin_item(id="standalone-compiler", title="Standalone Compiler", instructions="/docs/tutorials/command-line.html") %}
                                    使用任何编辑器，并在命令行构建
                                    {% endcall %}
                                </ul>
                            {% endif %}
                        </div>
                    </li>
                {% endfor %}
            </ul>
        </div>
    </section>

    <section id="usage-highlights" class="kto-overview-section kotlin-highlights-section">
        <div class="g-layout">
            <h2 class="kto-overview-section__title kotlin-highlights-section__title">
                <a class="kto-overview-section__title_link" href="#usage-highlights">Kotlin 用途集锦</a>
            </h2>
            <ul class="kto-highlights">
                {% for testimonial in data.testimonials %}
                    <li class="kto-highlights-item kto-highlights-item_company_{{ testimonial.company.lower() | safe }}">
                        <h3 class="kto-highlights-item__header">{{ testimonial.company | safe }}</h3>
                        <div class="kto-highlights-item__text">{{ testimonial.text | safe }}</div>
                    </li>
                {% endfor %}
            </ul>
        </div>
    </section>

    <section id="get-started" class="kto-overview-section kto-overview-section_mode_grey kotlin-get-started-section">
        <div class="g-layout">
            <h2 class="kto-overview-section__title kotlin-get-started-section__title">
                <a class="kto-overview-section__title_link" href="#get-started">
                    立即开始使用 Kotlin<br>
                    在你喜欢的 IDE 中<br>
                    构建你的第一个 Kotlin 应用
                </a>
            </h2>
            <a
                class="kto-button kto-button_theme_dark kto-button_size_m kto-button_mode_primary smooth-anchor"
                href="/docs/tutorials/getting-started.html"
            >Get started</a>
        </div>
    </section>
{% endblock %}

{% block styles %}
    <link rel="stylesheet" href="{{ url_for('static', filename='index.css')|autoversion }}">
{% endblock %}

{% block scripts %}
    <script src="{{ url_for('static', filename='index.js')|autoversion }}"></script>
{% endblock %}<commit_msg>补充首页翻译<commit_after>{% extends 'base.html' %}

{% block head_preload %}
    <link rel="preload" href="/assets/fonts/Inter/Inter-Regular.woff2" as="font">
    <link rel="preload" href="/assets/fonts/Inter/Inter-Bold.woff2" as="font">

    <link rel="preload" href="/assets/fonts/JetBrainsMono/JetBrainsMono-Regular.woff2" as="font">
    <link rel="preload" href="/assets/fonts/JetBrainsMono/JetBrainsMono-Bold.woff2" as="font">
    <link rel="preload" href="/assets/fonts/JetBrainsMono/JetBrainsMono-Italic.woff2" as="font">
{% endblock %}

{% block body_class %}page__index-new{% endblock %}

{% block page_outer_content %}
    {% include 'inc/pages/index/intro.html' %}

    <section class="kto-overview-section kto-overview-section_mode_dark kotlin-banner-section">
        <h2 class="kto-overview-section__title_size_s g-layout">Kotlin 近期动态</h2>
        <div class="kotlin-banner-section__banner">
            <a target="_blank" class="kotlin-banner-section__link g-layout"
               href="https://www.jetbrains.com/promo/kotlin-heroes/">
                <img
                    alt="kotlin heroes 2020" width="960"
                    src="/assets/images/index/banners/kt_heroes_2020.svg"
                >
            </a>
        </div>
    </section>

    <section class="kto-overview-section kto-overview-section_mode_dark kotlin-news-section">
        <div class="g-layout">
            <div class="kotlin-news-section-news">
                {% for news in site.data["last-news"] %}
                    {% set domain_link = get_domain(news.link) %}
                    <a class="kotlin-news-section-news__item" href="{{ news.link }}"{% if domain_link %} target="_blank"{% endif %}>
                        <span class="kotlin-news-section-news__title">
                            {{ news.title }}<span class="kotlin-news-section-news__title-arrow">&nbsp;→</span>
                        </span>
                        <span class="kotlin-news-section-news__tag">
                            {% if news.tag %}{{ news.tag }}
                            {% elif domain_link %}{{ domain_link }}
                            {% else %}Overview{% endif %}
                        </span>
                    </a>
                {% endfor %}
            </div>
        </div>
    </section>

    <section class="kto-overview-section kto-overview-section_mode_dark kotlin-jump-section">
        <div class="kotlin-jump-section__wrapper g-layout">
            <div class="kotlin-jump-section__content">
                <h2 class="kotlin-jump-section__title">Kotlin 抢先体验预览</h2>
                <p>在正式版发布前试用最新的 Kotlin 特性</p>
            </div>
            <a class="kto-button kto-button_theme_dark kto-button_size_m kto-button_mode_outline" href="/eap/">了解更多</a>
        </div>
    </section>

    {% include 'inc/pages/index/code-examples.html' %}

    <section class="kto-overview-section kotlin-why-section">
        <div class="g-layout">
            <h2 id="why-kotlin" class="kto-overview-section__title">
                <a class="kto-overview-section__title_link" href="#why-kotlin">为什么选择 Kotlin？</a>
            </h2>
            <ul class="kto-features-list">
                {% for feature in features %}
                    <li class="kto-features-list__feature kto-features-list__feature_{{ feature.id }}">
                        <div class="kto-features-list__short-info">
                            <h3 class="kto-features-list__title">{{ feature.title | safe }}</h3>
                            <p class="kto-features-list__description">{{ feature.description | safe }}</p>
                        </div>
                        <div class="kto-features-list__content">
                            {{ feature.content | safe }}

                            {% if feature.id == "工具友好" %}
                                <ul class="kto-getting-list g-layout">
                                    {% macro render_get_kotlin_item(id, title, description, instructions, download, className="") -%}
                                        <li class="kto-getting-item kto-getting-item_{{ id }} {{ className }}">
                                            <div class="kto-getting-item__content">
                                                <h3 class="kto-getting-item__title">{{ title }}</h3>
                                                <p class="kto-getting-item__description"> {{ caller() }}</p>
                                            </div>
                                            <div>
                                                {% if download %}<a href="{{ download }}" target="_blank" class="kto-getting-item__download">下载</a>{% endif %}
                                                <a href="{{ instructions }}" class="kto-getting-item__instruction">使用说明</a>
                                            </div>
                                        </li>
                                    {%- endmacro %}

                                    {% call render_get_kotlin_item(id="intellij-idea", title="IntelliJ IDEA", className="jetbrains-logo _logo-intellij-idea",
                                                instructions="/docs/tutorials/getting-started.html", download="https://www.jetbrains.com/idea/download/") %}
                                        IntelliJ IDEA 社区版与 IntelliJ IDEA Ultimate 中均已自带
                                    {% endcall %}

                                    {% call render_get_kotlin_item(id="android-studio", title="Android Studio",
                                                instructions="/docs/tutorials/kotlin-android.html",  download="https://developer.android.com/studio/") %}
                                        Android Studio 已自带
                                    {% endcall %}

                                    {% call render_get_kotlin_item(id="eclipse", title="Eclipse", instructions="/docs/tutorials/getting-started-eclipse.html") %}
                                        从 Eclipse Marketplace 安装插件
                                    {% endcall %}

                                    {% call render_get_kotlin_item(id="standalone-compiler", title="Standalone Compiler", instructions="/docs/tutorials/command-line.html") %}
                                    使用任何编辑器，并在命令行构建
                                    {% endcall %}
                                </ul>
                            {% endif %}
                        </div>
                    </li>
                {% endfor %}
            </ul>
        </div>
    </section>

    <section id="usage-highlights" class="kto-overview-section kotlin-highlights-section">
        <div class="g-layout">
            <h2 class="kto-overview-section__title kotlin-highlights-section__title">
                <a class="kto-overview-section__title_link" href="#usage-highlights">Kotlin 用途集锦</a>
            </h2>
            <ul class="kto-highlights">
                {% for testimonial in data.testimonials %}
                    <li class="kto-highlights-item kto-highlights-item_company_{{ testimonial.company.lower() | safe }}">
                        <h3 class="kto-highlights-item__header">{{ testimonial.company | safe }}</h3>
                        <div class="kto-highlights-item__text">{{ testimonial.text | safe }}</div>
                    </li>
                {% endfor %}
            </ul>
        </div>
    </section>

    <section id="get-started" class="kto-overview-section kto-overview-section_mode_grey kotlin-get-started-section">
        <div class="g-layout">
            <h2 class="kto-overview-section__title kotlin-get-started-section__title">
                <a class="kto-overview-section__title_link" href="#get-started">
                    立即开始使用 Kotlin<br>
                    在你喜欢的 IDE 中<br>
                    构建你的第一个 Kotlin 应用
                </a>
            </h2>
            <a
                class="kto-button kto-button_theme_dark kto-button_size_m kto-button_mode_primary smooth-anchor"
                href="/docs/tutorials/getting-started.html"
            >入门</a>
        </div>
    </section>
{% endblock %}

{% block styles %}
    <link rel="stylesheet" href="{{ url_for('static', filename='index.css')|autoversion }}">
{% endblock %}

{% block scripts %}
    <script src="{{ url_for('static', filename='index.js')|autoversion }}"></script>
{% endblock %}
{'fraction_non_alphanumeric': 0.13617934652993083, 'fraction_numerical': 0.0038158836155497257, 'mean_word_length': 1.5222556390977444, 'pattern_counts': {'":': 0, '<': 217, '<?xml version=': 0, '>': 217, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 100, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3190577', 'n_tokens_mistral': 5042, 'n_tokens_neox': 4603, 'n_words': 711}