Skip to content

Commit

Permalink
Modified Paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Shanks0465 committed Aug 28, 2024
1 parent 12581db commit a66ea7c
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 31 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy Next.js site to Pages
on:
push:
branches: ["master"]
pull_request:
pull_request:
branches: ["master"]
workflow_dispatch:

Expand All @@ -26,6 +26,9 @@ jobs:
- name: Navigate to frontend directory
run: cd frontend

- name: Extract repository name
run: echo "BASE_PATH=/$(echo $GITHUB_REPOSITORY | cut -d '/' -f 2)" >> $GITHUB_ENV

- name: Detect package manager
id: detect-package-manager
run: |
Expand Down Expand Up @@ -87,7 +90,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'

steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down
3 changes: 2 additions & 1 deletion frontend/components/Datasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
import axios from "axios";
import { useQuery } from "react-query";
import { API_URL } from "@/app/config";
import { imagePrefix } from "@/app/config";

interface FeatureProps {
title: string;
Expand Down Expand Up @@ -171,7 +172,7 @@ export default function Datasets() {
<Feature
icon={
<Image
src={`/assets/icons/${dataset.area.toLowerCase()}.png`}
src={`${imagePrefix}/assets/icons/${dataset.area.toLowerCase()}.png`}
alt="Icon"
width={50}
height={50}
Expand Down
18 changes: 6 additions & 12 deletions frontend/components/Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ import {
Link,
} from "@chakra-ui/react";
import { ReactElement } from "react";
import {
FcAbout,
FcAssistant,
FcCollaboration,
FcDonate,
FcManager,
} from "react-icons/fc";
import { imagePrefix } from "@/app/config";

interface CardProps {
heading: string;
Expand Down Expand Up @@ -87,7 +81,7 @@ export default function Features() {
heading={"Large Language Models"}
icon={
<Image
src="/assets/icons/llm.png"
src={`${imagePrefix}/assets/icons/llm.png`}
alt="LLM"
width={100}
height={100}
Expand All @@ -102,7 +96,7 @@ export default function Features() {
heading={"Machine Translation"}
icon={
<Image
src="/assets/icons/nmt.png"
src={`${imagePrefix}/assets/icons/nmt.png`}
alt="LLM"
width={100}
height={100}
Expand All @@ -117,7 +111,7 @@ export default function Features() {
heading={"Transliteration"}
icon={
<Image
src="/assets/icons/xlit.png"
src={`${imagePrefix}/assets/icons/xlit.png`}
alt="LLM"
width={100}
height={100}
Expand All @@ -132,7 +126,7 @@ export default function Features() {
heading={"Automatic Speech Recognition"}
icon={
<Image
src="/assets/icons/asr.png"
src={`${imagePrefix}/assets/icons/asr.png`}
alt="LLM"
width={100}
height={100}
Expand All @@ -147,7 +141,7 @@ export default function Features() {
heading={"Text to Speech"}
icon={
<Image
src="/assets/icons/tts.png"
src={`${imagePrefix}/assets/icons/tts.png`}
alt="LLM"
width={100}
height={100}
Expand Down
51 changes: 36 additions & 15 deletions frontend/components/Sponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ import {
useColorModeValue,
SimpleGrid,
} from "@chakra-ui/react";
import { ReactElement } from "react";
import {
FcAbout,
FcAssistant,
FcCollaboration,
FcDonate,
FcManager,
} from "react-icons/fc";
import { imagePrefix } from "@/app/config";

export default function Sponsors() {
return (
Expand All @@ -37,25 +30,53 @@ export default function Sponsors() {
<Container maxW={"5xl"} mt={12}>
<SimpleGrid columns={{ base: 1, md: 4 }} spacing={10}>
<Card w={150} h={50}>
<Image src="/assets/logos/meity.svg" alt="LLM" fill={true} />
<Image
src={`${imagePrefix}/assets/logos/meity.svg`}
alt="LLM"
fill={true}
/>
</Card>
<Card w={150} h={50}>
<Image src="/assets/logos/C-DAC.png" alt="LLM" fill={true} />
<Image
src={`${imagePrefix}/assets/logos/nilekani.png`}
alt="LLM"
fill={true}
/>
</Card>
<Card w={150} h={50}>
<Image src="/assets/logos/nilekani.png" alt="LLM" fill={true} />
<Image
src={`${imagePrefix}/assets/logos/C-DAC.png`}
alt="LLM"
fill={true}
/>
</Card>
<Card w={150} h={50}>
<Image src="/assets/logos/ekstep.png" alt="LLM" fill={true} />
<Image
src={`${imagePrefix}/assets/logos/microsoft.png`}
alt="LLM"
fill={true}
/>
</Card>
<Card w={150} h={50}>
<Image src="/assets/logos/microsoft.png" alt="LLM" fill={true} />
<Image
src={`${imagePrefix}/assets/logos/google.png`}
alt="LLM"
fill={true}
/>
</Card>
<Card w={150} h={50}>
<Image src="/assets/logos/google.png" alt="LLM" fill={true} />
<Image
src={`${imagePrefix}/assets/logos/yotta.png`}
alt="LLM"
fill={true}
/>
</Card>
<Card w={150} h={50}>
<Image src="/assets/logos/yotta.png" alt="LLM" fill={true} />
<Image
src={`${imagePrefix}/assets/logos/ekstep.png`}
alt="LLM"
fill={true}
/>
</Card>
</SimpleGrid>
</Container>
Expand Down
1 change: 0 additions & 1 deletion frontend/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const nextConfig = {
basePath: "/ai4b-website",
output: "export",
eslint: {
ignoreDuringBuilds: true,
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/app/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ export const LANGUAGE_CODE_NAMES = {
mr: "Marathi",
mni: "Meitei (Manipuri)",
};

export const imagePrefix = process.env.BASE_PATH || "";

0 comments on commit a66ea7c

Please sign in to comment.