1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-21 17:34:25 +04:00

Add different favicon to development environment (#2395)

This commit is contained in:
Paweł Kuna
2025-05-28 00:00:50 +02:00
committed by GitHub
parent a200d30f04
commit e96f055238
6 changed files with 25 additions and 9 deletions

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Add different favicon to development environment

BIN
docs/public/favicon-dev.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -22,6 +22,7 @@ export default function (eleventyConfig) {
eleventyConfig.addPassthroughCopy({
"node_modules/@tabler/core/dist": "dist",
"pages/favicon.ico": "favicon.ico",
"pages/favicon-dev.ico": "favicon-dev.ico",
"static": "static",
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -24,12 +24,15 @@
<link rel="icon" href="{{ page | relative }}/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="{{ page | relative }}/favicon.ico" type="image/x-icon"/>
<meta name="description" content="{{ description | default: site.description | escape }}"/>
{% include "layout/og.html" %}
{% elsif environment == 'development' %}
<link rel="icon" href="{{ page | relative }}/favicon-dev.ico" type="image/x-icon" />
<link rel="shortcut icon" href="{{ page | relative }}/favicon-dev.ico" type="image/x-icon" />
{% endif %}
{% include "layout/css.html" %}
{% include "layout/js-libs.html" head %}

View File

@@ -5,6 +5,8 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if environment == 'preview' %}
{% assign pageSection = "" %}
{% if page.url contains "/ui/" %}
{% assign pageSection = "UI" %}
@@ -48,6 +50,11 @@
<script defer data-api="/stats/event" data-domain="docs.tabler.io" src="/stats/js/script.js"></script>
{% elsif environment == 'development' %}
<link rel="icon" href="{{ page | relative }}/favicon-dev.ico" type="image/x-icon" />
<link rel="shortcut icon" href="{{ page | relative }}/favicon-dev.ico" type="image/x-icon" />
{% endif %}
<link rel="stylesheet" href="/dist/css/tabler{% if environment != 'development' %}.min{% endif %}.css{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" />
{% for plugin in site.cssPlugins %}
<link