Skip to content

Commit

Permalink
DOCS-106 Implement Osano Cookie consent in docs.percona.com + remove …
Browse files Browse the repository at this point in the history
…scarf + new style (#145)

new file:   _resource/.icons/edit_page.png
	new file:   _resource/.icons/file-eye-outline.svg
	new file:   _resource/.icons/percona/logo.svg
	modified:   _resource/overrides/main.html
	modified:   _resource/overrides/partials/copyright.html
	deleted:    _resource/overrides/partials/nav.html
	new file:   docs/css/design.css
	new file:   docs/css/osano.css
	modified:   docs/css/percona.css
	new file:   docs/fonts/Poppins-Italic.ttf
	new file:   docs/fonts/Poppins-Light.ttf
	new file:   docs/fonts/Poppins-LightItalic.ttf
	new file:   docs/fonts/Poppins-Medium.ttf
	new file:   docs/fonts/Poppins-MediumItalic.ttf
	new file:   docs/fonts/Poppins-Regular.ttf
	new file:   docs/fonts/Poppins-SemiBold.ttf
	new file:   docs/fonts/Poppins-SemiBoldItalic.ttf
	new file:   docs/js/consent.js
	modified:   mkdocs-base.yml
	modified:   mkdocs.yml
	new file:   snippets/services-banner.md
	renamed:    docs/snippets/tech-preview/_tech-preview-feature.md -> snippets/tech-preview/_tech-preview-feature.md
  • Loading branch information
alina-derkach-oaza authored Mar 8, 2024
1 parent ddcdd91 commit b72c989
Show file tree
Hide file tree
Showing 22 changed files with 817 additions and 133 deletions.
Binary file added _resource/.icons/edit_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _resource/.icons/file-eye-outline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _resource/.icons/percona/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 38 additions & 73 deletions _resource/overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,14 @@
{# Import the theme's layout. #}
{% extends "base.html" %}

{%- macro relbar2 () %}
<div class="md-relbar2__inner md-grid">
<div class="md-content">
<article class="md-content__inner md-typeset" role="main">
<h3>Contact us </h3>
<p>For free technical help, visit the Percona <a class="reference external" href="https://forums.percona.com/c/postgresql/25?utm_campaign=Doc%20pages" target="_blank">Community Forum</a>.<br>
<p>To report bugs or submit feature requests, open a <a class="reference external" href="https://jira.percona.com/projects/DISTMYSQL/issues/" target="_blank">JIRA</a> ticket.<br>
<p>For paid <a class="reference external" href="https://www.percona.com/services/support"> support </a> and <a class="reference external" href="https://www.percona.com/services/managed-services"> managed </a> or <a class="reference external" href="https://www.percona.com/services/consulting">consulting services </a>, contact <a class="reference external" href="https://www.percona.com/about-percona/contact" target="_blank">Percona Sales</a>.</p>
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=751d512d-299c-4f7a-ad7e-166037a667e5" />
</article>
</div>
</div>

{%- endmacro %}
{% block scripts %}
<script src="https://cmp.osano.com/Azqe5vTyLOSbN3OuT/49ad85b5-0418-4794-ab81-7599dddd534c/osano.js"></script>
{{ super() }}
{% endblock %}

{% block extrahead %}
{{ super() }}

{% set title = config.site_name %}
{% if page and page.meta and page.meta.title %}
{% set title = title ~ " - " ~ page.meta.title %}
Expand All @@ -35,63 +26,37 @@ <h3>Contact us </h3>
<meta property="og:image" content="https://docs.percona.com/percona-distribution-for-mysql/8.0/_images/percona-mysql-logo.png" />
{% endblock %}

{% block analytics %}
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-WBVF48V');</script>
<!-- End Google Tag Manager -->

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WBVF48V"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{% endblock %}

{% block content %}

<!-- Edit and view button -->
{% if page.edit_url %}
{% set edit = "https://github.com/percona/pdmysql-docs/edit/8.0/docs/" %}
{% set view = "https://raw.githubusercontent.com/percona/pdmysql-docs/8.0/docs/" %}
<a
href="{{ page.edit_url }}"
title="{{ lang.t('edit.link.title') }}"
class="md-content__button md-icon"
>
{% include ".icons/material/file-edit-outline.svg" %}
</a>
<a
href="{{ page.edit_url | replace(edit, view) }}"
title="View source of this page"
class="md-content__button md-icon"
>
{% include ".icons/material/file-eye-outline.svg" %}
</a>
{% endif %}

<!--
Hack: check whether the content contains a h1 headline. If it
doesn't, the page title (or respectively site name) is used
as the main headline.
-->
{% if "\x3ch1" not in page.content %}
<h1>{{ page.title | d(config.site_name, true)}}</h1>
{% block site_nav %}
{% if nav %}
{% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "navigation" in page.meta.hide %}
{% endif %}

<!-- Markdown content -->
{{ page.content }}

{{ relbar2() }}

<!-- Last update of source file -->
{% if page and page.meta %}
{% if page.meta.git_revision_date_localized or
page.meta.revision_date
%}
{% include "partials/source-file.html" %}
{% endif %}
{% endif %}
{% endblock %}
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" {{ hidden }}>
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/nav.html" %}
<br>
<label class="md-nav__title" for="__drawer">
<a href="https://learn.percona.com/download-manual-percona-distribution-for-mysql-8" onclick="_gaq.push(['b._trackEvent', 'Percona Distribution for MySQL', 'Download', 'Download Manual Distribution for MySQL']);" class="md-nav__link md-nav__link--active" style="font-size: .7rem;">
Download PDF
</a>
</label>
</div>
</div>
</div>
{% endif %}
{% if "toc.integrate" not in features %}
{% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "toc" in page.meta.hide %}
{% endif %}
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" {{ hidden }}>
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/toc.html" %}
</div>
</div>
</div>
{% endif %}
{% endblock %}


3 changes: 2 additions & 1 deletion _resource/overrides/partials/copyright.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<div class="md-copyright">
<div class="md-copyright__highlight">
<a href='https://percona.com' target='_blank'>Percona LLC and/or its affiliates, </a> &copy; {{ build_date_utc.strftime('%Y') }}
</div>
<a href="#" onclick="Osano.cm.showDrawer('osano-cm-dom-info-dialog-open')">Cookie Preferences</a>
</div>
{% if not config.extra.generator == false %}
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Expand Down
38 changes: 0 additions & 38 deletions _resource/overrides/partials/nav.html

This file was deleted.

Loading

0 comments on commit b72c989

Please sign in to comment.