Skip to content

Commit

Permalink
Merge pull request #295 from canonical/WD-9044-update-favicon-on-micr…
Browse files Browse the repository at this point in the history
…osites
  • Loading branch information
immortalcodes authored Jun 26, 2024
2 parents 8d4ca5c + 9b19a2e commit 0c08bce
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 81 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ PORT=8037
FLASK_DEBUG=true
SECRET_KEY=local_development_fake_key
FLASK_SECRET_KEY=local_development_fake_key
DEVEL=True
DEVEL=True
FLASK_GOOGLE_SEARCH_API_KEY=insecure_development_key
12 changes: 8 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ env:
SECRET_KEY: insecure_test_key
FLASK_GOOGLE_SEARCH_API_KEY: insecure_test_key
jobs:

run-dotrun:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dotrun
uses: canonical/install-dotrun@main
run: sudo pip3 install dotrun requests==2.31.0

- name: Install dependencies
run: dotrun install
run: |
sudo chmod -R 777 .
dotrun install
- name: Build assets
run: dotrun build
Expand Down
4 changes: 2 additions & 2 deletions konf/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
- name: SENTRY_DSN
value: https://[email protected]//17

- name: SEARCH_API_KEY
- name: FLASK_GOOGLE_SEARCH_API_KEY
secretKeyRef:
key: google-custom-search-key
name: google-api
Expand All @@ -15,7 +15,7 @@ env:
secretKeyRef:
key: dqlite-io
name: secret-keys

