<!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content  -->
<?php 
    if (GETPOST('action') == 'sendmail')    {
    include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
    $from = GETPOST('email', 'alpha');
    $to = $mysoc->email;
    $message = GETPOST('message', 'alpha');
    $cmail = new CMailFile('Contact from website', $to, $from, $message);
    if ($cmail->sendfile()) {
        ?>
        <script>
            alert("Message sent successfully !");
        </script>
        <?php
	} else {
		echo $langs->trans("ErrorFailedToSendMail", $from, $to).'. '.$cmail->error;
	}
}
?>
<section id="mysection1" contenteditable="true">
                            <div class="container">

            <nav class="navbar navbar-expand-lg navbar-dark position-fixed px-3">
                            <a href="#home" class="navbar-brand text-center">
                                <h1>Brand Name</h1>
                            </a>
                            <button
                                class="navbar-toggler"
                                type="button"
                                data-bs-toggle="collapse"
                                data-bs-target="#navbarNav"
                                aria-controls="navbarNav"
                                aria-expanded="false"
                                aria-label="Toggle navigation"
                            >
                                <span class="navbar-toggler-icon"></span>
                            </button>
                            <div
                                class="collapse navbar-collapse justify-content-end"
                                id="navbarNav"
                            >
                                <ul class="navbar-nav">
                                    <li class="nav-item fs-5">
                                        <a href="#products" class="nav-link"
                                            >Products</a
                                        >
                                    </li>
                                    <li class="nav-item fs-5">
                                        <a href="#contact" class="nav-link">
                                            Contact
                                        </a>
                                    </li>
                                </ul>
                            
                        </div>
                    </nav>
                    </div>
                                    <section id="home" class="">

                <div class=" container full-height pt-5">
                    <div class="row pt-5">
                        <div class="col text-center desc">
                            <h1 class="py-5 fw-bold" id="title">
                                <span class="color">Brand</span>
                                Name
                            </h1>
                            <p class="h3">
                                Hello fellows, here is a description of the
                                brand
                            </p>
                            <a href="#products">
                                <button class="mt-5 btn btn-color"
                                <i class="fas fa-shopping-cart"></i>
                                Learn More
                                </button>
                            </a>
                        </div>
                    </div>
                </div>
            </section>
            
            <section id="products" class="py-5">
                <div class="container text-dark my-5 py-5 full-height">
                    <div class="row gy-5 p-3">
                        <div class="col text-center">
                            <h1 class="pt-2 pb-5 fw-bold">Products</h1>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-4">
                            <div class="card">
                               
                                <div class="card-body">
                                    <h2 class="card-title">Product 1</h2>
                                    <p class="card-text">
                                        Some quick example text to build on the
                                        card title and make up the bulk of the
                                        card's content.
                                    </p>
                                    <a href="#">
                                        <button class="btn btn-color">
                                            Learn More
                                        </button>
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="card">
                                
                                <div class="card-body">
                                    <h2 class="card-title">Product 2</h2>
                                    <p class="card-text">
                                        Some quick example text to build on the
                                        card title and make up the bulk of the
                                        card's content.
                                    </p>
                                    <a href="#">
                                        <button class="btn btn-color">
                                            Learn More
                                        </button>
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="card">
                                
                                <div class="card-body">
                                    <h2 class="card-title">Product 3</h2>
                                    <p class="card-text">
                                        Some quick example text to build on the
                                        card title and make up the bulk of the
                                        card's content.
                                    </p>
                                    <a href="#">
                                        <button class="btn btn-color">
                                            Learn More
                                        </button>
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="card">
                                
                                <div class="card-body">
                                    <h2 class="card-title">Product 4</h2>
                                    <p class="card-text">
                                        Some quick example text to build on the
                                        card title and make up the bulk of the
                                        card's content.
                                    </p>
                                    <a href="#">
                                        <button class="btn btn-color">
                                            Learn More
                                        </button>
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="card">
                                
                                <div class="card-body">
                                    <h2 class="card-title">Product 5</h2>
                                    <p class="card-text">
                                        Some quick example text to build on the
                                        card title and make up the bulk of the
                                        card's content.
                                    </p>
                                    <a href="#">
                                        <button class="btn btn-color">
                                            Learn More
                                        </button>
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="card">
                                
                                <div class="card-body">
                                    <h2 class="card-title">Product 6</h2>
                                    <p class="card-text">
                                        Some quick example text to build on the
                                        card title and make up the bulk of the
                                        card's content.
                                    </p>
                                    <a href="#">
                                        <button class="btn btn-color">
                                            Learn More
                                        </button>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

            <section id="contact" class="py-5">
                <div class="container py-5 my-5 full-height">
                    <div class="row text-center">
                        <div class="col text-center"><h1>Contact us</h1></div>
                        <p class="fw-bold h5">
                            <span class="color">Email</span>: <?php echo $mysoc->email ?>
                        </p>
                        <p class="fw-bold h5">
                            <span class="color">Phone-number</span>: <?php echo $mysoc->phone ?>
                        </p>
                    </div>
                    <div class="row">
                        <p class="text-center fw-bold h5 my-5">
                            Or complete the form
                        </p>
                    </div>
                    <form action="index.php" method="POST">
                        <input type="hidden" name="token" value="<?php echo newToken(); ?>" />
                        <input type="hidden" name="action" value="sendmail">
                        <div class="row gy-3">
                            <div class="col-12 col-md-6">
                                <div class="form-group">
                                    <label>Email</label>
                                    <input
                                        name="email"
                                        type="email"
                                        class="form-control"
                                        placeholder="Email"
                                    />
                                </div>
                                <div class="form-group">
                                    <label>Name</label>
                                    <input
                                        name="name"
                                        type="text"
                                        class="form-control"
                                        placeholder="Name"
                                    />
                                </div>
                                <div class="form-group">
                                    <label>Phone</label>
                                    <input
                                        name="phone"
                                        type="text"
                                        class="form-control"
                                        placeholder="Phone"
                                    />
                                </div>
                            </div>
                            <div class="col-12 col-md-6">
                                <div class="form-group">
                                    <label>Message</label>
                                    <textarea
                                        name="message"
                                        class="form-control"
                                        rows="6"
                                        placeholder="Your message"
                                    ></textarea>
                                </div>
                            </div>
                            <div class="col-12 mt-3">
                                <div class="text-center form-group">
                                    <input
                                        type="submit"
                                        class="mt-5 btn btn-color-filled text-center text-white fw-bold"
                                        value="Send message"
                                    />
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </section>

</section>
