mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 03:43:42 +01:00
Catch 404 errors when downloading remote media, add screenshot to landing page
This commit is contained in:
parent
bab4904492
commit
57304ac375
5 changed files with 37 additions and 1 deletions
BIN
app/assets/images/screenshot.png
Normal file
BIN
app/assets/images/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 346 KiB |
|
@ -6,7 +6,8 @@
|
|||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
color: #9baec8;
|
||||
padding-top: 200px;
|
||||
padding-top: 50px;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
|
@ -39,6 +40,32 @@
|
|||
font-weight: 300;
|
||||
}
|
||||
|
||||
.screenshot {
|
||||
box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
|
||||
margin-bottom: 26px;
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.actions {
|
||||
overflow: hidden;
|
||||
|
||||
.info {
|
||||
float: right;
|
||||
text-align: right;
|
||||
line-height: 36px;
|
||||
|
||||
a {
|
||||
color: #9baec8;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 360px) {
|
||||
.wrapper {
|
||||
padding: 20px;
|
||||
|
|
|
@ -112,6 +112,8 @@ class Account < ApplicationRecord
|
|||
def avatar_remote_url=(url)
|
||||
self.avatar = URI.parse(url) unless self[:avatar_remote_url] == url
|
||||
self[:avatar_remote_url] = url
|
||||
rescue OpenURI::HTTPError
|
||||
#
|
||||
end
|
||||
|
||||
def object_type
|
||||
|
|
|
@ -20,6 +20,8 @@ class MediaAttachment < ApplicationRecord
|
|||
|
||||
def file_remote_url=(url)
|
||||
self.file = URI.parse(url)
|
||||
rescue OpenURI::HTTPError
|
||||
#
|
||||
end
|
||||
|
||||
def image?
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
%em= Rails.configuration.x.local_domain
|
||||
is a Mastodon instance.
|
||||
|
||||
.screenshot= image_tag 'screenshot.png'
|
||||
|
||||
.actions
|
||||
.info
|
||||
= link_to 'Source code', 'https://github.com/Gargron/mastodon'
|
||||
|
||||
= link_to 'Get started', new_user_registration_path, class: 'button'
|
||||
= link_to 'Log in', new_user_session_path, class: 'button'
|
||||
|
|
Loading…
Reference in a new issue