{% extends "base.html" %}
{% load cache %}
{% load static %}

{% block head %}
<link rel="alternate" type="application/rss+xml" title="Arch Linux News Updates" href="/feeds/news/" />
<link rel="alternate" type="application/rss+xml" title="Arch Linux Package Updates" href="/feeds/packages/" />
<script type="text/javascript" src="{% static "homepage.js" %}" defer></script>
{% if MASTODON_LINK %}<link rel="me" href="{{MASTODON_LINK}}" title="Arch Linux Mastodon" />{% endif %}
{% endblock %}

{% block content_left %}
{% cache 62 main-page-left %}
<div id="intro" class="box">
    <h2>A simple, lightweight distribution</h2>

    <p>You've reached the website for <strong>Arch Linux</strong>, a
    lightweight and flexible Linux® distribution that tries to Keep It
    Simple.</p>

    <p>Currently we have official packages optimized for the x86-64
    architecture. We complement our official package sets with a
    <a href="https://aur.archlinux.org/" title="Arch User Repository (AUR)">
        community-operated package repository</a> that grows in size and
    quality each and every day.</p>

    <p>Our strong community is diverse and helpful, and we pride ourselves
    on the range of skillsets and uses for Arch that stem from it. Please
    check out our <a href="https://bbs.archlinux.org/" title="Arch Forums">forums</a>
    and <a href="https://lists.archlinux.org/" title="Arch Mailing Lists">mailing lists</a>
    to get your feet wet. Also glance through our <a href="https://wiki.archlinux.org/"
        title="Arch Wiki">wiki</a>
    if you want to learn more about Arch.</p>

    <p class="readmore"><a href="{% url 'page-about' %}"
        title="Learn more about Arch Linux">Learn more...</a></p>
</div>

<div id="news">
    <h3>
        <a href="{% url 'news-list' %}" title="Browse the news archives">Latest News</a>
        <span class="arrow"></span>
    </h3>

    <a href="/feeds/news/" title="Arch News RSS Feed"
        class="rss-icon"><img src="{% static "rss.svg" %}" alt="RSS Feed" /></a>

    {% for news in news_updates %}{% if forloop.counter0 < 5 %}
    <h4>
        <a href="{{ news.get_absolute_url }}"
            title="View full article: {{ news.title }}">{{ news.title }}</a>
    </h4>
    <p class="timestamp">{{ news.postdate|date:"Y-m-d" }}</p>
    <div class="article-content">
        {% if forloop.counter0 == 0 %}{{ news.html|truncatewords_html:300 }}
        {% else %}{{ news.html|truncatewords_html:100 }}{% endif %}
    </div>
    {% else %}{% if forloop.counter0 == 5 %}
    <h3>
        <a href="{% url 'news-list' %}"
            title="Browse the news archives">Older News</a>
        <span class="arrow"></span>
    </h3>
    <dl class="newslist">
    {% endif %}
        <dt>{{ news.postdate|date:"Y-m-d" }}</dt>
        <dd>
            <a href="{{ news.get_absolute_url }}"
                title="View full article: {{ news.title }}">{{ news.title }}</a>
        </dd>
    {% if forloop.last %}</dl>{% endif %}
    {% endif %}{% endfor %}
</div>
{% endcache %}
{% endblock %}

{% block content_right %}
{% cache 59 main-page-updates user.is_authenticated %}
<div id="pkgsearch" class="widget">
    <form id="pkgsearch-form" method="get" action="/packages/">
        <fieldset>
            <label for="pkgsearch-field">Package Search:</label>
            <input id="pkgsearch-field" type="text" name="q" size="18" maxlength="200" autocomplete="off" />
        </fieldset>
    </form>
</div>

<div id="pkg-updates" class="widget box">
    <h3>Recent Updates <span class="more">(<a href="/packages/?sort=-last_update"
            title="Browse all of the latest packages">more</a>)</span></h3>

    <a href="/feeds/packages/" title="Arch Package Updates RSS Feed"
        class="rss-icon"><img src="{% static "rss.svg" %}" alt="RSS Feed" /></a>

    <table>
        {% for update in pkg_updates %}
        <tr>
            <td class="pkg-name"><span class="{{ update.classes|join:' ' }}">{{ update.pkgbase }} {{ update.version }}</span></td>
            <td class="pkg-arch">
                {% for pkg in update.package_links %}<a href="{{ pkg.get_absolute_url }}"
                    title="Details for {{ pkg.pkgname }} [{{ pkg.repo|lower }}]">{{ pkg.arch }}</a>{% if not forloop.last %}/{% endif %}{% endfor %}
            </td>
        </tr>
        {% endfor %}
    </table>
</div>
{% endcache %}

