diff --git a/forum.php b/forum.php index c5e02f7..60ab01c 100644 --- a/forum.php +++ b/forum.php @@ -23,6 +23,7 @@ function TransformToBBCode($string) { '[link={$1}]{$2}[/link]' => '$2', '[color={$1}]{$2}[/color]' => '$2', '[*]{$1}[/*]' => '
  • $1
  • ', + '[youtube]{$1}[/youtube]' => '
    ', ); foreach ($tags as $tag => $value) { diff --git a/index.php b/index.php index dc9d0e8..5569974 100644 --- a/index.php +++ b/index.php @@ -63,6 +63,7 @@ '[link={$1}]{$2}[/link]' => '$2', '[color={$1}]{$2}[/color]' => '$2', '[*]{$1}[/*]' => '
  • $1
  • ', + '[youtube]{$1}[/youtube]' => '
    ', ); foreach ($tags as $tag => $value) { $code = preg_replace('/placeholder([0-9]+)/', '(.*?)', preg_quote(preg_replace('/\{\$([0-9]+)\}/', 'placeholder$1', $tag), '/')); diff --git a/layout/css/style.css b/layout/css/style.css index bef6115..49bdc87 100644 --- a/layout/css/style.css +++ b/layout/css/style.css @@ -628,3 +628,25 @@ hr { background-color: green; border: 1px solid black; } + +/* ///////////\/\\\\\\\\\\\ + // Znote YOUTUBE BB \\ + ///////////\/\\\\\\\\\\\ */ + +div.youtube { + width: 100%; + max-width: 560px; +} + +div.aspectratio { + width: 100%; + padding-bottom: 56.25%; /* 16:9 */ + position: relative; +} + +div.aspectratio > iframe { + position: absolute; + top: 0; bottom: 0; left: 0; right: 0; + width: 100%; + height: 100%; +}