Skip to content

Commit

Permalink
style(index_template.html): improve header layout with flexbox for be…
Browse files Browse the repository at this point in the history
…tter alignment and spacing

fix(index_template.html): adjust logo and dark mode toggle positions for consistency
style(index_template.html): change dark mode GitHub button color for better contrast
  • Loading branch information
rtuszik committed Oct 11, 2024
1 parent dbbd98b commit 33ebc4b
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions src/index_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,31 @@
background-color: var(--mocha-base);
}

.header {
display: flex;
justify-content: space-between;
align-items: center;
}

#logo_img {
top: 20px;
left: 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
top: 10px;
left: 10px;
}

h1 {
flex-grow: 2;
color: var(--latte-mauve);
text-align: center;
font-size: 2.5rem;
margin-bottom: 2rem;
margin-right: 8rem;
}

body.dark-mode h1 {
color: var(--mocha-mauve);
}

#dark-mode-toggle {
position: absolute;
top: 20px;
right: 20px;
background: none;
border: none;
cursor: pointer;
Expand Down Expand Up @@ -351,7 +355,7 @@
}

.dark-mode .GitHub_Button {
background-color: var(--mocha-peach);
background-color: var(--mocha-maroon);
}

.GitHub_Button .text {
Expand Down Expand Up @@ -408,19 +412,17 @@
</style>
</head>
<body class="dark-mode">
<img
src="https://github.com/rtuszik/KoalaKeys/raw/main/assets/icons/KoalaKeys.png"
id="logo_img"
width="128"
/>
<h1>Cheatsheet Index</h1>
<button
id="dark-mode-toggle"
class="dark-mode-toggle"
aria-label="Toggle dark mode"
>
<span id="theme-icon"></span>
</button>
<div class="header">
<img
src="https://github.com/rtuszik/KoalaKeys/raw/main/assets/icons/KoalaKeys.png"
id="logo_img"
width="128"
/>
<h1>Cheatsheet Index</h1>
<button id="dark-mode-toggle" aria-label="Toggle dark mode">
<span id="theme-icon"></span>
</button>
</div>
<div class="controls">
<div class="search-bar">
<input type="text" id="search" placeholder="Search cheatsheets..." />
Expand Down

0 comments on commit 33ebc4b

Please sign in to comment.