<div class="card-deck">
    

        <div class="card small-box bg-info ">
            <div class="card-body">
            <div class="inner">
                <h3>{{_('user.home.usage.title')}}</h3>
                <div class="info-box-content">
                    <span class="info-box-text">{{user.current_usage_GB|round(3)}}GB <b>{{_('user.home.usage.from')}}</b>
                            {{user.usage_limit_GB}}GB  {{_('user.home.usage.monthly') if user.monthly else '' }}</span> 
                    <div class="progress">
                        <div class="progress-bar progress-bar-striped bg-warning"
                            style="width: {{user.current_usage_GB*100/(user.usage_limit_GB+0.000001)}}%"></div>
                    </div>
                    <div>
                        <i class="fa-solid fa-calendar-days fa-margin"></i> <b>{{_('user.home.usage.expire')}}</b> {{expire_rel}}
                    </div>
                    % if user.monthly
                    <div>
                        <i class="fa-solid fa-calendar-days fa-margin"></i> <b>{{_('Reset Usage Time:')}}</b> {{reset_day}} {{_('days')}}                     
                    </div>
                    %endif
                    
                </div>
            </div>
            <div class="icon">
                <i class="fas fa-chart-pie"></i>
            </div>
        </div>
            
            <a href="#" class="card-footer">
                <i class="fas fa-chart-pie"></i> {{_('user.home.usage.details')}}
            </a>
        </div>

        % if hconfig(ConfigEnum.branding_site) 
        <div  class="card small-box bg-green">
            <div class="card-body">
            <div class="inner">
                <h3>{{_('user.home.branding.title')}}</h3>
                <p>{{hconfig(ConfigEnum.branding_freetext)|safe}}</p>
            </div>
            <div class="icon">
                <i class="fa-solid fa-question fa-margin"></i>
            </div>
        </div>
            <a href="{{hconfig(ConfigEnum.branding_site)}}"
             class="card-footer" target="_blank">
             <i class="fa-solid fa-up-right-from-square"></i> {{_('user.home.branding.linktitle')}}
            </a>

        </div>
        %endif

        <div  class="card small-box bg-warning d-none d-sm-flex">
            <div class="card-body">
            <div class="inner">
                <h3>{{_('QR code')}}</h3>
                <p>{{_('user.home.qr-code.description')}}</p>
            </div>
            <div class="icon">
                <i class="fa-solid fa-qrcode fa-margin"></i>
            </div>
        </div>
            <a href="https://{{domain}}/{{hconfigs[ConfigEnum.proxy_path]}}/{{user.uuid}}/"
             class="card-footer share-link">
                <i class="fas fa-qrcode"></i> {{_('user.home.qr-code.display')}}
            </a>

        </div>
    </div>


