From d980264e74e95a472db84a4480a07c330dc76f50 Mon Sep 17 00:00:00 2001 From: moonshain <146671656+moonshain@users.noreply.github.com> Date: Sat, 7 Oct 2023 17:53:54 +0200 Subject: [PATCH] switched out icons to include from static file --- en/homework_create_more_models/README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/en/homework_create_more_models/README.md b/en/homework_create_more_models/README.md index 21687d3..3e58f70 100644 --- a/en/homework_create_more_models/README.md +++ b/en/homework_create_more_models/README.md @@ -228,6 +228,8 @@ Yay! Now your readers can let you know what they think of your blog posts! Not all of the comments should be displayed. As the blog owner, you probably want the option to approve or delete comments. Let's do something about it. +> If you haven't already, you can download all the Bootstrap icons [here](https://github.com/twbs/icons/releases/download/v1.1.0/bootstrap-icons-1.1.0.zip). Unzip the file and copy all the SVG image files into a new folder inside `blog/templates/blog/` called `icons`. That way you can access an icon like `hand-thumbs-down.svg` using the file path `blog/templates/blog/icons/hand-thumbs-down.svg` + Go to `blog/templates/blog/post_detail.html` and change lines: ```django @@ -251,8 +253,12 @@ to:
{{ comment.created_date }} {% if not comment.approved_comment %} - - + + {% include './icons/hand-thumbs-down.svg' %} + + + {% include './icons/hand-thumbs-up.svg' %} + {% endif %}
{{ comment.author }}