mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
Add the option to disable ellipsis when truncating
This commit is contained in:
parent
a354d811d9
commit
e65cd05ef1
@ -19,6 +19,7 @@
|
||||
}
|
||||
.uk-card-title {
|
||||
height: 3em;
|
||||
overflow: hidden;
|
||||
}
|
||||
.acard:hover {
|
||||
text-decoration: none;
|
||||
|
@ -12,6 +12,7 @@ class Config
|
||||
property log_level : String = "info"
|
||||
property upload_path : String = File.expand_path "~/mango/uploads",
|
||||
home: true
|
||||
property disable_ellipsis_truncation : Bool = false
|
||||
property mangadex = Hash(String, String | Int32).new
|
||||
|
||||
@[YAML::Field(ignore: true)]
|
||||
|
@ -37,6 +37,7 @@ class MainRouter < Router
|
||||
titles = @context.library.titles
|
||||
username = get_username env
|
||||
percentage = titles.map &.load_percetage username
|
||||
use_dotdotdot = !@context.config.disable_ellipsis_truncation
|
||||
layout "index"
|
||||
rescue e
|
||||
@context.error e
|
||||
@ -51,6 +52,7 @@ class MainRouter < Router
|
||||
percentage = title.entries.map { |e|
|
||||
title.load_percetage username, e.title
|
||||
}
|
||||
use_dotdotdot = !@context.config.disable_ellipsis_truncation
|
||||
layout "title"
|
||||
rescue e
|
||||
@context.error e
|
||||
|
@ -32,7 +32,7 @@
|
||||
<%- if t.entries.size > 0 -%>
|
||||
<div class="uk-card-badge uk-label"><%= (percentage[i] * 100).round(1) %>%</div>
|
||||
<%- end -%>
|
||||
<h3 class="uk-card-title break-word" data-title="<%= t.display_name.gsub("\"", """) %>"><%= t.display_name %></h3>
|
||||
<h3 class="uk-card-title break-word" uk-tooltip="<%= t.display_name.gsub("\"", """) %>" data-title="<%= t.display_name.gsub("\"", """) %>"><%= t.display_name %></h3>
|
||||
<p><%= t.size %> entries</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -42,8 +42,10 @@
|
||||
</div>
|
||||
|
||||
<% content_for "script" do %>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.dotdotdot/4.0.11/dotdotdot.js"></script>
|
||||
<script src="/js/dots.js"></script>
|
||||
<% if use_dotdotdot %>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.dotdotdot/4.0.11/dotdotdot.js"></script>
|
||||
<script src="/js/dots.js"></script>
|
||||
<% end %>
|
||||
<script src="/js/search.js"></script>
|
||||
<script src="/js/sort-items.js"></script>
|
||||
<% end %>
|
||||
|
@ -45,7 +45,7 @@
|
||||
<img data-src="<%= t.cover_url %>" data-width data-height alt="" uk-img>
|
||||
</div>
|
||||
<div class="uk-card-body">
|
||||
<h3 class="uk-card-title break-word" data-title="<%= t.display_name.gsub("\"", """) %>"><%= t.display_name %></h3>
|
||||
<h3 class="uk-card-title break-word" uk-tooltip="<%= t.display_name.gsub("\"", """) %>" data-title="<%= t.display_name.gsub("\"", """) %>"><%= t.display_name %></h3>
|
||||
<p><%= t.size %> entries</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
<div class="uk-card-body">
|
||||
<div class="uk-card-badge uk-label"><%= (percentage[i] * 100).round(1) %>%</div>
|
||||
<h3 class="uk-card-title break-word" data-title="<%= e.display_name.gsub("\"", """) %>"><%= e.display_name %></h3>
|
||||
<h3 class="uk-card-title break-word" uk-tooltip="<%= e.display_name.gsub("\"", """) %>" data-title="<%= e.display_name.gsub("\"", """) %>"><%= e.display_name %></h3>
|
||||
<p><%= e.pages %> pages</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -150,8 +150,10 @@
|
||||
</div>
|
||||
|
||||
<% content_for "script" do %>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.dotdotdot/4.0.11/dotdotdot.js"></script>
|
||||
<script src="/js/dots.js"></script>
|
||||
<% if use_dotdotdot %>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.dotdotdot/4.0.11/dotdotdot.js"></script>
|
||||
<script src="/js/dots.js"></script>
|
||||
<% end %>
|
||||
<script src="/js/alert.js"></script>
|
||||
<script src="/js/title.js"></script>
|
||||
<script src="/js/search.js"></script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user