Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/ass/commit/de61d73c1edf176005069994d0a06c0af4f8d2fe
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
8 additions and
2 deletions
@ -1,7 +1,7 @@
const Mustache = require ( 'mustache' ) ;
const DateTime = require ( 'luxon' ) . DateTime ;
const github = require ( './package.json' ) . homepage ;
const { formatBytes } = require ( './utils' ) ;
const { formatBytes , randomHexColour } = require ( './utils' ) ;
//
class OpenGraph {
@ -50,7 +50,7 @@ class OpenGraph {
title : ( this . title . length != 0 ) ? ` <meta property="og:title" content=" ${ this . title } "> ` : '' ,
description : ( this . description . length != 0 ) ? ` <meta property="og:description" content=" ${ this . description } "> ` : '' ,
site : ( this . author . length != 0 ) ? ` <meta property="og:site_name" content=" ${ this . author } "> ` : '' ,
color : ( this . color . length != 0 ) ? ` <meta name="theme-color" content=" ${ this . color } "> ` : '' ,
color : ( this . color . length != 0 ) ? ` <meta name="theme-color" content=" ${ this . color === '&random' ? randomHexColour ( ) : this . color } "> ` : '' ,
card : ! this . type . includes ( 'video' ) ? ` <meta name="twitter:card" content="summary_large_image"> ` : '' ,
} )
. replace ( new RegExp ( '&size' , 'g' ) , formatBytes ( this . size ) )
@ -26,5 +26,11 @@ module.exports = {
let sizes = [ 'Bytes' , 'KB' , 'MB' , 'GB' , 'TB' , 'PB' , 'EB' , 'ZB' , 'YB' ] ;
let i = Math . floor ( Math . log ( bytes ) / Math . log ( 1024 ) ) ;
return parseFloat ( ( bytes / Math . pow ( 1024 , i ) ) . toFixed ( decimals < 0 ? 0 : decimals ) ) + ' ' + sizes [ i ] ;
} ,
randomHexColour : ( ) => { // From: https://www.geeksforgeeks.org/javascript-generate-random-hex-codes-color/
let letters = "0123456789ABCDEF" ;
let colour = '#' ;
for ( var i = 0 ; i < 6 ; i ++ ) colour += letters [ ( Math . floor ( Math . random ( ) * 16 ) ) ] ;
return colour ;
}
}