{% cache 115 main-page-right %}
<div id="nav-sidebar" class="widget">
    <h4>Documentation</h4>
    <ul>
        <li><a href="https://wiki.archlinux.org/"
            title="Community documentation">Wiki</a></li>
        <li><a href="https://man.archlinux.org/"
            title="All manpages from Arch packages">Manual Pages</a></li>
        <li><a href="https://wiki.archlinux.org/title/Installation_guide"
            title="Installation guide">Installation Guide</a></li>
    </ul>

    <h4>Community</h4>
    <ul>
        <li><a href="https://lists.archlinux.org/"
            title="Community and developer mailing lists">Mailing Lists</a></li>
        <li><a href="https://wiki.archlinux.org/title/IRC_channels"
            title="Official and regional IRC communities">IRC Channels</a></li>
        <li><a href="https://planet.archlinux.org/"
            title="Arch in the blogosphere">Planet Arch</a></li>
        <li><a href="https://wiki.archlinux.org/title/International_communities"
            title="Arch communities in your native language">International Communities</a></li>
    </ul>

    <h4>Support</h4>
    <ul>
        <li><a href="{% url 'page-donate' %}" title="Help support Arch Linux">Donate</a></li>
        <li><a href="https://www.freewear.org/?page=list_items&amp;org=Archlinux"
            title="T-shirts">T-shirts via Freewear</a></li>
        <li><a href="https://www.hellotux.com/arch"
            title="T-shirts">T-shirts via HELLOTUX</a></li>
    </ul>

    <h4>Tools</h4>
    <ul>
        <li><a href="{% url 'mirrorlist' %}"
            title="Get a custom mirrorlist from our database">Mirrorlist Updater</a></li>
        <li><a href="{% url 'mirror-list' %}"
            title="See a listing of all available mirrors">Mirror List</a></li>
        <li><a href="{% url 'mirror-status' %}"
            title="Check the status of all known mirrors">Mirror Status</a></li>
    </ul>

    <h4>Development</h4>
    <ul>
        <li><a href="https://wiki.archlinux.org/title/Getting_involved"
            title="Getting involved">Getting involved</a></li>
        <li><a href="https://devblog.archlinux.page" title="Dev Blog">Dev Blog</a></li>
        <li><a href="https://gitlab.archlinux.org/archlinux/"
            title="Official Arch projects (git)">Projects in Git</a></li>
        <li><a href="https://wiki.archlinux.org/title/DeveloperWiki"
            title="Developer Wiki articles">Developer Wiki</a></li>
        <li><a href="/groups/"
            title="View the available package groups">Package Groups</a></li>
        <li><a href="/todo/"
            title="Developer Todo Lists">Todo Lists</a></li>
        <li><a href="{% url 'releng-release-list' %}"
            title="Release Engineering ISO listing">ISO Release List</a></li>
        <li><a href="{% url 'visualize-index' %}"
            title="View visualizations">Visualizations</a></li>
        <li><a href="{% url 'packages-differences' %}"
            title="See differences in packages between available architectures">Differences Reports</a></li>
    </ul>

    <h4>People</h4>
    <ul>
        {% for group in staff_groups %}
        <li><a href="{% url 'people' group.slug %}" title="More info about {{ group.name }}">{{ group.name }}</a></li>
        {% endfor %}
        <li><a href="{% url 'page-keys' %}"
            title="Package/Database signing master keys">Signing Master Keys</a></li>
    </ul>

    <h4>More Resources</h4>
    <ul>
        <li><a href="https://wiki.archlinux.org/title/Arch_Linux_press_coverage"
            title="Arch Linux in the media">Press Coverage</a></li>
        <li><a href="{% url 'page-art' %}" title="Arch logos and other artwork for promotional use">Logos &amp; Artwork</a></li>
        <li><a href="{% url 'news-list' %}" title="News Archives">News Archives</a></li>
        <li><a href="/feeds/" title="Various RSS Feeds">RSS Feeds</a></li>
    </ul>
</div>

<div id="home-donate-button" class="widget">
    <a href="https://co.clickandpledge.com/Default.aspx?WID=47294">
        <img src="{% static "click_and_pledge.png" %}" alt="Donate via Click&amp;Pledge to Arch Linux" title="Donate via Click&amp;Pledge to Arch Linux"/>
    </a>
</div>

<div class="widget">
    <a href="https://www.hetzner.com" title="Dedicated Root Server, VPS &amp; Hosting - Hetzner Online GmbH">
        <img src="{% static "hetzner_logo.png" %}"
            title="" alt="Hetzner logo"/>
    </a>

    <a href="https://icons8.com/" title="Icons8">
        <img src="{% static "icons8_logo.png" %}"
            title="" alt="Icons8 logo"/>
    </a>
</div>
{% endcache %}
{% endblock %}
