-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read external resources locally when generating html report
Locally add all JS, CSS and fonts locally to the gradle plugin
- Loading branch information
Showing
8 changed files
with
170 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
include-build/roborazzi-gradle-plugin/src/main/resources/META-INF/assets/material-icons.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* Material Icons */ | ||
/* Credits: https://fonts.googleapis.com/icon?family=Material+Icons */ | ||
/* fallback */ | ||
@font-face { | ||
font-family: 'Material Icons'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: url(material-icons.woff2) format('woff2'); | ||
} | ||
|
||
.material-icons { | ||
font-family: 'Material Icons'; | ||
font-weight: normal; | ||
font-style: normal; | ||
font-size: 24px; | ||
line-height: 1; | ||
letter-spacing: normal; | ||
text-transform: none; | ||
display: inline-block; | ||
white-space: nowrap; | ||
word-wrap: normal; | ||
direction: ltr; | ||
-webkit-font-feature-settings: 'liga'; | ||
-webkit-font-smoothing: antialiased; | ||
} |
Binary file added
BIN
+126 KB
...ude-build/roborazzi-gradle-plugin/src/main/resources/META-INF/assets/material-icons.woff2
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
include-build/roborazzi-gradle-plugin/src/main/resources/META-INF/assets/materialize.min.css
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
include-build/roborazzi-gradle-plugin/src/main/resources/META-INF/assets/materialize.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
include-build/roborazzi-gradle-plugin/src/main/resources/META-INF/assets/report-style.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.container { | ||
width: 90%; | ||
} | ||
|
||
h3 { | ||
color: orange; | ||
} | ||
|
||
a, .menu { | ||
color: white; | ||
} | ||
|
||
th a, td a { | ||
display: block; | ||
color: black; | ||
} | ||
|
||
.material-icons { | ||
color: #29b6f6; | ||
} | ||
|
||
.us { | ||
color: #ffcc80; | ||
} | ||
|
||
#imageBottomSheet { | ||
max-height: 100%; | ||
top: 15%; | ||
} | ||
|
||
#modalImage { | ||
max-width: 100%; | ||
} |
65 changes: 65 additions & 0 deletions
65
include-build/roborazzi-gradle-plugin/src/main/resources/META-INF/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"/> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
<title>Roborazzi report</title> | ||
<link href="assets/report-style.css" rel="stylesheet"/> | ||
<!-- Compiled and minified CSS --> | ||
<link rel="stylesheet" href="assets/materialize.min.css" /> | ||
<link href="assets/material-icons.css" rel="stylesheet" /> | ||
</head> | ||
<body> | ||
<nav role="navigation" class="light-blue lighten-1"> | ||
<div class="nav-wrapper container"> | ||
<a href="#" class="brand-logo">Roborazzi report</a> | ||
<a href="#" data-target="nav-mobile" class="sidenav-trigger" | ||
><i class="material-icons menu">menu</i></a | ||
> | ||
</div> | ||
</nav> | ||
<div class="section"> | ||
<div class="container"> | ||
<p>REPORT_TEMPLATE_BODY</p> | ||
</div> | ||
</div> | ||
|
||
<div id="imageBottomSheet" class="modal bottom-sheet max-height"> | ||
<div class="modal-content center-align"> | ||
<img id="modalImage" src="" alt=""> | ||
</div> | ||
</div> | ||
|
||
<footer class="page-footer orange"> | ||
<div class="container"> | ||
<a class="us" href="https://github.com/takahirom/roborazzi" target="_blank" | ||
rel="noopener noreferrer">Roborazzi</a> | ||
<br> | ||
<br> | ||
</div> | ||
</footer> | ||
<!-- Compiled and minified JavaScript --> | ||
<script src="assets/materialize.min.js"></script> | ||
<script> | ||
M.AutoInit(); | ||
document.addEventListener('DOMContentLoaded', function() { | ||
M.Tabs.getInstance(document.getElementsByClassName("tabs")[0]).select('results'); | ||
var modalInstance = M.Modal.init(document.getElementById('imageBottomSheet'), {}); | ||
var modal = document.getElementById('imageBottomSheet'); | ||
var modalImage = document.getElementById('modalImage'); | ||
var modalTriggers = document.querySelectorAll('.modal-trigger'); | ||
modalTriggers.forEach(function(trigger) { | ||
trigger.addEventListener('click', function() { | ||
var src = this.getAttribute('src'); | ||
var alt = this.getAttribute('data-alt'); | ||
modalImage.setAttribute('src', src); | ||
modalImage.setAttribute('alt', alt); | ||
var instance = M.Modal.getInstance(modal); | ||
instance.open(); | ||
}); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |