Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show CW/title in toots #13

Merged
merged 3 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ash.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def search(self, *, keyword=None, user_screen_name=None, index=None, limit=100)
keyword_query = {
'simple_query_string': {
'query': keyword,
'fields': ['text', 'full_text', 'content_text', 'media_attachments.description'],
'fields': ['text', 'full_text', 'content_text', 'spoiler_text', 'media_attachments.description'],
'default_operator': 'AND',
}
}
Expand Down
2 changes: 1 addition & 1 deletion static/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/main.css.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions static/scss/card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
}
}
}
.title {
font-size: 20px;
font-style: italic;
padding-top: 0.2em;
padding-bottom: 0.5em;
border-bottom: 1px solid rgb(207, 217, 222);
}
.full-text {
color: rgb(15, 20, 25);
line-height: 24px;
Expand Down
7 changes: 7 additions & 0 deletions static/scss/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@
}
}

.title {
font-style: italic;
padding-top: 0.2em;
padding-bottom: 0.5em;
border-bottom: 1px solid rgb(207, 217, 222);
}

.full-text {
overflow-wrap: break-word;
white-space: pre-wrap;
Expand Down
3 changes: 3 additions & 0 deletions templates/_tweet_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
{%- endif %}
</div>

{%- if tweet.spoiler_text %}
<div class="title">{{ tweet.spoiler_text }}</div>
{%- endif %}
<div class="full-text">{{ tweet | format_tweet_text | safe }}</div>

</div>
Expand Down
8 changes: 6 additions & 2 deletions templates/tweet.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@
</div>

<div class="text">
{%- if tweet.in_reply_to_status_id %}
<div class="in-reply-to">
{%- if tweet.in_reply_to_status_id %}
<a href="{{ tweet | in_reply_to_link }}">Replying to @{{ tweet['in_reply_to_screen_name'] }}</a>
{%- endif %}
</div>
{%- endif %}

{%- if tweet.spoiler_text %}
<div class="title">{{ tweet.spoiler_text }}</div>
{%- endif %}

<div class="full-text">{{ tweet | format_tweet_text | safe }}</div>
</div>
Expand Down