mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
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:
committed by
Tim Abbott
parent
9bd56d0ce4
commit
ec2ebd1cc9
@@ -143,7 +143,7 @@ exports.report_emojiset_change = function () {
|
|||||||
|
|
||||||
var sprite = new Image();
|
var sprite = new Image();
|
||||||
sprite.onload = function () {
|
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);
|
$("#emoji-spritesheet").attr('href', sprite_css_href);
|
||||||
};
|
};
|
||||||
sprite.src = "/static/generated/emoji/sheet-" + page_params.emojiset + "-64.png";
|
sprite.src = "/static/generated/emoji/sheet-" + page_params.emojiset + "-64.png";
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
{% block customhead %}
|
{% block customhead %}
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<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 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>
|
<style>
|
||||||
#css-loading {
|
#css-loading {
|
||||||
background: white;
|
background: white;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% extends "zerver/base.html" %}
|
{% extends "zerver/base.html" %}
|
||||||
|
|
||||||
{% block customhead %}
|
{% 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>
|
<style>
|
||||||
.portico-header {
|
.portico-header {
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ def generate_sprite_css_files(cache_path: str,
|
|||||||
'pos_y': (emoji["sheet_y"] * 100) / 51,
|
'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 = open(SPRITE_CSS_PATH, 'w')
|
||||||
sprite_css_file.write(SPRITE_CSS_FILE_TEMPLATE % {'emojiset': emojiset,
|
sprite_css_file.write(SPRITE_CSS_FILE_TEMPLATE % {'emojiset': emojiset,
|
||||||
'emoji_positions': emoji_positions,
|
'emoji_positions': emoji_positions,
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ TABLE_ROW_TEMPLATE = """
|
|||||||
EMOJI_LISTING_TEMPLATE = """
|
EMOJI_LISTING_TEMPLATE = """
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<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>
|
<style>
|
||||||
%(table_css)s
|
%(table_css)s
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -816,5 +816,5 @@ class HomeTest(ZulipTestCase):
|
|||||||
self.assertEqual(result.status_code, 200)
|
self.assertEqual(result.status_code, 200)
|
||||||
|
|
||||||
html = result.content.decode('utf-8')
|
html = result.content.decode('utf-8')
|
||||||
self.assertIn('google_sprite.css', html)
|
self.assertIn('google-sprite.css', html)
|
||||||
self.assertNotIn('text_sprite.css', html)
|
self.assertNotIn('text-sprite.css', html)
|
||||||
|
|||||||
Reference in New Issue
Block a user