Skip to content

Hide empty sections (Projects, Blogs, Experiences) on the landing page when no data exists in the database #6

@logicbyroshan

Description

@logicbyroshan

🚀 Enhancement Summary

Currently, the landing page always displays section headers like "My Tech Skills", "My Work Experiences", and "My Featured Projects", even when the database has no related entries.
As a result, users see empty section titles without any content, which affects the overall design and UX.

💡 Expected Behavior

If a section (e.g., Projects, Blogs, or Experiences) has no data in the database:

  • The entire section (including its header) should be hidden on the frontend.

⚙️ Proposed Solution

  • Add a condition in the template to check whether the queryset for each section (e.g., projects, blogs, experiences) is non-empty before rendering it.
  • Example (Django template):
    {% if projects %}
      <section id="projects">
        <h2>My Featured Projects</h2>
        ...
      </section>
    {% endif %}
    
Image

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions