<!DOCTYPE html>
<html>
<head>
    @php($site=getSiteInfoForPdf())
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
          name='viewport'>


    <title>{{$page_tittle}}</title>

    <style>

        @font-face {
            font-family: 'Verdana';
            font-weight: 100;
            font-style: normal;
            font-variant: normal;
            src: url("{{public_path()}}/fonts/Verdana.ttf") format("truetype");
        }

        body {
            font-family: "Verdana", sans-serif;
            font-size: 12px;
        }

        .st-image {
            text-align: center;
            width: 57px;
            height: 55px;
            border-radius: 10px;
            border: 1px solid #0b0b0b;
        }

        .data-table th {
            font-size: 10px;
            text-align: left;
            line-height: 90%;
        }

        .data-table td {
            font-size: 10px;
            text-align: left;
            line-height: 90%;
        }

        .page-break {
            page-break-after: always;
        }

        .main-div {
            background-image: url({{asset("/img/site/idcard/".Session::get('ALIAS1').".png")}});
            background-position: center;
            background-size: cover;
            background-repeat: no-repeat;
            border: .5px solid black;

            width: 208px;
            padding: 2px 6px;
            height: 346px;
            margin: 0 0 0 0;
            border-radius: 5px;
            float: left;
            overflow: hidden;

        }

        .site-logo {
            background: transparent;
            height: 50px;
        }

    </style>

</head>
<body>

{{--
@include('default.site.layout.pdf-header')


--}}


@foreach($card_data as $key => $value)

    {{--
        <div class="bg-image"
             style="width:199px; padding: 2px 6px; height:326px; margin:0 10px 10px 20px; border-radius: 5px;float: left; overflow: hidden">
    --}}

    <div class="main-div">

        <table cellspacing="0" border="0" width="100%;">

            <tbody>
            <tr>
                <td style="width: 100%;text-align: center">
                    <img class="site-logo" style="text-align: center" width="50"
                         src="{!! asset(Session::get('LOGO_PATH')) !!}">
                </td>
            </tr>
            <tr>
                <td style="width: 100%;text-align: center">
                    <span style="font-size: 11px; text-transform:capitalize;font-weight: bold">{{$value['site_name'] ?? '--'}}</span>
                </td>
            </tr>
            <tr>
                <td style="width: 100%;text-align: center">

                    @if(file_exists(public_path("uploads").'/'.$value['latest_photo']))
                        <img class="st-image"
                             src="{{asset("uploads").'/'.$value['latest_photo'] ?? 'image-not.png'}}">
                    @else
                        <img class="st-image"
                             src="{{asset("uploads").'/image-not.png'}}">
                    @endif

                </td>
            </tr>

            <tr>
                <td style="width: 100%;text-align: center">
                    <span style="text-transform:uppercase;font-size: 12px; font-weight: bold; color: #0b2c89"> {{  $value['full_name'] ?? '--'}} </span>
                </td>
            </tr>
            <tr>
                <td style="text-align: center">
                    <b> ({{$value['username']}})</b>
                </td>
            </tr>
            </tbody>
        </table>

        <table class="data-table" cellspacing="0" border="0" width="100%;" style="">

            <tbody>
            <tr>
                <th style="width: 30%;">
                    <nobr> F. Name</nobr>
                </th>
                <td style="width: 100%;">
                    : {{$value['father_name'] ??  '--'}}
                </td>
            </tr>

            <tr>
                <th>
                    <nobr> M. Name</nobr>
                </th>
                <td>
                    <nobr> : {{$value['mother_name'] ?? '--'}}</nobr>
                </td>
            </tr>


            @if($value['department_name'])
                <tr>
                    <th>
                        Department
                    </th>
                    <td>
                        <nobr> : {{$value['department_name'] ?? '--'}}</nobr>
                    </td>
                </tr>
            @endif


            <tr>
                <th>
                    Class
                </th>
                <td>

                    @if($value['class_name'] == 'XI')

                        <nobr>: HSC</nobr>

                    @else


                        <nobr>
                            : {{$value['class_name'] ?? '--'}}   @if($value['group_name']) <b>
                                ({{$value['group_name'] ?? '--'}})</b> @endif</nobr>
                    @endif

                </td>

            </tr>


            @if($value['session_name'])
                <tr>
                    <th>
                        Session
                    </th>
                    <td>
                        <nobr> : {{$value['session_name'] ?? '--'}}</nobr>
                    </td>
                </tr>
            @endif
            @if($value['student_roll_number'])
                <tr>
                    <th>
                        Roll
                    </th>
                    <td>
                        <nobr> : {{sprintf("%03d", $value['student_roll_number'] ?? '')}}</nobr>
                    </td>
                </tr>

            @endif


            @if($value['blood_group'])

                <tr>
                    <th>
                        B. Group
                    </th>
                    <td>
                        <nobr> : {{$value['blood_group'] ?? '--'}}</nobr>
                    </td>
                </tr>

            @endif


            <tr>
                <th>
                    DOB
                </th>
                <td>
                    <nobr>
                        : {{ date('d M Y', strtotime($value['date_of_birth'] ?? '1970-12-16'))}}</nobr>
                </td>
            </tr>

            <tr>
                <th>
                    Mobile
                </th>
                <td>
                    <nobr> : {{$value['contact_number'] ?? '--'}}</nobr>
                </td>
            </tr>

            <tr>


                <td colspan="2" style="text-align:right;line-height: 50%; padding-right:15px;width: 100%;">
                    <br>
                    <br>
                    <img style="text-align: center; " width="80"
                         src="{{asset($signature)}}">
                    <br>
                    <br>
                    <span style="border-top: 1px dotted black;padding: 0 5px;">{{$designation}}</span>
                </td>
            </tr>
            </tbody>
        </table>

    </div>


    @if(($key+1) % 3== 0)
        <div style="clear:both;"></div>
    @endif


    @if(($key+1) % 9 == 0 )
        <div class="page-break"></div>
    @endif


@endforeach


</body>


<style>

    @page {
        size: a4;
        margin: 0;

    }

    body {
        margin: 10px 35px 3px;
        background-color: #ffffff;
    }


</style>

</html>












