Skip to content

Commit

Permalink
chore: gh ribbon on left when RTL is on, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
barrenechea committed Dec 31, 2023
1 parent 4896500 commit 8afd104
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
File renamed without changes.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "1.0.0",
"author": "Sebastian Barrenechea (https://github.com/barrenechea)",
"license": "ISC",
"type": "module",
"engines": {
"node": ">=20.0.0",
"npm": ">=8.0.0"
Expand Down Expand Up @@ -62,4 +61,4 @@
"astro lint"
]
}
}
}
2 changes: 1 addition & 1 deletion src/templates/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const filteredTitle = ogOverride || title.replace(' - Barrenechea', '');

<body class="bg-zinc-900 font-sans text-gray-100">
<a
class="github-fork-ribbon hidden lg:block"
class=`github-fork-ribbon ${langDirection === 'rtl' ? 'left-top' : ''} hidden lg:block`
href={AppConfig.repo}
data-ribbon={t('nav.fork')}
title={t('nav.fork')}>{t('nav.fork')}</a
Expand Down
4 changes: 0 additions & 4 deletions src/templates/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
}
}

.language-id {
display: none;
}

.github-fork-ribbon:before {
@apply bg-zinc-700;
}
4 changes: 2 additions & 2 deletions tools/contentFinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { languages } from '../src/i18n/translations.ts';
const { defaultLang } = AppConfig;

// Derive the directory name from the current file's URL
const __dirname = path.dirname(fileURLToPath(`${import.meta.url}/../`));
const contentDir = path.join(__dirname, 'src', 'content');
const dirname = path.dirname(fileURLToPath(`${import.meta.url}/../`));
const contentDir = path.join(dirname, 'src', 'content');

async function getFilesInDirectory(dir: string, ext: string = '.mdx'): Promise<string[]> {
let files: string[] = [];
Expand Down
4 changes: 2 additions & 2 deletions tools/translateContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { model } from './llm.ts';
import { translate } from './translator.ts';

// Derive the directory name from the current file's URL
const __dirname = path.dirname(fileURLToPath(`${import.meta.url}/../`));
const contentDir = path.join(__dirname, 'src', 'content');
const dirname = path.dirname(fileURLToPath(`${import.meta.url}/../`));
const contentDir = path.join(dirname, 'src', 'content');

/**
* Helper function to translate a file
Expand Down

0 comments on commit 8afd104

Please sign in to comment.