Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUI modification #120

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion py-kms/pykms_WebUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,11 @@ def products():
count_products_windows=countProductsWindows,
count_products_office=countProductsOffice
)


@app.route('/instructions')
def instructions():
_increase_serve_count()
return render_template(
'instructions.html',
path='/instructions/'
)
32 changes: 32 additions & 0 deletions py-kms/static/css/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* styles.css */

/* Styles for the scroll-to-top button */
.scroll-to-top {
position: fixed;
bottom: 1em;
right: 1em;
background-color: #3273dc;
color: white;
border: none;
border-radius: 50%;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
transition: background-color 0.3s;
}

.dynamic-width-block {
width: 50%;
margin-left: 0;
padding: 20px;
box-sizing: border-box;
}




Binary file added py-kms/static/img/off1.webp
Binary file not shown.
Binary file added py-kms/static/img/off2.webp
Binary file not shown.
Binary file added py-kms/static/img/off3.webp
Binary file not shown.
Binary file added py-kms/static/img/off4.webp
Binary file not shown.
Binary file added py-kms/static/img/win1.webp
Binary file not shown.
Binary file added py-kms/static/img/win2.webp
Binary file not shown.
7 changes: 7 additions & 0 deletions py-kms/static/scripts/2.0.8/clipboard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 19 additions & 3 deletions py-kms/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<head>
<meta charset="UTF-8">
<title>py-kms {% block title %}{% endblock %}</title>
<link rel="stylesheet" href="{{ url_for('static', filename= 'css/bulma.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/bulma.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
<style>
#content {
margin: 1em;
Expand All @@ -23,6 +24,16 @@
</style>
</head>
<body>
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item" href="/">Home</a>
<a class="navbar-item" href="/instructions">Instructions</a>
<!-- Add more navigation items if needed -->
</div>
</div>
</nav>

<div id="content">
{% block content %}{% endblock %}

Expand All @@ -39,18 +50,23 @@
<div class="content has-text-centered">
<p>
<strong>py-kms</strong> is online since <span class="convert_timestamp">{{ start_time }}</span>.
This instance was accessed {{ get_serve_count() }} times. View this softwares license <a href="/license">here</a>.
This instance was accessed {{ get_serve_count() }} times. View this software's license <a href="/license">here</a>.
{% if version_info %}
<br>This instance is running version "{{ version_info['hash'] }}" from branch "{{ version_info['branch'] }}" of py-kms.
{% endif %}
</p>
</div>
</footer>

<!-- Scroll to Top Button -->
<button class="scroll-to-top" onclick="window.scrollTo({top: 0, behavior: 'smooth'});">
</button>

<script>
for(let element of document.getElementsByClassName('convert_timestamp')) {
element.innerText = new Date(element.innerText).toLocaleString();
}
</script>
</body>
</html>
</html>
Loading