Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make fontawesome.css localization. DaiZerong 201732120115 #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CODZR
Copy link
Contributor

@CODZR CODZR commented Apr 13, 2020

将fontawesome.css 本地化。添加all.min.css 需要该分支合并后才可进行
image

@dzr201732120115

我已经把all.min.css下载到服务器本地了,放在font-awesome/css文件夹下。

你能把 Header.php 中的这行 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" /> 替换成
<link rel="stylesheet" href="font-awesome/css/all.min.css" /> 吗?这样应该可以了吧?
你知道 all.min.cssfont-awesome.min.css 之间有什么依赖吗?

蓝珲

@spm2020spring
Copy link
Member

spm2020spring commented Apr 14, 2020

@dzr201732120115

Thanks.

On our server, we already have font-awesome/css/font-awesome.min.css.

So I don't think we should include this file in the repo. Could you delete this file from this Pull Request?

Hui

Header.php Outdated
@@ -30,7 +30,8 @@
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css"/>

<!--<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/fontawesome.min.css" />
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/fontawesome.min.css" />-->
Copy link
Member

@spm2020spring spm2020spring Apr 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dzr201732120115

Do we still need this line, <!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/fontawesome.min.css" />-->, since it was commented out?

Hui

Copy link
Contributor Author

@CODZR CODZR Apr 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have deleted this comment
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/fontawesome.min.css" />-->

And link it to localization.
<link rel="stylesheet" href="http://118.25.96.118/nor/font-awesome/css/font-awesome.min.css" />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

另外LRR网站中附带的font-awesome.min.css版本是4.0,Header.php去cdnjs中引用的是5.8.2,不过影响应该不大

@spm2020spring
Copy link
Member

spm2020spring commented Apr 15, 2020

@dzr201732120115

codejquery

我现在有点明白为什么LRR加载课程列表缓慢了,因为它的 Courses.php, Course.php 要去访问 https://code.jquery.com

Course.php:<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>

Course.php:<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>

Course.php:<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" />

Courses.php:  <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>

Courses.php:<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>

Courses.php:<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" />

Header.php:<script src="css/jquery.min.js" type="text/javascript"></script>

Header.php:<script src="css/jquery.datetimepicker.min.js" type="text/javascript"></script>

Submissions.php:<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>

Submissions.php:<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>

Submissions.php:<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" />

所以,重点是要把对 jquery.com 的依赖下载到服务器本地。 因为访问 jquery.com 太慢。

你下载下面这个css.zip,

css.zip

然后把上面这些依赖 jquery.com 上的 css 或者 js 文件的地方,都指向这个 css 文件夹。

注意,该css文件夹应该与 Course.php 同级。

蓝珲

@CODZR
Copy link
Contributor Author

CODZR commented Apr 15, 2020 via email

@spm2020spring
Copy link
Member

spm2020spring commented Apr 15, 2020

@dzr201732120115

现在部署的http://118.25.96.118/nor/https://github.com/lanlab-org/LRR.git 内容是否一致,

总体一致。

all.min.css应该是缺失的,整个文件都找不到它但是部署的网站上用到了,加上以后显示也正常了。

我觉得 all.min.css 用不到,在lanlab-org上的Header.php也没有引用all.min.css。所以,我们的服务器上的Header.php落后于lanlab-org上的Header.php了。

所以,你下面的重点任务是把JQuery那些依赖弄到本地。

蓝珲

@CODZR
Copy link
Contributor Author

CODZR commented Apr 15, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants