bootstrap
parent
4736a7d9ab
commit
447ffdd187
@ -1,11 +1,14 @@
|
||||
from cs50 import sql
|
||||
|
||||
db = sql.SQL("sqlite:///gremlin.db")
|
||||
partnumber = input("Partnumber?: ")
|
||||
count = db.execute("SELECT COUNT(*) FROM pricelist WHERE Partnumber = ?;", partnumber)
|
||||
rows = db.execute("SELECT * FROM pricelist WHERE Partnumber = ?;", partnumber)
|
||||
search_partnumber = input("Partnumber?: ")
|
||||
partnuumbers = db.execute("SELECT * FROM pricelist WHERE Partnumber = ?;", search_partnumber)
|
||||
|
||||
for row in rows:
|
||||
print(f"{row['Partnumber']} | {row['Option']} | {row['Description']}")
|
||||
for partnumber in partnuumbers:
|
||||
print(f"{partnumber['Partnumber']} | {partnumber['Option']} | {partnumber['Description']}")
|
||||
|
||||
print(f"Found {count} products.")
|
||||
search_account = input("Account?: ")
|
||||
accounts = db.execute("SELECT * FROM accounts WHERE Name = ?;", search_account)
|
||||
|
||||
for account in accounts:
|
||||
print(f"{account['Name']} | {account['Street']} | {account['Postal Code']} | {account['City']}")
|
||||
@ -0,0 +1,31 @@
|
||||
.centered {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.larger {
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
.medium {
|
||||
font-size: medium;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#harvard {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#yale {
|
||||
color: blue;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<link href="home.css" rel="stylesheet">
|
||||
<title>home</title>
|
||||
</head>
|
||||
|
||||
<body class="centered">
|
||||
<header class="large">John Harvard</header>
|
||||
<main class="medium">Welcome to my home page!</main>
|
||||
<footer class="small">Copyright © John Harvard</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<!-- Demonstrates table -->
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>phonebook</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Number</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Carter</td>
|
||||
<td>+1-617-495-1000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>David</td>
|
||||
<td>+1-617-495-1000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>John</td>
|
||||
<td>+1-949-468-2750</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<!-- Demonstrates table with Bootstrap -->
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<title>phonebook</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Number</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Carter</td>
|
||||
<td>+1-617-495-1000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>David</td>
|
||||
<td>+1-949-468-2750</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<!-- Demonstrates layout with Bootstrap -->
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
|
||||
<title>search</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<ul class="m-3 nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" href="https://about.google/">About</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" href="https://store.google.com/">Store</a>
|
||||
</li>
|
||||
<li class="nav-item ms-auto">
|
||||
<a class="nav-link text-dark" href="https://www.google.com/gmail/">Gmail</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" href="https://www.google.com/imghp">Images</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" href="https://www.google.com/intl/en/about/products">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
||||
class="bi bi-grid-3x3-gap-fill" viewBox="0 0 16 16">
|
||||
<path
|
||||
d="M1 2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V2zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V2zM1 7a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V7zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V7zM1 12a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-2zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-2zm5 0a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-2z" />
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="btn btn-primary" href="https://accounts.google.com/ServiceLogin" role="button">Sign in</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="text-center">
|
||||
|
||||
<!-- https://knowyourmeme.com/memes/happy-cat -->
|
||||
<img alt="Happy Cat" class="img-fluid w-25" src="cat.gif">
|
||||
|
||||
<form action="https://www.google.com/search" class="mt-4" method="get">
|
||||
<input autocomplete="off" autofocus class="form-control form-control-lg mb-4 mx-auto w-50" name="q"
|
||||
placeholder="Query" type="search">
|
||||
<button class="btn btn-light">Google Search</button>
|
||||
<button class="btn btn-light" name="btnI">I'm Feeling Lucky</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in New Issue