forked from mirrors/treebird
Switch back to flexbox for Status info
While it breaks compatibility, flexbox allows for more control. This commit also tweaks up the colors a bit FossilOrigin-Name: 62486c016f58b8c68703e8f1b8a79340d58cbaf3959682a95a1bf24e790caf83
This commit is contained in:
parent
c01d190fd8
commit
113c2b2433
4 changed files with 72 additions and 51 deletions
25
dist/treebird20.css
vendored
25
dist/treebird20.css
vendored
|
@ -567,7 +567,7 @@ svg.in-reply-to-icon
|
|||
.notification-regular,
|
||||
.scrobble
|
||||
{
|
||||
padding: 10px 4px 0 10px;
|
||||
padding: 10px 10px 0 10px;
|
||||
border-bottom: 1px dashed #cacaca;
|
||||
width: 100%;
|
||||
border-spacing: 0px;
|
||||
|
@ -648,26 +648,33 @@ svg.in-reply-to-icon
|
|||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
vertical-align: middle;
|
||||
padding-left: 4px;
|
||||
padding: 0 6px;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
.status .poster-stats
|
||||
{
|
||||
/* To maintain compatibility while keeping it a flexbox, we have to
|
||||
* hardcode the width, sorry! Tables are just weird and I hate CSS */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
max-width: 480px;
|
||||
}
|
||||
|
||||
.poster-stats .alignend
|
||||
{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.status .username,
|
||||
.notification-regular .username
|
||||
{
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
font-weight: bold;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
max-width: 310px;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.status .status-content
|
||||
|
@ -689,7 +696,7 @@ svg.in-reply-to-icon
|
|||
display: inline;
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
margin: 3px 0 0 3px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.status-interact
|
||||
|
|
|
@ -21,6 +21,14 @@
|
|||
#include <string.h>
|
||||
#include "string.h"
|
||||
|
||||
char* reltime_to_str(time_t stime)
|
||||
{
|
||||
char str[16];
|
||||
// Get current time
|
||||
time_t curr_time = time(NULL);
|
||||
|
||||
}
|
||||
|
||||
int streql(char* cmp1, char* cmp2)
|
||||
{
|
||||
while (*cmp1 || *cmp2)
|
||||
|
|
12
src/string.h
12
src/string.h
|
@ -19,9 +19,21 @@
|
|||
#ifndef TREE_STRING_H
|
||||
#define TREE_STRING_H
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
|
||||
#define STRREPL_ALL 1
|
||||
|
||||
/**
|
||||
* Converts unix time into relative string format
|
||||
*
|
||||
* Longer variants for months and years to emphasize age
|
||||
*
|
||||
* Example: 5s, 5m, 5h, 5d, 5mon, 5yr
|
||||
* @param time Unix timestamp
|
||||
* @return char[16] containing time string
|
||||
*/
|
||||
char* reltime_to_str(time_t time);
|
||||
|
||||
int streql(char* cmp1, char* cmp2);
|
||||
int strneql(char* cmp1, char* cmp2, size_t cmp1_n);
|
||||
char* strnstr(const char* haystack, const char* needle, size_t s);
|
||||
|
|
|
@ -5,49 +5,43 @@
|
|||
<img src="%s">
|
||||
</td>
|
||||
<td class="status-info">
|
||||
<table class="ui-table">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="poster-stats">
|
||||
<span class="username">%s</span>
|
||||
<a class="instance-info" href="%s/@%s">%s</a>
|
||||
<span class="alignend status-visibility menu-container">
|
||||
%s
|
||||
<div class="menu">
|
||||
<ul>
|
||||
<li>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="%smute">
|
||||
<input type="submit" class="btn-menu" value="%s">
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="%spin">
|
||||
<input type="submit" class="btn-menu" value="%s">
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="%sbookmark">
|
||||
<input type="submit" class="btn-menu" value="%s">
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div class="poster-stats">
|
||||
<span class="username">%s</span>
|
||||
<a class="instance-info" href="%s/@%s">%s</a>
|
||||
<span class="alignend status-visibility menu-container">
|
||||
<div class="menu">
|
||||
%s
|
||||
<span class="status-content">
|
||||
%s
|
||||
</span>
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul>
|
||||
<li>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="%smute">
|
||||
<input type="submit" class="btn-menu" value="%s">
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="%spin">
|
||||
<input type="submit" class="btn-menu" value="%s">
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<form action="%s/status/%s/interact" method="post">
|
||||
<input type="hidden" name="itype" value="%sbookmark">
|
||||
<input type="submit" class="btn-menu" value="%s">
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
%s
|
||||
<span class="status-content">
|
||||
%s
|
||||
</span>
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
%s
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue