This commit is contained in:
wayword-dev 2025-04-22 17:13:38 +01:00 committed by GitHub
commit e8b4d8ff72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@ class SiteChange < Sequel::Model
one_to_one :site_change
one_to_many :site_change_files
def site_change_filenames(limit=6)
def site_change_filenames(limit=30)
site_change_files_dataset.select(:filename).limit(limit).order(:created_at.desc).all.collect {|f| f.filename}.sort_by {|f| f.match('html') ? 0 : 1}
end

View file

@ -999,7 +999,7 @@ a.tag:hover {
.html-thumbnail {
width: 102px;
}
&:first-child .html-thumbnail.html {
&.big-file .html-thumbnail.html {
width: 540px;
height: 405px;
@media (max-device-width:480px), screen and (max-width:800px) {
@ -1007,7 +1007,7 @@ a.tag:hover {
height: 202px;
}
}
&:first-child .html-thumbnail.html img {
&.big-file .html-thumbnail.html img {
width: 540px;
height: 405px;
@media (max-device-width:480px), screen and (max-width:800px) {

View file

@ -92,8 +92,8 @@
<% unless site_change_filenames.empty? %>
<div class="content">
<div class="files">
<% site_change_filenames.each do |f| %>
<div class="file">
<% site_change_filenames.each.with_index do |f, i| %>
<div class="file <%= i == 0 && site_change_filenames.length <= 6 ? 'big-file' : '' %>">
<div class="html-thumbnail <%= site_change_file_display_class f %>">
<a href="https://<%= event_site.host %><%= f == 'index.html' ? '' : "/#{f}" %>">
<% if site_change_file_display_class(f) == 'html' %>