git.shiar.nl
/
sc2-widget
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
widget styling similar to blizzard's battle.net
[sc2-widget]
/
widget.html
diff --git
a/widget.html
b/widget.html
index 88d5285d1c3f954cc16c9357566a6dccb28f3b77..b3371970475d1d061a2ab6f964064ec44d4ccebf 100644
(file)
--- a/
widget.html
+++ b/
widget.html
@@
-4,6
+4,9
@@
<head>
<meta charset="utf-8" />
<title>StarCraft ][ Clan summary</title>
<head>
<meta charset="utf-8" />
<title>StarCraft ][ Clan summary</title>
+<link rel="stylesheet" type="text/css" href="/schtarr/battle.css" />
+<meta name="theme-color" content="#000D1A" />
+<meta name="viewport" content="width=device-width" />
</head>
<body>
</head>
<body>
@@
-13,8
+16,8
@@
.then(res => res.json())
.then(json => {
let out = document.getElementById('clan');
.then(res => res.json())
.then(json => {
let out = document.getElementById('clan');
- out.innerHTML = `<h1>${json.tag}</h1><h2 title="Division ${json.division}">${json.league} <small>#${json.rank}</small></h2>`
- + json.members.map(member => `<a href="${member.profileUrl}"><
img src="${member.avatarUrl}" title="${member.name}" /
></a>`).join('');
+ out.innerHTML = `<h1>${json.tag}</h1><h2 title="Division ${json.division}"
class="rank ${json.league}"
>${json.league} <small>#${json.rank}</small></h2>`
+ + json.members.map(member => `<a href="${member.profileUrl}"><
figure><img src="${member.avatarUrl}" title="${member.name}" /><figcaption>${member.name}</figcaption></figure
></a>`).join('');
})
.catch(error => console.log(error))
</script>
})
.catch(error => console.log(error))
</script>