Skip to content
Snippets Groups Projects
Commit 08451d0e authored by Štěpán Farka's avatar Štěpán Farka
Browse files

[ADD] embed from tv.pirati.cz

parent ccac3591
Branches
No related tags found
2 merge requests!442Release,!438[ADD] gallery blok to ArticleMixin
Pipeline #7424 passed
# Generated by Django 4.0.3 on 2022-04-01 14:13
# Generated by Django 4.0.3 on 2022-04-01 14:55
import wagtail.core.blocks
import wagtail.core.fields
......@@ -28,6 +28,7 @@ class Migration(migrations.Migration):
"bold",
"italic",
"ol",
"embed",
"ul",
"link",
"document-link",
......
......@@ -18,6 +18,7 @@
<!-- Styles -->
<link rel="stylesheet" href="{% static "styleguide18/assets/css/styles.css" %}">
<link href="{% static "shared/vendor/fancybox/jquery.fancybox.min.css" %}" rel="stylesheet">
<link rel="stylesheet" href="{% static "shared/css/helpers.css" %}">
<style type="text/css">
.inline-block {
......
......@@ -230,6 +230,14 @@ WAGTAILSEARCH_BACKENDS = {
}
}
WAGTAILEMBEDS_FINDERS = [
{
"class": "shared.finders.CustomPeertubeFinder",
},
]
WAGTAILEMBEDS_RESPONSIVE_HTML = True
# Base URL to use when referring to full URLs within the Wagtail admin backend -
# e.g. in notification emails. Don't include '/admin' or a trailing slash
BASE_URL = env.str("BASE_URL", default="https://majak.pirati.cz")
......
# Generated by Django 4.0.3 on 2022-04-01 14:13
# Generated by Django 4.0.3 on 2022-04-01 14:55
import wagtail.core.blocks
import wagtail.core.fields
......@@ -28,6 +28,7 @@ class Migration(migrations.Migration):
"bold",
"italic",
"ol",
"embed",
"ul",
"link",
"document-link",
......
......@@ -18,6 +18,7 @@
<!-- Styles -->
<link rel="stylesheet" href="{% static "styleguide18/assets/css/styles.css" %}">
<link href="{% static "shared/vendor/fancybox/jquery.fancybox.min.css" %}" rel="stylesheet">
<link rel="stylesheet" href="{% static "shared/css/helpers.css" %}">
<style type="text/css">
.inline-block {
......
from wagtail.embeds.finders.oembed import OEmbedFinder
class CustomPeertubeFinder(OEmbedFinder):
def _get_endpoint(self, url):
return "https://tv.pirati.cz/services/oembed"
embed_finder_class = CustomPeertubeFinder
......@@ -38,6 +38,7 @@ class ArticleMixin(models.Model):
"bold",
"italic",
"ol",
"embed",
"ul",
"link",
"document-link",
......
.responsive-object {
position: relative;
}
.responsive-object iframe,
.responsive-object object,
.responsive-object embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
# Generated by Django 4.0.3 on 2022-04-01 14:13
# Generated by Django 4.0.3 on 2022-04-01 14:55
import wagtail.core.blocks
import wagtail.core.fields
......@@ -28,6 +28,7 @@ class Migration(migrations.Migration):
"bold",
"italic",
"ol",
"embed",
"ul",
"link",
"document-link",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment