chore: minor stye updates
0174ec60
3 file(s) · +35 −36
| 9 | 9 | const statsBox = formatStats(stats); |
|
| 10 | 10 | const fullContent = `${txt}\n\n${statsBox}\n`; |
|
| 11 | 11 | const userAgent = c.req.header("User-Agent") || ""; |
|
| 12 | - | console.log(userAgent); |
|
| 13 | 12 | const isCrawler = /bot/i.test(userAgent); |
|
| 14 | 13 | ||
| 15 | 14 | if (isCrawler) { |
| 1 | 1 | ||
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | - | ______________ |
|
| 5 | - | / /| |
|
| 6 | - | / / | |
|
| 7 | - | /____________ / | |
|
| 8 | - | | ___________ | | |
|
| 9 | - | || || | |
|
| 10 | - | || > || | |
|
| 11 | - | || || | |
|
| 12 | - | ||___________|| | |
|
| 13 | - | | _______ | / |
|
| 14 | - | /| (_______) | / |
|
| 15 | - | ( |_____________|/ |
|
| 16 | - | \ |
|
| 17 | - | .=======================. |
|
| 18 | - | | :::::::::::::::: ::: | |
|
| 19 | - | | ::::::::::::::[] ::: | |
|
| 20 | - | | ----------- ::: | |
|
| 21 | - | `-----------------------' |
|
| 4 | + | ______________ |
|
| 5 | + | / /| |
|
| 6 | + | / / | |
|
| 7 | + | /____________ / | |
|
| 8 | + | | ___________ | | |
|
| 9 | + | || || | |
|
| 10 | + | || > || | |
|
| 11 | + | || || | |
|
| 12 | + | ||___________|| | |
|
| 13 | + | | _______ | / |
|
| 14 | + | /| (_______) | / |
|
| 15 | + | ( |_____________|/ |
|
| 16 | + | \ |
|
| 17 | + | .=======================. |
|
| 18 | + | | :::::::::::::::: ::: | |
|
| 19 | + | | ::::::::::::::[] ::: | |
|
| 20 | + | | ----------- ::: | |
|
| 21 | + | `-----------------------' |
|
| 22 | 22 | ||
| 23 | 23 | ||
| 24 | - | POLYBIUS SOFTWARE LLC |
|
| 25 | - | -------------------------------------- |
|
| 26 | - | ʙᴜɪʟᴅɪɴɢ ᴛᴏᴏʟs ꜰᴏʀ ᴀ ʙᴇᴛᴛᴇʀ ɪɴᴛᴇʀɴᴇᴛ |
|
| 24 | + | POLYBIUS SOFTWARE LLC |
|
| 25 | + | -------------------------------------- |
|
| 26 | + | BUILDING TOOLS FOR A BETTER INTERNET |
|
| 27 | 27 | ||
| 28 | - | ╭──────────────────────────────────╮ |
|
| 29 | - | │ │ |
|
| 30 | - | │ steve@polybiussoftware.llc │ |
|
| 31 | - | │ │ |
|
| 32 | - | │ polybiussoftware.eth │ |
|
| 33 | - | │ │ |
|
| 34 | - | │ Chattanooga, TN │ |
|
| 35 | - | │ │ |
|
| 36 | - | ╰──────────────────────────────────╯ |
|
| 28 | + | ╭──────────────────────────────────╮ |
|
| 29 | + | │ │ |
|
| 30 | + | │ steve@polybiussoftware.llc │ |
|
| 31 | + | │ │ |
|
| 32 | + | │ polybiussoftware.eth │ |
|
| 33 | + | │ │ |
|
| 34 | + | │ Chattanooga, TN │ |
|
| 35 | + | │ │ |
|
| 36 | + | ╰──────────────────────────────────╯ |
| 122 | 122 | const boxWidth = Math.max(contentWidth, headerText.length + 4); |
|
| 123 | 123 | ||
| 124 | 124 | const lines: string[] = []; |
|
| 125 | - | lines.push(` ╭${"─".repeat(boxWidth)}╮`); |
|
| 125 | + | lines.push(` ╭${"─".repeat(boxWidth)}╮`); |
|
| 126 | 126 | ||
| 127 | 127 | // Center the header |
|
| 128 | 128 | const headerPadding = Math.floor((boxWidth - headerText.length) / 2); |
|
| 129 | 129 | const headerRightPadding = boxWidth - headerPadding - headerText.length; |
|
| 130 | 130 | lines.push( |
|
| 131 | - | ` │${" ".repeat(headerPadding)}${headerText}${" ".repeat(headerRightPadding)}│`, |
|
| 131 | + | ` │${" ".repeat(headerPadding)}${headerText}${" ".repeat(headerRightPadding)}│`, |
|
| 132 | 132 | ); |
|
| 133 | - | lines.push(` ├${"─".repeat(boxWidth)}┤`); |
|
| 133 | + | lines.push(` ├${"─".repeat(boxWidth)}┤`); |
|
| 134 | 134 | ||
| 135 | 135 | // Add stats rows |
|
| 136 | 136 | for (const [key, value] of Object.entries(stats)) { |
|
| 139 | 139 | const paddedValue = value.padEnd(maxValueLength); |
|
| 140 | 140 | const content = ` ${paddedLabel} : ${paddedValue} `; |
|
| 141 | 141 | const rightPadding = boxWidth - content.length; |
|
| 142 | - | lines.push(` │${content}${" ".repeat(rightPadding)}│`); |
|
| 142 | + | lines.push(` │${content}${" ".repeat(rightPadding)}│`); |
|
| 143 | 143 | } |
|
| 144 | 144 | ||
| 145 | - | lines.push(` ╰${"─".repeat(boxWidth)}╯`); |
|
| 145 | + | lines.push(` ╰${"─".repeat(boxWidth)}╯`); |
|
| 146 | 146 | ||
| 147 | 147 | return lines.join("\n"); |
|
| 148 | 148 | } |
|