melon/static/page/home.html

75 lines
3.4 KiB
HTML
Raw Normal View History

2022-08-17 15:09:35 +07:00
<div class="container-fluid my-3">
<div class="row">
<div class="col-12 text-white">
<h3 class="text-white">Your Portal List</h3>
<hr class="bg-white">
</div>
<div class="col-sm-12 col-md-6 col-lg-4 mt-3">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-lg-3 col-md-4 col-sm-2 col-4">
<img class="w-100" src="${GV_base_url}/media/portal/logo/plus.png" alt="New portal">
</div>
<div class="col-lg-9 col-md-8 col-sm-10 col-8">
<a class="btn btn-primary" href="#" data-toggle="modal" data-target="#NewPortal">
<b>New portal</b>
</a>
</div>
</div>
</div>
</div>
</div>
% for row in listing_portal:
<div class="col-sm-12 col-md-6 col-lg-4 mt-3">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-lg-3 col-md-4 col-sm-2 col-4">
% if row[2] == None:
<a href="${GV_base_url}/portal/?id=${row[0]}">
<img class="w-100" src="${GV_base_url}/media/portal/logo/default.png" alt="${row[1]}">
</a>
% else:
<a href="${GV_base_url}/portal/?id=${row[0]}">
<img class="w-100" src="${row[2]}" alt="${row[1]}">
</a>
% endif
</div>
<div class="col-lg-9 col-md-8 col-sm-10 col-8">
<a href="${GV_base_url}/portal/?id=${row[0]}">
<h3>${row[1]}</h3>
</a>
</div>
</div>
</div>
</div>
</div>
% endfor
</div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="NewPortal" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">New portal</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form action="${GV_base_url}/api/portal/add/" method="post">
<input class="form-control form-control-sm mb-2" type="text" name="title" placeholder="Title">
<input class="form-control form-control-sm mb-2" type="text" name="website" placeholder="Website">
<input class="form-control form-control-sm mb-2" type="text" name="logo" placeholder="Logo's URL">
<input class="form-control form-control-sm mb-2" type="text" name="directory" placeholder="Directory">
<button class="btn-sm btn-primary" type="submit">
Create
</button>
</form>
</div>
</div>
</div>
</div>