Skip to content
Snippets Groups Projects

aashto: add set image

1 file
+ 13
0
Compare changes
  • Side-by-side
  • Inline
@@ -17,8 +17,21 @@ window.onload = function() {
@@ -17,8 +17,21 @@ window.onload = function() {
});
});
window.ui = ui;
window.ui = ui;
 
 
setImage('logo-img', './drupal/images/logo.b64', 'src');
 
setImage('banner-img', './uswds/img/us_flag_small.b64', 'src');
 
setImage('icon', './favicon.b64', 'href');
};
};
 
function setImage(id, path, attr) {
 
fetch(path)
 
.then(res => res.text())
 
.then(text => {
 
const el = document.getElementById(id);
 
el.setAttribute(attr, text);
 
});
 
}
 
function updateContextPath(contextPath) {
function updateContextPath(contextPath) {
return {
return {
statePlugins: {
statePlugins: {
Loading