Unverified Commit d04834e5 authored by Georg Krause's avatar Georg Krause
Browse files

Add theme linter

parent 3a4c2963
Pipeline #19898 passed with stages
in 4 minutes and 42 seconds
...@@ -7,7 +7,7 @@ stages: ...@@ -7,7 +7,7 @@ stages:
variables: variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache" PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache"
lint: lint-black:
stage: lint stage: lint
image: python:3.10 image: python:3.10
before_script: before_script:
...@@ -17,6 +17,16 @@ lint: ...@@ -17,6 +17,16 @@ lint:
script: script:
- poetry run black --check --exclude pelican-plugins . - poetry run black --check --exclude pelican-plugins .
lint-djlint:
stage: lint
image: python:3.10
before_script:
- apt-get update && apt-get install -y make git
- pip install poetry
- poetry install
script:
- poetry run djlint --check theme
test_jsonld_ns: test_jsonld_ns:
stage: test stage: test
image: python:3 image: python:3
......
This diff is collapsed.
...@@ -12,7 +12,11 @@ Babel = "^2.9.1" ...@@ -12,7 +12,11 @@ Babel = "^2.9.1"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
black = "^22.1.0" black = "^22.1.0"
djlint = "^0.7.6"
[build-system] [build-system]
requires = ["poetry-core>=1.0.0"] requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" build-backend = "poetry.core.masonry.api"
[tool.djlint]
indent=2
...@@ -4,16 +4,18 @@ ...@@ -4,16 +4,18 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Funkwhale</title> <title>Funkwhale</title>
<link rel="stylesheet" href="https://ui.funkwhale.audio/v0.1.2/css/funkwhale.css"> <link rel="stylesheet"
<link rel="stylesheet" href="{{ main_siteurl }}/theme/css/fork-awesome.min.css"> href="https://ui.funkwhale.audio/v0.1.2/css/funkwhale.css">
<link rel="stylesheet" href="{{ main_siteurl <link rel="stylesheet"
}}/theme/css/funkwhale.css"> href="{{ main_siteurl }}/theme/css/fork-awesome.min.css">
<link rel="icon" type="image/x-icon" href="{{ main_siteurl }}/theme/favicon.ico"> <link rel="stylesheet" href="{{ main_siteurl }}/theme/css/funkwhale.css">
<link rel="icon"
type="image/x-icon"
href="{{ main_siteurl }}/theme/favicon.ico">
<script src="{{ main_siteurl }}/theme/js/navbar-burger.js"></script> <script src="{{ main_siteurl }}/theme/js/navbar-burger.js"></script>
</head> </head>
<body> <body>
{% include "inc/menu.html" %} {% include "inc/menu.html" %}
{% block content %}{% endblock %} {% block content %}{% endblock %}
</body> </body>
</html> </html>
<section class="section has-background-light"> <section class="section has-background-light">
{% for article in BLOG_ARTICLES[:5] %} {% for article in BLOG_ARTICLES[:5] %}
<article class="message"> <article class="message">
<div class="message-header"> <div class="message-header">
<p> <p>
<span class="tag is-info is-light">{{ article.category }}</span> <span class="tag is-info is-light">{{ article.category }}</span>
<span class="ml-3">{{ article.title }}</span> <span class="ml-3">{{ article.title }}</span>
</p> </p>
<a href="{{ article.link }}">Read more...</a> <a href="{{ article.link }}">Read more...</a>
</div> </div>
<div class="message-body">{{ article.summary }}</div> <div class="message-body">{{ article.summary }}</div>
</article> </article>
{% endfor %} {% endfor %}
</section> </section>
...@@ -2,28 +2,44 @@ ...@@ -2,28 +2,44 @@
<h1 class="title">Funkwhale is based on open standards and free software and built...</h1> <h1 class="title">Funkwhale is based on open standards and free software and built...</h1>
<div class="columns"> <div class="columns">
<div class="column feature"> <div class="column feature">
<h2 class="title"><i class="fa fa-music" aria-hidden="true"></i> For music lovers</h2> <h2 class="title">
<h3 class="subtitle">Listen to your music</h3> <i class="fa fa-music" aria-hidden="true"></i> For music lovers
<p>Upload your personal music collection and listen to it, any time and everywhere!</p> </h2>
<button class="button mt-4">Learn more...</button> <h3 class="subtitle">Listen to your music</h3>
</div> <p>
<div class="column feature"> Upload your personal music collection and listen to it, any time and everywhere!
<h2 class="title"><i class="fa fa-podcast" aria-hidden="true"></i> For podcast lovers</h2> </p>
<h3 class="subtitle">Subscribe to any podcast</h3> <button class="button mt-4">Learn more...</button>
<p>Listen to your favorite podcasts and discover new podcasts from our network!</p>
<button class="button mt-4">Learn more...</button>
</div>
<div class="column feature">
<h2 class="title"><i class="fa fa-upload" aria-hidden="true"></i> For publishers</h2>
<h3 class="subtitle">Publish your music or podcast</h3>
<p>Make your audio content available to the hole Funkwhale network and beyond!</p>
<button class="button mt-4">Learn more...</button>
</div>
<div class="column feature">
<h2 class="title"><i class="fa fa-users" aria-hidden="true"></i> By a friendly community</h2>
<h3 class="subtitle">Take part in shaping our software</h3>
<p>Funkwhale belongs to the Community, become a member and participate in the development of an independend platform!</p>
<button class="button mt-4">Become a contributor</button>
</div>
</div> </div>
<div class="column feature">
<h2 class="title">
<i class="fa fa-podcast" aria-hidden="true"></i> For podcast lovers
</h2>
<h3 class="subtitle">Subscribe to any podcast</h3>
<p>
Listen to your favorite podcasts and discover new podcasts from our network!
</p>
<button class="button mt-4">Learn more...</button>
</div>
<div class="column feature">
<h2 class="title">
<i class="fa fa-upload" aria-hidden="true"></i> For publishers
</h2>
<h3 class="subtitle">Publish your music or podcast</h3>
<p>
Make your audio content available to the hole Funkwhale network and beyond!
</p>
<button class="button mt-4">Learn more...</button>
</div>
<div class="column feature">
<h2 class="title">
<i class="fa fa-users" aria-hidden="true"></i> By a friendly community
</h2>
<h3 class="subtitle">Take part in shaping our software</h3>
<p>
Funkwhale belongs to the Community, become a member and participate in the development of an independend platform!
</p>
<button class="button mt-4">Become a contributor</button>
</div>
</div>
</section> </section>
<section class="hero is-fullheight-with-navbar"> <section class="hero is-fullheight-with-navbar">
<div class="hero-body"> <div class="hero-body">
<div class="container"> <div class="container">
<div class="columns is-8"> <div class="columns is-8">
<div class="column"> <div class="column">
<div id="hero-content" class="is-flex is-flex-direction-column <div id="hero-content"
is-justify-content-space-between" style="height: 100%;"> class="is-flex is-flex-direction-column is-justify-content-space-between"
<p class="title is-size-4-tablet is-size-3-desktop style="height: 100%;">
is-size-2-widescreen is-size-1-fullhd has-text-weight-bold">{% trans %}A platform for all your audio{% endtrans %}</p> <p class="title is-size-4-tablet is-size-3-desktop is-size-2-widescreen is-size-1-fullhd has-text-weight-bold">
<p class="subtitle has-text-weight-bold">{% trans %}Your music. Your podcasts.<br /> {% trans %}A platform for all your audio{% endtrans %}
Enjoy anywhere, share with anyone.{% endtrans %}</p> </p>
<button class="button is-primary is-fullwidth">Get started</button> <p class="subtitle has-text-weight-bold">
</div> {% trans %}Your music. Your podcasts.
</div> <br />
<div class="column"> Enjoy anywhere, share with anyone.{% endtrans %}
<img src="{{ main_siteurl }}/theme/images/screenshot.jpg"> </p>
</div> <button class="button is-primary is-fullwidth">Get started</button>
</div> </div>
</div> </div>
</section> <div class="column">
<img src="{{ main_siteurl }}/theme/images/screenshot.jpg">
</div>
</div>
</div>
</section>
<section class="section"> <section class="section">
<div class="columns is-multiline"> <div class="columns is-multiline">
{% for instance in INSTANCES %} {% for instance in INSTANCES %}
<div class="column is-half"> <div class="column is-half">
<div class="card m-4"> <div class="card m-4">
<div class="card-content"> <div class="card-content">
<div class="content"> <div class="content">
<h1>{{ instance.node_name }}</h1> <h1>{{ instance.node_name }}</h1>
<a href="https://{{ instance.name }}">{{ instance.name }}</a> | <a href="https://{{ instance.name }}">{{ instance.name }}</a> |
<span class="content"> <span class="content">
Version: {{ instance.version }} Version: {{ instance.version }}
{% if instance.version == LAST_RELEASE %} {% if instance.version == LAST_RELEASE %}
<i class="fa fa-check-circle has-text-success" aria-hidden="true"> Up-to-date</i> <i class="fa fa-check-circle has-text-success" aria-hidden="true"> Up-to-date</i>
{% endif %} {% endif %}
</span> </span>
<nav class="level mt-4"> <nav class="level mt-4">
<div class="level-item has-text-centered"> <div class="level-item has-text-centered">
<div> <div>
<p class="heading">Active users</p> <p class="heading">
<p class="title"><i class="fa fa-users" aria-hidden="true"></i> {{ instance.lastCheck.usage_users_active_month }}</p> Active users
</div> </p>
<p class="title">
<i class="fa fa-users" aria-hidden="true"></i> {{ instance.lastCheck.usage_users_active_month }}
</p>
</div> </div>
<div class="level-item has-text-centered"> </div>
<div> <div class="level-item has-text-centered">
<p class="heading">Hours of music</p> <div>
<p class="title"><i class="fa fa-clock-o" aria-hidden="true"></i> {{ instance.lastCheck.library_music_hours }}</p> <p class="heading">
</div> Hours of music
</div> </p>
<div class="level-item has-text-centered"> <p class="title">
<div> <i class="fa fa-clock-o" aria-hidden="true"></i> {{ instance.lastCheck.library_music_hours }}
<p class="heading">Available tracks</p> </p>
<p class="title"><i class="fa fa-file-audio-o" aria-hidden="true"></i> {{ instance.lastCheck.library_tracks_total }}</p> </div>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">Serving since</p>
<p class="title"><i class="fa fa-calendar" aria-hidden="true"></i> {{ instance.first_seen_date|strftime('%d.%m.%Y') }}</p>
</div>
</div>
</nav>
</div> </div>
<div class="level-item has-text-centered">
<div>
<p class="heading">
Available tracks
</p>
<p class="title">
<i class="fa fa-file-audio-o" aria-hidden="true"></i> {{ instance.lastCheck.library_tracks_total }}
</p>
</div>
</div>
<div class="level-item has-text-centered">
<div>
<p class="heading">
Serving since
</p>
<p class="title">
<i class="fa fa-calendar" aria-hidden="true"></i> {{ instance.first_seen_date|strftime('%d.%m.%Y') }}
</p>
</div> </div>
<footer class="card-footer">
<a href="https://{{ instance.name }}/about" class="card-footer-item">About this Pod</a>
<a href="https://{{ instance.name }}/signup" class="card-footer-item has-text-weight-bold has-text-white has-background-primary">Join</a>
</footer>
</div> </div>
</div> </nav>
{% endfor %}
</div> </div>
</div>
<footer class="card-footer">
<a href="https://{{ instance.name }}/about" class="card-footer-item">About this Pod</a>
<a href="https://{{ instance.name }}/signup"
class="card-footer-item has-text-weight-bold has-text-white has-background-primary">Join</a>
</footer>
</div>
</div>
{% endfor %}
</div>
</section> </section>
<nav class="navbar has-shadow" role="navigation" aria-label="main navigation"> <nav class="navbar has-shadow"
role="navigation"
aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item" href="{{ main_siteurl }}"> <a class="navbar-item" href="{{ main_siteurl }}">
<img src="{{ main_siteurl }}/theme/images/logo-white-bg.svg"> <img src="{{ main_siteurl }}/theme/images/logo-white-bg.svg">
</a> </a>
<a role="button"
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navbarBasicExample"> class="navbar-burger"
aria-label="menu"
aria-expanded="false"
data-target="navbarBasicExample">
<span aria-hidden="true"></span> <span aria-hidden="true"></span>
<span aria-hidden="true"></span> <span aria-hidden="true"></span>
<span aria-hidden="true"></span> <span aria-hidden="true"></span>
</a> </a>
</div> </div>
<div id="navbarBasicExample" class="navbar-menu"> <div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-start"> <div class="navbar-start">
<a class="navbar-item"> <a class="navbar-item">Apps</a>
Apps <a class="navbar-item">Community</a>
</a> <a href="{{ SITEURL }}/faqs" class="navbar-item">FAQs</a>
<a class="navbar-item">
Community
</a>
<a href="{{ SITEURL }}/faqs" class="navbar-item">
FAQs
</a>
<div class="navbar-item has-dropdown is-hoverable"> <div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link"> <a class="navbar-link">Resources</a>
Resources
</a>
<div class="navbar-dropdown"> <div class="navbar-dropdown">
<a href="{{ SITEURL }}/collective" class="navbar-item"> <a href="{{ SITEURL }}/collective" class="navbar-item">Collective and Statutes</a>
Collective and Statutes <a href="{{ SITEURL }}/code-of-conduct" class="navbar-item">Code of Conduct</a>
</a> <a class="navbar-item">Forum</a>
<a href="{{ SITEURL }}/code-of-conduct" class="navbar-item">
Code of Conduct
</a>
<a class="navbar-item">
Forum
</a>
<hr class="navbar-divider"> <hr class="navbar-divider">
<a class="navbar-item"> <a class="navbar-item">Documentation</a>
Documentation
</a>
</div> </div>
</div> </div>
</div> </div>
<div class="navbar-end"></div> <div class="navbar-end"></div>
<div class="navbar-item has-dropdown is-hoverable"> <div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link"> <a class="navbar-link">{% trans %}Language{% endtrans %}</a>
{% trans %}Language{% endtrans %}
</a>
<div class="navbar-dropdown is-right"> <div class="navbar-dropdown is-right">
{% for lang, url in lang_siteurls.items() %} {% for lang, url in lang_siteurls.items() %}
<a class="navbar-item" href="{{ url }}/">{{ lang }}</a> <a class="navbar-item" href="{{ url }}/">{{ lang }}</a>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
......
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
{% include "inc/hero.html" %} {% include "inc/hero.html" %}
{% include "inc/features.html" %}
{% include "inc/features.html" %} <section class="section">
<div class="container is-max-desktop">
<section class="section"> <div class="columns">
<div class="column is-three-fifths">
<div class="container is-max-desktop"> <div class="section">
<div class="columns"> <p class="subtitle is-3 is-spaced">
<div class="column is-three-fifths">
<div class="section">
<p class="subtitle is-3 is-spaced">
Listen to your music, everywhere Listen to your music, everywhere
</p> </p>
<p class="title is-5"> <p class="title is-5">
Upload your personal library to your pod, share it with friends and family, and discover talented Upload your personal library to your pod, share it with friends and family, and discover talented
creators.</p> creators.
<p>Funkwhale gives you access to your playlists, favorite tracks, and artists everywhere, from our </p>
web interface or the wide range of compatible apps for every platform.</p> <p>
<a class="button is-text mt-4 is-fullwidth">Get started!</a> Funkwhale gives you access to your playlists, favorite tracks, and artists everywhere, from our
</div> web interface or the wide range of compatible apps for every platform.
</p>
<a class="button is-text mt-4 is-fullwidth">Get started!</a>
</div> </div>
<div class="column"> </div>
<div class="block has-text-centered"> <div class="column">
<figure class="image is-inline-block"> <div class="block has-text-centered">
<img style="max-height: 440px" src="{{ main_siteurl }}/theme/images/mobile.jpg" \> <figure class="image is-inline-block">
</figure> <img style="max-height: 440px"
</div> src="{{ main_siteurl }}/theme/images/mobile.jpg">
</figure>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="container is-max-desktop"> <div class="container is-max-desktop">
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<div class="block has-text-centered"> <div class="block has-text-centered">
<figure class="image is-inline-block"> <figure class="image is-inline-block">
<img style="max-height: 440px" src="{{ main_siteurl }}/theme/images/network.jpg" \> <img style="max-height: 440px"
</figure> src="{{ main_siteurl }}/theme/images/network.jpg">
</div> </figure>
</div> </div>
<div class="column is-three-fifths"> </div>
<div class="section"> <div class="column is-three-fifths">
<p class="subtitle is-3 is-spaced">A decentralized and open platform</p> <div class="section">
<p class="title is-5">Funkwhale consists of many independent pods which can communicate together.</p> <p class="subtitle is-3 is-spaced">
<p>This is based on open standards and free and open source technology. The network is not tied to any corporation or entity, which gives you independence and choice.</p> A decentralized and open platform
<a class="button is-text mt-4 is-fullwidth">Find or start your pod</a> </p>
</div> <p class="title is-5">
Funkwhale consists of many independent pods which can communicate together.
</p>
<p>
This is based on open standards and free and open source technology. The network is not tied to any corporation or entity, which gives you independence and choice.
</p>
<a class="button is-text mt-4 is-fullwidth">Find or start your pod</a>
</div> </div>
</div> </div>
</div> </div>
</div>
</section> </section>
{% include "inc/instances.html" %} {% include "inc/instances.html" %}
{% include "inc/blogposts.html" %}
{% include "inc/blogposts.html" %} {% endblock %}
{% endblock %}
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<section class="section">
<section class="section"> <div class="container is-max-desktop content">{{ page.content }}</div>
</section>
<div class="container is-max-desktop content"> {% endblock %}
{{ page.content }}
</div>
</section>
{% endblock %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment