Center the version and URL

This commit is contained in:
Micah Lee 2021-04-28 20:25:42 -07:00
parent ffe820398d
commit b8d43ab8ce
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -67,31 +67,33 @@ class Common:
def display_banner(self): def display_banner(self):
""" """
Raw ASCII art example: Raw ASCII art example:
* * * *
* *
* *
-+- -+-
* * * *
* *
-+- * -+- *
v2.3.1 https://onionshare.org/ v2.3.1
https://onionshare.org/
""" """
print( print(
self.C_BG_PURPLE self.C_BG_PURPLE
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
+ "╭──────────────────────────────────────────" + "╭──────────────────────────────────────────"
+ self.C_RESET + self.C_RESET
) )
print( print(
@ -101,7 +103,7 @@ class Common:
+ self.C_LIGHTPURPLE + self.C_LIGHTPURPLE
+ " * " + " * "
+ self.C_WHITE + self.C_WHITE
+ "▄▄████▄▄" + "▄▄████▄▄"
+ self.C_LIGHTPURPLE + self.C_LIGHTPURPLE
+ " * " + " * "
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
@ -113,7 +115,7 @@ class Common:
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
+ "" + ""
+ self.C_WHITE + self.C_WHITE
+ " ▄████▀▀████▄" + " ▄████▀▀████▄"
+ self.C_LIGHTPURPLE + self.C_LIGHTPURPLE
+ " * " + " * "
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
@ -195,7 +197,7 @@ class Common:
+ self.C_LIGHTPURPLE + self.C_LIGHTPURPLE
+ " * " + " * "
+ self.C_WHITE + self.C_WHITE
+ "▀████▄▄████▀ " + "▀████▄▄████▀ "
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
+ "" + ""
+ self.C_RESET + self.C_RESET
@ -205,7 +207,7 @@ class Common:
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
+ "" + ""
+ self.C_WHITE + self.C_WHITE
+ " ▀▀████▀▀ " + " ▀▀████▀▀ "
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
+ "" + ""
+ self.C_RESET + self.C_RESET
@ -266,12 +268,16 @@ class Common:
+ "│ │" + "│ │"
+ self.C_RESET + self.C_RESET
) )
left_spaces = (43 - len(self.version) - 1) // 2
right_spaces = left_spaces
if left_spaces + len(self.version) + right_spaces < 43:
right_spaces += 1
print( print(
self.C_BG_PURPLE self.C_BG_PURPLE
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
+ "" + ""
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
+ f" v{self.version}{' '*(16-len(self.version))}https://onionshare.org/ " + f"{' '*left_spaces}v{self.version}{' '*right_spaces}"
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
+ "" + ""
+ self.C_RESET + self.C_RESET
@ -279,7 +285,23 @@ class Common:
print( print(
self.C_BG_PURPLE self.C_BG_PURPLE
+ self.C_LIGHTGRAY + self.C_LIGHTGRAY
+ "╰──────────────────────────────────────────╯" + "│ │"
+ self.C_RESET
)
print(
self.C_BG_PURPLE
+ self.C_LIGHTGRAY
+ ""
+ self.C_LIGHTGRAY
+ " https://onionshare.org/ "
+ self.C_LIGHTGRAY
+ ""
+ self.C_RESET
)
print(
self.C_BG_PURPLE
+ self.C_LIGHTGRAY
+ "╰───────────────────────────────────────────╯"
+ self.C_RESET + self.C_RESET
) )
print() print()