mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-11 00:35:47 +00:00

- add "ActivityPub" library to handle server to server federation and basic client to server protocols using activitypub: - add webfinger endpoint to look for actor - add actor definition with inbox / outbox / followers - remote follow an actor - create notes with possible preview cards - interract with favourites, reblogs and replies - block incoming actors and/or domains - broadcast/schedule activities to fediverse followers using a cron task - For castopod, the podcast is the actor: - overwrite the activitypub library for castopod's specific needs - perform basic interactions administrating a podcast to interact with fediverse users: - create notes with episode attachment - favourite and share a note + reply - add specific castopod_namespaces for podcasts and episodes definitions - overwrite CodeIgniter's Route service to include alternate-content option for activitystream requests - update episode publication logic: - remove publication inputs in create / edit episode form - publish / schedule or unpublish an episode after creation - the podcaster publishes a note when publishing an episode - Javascript / Typescript modules: - fix Dropdown.ts to keep dropdown menu in foreground - add Modal.ts for funding links modal - add Toggler.ts to toggle various css states in ui - User Interface: - update tailwindcss to v2 - use castopod's pine and rose colors - update public layout to a 3 column layout - add pages in public for podcast activity, episode list and notes - update episode page to include linked notes - remove previous and next episodes from episode pages - show different public views depending on whether user is authenticated or not - use Kumbh Sans and Montserrat fonts - update CodeIgniter's config files - with CodeIgniter's new requirements, update docker environments are now based on php v7.3 image - move Image entity to Libraries - update composer and npm packages to latest versions closes #69 #65 #85, fixes #51 #91 #92 #88
95 lines
4.3 KiB
PHP
95 lines
4.3 KiB
PHP
<header id="main-header" class="fixed top-0 left-0 flex-col flex-shrink-0 h-screen transform -translate-x-full sm:left-auto sm:-translate-x-0 sm:sticky w-80 sm:w-64 lg:w-80 xl:w-112 sm:flex">
|
|
<?php if ($podcast->actor->cover_image_url): ?>
|
|
<img src="<?= $podcast->actor
|
|
->cover_image_url ?>" alt="" class="object-cover w-full h-48 bg-pine-900"/>
|
|
<?php else: ?>
|
|
<div class="w-full h-48 bg-pine-900"></div>
|
|
<?php endif; ?>
|
|
<div class="flex items-center justify-between px-4 py-2 mb-4 lg:px-6 -mt-14 lg:-mt-16 xl:-mt-20">
|
|
<img src="<?= $podcast->image
|
|
->thumbnail_url ?>" alt="<?= $podcast->title ?>" class="h-24 rounded-full shadow-xl xl:h-36 lg:h-28 ring-4 ring-pine-50" />
|
|
<?= anchor_popup(
|
|
route_to('follow', $podcast->name),
|
|
icon(
|
|
'social/castopod',
|
|
'mr-2 text-xl text-pink-200 group-hover:text-pink-50',
|
|
) . lang('Podcast.follow'),
|
|
[
|
|
'width' => 420,
|
|
'height' => 620,
|
|
'class' =>
|
|
'group inline-flex items-center px-4 py-2 text-xs tracking-wider font-semibold text-white uppercase rounded-full shadow focus:outline-none focus:ring bg-rose-600',
|
|
],
|
|
) ?>
|
|
</div>
|
|
<div class="px-6">
|
|
<h1 class="inline-flex items-center text-2xl font-bold leading-none font-display"><?= $podcast->title .
|
|
($podcast->parental_advisory === 'explicit'
|
|
? '<span class="px-1 ml-2 text-xs font-semibold leading-tight tracking-wider text-gray-600 uppercase border-2 border-gray-500">' .
|
|
lang('Common.explicit') .
|
|
'</span>'
|
|
: '') ?></h1>
|
|
<p class="mb-4 font-semibold text-gray-600">@<?= $podcast->name ?></p>
|
|
<div class="mb-2"><?= $podcast->description_html ?></div>
|
|
<?php if ($podcast->location_name): ?>
|
|
<?= location_link(
|
|
$podcast->location_name,
|
|
$podcast->location_geo,
|
|
$podcast->location_osmid,
|
|
'text-sm mb-4',
|
|
) ?>
|
|
<?php endif; ?>
|
|
<div class="mb-6 space-x-4">
|
|
<span class="px-2 py-1 text-sm text-gray-800 bg-gray-200">
|
|
<?= lang(
|
|
'Podcast.category_options.' . $podcast->category->code,
|
|
) ?>
|
|
</span>
|
|
<?php foreach ($podcast->other_categories as $other_category): ?>
|
|
<span class="px-2 py-1 text-sm text-gray-800 bg-gray-200">
|
|
<?= lang(
|
|
'Podcast.category_options.' . $other_category->code,
|
|
) ?>
|
|
</span>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php if (!empty($persons)): ?>
|
|
<div class="flex mb-6 space-x-2">
|
|
<?php foreach ($persons as $person): ?>
|
|
<?php if ($person['information_url']): ?>
|
|
<a href="<?= $person[
|
|
'information_url'
|
|
] ?>" target="_blank" rel="noreferrer noopener">
|
|
<img
|
|
src="<?= $person['thumbnail_url'] ?>"
|
|
alt="<?= $person['full_name'] ?>"
|
|
class="object-cover w-12 h-12 rounded-full"
|
|
title="[<?= $person['full_name'] ?>] <?= $person[
|
|
'roles'
|
|
] ?>" />
|
|
</a>
|
|
<?php else: ?>
|
|
<img
|
|
src="<?= $person['thumbnail_url'] ?>"
|
|
alt="<?= $person['full_name'] ?>"
|
|
class="object-cover w-12 h-12 rounded-full"
|
|
title="[<?= $person['full_name'] ?>] <?= $person[
|
|
'roles'
|
|
] ?>" />
|
|
<?php endif; ?>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
<div class="space-x-4">
|
|
<a href="#" class="hover:underline"><?= lang('Podcast.followers', [
|
|
'numberOfFollowers' => $podcast->actor->followers_count,
|
|
]) ?></a>
|
|
<a href="<?= route_to(
|
|
'podcast-activity',
|
|
$podcast->name,
|
|
) ?>" class="hover:underline"><?= lang('Podcast.notes', [
|
|
'numberOfNotes' => $podcast->actor->notes_count,
|
|
]) ?></a>
|
|
</div>
|
|
</div>
|
|
</header>
|