Skip to content

Commit

Permalink
Update np/index.qmd to include custom container styles
Browse files Browse the repository at this point in the history
  • Loading branch information
pipme committed Sep 26, 2024
1 parent 393eb87 commit c39a8ba
Showing 1 changed file with 10 additions and 24 deletions.
34 changes: 10 additions & 24 deletions tools/np/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,34 @@ title: ""
format: html
---

```{=html}
<style>
/* body {
font-family: Arial, sans-serif;
background-color: #f4f4f9;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
} */
.container {
.container-custom {
max-width: 600px;
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
/* h1 {
color: #333;
text-align: center;
font-size: 28px;
margin-bottom: 20px;
} */
form {
.container-custom form {
background-color: white;
padding: 20px;
border-radius: 8px;
}
label {
.container-custom label {
font-weight: bold;
display: block;
margin-top: 10px;
}
select, input {
.container-custom select, .container-custom input {
width: 100%;
padding: 10px;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
.container-custom button {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
Expand All @@ -54,10 +39,10 @@ format: html
cursor: pointer;
width: 100%;
}
button:hover {
.container-custom button:hover {
background-color: #45a049;
}
.result {
.container-custom .result {
background-color: #e9ffe9;
padding: 15px;
border-radius: 4px;
Expand All @@ -66,7 +51,7 @@ format: html
}
</style>
<center>
<div class="container">
<div class="container-custom">
<h1>NumPy Memory Size Calculator</h1>
<form id="numpyForm">
<label for="dtype">Select Data Type:</label>
Expand Down Expand Up @@ -121,3 +106,4 @@ format: html
`Memory size: ${memorySize.toLocaleString()} bytes (${(memorySize / (1024 ** 2)).toFixed(2)} MB)`;
}
</script>
```

0 comments on commit c39a8ba

Please sign in to comment.