Create framework for sponsor interviews
authorVik Fearing <vik@chouppes.com>
Wed, 12 Jul 2023 16:36:22 +0000 (18:36 +0200)
committerVik Fearing <vik@chouppes.com>
Wed, 12 Jul 2023 17:44:14 +0000 (19:44 +0200)
static/img/ogp/sponsor-interview.png [new file with mode: 0644]
static/img/ogp/sponsor-interviews.png [new file with mode: 0644]
templates/base.html
templates/context.json
templates/pages/ogp.html
templates/pages/sponsor-interviews.html [new file with mode: 0644]
templates/sponsorinterview.html [new file with mode: 0644]

diff --git a/static/img/ogp/sponsor-interview.png b/static/img/ogp/sponsor-interview.png
new file mode 100644 (file)
index 0000000..44e3a19
Binary files /dev/null and b/static/img/ogp/sponsor-interview.png differ
diff --git a/static/img/ogp/sponsor-interviews.png b/static/img/ogp/sponsor-interviews.png
new file mode 100644 (file)
index 0000000..5237312
Binary files /dev/null and b/static/img/ogp/sponsor-interviews.png differ
index f6a41de98cd42deff31b373dec6b5119092552e1..f4ad1d028015e9bb7959fca30455d0caee318f5d 100644 (file)
             <li><a href="{{ link("social/") }}">Social Event</a></li>
             {#<li><a href="{{ link("speaker-interviews/") }}">Speaker Interviews</a></li>#}
             <li><a href="{{ link("sponsors/") }}">Sponsors</a></li>
-            {#<li><a href="{{ link("sponsor-interviews/") }}">Sponsor Interviews</a></li>#}
+            <li><a href="{{ link("sponsor-interviews/") }}">Sponsor Interviews</a></li>
             {% if cfs.open %}<li><a href="{{ link("become-sponsor/") }}">Become a Sponsor</a></li>{% endif %}
             <li><a href="{{ link("organisation/") }}">Organisation</a></li>
             <li><a href="{{ link("contact/") }}">Contact</a></li>
index a813b9950734be4967610ebc9fa23aa304bd199e..7847d63b320cce3155f5f17479dfa3cb916a6666 100644 (file)
        "url": "",
        "img": "",
        "description": "",
-       "hasinterview": false,
-       "visible": true
+       "visible": true,
+       "interview": []
    },
 
     "sponsors_ataglance": [
                    "url": "https://www.enterprisedb.com",
                    "img": "edb.png",
                    "description": "EDB provides enterprise-class software and services that enable businesses and governments to harness the full power of Postgres, the world’s fastest growing and most loved open source database.",
-                   "hasinterview": false,
-                   "visible": true
+                   "visible": true,
+                   "interview": []
                },
                {
                    "name": "Nexteam",
                    "url": "https://nexteam.co.uk/",
                    "img": "nexteam.png",
                    "description": "Nexteam is a network of technology professionals who passionately deliver successful outcomes with a fixed price agile process. Be it helping your team with PostgreSQL or taking your ideas from the drawing board to implementation, we can help you succeed.",
-                   "hasinterview": false,
-                   "visible": true
+                   "visible": true,
+                   "interview": []
                }
            ]
        },
                    "url": "https://ProOpenSource.eu",
                    "img": "proopensourceou.png",
                    "description": "",
-                   "hasinterview": false,
                    "visible": true
                },
                {
                    "url": "https://www.gitcpro.com",
                    "img": "gitcpro.png",
                    "description": "GITC Pro provides PostgreSQL and Red Hat Enterprise Linux (and derivatives) support in the UK and the EU.",
-                   "hasinterview": false,
                    "visible": true
                }
            ]
index cf9fa058ed0dcabc7e93f80f24a6e46efddbc610..d4dabba0a36d6dd50acdd073c8366a890aaba833 100644 (file)
@@ -58,6 +58,11 @@ hr {
   width: 90%;
 }
 
+.ogpmessage img {
+  border: 0;
+  vertical-align: middle;
+}
+
 .ogpurl {
   width: 100%;
   margin-top: auto;
@@ -88,6 +93,15 @@ hr {
 ]
 %}
 
