diff --git a/docker/Dockerfile b/Dockerfile similarity index 100% rename from docker/Dockerfile rename to Dockerfile diff --git a/README.md b/README.md index f2dcc98..93d4a27 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,6 @@ The application will be available at `http://localhost:8000` For a more convenient setup, use the provided docker-compose configuration: ```bash -# Copy the example docker-compose.yaml from the docker folder -cp docker/docker-compose.example.yaml docker-compose.yaml # Run with docker-compose docker-compose up -d diff --git a/docker/docker-compose.example.yaml b/docker-compose.yaml similarity index 100% rename from docker/docker-compose.example.yaml rename to docker-compose.yaml diff --git a/mta-sign-ui/README.md b/mta-sign-ui/README.md index f4da3c4..f8e3498 100644 --- a/mta-sign-ui/README.md +++ b/mta-sign-ui/README.md @@ -1,14 +1,9 @@ -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). - ## Getting Started First, run the development server: ```bash -npm run dev -# or -yarn dev -# or +```bash pnpm dev ``` @@ -16,8 +11,6 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - ## Learn More To learn more about Next.js, take a look at the following resources: @@ -26,9 +19,3 @@ To learn more about Next.js, take a look at the following resources: - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/mta-sign-ui/public/next.svg b/mta-sign-ui/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/mta-sign-ui/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mta-sign-ui/public/vercel.svg b/mta-sign-ui/public/vercel.svg deleted file mode 100644 index d2f8422..0000000 --- a/mta-sign-ui/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity deleted file mode 100644 index 553cf2e..0000000 --- a/node_modules/.yarn-integrity +++ /dev/null @@ -1,10 +0,0 @@ -{ - "systemParams": "linux-x64-115", - "modulesFolders": [], - "flags": [], - "linkedModules": [], - "topLevelPatterns": [], - "lockfileEntries": {}, - "files": [], - "artifacts": {} -} \ No newline at end of file diff --git a/templates/layouts/index.html b/templates/layouts/index.html deleted file mode 100644 index e0d7f12..0000000 --- a/templates/layouts/index.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - - - - - - - - Pi MTA Display! - - - -
- -
-
-
-
-
-

- North -

-
-
    -
  • - -

    - Pi MTA Display! -

    -
  • -
  • - -

    - Pi MTA Display! -

    -
  • -
  • - -

    - Pi MTA Display! -

    -
  • -
-
-
-
-
-
-

- South -

-
-
    -
  • - -

    - Pi MTA Display! -

    -
  • -
  • - -

    - Pi MTA Display! -

    -
  • -
  • - -

    - Pi MTA Display! -

    -
  • -
-
-
-
-
-
-
- -
-
-
-
-
-

- North -

-
-
    -
  • - -

    - Pi MTA Display! -

    -
  • -
  • - -

    - Pi MTA Display! -

    -
  • -
  • - -

    - Pi MTA Display! -

    -
  • -
-
-
-
-
-
-

- South -

-
-
    -
  • - -

    - Pi MTA Display! -

    -
  • -
  • - -

    - Pi MTA Display! -

    -
  • -
  • - -

    - Pi MTA Display! -

    -
  • -
