Fixing up menus + site bouncing.

This commit is contained in:
Brad Nelson
2021-03-06 00:24:22 -08:00
parent bf4b1f5ecf
commit 03674d6e1c
3 changed files with 27 additions and 8 deletions

View File

@ -303,10 +303,11 @@ $(DEPLOY)/app.yaml: $(ARDUINO)/ESP32forth.zip \
cp -r $(WINDOWS)/uEf64.exe $(DEPLOY)/downloads/uEf64.exe cp -r $(WINDOWS)/uEf64.exe $(DEPLOY)/downloads/uEf64.exe
cp -r $(RES)/eforth.ico $(DEPLOY)/downloads/favicon.ico cp -r $(RES)/eforth.ico $(DEPLOY)/downloads/favicon.ico
cp site/.gcloudignore $(DEPLOY) cp site/.gcloudignore $(DEPLOY)
cat site/index.html | $(ESP_REPLACE) >$(DEPLOY)/index.html
cat site/ESP32forth.html | $(ESP_REPLACE) >$(DEPLOY)/ESP32forth.html cat site/ESP32forth.html | $(ESP_REPLACE) >$(DEPLOY)/ESP32forth.html
cat site/index.html | $(UE_REPLACE) >$(DEPLOY)/index.html
cat site/linux.html | $(UE_REPLACE) >$(DEPLOY)/linux.html cat site/linux.html | $(UE_REPLACE) >$(DEPLOY)/linux.html
cat site/windows.html | $(UE_REPLACE) >$(DEPLOY)/windows.html cat site/windows.html | $(UE_REPLACE) >$(DEPLOY)/windows.html
cat site/internals.html | $(UE_REPLACE) >$(DEPLOY)/internals.html
cat site/classic.html | $(UE_REPLACE) >$(DEPLOY)/classic.html cat site/classic.html | $(UE_REPLACE) >$(DEPLOY)/classic.html
deploy: clean all deploy: clean all

View File

@ -9,13 +9,8 @@
<script> <script>
window.location.replace('./ESP32forth.html'); window.location.replace('./ESP32forth.html');
</script> </script>
<div class="menu">
<span><a href="ESP32forth.html">ESP32forth</a></span> {{MENU}}
<span><a href="linux.html">Linux</a></span>
<span><a href="windows.html">Windows</a></span>
<span><a href="internals.html">Internals</a></span>
<span><a href="classic.html">Classic</a></span>
</div>
<p> <p>
Choose you platform above. Choose you platform above.

23
ueforth/site/menu.html Normal file
View File

@ -0,0 +1,23 @@
<div class="menu">
<span><a href="https://esp32forth.appspot.com/ESP32forth.html">ESP32forth</a></span>
<span><a href="https://eforth.appspot.com/linux.html">Linux</a></span>
<span><a href="https://eforth.appspot.com/windows.html">Windows</a></span>
<span><a href="https://eforth.appspot.com/internals.html">Internals</a></span>
<span><a href="https://eforth.appspot.com/classic.html">Classic</a></span>
</div>
<script>
(function() {
var anchors = document.getElementsByTagName('a');
if (window.location.href.indexOf('file://') == 0) {
for (var i = 0; i < anchors.length; ++i) {
anchors[i].href = anchors[i].href.replace('https://eforth.appspot.com/', './');
anchors[i].href = anchors[i].href.replace('https://esp32forth.appspot.com/', './');
}
}
for (var i = 0; i < anchors.length; ++i) {
if (anchors[i].href.split('?')[0] == window.location.href.split('?')[0]) {
anchors[i].parentElement.classList.add('picked');
}
}
})();
</script>