dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 42814b927af136e0432fefa4be40d8306b329281
parent 48a5906c250fe5ad3fb1d0d518ec83f276206c01
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sat,  7 Jan 2023 06:56:14 -0800

reduce bandwidth by avoiding sending useless css

Diffstat:
Mpkg/web/public/views/pages/chat.gohtml | 81++++++++++++++++++++++++++++++++++++++++---------------------------------------
1 file changed, 41 insertions(+), 40 deletions(-)

diff --git a/pkg/web/public/views/pages/chat.gohtml b/pkg/web/public/views/pages/chat.gohtml @@ -33,54 +33,55 @@ background-position: right bottom; background-size: auto calc(100vh - 100px); } - - #tutorial_btn_next { - visibility: hidden; - animation: 15s 1s forwards timer_countdown_frames2; - } - @keyframes timer_countdown_frames2 { - 99% { visibility: hidden; } - 100% { visibility: visible; } - } - #tutorial_secs:before { - content: "15"; - animation: 15s 1s forwards timer_countdown_frames; - } - @keyframes timer_countdown_frames { - 0% { content: "15"; } - 6.6666666667% { content: "14"; } - 13.3333333333% { content: "13"; } - 20% { content: "12"; } - 26.6666666667% { content: "11"; } - 33.3333333333% { content: "10"; } - 40% { content: "9"; } - 46.6666666667% { content: "8"; } - 53.3333333333% { content: "7"; } - 60% { content: "6"; } - 66.6666666667% { content: "5"; } - 73.3333333333% { content: "4"; } - 80% { content: "3"; } - 86.6666666667% { content: "2"; } - 93.3333333333% { content: "1"; } - 100% { content: "0"; } - } - .modal { - -moz-backdrop-filter: blur(2px); - -webkit-backdrop-filter: blur(2px); - backdrop-filter: blur(2px); - } - @-moz-document url-prefix() { + {{ if .Data.DisplayTutorial }} + #tutorial_btn_next { + visibility: hidden; + animation: 15s 1s forwards timer_countdown_frames2; + } + @keyframes timer_countdown_frames2 { + 99% { visibility: hidden; } + 100% { visibility: visible; } + } + #tutorial_secs:before { + content: "15"; + animation: 15s 1s forwards timer_countdown_frames; + } + @keyframes timer_countdown_frames { + 0% { content: "15"; } + 6.6666666667% { content: "14"; } + 13.3333333333% { content: "13"; } + 20% { content: "12"; } + 26.6666666667% { content: "11"; } + 33.3333333333% { content: "10"; } + 40% { content: "9"; } + 46.6666666667% { content: "8"; } + 53.3333333333% { content: "7"; } + 60% { content: "6"; } + 66.6666666667% { content: "5"; } + 73.3333333333% { content: "4"; } + 80% { content: "3"; } + 86.6666666667% { content: "2"; } + 93.3333333333% { content: "1"; } + 100% { content: "0"; } + } .modal { - background-color: rgba(0, 0, 0, .6); + -moz-backdrop-filter: blur(2px); + -webkit-backdrop-filter: blur(2px); + backdrop-filter: blur(2px); } - } + @-moz-document url-prefix() { + .modal { + background-color: rgba(0, 0, 0, .6); + } + } + {{ end }} </style> {{ end }} {{ define "title" }}dkf - #{{ .Data.Room.Name }}{{ end }} {{ define "content" }} - + {{ if .Data.DisplayTutorial }} {{ if eq .AuthUser.ChatTutorial 0 }} <div class="modal d-block">