diff --git a/app/Helpers/components_helper.php b/app/Helpers/components_helper.php
index 00474d3c..fd05c267 100644
--- a/app/Helpers/components_helper.php
+++ b/app/Helpers/components_helper.php
@@ -238,7 +238,7 @@ if (! function_exists('location_link')) {
icon('map-pin', 'mr-2') . $location->name,
[
'class' =>
- 'inline-flex items-baseline hover:underline' .
+ 'inline-flex items-baseline hover:underline focus:ring-castopod' .
($class === '' ? '' : " {$class}"),
'target' => '_blank',
'rel' => 'noreferrer noopener',
diff --git a/app/Helpers/page_helper.php b/app/Helpers/page_helper.php
index 7a24aaa1..13ecee41 100644
--- a/app/Helpers/page_helper.php
+++ b/app/Helpers/page_helper.php
@@ -20,17 +20,17 @@ if (! function_exists('render_page_links')) {
{
$pages = (new PageModel())->findAll();
$links = anchor(route_to('home'), lang('Common.home'), [
- 'class' => 'px-2 py-1 underline hover:no-underline',
+ 'class' => 'px-2 py-1 underline hover:no-underline focus:ring-castopod',
]);
$links .= anchor(route_to('credits'), lang('Person.credits'), [
- 'class' => 'px-2 py-1 underline hover:no-underline',
+ 'class' => 'px-2 py-1 underline hover:no-underline focus:ring-castopod',
]);
$links .= anchor(route_to('map'), lang('Page.map'), [
- 'class' => 'px-2 py-1 underline hover:no-underline',
+ 'class' => 'px-2 py-1 underline hover:no-underline focus:ring-castopod',
]);
foreach ($pages as $page) {
$links .= anchor($page->link, $page->title, [
- 'class' => 'px-2 py-1 underline hover:no-underline',
+ 'class' => 'px-2 py-1 underline hover:no-underline focus:ring-castopod',
]);
}
diff --git a/app/Language/en/Podcast.php b/app/Language/en/Podcast.php
index c3dd5040..d8c0a20e 100644
--- a/app/Language/en/Podcast.php
+++ b/app/Language/en/Podcast.php
@@ -18,6 +18,7 @@ return [
'no_episode_hint' =>
'Navigate the podcast episodes with the navigation bar above.',
'follow' => 'Follow',
+ 'followTitle' => 'Follow {actorDisplayName} on the fediverse!',
'followers' => '{numberOfFollowers, plural,
one {# follower}
other {# followers}
diff --git a/app/Language/fr/Podcast.php b/app/Language/fr/Podcast.php
index d74d1f8d..f389e497 100644
--- a/app/Language/fr/Podcast.php
+++ b/app/Language/fr/Podcast.php
@@ -18,6 +18,7 @@ return [
'no_episode_hint' =>
'Naviguez au sein des épisodes du podcast episodes grâce à la barre de navigation ci-dessus.',
'follow' => 'Suivre',
+ 'followTitle' => 'Suivez {actorDisplayName} sur le fédiverse !',
'followers' => '{numberOfFollowers, plural,
one {# abonné·e}
other {# abonné·e·s}
diff --git a/app/Resources/js/modules/Dropdown.ts b/app/Resources/js/modules/Dropdown.ts
index e94bd176..64b61f6e 100644
--- a/app/Resources/js/modules/Dropdown.ts
+++ b/app/Resources/js/modules/Dropdown.ts
@@ -25,9 +25,9 @@ const Dropdown = (): void => {
const offsetY = menu.dataset.dropdownOffsetY
? parseInt(menu.dataset.dropdownOffsetY)
: 0;
+ console.log(offsetX, offsetY);
popperInstance = createPopper(button, menu, {
placement: menu.dataset.dropdownPlacement as Placement,
- // strategy: "fixed",
modifiers: [
{
name: "offset",
diff --git a/app/Resources/styles/custom.css b/app/Resources/styles/custom.css
index f35a75fb..e229f820 100644
--- a/app/Resources/styles/custom.css
+++ b/app/Resources/styles/custom.css
@@ -17,4 +17,19 @@
.rounded-conditional-2xl {
border-radius: max(0px, min(1rem, calc((100vw - 1rem - 100%) * 9999)));
}
+
+ .backdrop-gradient {
+ background-image: linear-gradient(
+ 180deg,
+ hsla(0, 0%, 35.29%, 0) 0%,
+ hsla(0, 0%, 34.53%, 0.034375) 16.36%,
+ hsla(0, 0%, 32.42%, 0.125) 33.34%,
+ hsla(0, 0%, 29.18%, 0.253125) 50.1%,
+ hsla(0, 0%, 24.96%, 0.4) 65.75%,
+ hsla(0, 0%, 19.85%, 0.546875) 79.43%,
+ hsla(0, 0%, 13.95%, 0.675) 90.28%,
+ hsla(0, 0%, 7.32%, 0.765625) 97.43%,
+ hsla(0, 0%, 0%, 0.8) 100%
+ );
+ }
}
diff --git a/app/Views/Components/Button.php b/app/Views/Components/Button.php
index 5a4d7258..ed9b6c50 100644
--- a/app/Views/Components/Button.php
+++ b/app/Views/Components/Button.php
@@ -76,11 +76,17 @@ class Button extends Component
}
if ($this->iconLeft !== '') {
- $this->slot = '' . $this->slot;
+ $this->slot = (new Icon([
+ 'glyph' => $this->iconLeft,
+ 'class' => 'mr-2 opacity-75',
+ ]))->render() . $this->slot;
}
if ($this->iconRight !== '') {
- $this->slot .= '';
+ $this->slot .= (new Icon([
+ 'glyph' => $this->iconRight,
+ 'class' => 'ml-2 opacity-75',
+ ]))->render();
}
unset($this->attributes['slot']);
diff --git a/app/Views/Components/DropdownMenu.php b/app/Views/Components/DropdownMenu.php
index 17038786..ef4f1e22 100644
--- a/app/Views/Components/DropdownMenu.php
+++ b/app/Views/Components/DropdownMenu.php
@@ -11,6 +11,12 @@ class DropdownMenu extends Component
{
public string $id = '';
+ public string $placement = 'bottom-end';
+
+ public string $offsetX = '0';
+
+ public string $offsetY = '0';
+
public array $items = [];
public function setItems(string $value): void
@@ -48,7 +54,9 @@ class DropdownMenu extends Component
class="absolute z-50 flex flex-col py-2 text-black whitespace-no-wrap bg-white border-black rounded-lg border-3"
aria-labelledby="{$this->labelledby}"
data-dropdown="menu"
- data-dropdown-placement="bottom-end">{$menuItems}
+ data-dropdown-placement="{$this->placement}"
+ data-dropdown-offset-x="{$this->offsetX}"
+ data-dropdown-offset-y="{$this->offsetY}">{$menuItems}
HTML;
}
}
diff --git a/app/Views/Components/Forms/Checkbox.php b/app/Views/Components/Forms/Checkbox.php
index 69973dc6..e9070873 100644
--- a/app/Views/Components/Forms/Checkbox.php
+++ b/app/Views/Components/Forms/Checkbox.php
@@ -17,12 +17,16 @@ class Checkbox extends FormComponent
public function render(): string
{
+ $attributes = [
+ 'id' => $this->value,
+ 'name' => $this->name,
+ 'class' => 'form-checkbox text-pine-500 border-black border-3 focus:ring-castopod w-6 h-6',
+ ];
+ if ($this->required) {
+ $attributes['required'] = 'required';
+ }
$checkboxInput = form_checkbox(
- [
- 'id' => $this->value,
- 'name' => $this->name,
- 'class' => 'form-checkbox text-pine-500 border-black border-3 focus:ring-castopod w-6 h-6',
- ],
+ $attributes,
'yes',
old($this->name) ? old($this->name) === $this->value : $this->isChecked,
);
@@ -30,10 +34,7 @@ class Checkbox extends FormComponent
$hint = $this->hint === null ? '' : hint_tooltip($this->hint, 'ml-1');
return <<
- {$checkboxInput}
- {$this->slot}{$hint}
-
+
HTML;
}
}
diff --git a/app/Views/Components/Forms/Field.php b/app/Views/Components/Forms/Field.php
index dd70c639..8f81fc24 100644
--- a/app/Views/Components/Forms/Field.php
+++ b/app/Views/Components/Forms/Field.php
@@ -40,12 +40,15 @@ class Field extends FormComponent
unset($fieldComponentAttributes['helperText']);
unset($fieldComponentAttributes['hintText']);
- $fieldComponentAttributes = flatten_attributes($fieldComponentAttributes);
+ $fieldComponentAttributes['class'] = 'mb-1';
+
+ $element = __NAMESPACE__ . '\\' . $this->as;
+ $fieldElement = new $element($fieldComponentAttributes);
return <<
{$this->label}
- as} {$fieldComponentAttributes} class="mb-1"/>
+ {$fieldElement->render()}
{$helperText}
HTML;
diff --git a/app/Views/Components/Forms/Radio.php b/app/Views/Components/Forms/Radio.php
index fa1010fd..e34f25f2 100644
--- a/app/Views/Components/Forms/Radio.php
+++ b/app/Views/Components/Forms/Radio.php
@@ -26,7 +26,7 @@ class Radio extends FormComponent
);
return <<{$radioInput}{$this->slot}
+
HTML;
}
}
diff --git a/app/Views/Components/Heading.php b/app/Views/Components/Heading.php
index 249bc183..2ddd3306 100644
--- a/app/Views/Components/Heading.php
+++ b/app/Views/Components/Heading.php
@@ -23,7 +23,7 @@ class Heading extends Component
'large' => 'text-3xl',
];
- $class = $this->class . ' relative z-10 font-bold text-pine-800 font-display before:w-full before:absolute before:h-1/2 before:left-0 before:bottom-0 before:rounded-full before:bg-pine-100 before:-z-10 ' . $sizeClasses[$this->size];
+ $class = $this->class . ' relative z-10 font-bold text-pine-800 font-display before:w-full before:absolute before:h-1/2 before:left-0 before:bottom-0 before:rounded-full before:bg-pine-100 before:z-[-10] ' . $sizeClasses[$this->size];
return <<tagName} class="{$class}">{$this->slot}{$this->tagName}>
diff --git a/tailwind.config.js b/tailwind.config.js
index dbc52011..cf66ca79 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -51,20 +51,15 @@ module.exports = {
admin: "300px calc(100% - 300px)",
podcast: "1fr minmax(auto, 960px) 1fr",
podcastMain: "1fr minmax(200px, 300px)",
- podcasts: "repeat(auto-fill, minmax(14rem, 1fr))",
+ cards: "repeat(auto-fill, minmax(14rem, 1fr))",
+ latestEpisodes: "repeat(5, 1fr)",
},
gridTemplateRows: {
admin: "40px 1fr",
},
- zIndex: {
- "-10": "-10",
- },
borderWidth: {
3: "3px",
},
- ringWidth: {
- 3: "3px",
- },
},
},
variants: {},
diff --git a/themes/cp_admin/_layout.php b/themes/cp_admin/_layout.php
index daf87339..2bac8cff 100644
--- a/themes/cp_admin/_layout.php
+++ b/themes/cp_admin/_layout.php
@@ -26,11 +26,11 @@