Skip to content

Commit a8c9e31

Browse files
feat: use variable fonts from fontsources
1 parent 0986fe8 commit a8c9e31

22 files changed

+118
-108
lines changed

astro.config.mjs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
import { defineConfig } from 'astro/config';
2-
import Unfonts from 'unplugin-fonts/astro'
32

43
// https://astro.build/config
5-
export default defineConfig({
6-
integrations: [
7-
Unfonts({
8-
google: {
9-
families: [
10-
'Cabin',
11-
{
12-
name: 'Open Sans',
13-
styles: 'wght@300;400',
14-
},
15-
],
16-
},
17-
})
18-
]
19-
});
4+
export default defineConfig({});

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
"simplebar": "6.2.5"
3737
},
3838
"devDependencies": {
39+
"@fontsource-variable/cabin": "^5.0.9",
40+
"@fontsource-variable/open-sans": "^5.0.13",
3941
"autoprefixer": "10.4.15",
4042
"npm-run-all": "4.1.5",
4143
"unplugin-fonts": "^1.0.3"

pnpm-lock.yaml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Footer.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</div>
6666
</div>
6767
<!-- Copyright -->
68-
<p class="k-copyright">© 2018-2021 | Krypton. All Rights Reserved</p>
68+
<p class="k-copyright">© 2018-2023 | Krypton. All Rights Reserved</p>
6969
<br />
7070
<!-- Made by -->
7171
<p class="coded-by">

src/components/Navbar.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,23 @@
4545
<div class="navbar-end">
4646
<!-- Menu item -->
4747
<div class="navbar-item is-nav-link">
48-
<a class="is-centered-responsive" href="token">Token</a>
48+
<a class="is-centered-responsive" href="/token">Token</a>
4949
</div>
5050
<!-- Menu item -->
5151
<div class="navbar-item is-nav-link">
52-
<a class="is-centered-responsive" href="ico">Ico</a>
52+
<a class="is-centered-responsive" href="/ico">Ico</a>
5353
</div>
5454
<!-- Menu item -->
5555
<div class="navbar-item is-nav-link">
56-
<a class="is-centered-responsive" href="roadmap">Roadmap</a>
56+
<a class="is-centered-responsive" href="/roadmap">Roadmap</a>
5757
</div>
5858
<!-- Menu item -->
5959
<div class="navbar-item is-nav-link">
60-
<a class="is-centered-responsive" href="blog">Media</a>
60+
<a class="is-centered-responsive" href="/blog">Media</a>
6161
</div>
6262
<!-- Menu item -->
6363
<div class="navbar-item is-nav-link">
64-
<a class="is-centered-responsive" href="#" target="_blank">
64+
<a class="is-centered-responsive" href="#">
6565
<img class="telegram" src="/img/logo/telegram.svg" alt="" />
6666
Telegram
6767
</a>

src/components/NavbarClone.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,19 @@
4747
<div class="navbar-end">
4848
<!-- Menu item -->
4949
<div class="navbar-item is-nav-link">
50-
<a class="is-centered-responsive" href="token">Token</a>
50+
<a class="is-centered-responsive" href="/token">Token</a>
5151
</div>
5252
<!-- Menu item -->
5353
<div class="navbar-item is-nav-link">
54-
<a class="is-centered-responsive" href="ico">Ico</a>
54+
<a class="is-centered-responsive" href="/ico">Ico</a>
5555
</div>
5656
<!-- Menu item -->
5757
<div class="navbar-item is-nav-link">
58-
<a class="is-centered-responsive" href="roadmap">Roadmap</a>
58+
<a class="is-centered-responsive" href="/roadmap">Roadmap</a>
5959
</div>
6060
<!-- Menu item -->
6161
<div class="navbar-item is-nav-link">
62-
<a class="is-centered-responsive" href="blog">Media</a>
62+
<a class="is-centered-responsive" href="/blog">Media</a>
6363
</div>
6464
<!-- Menu item -->
6565
<div class="navbar-item is-nav-link">

src/js/libs/components/tabs/tabs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function initTabs() {
88

99
setupCountdown() {
1010
// Set the date we're counting down to
11-
var countDownDate = new Date("Oct 24, 2021 07:00:00").getTime();
11+
var countDownDate = new Date().getTime() + (1000 * 60 * 60 * 24 * 7); // 7 days from now
1212

1313
// Update the count down every 1 second
1414
var x = setInterval(function () {

src/layouts/Default.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
---
22
import { ViewTransitions } from 'astro:transitions';
3-
import Unfont from 'unplugin-fonts/astro/component.astro';
43
import Footer from '../components/Footer.astro'
54
import BackToTop from '../components/BackToTop.astro'
5+
6+
import '@fontsource-variable/cabin/index.css';
7+
import '@fontsource-variable/open-sans/index.css';
8+
69
import 'simplebar/dist/simplebar.min.css'
710
import '../styles/main.scss'
811
const {title} = Astro.props
@@ -12,7 +15,6 @@ const {title} = Astro.props
1215
<html dir="ltr" lang="en">
1316
<head>
1417
<meta charset="UTF-8" />
15-
<Unfont />
1618
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1719
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
1820
<title>Krypton {'- ' + title}</title>

src/layouts/Minimal.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
22
import { ViewTransitions } from 'astro:transitions';
3-
import Unfont from 'unplugin-fonts/astro/component.astro';
43
import BackToTop from '../components/BackToTop.astro'
4+
5+
import '@fontsource-variable/cabin/index.css';
6+
import '@fontsource-variable/open-sans/index.css';
7+
58
import 'simplebar/dist/simplebar.min.css'
69
import 'plyr/dist/plyr.css'
710
import '../styles/main.scss'
@@ -12,7 +15,6 @@ const {title} = Astro.props
1215
<html dir="ltr" lang="en">
1316
<head>
1417
<meta charset="UTF-8" />
15-
<Unfont />
1618
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1719
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
1820
<title>Krypton {'- ' + title}</title>

src/pages/blog.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const title = "Blog";
5151
<div class="content-wrapper">
5252
<!-- Post -->
5353
<div class="blog-post">
54-
<a href="blog-single">
54+
<a href="/blog-single">
5555
<!-- Featured image -->
5656
<div class="featured-image">
5757
<img src="/img/media/post4.svg" alt="" />
@@ -95,7 +95,7 @@ const title = "Blog";
9595

9696
<!-- Post -->
9797
<div class="blog-post">
98-
<a href="blog-single">
98+
<a href="/blog-single">
9999
<!-- Featured image -->
100100
<div class="featured-image">
101101
<img src="/img/media/post1.svg" alt="" />
@@ -139,7 +139,7 @@ const title = "Blog";
139139

140140
<!-- Post -->
141141
<div class="blog-post">
142-
<a href="blog-single">
142+
<a href="/blog-single">
143143
<!-- Featured image -->
144144
<div class="featured-image">
145145
<img src="/img/media/post5.svg" alt="" />
@@ -183,7 +183,7 @@ const title = "Blog";
183183

184184
<!-- Post -->
185185
<div class="blog-post">
186-
<a href="blog-single">
186+
<a href="/blog-single">
187187
<!-- Featured image -->
188188
<div class="featured-image">
189189
<img src="/img/media/post2.svg" alt="" />
@@ -227,7 +227,7 @@ const title = "Blog";
227227

228228
<!-- Post -->
229229
<div class="blog-post">
230-
<a href="blog-single">
230+
<a href="/blog-single">
231231
<!-- Featured image -->
232232
<div class="featured-image">
233233
<img src="/img/media/post3.svg" alt="" />

0 commit comments

Comments
 (0)