diff --git a/.gitignore b/.gitignore index 27a3ea9..964dd0f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,7 @@ ufarms-react-client.pnp.js ufarms-react-client/coverage # production -ufarms-react-client/build +# ufarms-react-client/build # misc ufarms-react-client/.DS_Store diff --git a/requirements.txt b/requirements.txt index d9da14d..bf63362 100644 Binary files a/requirements.txt and b/requirements.txt differ diff --git a/requirements_prod.txt b/requirements_prod.txt deleted file mode 100644 index a83fbdf..0000000 --- a/requirements_prod.txt +++ /dev/null @@ -1,60 +0,0 @@ -alembic==1.11.3 -asgiref==3.7.2 -azure-core==1.26.4 -azure-storage-blob==12.16.0 -backports.zoneinfo;python_version<"3.9" -bcrypt==4.0.1 -blinker==1.6.2 -branca==0.6.0 -certifi==2022.12.7 -cffi==1.15.1 -charset-normalizer==3.1.0 -click==8.1.3 -cryptography==40.0.2 -Django==4.2.7 -dnspython==2.4.2 -docutils==0.20 -dominate==2.7.0 -email-validator==2.1.0.post1 -Flask==2.3.3 -Flask-Bcrypt==1.0.1 -Flask-Bootstrap==3.3.7.1 -Flask-Migrate==4.0.4 -Flask-SQLAlchemy==3.0.5 -Flask-WTF==1.1.1 -folium==0.14.0 -geographiclib==2.0 -geopy==2.3.0 -greenlet==2.0.2 -gunicorn==20.1.0 -idna==3.4 -importlib-metadata==6.6.0 -importlib-resources==6.0.1 -isodate==0.6.1 -itsdangerous==2.1.2 -Jinja2==3.1.2 -Mako==1.2.4 -MarkupSafe==2.1.2 -mysql-connector-python==8.1.0 -mysqlclient==2.2.0 -numpy==1.24.3 -pandas==2.0.1 -# pkg_resources==0.0.0 -protobuf==4.21.12 -pycparser==2.21 -PyMySQL==1.1.0 -python-dateutil==2.8.2 -python-dotenv==1.0.0 -pytz==2023.3 -requests==2.28.2 -six==1.16.0 -SQLAlchemy==2.0.19 -sqlparse==0.4.4 -statistics==1.0.3.5 -typing_extensions==4.6.1 -tzdata==2023.3 -urllib3==1.26.15 -visitor==0.1.3 -Werkzeug==2.3.7 -WTForms==3.0.1 -zipp==3.15.0 \ No newline at end of file diff --git a/server/__init__.py b/server/__init__.py new file mode 100644 index 0000000..1c7b070 --- /dev/null +++ b/server/__init__.py @@ -0,0 +1,27 @@ +# from flask import Flask +# from config import Config +# from flask_bootstrap import Bootstrap +# from flask_sqlalchemy import SQLAlchemy +# from flask_migrate import Migrate +# from flask_bcrypt import Bcrypt +# from flask_cors import CORS + +# # findme does this replace need for explicit mentions? +# app = Flask(__name__) #, static_folder='static', template_folder='templates') +# app.config.from_object(Config) +# app.secret_key = Config.SECRET_KEY + +# # Create a SQLAlchemy database connection +# app.config['SQLALCHEMY_DATABASE_URI'] = ( +# f"mysql+mysqlconnector://{Config.DB_USER}:{Config.DB_PASSWORD}@{Config.DB_HOST}/{Config.DB_NAME}" +# f"?ssl_ca={Config.APP_PATH}/isrgrootx1.pem" +# ) +# # findme consider hiding .pem file + +# db = SQLAlchemy(app) +# bootstrap = Bootstrap(app) +# migrate = Migrate(app, db) +# bcrypt = Bcrypt() +# CORS(app) +# from app import routes, models + diff --git a/server/client/README.md b/server/client/README.md new file mode 100644 index 0000000..89e22f3 --- /dev/null +++ b/server/client/README.md @@ -0,0 +1,14 @@ +This is a starter template for [Learn Next.js](https://nextjs.org/learn). + + +Hi Joseph! + +Here's an update about using fetch to dig the Flask framework. Greek to me xD + + +// Example using fetch + +fetch('/testmap') + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); diff --git a/server/client/app/components/form.module.css b/server/client/app/components/form.module.css new file mode 100644 index 0000000..431b923 --- /dev/null +++ b/server/client/app/components/form.module.css @@ -0,0 +1,5 @@ +.form { + display: flex; + flex-direction: column; + align-items: center; +} diff --git a/server/client/app/components/login-form.jsx b/server/client/app/components/login-form.jsx new file mode 100644 index 0000000..35b0305 --- /dev/null +++ b/server/client/app/components/login-form.jsx @@ -0,0 +1,17 @@ +import formStyles from "./form.module.css"; + +export default function LoginForm() { + return ( +
+ ); +} diff --git a/server/client/app/components/modal-template.jsx b/server/client/app/components/modal-template.jsx new file mode 100644 index 0000000..73221ce --- /dev/null +++ b/server/client/app/components/modal-template.jsx @@ -0,0 +1,25 @@ +import { useRef, useEffect } from "react"; +import { createPortal } from "react-dom"; +import modalStyles from "./modal.module.css"; + +export default function ModalTemplate({ isOpen, closeModal, children }) { + const dialogRef = useRef(); + + useEffect(() => { + isOpen ? dialogRef.current?.showModal() : dialogRef.current?.close(); + }, [isOpen]); + + return createPortal( + , + document.body + ); +} diff --git a/server/client/app/components/modal.module.css b/server/client/app/components/modal.module.css new file mode 100644 index 0000000..d6091a9 --- /dev/null +++ b/server/client/app/components/modal.module.css @@ -0,0 +1,9 @@ +.modal { + border: 2px solid brown; + border-radius: 10px; + background-color: var(--u-green); + box-shadow: 3px 3px 7px var(--u-grey); +} +.modal::backdrop { + background-color: rgba(0, 0, 0, 0.5); +} diff --git a/server/client/app/components/user-info-form.jsx b/server/client/app/components/user-info-form.jsx new file mode 100644 index 0000000..b4f5d17 --- /dev/null +++ b/server/client/app/components/user-info-form.jsx @@ -0,0 +1,25 @@ +import formStyles from "./form.module.css"; + +export default function UserInfoForm() { + return ( + + ); +} diff --git a/server/client/app/header.module.css b/server/client/app/header.module.css new file mode 100644 index 0000000..b8e7f55 --- /dev/null +++ b/server/client/app/header.module.css @@ -0,0 +1,13 @@ +.header { + display: flex; + justify-content: space-between; + align-items: center; + + background-color: brown; + box-shadow: 0 2px 6px black; + height: 70px; +} +.header .logo { + margin: 0; + font-size: 1.5rem; +} diff --git a/server/client/app/home-page.jsx b/server/client/app/home-page.jsx new file mode 100644 index 0000000..32b25ee --- /dev/null +++ b/server/client/app/home-page.jsx @@ -0,0 +1,10 @@ +import RootLayout from "./layout"; +import Link from "next/link"; + +export default function HomePage() { + return ( +Legend
+Openings
+No Openings
+I'm working on it
+ +{% endblock %} \ No newline at end of file diff --git a/server/templates/about.html b/server/templates/about.html new file mode 100644 index 0000000..0b7697e --- /dev/null +++ b/server/templates/about.html @@ -0,0 +1,54 @@ +{% extends "layout.html" %} +{% block app_content %} + +1 A group of people living in the same locality.
+
+ 2 A group of people having the same interests.
1 The science, art, and business of cultivating soil, producing crops, and raising livestock; farming.
+While volunteering in rural Nepal, I learned how agriculture could bring a village together. We're so connected now but we live disconnected from our world and our neighbors. This is a project in rediscovering ourselves while tuning in to our surroundings. I believe that through collective action we can close the gap that has grown between agriculture and community, these two things so essential. Follow me on this journey. Let's start by making the map.
+--Mark Ehler
+ID | +Name | +Age | +
---|