No description
Find a file
Blake Ridgway 557fb72081 feat: Enhance UI/UX across multiple views with consistent styling and improved layout
This commit introduces significant user interface and experience improvements across the Lawn Care Log, Calendar, and Lawn Tips sections, focusing on consistent button styling, improved layout, and clearer navigation.

**Key Changes:**

*   **Lawn Care Event Models:**
    *   Added `NotApplicable` to `MowingPattern` enum with `[Display(Name = "N/A")]` for better logging flexibility.

*   **Lawn Care Log (`Views/LawnCareEvents/Index.cshtml`):**
    *   **Centered Page Title & Actions:** Wrapped `<h1>` and primary action buttons (`Create New Event`, `View Calendar`) in a `div` with `text-center` for better alignment.
    *   **Improved Search Bar Layout:** Encapsulated the search input and buttons in an `input-group` within a flex container (`d-flex justify-content-end`) with fixed width and auto margins, ensuring it's centered as a block but right-aligned internally.
    *   **Convert Table Actions to Buttons:** Replaced "Edit | Details | Delete" links in the main log table with `btn-sm btn-outline-primary/info/danger` styled buttons, wrapped in `d-flex flex-wrap gap-2` for consistent spacing and responsive behavior.
    *   Renamed "Back to Full List" to "Reset Filter" for clarity and changed its style to `btn-primary`.

*   **Lawn Care Calendar (`Views/LawnCareEvents/Calendar.cshtml`):**
    *   **Centralized Title & Button:** Implemented a flexbox container (`d-flex justify-content-between align-items-center`) for the calendar's page title and the "Create New Event" button, ensuring they are on the same line and properly spaced.
    *   **Restored JavaScript Integrity:** Re-structured the top-level HTML to ensure the calendar's internal JavaScript (`#prevMonth`, `#nextMonth`, `#currentMonthYear`) remains unaffected by the page title/button layout changes.

*   **Lawn Care Tips (`Views/LawnCareTip/Index.cshtml`):**
    *   **Consolidated Actions:** Converted "Edit | Details | Delete" links in the tips table into Bootstrap buttons (`btn-sm btn-outline-primary/info/danger`).
    *   **Improved Action Column Layout:** Applied new `.col-actions` CSS to the action column (`<th>` and `<td>`) to give it a fixed width and use `white-space: nowrap` to prevent action buttons from wrapping.
    *   **Content Column Wrapping:** Added `.col-content` CSS to the content column to limit its max-width and allow `word-wrap`.
    *   Changed "Create New" to "Create New Tip" with `btn-primary` styling for consistency.
    *   **Removed Details Link from Tips:** (Implied by diff) The Details link for `LawnCareTip` was removed from the table view, aligning with a common pattern where simple tip content might be fully displayed or only Edit/Delete actions are prioritized in the index.

*   **Global Styling (`wwwroot/css/site.css`):**
    *   Added `col-content` and `col-actions` CSS classes to manage table column widths and wrapping behavior for cleaner table layouts.

These changes significantly improve the aesthetic consistency and usability of the application's main views.
2025-06-18 21:32:44 -05:00
Controllers feat: Working on implementing calendar. Javascript work left 2025-06-18 20:10:24 -05:00
Data feat: Add Lawn Care Tips section and improve Dashboard layout 2025-06-17 18:09:59 -05:00
Migrations feat: Enhance UI/UX across multiple views with consistent styling and improved layout 2025-06-18 21:32:44 -05:00
Models feat: Enhance UI/UX across multiple views with consistent styling and improved layout 2025-06-18 21:32:44 -05:00
Properties Init commit 2025-06-17 13:22:51 -05:00
Views feat: Enhance UI/UX across multiple views with consistent styling and improved layout 2025-06-18 21:32:44 -05:00
wwwroot feat: Enhance UI/UX across multiple views with consistent styling and improved layout 2025-06-18 21:32:44 -05:00
.gitignore Init commit 2025-06-17 13:21:46 -05:00
appsettings.json ci: Containerization of the app 2025-06-18 16:32:36 -05:00
Dockerfile ci: Containerization of the app 2025-06-18 16:32:36 -05:00
Program.cs Init commit 2025-06-17 13:22:51 -05:00
README.md ci: Containerization of the app 2025-06-18 16:32:36 -05:00
TODO.md Init commit 2025-06-17 13:21:46 -05:00
turf_tasker.csproj feat: Add Lawn Care Tips section and improve Dashboard layout 2025-06-17 18:09:59 -05:00
turf_tasker.sln Init commit 2025-06-17 13:22:51 -05:00

Turf Tasker

A simple but powerful ASP.NET Core MVC application designed to track lawn care activities. This project serves as a hands-on learning exercise to explore and master the fundamentals of the ASP.NET Core MVC framework, from data modeling with Entity Framework Core to building dynamic, data-driven views.

Key Features

  • Log lawn care events (Mowing, Watering, Fertilizing, etc.).
  • Track mowing patterns to ensure a healthy lawn and prevent ruts.
  • Dashboard homepage showing the last time key activities were performed and what the next mowing pattern should be.
  • A dedicated section for general lawn care tips.
  • A filterable and sortable log of all past activities.
  • Clean, responsive UI using Bootstrap.

Tech Stack

  • Backend: C#, ASP.NET Core 8 MVC
  • Database: Entity Framework Core 8 with SQLite
  • Frontend: HTML, CSS, Bootstrap 5, JavaScript (with jQuery)
  • Development Environment: JetBrains Rider on Fedora Linux
  • Version Control: Git with GitLab
  • Containerization: Docker

How to Run

You can run this application either directly using the .NET SDK or via Docker.

Option 1: Run Natively (using .NET SDK)

  1. Clone the repository:
    git clone https://gitlab.com/blakeridgway/turf-tasker.git
    
  2. Navigate to the project directory:
    cd turf-tasker 
    
    (If your turf_tasker.csproj is directly in the cloned turf_tasker folder, you might skip this cd.)
  3. Ensure .NET 8 SDK is installed:
    dotnet --version
    
    (Should show 8.x.x)
  4. Restore dependencies:
    dotnet restore
    
  5. Create/Update the database:
    dotnet ef database update
    
    This will create the turf_tasker.db SQLite file and seed initial data.
  6. Run the application:
    dotnet run
    
  7. Access in browser: Your application will typically run on https://localhost:5062 or a similar port, which will be displayed in the terminal output.

Option 2: Run with Docker

  1. Ensure Docker is installed and running on your system.
  2. Clone the repository (if you haven't already):
    git clone https://gitlab.com/blakeridgway/turf-tasker.git
    
  3. Navigate to the project directory:
    cd turf_tasker 
    
  4. Build the Docker image:
    docker build -t turf-tasker-app .
    
    This command builds the image and tags it as turf-tasker-app.
  5. Run the Docker container:
    docker run -e "ASPNETCORE_URLS=http://+:80" -p 8080:80 turf-tasker-app
    
    • -e "ASPNETCORE_URLS=http://+:80" explicitly configures the app to listen on HTTP port 80 inside the container.
    • -p 8080:80 maps port 8080 on your host machine to port 80 inside the container.
  6. Access in browser:
    http://localhost:8080