Skip to content
Snippets Groups Projects
Commit 5d99133c authored by jan.bednarik's avatar jan.bednarik
Browse files

Merge branch 'test' into 'main'

Release

See merge request !8
parents 33237465 7753df9a
No related branches found
No related tags found
1 merge request!8Release
Pipeline #13543 passed
......@@ -9,7 +9,7 @@
{% block head %}
<link
rel="stylesheet"
href="https://styleguide.pirati.cz/2.11.x/css/styles.css"
href="https://styleguide.pirati.cz/2.12.x/css/styles.css"
>
{% render_bundle "mail_signature" %}
......
......@@ -9,7 +9,7 @@
{% block head %}
<link
rel="stylesheet"
href="https://styleguide.pirati.cz/2.11.x/css/styles.css"
href="https://styleguide.pirati.cz/2.12.x/css/styles.css"
>
{% render_bundle "member_group_size_calc" %}
......
This diff is collapsed.
......@@ -4,14 +4,14 @@
"description": "",
"private": true,
"dependencies": {
"@tailwindcss/typography": "^0.5.9",
"@tailwindcss/typography": "^0.4.1",
"alertifyjs": "^1.13.1",
"css-loader": "^6.7.3",
"jquery": "^3.6.4",
"js-cookie": "^3.0.1",
"select2": "^4.1.0-rc.0",
"style-loader": "^3.3.2",
"tailwindcss": "^3.3.1",
"tailwindcss": "^2.2.2",
"webpack": "^5.77.0",
"webpack-bundle-tracker": "^1.8.1",
"webpack-cli": "^5.0.1"
......
......@@ -4,6 +4,5 @@ django-environ==0.9.0
django-webpack-loader==1.8.0
django-http-exceptions==1.4.0
gql[requests]==3.4.0
nodeenv==1.7.0
psycopg2-binary==2.9.5
requests==2.28.2
......@@ -35,6 +35,10 @@ ALLOWED_HOSTS = []
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
# Server
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# Application definition
INSTALLED_APPS = [
......@@ -49,6 +53,8 @@ INSTALLED_APPS = [
"member_group_size_calc",
"rv_voting_calc",
"mail_signature",
"instagram_token",
"asset_server_resize",
]
MIDDLEWARE = [
......@@ -125,3 +131,8 @@ CHOBOTNICE_API_URL=env.str(
"https://chobotnice.pirati.cz/graphql/"
)
CHOBOTNICE_RV_GID=env.str("CHOBOTNICE_RV_GID")
# Instagram
INSTAGRAM_CLIENT_ID = env.str("INSTAGRAM_CLIENT_ID")
INSTAGRAM_CLIENT_SECRET = env.str("INSTAGRAM_CLIENT_SECRET")
......@@ -19,5 +19,7 @@ urlpatterns = [
path("vypocet-skupiny-clenu/", include("member_group_size_calc.urls")),
path("hlasovani-rv/", include("rv_voting_calc.urls")),
path("emailove-podpisy/", include("mail_signature.urls")),
path("instagram/", include("instagram_token.urls")),
path("asset-server/", include("asset_server_resize.urls")),
path("", include("shared.urls")),
]
shared/static/shared/image.webp

22.4 KiB

shared/static/shared/instagram.webp

38 KiB

......@@ -64,7 +64,7 @@
</ui-navbar>
</ui-app>
</nav>
<div class="container container--default py-8 lg:py-24 {% if page.root_page.narrow_layout %}max-w-screen-lg{% endif%}">
<div class="container container--default py-8 lg:py-24">
{% block content %}{% endblock %}
</div>
<footer class="footer bg-grey-700 text-white __js-root hidden lg:block">
......
......@@ -76,6 +76,47 @@
</div>
</div>
</li>
<li class="card">
<a href="{% url "instagram_token:index" %}" target="_blank">
<img
src="{% static "shared/instagram.webp" %}"
alt="Kalkulačka přístupových tokenů do Instagramu"
class="w-full h-48 object-cover"
>
</a>
<div class="p-4">
<h2 class="mb-2 text-xl font-bold">
<a href="{% url "instagram_token:index" %}" target="_blank">
Kalkulačka přístupových tokenů do Instagramu
</a>
</h2>
<div class="font-light text-sm break-words">
Přihlášením svým účtem získáš přístupové údaje, které můžeš využít pro
synchronizaci obsahu na domovské stránce pirati.cz.
</div>
</div>
</li>
<li class="card">
<a href="{% url "asset_server_resize:index" %}">
<img
src="{% static "shared/image.webp" %}"
alt="Generátor škálovaných odkazů na obrázky v Asset Serveru"
class="w-full h-48 object-cover"
>
</a>
<div class="p-4">
<h2 class="mb-2 text-xl font-bold">
<a href="{% url "asset_server_resize:index" %}">
Generátor škálovaných odkazů na obrázky v Asset Serveru
</a>
</h2>
<div class="font-light text-sm break-words">
Vyplněním získáš odkaz na zmenšený obrázek z asset serveru, který se dá použít pro embedování.
</div>
</div>
</li>
</ul>
</section>
......
import $ from "jquery";
$(window).ready(
() => {
$("#generate-url").on(
"click",
event => {
event.preventDefault();
const form = $("#asset-info-form")[0];
if (!form.checkValidity()) {
form.reportValidity();
return;
}
let width = $("#width").val();
let height = $("#height").val();
if (width === "" && height === "") {
alert("Prosím, vyplň aspoň jeden rozměr.");
return;
}
let path = $("#path").val();
if (!path.startsWith("/")) {
path = `/${path}`;
}
if (width === "") { width = "-" }
if (height === "") { height = "-" }
const url = `https://a.pirati.cz/resize/${width}x${height}${path}`;
$("#result").attr("href", url);
$("#result").html(url);
$("#result-wrapper").removeClass("hidden");
}
);
}
)
......@@ -21,6 +21,10 @@ module.exports = {
import: path.resolve("static_src", "mail_signature.js"),
dependOn: "shared",
},
asset_server_resize: {
import: path.resolve("static_src", "asset_server_resize.js"),
dependOn: "shared",
},
shared: ["jquery"],
},
output: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment