diff --git a/catalog/views.py b/catalog/views.py index cec71849..891da14a 100644 --- a/catalog/views.py +++ b/catalog/views.py @@ -330,7 +330,7 @@ def discover(request): ] episodes = PodcastEpisode.objects.filter(program_id__in=podcast_ids).order_by( "-pub_date" - )[:10] + )[:5] gallery_list.insert( 0, { diff --git a/common/static/lib/js/calendar_yearview_blocks.js b/common/static/lib/js/calendar_yearview_blocks.js index 0340a10d..6c7abf06 100644 --- a/common/static/lib/js/calendar_yearview_blocks.js +++ b/common/static/lib/js/calendar_yearview_blocks.js @@ -36,6 +36,7 @@ var current_date = new Date(); var start_date = new Date(); start_date.setMonth(end_date.getMonth() - 12); + end_year = end_date.getFullYear() var start_weekday = settings.start_monday === true?1:0; for (var i = 0; i < 7; i++) { @@ -148,7 +149,7 @@ // Add labels for Months for (var i = 0; i < month_position.length; i++) { var item = month_position[i]; - var month_name = settings.month_names[item.month_index]; + var month_name = item.month_index ? settings.month_names[item.month_index] : end_year; loop_html += '' + month_name + ''; } @@ -167,7 +168,7 @@ // Fixed size with width= 721 and height = 110 var wire_html = '' + - '' + + '' + loop_html + '' + '"Your browser does not support inline SVG."' + ''; @@ -231,7 +232,7 @@ day_names: ['M', 'W', 'F', 'S'], start_monday: true, always_show_tooltip: false, - stylize_today: true, + stylize_today: false, final_date: new Date().toISOString().slice(0, 10), tooltip_style: 'default', // or 'custom' data: [] diff --git a/common/static/sass/_MainSection.sass b/common/static/sass/_MainSection.sass index 159feb7a..6c904b2d 100644 --- a/common/static/sass/_MainSection.sass +++ b/common/static/sass/_MainSection.sass @@ -560,13 +560,13 @@ $mark-review-padding-wider: 6px 0 .calendar_view - left: -20px position: relative // Medium devices (tablets, 768px and up) @media (max-width: $medium-devices) .calendar_view overflow-x: scroll + // Large devices (desktops, 992px and up) @media (max-width: $large-devices) .main-section-wrapper diff --git a/journal/migrations/0010_shelfmember_journal_she_parent__9da946_idx.py b/journal/migrations/0010_shelfmember_journal_she_parent__9da946_idx.py new file mode 100644 index 00000000..cad7dd31 --- /dev/null +++ b/journal/migrations/0010_shelfmember_journal_she_parent__9da946_idx.py @@ -0,0 +1,19 @@ +# Generated by Django 3.2.18 on 2023-04-21 22:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("journal", "0009_comment_focus_item"), + ] + + operations = [ + migrations.AddIndex( + model_name="shelfmember", + index=models.Index( + fields=["parent_id", "visibility", "created_time"], + name="journal_she_parent__9da946_idx", + ), + ), + ] diff --git a/journal/models.py b/journal/models.py index 3919bf04..ff3f9694 100644 --- a/journal/models.py +++ b/journal/models.py @@ -547,6 +547,9 @@ class ShelfMember(ListMember): class Meta: unique_together = [["owner", "item"]] + indexes = [ + models.Index(fields=["parent_id", "visibility", "created_time"]), + ] @cached_property def mark(self): diff --git a/journal/templates/profile.html b/journal/templates/profile.html index 30425df1..0764a053 100644 --- a/journal/templates/profile.html +++ b/journal/templates/profile.html @@ -36,7 +36,7 @@
- {% if request.user.is_staff %} + {% if request.user.is_authenticated %}
书影音日历
@@ -51,7 +51,7 @@ data: $(evt.detail.elt).text(), start_monday: false, always_show_tooltip: false, - month_names: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], + month_names: ['2023', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], day_names: ['', '', ''], colors: { 'default': '#eeeeee', // Default color