{% extends 'webspace/cms/blocks/schemas/_schema.html' %}
{% load wagtailcore_tags wagtailimages_tags my %}

{% block json %}
    {
        "@context": "http://schema.org",
        "@type": "WebPage",
        "dateCreated": "{{ page.first_published_at|date:"c" }}",
        "dateModified": "{{ page.last_published_at|date:"c" }}",
        "description": "{{ page.search_description }}",
        "image": "{% image page.feed_image fill-500x500 as img %}{{ img.url }}",
        "url": "https://{{ request.get_host }}{{ request.get_full_path|cut:"?build=true" }}",
        "inLanguage": "fr-FR",
        "name": "{{ page.seo_title }}",
        "potentialAction" : {
            "@type" : "SearchAction",
            "target" : "https://{{ request.get_host }}/matching/?recherche={search_term}",
            "query-input" : "required name=search_term"
        },
        "about": {
              "@type": "Organization",
              "url": "https://{{ request.get_host }}",
              "name": "Station Spatiale",
              "logo": "{% image settings.cms.DataTypesSettings.logo fill-500x500 as img %}{{ img.url }}",
              "description": "{{ page.search_description }}",
              "vatID": "FR44853243277",
              "legalName": "Station Spatiale",
              "foundingDate": "2019-08-01",
              "contactPoint": [
                {
                  "@type": "ContactPoint",
                  "areaServed": "FR",
                  "availableLanguage": "French",
                  "contactType": "customer support",
                  "contactOption": "TollFree",
                  "telephone": "+336-37-49-16-28",
                  "email":"hello@stationspatiale.com"
                }
              ],
              "location": {
                "@type": "PostalAddress",
                "streetAddress": "6 rue urvoy de saint-bedan",
                "addressLocality": "Nantes",
                "postalCode": "44000",
                "addressCountry": "FR"
              },
              "foundingLocation": {
                "@type": "Place",
                "name": "Nantes, France"
              },
              "founders": [
                {
                    "@type": "Person",
                    "name": "Alexis Le Baron",
                    "gender": "Male",
                    "sameAs": "https://www.linkedin.com/in/alexis-le-baron/",
                    "nationality": {
                        "@type": "Country",
                        "name": "France"
                    }
                },
                {
                    "@type": "Person",
                    "name": "Anne-Laure Compain",
                    "gender": "Female",
                    "sameAs": "https://www.linkedin.com/in/anne-laure-compain/",
                    "nationality": {
                        "@type": "Country",
                        "name": "France"
                    }
                }
              ],
              "brand": {
                    "@type": "Thing",
                    "name": "Station Spatiale"
              }
        }
    }
{% endblock %}