# Overrides for production
production:
replicas: 5
Expand Down
Binary file added static/favicons/COF-favicon-48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions static/files/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "dqlite.io",
"short_name": "",
"icons": [
{
"src": "https://assets.ubuntu.com/v1/9c69b268-COF%20android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "https://assets.ubuntu.com/v1/c55060fd-COF%20android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
168 changes: 94 additions & 74 deletions templates/base_layout.html
Original file line number Diff line number Diff line change
@@ -1,89 +1,109 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta https-equiv="Accept-CH" content="DPR, Viewport-Width, Width">

<title>
{% block title %}Canonical Dqlite{% endblock %}
</title>

<link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.gstatic.com">

<!-- Google Tag Manager -->
<script>(function (w, d, s, l, i) {
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta https-equiv="Accept-CH" content="DPR, Viewport-Width, Width" />
<title>
{% block title %}Canonical Dqlite{% endblock %}
</title>
<link rel="preconnect" href="https://www.google-analytics.com" />
<link rel="preconnect" href="https://www.gstatic.com" />
<!-- 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-MV7Z9M3');</script>
<!-- End Google Tag Manager -->

<!-- GitHub buttons -->
<script async defer src="https://buttons.github.io/buttons.js"></script>


<link rel="icon" type="image/png" href="https://assets.ubuntu.com/v1/3ba2d831-cof-favicon-16x16.ico" sizes="16x16" />
<link rel="icon" type="image/png" href="https://assets.ubuntu.com/v1/2c6276dc-cof-favicon-32x32.ico" sizes="32x32" />

<link rel="preload" as="font" type="font/woff2" href="https://assets.ubuntu.com/v1/e8c07df6-Ubuntu-L_W.woff2" crossorigin>
<link rel="preload" as="font" type="font/woff2" href="https://assets.ubuntu.com/v1/7f100985-Ubuntu-Th_W.woff2" crossorigin>
<link rel="preload" as="font" type="font/woff2" href="https://assets.ubuntu.com/v1/f8097dea-Ubuntu-LI_W.woff2" crossorigin>
<link rel="preload" as="font" type="font/woff2" href="https://assets.ubuntu.com/v1/fff37993-Ubuntu-R_W.woff2" crossorigin>

<meta name="description" content="{% block meta_description %}Dqlite is a fast, embedded, persistent SQL database with Raft consensus that is perfect for fault-tolerant IoT and Edge devices.{% endblock %}">

<meta name="theme-color" content="#E95420">
<meta name="twitter:account_id" content="4503599627481511">
<meta name="twitter:site" content="@ubuntu">
<meta property="og:type" content="website">
<meta property="og:url" content="http://dqlite.io">
<meta property="og:site_name" content="dqlite.io">

{% if self.title() %}
<meta name="twitter:title" content="{{ self.title() }} | Canonical Dqlite">
<meta property="og:title" content="{{ self.title() }} | Canonical Dqlite">
{% endif %}

{% if self.meta_description() %}
<meta name="twitter:description" content="{{ self.meta_description() }}">
<meta property="og:description" content="{{ self.meta_description() }}">
{% endif %}

<link rel="stylesheet" type="text/css" media="screen" href="{{ versioned_static('css/styles.css') }}" />
</head>

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

{% block body%}
{% include "partial/_navigation.html" %}

<div id="main-content">
{% block content %}{% endblock content %}
</div>

{% include "partial/_footer.html" %}
{% endblock body %}
<script src="{{ versioned_static('js/build/global-nav/global-nav.js') }}"></script>
<script src="{{ versioned_static('js/build/cookie-policy/cookie-policy.js') }}"></script>
<script>
})(window, document, 'script', 'dataLayer', 'GTM-MV7Z9M3');
</script>
<!-- End Google Tag Manager -->
<!-- GitHub buttons -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<link rel="apple-touch-icon"
sizes="180x180"
href="https://assets.ubuntu.com/v1/f38b9c7e-COF%20apple-touch-icon.png" />
<link rel="icon"
type="image/png"
sizes="32x32"
href="https://assets.ubuntu.com/v1/be7e4cc6-COF-favicon-32x32.png" />
<link rel="icon"
type="image/png"
sizes="16x16"
href="https://assets.ubuntu.com/v1/16c27f81-COF%20favicon-16x16.png" />
<link rel="manifest" href="{{ versioned_static("files/site.webmanifest") }}" />
<!-- Serving favicon for search engines locally -->
<link rel="icon" type="image/png" sizes="48x48" href="{{ versioned_static("favicons/COF-favicon-48x48.png") }}" />
<link rel="preload"
as="font"
type="font/woff2"
href="https://assets.ubuntu.com/v1/e8c07df6-Ubuntu-L_W.woff2"
crossorigin />
<link rel="preload"
as="font"
type="font/woff2"
href="https://assets.ubuntu.com/v1/7f100985-Ubuntu-Th_W.woff2"
crossorigin />
<link rel="preload"
as="font"
type="font/woff2"
href="https://assets.ubuntu.com/v1/f8097dea-Ubuntu-LI_W.woff2"
crossorigin />
<link rel="preload"
as="font"
type="font/woff2"
href="https://assets.ubuntu.com/v1/fff37993-Ubuntu-R_W.woff2"
crossorigin />
<meta name="description"
content="{% block meta_description %}Dqlite is a fast, embedded, persistent SQL database with Raft consensus that is perfect for fault-tolerant IoT and Edge devices.{% endblock %}" />
<meta name="theme-color" content="#E95420" />
<meta name="twitter:account_id" content="4503599627481511" />
<meta name="twitter:site" content="@ubuntu" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://dqlite.io" />
<meta property="og:site_name" content="dqlite.io" />
{% if self.title() %}
<meta name="twitter:title" content="{{ self.title() }} | Canonical Dqlite" />
<meta property="og:title" content="{{ self.title() }} | Canonical Dqlite" />
{% endif %}
{% if self.meta_description() %}
<meta name="twitter:description" content="{{ self.meta_description() }}" />
<meta property="og:description" content="{{ self.meta_description() }}" />
{% endif %}
<link rel="stylesheet"
type="text/css"
media="screen"
href="{{ versioned_static("css/styles.css") }}" />
</head>
<body class="{% block page_class %}{% endblock %}">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MV7Z9M3"
height="0"
width="0"
style="display:none;
visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{% block body %}
{% include "partial/_navigation.html" %}
<div id="main-content">
{% block content %}
{% endblock content %}
</div>
{% include "partial/_footer.html" %}
{% endblock body %}
<script src="{{ versioned_static('js/build/global-nav/global-nav.js') }}"></script>
<script src="{{ versioned_static('js/build/cookie-policy/cookie-policy.js') }}"></script>
<script>
if (typeof cpNs !== "undefined") {
cpNs.cookiePolicy();
}
if (typeof canonicalGlobalNav !== "undefined") {
canonicalGlobalNav.createNav({breakpoint: 940});
}
</script>

{% block page_scripts %}{% endblock page_scripts %}
</body>

</script>
{% block page_scripts %}
{% endblock page_scripts %}
</body>
</html>

0 comments on commit 0c08bce

Please sign in to comment.