Skip to content

Commit

Permalink
adição de script de anuncios
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiscleverson committed Apr 21, 2024
1 parent feb347c commit 89e1ffb
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 3 deletions.
27 changes: 27 additions & 0 deletions static/css/ads.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.mobileShow {
display: none;
margin-left: auto;
margin-right: auto;
}

/* Smartphone Portrait and Landscape */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px){
.mobileShow {
display: inline;
}
}

.mobileHide {
display: inline;
margin-left: auto;
margin-right: auto;
}

/* Smartphone Portrait and Landscape */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px){
.mobileHide { display: none;}
}
32 changes: 30 additions & 2 deletions templates/blog/render_text.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,40 @@ <h1 class="post-title">{{title}}</h1>

<div id="markdown-preview" class="container-body" ></div>


<div class="mobileShow">
<script type="text/javascript">
atOptions = {
'key' : 'c34b890830441c5779af24050c237fdb',
'format' : 'iframe',
'height' : 250,
'width' : 300,
'params' : {}
};
</script>
<script type="text/javascript" src="//www.topcreativeformat.com/c34b890830441c5779af24050c237fdb/invoke.js"></script>
</div>

<div class="mobileHide">
<script type="text/javascript">
atOptions = {
'key' : 'e8da11898f0876eb2f24d27e7c94739b',
'format' : 'iframe',
'height' : 90,
'width' : 728,
'params' : {}
};
</script>
<script type="text/javascript" src="//www.topcreativeformat.com/e8da11898f0876eb2f24d27e7c94739b/invoke.js"></script>
</div>


<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
const text = ({{body | tojson | safe}});

const htmlPreview = document.getElementById('markdown-preview');
htmlPreview.innerHTML = marked.parse(text);
});
</script>
</script>
{% endblock %}
4 changes: 3 additions & 1 deletion templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
<link rel="stylesheet" href="{{ url_for('static', filename='css/reset.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/markdown.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/ads.css') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">

<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
</head>
<body>
Expand All @@ -42,7 +44,7 @@
</main>
{% include 'components/footer.html' %}
</body>
<script type="text/javascript" src="{{ url_for('static', filename='js/btCloseAlert.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/btCloseAlert.js') }}"></>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
</html>

0 comments on commit 89e1ffb

Please sign in to comment.