Skip to content

Commit

Permalink
logo and font from cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis committed Apr 18, 2024
1 parent d681ce7 commit 62cb7fd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/checkout/components/CompactHeader.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { html } from "../utils.js";
import { html, IMAGE_SERVER } from "../utils.js";

export default () => {
return html`<header class="c_CompactHeader">
<div class="c_CompactHeader__inner">
<a class="c_CompactHeader__link" href="/">
<img
class="c_CompactHeader__logo"
src="/cdn/img/logo.svg"
src="${IMAGE_SERVER}/cdn/img/logo.svg"
alt="Micro Frontends - Tractor Store"
/>
</a>
Expand Down
3 changes: 2 additions & 1 deletion src/checkout/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

@font-face {
font-family: "Raleway";
src: url("/cdn/font/raleway-regular.woff2") format("woff2");
src: url("https://cdn.the-tractor.store/cdn/font/raleway-regular.woff2")
format("woff2");
font-weight: normal;
font-style: normal;
}
Expand Down
2 changes: 1 addition & 1 deletion src/checkout/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
export const html = String.raw;

// use the image server if not using local images
const IMAGE_SERVER =
export const IMAGE_SERVER =
typeof process === "undefined" || process.env.USE_LOCAL_IMAGES !== "true"
? "https://cdn.the-tractor.store"
: "";
Expand Down
3 changes: 2 additions & 1 deletion src/decide/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

@font-face {
font-family: "Raleway";
src: url("/cdn/font/Raleway-Regular.woff2") format("woff2");
src: url("https://cdn.the-tractor.store/cdn/font/Raleway-Regular.woff2")
format("woff2");
font-weight: normal;
font-style: normal;
}
Expand Down
4 changes: 2 additions & 2 deletions src/explore/components/Header.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import MiniCart from "../../checkout/components/MiniCart.js";
import Navigation from "./Navigation.js";
import { html } from "../utils.js";
import { html, IMAGE_SERVER } from "../utils.js";

/**
* Header component.
Expand All @@ -14,7 +14,7 @@ export default ({ c }) => {
<a class="e_Header__link" href="/">
<img
class="e_Header__logo"
src="/cdn/img/logo.svg"
src="${IMAGE_SERVER}/cdn/img/logo.svg"
alt="Micro Frontends - Tractor Store"
/>
</a>
Expand Down
3 changes: 2 additions & 1 deletion src/explore/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

@font-face {
font-family: "Raleway";
src: url("/cdn/font/raleway-regular.woff2") format("woff2");
src: url("https://cdn.the-tractor.store/cdn/font/raleway-regular.woff2")
format("woff2");
font-weight: normal;
font-style: normal;
}
Expand Down

0 comments on commit 62cb7fd

Please sign in to comment.