Skip to content

Commit

Permalink
Merge pull request #14 from GodHermit/13-host-web-app-on-github
Browse files Browse the repository at this point in the history
13 host web app on GitHub
  • Loading branch information
GodHermit authored Aug 12, 2023
2 parents b18ed60 + 909384b commit 776cb46
Show file tree
Hide file tree
Showing 15 changed files with 69 additions and 5 deletions.
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
const nextConfig = {
basePath: '/turing-machine',
reactStrictMode: true,
output: 'export',
}

module.exports = nextConfig
Binary file added public/assets/favicons/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/favicons/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/favicons/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/favicons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/favicons/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Turing Machine",
"short_name": "Turing Machine",
"description": "A web application that simulates a Turing Machine.",
"start_url": "https://godhermit.github.io/turing-machine",
"id": "https://godhermit.github.io/turing-machine",
"icons": [
{
"src": "/turing-machine/assets/favicons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/turing-machine/assets/favicons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#212529",
"background_color": "#ffffff",
"display": "standalone"
}
1 change: 0 additions & 1 deletion public/next.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/vercel.svg

This file was deleted.

Binary file modified src/app/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion src/app/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ $input-placeholder-color: $gray-500;
@import "~bootstrap/scss/utilities";
@import "~bootstrap/scss/reboot";
@import "~bootstrap/scss/type";
@import "~bootstrap/scss/images";
@import "~bootstrap/scss/containers";
@import "~bootstrap/scss/grid";
@import "~bootstrap/scss/helpers";
Expand Down
3 changes: 1 addition & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import './globals.scss';

export const metadata = {
title: 'Turing Machine Simulator',
description: 'Generated by create next app',
metadataBase: new URL('https://godhermit.github.io/turing-machine'),
};

export default function RootLayout({
Expand Down
40 changes: 40 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,46 @@ import InstructionsInput from '@/components/TuringMachine/InstructionsInput';
import MachineControls from '@/components/TuringMachine/MachineControls';
import Tape from '@/components/TuringMachine/Tape';
import TapeInput from '@/components/TuringMachine/TapeInput';
import { Metadata } from 'next';

const basePath = '/turing-machine';
export const metadata: Metadata = {
title: 'Turing Machine',
description: 'A web application that simulates a Turing Machine.',
themeColor: '#212529',
icons: {
icon: [
{
url: '/favicon.ico',
}, {
url: `${basePath}/assets/favicons/favicon-16x16.png`,
type: 'image/png',
sizes: '16x16',
}, {
url: `${basePath}/assets/favicons/favicon-32x32.png`,
type: 'image/png',
sizes: '32x32',
}, {
url: `${basePath}/assets/favicons/android-chrome-192x192.png`,
type: 'image/png',
sizes: '192x192',
}, {
url: `${basePath}/assets/favicons/android-chrome-512x512.png`,
type: 'image/png',
sizes: '512x512',
}
],
apple: `${basePath}/assets/favicons/apple-touch-icon.png`
},
manifest: `${basePath}/manifest.json`,
openGraph: {
title: 'Turing Machine',
description: 'A web application that simulates a Turing Machine.',
url: 'https://godhermit.github.io/turing-machine',
type: 'website',
locale: 'en_US',
}
};

export default function Page() {
return (
Expand Down
3 changes: 3 additions & 0 deletions src/app/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
2 changes: 2 additions & 0 deletions src/components/TuringMachine/Tape/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default function Tape() {
'btn-secondary',
styles.tapeButton,
)}
aria-label='Move tape left'
onClick={() => handleTapeMove('left')}
>
<MdArrowBackIosNew />
Expand Down Expand Up @@ -124,6 +125,7 @@ export default function Tape() {
styles.tapeButton,
)}
onClick={() => handleTapeMove('right')}
aria-label='Move tape right'
>
<MdArrowForwardIos />
</button>
Expand Down

0 comments on commit 776cb46

Please sign in to comment.