JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>EURO 2016 - Tournament tree</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="styles.css" />
</head>
<body>
<h1>EURO 2016 - tournament tree</h1>
<div class="tournament-tree">
<div class="slot slot--18-1 slot--top slot--left">
<div class="team team--home">
<span class="team__name">Szwajcaria</span><span class="team__score">1</span>
</div>
<div class="team team--away team--winner">
<span class="team__name">Polska</span><span class="team__score">1</span>
</div>
</div>
<div class="slot slot--18-2 slot--left">
<div class="team team--home">
<span class="team__name">Chorwacja</span><span class="team__score">0</span>
</div>
<div class="team team--away team--winner">
<span class="team__name">Portugalia</span><span class="team__score">1</span>
</div>
</div>
<div class="slot slot--18-3 slot--top slot--left">
<div class="team team--home team--winner">
<span class="team__name">Walia</span><span class="team__score">1</span>
</div>
<div class="team team--away">
<span class="team__name">Irlandia Północna</span><span class="team__score">0</span>
</div>
</div>
<div class="slot slot--18-4 slot--left">
<div class="team team--home">
<span class="team__name">Węgry</span><span class="team__score">0</span>
</div>
<div class="team team--away team--winner">
<span class="team__name">Belgia</span><span class="team__score">4</span>
</div>
</div>
<div class="slot slot--18-5 slot--top slot--right">
<div class="team team--home team--winner">
<span class="team__name">Niemcy</span><span class="team__score">3</span>
</div>
<div class="team team--away">
<span class="team__name">Słowacja</span><span class="team__score">0</span>
</div>
</div>
<div class="slot slot--18-6 slot--right">
<div class="team team--home team--winner">
<span class="team__name">Włochy</span><span class="team__score">2</span>
</div>
<div class="team team--away">
<span class="team__name">Hiszpania</span><span class="team__score">0</span>
</div>
</div>
<div class="slot slot--18-7 slot--top slot--right">
<div class="team team--home team--winner">
<span class="team__name">Francja</span><span class="team__score">2</span>
</div>
<div class="team team--away">
<span class="team__name">Irlandia</span><span class="team__score">1</span>
</div>
</div>
<div class="slot slot--18-8 slot--right">
<div class="team team--home">
<span class="team__name">Anglia</span><span class="team__score">1</span>
</div>
<div class="team team--away team--winner">
<span class="team__name">Islandia</span><span class="team__score">2</span>
</div>
</div>
<div class="slot slot--14-1 slot--left">
<div class="team team--home">
<span class="team__name">Polska</span><span class="team__score">1</span>
</div>
<div class="team team--away team--winner">
<span class="team__name">Portugalia</span><span class="team__score">1</span>
</div>
</div>
<div class="slot slot--14-2 slot--left">
<div class="team team--home team--winner">
<span class="team__name">Walia</span><span class="team__score">3</span>
</div>
<div class="team team--away">
<span class="team__name">Belgia</span><span class="team__score">1</span>
</div>
</div>
<div class="slot slot--14-3 slot--right">
<div class="team team--home team--winner">
<span class="team__name">Niemcy</span><span class="team__score">1</span>
</div>
<div class="team team--away">
<span class="team__name">Włochy</span><span class="team__score">1</span>
</div>
</div>
<div class="slot slot--14-4 slot--right">
<div class="team team--home team--winner">
<span class="team__name">Francja</span><span class="team__score">5</span>
</div>
<div class="team team--away">
<span class="team__name">Islandia</span><span class="team__score">2</span>
</div>
</div>
<div class="slot slot--12-1 slot--left">
<div class="team team--home team--winner">
<span class="team__name">Portugalia</span><span class="team__score">2</span>
</div>
<div class="team team--away">
<span class="team__name">Walia</span><span class="team__score">0</span>
</div>
</div>
<div class="slot slot--12-2 slot--right">
<div class="team team--home">
<span class="team__name">Niemcy</span><span class="team__score">0</span>
</div>
<div class="team team--away team--winner">
<span class="team__name">Francja</span><span class="team__score">2</span>
</div>
</div>
<div class="slot slot--11-1">
<div class="team team--home team--winner">
<span class="team__name">Portugalia</span><span class="team__score">1</span>
</div>
<div class="team team--away">
<span class="team__name">Francja</span><span class="team__score">0</span>
</div>
</div>
</div>
</body>
</html>
*,
*:after,
*:before {
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 14px;
margin: 0 auto;
padding: 1rem;
background: #eee;
}
h1 {
text-align: center;
text-transform: uppercase;
}
.tournament-tree {
display: grid;
width: 1216px;
margin: auto;
grid-gap: 16px;
grid-template-rows: 80px;
grid-template-columns: 160px;
grid-template-areas:
'slot--18-1 . . . . . slot--18-5'
'. slot--14-1 . . . slot--14-3 .'
'slot--18-2 . . . . . slot--18-6'
'. . slot--12-1 slot--11-1 slot--12-2 . .'
'slot--18-3 . . . . . slot--18-7'
'. slot--14-2 . . . slot--14-4 .'
'slot--18-4 . . . . . slot--18-8';
}
.slot--18-1 { grid-area: slot--18-1; }
.slot--18-2 { grid-area: slot--18-2; }
.slot--18-3 { grid-area: slot--18-3; }
.slot--18-4 { grid-area: slot--18-4; }
.slot--18-5 { grid-area: slot--18-5; }
.slot--18-6 { grid-area: slot--18-6; }
.slot--18-7 { grid-area: slot--18-7; }
.slot--18-8 { grid-area: slot--18-8; }
.slot--14-1 { grid-area: slot--14-1; }
.slot--14-2 { grid-area: slot--14-2; }
.slot--14-3 { grid-area: slot--14-3; }
.slot--14-4 { grid-area: slot--14-4; }
.slot--12-1 { grid-area: slot--12-1; }
.slot--12-2 { grid-area: slot--12-2; }
.slot--11-1 { grid-area: slot--11-1; }
.slot {
border: 1px solid #263e6d;
background: #fff;
position: relative;
height: 80px;
width: 160px;
}
.slot:after,
.slot:before {
content: '';
background: #b70711;
position: absolute;
top: 50%;
}
/** right side **/
.slot--left:after,
.slot--11-1:after,
[class*="slot--14-"].slot--right:before {
width: 8px;
height: 2px;
right: 0;
transform: translate(100%, -50%);
}
/** left side **/
.slot--right:after,
.slot--11-1:before,
[class*="slot--14-"].slot--left:before {
width: 8px;
height: 2px;
left: 0;
transform: translate(-100%, -50%);
}
[class*="slot--12-"].slot--left:after {
left: 0;
transform: translate(-100%, -50%);
}
[class*="slot--12-"].slot--left:before,
[class*="slot--12-"].slot--right:before {
width: 2px;
height: 386px;
}
.slot--12-1:before {
left: 0;
transform: translate(-10px, -50%);
}
[class*="slot--12-"].slot--right:after {
left: auto;
right: 0;
transform: translate(100%, -50%);
}
[class*="slot--12-"].slot--right:before {
right: 0;
left: auto;
transform: translate(10px, -50%);
}
[class*="slot--18-"].slot--top:before {
width: 2px;
height: 194px;
}
[class*="slot--18-"].slot--top.slot--left:before {
right: 0;
transform: translate(10px, -1px);
}
[class*="slot--18-"].slot--top.slot--right:before {
left: 0;
transform: translate(-10px, -1px);
}
.slot--11-1:after,
.slot--11-1:before {
width: 18px;
}
.team {
height: 40px;
display: flex;
justify-content: space-between;
align-items: stretch;
font-weight: 700;
background: #ddd;
}
.team--home {
border-bottom: 2px solid #b70711;
color: #b70711;
}
.team--away {
color: #263e6d;
height: 38px;
}
.team--winner {
background: #fff;
}
.team__name,
.team__score {
padding: 8px;
display: flex;
align-items: center;
}
.team__score {
background: #263e6d;
color: #d0d3db;
flex: 0 0 30px;
justify-content: center;
}
Also see: Tab Triggers