feat: now i18n done

Signed-off-by: Filipe Medeiros <hello@filipesm.eu>
This commit is contained in:
Filipe Medeiros 2023-04-15 15:52:37 +01:00
parent 0973cfe428
commit 6f15a6ec7d
Signed by: filipe
GPG key ID: 9533BD5467CC1E78
5 changed files with 37 additions and 20 deletions

View file

@ -6,7 +6,7 @@ export type Props = HTMLAttributes<'a'>;
<a
class:list={[
'bg-primary-800 text-white shadow-[5px_5px] shadow-primary-600 hover:shadow-primary-600 hover:shadow-[3px_3px] active:shadow-none',
'bg-primary-800 text-white shadow-[5px_5px] shadow-primary-600 hover:shadow-primary-600 hover:shadow-[3px_3px] active:shadow-none transition-shadow duration-100',
Astro.props.class,
]}
{...Astro.props}

View file

@ -10,15 +10,15 @@ const { link } = Astro.props;
<li
class:list={[
'border-primary-800 border-2 w-96 max-w-full mb-3 group/card',
'border-primary-800 border-2 transition-shadow duration-100 w-96 max-w-full mb-3 group/card',
{
'hover:shadow-[-3px_-3px] over:shadow-primary-800 ctive:shadow-[-5px_-5px] ctive:shadow-primary-800':
'hover:shadow-[-5px_-5px] hover:shadow-primary-800 ctive:shadow-[-5px_-5px] ctive:shadow-primary-800':
random === 0,
'hover:shadow-[-3px_3px] hover:shadow-primary-800 active:shadow-[-5px_5px] active:shadow-primary-800':
'hover:shadow-[-5px_5px] hover:shadow-primary-800 active:shadow-[-5px_5px] active:shadow-primary-800':
random === 1,
'hover:shadow-[3px_-3px] hover:shadow-primary-800 active:shadow-[5px_-5px] active:shadow-primary-800':
'hover:shadow-[5px_-5px] hover:shadow-primary-800 active:shadow-[5px_-5px] active:shadow-primary-800':
random === 2,
'hover:shadow-[3px_3px] hover:shadow-primary-800 active:shadow-[5px_5px] active:shadow-primary-800':
'hover:shadow-[5px_5px] hover:shadow-primary-800 active:shadow-[5px_5px] active:shadow-primary-800':
random === 3,
},
]}
@ -26,7 +26,10 @@ const { link } = Astro.props;
<a href={link} class="px-4 py-3 block">
<slot />
<div class="flex justify-end">
<span class="pr-3 text-xl group-hover/card:pr-0">→</span>
<span
class="pr-3 text-xl group-hover/card:pr-0 transition-[padding] duration-100"
>→</span
>
</div>
</a>
</li>

View file

@ -6,7 +6,7 @@ export type Props = HTMLAttributes<'a'>;
<a
class:list={[
'text-primary-800 underline hover:text-primary-700',
'text-primary-800 underline transition-colors duration-100 hover:text-primary-700',
Astro.props.class,
]}
{...Astro.props}><slot /></a

View file

@ -1,6 +0,0 @@
{
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"semi": false
}

View file

@ -5,7 +5,12 @@ import {visionTool} from '@sanity/vision'
import {schemaTypes} from './schemas'
import {blogPostPublishAction} from './documentActions/blogPostPublishAction'
import {unsplashImageAsset} from 'sanity-plugin-asset-source-unsplash'
import {withDocumentI18nPlugin} from '@sanity/document-internationalization'
import {getDocumentList, withDocumentI18nPlugin} from '@sanity/document-internationalization'
const languages = [
{id: 'pt_PT', title: 'Português'},
{id: 'en_EN', title: 'English'},
]
export default defineConfig({
name: 'personal-webiste',
@ -14,12 +19,27 @@ export default defineConfig({
projectId: 'tzamgyrm',
dataset: 'production',
plugins: withDocumentI18nPlugin([visionTool(), media(), unsplashImageAsset()], {
languages: [
{id: 'pt_PT', title: 'Português'},
{id: 'en_EN', title: 'English'},
plugins: withDocumentI18nPlugin(
[
deskTool({
structure: (S, {schema}) =>
getDocumentList({
S,
schema,
config: {
languages,
},
}),
}),
visionTool(),
media(),
unsplashImageAsset(),
],
}),
{
includeDeskTool: false,
languages,
}
),
schema: {
types: schemaTypes,