Skip to content

Commit

Permalink
Merge pull request ant-media#164 from timantmedia/bf-banner
Browse files Browse the repository at this point in the history
Bf banner
  • Loading branch information
timantmedia authored Nov 21, 2023
2 parents 68f8a0a + a069e58 commit ae2d3e5
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 5 deletions.
13 changes: 11 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ const config = {
locales: ['en'],
},

scripts: [
{
src: 'js/script.js',
async: false,
}
],

presets: [
[
'classic',
Expand Down Expand Up @@ -245,9 +252,11 @@ const config = {
darkTheme: darkCodeTheme,
},
announcementBar: {
id: 'AWS Streaming Service Wizard',
id: 'announcement-bar',
content:
`<div style="font-size:16px;">
`
<iframe id="black-friday-banner" src="/html/bf.html" width="100%" height="90px"></iframe>
<div style="font-size:16px;">
<a target="_blank" href="https://antmedia.io/create-your-own-streaming-service-on-aws-in-5-minutes/">
<strong>How to Get Your Own Auto Scalable Streaming Service on AWS in 5 minutes?</strong>
</a>
Expand Down
18 changes: 15 additions & 3 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
*/

/* You can override the default Infima variables here. */
@media (min-width: 997px) {
:root {
--docusaurus-announcement-bar-height: auto !important;
}
}

:root {
--ifm-color-primary: #a10310;
--ifm-color-primary-dark: #85030d;
Expand All @@ -16,8 +22,11 @@
--ifm-code-font-size: 90%;
--ifm-code-border-radius: 2px;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
--docusaurus-announcement-bar-height: auto !important;
}



/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #f5e6e7;
Expand Down Expand Up @@ -79,7 +88,10 @@ code{
}


.announcementBar_node_modules-\@docusaurus-theme-classic-lib-theme-AnnouncementBar-styles-module{
min-height: 40px !important;
padding: 5px !important;
@media screen and (min-width: 0px) and (max-width: 1220px) {
#black-friday-banner { display: none; } /* hide it elsewhere */
}

#black-friday-banner{
margin-top: -5px;
}
175 changes: 175 additions & 0 deletions static/html/bf.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">

</head>
<body>
<style>
.bf_line a.button {
padding: 10px 20px !important;
}
.bf_line {
background: #1D1D1D;
color: #fff;
padding: 20px 0 14px;
}

.flex_c_spb {
display: flex;
align-items: center;
justify-content: space-between;
}
.sep {
width: 2px;
background: #df2018;
height: 48px;
margin: 0 40px;
}
.bf_desc {
display: flex;
align-items: center;
max-width: 275px;
}
.bf_desc strong {
font-size: 32px;
line-height: 36px;
font-weight: 600;
margin: 0 12px 0 0;
}
.bf_desc p {
color: white !important;
font-size: 14px !important;
line-height: 18px !important;
font-weight: 600 !important;
letter-spacing: .5px;
text-transform: uppercase;
margin: 0 !important;
}
.bf_line div#cd {
margin: 0;
}
div#cd {
display: flex;
max-width: 448px;
justify-content: space-between;
margin: 45px auto;
color: #fff;
}
.bf_line div#cd .num div {
font-size: 24px;
min-width: unset;
width: 54px;
color: black;
background: white;
text-align: center;
margin: 0 3px;
border-radius: 3px;
}
.bf_line div#cd .num p {
font-size: 11px !important;
letter-spacing: 1px;
text-align: center;
color: #fff !important;
margin: 4px 0 0 !important;
}
p {
font-family: inherit !important;
color: black;
}
.css-sawfha-Button-Button, .n2-ss-button-container a, .ow-button-base a, .btn, .btn-success, .btn-primary, .button, button {
font-family: inherit !important;
font-size: 15px !important;
font-weight: 600 !important;
color: white !important;
letter-spacing: -0.5px !important;
background: #df0517 !important;
border: none !important;
padding: 12px 30px !important;
box-shadow: none !important;
border-radius: 3px !important;
text-transform: capitalize !important;
opacity: 1 !important;
}
.flex_c_spb img {
max-width: 290px;
}

img {
height: auto;
}
</style>
<div class="bf_line">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="flex_c_spb">
<div class="flex_c_spb mob_part">
<img src="https://mirror.antmedia.io/wp-content/uploads/2023/11/bf_logo.png">
<div class="sep"></div>
<div class="bf_desc">
<strong>-25%</strong>
<p>on Annual and Perpetual licenses</p>
</div>
<div class="sep"></div>
</div>
<div id="cd">
<div class="num">
<div id="h_num1">9</div>
<p>days</p>
</div>
<div class="num">
<div id="h_num2">11</div>
<p>hours</p>
</div>
<div class="num">
<div id="h_num3">14</div>
<p>minutes</p>
</div>
<div class="num">
<div id="h_num4">3</div>
<p>seconds</p>
</div>
</div>

<a class="button" target="_blank" href="https://antmedia.io/black-friday">Buy Now</a>
</div>
</div>
</div>
</div>
</div>
<script>
// Set the date we're counting down to
var countDownDate = new Date("Dec 01, 2023 00:00:00 GMT+0300").getTime();

var x = setInterval(function () {
var now = new Date().getTime();
var distance = countDownDate - now;

var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);

document.getElementById("h_num1").innerHTML = days;
document.getElementById("h_num2").innerHTML = hours;
document.getElementById("h_num3").innerHTML = minutes;
document.getElementById("h_num4").innerHTML = seconds;

if (distance < 0) {
clearInterval(x);
document.getElementById("h_hum1").innerHTML = 0;
document.getElementById("h_num2").innerHTML = 0;
document.getElementById("h_num3").innerHTML = 0;
document.getElementById("h_num4").innerHTML = 0;
}
}, 1000);
</script>
<!-- Black friday end -->
</body>
</html>

0 comments on commit ae2d3e5

Please sign in to comment.