Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
css: remove useless @import, use .min.css everywhere
debian.css is already minified into debcodesearch.min.css, so the
@import resulted in loading that content twice.

Using debcodesearch.min.css everywhere shaves off 0.10s of the total
loading time (1.56s to 1.47s) and saves 1 request.
  • Loading branch information
stapelberg committed Jun 28, 2016
1 parent e65763a commit 6d614ad
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion cmd/dcs-web/templates/error.html
Expand Up @@ -4,7 +4,7 @@
<html lang="en">
<head>
<title>Error!</title>
<link rel="stylesheet" href="debcodesearch.css">
<link rel="stylesheet" href="debcodesearch.min.css">
<style type="text/css">
pre, code {
/* We need to make sure that the line numbers and the code itself have
Expand Down
2 changes: 1 addition & 1 deletion cmd/dcs-web/templates/perpackage-results.html
Expand Up @@ -4,7 +4,7 @@
<html lang="en">
<head>
<title>Debian Code Search: {{.q}}</title>
<link rel="stylesheet" href="debcodesearch.css">
<link rel="stylesheet" href="debcodesearch.min.css">
<style type="text/css">
pre, code {
/* We need to make sure that the line numbers and the code itself have
Expand Down
2 changes: 1 addition & 1 deletion cmd/dcs-web/templates/placeholder.html
Expand Up @@ -4,7 +4,7 @@
<html lang="en">
<head>
<title>Debian Code Search: {{.q}}</title>
<link rel="stylesheet" href="debcodesearch.css">
<link rel="stylesheet" href="debcodesearch.min.css">
<style type="text/css">
pre, code {
/* We need to make sure that the line numbers and the code itself have
Expand Down
2 changes: 1 addition & 1 deletion cmd/dcs-web/templates/queryz.html
Expand Up @@ -4,7 +4,7 @@
<html lang="en">
<head>
<title>Debian Code Search: Current queries</title>
<link rel="stylesheet" href="debcodesearch.css">
<link rel="stylesheet" href="debcodesearch.min.css">
<style type="text/css">
pre, code {
/* We need to make sure that the line numbers and the code itself have
Expand Down
2 changes: 1 addition & 1 deletion cmd/dcs-web/templates/results.html
Expand Up @@ -4,7 +4,7 @@
<html lang="en">
<head>
<title>Debian Code Search: {{.q}}</title>
<link rel="stylesheet" href="debcodesearch.css">
<link rel="stylesheet" href="debcodesearch.min.css">
<style type="text/css">
pre, code {
/* We need to make sure that the line numbers and the code itself have
Expand Down
2 changes: 1 addition & 1 deletion cmd/dcs-web/templates/show.html
Expand Up @@ -4,7 +4,7 @@
<html lang="en">
<head>
<title>Debian Code Search: {{.filename}}</title>
<link rel="stylesheet" href="debcodesearch.css">
<link rel="stylesheet" href="debcodesearch.min.css">
<style type="text/css">
pre, code {
/* We need to make sure that the line numbers and the code itself have
Expand Down
2 changes: 1 addition & 1 deletion static/50x.html
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Debian Code Search</title>
<link rel="stylesheet" href="debcodesearch.css">
<link rel="stylesheet" href="debcodesearch.min.css">
</head>
<body>

Expand Down
2 changes: 1 addition & 1 deletion static/about.html
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>About Debian Code Search</title>
<link rel="stylesheet" href="debcodesearch.css">
<link rel="stylesheet" href="debcodesearch.min.css">
</head>
<body>

Expand Down
2 changes: 1 addition & 1 deletion static/contact.html
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Debian Code Search</title>
<link rel="stylesheet" href="debcodesearch.css">
<link rel="stylesheet" href="debcodesearch.min.css">
</head>
<body>

Expand Down
5 changes: 2 additions & 3 deletions static/debcodesearch.css
@@ -1,6 +1,5 @@
/* TODO: Verify that the CSS processing order is as specified in an HTML file
* and then include debian.css first, debcodesearch.css last */
@import url("debian.css");
/* debian.css is imported by virtue of minifying it together with this file
* into debcodesearch.min.css. */

#searchdiv {
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion static/faq.html
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>Debian Code Search</title>
<link rel="stylesheet" href="debcodesearch.css">
<link rel="stylesheet" href="debcodesearch.min.css">
</head>
<body>

Expand Down

0 comments on commit 6d614ad

Please sign in to comment.