build_emoji: Change sprite CSS files to use hyphens in names.

This is more consistent with our other names in emoji infra.
This commit is contained in:
Harshit Bansal 2018-08-25 23:46:23 +05:30 committed by Tim Abbott
parent 9bd56d0ce4
commit ec2ebd1cc9
6 changed files with 7 additions and 7 deletions

View File

@ -143,7 +143,7 @@ exports.report_emojiset_change = function () {
var sprite = new Image();
sprite.onload = function () {
var sprite_css_href = "/static/generated/emoji/" + page_params.emojiset + "_sprite.css";
var sprite_css_href = "/static/generated/emoji/" + page_params.emojiset + "-sprite.css";
$("#emoji-spritesheet").attr('href', sprite_css_href);
};
sprite.src = "/static/generated/emoji/sheet-" + page_params.emojiset + "-64.png";

View File

@ -19,7 +19,7 @@
{% block customhead %}
<meta name="apple-mobile-web-app-capable" content="yes">
<link href="/static/images/logo/apple-touch-icon-precomposed.png" rel="apple-touch-icon-precomposed">
<link id="emoji-spritesheet" href="/static/generated/emoji/{{ emojiset }}_sprite.css" rel="stylesheet" type="text/css">
<link id="emoji-spritesheet" href="/static/generated/emoji/{{ emojiset }}-sprite.css" rel="stylesheet" type="text/css">
<style>
#css-loading {
background: white;

View File

@ -1,7 +1,7 @@
{% extends "zerver/base.html" %}
{% block customhead %}
<link id="emoji-spritesheet" href="/static/generated/emoji/google_sprite.css" rel="stylesheet" type="text/css">
<link id="emoji-spritesheet" href="/static/generated/emoji/google-sprite.css" rel="stylesheet" type="text/css">
<style>
.portico-header {
padding-bottom: 0px;

View File

@ -120,7 +120,7 @@ def generate_sprite_css_files(cache_path: str,
'pos_y': (emoji["sheet_y"] * 100) / 51,
}
SPRITE_CSS_PATH = os.path.join(cache_path, '%s_sprite.css' % (emojiset,))
SPRITE_CSS_PATH = os.path.join(cache_path, '%s-sprite.css' % (emojiset,))
sprite_css_file = open(SPRITE_CSS_PATH, 'w')
sprite_css_file.write(SPRITE_CSS_FILE_TEMPLATE % {'emojiset': emojiset,
'emoji_positions': emoji_positions,

View File

@ -47,7 +47,7 @@ TABLE_ROW_TEMPLATE = """
EMOJI_LISTING_TEMPLATE = """
<html>
<head>
<link rel = "stylesheet" type = "text/css" href = "/static/generated/emoji/google_sprite.css" />
<link rel = "stylesheet" type = "text/css" href = "/static/generated/emoji/google-sprite.css" />
<style>
%(table_css)s
</style>

View File

@ -816,5 +816,5 @@ class HomeTest(ZulipTestCase):
self.assertEqual(result.status_code, 200)
html = result.content.decode('utf-8')
self.assertIn('google_sprite.css', html)
self.assertNotIn('text_sprite.css', html)
self.assertIn('google-sprite.css', html)
self.assertNotIn('text-sprite.css', html)