thiago
thiago

Reputation: 49

Google Fonts and web2py

I have this simple page:

<html>
<head>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Nunito">
<style>
#font {
  font-family: 'Nunito', sans-serif;
  font-size: 48px;
}
</style>
</head>
<body>
  <div id="font">Text here!</div>
</body>
</html>

It works pretty fine when I open the file in the browser, but when I put it online in static folder in web2py (on the PythonAnywhere), nothing changes, the font looks like simple Arial. So, what is wrong? Thanks in advance.

Upvotes: 3

Views: 465

Answers (1)

Anthony
Anthony

Reputation: 25536

Try changing the CSS link to:

<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Nunito">

Removing the "http:" from the href will force the scheme to that of the parent page (in this case, "https").

Upvotes: 3

Related Questions