diff --git a/src/routes/main.cr b/src/routes/main.cr index e1ce580..3bde300 100644 --- a/src/routes/main.cr +++ b/src/routes/main.cr @@ -69,6 +69,13 @@ class MainRouter < Router continue_reading = @context.library.get_continue_reading_entries username recently_added = @context.library.get_recently_added_entries username + new_user = true + titles = @context.library.titles + titles.each { |t| new_user = false if t.load_percentage(username) > 0 } + + empty_library = true + empty_library = false if titles.size > 0 + layout "home" rescue e @context.error e diff --git a/src/views/home.ecr b/src/views/home.ecr index bd15c40..018e8aa 100644 --- a/src/views/home.ecr +++ b/src/views/home.ecr @@ -1,89 +1,127 @@ -<%- unless continue_reading.empty? -%> -
<%= ra[:entry].pages %> pages
-We can't find any files yet. Add some to your library and they'll appear here.
+<%= @context.config.library_path %>
config.yml
located at: /can/I/access/config_path/from/view?
Once you start reading, Mango will remember where you left off + and show your entries here.
+ View library +