=$proj->name;?>
=$proj->summary;?>
@@ -249,7 +249,7 @@ foreach($projInfo as $proj):
diff --git a/public/assets/2020v2.js b/public/assets/2020v2.js
index 13ab044..9a4ecb1 100644
--- a/public/assets/2020v2.js
+++ b/public/assets/2020v2.js
@@ -108,6 +108,9 @@ window.fm = (function() {
var dynload = document.querySelectorAll('[data-fm-dynload]');
for(var i = 0; i < dynload.length; ++i)
(function(dc){
+ var url = new URL(dc.href),
+ hash = url.hash.substring(1);
+ url.hash = '';
dc.removeAttribute('data-fm-dynload');
dc.addEventListener('click', function(ev) {
ev.stopPropagation();
@@ -125,11 +128,22 @@ window.fm = (function() {
var title = ((obj.components || {}).header || {}).title || '';
history.pushState(obj, title, dc.href);
fm.dynloadApply(obj);
+ if(hash) {
+ var targetEl = document.getElementById(hash);
+ if(targetEl) {
+ setTimeout(function() {
+ window.scrollTo({
+ top: targetEl.getBoundingClientRect().top,
+ behavior: 'smooth'
+ });
+ }, 500);
+ }
+ }
};
xhr.onerror = function(ev) {
location.assign(dc.href);
};
- xhr.open('GET', dc.href);
+ xhr.open('GET', url);
xhr.setRequestHeader('Accept', 'application/x-fdynload+json');
xhr.send();
}, true);