<%- include('../partials/head.ejs') %>
    <!--
`body` tag options:

  Apply one or more of the following classes to to the body tag
  to get the desired effect

  * sidebar-collapse
  * sidebar-mini
-->

    <body class="hold-transition sidebar-mini">
        <div class="wrapper">
            <!-- Navbar -->
            <%- include('../partials/navigation.ejs') %>
                <!-- /.navbar -->

                <!-- Main Sidebar Container -->

                <%- include('../partials/sidebar.ejs') %>
                    <div class="pt-20">
                        <% if(errors.length> 0){ %>
                            <div class="alert alert-danger">
                                <% errors.forEach(function(error){ %>
                                    <% if(error !='' ){ %>
                                        <p>
                                            <%= error %>
                                        </p>
                                        <% }}); %>
                            </div>
                            <% } %>
                                <% if(success.length> 0){ %>
                                    <div class="alert alert-success">
                                        <p>
                                            <%=success %>
                                        </p>
                                    </div>
                                    <% } %>
                    </div>
                    <!-- Content Wrapper. Contains page content -->
                    <div class="content-wrapper">
                        <!-- Content Header (Page header) -->
                        <div class="content-header">
                            <div class="container-fluid">
                                <div class="row mb-2">
                                    <div class="col-sm-6">
                                        <h1 class="m-0">CMS</h1>
                                    </div><!-- /.col -->
                                    <div class="col-sm-6">
                                        <ol class="breadcrumb float-sm-right">
                                            <li class="breadcrumb-item"><a href="/admin">Home</a></li>
                                            <li class="breadcrumb-item"><a href="/admin/managecms">CMS</a></li>
                                            <li class="breadcrumb-item active">View</li>
                                        </ol>
                                    </div><!-- /.col -->
                                </div><!-- /.row -->
                            </div><!-- /.container-fluid -->
                        </div>
                        <!-- /.content-header -->

                        <!-- Main content -->
                        <div class="content">
                            <div class="container-fluid">
                                <div class="row">
                                    <div class="col-lg-12">
                                        <form name="edit_category" method="POST">
                                            <div class="card">
                                                <% data.forEach( (cms) => { %>
                                                <div class="card-header">
                                                    <h3 class="card-title">View <%= cms.name %></h3>
                                                </div>
                                                <div class="card-body">
                                                    <div ><b><%= cms.title %></b></div>
                                                    <%= cms.content %>
                                                </div>
                                                <% }) %>
                                                <div class="card-footer">
                                                    <a href="/admin/managecms" class="ml-2 btn btn-warning">Back</a>

                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                    <!-- /.col-md-6 -->
                                </div>
                                <!-- /.row -->
                            </div>
                            <!-- /.container-fluid -->
                        </div>
                        <!-- /.content -->
                    </div>
                    <!-- /.content-wrapper -->

                    <!-- Control Sidebar -->
                    <aside class="control-sidebar control-sidebar-dark">
                        <!-- Control sidebar content goes here -->
                    </aside>
                    <!-- /.control-sidebar -->

                    <!-- Main Footer -->

        </div>
        <!-- ./wrapper -->

        <!-- REQUIRED SCRIPTS -->

        <!-- jQuery -->

        <%- include('../partials/scripts.ejs') %>

    </body>