diff options
| author | Bobby <[email protected]> | 2023-05-03 22:23:22 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2023-05-03 22:23:22 -0400 |
| commit | 0f2f6bc1c5473558fe593ce6865d68e50272c4b5 (patch) | |
| tree | 5d0e8516a8ca1e7fbff7b19e3bdbf916226d64b5 | |
| parent | 34ba2b1c746aaf78563573c797719a5a366af7f2 (diff) | |
| download | thatcomputerscientist-0f2f6bc1c5473558fe593ce6865d68e50272c4b5.tar.xz thatcomputerscientist-0f2f6bc1c5473558fe593ce6865d68e50272c4b5.zip | |
Migrated Search Area
| -rw-r--r-- | static/css/search.css | 30 | ||||
| -rw-r--r-- | static/css/styles.css | 3 | ||||
| -rw-r--r-- | static/images/backgrounds/search-area.png | bin | 0 -> 40022 bytes | |||
| -rw-r--r-- | templates/blog/partials/base.html | 8 | ||||
| -rw-r--r-- | templates/blog/partials/sidebar.html | 16 | ||||
| -rw-r--r-- | templates/blog/search.html | 9 |
6 files changed, 40 insertions, 26 deletions
diff --git a/static/css/search.css b/static/css/search.css new file mode 100644 index 00000000..946650c0 --- /dev/null +++ b/static/css/search.css @@ -0,0 +1,30 @@ +#search-area { + width: 250px; + height: 110px; + background: url('../images/backgrounds/search-area.png') no-repeat; + background-size: 250px 110px; + margin: auto; + padding: 0px; + border: 0px; + position: absolute; + bottom: 0px; + right: 0px; +} + +#search-form { + position: absolute; + bottom: 10px; + left: 40px; +} + +#search-form input[type=text]{ + display: block; + width: 180px; + font-size: 12px; + background: transparent; + color: #231F20; + border-radius: 4px; +} +#search-form input::placeholder { + color: #524e4f; +} diff --git a/static/css/styles.css b/static/css/styles.css index 072c68b7..f5b99bb3 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1,3 +1,5 @@ +@import url(search.css); + body { background: black; font-size: 11px; @@ -257,6 +259,7 @@ blockquote { margin: auto; width: 1000px; height: 360px; + position: relative; } #navigation-area ul, #archives-area ul, #categories-area ul, #admin-area ul, #announcements ul, #user-area ul, #fun-stuff ul, #activity ul { diff --git a/static/images/backgrounds/search-area.png b/static/images/backgrounds/search-area.png Binary files differnew file mode 100644 index 00000000..3c13c990 --- /dev/null +++ b/static/images/backgrounds/search-area.png diff --git a/templates/blog/partials/base.html b/templates/blog/partials/base.html index 3f3b5f19..f6fa9ff1 100644 --- a/templates/blog/partials/base.html +++ b/templates/blog/partials/base.html @@ -27,7 +27,13 @@ </head> <body> <div id="wrap"> - <div id="header"></div> + <div id="header"> + <div id="search-area"> + <form action="{% url 'blog:search' %}" method="get" id="search-form"> + <input type="text" name="q" placeholder="Search..." autocomplete="off" value="{{ request.GET.q }}"> + </form> + </div> + </div> <table id="main-section" cellpadding="0" cellspacing="0"> <tr> diff --git a/templates/blog/partials/sidebar.html b/templates/blog/partials/sidebar.html index cc1fcf70..ec0486b6 100644 --- a/templates/blog/partials/sidebar.html +++ b/templates/blog/partials/sidebar.html @@ -38,22 +38,6 @@ </div> {% endif %} - -<div id="search-area" {% if not user.is_authenticated %}class="mtsbitem"{% endif %}> - <h2>Search</h2> - <form action="{% url 'blog:search' %}" method="get"> - <table style="width: 250px; border-spacing: 0; border-collapse: separate;"> - <tr> - <td style="width: 170px;"> - <input type="text" name="q" placeholder="Search..." autocomplete="off" style="width: 170px; box-sizing: border-box;" value="{{ request.GET.query }}"> - </td> - <td style="width: 60px;"> - <input type="submit" align="center" class="button button-special" value="Search" style="max-width: 60px;"> - </td> - </tr> - </table> - </form> -</div> {% if user.is_authenticated %} <div id="user-area" class="mtsbitem"> <h2>Hello, {{ user.username }}!</h2> diff --git a/templates/blog/search.html b/templates/blog/search.html index dc92cd15..a709ccb0 100644 --- a/templates/blog/search.html +++ b/templates/blog/search.html @@ -1,14 +1,5 @@ {% extends 'blog/partials/base.html' %} {% block content %} {% load get_list %} - <style> - #search-area { - display: none !important; /* Hide search area for this page */ - } - - #user-area { - margin-top: 0px; - } - </style> <table id="search" cellpadding="0" cellspacing="0"> <tr> |
