mirror of
https://github.com/kristoferssolo/cipher-workshop.git
synced 2025-12-20 11:04:38 +00:00
feat(web): improve homepage
This commit is contained in:
parent
898d5f7195
commit
024079af36
@ -7,10 +7,9 @@ pub fn Footer() -> impl IntoView {
|
|||||||
<footer class="app-footer">
|
<footer class="app-footer">
|
||||||
<div class="footer-content">
|
<div class="footer-content">
|
||||||
<p>
|
<p>
|
||||||
"🔒 " <strong>"Client-Side Security:"</strong>
|
<strong>"🔐 Privacy First:"</strong>
|
||||||
" All encryption and decryption operations happen entirely in your browser. "
|
" All encryption and decryption happens in your browser. "
|
||||||
"No data is ever sent to a server. "
|
"No data is transmitted to any server. You can verify this by disconnecting your internet connection."
|
||||||
"You can verify this by disconnecting your internet."
|
|
||||||
</p>
|
</p>
|
||||||
<div class="footer-links">
|
<div class="footer-links">
|
||||||
<A href="https://github.com/kristoferssolo/cipher-workshop" target="_blank">
|
<A href="https://github.com/kristoferssolo/cipher-workshop" target="_blank">
|
||||||
|
|||||||
@ -4,11 +4,41 @@ use leptos::prelude::*;
|
|||||||
pub fn Home() -> impl IntoView {
|
pub fn Home() -> impl IntoView {
|
||||||
view! {
|
view! {
|
||||||
<div class="home-container">
|
<div class="home-container">
|
||||||
|
<div class="hero-section">
|
||||||
<h1>"Cipher Workshop"</h1>
|
<h1>"Cipher Workshop"</h1>
|
||||||
<p>
|
<p class="subtitle">
|
||||||
"Hello there! Select an algorithm (AES or DES) from the navigation bar to begin
|
"A client-side cryptographic playground for learning and testing symmetric algorithms."
|
||||||
encrypting and decrypting data."
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="info-grid">
|
||||||
|
<div class="info-card">
|
||||||
|
<h3>"DES (Data Encryption Standard)"</h3>
|
||||||
|
<p>
|
||||||
|
"A legacy algorithm from the 1970s. While historically significant, "
|
||||||
|
"it is now considered insecure due to its short 56-bit key length. "
|
||||||
|
"This tool simulates " <strong>"DES-ECB"</strong>
|
||||||
|
" mode for educational comparison."
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="info-card">
|
||||||
|
<h3>"AES (Advanced Encryption Standard)"</h3>
|
||||||
|
<p>
|
||||||
|
"The modern standard for secure data transmission. This tool uses "
|
||||||
|
<strong>"AES-128-GCM"</strong>
|
||||||
|
", which provides both confidentiality and data integrity. "
|
||||||
|
"It is widely used across the internet (HTTPS) and government communications."
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="getting-started">
|
||||||
|
<p>
|
||||||
|
"To get started, select an algorithm from the navigation bar above."
|
||||||
|
" You can generate output in Binary, Octal, Hex, or Text formats."
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ $l-hl-low: #f4ede8;
|
|||||||
$l-hl-high: #cecacd;
|
$l-hl-high: #cecacd;
|
||||||
|
|
||||||
$control-height: 46px;
|
$control-height: 46px;
|
||||||
$trans-speed: 0.3s ease;
|
$trans-time: 0.3s ease;
|
||||||
|
|
||||||
:root,
|
:root,
|
||||||
body.dark-theme {
|
body.dark-theme {
|
||||||
@ -76,12 +76,12 @@ body {
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Inter", "Segoe UI", sans-serif;
|
font-family: "Inter", "Segoe UI", sans-serif;
|
||||||
background-color: var(--bg-body);
|
background: var(--bg-body);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
transition:
|
transition:
|
||||||
background-color $trans-speed,
|
background $trans-time,
|
||||||
color $trans-speed;
|
color $trans-time;
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-containter {
|
.app-containter {
|
||||||
@ -93,15 +93,15 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.main-nav {
|
.main-nav {
|
||||||
background-color: var(--bg-card);
|
background: var(--bg-card);
|
||||||
padding: 1rem 2rem;
|
padding: 1rem 2rem;
|
||||||
border-bottom: 2px solid var(--border);
|
border-bottom: 2px solid var(--border);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
transition:
|
transition:
|
||||||
background-color $trans-speed,
|
background $trans-time,
|
||||||
border-color $trans-speed;
|
border-color $trans-time;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@ -151,14 +151,14 @@ main {
|
|||||||
margin-top: auto;
|
margin-top: auto;
|
||||||
padding: 2rem 0;
|
padding: 2rem 0;
|
||||||
border-top: 1px solid var(--border);
|
border-top: 1px solid var(--border);
|
||||||
background-color: var(--bg-card);
|
background: var(--bg-card);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
transition:
|
transition:
|
||||||
background-color $trans-speed,
|
background $trans-time,
|
||||||
border-color $trans-speed,
|
border-color $trans-time,
|
||||||
color $trans-speed;
|
color $trans-time;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-content {
|
.footer-content {
|
||||||
@ -196,9 +196,9 @@ main {
|
|||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
|
||||||
transition:
|
transition:
|
||||||
background-color $trans-speed,
|
background $trans-time,
|
||||||
border-color $trans-speed,
|
border-color $trans-time,
|
||||||
box-shadow $trans-speed;
|
box-shadow $trans-time;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header {
|
.card-header {
|
||||||
@ -286,7 +286,7 @@ main {
|
|||||||
padding: 0 12px;
|
padding: 0 12px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
background-color: var(--bg-input);
|
background: var(--bg-input);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
@ -329,7 +329,7 @@ main {
|
|||||||
textarea {
|
textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
background-color: var(--bg-input);
|
background: var(--bg-input);
|
||||||
color: var(--text-main);
|
color: var(--text-main);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@ -351,7 +351,7 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
background-color: var(--primary);
|
background: var(--primary);
|
||||||
color: var(--bg-body);
|
color: var(--bg-body);
|
||||||
padding: 12px 24px;
|
padding: 12px 24px;
|
||||||
border: none;
|
border: none;
|
||||||
@ -370,7 +370,7 @@ main {
|
|||||||
.error-box {
|
.error-box {
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
background-color: rgba($d-love, 0.1);
|
background: rgba($d-love, 0.1);
|
||||||
color: var(--error);
|
color: var(--error);
|
||||||
border: 1px solid var(--error);
|
border: 1px solid var(--error);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@ -381,7 +381,7 @@ main {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
background-color: rgba(0, 0, 0, 0.03);
|
background: rgba(0, 0, 0, 0.03);
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
|
|
||||||
strong {
|
strong {
|
||||||
@ -413,7 +413,7 @@ main {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
background-color: rgba(0, 0, 0, 0.05);
|
background: rgba(0, 0, 0, 0.05);
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
|
|
||||||
strong {
|
strong {
|
||||||
@ -430,9 +430,9 @@ main {
|
|||||||
.result-toolbar,
|
.result-toolbar,
|
||||||
.format-controls select {
|
.format-controls select {
|
||||||
transition:
|
transition:
|
||||||
background-color $trans-speed,
|
background $trans-time,
|
||||||
border-color $trans-speed,
|
border-color $trans-time,
|
||||||
color $trans-speed;
|
color $trans-time;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-copy {
|
.btn-copy {
|
||||||
@ -449,6 +449,91 @@ main {
|
|||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgba(0, 0, 0, 0.05);
|
background: rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.home-container {
|
||||||
|
max-width: 700px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 2rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-section {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 3rem;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 3rem;
|
||||||
|
color: var(--primary);
|
||||||
|
margin: 0 0 1rem 0;
|
||||||
|
line-height: 1.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
color: var(--text-muted);
|
||||||
|
max-width: 500px;
|
||||||
|
margin: 0 auto;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
gap: 20px;
|
||||||
|
margin-bottom: 3rem;
|
||||||
|
|
||||||
|
@media (min-width: 600px) {
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-card {
|
||||||
|
background: var(--bg-card);
|
||||||
|
padding: 2rem;
|
||||||
|
border-radius: 12px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
transition:
|
||||||
|
transform 0.2s,
|
||||||
|
box-shadow 0.2s,
|
||||||
|
background-color $trans-time,
|
||||||
|
border-color $trans-time;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
||||||
|
border-color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
color: var(--secondary);
|
||||||
|
margin-top: 0;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
color: var(--text-muted);
|
||||||
|
font-size: 0.95rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
strong {
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.getting-started {
|
||||||
|
text-align: center;
|
||||||
|
padding: 1.5rem;
|
||||||
|
background: rgba(0, 0, 0, 0.03);
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px dashed var(--border);
|
||||||
|
color: var(--text-main);
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user