Search/static/css/style-search.css

375 lines
7.2 KiB
CSS
Raw Normal View History

2024-10-21 07:30:48 +02:00
/* Font Definitions */
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 300;
src: local(''),
url('/static/fonts/inter-v12-latin-300.woff2') format('woff2'),
url('/static/fonts/inter-v12-latin-300.woff') format('woff');
}
2024-09-27 12:13:16 +02:00
2024-10-21 07:30:48 +02:00
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
src: local(''),
url('/static/fonts/inter-v12-latin-regular.woff2') format('woff2'),
url('/static/fonts/inter-v12-latin-regular.woff') format('woff');
}
2024-09-27 12:13:16 +02:00
2024-10-21 07:30:48 +02:00
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 700;
src: local(''),
url('/static/fonts/inter-v12-latin-700.woff2') format('woff2'),
url('/static/fonts/inter-v12-latin-700.woff') format('woff');
2024-09-27 12:13:16 +02:00
}
2024-10-21 07:30:48 +02:00
@font-face {
font-display: swap;
font-family: 'Material Icons Round';
font-style: normal;
font-weight: 400;
src: url('/static/fonts/material-icons-round-v108-latin-regular.woff2') format('woff2');
}
/* General Styles */
body, html {
margin: 0;
padding: 0;
background-color: var(--html-bg);
font-family: 'Inter', Arial, Helvetica, sans-serif;
font-size: 16px;
color: var(--text-color);
}
body.menu-open {
overflow: hidden;
}
.highlight {
color: var(--highlight);
font-weight: bold;
font-style: normal;
2024-09-27 12:13:16 +02:00
}
2024-10-21 07:30:48 +02:00
.material-icons-round {
font-family: 'Material Icons Round' !important;
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
-webkit-font-feature-settings: 'liga';
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
font-feature-settings: 'liga';
}
#search-wrapper-ico {
background: none;
border: none;
color: var(--fg);
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
cursor: pointer;
font-size: 24px;
}
#search-wrapper-ico:hover {
transition: color 0.3s ease;
color: var(--blue);
}
.wrapper {
margin: 0 auto;
background: var(--search-bg-input);
border-radius: 22px;
position: relative;
2024-09-27 12:13:16 +02:00
width: 100%;
2024-10-21 07:30:48 +02:00
max-width: 600px;
overflow: visible;
border: 1px solid var(--search-bg-input-border);
}
.wrapper input {
width: 100%;
padding: 10px 50px 10px 20px;
2024-09-27 12:13:16 +02:00
font-size: 16px;
2024-10-21 07:30:48 +02:00
color: var(--font-fg);
background-color: var(--search-bg-input);
background: none;
border: none;
outline: none;
}
.wrapper input::placeholder {
color: var(--fg);
}
2024-10-21 13:52:56 +02:00
.wrapper-searching {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
2024-10-21 07:30:48 +02:00
/* Autocomplete Styles */
.autocomplete {
2024-10-21 13:52:56 +02:00
display: none;
2024-10-21 07:30:48 +02:00
text-align: left;
2024-10-21 13:52:56 +02:00
width: 100%;
position: absolute;
left: -1px; /* this is so curesed */
top: 100%;
background-color: var(--search-bg-input);
border-bottom-left-radius: 22px;
border-bottom-right-radius: 22px;
border: 1px solid var(--search-bg-input-border);
border-top: none;
z-index: 999;
2024-10-21 07:30:48 +02:00
}
2024-10-21 13:52:56 +02:00
/* Show autocomplete when wrapper has 'wrapper-searching' class */
.wrapper-searching .autocomplete {
2024-10-21 07:30:48 +02:00
display: block;
}
.autocomplete ul {
margin: 0;
padding: 0;
2024-09-27 12:13:16 +02:00
}
2024-10-21 07:30:48 +02:00
.autocomplete ul li {
list-style: none;
padding: 8px 12px;
cursor: pointer;
color: var(--font-fg);
}
.autocomplete ul li.selected,
.autocomplete ul li:hover {
background: var(--search-select);
}
.autocomplete ul li:last-child {
border-bottom-left-radius: 22px;
border-bottom-right-radius: 22px;
}
/* Logo Styles */
.logo-container {
margin: 0 auto 40px auto;
color: var(--font-fg);
text-align: center;
}
.logo-container svg {
max-width: 300px;
height: auto;
vertical-align: middle;
margin: 0 auto;
}
/* Centering Content */
.search-page-content {
max-width: 800px;
margin: 0 auto;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center; /* Center vertically */
height: 100vh; /* Make it full viewport height */
}
/* Search Type Icons */
2024-09-27 12:13:16 +02:00
.search-type-icons {
display: flex;
justify-content: center;
flex-wrap: wrap;
margin-top: 30px;
2024-10-21 07:30:48 +02:00
gap: 20px;
2024-09-27 12:13:16 +02:00
}
.icon-button {
display: flex;
flex-direction: column;
align-items: center;
2024-10-21 07:30:48 +02:00
text-align: center;
}
.icon-button button {
2024-09-27 12:13:16 +02:00
background: none;
border: none;
2024-10-21 07:30:48 +02:00
color: var(--search-button);
2024-09-27 12:13:16 +02:00
cursor: pointer;
2024-10-21 07:30:48 +02:00
font-size: 24px;
2024-09-27 12:13:16 +02:00
}
2024-10-21 07:30:48 +02:00
.icon-button button:hover {
color: var(--blue);
transition: color 0.3s ease;
2024-09-27 12:13:16 +02:00
}
.icon-button p {
2024-10-21 07:30:48 +02:00
margin-top: 5px;
2024-09-27 12:13:16 +02:00
font-size: 14px;
2024-10-21 07:30:48 +02:00
color: var(--font-fg);
2024-09-27 12:13:16 +02:00
}
2024-10-21 07:30:48 +02:00
/* Menu Button */
.settings-icon-link-search {
position: fixed;
top: 20px;
right: 20px;
background: none;
border: none;
color: var(--fg);
cursor: pointer;
font-size: 36px;
z-index: 999;
}
.settings-icon-link-search:hover {
color: var(--highlight);
}
/* Style for Close Button in Menu */
.closebtn {
background: none;
border: none;
color: var(--fg);
cursor: pointer;
font-size: 36px;
position: absolute;
top: 20px;
right: 20px;
}
.side-nav .closebtn:hover {
color: var(--highlight);
background: none;
}
/* Side Navigation Menu */
.side-nav {
height: 100%;
width: 0;
position: fixed;
top: 0;
right: 0;
background-color: var(--html-bg);
overflow-x: hidden;
transition: 0.5s;
z-index: 1000;
box-shadow: -2px 0 5px rgba(0,0,0,0.5);
}
/* Menu Content */
.side-nav a,
.side-nav button,
.side-nav select {
padding: 8px 32px;
text-decoration: none;
font-size: 18px;
color: var(--font-fg);
display: block;
transition: background-color 0.3s ease;
border: none;
background: none;
width: 100%;
text-align: left;
2024-09-27 12:13:16 +02:00
}
2024-10-21 07:30:48 +02:00
.side-nav a:hover,
.side-nav button:hover,
.side-nav select:hover {
background-color: var(--search-select);
2024-09-27 12:13:16 +02:00
color: var(--blue);
2024-10-21 07:30:48 +02:00
cursor: pointer;
}
/* Style for buttons in the menu */
.side-nav button {
background: none;
border: none;
font-size: 18px;
font-family: inherit;
padding: 8px 32px;
width: 100%;
text-align: left;
color: var(--font-fg);
}
.side-nav .closebtn:hover {
color: var(--highlight);
}
/* Overlay effect when menu is open */
body.menu-open::before {
content: '';
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 998;
2024-09-27 12:13:16 +02:00
}
2024-10-21 07:30:48 +02:00
/* Responsive Design */
@media only screen and (max-width: 450px) {
.wrapper {
width: 90%;
}
.logo-container svg {
width: 75%;
max-width: 90%;
min-width: 25%;
}
}
/* Additional Global Styles */
a {
text-decoration: none;
color: var(--link);
}
a:hover {
text-decoration: underline;
}
h1 {
font-size: 70px;
color: var(--font-fg);
font-family: 'Inter';
}
p {
color: var(--fg);
font-size: 14px;
line-height: 1.58;
}
input, button {
outline: none;
}
/*
Remove default focus outline and add custom focus style
.wrapper input[type="text"]:focus {
2024-09-27 12:13:16 +02:00
outline: none;
2024-10-21 07:30:48 +02:00
border: 1px solid var(--blue);
box-shadow: none;
} */