<% layout('layouts/boilerplate') %>
<div class="row">
    <h1 class="text-center">New Campground</h1>
    <div class="col-md-6 offset-md-3 mb-3">
        <form action="/campgrounds" method="POST" novalidate class="validated-form" enctype="multipart/form-data">
            <div class="mb-3">
                <label class='form-label' for="title">Title:</label>
                <input class="form-control" type="text" id="title" name="campground[title]" required>
                <div class="valid-feedback">
                    Nice title!
                </div>
            </div>
            <div class="mb-3">
                <label class="form-label" for="location">Location:</label>
                <input class="form-control" type="text" id="location" name="campground[location]" required>
                <div class="valid-feedback">
                    Looks good!
                </div>
            </div>
            <div class="mb-3 custom-file">
                <label for="image" class="form-label">Choose image(s):</label>
                <input class="form-control custom-file-label" type="file" id="image" name="image" multiple>
            </div>

            <div class="mb-3">
                <label class="form-label" for="price">Price:</label>
                <div class="input-group">
                   <span class="input-group-text" id="price-label">$</span>
                   <input type="text" class="form-control" id="price" placeholder="0.00" aria-label="price"
                   aria-describedby="price-label" name="campground[price]" required>
                   <div class="valid-feedback">
                        Looks good!
                    </div>
                </div>
            </div>
            <div class="mb-3">
                <label class="form-label" for="description">Description:</label>
                <textarea class="form-control" type="text" id="description" name="campground[description]" required></textarea>
                <div class="valid-feedback">
                    Very well!
                </div>
            </div>
            
    
            <div class="mb-3">
                <button class="btn btn-success">Add Campground</button> 
            </div>
    
        </form>
    
    
        <a class="btn btn-danger" href="/campgrounds">Cancel</a> 
    </div>

</div>

 