commit 02a2375e5dc6f4ccee917a03bb1a592a180d9934 Author: VinokurovVE Date: Mon Jun 10 22:33:59 2024 +0900 first init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7bf7a82 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.venv +.vscode +__pycache__ diff --git a/main.py b/main.py new file mode 100644 index 0000000..1a46787 --- /dev/null +++ b/main.py @@ -0,0 +1,31 @@ +from fastapi import FastAPI +from fastapi.responses import HTMLResponse +from fastapi.middleware.cors import CORSMiddleware +app = FastAPI() +origins = [ + "http://localhost", + "http://localhost:8000", + "http://localhost:3000", +] + +app.add_middleware( + CORSMiddleware, + allow_origins=origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + +@app.get("/") +def index(): + html_content = "

Hello METANIT.COM!

" + return HTMLResponse(content=html_content) + +@app.get("/cat") +async def get_data(): + return {"firstname": "Котофей","lastname":"Барсикофф","age":"10"} + + +if __name__ == "__main__": + import uvicorn + uvicorn.run(app, host="0.0.0.0", port=8000, reload=True) \ No newline at end of file diff --git a/src/assets/cat-img.png b/src/assets/cat-img.png new file mode 100644 index 0000000..2d36689 Binary files /dev/null and b/src/assets/cat-img.png differ diff --git a/src/js/my-comp.js b/src/js/my-comp.js new file mode 100644 index 0000000..2945855 --- /dev/null +++ b/src/js/my-comp.js @@ -0,0 +1,8 @@ +import { ref } from 'vue' +export default { + setup() { + const count = ref(0) + return { count } + }, + template: `
Count is: {{ count }}
` +} \ No newline at end of file diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..8ea575f --- /dev/null +++ b/src/style.css @@ -0,0 +1,45 @@ + +.card{ + width: 250px; + height: 350px; + border:1px solid black; + border-radius: 5px; + align-items: center; +} + +.card-img { + height: 250px; + width: 250px; + position: relative; +} +img { + width: 100%; + height: 100%; +} + +.card-fullname { + width: 100%; + height: 50px; + align-items: center; + display: inline-flex; +} +.card-fullname div { + font-size: larger; + font-weight:bold; + width: 100%; + text-align: center; +} + +.card-age { + align-items: center; + width: 100%; + display: flex; + position: relative; +} + +.card-age span { + width: 100%; + text-align: center; + font-size: small; + font-weight: 100; +} \ No newline at end of file diff --git a/test.html b/test.html new file mode 100644 index 0000000..ebf23d1 --- /dev/null +++ b/test.html @@ -0,0 +1,47 @@ + + + + + + Document + + + + + + +
+
+
+ +
+
+
{{cat_data.firstname}} {{cat_data.lastname}}
+
+
+ {{cat_data.age}} +
+
+ +
+ + + + \ No newline at end of file diff --git a/test.py b/test.py new file mode 100644 index 0000000..e69de29