修复失效的图标#14
Open
cxzlw wants to merge 2 commits into
Open
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR fixes broken icon display by replacing a non-functional Font Awesome kit with a CDN-hosted alternative. The change addresses a 403 error from the Font Awesome kit by switching to cdnjs for icon delivery.
- Replaces Font Awesome kit script with cdnjs CSS link
- Removes the problematic kit.fontawesome.com script reference
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta name="description" content="A simple weather application to get current weather information"> | ||
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Roboto:wght@300;400;500;700;900&display=swap" rel="stylesheet"> | ||
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.0/css/all.min.css"> |
There was a problem hiding this comment.
Font Awesome version 7.0.0 does not exist. The latest stable version is 6.x.x. Consider using a valid version like 6.5.1: https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css
Suggested change
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.0/css/all.min.css"> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <meta name="description" content="A simple weather application to get current weather information"> | ||
| <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Roboto:wght@300;400;500;700;900&display=swap" rel="stylesheet"> | ||
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.0/css/all.min.css"> |
There was a problem hiding this comment.
Consider adding integrity and crossorigin attributes to the CDN link for security: integrity="sha512-[hash]" crossorigin="anonymous". This ensures the resource hasn't been tampered with.
Suggested change
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.0/css/all.min.css"> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.0/css/all.min.css" integrity="sha512-<calculated-hash>" crossorigin="anonymous"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
大概是kit 403了,于是用cdnjs提供的css替代