-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from marinlauber/15-update-readme
- Loading branch information
Showing
4 changed files
with
74 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,7 @@ | |
It is based on the [ORC model](https://orc.org/uploads/files/ORC-VPP-Documentation-2023.pdf). | ||
The source code can be [found here](https://github.com/marinlauber/Python-VPP) and any and all contributions are welcome 😊. | ||
If you have a question, feature request or perhaps a bug report then please open an issue here or [send me an email](mailto:[email protected]). | ||
If you have a question, feature request or perhaps a bug report then please open an issue [here](https://github.com/marinlauber/Python-VPP) or [send me an email](mailto:[email protected]). | ||
""" | ||
) | ||
|
||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Demos | ||
|
||
This directory contains a VPP demo that is deployed on streamlit. It has site analytics that are GDPR compliant and collected on goat counter. | ||
This directory contains a VPP demo that is currently deployed at [https://yacht-vpp.streamlit.app/](https://yacht-vpp.streamlit.app/) | ||
|
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 |
---|---|---|
@@ -1,25 +1,44 @@ | ||
import streamlit as st | ||
import streamlit.components.v1 as components | ||
import subprocess | ||
|
||
def get_git_hash(): | ||
try: | ||
git_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode('utf-8') | ||
return git_hash | ||
except subprocess.CalledProcessError: | ||
return None | ||
|
||
|
||
def header(): | ||
header = """ | ||
<script> | ||
window.goatcounter = {no_onload: true} | ||
window.addEventListener('hashchange', function(e) { | ||
window.goatcounter.count({ | ||
path: location.pathname + location.search + location.hash, | ||
}) | ||
}) | ||
</script> | ||
<script data-goatcounter="https://yacht-vpp.goatcounter.com/count" | ||
async src="//gc.zgo.at/count.js"></script> | ||
async src="//gc.zgo.at/count.js"></script> | ||
""" | ||
return components.html(header) | ||
|
||
|
||
def footer(): | ||
footer = """ | ||
git_hash = get_git_hash() | ||
footer = f""" | ||
<div style="text-align: center; margin-top: 50px;"> | ||
<hr> | ||
<p>Yacht VPP</p> | ||
<p>Contact: <a href="mailto:[email protected]">[email protected]</a></p> | ||
<p style="font-size: 12px; color: gray;"> | ||
This application is provided as is and without warranty. The source code is available on <a href="https://github.com/marinlauber/Python-VPP">GitHub</a>. | ||
This application is provided as is and without warranty. | ||
The source code is available on <a href="https://github.com/marinlauber/Python-VPP">GitHub</a>. | ||
Please file bug reports as an <a href="https://github.com/marinlauber/Python-VPP/issues">issue here</a>. | ||
</p> | ||
<p style="font-size: 12px; color: gray;">Version {git_hash}</p> | ||
</div> | ||
""" | ||
|
||
|