<html>
<head>
    <title>Post by <%= post.screen_name %></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="<%= /*cdnURL*/ %>/css/juxt.css">
    <script src="https://portal.cdn.pretendo.cc/js/pjax.min.js"></script>
    <script src="https://portal.cdn.pretendo.cc/js/juxt.js"></script>
    <link rel="manifest" href="/web/manifest.json">
    <!-- Global site tag (gtag.js) - Google Analytics Testing-->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-195842548-1"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'UA-195842548-1');
    </script>
    <!-- Google / Search Engine Tags -->
    <meta itemprop="name" content="Juxtaposition - Post by <%= post.screen_name %>">
    <meta itemprop="description" content="<%= community.name %> - <%= post.empathy_count%> Yeahs!">
    <% if(post.screenshot !== '') { %>
        <meta itemprop="image" content="https://portal.cdn.pretendo.cc/screenshot/<%= post.id %>.png?asdsadas">
    <%} else if(post.painting !== '') { %>
        <meta itemprop="image" content="https://portal.cdn.pretendo.cc/drawing/<%= post.id %>.png?asdsadas">
    <%}%>

    <!-- Open Graph Meta Tags -->
    <meta property="og:title" content="Juxt - Post by <%= post.screen_name %>"/>
    <meta property="og:description" content="<%= community.name %> - <%= post.empathy_count%> Yeahs!"/>
    <meta property="og:url" content="https://juxt.pretendo.cc/posts/<%= post.id %>"/>
    <% if(post.screenshot !== '') { %>
        <meta property="og:image" content="https://portal.cdn.pretendo.cc/screenshot/<%= post.id %>.png?asdsadas"/>
    <%} else if(post.painting !== '') { %>
        <meta property="og:image" content="https://portal.cdn.pretendo.cc/drawing/<%= post.id %>.png?asdsadas"/>
    <%}%>
    <meta property="og:site_name" content="Juxtaposition" />

    <!-- Twitter Meta Tags -->
    <meta name="twitter:card" content="summary_large_image"/>
    <meta name="twitter:title" content="Juxt - Post by <%= post.screen_name %>"/>
    <meta name="twitter:description" content="<%= community.name %> - <%= post.empathy_count%> Yeahs!"/>
    <meta name="twitter:site" content="@PretendoNetwork"/>
    <% if(post.screenshot !== '') { %>
        <meta name="twitter:image" content="https://portal.cdn.pretendo.cc/screenshot/<%= post.id %>.png?asdsadas"/>
    <%} else if(post.painting !== '') { %>
        <meta name="twitter:image" content="https://portal.cdn.pretendo.cc/drawing/<%= post.id %>.png?asdsadas"/>
    <%}%>
    <meta name="twitter:creator" content="@PretendoNetwork"/>

</head>
<body>
<div id="main">
    <%- include('nav_bar', { selection: 1 }); %>
    <div id="toast"></div>
    <div class="community-page-post-box">
        <div id="wrapper">
            <h1 id="title" class="page-header">Post</h1>
            <div id="wrapper">
                <%- include('post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, reply: false }); %>
                <span class="replies-line"></span>
                <% replies.forEach(function(post) { %>
                    <%- include('post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, reply: true }); %>
                    <span class="replies-line"></span>
                <% }); %>
            </div>
        </div>
    </div>
</div>
<script>
    function copyToClipboard(text) {
        let inputc = document.getElementsByTagName("header")[0].appendChild(document.createElement("input"));
        inputc.value = text;
        inputc.focus();
        inputc.select();
        document.execCommand('copy');
        inputc.parentNode.removeChild(inputc);
        Toast("Copied to clipboard.");
    }
    function Toast(text) {
        var x = document.getElementById("toast");
        x.innerText = text;
        x.className = "show";
        setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
    }
</script>
</body>
</html>
