diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/pages/details.ejs | 12 | ||||
| -rw-r--r-- | views/pages/index.ejs | 32 | ||||
| -rw-r--r-- | views/pages/mailbox.ejs | 2 | ||||
| -rw-r--r-- | views/pages/message.ejs | 2 | ||||
| -rw-r--r-- | views/pages/search.ejs | 38 | ||||
| -rw-r--r-- | views/partials/header.ejs | 23 | ||||
| -rw-r--r-- | views/partials/metadata.ejs | 8 | ||||
| -rw-r--r-- | views/partials/scripts.ejs | 2 | ||||
| -rw-r--r-- | views/partials/threads.ejs | 11 |
9 files changed, 83 insertions, 47 deletions
diff --git a/views/pages/details.ejs b/views/pages/details.ejs index b508560..a5db176 100644 --- a/views/pages/details.ejs +++ b/views/pages/details.ejs @@ -1,17 +1,7 @@ <% include ../partials/header %> -<hr> - <div id="details_rapper"> - <script type="text/html" class="metadata_template"> - Posted by {{ username }} - on {{ date }} {{ time }} - · - Last active {{ active }} - · - {{ views }} - </script> - + <% include ../partials/metadata %> <table id="details"> <tr> <td class="left"> diff --git a/views/pages/index.ejs b/views/pages/index.ejs index 454e358..7919344 100644 --- a/views/pages/index.ejs +++ b/views/pages/index.ejs @@ -1,22 +1,34 @@ <% include ../partials/header %> -<hr> +<div id="content"> + <% include ../partials/threads %> +</div> <div id="sidebar"> - <div class="bluebox"> - <b><big>welcome to bucky</big></b> - </div> <div class="bluebox" id="searchbox"> - <form> - <input type="text" name="search" autofocus> + <b><big>welcome to bucky</big></b> + + <form action="/search" method="get"> + <input type="text" name="query" autofocus> <button>SEARCH</button> </form> + </div> - <% include ../partials/hootbox %> -</div> + <div class="bluebox"> + <a href="/post">new post</a> | + <a href="/mail">inbox</a> | + <a href="/message">message</a> | + <a href="/profile">profile</a> | + <a href="/logout">logout</a> + </div> + <span class="lastlog bluebox"> + <script class="template" type="text/html"> + <a href="/profile/{{username}}">{{username}}</a> + [{{age}}] + </script> + </span> -<div id="content"> - <% include ../partials/threads %> + <% include ../partials/hootbox %> </div> <% include ../partials/footer %> diff --git a/views/pages/mailbox.ejs b/views/pages/mailbox.ejs index 87fa30e..fa06b8e 100644 --- a/views/pages/mailbox.ejs +++ b/views/pages/mailbox.ejs @@ -1,7 +1,5 @@ <% include ../partials/header %> -<hr> - <div id="sidebar"> <div class="bluebox"> <b><big>message center</big></b> diff --git a/views/pages/message.ejs b/views/pages/message.ejs index bd71a0a..0d1233d 100644 --- a/views/pages/message.ejs +++ b/views/pages/message.ejs @@ -1,7 +1,5 @@ <% include ../partials/header %> -<hr> - <div class="bluebox" id="message"> <script class="template" type="text/html"> <a href="/profile/{{sender}}" class="av"><img src="/data/profile/.thumb/al.{{sender}}.jpg"></a> diff --git a/views/pages/search.ejs b/views/pages/search.ejs new file mode 100644 index 0000000..0bf7819 --- /dev/null +++ b/views/pages/search.ejs @@ -0,0 +1,38 @@ +<% include ../partials/header %> + +<div id="content"> + + <div id="search"> + <form action="/search" method="get" style="margin: 10px;"> + <input type="text" name="query" autofocus> + <button>SEARCH</button> + </form> + + <div id="results"> + <div class="preamble"> + Results for <b class="query"></b> (<span class='total'></span> results) + </div> + <% include ../partials/metadata %> + <script type="text/html" class="template"> + <div class='result'> + <div class='desc'> + <a href="/details/{{thread_id}}" class='search_hit'> + {{title}} + </a> + <div class='meta'>{{meta}}</div> + <div class='snippet'>{{comment}}</div> + <div class='file'>{{file}}</div> + </div> + <a href="/details/{{thread_id}}"> + <div class='image' style='background-image:url({{image}})'></div> + </a> + </div> + </script> + </div> + + <a class="next_page" href="">Next page</a> + </div> + +</div> + +<% include ../partials/footer %> diff --git a/views/partials/header.ejs b/views/partials/header.ejs index f5b21dc..87b4dd8 100644 --- a/views/partials/header.ejs +++ b/views/partials/header.ejs @@ -8,25 +8,4 @@ <body> <h1><%= title %></h1> -<span class="metadata"></span> -<hr> - -<% if (show_header) { %> - <div id="menu"> - <span class="lastlog"> - <script class="template" type="text/html"> - <a href="/profile/{{username}}">{{username}}</a> - [{{age}}] - </script> - </span> - <span class="links"> - <a href="/index">home</a> | - <a href="/search">search</a> | - <a href="/post">post</a> | - <a href="/mail">inbox</a> | - <a href="/message">message</a> | - <a href="/profile">profile</a> | - <a href="/logout">logout</a> - </span> - </div> -<% } %>
\ No newline at end of file +<div class="subtitle"></div> diff --git a/views/partials/metadata.ejs b/views/partials/metadata.ejs new file mode 100644 index 0000000..956ec18 --- /dev/null +++ b/views/partials/metadata.ejs @@ -0,0 +1,8 @@ +<script type="text/html" class="metadata_template"> + Posted by {{ username }} + on {{ date }} {{ time }} + · + Last active {{ active }} + · + {{ views }} +</script> diff --git a/views/partials/scripts.ejs b/views/partials/scripts.ejs index 8dc99a1..2786fa8 100644 --- a/views/partials/scripts.ejs +++ b/views/partials/scripts.ejs @@ -19,6 +19,8 @@ <script src="/assets/js/lib/views/index/hootbox.js"></script> <script src="/assets/js/lib/views/index/threadbox.js"></script> +<script src="/assets/js/lib/views/search/results.js"></script> + <script src="/assets/js/lib/views/details/index.js"></script> <script src="/assets/js/lib/views/details/audio.js"></script> <script src="/assets/js/lib/views/details/comments.js"></script> diff --git a/views/partials/threads.ejs b/views/partials/threads.ejs index b3a6e75..ec93efa 100644 --- a/views/partials/threads.ejs +++ b/views/partials/threads.ejs @@ -1,6 +1,17 @@ <table class="ledger" id="threads"> + <script class="welcomeTemplate" type="text/html"> + <tr class='keyword'> + <td> + <b><i>the latest</i></b> · + </td> + <td> + <a href="/post/">Start a new thread!</a> + </td> + </tr> + </script> + <script class="keywordTemplate" type="text/html"> <tr class='keyword'> <td> |