+{# This is a scoping hack #}
+{% set sponsorcards = {} %}
+{% for s in sponsors %}
+  {% for c in s.companies if c.interview %}
+    {% set _ = sponsorcards.update({c.name: {"message": "Interview with <img src=\"" + media("img/logos/" + c.img) + "\">", "url": c.name|slugify}}) %}
+  {% endfor %}
+{% endfor %}
+{% set cards = cards + sponsorcards.values()|list %}
+
 <div id="ogpbacksplash">
   {% for c in cards %}
   <div class="ogpcard">
diff --git a/templates/pages/sponsor-interviews.html b/templates/pages/sponsor-interviews.html
new file mode 100644 (file)
index 0000000..7693d4d
--- /dev/null
@@ -0,0 +1,32 @@
+{% extends "base.html" %}
+{% block title %}Sponsor Interviews{% endblock %}
+
+{% block ogptitle -%}<meta property="og:title" content="{{ confname }} {{ year }} Sponsor Interviews">{%- endblock %}
+{% block ogpurl -%}<meta property="og:url" content="https://{{ year }}.pgconf.eu/sponsor-interviews/">{%- endblock %}
+{% block ogpdescription -%}<meta property="og:description" content="Come and read interviews conducted with our sponsors.">{%- endblock %}
+{% block ogpimage -%}
+<meta property="og:image" content="{{ media("img/ogp/sponsor-interviews.png") }}">
+<meta property="og:image:secure_url" content="{{ media("img/ogp/sponsor-interviews.png") }}">
+<meta property="og:image:type" content="image/png">
+<meta property="og:image:width" content="800">
+<meta property="og:image:height" content="419">
+<meta property="og:image:alt" content="{{ confname }} {{ year }} Sponsor Interviews">
+{%- endblock %}
+
+{% block content %}
+<h1>Sponsor Interviews</h1>
+
+<p>
+  Here you can read interviews that {{ confname }} has conducted
+  with its sponsors.
+</p>
+
+<ul>
+{% for s in sponsors %}
+  {% for c in s.companies if c.visible and c.interview %}
+    <li><a href="{{ link("sponsor-interviews/" + c.name|slugify + "/") }}">{{ c.name }}</a></li>
+  {% endfor %}
+{% endfor %}
+</ul>
+
+{% endblock %}
diff --git a/templates/sponsorinterview.html b/templates/sponsorinterview.html
new file mode 100644 (file)
index 0000000..429cb49
--- /dev/null
@@ -0,0 +1,38 @@
+{% extends "base.html" %}
+
+{% block title %}Interview with {{ sponsorname }}{% endblock %}
+
+{% block ogptitle -%}<meta property="og:title" content="Interview with {{ sponsorname }} – {{ confname }} {{ year }}">{%- endblock %}
+{% block ogpurl -%}<meta property="og:url" content="https://{{ year }}.pgday.uk/sponsor-interviews/{{ sponsorname|slugify }}/">{%- endblock %}
+{% block ogpdescription -%}<meta property="og:description" content="Interview with {{ sponsorname }} – {{ confname }} {{ year }}">{%- endblock %}
+{% block ogpimage -%}
+  <meta property="og:image" content="{{ media("img/ogp/sponsor-interview-" + sponsorname|slugify + ".png") }}">
+  <meta property="og:image:secure_url" content="{{ media("img/ogp/sponsor-interview-" + sponsorname|slugify + ".png") }}">
+  <meta property="og:image:type" content="image/png">
+  <meta property="og:image:width" content="800">
+  <meta property="og:image:height" content="419">
+  <meta property="og:image:alt" content="Interview with {{ sponsorname }} – {{ confname }} {{ year }}">
+{%- endblock %}
+
+{% block content %}
+<h1>Interview with {{ sponsorname }}</h1>
+
+<p id="disclaimer">
+  Any views or opinions represented or expressed in this interview belong solely
+  to the interviewee and do not neccessarily represent those of the {{ confname }} {{ year }}
+  organisation, PostgreSQL Europe, or the wider PostgreSQL community, unless explicitly stated.
+</p>
+
+{% for s in sponsors %}
+  {% for c in s.companies if c.interview and c.name == sponsorname %}
+    {% for i in c.interview %}
+      <h2>{{ i.Q }}</h2>
+      {% for a in i.A %}
+        <p>{{ a }}</p>
+      {% endfor %}
+    {% endfor %}
+    <h2>Thank you!</h2>
+  {% endfor %}
+{% endfor %}
+
+{% endblock %}