Skip to content

Commit

Permalink
feat: remove dependency to google fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-chinour committed Feb 10, 2024
1 parent 6c1725f commit 6cc67f2
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 9 deletions.
Binary file added assets/fonts/DMMono-Regular.woff2
Binary file not shown.
Binary file added assets/fonts/DMSerifDisplay-Italic.woff2
Binary file not shown.
Binary file added assets/fonts/DMSerifDisplay-Regular.woff2
Binary file not shown.
Binary file added assets/fonts/Inter.woff2
Binary file not shown.
4 changes: 2 additions & 2 deletions assets/styles/app.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Serif+Display:ital@0;1&family=Inter:wght@100;300;400;500;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@import "fonts";

body {
font-family: 'Inter', sans-serif;
}
Expand Down
23 changes: 23 additions & 0 deletions assets/styles/fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@font-face {
font-family: "Inter";
font-style: normal;
src: url(../fonts/Inter.woff2) format('woff2');
}

@font-face {
font-family: "DM Mono";
font-style: normal;
src: url(../fonts/DMMono-Regular.woff2) format('woff2');
}

@font-face {
font-family: "DM Serif Display";
font-style: normal;
src: url(../fonts/DMSerifDisplay-Regular.woff2) format('woff2');
}

@font-face {
font-family: "DM Serif Display";
font-style: italic;
src: url(../fonts/DMSerifDisplay-Italic.woff2) format('woff2');
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ private function getContentSecurityPolicy(): string
$policies = [
'default-src' => [
"'self'",
'https://fonts.gstatic.com',
'https://fonts.googleapis.com',
'https://*.chinour.dev',
'https://*.grafana.net',
"'unsafe-inline'",
Expand Down
8 changes: 3 additions & 5 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@
<title>{% block title %}{{ site.name }}{% endblock %}</title>

<link rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>𓀌</text></svg>">

<link rel="dns-prefetch" href="https://images.ctfassets.net">

{{ encore_entry_link_tags('app') }}
{% block stylesheets %}{% endblock %}

{{ encore_entry_script_tags('app') }}
{% block javascripts %}{% endblock %}

<link rel="dns-prefetch" href="https://images.ctfassets.net">
<link rel="dns-prefetch" href="https://fonts.googleapis.com">
<link rel="dns-prefetch" href="https://fonts.gstatic.com">

<link rel="alternate" type="application/rss+xml" href="{{ url('rss_feed') }}" title="{{ site.name }} - RSS Feed">
</head>
<body class="dark:bg-zinc-800 dark:text-zinc-100 container mx-auto">
Expand Down

0 comments on commit 6cc67f2

Please sign in to comment.