gpt4 book ai didi

html - 我的 Page.ss 不会加载 css 和脚本 SilverStripe v4.2.1

转载 作者:太空宇宙 更新时间:2023-11-04 06:48:42 25 4
gpt4 key购买 nike

我将 WAMP 作为我的本地服务器。我仔细按照说明进行操作,但无法将我的 css 和脚本加载到我的 Page.ss 上。我刷新了缓存并刷新了页面并更新了 href,但它们似乎都不起作用。

页面.ss

<html>
<head>
<title></title>
<meta charset = "UTF-8">
<meta name="description" content= "">
<meta name="author" content= "Lisandro">
<meta name="keywords" content= "">
<meta name="viewport" content="width=device-width" initial-scale="1">
<link rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">

<link href="https://fonts.googleapis.com/css?family=Noto+Sans"
rel="stylesheet">
<link rel="stylesheet" type="text/css" href="themes/u-mart/css/slick.css">
<link rel="stylesheet" type="text/css" href="themes/u-mart/css/slick-
theme.css">
<link rel="stylesheet" type="text/css" href="themes/u-mart/css/style.css">
<link rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">

<script src="https://code.jquery.com/jquery-3.3.1.js"></script>


</head>
<body>
"TONS OF HTML CODES"
</body>
</html>

This is where my page.ss is located

enter image description here

最佳答案

找到了答案。您所要做的就是将这些行添加到您的 .SS 文件中。

 <% require css("<my-module-dir>/css/some_file.css") %>
<% require themedCSS("some_themed_file") %>
<% require javascript("<my-module-dir>/javascript/some_file.js") %>

这些在他们网站的类(class)和视频中都没有提到。您将不得不自己挖掘。

关于html - 我的 Page.ss 不会加载 css 和脚本 SilverStripe v4.2.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53046225/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com