Skip to content

Commit d685752

Browse files
author
eastcoastdeveloper
committed
3 files modified
1 parent e612af4 commit d685752

File tree

3 files changed

+63
-34
lines changed

3 files changed

+63
-34
lines changed

src/app/app.component.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
<header>
2-
<div class="fat-arrow">
3-
<span>( ) =</span>
4-
<span class="caret">&#62;</span>
5-
</div>
6-
</header>
71

82
<div id="dropdown-component">
93
<div class="selected" (click)="toggleMenu()">

src/index.html

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,63 @@
11
<my-app>loading</my-app>
2+
3+
<footer id="rotatingFooter"></footer>
4+
5+
<!-- Footer -->
6+
<script>
7+
const footer = document.getElementById('rotatingFooter');
8+
9+
const footerItems = [
10+
{
11+
img: 'https://webdevunlimited.tech/images/amazon-logo.png',
12+
text: 'CMSs, E-Commerce Tools, & Website Builders Explained',
13+
link: 'https://tinyurl.com/3m5hyrk5',
14+
},
15+
{
16+
img: 'https://webdevunlimited.tech/images/favicon.png',
17+
text: 'Web Dev Unlimited',
18+
link: 'https://webdevunlimited.tech/',
19+
},
20+
];
21+
22+
Object.assign(footer.style, {
23+
position: 'fixed',
24+
bottom: '0',
25+
left: '0',
26+
width: '100%',
27+
background: '#0c1020',
28+
color: '#fff',
29+
textAlign: 'center',
30+
padding: '5px',
31+
display: 'flex',
32+
alignItems: 'center',
33+
justifyContent: 'center',
34+
gap: '10px',
35+
zIndex: '9999',
36+
fontFamily: 'sans-serif',
37+
});
38+
39+
const img = document.createElement('img');
40+
img.style.height = '25px';
41+
img.style.width = 'auto';
42+
img.style.borderRadius = '4px';
43+
44+
const textLink = document.createElement('a');
45+
textLink.style.color = '#fff';
46+
textLink.style.textDecoration = 'none';
47+
textLink.style.fontSize = '.9rem';
48+
49+
footer.appendChild(img);
50+
footer.appendChild(textLink);
51+
52+
function showRandomItem() {
53+
const item = footerItems[Math.floor(Math.random() * footerItems.length)];
54+
img.src = item.img;
55+
textLink.href = item.link;
56+
textLink.textContent = item.text;
57+
textLink.target = '_blank';
58+
textLink.rel = 'noopener noreferrer';
59+
}
60+
61+
showRandomItem();
62+
setInterval(showRandomItem, 10000);
63+
</script>

src/styles.scss

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,4 @@ html,
22
body {
33
margin: 0;
44
padding: 0;
5-
}
6-
header {
7-
font: normal 14px sans-serif;
8-
letter-spacing: 0.5px;
9-
cursor: pointer;
10-
background-color: #313b3f;
11-
color: #d9a74a;
12-
overflow: auto;
13-
padding: 5px 20px 7px 15px;
14-
position: relative;
15-
.fat-arrow {
16-
position: relative;
17-
float: left;
18-
height: 100%;
19-
display: grid;
20-
grid-template-columns: repeat(2, auto);
21-
span {
22-
font-size: 20px;
23-
font-style: italic;
24-
}
25-
.caret {
26-
font-size: 30px;
27-
line-height: 22px;
28-
display: inline-block;
29-
font-weight: lighter;
30-
}
31-
}
32-
}
5+
}

0 commit comments

Comments
 (0)