trying workaround
This commit is contained in:
parent
e954be1e08
commit
e1420a15fc
5 changed files with 13 additions and 8 deletions
|
@ -7,7 +7,8 @@ export interface Props {
|
||||||
|
|
||||||
const {mlb, link, name } = Astro.props;
|
const {mlb, link, name } = Astro.props;
|
||||||
|
|
||||||
const ce_img: string = `/ce/${link}.webp`;
|
const ce_img: string = `${Astro.site}/ce/${link}.webp`;
|
||||||
|
const mlb_ce: string = `${Astro.site}/ce/mlb.webp`
|
||||||
let mlb_image: string = "mlbalign";
|
let mlb_image: string = "mlbalign";
|
||||||
|
|
||||||
if(mlb === "false") {
|
if(mlb === "false") {
|
||||||
|
@ -21,7 +22,7 @@ if(mlb === "false") {
|
||||||
<img class="ce-crop" src={ce_img} alt={name}>
|
<img class="ce-crop" src={ce_img} alt={name}>
|
||||||
</div>
|
</div>
|
||||||
<div class={mlb_image}>
|
<div class={mlb_image}>
|
||||||
<img class="mlb" src="/ce/mlb.webp" alt="Max-limit broken"/>
|
<img class="mlb" src={mlb_ce} alt="Max-limit broken"/>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ export interface Props {
|
||||||
|
|
||||||
const {image, origin, name } = Astro.props;
|
const {image, origin, name } = Astro.props;
|
||||||
|
|
||||||
const img: string = `/favourites/${image}.webp`;
|
const img: string = `${Astro.site}/favourites/${image}.webp`;
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
---
|
---
|
||||||
|
const headerimg = `${Astro.site}/link_192.png`
|
||||||
---
|
---
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<a href="/" rel="noopener noreferrer" aria-label="Home">
|
<a href={Astro.site} rel="noopener noreferrer" aria-label="Home">
|
||||||
<img src="/link_192.png" alt="">
|
<img src={headerimg} alt="">
|
||||||
</a>
|
</a>
|
||||||
<ul class="desktop">
|
<ul class="desktop">
|
||||||
<slot />
|
<slot />
|
||||||
|
|
|
@ -9,16 +9,19 @@ export interface Props {
|
||||||
const {icon, text, link, currentPage } = Astro.props;
|
const {icon, text, link, currentPage } = Astro.props;
|
||||||
|
|
||||||
let currPage = "";
|
let currPage = "";
|
||||||
|
const slug = link.replace(new RegExp('/', 'g'), "")
|
||||||
|
|
||||||
if (currentPage === link.replace(new RegExp('/', 'g'), "")) {
|
if (currentPage === slug) {
|
||||||
currPage = "current"
|
currPage = "current"
|
||||||
} else if (currentPage === "home" && link === "/") {
|
} else if (currentPage === "home" && link === "/") {
|
||||||
currPage = "current"
|
currPage = "current"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const fulllink = `${Astro.site}/${slug}`;
|
||||||
---
|
---
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href={link} rel="noopener noreferrer" aria-label={text} class={currPage}>
|
<a href={fulllink} rel="noopener noreferrer" aria-label={text} class={currPage}>
|
||||||
<i class={icon}></i>
|
<i class={icon}></i>
|
||||||
{text}
|
{text}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -7,7 +7,7 @@ export interface Props {
|
||||||
|
|
||||||
const { image, link, title } = Astro.props;
|
const { image, link, title } = Astro.props;
|
||||||
|
|
||||||
const icon: string = `background: url('/ta_icons/${image}.webp')`
|
const icon: string = `background: url('${Astro.site}/ta_icons/${image}.webp')`
|
||||||
---
|
---
|
||||||
<a href={link} target="_blank" rel="noopener noreferrer" aria-label={title}>
|
<a href={link} target="_blank" rel="noopener noreferrer" aria-label={title}>
|
||||||
<article>
|
<article>
|
||||||
|
|
Loading…
Reference in a new issue