src/StartPlatz/Bundle/PartnersBundle/Resources/views/Public/partner-detail.html.twig line 1

Open in your IDE?
  1. {% extends '@StartPlatzStyleBundle/Bootstrap4/base.homepage.oneColumn.html.twig' %}
  2. {% block title %}{{ partner.name }} - {% if language == 'en' %}Partners{% else %}Partner{% endif %} | STARTPLATZ{% endblock %}
  3. {% block additionalHead %}
  4.     <link rel="stylesheet" href="{{ asset('bundles/startplatzstyle/css/startplatz.accelerator.css') }}">
  5.     <style>
  6.         /* Partner Detail Page - Clean Layout */
  7.         .partner-header {
  8.             background: #f8f9fa;
  9.             padding: 40px 0;
  10.         }
  11.         .partner-header__logo {
  12.             width: 100%;
  13.             max-width: 200px;
  14.             height: auto;
  15.             background: #fff;
  16.             border-radius: 12px;
  17.             padding: 20px;
  18.             box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  19.         }
  20.         .partner-header__logo img {
  21.             width: 100%;
  22.             height: auto;
  23.             object-fit: contain;
  24.         }
  25.         .partner-header__name {
  26.             font-size: 2rem;
  27.             font-weight: 700;
  28.             color: #1a1a1a;
  29.             margin-bottom: 12px;
  30.         }
  31.         .partner-header__description {
  32.             font-size: 1.1rem;
  33.             color: #555;
  34.             line-height: 1.6;
  35.             margin-bottom: 16px;
  36.         }
  37.         .partner-header__badges {
  38.             display: flex;
  39.             flex-wrap: wrap;
  40.             gap: 8px;
  41.         }
  42.         .partner-content {
  43.             padding: 60px 0;
  44.             background: #fff;
  45.         }
  46.         .partner-content__text {
  47.             font-size: 1rem;
  48.             color: #333;
  49.             line-height: 1.8;
  50.         }
  51.         .partner-content__text h2 {
  52.             font-size: 1.5rem;
  53.             font-weight: 600;
  54.             margin-top: 32px;
  55.             margin-bottom: 16px;
  56.             color: #1a1a1a;
  57.         }
  58.         .partner-content__text p {
  59.             margin-bottom: 16px;
  60.         }
  61.         .partner-content__text ul {
  62.             margin-bottom: 16px;
  63.             padding-left: 20px;
  64.         }
  65.         .partner-content__text li {
  66.             margin-bottom: 8px;
  67.         }
  68.         .partner-sidebar {
  69.             position: sticky;
  70.             top: 100px;
  71.         }
  72.         .partner-sidebar__card {
  73.             background: #f8f9fa;
  74.             border-radius: 12px;
  75.             padding: 24px;
  76.             margin-bottom: 20px;
  77.         }
  78.         .partner-sidebar__card h3 {
  79.             font-size: 1.1rem;
  80.             font-weight: 600;
  81.             margin-bottom: 16px;
  82.             color: #1a1a1a;
  83.         }
  84.         .partner-cta {
  85.             background: linear-gradient(135deg, #0066CC 0%, #4A90E2 100%);
  86.             color: #fff;
  87.             padding: 14px 24px;
  88.             border-radius: 8px;
  89.             text-decoration: none;
  90.             font-weight: 600;
  91.             display: flex;
  92.             align-items: center;
  93.             justify-content: center;
  94.             gap: 8px;
  95.             transition: transform 0.2s ease, box-shadow 0.2s ease;
  96.         }
  97.         .partner-cta:hover {
  98.             color: #fff;
  99.             text-decoration: none;
  100.             transform: translateY(-2px);
  101.             box-shadow: 0 4px 16px rgba(0, 102, 204, 0.3);
  102.         }
  103.         .partner-back-link {
  104.             display: inline-flex;
  105.             align-items: center;
  106.             gap: 8px;
  107.             color: #666;
  108.             text-decoration: none;
  109.             font-size: 0.9rem;
  110.             margin-bottom: 20px;
  111.         }
  112.         .partner-back-link:hover {
  113.             color: #0066CC;
  114.             text-decoration: none;
  115.         }
  116.     </style>
  117. {% endblock %}
  118. {% block navigation %}
  119.     {{ menu|raw }}
  120. {% endblock %}
  121. {% block content %}
  122.     {# Header Section: Logo (1/3) | Name + Description (2/3) #}
  123.     <section class="partner-header">
  124.         <div class="container">
  125.             {# Back Link #}
  126.             <a href="{{ language == 'en' ? path('public_partners_overview_en') : path('public_partners_overview') }}" class="partner-back-link">
  127.                 <i class="fas fa-arrow-left"></i>
  128.                 {{ language == 'en' ? 'Back to Partners' : 'Zurück zu Partner' }}
  129.             </a>
  130.             <div class="row align-items-center">
  131.                 {# Logo Column (1/3) #}
  132.                 <div class="col-md-4 mb-4 mb-md-0">
  133.                     <div class="partner-header__logo">
  134.                         {% if partner.logo %}
  135.                             <img src="{{ partner.logo }}" alt="{{ partner.name }}">
  136.                         {% else %}
  137.                             <div class="d-flex align-items-center justify-content-center bg-light text-primary" style="width: 100%; height: 150px; font-size: 48px; font-weight: bold;">
  138.                                 {{ partner.name|slice(0, 1)|upper }}
  139.                             </div>
  140.                         {% endif %}
  141.                     </div>
  142.                 </div>
  143.                 {# Name + Description Column (2/3) #}
  144.                 <div class="col-md-8">
  145.                     <h1 class="partner-header__name">{{ partner.name }}</h1>
  146.                     <p class="partner-header__description">{{ partner.description }}</p>
  147.                     {# Badges: Category + Tags #}
  148.                     {% set categoryLabel = partner.publicCategoryLabel|default(language == 'de' ? 'Beratung' : 'Consulting') %}
  149.                     {% set tags = partner.contentTags|default([]) %}
  150.                     {% if tags is not iterable or tags|length == 0 %}
  151.                         {% set tags = ['Strategy', 'Innovation'] %}
  152.                     {% endif %}
  153.                     <div class="partner-header__badges">
  154.                         <span class="badge badge-info">{{ categoryLabel }}</span>
  155.                         {% for tag in tags|slice(0, 2) %}
  156.                             <span class="badge badge-primary">{{ tag }}</span>
  157.                         {% endfor %}
  158.                     </div>
  159.                 </div>
  160.             </div>
  161.         </div>
  162.     </section>
  163.     {# Content Section: Free area for admin content or default text #}
  164.     <section class="partner-content">
  165.         <div class="container">
  166.             <div class="row">
  167.                 {# Main Content (8 cols) #}
  168.                 <div class="col-lg-8">
  169.                     <div class="partner-content__text" id="partner-description">
  170.                         {% if partner.descriptionLongHtml %}
  171.                             {# Priority 1: Free HTML content (editable in Monaco Editor) #}
  172.                             {{ partner.descriptionLongHtml|raw }}
  173.                         {% elseif partner.descriptionLong %}
  174.                             {# Priority 2: Markdown content (legacy) #}
  175.                             <div id="markdown-content" style="display:none;">{{ partner.descriptionLong }}</div>
  176.                             <div id="rendered-content"></div>
  177.                         {% else %}
  178.                             {# Default Text if no content provided #}
  179.                             <h2>{{ language == 'en' ? 'About ' ~ partner.name : 'Über ' ~ partner.name }}</h2>
  180.                             <p>
  181.                                 {% if language == 'en' %}
  182.                                     {{ partner.name }} is a valued partner in the STARTPLATZ network. As part of our ecosystem, they support startups and entrepreneurs with their expertise and services.
  183.                                 {% else %}
  184.                                     {{ partner.name }} ist ein geschätzter Partner im STARTPLATZ-Netzwerk. Als Teil unseres Ökosystems unterstützen sie Startups und Unternehmer mit ihrer Expertise und ihren Dienstleistungen.
  185.                                 {% endif %}
  186.                             </p>
  187.                             <p>
  188.                                 {% if language == 'en' %}
  189.                                     Our partners play a crucial role in the success of the startups we support. Through their network, knowledge, and resources, they contribute to creating an environment where innovation can thrive.
  190.                                 {% else %}
  191.                                     Unsere Partner spielen eine entscheidende Rolle für den Erfolg der von uns unterstützten Startups. Durch ihr Netzwerk, ihr Wissen und ihre Ressourcen tragen sie dazu bei, ein Umfeld zu schaffen, in dem Innovation gedeihen kann.
  192.                                 {% endif %}
  193.                             </p>
  194.                             <h2>{{ language == 'en' ? 'Partnership Benefits' : 'Partnerschaftsvorteile' }}</h2>
  195.                             <ul>
  196.                                 <li>{{ language == 'en' ? 'Access to exclusive STARTPLATZ network events' : 'Zugang zu exklusiven STARTPLATZ-Netzwerkveranstaltungen' }}</li>
  197.                                 <li>{{ language == 'en' ? 'Direct connection to innovative startups' : 'Direkter Kontakt zu innovativen Startups' }}</li>
  198.                                 <li>{{ language == 'en' ? 'Collaboration opportunities within the ecosystem' : 'Kooperationsmöglichkeiten innerhalb des Ökosystems' }}</li>
  199.                                 <li>{{ language == 'en' ? 'Visibility in Germany\'s leading startup hub' : 'Sichtbarkeit in Deutschlands führendem Startup-Hub' }}</li>
  200.                             </ul>
  201.                             <p>
  202.                                 {% if language == 'en' %}
  203.                                     Interested in learning more? Contact {{ partner.name }} directly or reach out to us for an introduction.
  204.                                 {% else %}
  205.                                     Interesse an mehr? Kontaktieren Sie {{ partner.name }} direkt oder wenden Sie sich an uns für eine Vorstellung.
  206.                                 {% endif %}
  207.                             </p>
  208.                         {% endif %}
  209.                     </div>
  210.                 </div>
  211.                 {# Sidebar (4 cols) #}
  212.                 <div class="col-lg-4">
  213.                     <div class="partner-sidebar">
  214.                         {# Member Benefits CTA - Primary Action #}
  215.                         <div class="partner-sidebar__card">
  216.                             <h3>{{ language == 'en' ? 'Member Benefits' : 'Mitglieder-Vorteile' }}</h3>
  217.                             <p class="text-muted small mb-3">
  218.                                 {{ language == 'en'
  219.                                     ? 'Exclusive offers, direct contact and special conditions for STARTPLATZ members.'
  220.                                     : 'Exklusive Angebote, direkter Kontakt und Sonderkonditionen für STARTPLATZ-Mitglieder.' }}
  221.                             </p>
  222.                             <a href="{{ path('connect_partner_show', {slug: partner.slug}) }}" class="partner-cta mb-0">
  223.                                 <i class="fas fa-lock"></i>
  224.                                 {{ language == 'en' ? 'Login for Benefits' : 'Login für Vorteile' }}
  225.                             </a>
  226.                         </div>
  227.                         {# Back to Overview #}
  228.                         <div class="partner-sidebar__card">
  229.                             <h3>{{ language == 'en' ? 'More Partners' : 'Weitere Partner' }}</h3>
  230.                             <a href="{{ language == 'en' ? path('public_partners_overview_en') : path('public_partners_overview') }}" class="btn btn-outline-primary btn-block">
  231.                                 <i class="fas fa-arrow-left mr-2"></i>
  232.                                 {{ language == 'en' ? 'All Partners' : 'Alle Partner' }}
  233.                             </a>
  234.                         </div>
  235.                     </div>
  236.                 </div>
  237.             </div>
  238.         </div>
  239.     </section>
  240. {% endblock %}
  241. {% block javascripts %}
  242.     {{ parent() }}
  243.     <script src="{{ asset('bundles/startplatzstyle/js/startplatz.accelerator.js') }}"></script>
  244.     {# Markdown rendering for partner description #}
  245.     <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
  246.     <script>
  247.         document.addEventListener('DOMContentLoaded', function() {
  248.             var markdownContent = document.getElementById('markdown-content');
  249.             var renderedContent = document.getElementById('rendered-content');
  250.             if (markdownContent && renderedContent) {
  251.                 var markdown = markdownContent.textContent || markdownContent.innerText;
  252.                 renderedContent.innerHTML = marked.parse(markdown);
  253.             }
  254.         });
  255.     </script>
  256. {% endblock %}