-
-
-
-
-
- - diff --git a/templates/static/css/style.css b/templates/static/css/style.css deleted file mode 100644 index 35b4ef5..0000000 --- a/templates/static/css/style.css +++ /dev/null @@ -1,43 +0,0 @@ -.site-title { - font-size: 4rem; -} - -.card-header { - font-size: 3rem !important; -} - -.station-name { - font-size: 3.5rem !important; -} - -.station-info { - font-size: 2.5rem !important; -} - -.station-info h1 { - float: right; -} - -.dropdown-menu { - max-height: 280px; - overflow-y: auto; -} - - -@media screen and (max-width: 1000px) { - .site-title { - font-size: 2rem !important; - } - - .card-header { - font-size: 1.5rem !important; - } - - .station-name { - font-size: 1.75rem !important; - } - - .station-info { - font-size: 1.25rem !important; - } -} diff --git a/templates/static/images/RPI-LOGO.png b/templates/static/images/RPI-LOGO.png deleted file mode 100644 index c38e5e8..0000000 Binary files a/templates/static/images/RPI-LOGO.png and /dev/null differ diff --git a/templates/static/images/lines/1.svg b/templates/static/images/lines/1.svg deleted file mode 100644 index 4f649cc..0000000 --- a/templates/static/images/lines/1.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/2.svg b/templates/static/images/lines/2.svg deleted file mode 100644 index 8e00cfa..0000000 --- a/templates/static/images/lines/2.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/3.svg b/templates/static/images/lines/3.svg deleted file mode 100644 index e803a46..0000000 --- a/templates/static/images/lines/3.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/4.svg b/templates/static/images/lines/4.svg deleted file mode 100644 index 1e05694..0000000 --- a/templates/static/images/lines/4.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/5.svg b/templates/static/images/lines/5.svg deleted file mode 100644 index 343e842..0000000 --- a/templates/static/images/lines/5.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/6.svg b/templates/static/images/lines/6.svg deleted file mode 100644 index 349ce0b..0000000 --- a/templates/static/images/lines/6.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/6D.svg b/templates/static/images/lines/6D.svg deleted file mode 100644 index a68bac6..0000000 --- a/templates/static/images/lines/6D.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/templates/static/images/lines/7.svg b/templates/static/images/lines/7.svg deleted file mode 100644 index 051272a..0000000 --- a/templates/static/images/lines/7.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/7D.svg b/templates/static/images/lines/7D.svg deleted file mode 100644 index 7c98163..0000000 --- a/templates/static/images/lines/7D.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/templates/static/images/lines/A.svg b/templates/static/images/lines/A.svg deleted file mode 100644 index 0f7c773..0000000 --- a/templates/static/images/lines/A.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/B.svg b/templates/static/images/lines/B.svg deleted file mode 100644 index 407b28f..0000000 --- a/templates/static/images/lines/B.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/C.svg b/templates/static/images/lines/C.svg deleted file mode 100644 index 7c88c7f..0000000 --- a/templates/static/images/lines/C.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/D.svg b/templates/static/images/lines/D.svg deleted file mode 100644 index bd2d23c..0000000 --- a/templates/static/images/lines/D.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/E.svg b/templates/static/images/lines/E.svg deleted file mode 100644 index 8703ce0..0000000 --- a/templates/static/images/lines/E.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/F.svg b/templates/static/images/lines/F.svg deleted file mode 100644 index c426cf2..0000000 --- a/templates/static/images/lines/F.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/G.svg b/templates/static/images/lines/G.svg deleted file mode 100644 index 0f388c4..0000000 --- a/templates/static/images/lines/G.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/H.svg b/templates/static/images/lines/H.svg deleted file mode 100644 index 3240eac..0000000 --- a/templates/static/images/lines/H.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/templates/static/images/lines/J.svg b/templates/static/images/lines/J.svg deleted file mode 100644 index df62dee..0000000 --- a/templates/static/images/lines/J.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/L.svg b/templates/static/images/lines/L.svg deleted file mode 100644 index 67e1545..0000000 --- a/templates/static/images/lines/L.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/M.svg b/templates/static/images/lines/M.svg deleted file mode 100644 index c3d77b3..0000000 --- a/templates/static/images/lines/M.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/N.svg b/templates/static/images/lines/N.svg deleted file mode 100644 index 445dca5..0000000 --- a/templates/static/images/lines/N.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/Q.svg b/templates/static/images/lines/Q.svg deleted file mode 100644 index e1323da..0000000 --- a/templates/static/images/lines/Q.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/R.svg b/templates/static/images/lines/R.svg deleted file mode 100644 index 3d52d5d..0000000 --- a/templates/static/images/lines/R.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/S.svg b/templates/static/images/lines/S.svg deleted file mode 100644 index f8e65a1..0000000 --- a/templates/static/images/lines/S.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/images/lines/SF.svg b/templates/static/images/lines/SF.svg deleted file mode 100644 index 5a35ac8..0000000 --- a/templates/static/images/lines/SF.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/templates/static/images/lines/SIR.svg b/templates/static/images/lines/SIR.svg deleted file mode 100644 index 640d6c6..0000000 --- a/templates/static/images/lines/SIR.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/templates/static/images/lines/SR.svg b/templates/static/images/lines/SR.svg deleted file mode 100644 index 714a1df..0000000 --- a/templates/static/images/lines/SR.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/templates/static/images/lines/T.svg b/templates/static/images/lines/T.svg deleted file mode 100644 index e2ddec4..0000000 --- a/templates/static/images/lines/T.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/templates/static/images/lines/W.svg b/templates/static/images/lines/W.svg deleted file mode 100644 index 8d086e3..0000000 --- a/templates/static/images/lines/W.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/templates/static/images/lines/Z.svg b/templates/static/images/lines/Z.svg deleted file mode 100644 index 112f30b..0000000 --- a/templates/static/images/lines/Z.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/templates/static/js/MtaData.js b/templates/static/js/MtaData.js deleted file mode 100644 index 33591ed..0000000 --- a/templates/static/js/MtaData.js +++ /dev/null @@ -1,123 +0,0 @@ -$(document).ready(function () { - - function updateStationData(station) { - $.ajax({ - type: "POST", - url: '/mta_data', - contentType: "application/json", - dataType: "json", - async: true, - data: JSON.stringify({"station": station.find('.station-name:first').get(0).innerText}, null, '\t'), - success: function (data) { - updateStation(station, data) - }, - error: function (request) { - console.log(request.responseText); - } - }); - } - function updateStartTime() { - $.ajax({ - type: "get", - url: '/start_time', - async: true, - success: function (data) { - console.log("GETTING TIME") - console.log(data); - $("#start_time").text(data) - }, - error: function (request) { - console.log(request.responseText); - } - }); - } - - function updateStation(station, data) { - updateDirections(station, data, "North"); - updateDirections(station, data, "South"); - updateTime(data["LastUpdated"]) - } - - function updateTime(lastUpdated) { - console.log(lastUpdated) - $("#last_updated").text(lastUpdated) - } - - function updateDirections(station, data, direction) { - n = data[direction] - list_items = station.find(".card:".concat(direction === "North" ? "first" : "last")).find(".station-info") - var i = 0; - for (var train in n) { - updateLineItem(list_items.get(i), n[train], train) - i = i + 1 - } - if (i < 3) { - console.log("Only 2 items updated") - for (let remainingIndex = i; remainingIndex < 3; remainingIndex++) { - updateLineItem(list_items.get(i), "No Trains Available", "N/A") - } - } - } - - function updateLineItem(listItem, times, train) { - var timeString; - if (typeof times === 'string' || times instanceof String) { - timeString = times; - } else { - timeString = times.sort(function (a, b) { - return a - b; - }).join(", "); - } - $(listItem).find("h1").text(timeString); - if (imageExists("/static/images/lines/" + train + ".svg")) { - - $(listItem).show() - $(listItem).find("img").attr("src", "/static/images/lines/" + train + ".svg") - } else if (train === "N/A") { - console.log("Route Is NA - Disabling Route") - console.log($(listItem)) - $(listItem).hide() - } - } - - function imageExists(image_url) { - var http = new XMLHttpRequest(); - http.open('HEAD', image_url, false); - http.send(); - return http.status != 404; - - } - - const interval = setInterval(function () { - updateStationData($('#station_1')) - }, 5000); - const interval2 = setInterval(function () { - updateStationData($('#station_2')) - }, 6000); - updateStartTime(); - - -}); - -function setStation(ele) { - console.log(ele) - console.log($(ele).text()) - var stop_name = ele.text; - - $.ajax({ - type: "POST", - //the url where you want to sent the userName and password to - url: '/get_stop_id', - contentType: "application/json", - dataType: "json", - async: true, - //json object to sent to the authentication url - data: JSON.stringify({"stop_name": stop_name}, null, '\t'), - success: function (data, text) { - alert(JSON.stringify(data)); - }, - error: function (request, status, error) { - alert(request.responseText); - } - }); -} \ No newline at end of file