From e5124505aee3ae32ae14bd0872876cf291653703 Mon Sep 17 00:00:00 2001 From: Ari Archer Date: Tue, 26 Nov 2024 19:15:54 +0200 Subject: [PATCH] Add a visitor counter to legal page. Signed-off-by: Ari Archer --- src/aw/views.py | 5 ++++- src/static/legal.sig | Bin 566 -> 566 bytes src/static/legal.txt | 4 +++- src/templates/legal.j2 | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/aw/views.py b/src/aw/views.py index 41af19e..948e4b1 100644 --- a/src/aw/views.py +++ b/src/aw/views.py @@ -45,10 +45,13 @@ def get_status() -> t.Any: @views.get("/guidelines", alias=True) @views.get("/tos", alias=True) @views.get("/tos.txt", alias=True) +@views.get("/privacy/", alias=True) +@views.get("/privacy", alias=True) +@views.get("/legal/", alias=True) @views.get("/legal") def legal() -> t.Any: """Get general guidelines for ari.lt""" - return flask.render_template("legal.j2") + return flask.render_template("legal.j2", visitor=models.Counter.first().inc().count) @views.post("/status") diff --git a/src/static/legal.sig b/src/static/legal.sig index 8e863120858ab5ca8b253c5fa8d452c93f2f5d39..d3c287a6f20a423682a3c51530e49dffce0b0498 100644 GIT binary patch delta 542 zcmV+(0^$9(1hxc_BY#E$H~5Ty-UOIe!uqT-Ve|63{VjdA?NiR- zTVreibm}E9IOE?wOKB)@*oqTHbG;D;mC9kKzz@SQ!{UQ-oFz58BKG=Z=jY$f)I4`V zp)p4N2B#iqDt~R8!3|4ORS3dPd?$Q!`nX`whs_$9Mt}_9q)UdtscZ7aK$d7~{uMXU z;q>$|sLCCD?!6bN$|(5fgK}g5h7C`7Fk0vo-!zkn*ZcELIpODXm5G&y>fxVHSG7td z+ovlnXvE1ScwJnAMtlX-E}uQ!#)wuZZH?F=~%B>(^b delta 542 zcmV+(0^$9(1hxc_BY#BcLI4U05Ty-UOIe!uqQjsM{0Yd^^_7r$NK4P7d38e?^1R9R zO!RYiypvk{Nt9if`pOO-(^y_Cuq?N~I5sM^O})MGG-9uKWKk1Tk#ySYSO#>2xf7{M zTeQIGhL%x7P+P8PAj|3BwmUydnClJYK#7*2*G(mGFF(M(MSnFxZ}XE+U^SVT;liZ= znUf0b-#;k8>$)%HN?`u|TK1eyN>DG+W&Yy28T0PyhmPL>zRxtfKm<*2l;^Hg*u^El zZTATvCi(|rueOMmFPt|~pUCC}MTPIA8&yfLYB|cHpx*%=wC^qPS07+z`=qQxHPu>s zbDS8qxz+J#YJdJ}uQnbw68T50DpvDVhW_s2yK|jpzH+cdL!lQ}tK3hl{JILVk5Ix6 z)f+EJb7&!`O?70ICG8kfcYa=A_FoEEwTW2jl|D%rYpS*YSLTiX&r1BM0OXgLfpRlRKw=ncbd7Fq0CMUVNiY_ zNPBs_ZnsPG6sNNM{Y7FZH#r6~*h~7RIY@?jc+c7xbDLg0=G^^J7hY4g&bTU-e}ecZ glWdRKRu{z`S7J$GGg+e7MP3v6OPvB#u&VuWi=i?Qy8r+H diff --git a/src/static/legal.txt b/src/static/legal.txt index b2a8bb5..aeb356b 100644 --- a/src/static/legal.txt +++ b/src/static/legal.txt @@ -4,7 +4,9 @@ This is the legal information of ari-web which covers topics such as logging pol This document serves as an agreement between you and Ari-web parties, regarding the use and management of Ari-web's services. It outlines the expectations, responsibilities, and limitations for both parties. - Last updated: 2024-11-25 (YYYY-MM-DD) + Visitor: 1609252 + Created at: 2024-11-25 (YYYY-MM-DD) + Last updated: 2024-11-26 (YYYY-MM-DD) OpenPGP signture of this document by the Authorative party's OpenPGP key: legal.sig (Note: Only the text content is what was signed in legal.txt) # Involved Parties diff --git a/src/templates/legal.j2 b/src/templates/legal.j2 index 363f68c..72480d3 100644 --- a/src/templates/legal.j2 +++ b/src/templates/legal.j2 @@ -60,7 +60,9 @@

    -
  • Last updated: 2024-11-25 (YYYY-MM-DD)
  • +
  • Visitor: {{ visitor }}
  • +
  • Created at: 2024-11-25 (YYYY-MM-DD)
  • +
  • Last updated: 2024-11-26 (YYYY-MM-DD)
  • OpenPGP signture of this document by the Authorative party's OpenPGP key: legal.sig (Note: Only the text content is what was signed in legal.txt)