Move search into a component
Move the search field, which appears on several pages, into it's own "part" under the parts folder.
This commit is contained in:
parent
de63a8660c
commit
78eb69afd0
|
@ -14,10 +14,7 @@
|
||||||
<a href="/_bio" class="button column column-0">Edit bio</a>
|
<a href="/_bio" class="button column column-0">Edit bio</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<span class="column column-0"></span>
|
<span class="column column-0"></span>
|
||||||
<form action="https://<%= domain %>/_search" method="get" class="search column row">
|
<{system cat src/pages/parts/search.etlua}>
|
||||||
<input class="column" type="text" name="q" placeholder="+greentext -dotr +hits>20"/>
|
|
||||||
<input class="column column-0 button button-clear" type="submit" value="🔎"/>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% if bio ~= "" then %>
|
<% if bio ~= "" then %>
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
|
|
||||||
<!DOCTYPE html>
|
|
||||||
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<% if author then %>
|
|
||||||
<meta name="author" content="<%= author %>">
|
|
||||||
<% end %>
|
|
||||||
<% if title then %>
|
|
||||||
<title><%- title %></title>
|
|
||||||
<% else %>
|
|
||||||
<title>🍑</title>
|
|
||||||
<% end %>
|
|
||||||
<link href="/_css/milligram.css" rel="stylesheet">
|
|
||||||
<link href="/_css/style.css" rel="stylesheet">
|
|
||||||
<% if extra_load then %>
|
|
||||||
<% for _,load in ipairs(extra_load) do %>
|
|
||||||
<%- load %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</head>
|
|
||||||
<body class="container">
|
|
||||||
<main class="wrapper">
|
|
||||||
|
|
||||||
<h1 class="title">
|
|
||||||
Edit Biography for <%= user %>
|
|
||||||
</h1>
|
|
||||||
<% if err then %><em class="error"><%= err %></em><% end %>
|
|
||||||
<form action="https://<%= user %>.<%= domain %>/_bio" method="post" class="container">
|
|
||||||
<fieldset>
|
|
||||||
<input type="hidden" name="author" value="<%= user %>">
|
|
||||||
<div class="row">
|
|
||||||
<textarea name="text" cols=80 rows=24 class="column"><%= text %></textarea><br/>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<input type="submit">
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,7 @@
|
||||||
<a href="/_logout" class="button column column-0">Log out</a>
|
<a href="/_logout" class="button column column-0">Log out</a>
|
||||||
<span class="column column-0"></span>
|
<span class="column column-0"></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<form action="https://<%= domain %>/_search" method="get" class="search column row">
|
<{system cat src/pages/parts/search.etlua}>
|
||||||
<input class="column" type="text" name="q" placeholder="+greentext -dotr +hits>20"/>
|
|
||||||
<input class="column column-0 button button-clear" type="submit" value="🔎"/>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
<{ system cat src/pages/parts/motd.etlua }>
|
<{ system cat src/pages/parts/motd.etlua }>
|
||||||
|
|
|
@ -3,10 +3,7 @@
|
||||||
<a href="https://<%= domain %>"><%= domain %></a>/
|
<a href="https://<%= domain %>"><%= domain %></a>/
|
||||||
</h1>
|
</h1>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<form action="https://<%= domain %>/_search" method="get" class="search column row">
|
<{system cat src/pages/parts/search.etlua}>
|
||||||
<input class="column" type="text" name="q" placeholder="+greentext -dotr +title=Part 4 +hits>20" value="<%= q %>"/>
|
|
||||||
<input class="column column-0 button button-clear" type="submit" value="🔎"/>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<% if #results == 0 then %>
|
<% if #results == 0 then %>
|
||||||
|
|
Loading…
Reference in New Issue