{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template theme_moove/frontpage_guest

    Guest frontpage template.

    Moove frontpage guest layout template.

    Context variables required for this template:
    * sitename - The name of the site
    * output - The core renderer for the page
    * bodyattributes - attributes for the body tag as a string of html attributes

    Example context (json):
    {
        "sitename": "Moodle",
        "output": {
            "doctype": "<!DOCTYPE html>",
            "page_title": "Test page",
            "favicon": "favicon.ico",
            "main_content": "<h1>Headings make html validators happier</h1>"
         },
        "bodyattributes":"",
        "cansignup": true,
        "bannerheading": "Content string banner heading",
        "bannercontent": "Content string banner content",
        "shoulddisplaymarketing": true
    }
}}
    {{>theme_moove/inc_start}}

    <div id="page" class="container-fluid">
        <div id="page-header" class="frontpage-guest-header">
            <div class="row" id="loginbox">
                <div class="col-md-8" id="intro">
                    {{#bannerheading}}
                        <h1>{{{ bannerheading }}}</h1>
                    {{/bannerheading}}
                    {{#bannercontent}}
                        <h2>{{{ bannercontent }}}</h2>
                    {{/bannercontent}}
                </div>
                <div class="col-md-4 card" id="boxForm">
                  <div class="card-body">
                    <h3>{{#str}}platform_access, theme_moove{{/str}}</h3>
                    <form class="signup-form" action="{{{ config.wwwroot }}}/login/index.php" method="POST" role="form">
                        <label for="username">
                          {{^canloginbyemail}}
                              {{#str}}username{{/str}}
                          {{/canloginbyemail}}
                          {{#canloginbyemail}}
                              {{#str}}usernameemail{{/str}}
                          {{/canloginbyemail}}
                        </label>
                        <div class="input-group">
                          <div class="input-group-addon"><i class="fa fa-envelope add-on"></i></div>
                          <input type="text" class="form-control" id="username" name="username" placeholder="{{#str}}username{{/str}}" required />
                        </div>

                        <label for="password">{{#str}}password{{/str}}</label>
                        <div class="input-group">
                          <div class="input-group-addon"><i class="fa fa-lock add-on"></i></div>
                          <input type="password" class="form-control" id="password" name="password" placeholder="{{#str}}password{{/str}}" required />
                        </div>

                        <div class="sign-up-btn">
                            <button type="submit" class="btn btn-primary">{{#str}}login{{/str}}</button>
                        </div>
                    </form>

                    {{#output.has_identity_providers}}
                        <h5 class="m-t-2">{{#str}} potentialidps, auth {{/str}}</h5>
                        <div class="potentialidplist" class="m-t-1">
                            {{#output.get_identity_providers}}
                                <div class="potentialidp">
                                    <a href="{{{url}}}" title={{#quote}}{{name}}{{/quote}} class="btn btn-secondary btn-block">
                                        {{#iconurl}}
                                            <img src="{{iconurl}}" alt="" width="24" height="24"/>
                                        {{/iconurl}}
                                        {{name}}
                                    </a>
                                </div>
                            {{/output.get_identity_providers}}
                        </div>
                    {{/output.has_identity_providers}}

                    <p><a href="{{{ config.wwwroot }}}/login/forgot_password.php">{{#str}}forgotten{{/str}}</a></p>

                    {{#cansignup}}
                        <a class="btn btn-register btn-primary" href="{{{ config.wwwroot }}}/login/signup.php?">{{#str}}newaccount{{/str}}</a>
                    {{/cansignup}}
                  </div>
                </div><!-- end of .card-body -->
            </div> <!-- end of #boxForm -->
        </div>

        {{#shoulddisplaymarketing}}
          <div class="frontpage-marketing row">
              <div class="col-md-3">
                <div class="card">
                  <div class="card-body">
                    <img src="{{{ marketing1icon }}}" />
                    <h2>{{{ marketing1heading }}}</h2>
                    <h3>{{{ marketing1subheading }}}</h3>
                    <p>{{{ marketing1content }}}</p>
                    {{#marketing1url}}<a class="btn btn-primary" href="{{{ marketing1url }}}">{{#str}}readmore, theme_moove{{/str}}</a>{{/marketing1url}}
                  </div>
                </div>
              </div>

              <div class="col-md-3">
                <div class="card">
                  <div class="card-body">
                    <img src="{{{ marketing2icon }}}" />
                    <h2>{{{ marketing2heading }}}</h2>
                    <h3>{{{ marketing2subheading }}}</h3>
                    <p>{{{ marketing2content }}}</p>
                    {{#marketing2url}}<a class="btn btn-primary" href="{{{ marketing2url }}}">{{#str}}readmore, theme_moove{{/str}}</a>{{/marketing2url}}
                  </div>
                </div>
              </div>

              <div class="col-md-3">
                <div class="card">
                  <div class="card-body">
                    <img src="{{{ marketing3icon }}}" />
                    <h2>{{{ marketing3heading }}}</h2>
                    <h3>{{{ marketing3subheading }}}</h3>
                    <p>{{{ marketing3content }}}</p>
                    {{#marketing3url}}<a class="btn btn-primary" href="{{{ marketing3url }}}">{{#str}}readmore, theme_moove{{/str}}</a>{{/marketing3url}}
                  </div>
                </div>
              </div>

              <div class="col-md-3">
                <div class="card">
                  <div class="card-body">
                    <img src="{{{ marketing4icon }}}" />
                    <h2>{{{ marketing4heading }}}</h2>
                    <h3>{{{ marketing4subheading }}}</h3>
                    <p>{{{ marketing4content }}}</p>
                    {{#marketing4url}}<a class="btn btn-primary" href="{{{ marketing4url }}}">{{#str}}readmore, theme_moove{{/str}}</a>{{/marketing4url}}
                  </div>
                </div>
              </div>

              <div class="clearfix"></div>
          </div>
        {{/shoulddisplaymarketing}}

        <div class="container-fluid">
          {{{ output.main_content }}}
        </div>
    </div>

{{>theme_moove/inc_end}}