<!doctype html>
<html lang="en">
<head>
	<!-- Required meta tags -->
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- Bootstrap CSS -->
	<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
	<title>Change analyzer report {{ report_date }}</title>
<style>
body {
  padding: 10px;
}

a.fill-div {
    display: block;
    text-decoration: none;
	color: black;
}

td, th {
  text-align: center;
}

.sequence-id {
    color: #1e85ff;
}

.custom-row {
    cursor: pointer;
    padding: 5px 15px 5px 15px;
    margin: 0px 10px 2px 10px;
    width: 100%;
    border: 1px;
	border-style: dashed;
	border-color: #ddd;
	border-width: 1px;
    text-align: left;
    outline: none;
    font-size: 0.85em;
}

.step {
	font-size: 0.85em;
    letter-spacing: 1px;
    white-space: nowrap;
    color: black;
	border-width: 0px;
	border-radius: 5px;
	padding: 0px 10px 0px 10px;
}

.step.fail, .step.pass, .step.info {
    color: #fff !important;
    font-weight: bold;
}

.step.info {
	background-color: #999da0;
}

.step.fail {
    background-color: #d9534f;
}

.step.fail:hover {
  background: #d9534f90;
}

.step.pass {
    background-color: #5cb85c;
}

.step.pass:hover {
  background: #5cb85c90;
}

.action, .comment {
	color: black;
	padding-left: 10px;
	font-size: 0.85em;
}

.div-margins {
	padding: 0px 15px 0px 15px;
	margin: 0px 15px 0px 15px;
}

.toggle-div {
	margin-bottom: 2px;
	padding-left: 15px;
}

.toggle-a {
	border: 1px;
	border-style: solid;
	border-color: #ddd;
	border-width: 1px;
	padding: 0px 30px 0px 30px;
	margin-left: -5px;
}
img {
	max-width:100%;
	height:auto;
}
</style>
</head>
<body>
	<div class="container-fluid">
		<h2>Change analyzer report</h2>
		<div><b>Expected sequence:</b> <span class="sequence-id">{{ actual_sequence_id }}</span> ({{ sequence1_date }})</div>
		<div><b>Actual sequence:</b> <span class="sequence-id">{{ expected_sequence_id }}</span> ({{ sequence2_date }})</div>
		<br>
		<div><b>Date:</b> {{ report_date }}</div>
		<br>

		<div class="toggle-div" data-bs-toggle="collapse" data-bs-target=".multi-collapse" aria-expanded="false" aria-controls="{{ aria_controls }}"><a href="#" class="fill-div"><span class="toggle-a">Toggle all steps</span></a></div>

		{% for expected_step, actual_step, expected_image, actual_image, verdict, comment in sequences_data %}
		<div class="custom-row" data-bs-toggle="collapse" data-bs-target="#step{{ loop.index }}" aria-expanded="false" aria-controls="step{{ loop.index }}">
			<button class="step {{ verdict }}" type="button">Step {{ loop.index }}</button>
			<span class="action">{{ expected_step }}</span>
		</div>

		<div class="row div-margins">
		  <div class="col">
			<div class="collapse multi-collapse" id="step{{ loop.index }}">
			  <div>
				  <span class="step info">Info</span>
				  <span class="comment">{{ comment }}</span>
			  </div>
			  <table class="table table-bordered">
				  <thead>
					<tr>
					  <th scope="col">Expected screenshot</th>
					  <th scope="col">Actual screenshot</th>
					</tr>
				  </thead>
				  <tbody>
					<tr>
					  	<td><img src="{{ expected_image }}" alt=""></td>
					  	<td><img src="{{ actual_image }}" alt=""></td>
					</tr>
				  </tbody>
			</table>
			</div>
		  </div>
		 </div>
		{% endfor %}
	</div>
    <!-- Bootstrap Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</body>
</html>


