work around bottom ui issue for gitea 1.18.5

This commit is contained in:
Ashik K 2023-03-03 17:07:49 +01:00
parent 119d2c99c2
commit 86388f6233
2 changed files with 30 additions and 20 deletions

View File

@ -10,7 +10,7 @@ var my_width = "innerWidth" in window
: document.documentElement.offsetWidth; ; : document.documentElement.offsetWidth; ;
//making the canvas full screen //making the canvas full screen
c.height = my_height; c.height = my_height*0.66;
c.width = my_width; c.width = my_width;
//latin characters - taken from the unicode charset //latin characters - taken from the unicode charset
@ -42,12 +42,12 @@ function draw() {
//a random chinese character to print //a random chinese character to print
var text = matrix[Math.floor(Math.random() * matrix.length)]; var text = matrix[Math.floor(Math.random() * matrix.length)];
//x = i*font_size, y = value of drops[i]*font_size //x = i*font_size, y = value of drops[i]*font_size
ctx.fillText(text, i * font_size, drops[i] * font_size); ctx.fillText(text, i * font_size, drops[i] * font_size *0.66);
//sending the drop back to the top randomly after it has crossed the screen //sending the drop back to the top randomly after it has crossed the screen
//adding a randomness to the reset to make the drops scattered on the Y axis //adding a randomness to the reset to make the drops scattered on the Y axis
if (drops[i] * font_size > c.height && Math.random() > 0.975) { if (drops[i] * font_size > c.height*0.66 && Math.random() > 0.975) {
drops[i] = 0; drops[i] = 0;
} }

View File

@ -1,20 +1,30 @@
{{template "base/head" .}} {{template "base/head" .}}
<div class="page-content home"> <div role="main" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}" class="page-content home">
<div style="margin:auto; width:100%; position: fixed; padding-top:14px">
<div style="margin:auto; width:100%; position: fixed; padding-top:14px; padding-bottom:28px">
<canvas id="c"></canvas> <canvas id="c"></canvas>
</div> </div>
<div class="ui stackable middle very relaxed page grid"> <div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column"> <div class="sixteen wide center aligned centered column">
<div> <div>
<img class="logo" width="180" height="180" src="{{AssetUrlPrefix}}/img/logo.svg"/> <img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}"/>
</div> </div>
<div class="hero"> <div class="hero">
<h1 class="ui icon header title"> <h1 class="ui icon header title">
<pre>{{AppName}}</pre> {{AppName}}
</h1> </h1>
<h3>{{.locale.Tr "startpage.app_desc"}}</h3>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script src="{{AssetUrlPrefix}}/js/theme-matrix.js"></script> <script src="{{AssetUrlPrefix}}/js/theme-matrix.js"></script>
</div>
{{template "custom/body_outer_post" .}}
{{template "base/footer_content" .}}
<script src="{{AssetUrlPrefix}}/js/index.js?v={{AssetVersion}}" onerror="alert('Failed to load asset files from ' + this.src + '. Please make sure the asset files can be accessed.')"></script>
</body>
</html>