diff --git a/.github/deployments/build.sh b/.github/deployments/build.sh new file mode 100644 index 00000000..af9be52b --- /dev/null +++ b/.github/deployments/build.sh @@ -0,0 +1,35 @@ +name: Build Next.js Application + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + runs-on: ubuntu-latest + name: Build Next.js App + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: Build the app + run: npm run build + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: nextjs-build + path: .next \ No newline at end of file diff --git a/.github/deployments/staging.sh b/.github/deployments/staging.sh new file mode 100644 index 00000000..1d0fd5ea --- /dev/null +++ b/.github/deployments/staging.sh @@ -0,0 +1,29 @@ +name: Vercel Staging Deployment + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +on: + push: + branches: + - development + +jobs: + Deploy-Staging: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Vercel CLI + run: npm install --global vercel@latest + + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + + - name: Build Project Artifacts + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + + - name: Deploy Project Artifacts to Vercel Staging + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_ORG_ID }} --project=${{ secrets.VERCEL_PROJECT_ID }} --env=preview \ No newline at end of file diff --git a/.github/deployments/vercel.yml b/.github/deployments/vercel.yml deleted file mode 100644 index c2ea2870..00000000 --- a/.github/deployments/vercel.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Vercel Production Deployment -env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} -on: - push: - branches: - - main -jobs: - Deploy-Production: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install Vercel CLI - run: npm install --global vercel@latest - - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - - name: Build Project Artifacts - run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - - name: Deploy Project Artifacts to Vercel - run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..af9be52b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build Next.js Application + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +jobs: + build: + runs-on: ubuntu-latest + name: Build Next.js App + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install dependencies + run: npm install + + - name: Build the app + run: npm run build + + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: nextjs-build + path: .next \ No newline at end of file diff --git a/.github/workflows/vercel-staging.yml b/.github/workflows/vercel-staging.yml new file mode 100644 index 00000000..a165f02c --- /dev/null +++ b/.github/workflows/vercel-staging.yml @@ -0,0 +1,29 @@ +name: Vercel Staging Deployment + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +on: + push: + branches: + - development + +jobs: + Deploy-Staging: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install Vercel CLI + run: npm install --global vercel@latest + + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + + - name: Build Project Artifacts + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + + - name: Deploy Project Artifacts to Vercel Staging + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_ORG_ID }} --project=${{ secrets.VERCEL_PROJECT_ID }} --env=preview diff --git a/components/(structures)/Structures.tsx b/components/(structures)/Structures.tsx index 747b8876..5d4974ad 100644 --- a/components/(structures)/Structures.tsx +++ b/components/(structures)/Structures.tsx @@ -359,7 +359,7 @@ export function AtmosphereStructuresOnPlanet({ onStructuresFetch }: StructuresOn labels: config.labels || [], actions: config.actions || [], buttons: config.buttons.map(button => ({ - ...button, + ...button, showInNoModal: true, })), structureId: inventoryId diff --git a/styles/Structures/AtmosphereStructures.css b/styles/Structures/AtmosphereStructures.css new file mode 100644 index 00000000..61620511 --- /dev/null +++ b/styles/Structures/AtmosphereStructures.css @@ -0,0 +1,70 @@ +.relative { + position: relative; + } + + .grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 0.25rem; + } + + .flex { + display: flex; + } + + .flex-col { + flex-direction: column; + } + + .items-center { + align-items: center; + } + + .space-y-2 > * + * { + margin-top: 0.5rem; + } + + .w-16 { + width: 4rem; + } + + .h-16 { + height: 4rem; + } + + .w-14 { + width: 3.5rem; + } + + .h-14 { + height: 3.5rem; + } + + .cursor-pointer { + cursor: pointer; + } + + .bouncing-structure { + animation: bounce 1s infinite; + } + + @keyframes bounce { + 0%, 20%, 50%, 80%, 100% { + transform: translateY(0); + } + 40% { + transform: translateY(-20px); + } + 60% { + transform: translateY(-10px); + } + } + + .hovering-structure { + transition: transform 0.2s; + } + + .hovering-structure:hover { + transform: scale(1.1); + } + \ No newline at end of file diff --git a/styles/Structures/OrbitalStructures.css b/styles/Structures/OrbitalStructures.css new file mode 100644 index 00000000..362a1f06 --- /dev/null +++ b/styles/Structures/OrbitalStructures.css @@ -0,0 +1,54 @@ +.relative { + position: relative; + } + + .grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1rem; + } + + .flex { + display: flex; + } + + .flex-col { + flex-direction: column; + } + + .items-center { + align-items: center; + } + + .space-y-2 > * + * { + margin-top: 0.5rem; + } + + .w-16 { + width: 4rem; + } + + .h-16 { + height: 4rem; + } + + .w-14 { + width: 3.5rem; + } + + .h-14 { + height: 3.5rem; + } + + .cursor-pointer { + cursor: pointer; + } + + .hovering-structure { + transition: transform 0.2s; + } + + .hovering-structure:hover { + transform: scale(1.1); + } + \ No newline at end of file diff --git a/styles/Structures/StructureInfo.css b/styles/Structures/StructureInfo.css new file mode 100644 index 00000000..47383c8c --- /dev/null +++ b/styles/Structures/StructureInfo.css @@ -0,0 +1,50 @@ +.flex { + display: flex; + } + + .items-center { + align-items: center; + } + + .space-x-4 > * + * { + margin-left: 1rem; + } + + .bg { + background-color: #303F51; + } + + + .p-4 { + padding: 1rem; + } + + .rounded-lg { + border-radius: 0.5rem; + } + + .shadow-lg { + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); + } + + .max-w-sm { + max-width: 24rem; + } + + .text-xl { + font-size: 1.25rem; + } + + .font-semibold { + font-weight: 600; + } + + .text-sm { + font-size: 0.875rem; + } + + + .flex-shrink-0 { + flex-shrink: 0; + } + \ No newline at end of file diff --git a/styles/Structures/Structures.css b/styles/Structures/Structures.css new file mode 100644 index 00000000..1b876058 --- /dev/null +++ b/styles/Structures/Structures.css @@ -0,0 +1,101 @@ +.relative { + position: relative; + } + + .grid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1rem; + gap-y: 0.75rem; + } + + .flex { + display: flex; + } + + .flex-col { + flex-direction: column; + } + + .items-center { + align-items: center; + } + + .space-y-2 > * + * { + margin-top: 0.5rem; + } + + .w-24 { + width: 6rem; + } + + .h-24 { + height: 6rem; + } + + .w-16 { + width: 4rem; + } + + .h-16 { + height: 4rem; + } + + .w-14 { + width: 3.5rem; + } + + .h-14 { + height: 3.5rem; + } + + .cursor-pointer { + cursor: pointer; + } + + .bouncing-structure { + animation: bounce 1s infinite; + } + + @keyframes bounce { + 0%, 20%, 50%, 80%, 100% { + transform: translateY(0); + } + 40% { + transform: translateY(-20px); + } + 60% { + transform: translateY(-10px); + } + } + + .moving-structure { + animation: move 1.5s infinite; + } + + @keyframes move { + 0%, 100% { + transform: translateX(0); + } + 50% { + transform: translateX(10px); + } + } + + .text-white { + color: white; + } + + .text-sm { + font-size: 0.875rem; + } + + .mt-2 { + margin-top: 0.5rem; + } + + .mx-auto { + margin-left: auto; + margin-right: auto; + } + \ No newline at end of file