Commit 65367295 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat: integrate stylized form components and update podcast edit page

parent 23bdc6f8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -22,11 +22,12 @@ class Component implements ComponentInterface
     */
    public function __construct(array $attributes)
    {
        helper('viewcomponents');

        if ($attributes !== []) {
            $this->hydrate($attributes);
        }
        // overwrite default attributes if set

        $this->attributes = array_merge($this->attributes, $attributes);
    }

+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ class ComponentRenderer
    private function renderPairedTags(string $output): string
    {
        $pattern = '/<\s*(?<name>[A-Z][A-Za-z0-9\.]*?)(?<attributes>[\s\S\=\'\"]*)>(?<slot>.*)<\/\s*\1\s*>/uUsm';

        ini_set('pcre.backtrack_limit', '-1');
        /*
            $matches[0] = full tags matched and all of its content
            $matches[name] = pascal cased tag name
+33 −0
Original line number Diff line number Diff line
<?php

declare(strict_types=1);

if (! function_exists('flatten_attributes')) {
    /**
     * Stringify attributes for use in HTML tags.
     *
     * Helper function used to convert a string, array, or object of attributes to a string.
     *
     * @param mixed $attributes string, array, object
     */
    function flatten_attributes($attributes, bool $js = false): string
    {
        $atts = '';

        if ($attributes === null) {
            return $atts;
        }

        if (is_string($attributes)) {
            return ' ' . $attributes;
        }

        $attributes = (array) $attributes;

        foreach ($attributes as $key => $val) {
            $atts .= ($js) ? $key . '=' . esc($val, 'js') . ',' : ' ' . $key . '="' . $val . '"';
        }

        return rtrim($atts, ',');
    }
}
+7 −2
Original line number Diff line number Diff line
@@ -57,12 +57,17 @@ export class XMLEditor extends LitElement {

  static styles = css`
    .cm-wrap {
      border: 1px solid #6b7280;
      border-radius: 0.5rem;
      overflow: hidden;
      border: 3px solid #000000;
      background-color: #ffffff;
    }
    .cm-editor.cm-focused {
      outline: 2px solid transparent;
      box-shadow: 0 0 0 1px #2563eb;
      box-shadow: 0 0 0 2px #e7f9e4, 0 0 0 calc(4px) #009486;
    }
    .cm-gutters {
      background-color: #ffffff !important;
    }
  `;

+1 −1
Original line number Diff line number Diff line
.breadcrumb {
  @apply inline-flex flex-wrap px-1 py-2 text-sm;
  @apply inline-flex flex-wrap px-1 text-sm;
}

.breadcrumb-item + .breadcrumb-item::before {
Loading