forked from samuelcarreira/rss-marquee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
101 lines (82 loc) · 2.72 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RSS Marquee Test</title>
<meta name="author" content="Samuel Carreira">
<meta name="dcterms.dateCopyrighted" content="2020">
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon.png">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@200;700&display=swap" rel="stylesheet">
<style>
body {
background: #D3959B;
background: linear-gradient(to right, #BFE6BA, #D3959B);
margin: 0;
font-family: 'Montserrat', sans-serif;
}
#container {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: space-between;
height: 100vh;
}
#marquee {
background-color: #ecf1eb;
letter-spacing: 0.2pt;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
font-weight: 700;
margin: 0 2vh 3vh 2vh;
font-size: 3vh;
padding: 1vh;
border-radius: 1.5vh;
}
h1 {
font-weight: 200;
text-align: center;
font-size: calc(6vw + 6vh + 3vmin);
background: -webkit-linear-gradient(#0f0c29, #302b63, #24243e);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-51613376-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-51613376-2');
</script>
</head>
<body>
<div id="container">
<div>
<h1>
RSS Marquee Test
</h1>
</div>
<div>
<div id="marquee"></div>
</div>
</div>
<script src="rss-marquee.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
const feedUrl = ['https://cors-anywhere.herokuapp.com/https://www.buzzfeed.com/world.xml',
'https://www.dnoticias.pt/rss/home.xml',
'https://www.dnoticias.pt/rss/mundo.xml'
];
const elementSelector = document.getElementById('marquee');
new RSSMarquee(feedUrl, elementSelector, {
speed: 105,
maxItems: 3
});
});
</script>
</body>
</html>