Skip to content

Commit

Permalink
Load base css files separating instead of importing them and duplicat…
Browse files Browse the repository at this point in the history
…ing data transferred
  • Loading branch information
mattsherman committed Nov 19, 2024
1 parent b2099ed commit 0ef73ad
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
7 changes: 7 additions & 0 deletions src/_components/BaseStylesLinks.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default (data: Lume.Data, _helpers: Lume.Helpers) => (
<>
<link rel="stylesheet" href={`/${data.cacheBusterVersion}/reset.css`} />
<link rel="stylesheet" href={`/${data.cacheBusterVersion}/fonts.css`} />
<link rel="stylesheet" href={`/${data.cacheBusterVersion}/base.css`} />
</>
);
1 change: 1 addition & 0 deletions src/_includes/layouts/home-page-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export default (data: Lume.Data, _helpers: Lume.Helpers) => (
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<data.comp.BaseStylesLinks />
<link rel="stylesheet" href={`/${data.cacheBusterVersion}/styles.css`} />
<link
rel="alternate"
Expand Down
1 change: 1 addition & 0 deletions src/_includes/layouts/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export default (data: Lume.Data, helpers: Lume.Helpers) => (
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<data.comp.BaseStylesLinks />
<link rel="stylesheet" href={`/${data.cacheBusterVersion}/styles.css`} />
<link
rel="alternate"
Expand Down
1 change: 1 addition & 0 deletions src/_includes/layouts/post-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default (data: Lume.Data, helpers: Lume.Helpers) => {
rel="stylesheet"
href={`/${data.cacheBusterVersion}/prism-code-themes/okaidia.css`}
/>
<data.comp.BaseStylesLinks />
<link
rel="stylesheet"
href={`/${data.cacheBusterVersion}/styles.css`}
Expand Down
1 change: 1 addition & 0 deletions src/_includes/layouts/resume-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export default (data: Lume.Data, helpers: Lume.Helpers) => (
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<data.comp.BaseStylesLinks />
<link
rel="stylesheet"
href={`/${data.cacheBusterVersion}/resume/styles.css`}
Expand Down
5 changes: 0 additions & 5 deletions src/resume/styles.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/* Variables cannot be used in url(), so hardcode version */
@import url("/v2/reset.css");
@import url("/v2/fonts.css");
@import url("/v3/base.css");

@media print {
@page {
size: letter;
Expand Down
5 changes: 0 additions & 5 deletions src/styles.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/* Variables cannot be used in url(), so hardcode version */
@import url("/v2/reset.css");
@import url("/v2/fonts.css");
@import url("/v3/base.css");

body > nav {
padding: 1rem;

Expand Down

0 comments on commit 0ef73ad

Please sign in to comment.