contao-themes-net / nature-theme-bundle

nature theme bundle for contao cms
Other
7 stars 2 forks source link

ERROR Element style not allowed as child of element body in this context. #17

Closed magicsepp closed 3 years ago

magicsepp commented 3 years ago

Hallo unter https://validator.w3.org/nu/?doc=https%3A%2F%2Fnature.contao-themes.net%2Fmit-linker-spalte.html zu sehen. Ursache fe_page_nature: <?= $this->framework ?> gehört in den head Bereich vermutlich auch <?= $this->mooScripts ?>

Damit sieht der Dateianfang dann eher so aus


<?php $this->extend('fe_page'); ?>

<?php $this->block('head'); ?>
    <meta charset="<?= $this->charset ?>">
    <title><?= $this->title ?></title>
    <base href="<?= $this->base ?>">

    <meta name="robots" content="<?= $this->robots ?>">
    <meta name="description" content="<?= $this->description ?>">
    <meta name="generator" content="Contao Open Source CMS">

    <meta property="og:title" content="<?php echo $this->pageTitle; ?> - <?php echo $this->mainTitle; ?>" />
    <meta property="og:description" content="<?php echo $this->description; ?>" />
    <meta property="og:url" content="{{env::url}}/{{env::request}}" />
    <?php if($GLOBALS['og:image']) echo '<meta property="og:image" content="'.$GLOBALS['og:image'].'" />'; ?>

    <link rel="shortcut icon" href="files/naturetheme/img/favicon.ico" type="image/x-icon" />
    <?= $this->viewport ?>
    <?= $this->framework ?>
            <style>
        #wrapper { display: none; }
    </style>
...
magicsepp commented 3 years ago

generell gefixed mit https://github.com/contao-themes-net/nature-theme-bundle/commit/c1221d59374240d62649b0634b1c540abeb929f7

schöner vom Quelltext wäre doch wenn die styles -Tags beieinander wären:

    <style>
        #wrapper { display: none; }
    </style>
    <?= $this->framework ?>
seibtph commented 3 years ago

Ich habe die eine CSS-Zeile entfernt, da sie jetzt sowieso überflüssig ist, wenn das CSS im Head geladen wird.

Version 1.3.8 ist nun veröffentlicht.