Freelancer İlanlarını Listele

// APP.JS
app.get("/postsf", function(req, res) {

  Postf.find({}, function(err, posts) {
    res.render("postsf", {
      posts: posts
    });
  });
});
// EJS View
<%- include("partials/header") -%>
<%- include("partials/navbar") -%>

<div class="container">
  <div class=" p-4 p-md-5 mb-4  text-black rounded First text-center">
        <div class="col-md-12">
          <h1>Beğenebileceğiniz Freelancer ilanları listesi</h1>

        </div>
      </div>

  <% posts.forEach(function(post, index) {%>
    <div class="row mt-3 d-flex justify-content-center ">
      <div class="col-md-7 ">
        <div class="row g-0 rounded overflow-hidden shadow-lg h-md-250 bg-light">
          <div class="col p-4 ">


            <h3 class="mb-0"> <b></b><%= post.title %></h3>
            <p class="my-3"> <%= post.content %> </p>

             <div class="d-grid gap-2 d-md-flex justify-content-md-end">
              <button type="button" class="btn btn-outline-dark text-left"><a href="/postsf/<%= post.id %>">İlanı Görüntüle</a></button>
            </div>
        </div>
      </div>
    </div>
  </div>

  <% })%>
</div>

Last updated