﻿<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Ihor Vansach (ihor@magefan.com). All rights reserved.
 * See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
 *
 * Glory to Ukraine! Glory to the heroes!
 */
-->
<page layout="pramp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="amp_blog_default"/>
    <body>
        <move element="blog.post" destination="amp.content" before="-" />
        <referenceBlock name="head.additional">
            <block class="Magefan\Blog\Block\Amp\Og\Post"
                name="amp.ogtags"
                as="amp.ogtags"
                template="Plumrocket_Amp::head/ogtags.phtml" />
            <block class="Magefan\Blog\Block\Amp\Ldjson\Post"
                name="amp.ldjson" as="amp.ldjson"
                template="Plumrocket_Amp::head/ldjson.phtml" />
        </referenceBlock>
        <referenceBlock name="ampcss">
            <block class="Plumrocket\Amp\Block\Page\Head\Style" name="ampcss.blog.post.list" as="ampcss.blog.post.view" template="Magefan_Blog::amp/head/css/blog_post_view.phtml"/>
        </referenceBlock>
        <referenceBlock name="ampjs">
            <action method="addJs">
                <argument name="src" xsi:type="string">https://cdn.ampproject.org/v0/amp-social-share-0.1.js</argument>
                <argument name="type" xsi:type="string">amp-social-share</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="blog.post">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Magefan_Blog::amp/post/view.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="blog.post.info">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Magefan_Blog::amp/post/info.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="blog.post.relatedposts">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Magefan_Blog::amp/post/view/relatedposts.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="blog.post.nextprev">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Magefan_Blog::amp/post/view/nextprev.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="blog.post.relatedproducts">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Magefan_Blog::amp/post/view/relatedproducts.phtml</argument>
            </action>
        </referenceBlock>

        <referenceBlock name="blog.post.bottom">
            <block class="Magento\Framework\View\Element\Template" name="amp.blog.post.social.share" template="Magefan_Blog::amp/post/view/socialshare.phtml" before="blog.post.relatedposts" />
        </referenceBlock>

        <referenceBlock name="blog.post.comments" remove="true" />
        <referenceBlock name="blog.post.opengraph" remove="true" />
        <referenceBlock name="blog.post.richsnippets" remove="true" />
    </body>
</page>
