Browse Source

Strategická: Soubory ke stažení

master
Jiří Kalvoda 2 years ago
parent
commit
a8b813bbd5
  1. 24
      server/bin/build
  2. 15
      server/hra/web/pages.py

24
server/bin/build

@ -0,0 +1,24 @@
#!/bin/bash
set -ueo pipefail
rm static/client static/client.zip -fr
mkdir -p static/client
cp ../klient/client.py static/client
cp ../klient/play.py static/client
(
cd static/client
zip ../client.zip *
)
(
cd static/client
git init -b master
git add .
git commit -m "INIT"
git update-server-info
)
ln -sr static/client/.git static/client.git

15
server/hra/web/pages.py

@ -228,7 +228,20 @@ def web_index():
for game in games: for game in games:
b.line().p(game_link(game)) b.line().p(game_link(game))
else: else:
b.line().p("Přihlaste se, prosím.") b.line().p().b("Přihlaste se, prosím.")
b.h3("Ke stažení")
with b.p():
b.p("Klient")
with b.ul():
u = app.url_for('static', filename='client.zip', _external=True)
b.line().li("Jako zip: ", b._p(b._a(href=u)(u)))
with b.line().li("Jednotlivé soubory:"):
u = app.url_for('static', filename='client/client.py', _external=True)
v = app.url_for('static', filename='client/play.py', _external=True)
b.p(b._a(href=u)(u), b._br(), b._a(href=v)(v))
b.line().li("Git: ", b._pre(f"git clone {app.url_for('static', filename='client.git', _external=True)}", _class="margin: 0pt 0pt"))
return b.print_file() return b.print_file()

Loading…
Cancel
Save