stick footer

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>stick-footer</title>
    <style>
        body {
            margin: 0;
            padding: 0;
        }
        html,body,.wrapper {
            height: 100%;
        }
        html,body,.wrapper {
            height: auto;
            min-height: 100%
        }
        .main {
            /* 必须使用和footer相同的高度 */
            padding-bottom: 150px;
        }
        .footer {
            position: relative;
            /* footer高度的负值 */
            margin-top: -150px;
            height: 150px;
            clear: both;
        }
        .clearfix:after {
            content: '';
            display: block;
            height: 0;
            clear: both;
            visibility: hidden
        }
    </style>
</head>
<body>
    <div class="wrapper">
        <div class="main clearfix">
            <div class="content"></div>
            <div class="side"></div>
        </div>
    </div>
    <div class="footer">

    </div>
</body>
</html>
from rich.console import Console from rich.table import Table from rich.text import Text from rich.style import Style from rich.panel import Panel as RichPanel import json def Panel(): with open("./utils/config.json", "r") as json_file: data = json.load(json_file) print(" ") # Define custom styles for ON and OFF on_style = Style(color="green", bold=True) off_style = Style(color="red", bold=True) # Create a table with 2 columns table = Table(title="Discord Server Cloner", show_header=True, header_style="bold") table.add_column("Setting", style="cyan", no_wrap=True, width=30) table.add_column("Status", justify="center", width=10) for setting, status in data["copy_settings"].items(): table.add_row(setting.capitalize(), Text("ON" if status else " OFF", style=on_style if status else off_style)) console = Console() console.print(table) # Paragraph with change logs paragraph = """Discord has removed the functionality for bots to create a server automatically. You will have to create a server manually and provide the server ID and the server you want to clone.""" console.print(RichPanel(paragraph, style="bold blue", width=47)) # Version information version = "2.0.1" console.print(RichPanel(f"Version: {version}", style="bold magenta", width=47)) def Panel_Run(guild, user): with open("./utils/config.json", "r") as json_file: data = json.load(json_file) print(" ") # Define custom styles for ON and OFF on_style = Style(color="green", bold=True) off_style = Style(color="red", bold=True) # Create a table with 2 columns table = Table(title="Discord Server Cloner", show_header=True, header_style="bold") table.add_column("Cloner is Running...", style="cyan", no_wrap=True, width=30) table.add_column("Status", justify="center", width=10) for setting, status in data["copy_settings"].items(): table.add_row(setting.capitalize(), Text("ON" if status else " OFF", style=on_style if status else off_style)) # Stick a new table in the footer footer = Table(show_header=False, header_style="bold", show_lines=False, width=47) footer.add_column(justify="center") footer.add_row(f"[bold magenta]Server ID: [green]{guild}") footer.add_row(f"[bold magenta]Logged in as: [green]{user}") console = Console() console.print(table) console.print(footer) # Paragraph with change logs paragraph = """Discord has removed the functionality for bots to create a server automatically. You will have to create a server manually and provide the server ID and the server you want to clone.""" console.print(RichPanel(paragraph, style="bold blue", width=47)) # Version information version = "2.0.1" console.print(RichPanel(f"Version: {version}", style="bold magenta", width=47))
最新发布
06-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值