Skip to content
    Back to all Bounties

    Earn 2,250 ($22.50)

    Time Remainingdue 8 months ago
    Open

    Update python base.html file with sidebar

    adamevers
    adamevers
    Posted 8 months ago

    Bounty Description

    Problem Description

    You are working on a Django project and need to enhance the base.html template to include a responsive sidebar and a top navigation bar. The sidebar will display three categories: Communities, Media, and Speakers. When a user selects a category from the sidebar, the top navigation bar should dynamically update to show the objects associated with the selected category. For example, selecting “Communities” will adjust the top nav bar to display links or menus related to community objects.

    Acceptance Criteria

    Responsive Design:

    • The sidebar and top navigation bar must be fully responsive and function correctly on all devices and screen sizes.
    • Display the categories: Communities, Media, and Speakers.
    • Allow users to select a category, which triggers an update in the top navigation bar.

    Dynamic Top Navigation Bar:

    • The top nav bar items should update in real-time to reflect the objects associated with the selected category.

    Integration with Django Backend:

    • Use Django views to pass category and object data to the templates.
    • Employ Django’s templating language to render dynamic content.

    Styling and Interactivity:

    • Utilize Tailwind CSS for styling to maintain a consistent and modern UI.
    • Implement interactive elements using Alpine.js for a lightweight JavaScript solution.

    Code Quality and Best Practices:

    • Write clean, maintainable, and well-documented code.
    • Follow Django best practices for template and view management.
    • Ensure that the solution is scalable for adding more categories or objects in the future.

    Technical Details

    Frameworks and Technologies:

    • Django (Python): Backend framework to manage data and views.
    • Tailwind CSS: Utility-first CSS framework for styling.
    • Alpine.js: Minimalist JavaScript framework for interactivity.

    Template Structure:

    • Update base.html to include the sidebar and top navigation bar.
    • Use Django’s template inheritance if extending from a base template.

    Data Management:

    • Define models for Communities, Media, and Speakers if not already existing.
    • Create views that handle the logic for fetching and passing the associated objects to the template based on the selected category.
    • Use context processors if necessary to make categories globally available to templates.

    Front-End Behavior:

    • The sidebar remains constant while navigating between categories.
    • Use Alpine.js for handling category selection and updating the top nav bar without full page reloads.
    • Ensure accessibility standards are met (keyboard navigation, ARIA roles).

    Routing and URLs:

    • Define URLs that correspond to each category and their associated objects.
    • Use Django’s URL dispatcher to manage navigation between different views.

    Testing and Validation:

    • Test the implementation across different browsers and devices.
    • Validate HTML and CSS for compliance and performance.

    Link to Project

    https://4beec014-f9e4-4a1c-a219-0f7e12c8f41b-00-3qi95lxvqk1ss.spock.replit.dev/