finished version of app

This commit is contained in:
emilyliublair
2021-09-12 21:28:01 -04:00
parent baf2210dca
commit 9547d894ea
9 changed files with 80 additions and 83 deletions
+2 -2
View File
@@ -23,8 +23,7 @@ CREATE TABLE teachers (
name VARCHAR NOT NULL,
email VARCHAR NOT NULL,
phone VARCHAR NOT NULL,
position VARCHAR NOT NULL,
image VARCHAR
position VARCHAR NOT NULL
);
CREATE TABLE announcements (
@@ -75,6 +74,7 @@ CREATE TABLE new (
lang VARCHAR,
image VARCHAR,
name VARCHAR NOT NULL,
text VARCHAR NOT NULL,
new_date DATE
);
+1 -1
View File
@@ -164,7 +164,6 @@ api_route! {
email: (Text, String, String),
phone: (Text, String, String),
position: (Text, String, String),
image: (Text, String, Image),
}
}
@@ -221,6 +220,7 @@ api_route! {
new {
image: (Text, String, Image),
name: (Text, String, String),
text: (Text, String, String),
new_date: (Date, NaiveDate, DateForm),
}
}
+21 -2
View File
@@ -29,6 +29,7 @@
<small>ID: {{id}} | LANG: {{lang}}</small>
<h3 class="my-2" style="font-size: 18px;">{{name}}</h3>
<p class="mb-2">{{image}}</p>
<p class="mb-2">{{text}}</p>
<p class="mb-2">{{new_date}}</p>
<form action="new/del" method="post">
<div class="d-flex mt-3">
@@ -71,13 +72,22 @@
<div class="d-flex mt-3">
<div style="flex: 1; justify-content: center;">
<p class="my-0">Information</p>
<p class="my-0">Title</p>
</div>
<div style="flex: 1; align: center;">
<input type="text" class="form-control form-control-sm" id="name" name="name" required>
</div>
</div>
<div class="d-flex mt-3">
<div style="flex: 1; justify-content: center;">
<p class="my-0">Information</p>
</div>
<div style="flex: 1; align: center;">
<input type="text" class="form-control form-control-sm" id="text" name="text" required>
</div>
</div>
<div class="d-flex mt-3">
<div style="flex: 1; justify-content: center;">
<p class="my-0">Date of What's New Item</p>
@@ -124,13 +134,22 @@
<div class="d-flex mt-3">
<div style="flex: 1; justify-content: center;">
<p class="my-0">Information</p>
<p class="my-0">Title</p>
</div>
<div style="flex: 1; align: center;">
<input type="text" class="form-control form-control-sm" id="name" name="name" required>
</div>
</div>
<div class="d-flex mt-3">
<div style="flex: 1; justify-content: center;">
<p class="my-0">Information</p>
</div>
<div style="flex: 1; align: center;">
<input type="text" class="form-control form-control-sm" id="text" name="text" required>
</div>
</div>
<div class="d-flex mt-3">
<div style="flex: 1; justify-content: center;">
<p class="my-0">Date of What's New Item</p>
-19
View File
@@ -31,7 +31,6 @@
<p class="mb-2">{{email}}</p>
<p class="mb-2">{{phone}}</p>
<p class="mb-2">{{position}}</p>
<p class="mb-2">{{image}}</p>
<form action="teachers/del" method="post">
<div class="d-flex mt-3">
<input type="number" class="form-control form-control-sm" id="id" name="id" value = {{id}} style="display: none">
@@ -98,15 +97,6 @@
</div>
</div>
<div class="d-flex mt-3">
<div style="flex: 1; justify-content: center;">
<p class="my-0">Staff Picture</p>
</div>
<div style="flex: 1; align: center;">
<input type="text" class="form-control form-control-sm" name="image" id="image" required>
</div>
</div>
<input type="submit" value="Submit">
</form>
</div>
@@ -169,15 +159,6 @@
</div>
</div>
<div class="d-flex mt-3">
<div style="flex: 1; justify-content: center;">
<p class="my-0">Staff Picture</p>
</div>
<div style="flex: 1; align: center;">
<input type="text" class="form-control form-control-sm" name="image" id="image" required>
</div>
</div>
<input type="submit", value="Submit">
</form>
</div>