Updated the design

This commit is contained in:
abrendan 2024-02-15 11:30:52 +00:00
parent e83b0e73fd
commit a972a4b7a2
5 changed files with 130 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 KiB

After

Width:  |  Height:  |  Size: 430 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 KiB

110
static/styles_index.css Normal file
View File

@ -0,0 +1,110 @@
body, html {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
height: 100%;
overflow: hidden;
}
/* Adding a pseudo-element to the body to create the blurred background effect */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('background-image.jpg') no-repeat center center fixed;
background-size: cover;
filter: blur(8px);
z-index: -1;
}
.search-page-container {
text-align: center;
padding-top: 10%;
position: relative; /* Position relative to place it above the blurred background */
z-index: 1;
}
.main-heading {
font-size: 4em;
font-family: "Playfair Display", sans-serif;
margin-bottom: 2em;
color: #000000;
}
.sub-heading {
font-size: 1em;
margin-bottom: 2em;
color: #000000; /* Change the color if required for better visibility */
}
.search-form {
margin: auto;
width: fit-content;
}
.search-input {
padding: 0.5em;
margin-right: -4px; /* To prevent double borders */
border: 1px solid #ccc;
border-right: none;
font-size: 1em;
line-height: 1em;
border-radius: 5px 0 0 5px;
}
.search-button {
padding: 0.5em;
font-size: 1em;
border: 1px solid #000000;
background-color: #000000;
color: white;
cursor: pointer;
border-radius: 0 5px 5px 0;
transition: background-color 0.3s ease;
}
.search-button:hover {
background-color: #8a8a8a;
border: 1px solid #8a8a8a;
}
.footer {
text-align: center;
padding: 0.5rem 0;
position: fixed;
bottom: 0;
width: 100%;
background-color: rgba(255, 255, 255, 0.5);
display: flex;
justify-content: space-between;
align-items: center;
}
.footer-text-left,
.footer-text-middle,
.footer-text-right {
margin: 0;
padding: 0 10px; /* Add padding as needed */
color: #000000; /* Or any color as per your footer text color */
flex: 1;
text-align: center; /* Center align the text */
}
.footer-text-left {
text-align: left;
}
.footer-text-right {
text-align: right;
}
.footer-link {
color: inherit; /* This ensures that the link color is the same as the normal text color */
text-decoration: none;
}
.footer-link:hover {
text-decoration: underline;
}

View File

@ -3,7 +3,7 @@ body {
background-image: url('background-image.jpg'); /* Replace with your actual image path */ background-image: url('background-image.jpg'); /* Replace with your actual image path */
background-size: cover; background-size: cover;
background-attachment: fixed; background-attachment: fixed;
color: #333; color: #000000;
line-height: 1.6; line-height: 1.6;
} }
@ -15,7 +15,7 @@ body {
backdrop-filter: blur(10px); backdrop-filter: blur(10px);
padding: 2rem; padding: 2rem;
border-radius: 10px; border-radius: 10px;
background-color: rgba(255, 255, 255, 0.7); /* Frosted glass effect */ background-color: rgba(255, 255, 255, 0.2); /* Frosted glass effect */
} }
h1 { h1 {
@ -94,14 +94,15 @@ h1 {
} }
.search-button { .search-button {
padding: 0.5rem 1rem; padding: 0.5rem 1rem;
background-color: #1a0dab; background-color: #000000;
border: none; border: none;
color: white; color: white;
cursor: pointer; cursor: pointer;
border-radius: 0 5px 5px 0; /* Rounded corners right side */ border-radius: 0 5px 5px 0; /* Rounded corners right side */
font-size: 1rem; font-size: 1rem;
text-align: center; text-align: center;
transition: background-color 0.3s ease;
} }
.search-button:hover { .search-button:hover {
background-color: #0f0c7b; /* Darker shade on hover */ background-color: #8a8a8a; /* Darker shade on hover */
} }

View File

@ -3,13 +3,22 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Nochu</title> <title>Nochu</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Playfair+Display">
<link rel="stylesheet" href="{{ url_for('static', filename='styles_index.css') }}">
</head> </head>
<body> <body>
<h1>Welcome to Nochu</h1> <div class="search-page-container">
<p>Yet another search engine.</p> <h1 class="main-heading">Welcome to Nochu</h1>
<form action="/search" method="get"> <p class="sub-heading">Yet another de-googled search engine using Google's Search API.</p>
<input type="text" name="query" required> <form class="search-form" action="/search" method="get">
<button type="submit">Search</button> <input class="search-input" type="text" name="query" required>
<button class="search-button" type="submit">Search</button>
</form> </form>
</div>
<footer class="footer">
<p class="footer-text-left">&copy; 2023 Nochu Search by abrendan</p>
<p class="footer-text-middle"><a href="https://www.abrendan.dev" class="footer-link">abrendan.dev</a></p>
<p class="footer-text-right"><a href="https://www.pexels.com/de-de/foto/kalt-schnee-strasse-dammerung-6469507/" class="footer-link">Background image by Karolina Kot</a></p>
</footer>
</body> </body>
</html> </html>