From bfac91c779882edcca992db2b5bfd4e4bdfac34e Mon Sep 17 00:00:00 2001 From: j Date: Tue, 26 Oct 2021 12:09:16 +0100 Subject: [PATCH] add artist name --- app/static/css/partials/_ascroll.scss | 1 + app/static/js/ascroll.js | 3 ++- app/text/models.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/static/css/partials/_ascroll.scss b/app/static/css/partials/_ascroll.scss index 33181ac..8db0fd7 100755 --- a/app/static/css/partials/_ascroll.scss +++ b/app/static/css/partials/_ascroll.scss @@ -100,5 +100,6 @@ padding-bottom: 32px; max-width: var(--container-width); margin: auto; + line-height: 1.4; } } diff --git a/app/static/js/ascroll.js b/app/static/js/ascroll.js index f61dc79..f0df3a1 100755 --- a/app/static/js/ascroll.js +++ b/app/static/js/ascroll.js @@ -286,7 +286,8 @@ function renderAnnotations(config) { var div = document.createElement('div') div.classList.add('related-film') div.innerHTML = ` - Film cited: ${config.item_title} ${config.item_title_zh}
+ film cited: ${config.item_title} - ${config.item_director[0]}
+ 电影引用: ${config.item_title_zh} - ${config.item_director[1]} ` box.appendChild(div) ascroll.appendChild(box) diff --git a/app/text/models.py b/app/text/models.py index f0f46b2..f61238e 100644 --- a/app/text/models.py +++ b/app/text/models.py @@ -145,7 +145,7 @@ class Text(models.Model): if item_id: item = Film.objects.filter(padma_id=item_id).first() if item: - for key in ('title', 'title_zh'): + for key in ('title', 'title_zh', 'director'): data['item_' + key] = item.data[key] data['item_url'] = item.get_absolute_url() if isinstance(self.annotations, list) and len(self.annotations) > 0: