mirror of https://github.com/zulip/zulip.git
build_emoji: Change emoji sprite sheets to use hyphens in names.
Use of hyphens is more consistent with our other emoji infra names.
This commit is contained in:
parent
96f00d1dfa
commit
9bd56d0ce4
|
@ -45,7 +45,7 @@ run_test('initialize', () => {
|
||||||
emoji.initialize();
|
emoji.initialize();
|
||||||
assert(image_stub);
|
assert(image_stub);
|
||||||
assert.equal(calls, 2);
|
assert.equal(calls, 2);
|
||||||
assert.deepEqual(urls, ['/static/generated/emoji/sheet_google_64.png',
|
assert.deepEqual(urls, ['/static/generated/emoji/sheet-google-64.png',
|
||||||
'/static/generated/emoji/images-google-64/1f419.png']);
|
'/static/generated/emoji/images-google-64/1f419.png']);
|
||||||
|
|
||||||
// Check initialization sequence for `text` emojiset.
|
// Check initialization sequence for `text` emojiset.
|
||||||
|
@ -56,7 +56,7 @@ run_test('initialize', () => {
|
||||||
emoji.initialize();
|
emoji.initialize();
|
||||||
assert(image_stub);
|
assert(image_stub);
|
||||||
assert.equal(calls, 2);
|
assert.equal(calls, 2);
|
||||||
assert.deepEqual(urls, ['/static/generated/emoji/sheet_google_64.png',
|
assert.deepEqual(urls, ['/static/generated/emoji/sheet-google-64.png',
|
||||||
'/static/generated/emoji/images-google-64/1f419.png']);
|
'/static/generated/emoji/images-google-64/1f419.png']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ exports.initialize = function initialize() {
|
||||||
// Load the sprite image and octopus image in the background, so
|
// Load the sprite image and octopus image in the background, so
|
||||||
// that the browser will cache it for later use.
|
// that the browser will cache it for later use.
|
||||||
var sprite = new Image();
|
var sprite = new Image();
|
||||||
sprite.src = '/static/generated/emoji/sheet_' + emojiset + '_64.png';
|
sprite.src = '/static/generated/emoji/sheet-' + emojiset + '-64.png';
|
||||||
var octopus_image = new Image();
|
var octopus_image = new Image();
|
||||||
octopus_image.src = '/static/generated/emoji/images-' + emojiset + '-64/1f419.png';
|
octopus_image.src = '/static/generated/emoji/images-' + emojiset + '-64/1f419.png';
|
||||||
};
|
};
|
||||||
|
|
|
@ -146,7 +146,7 @@ exports.report_emojiset_change = 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";
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.update_page = function () {
|
exports.update_page = function () {
|
||||||
|
|
|
@ -50,7 +50,7 @@ div.emoji,
|
||||||
span.emoji
|
span.emoji
|
||||||
{
|
{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-image: url('sheet_%(emojiset)s_64.png');
|
background-image: url('sheet-%(emojiset)s-64.png');
|
||||||
-webkit-background-size: 5200%%;
|
-webkit-background-size: 5200%%;
|
||||||
-moz-background-size: 5200%%;
|
-moz-background-size: 5200%%;
|
||||||
background-size: 5200%%;
|
background-size: 5200%%;
|
||||||
|
@ -163,7 +163,7 @@ def setup_emoji_farms(cache_path: str, emoji_data: List[Dict[str, Any]]) -> None
|
||||||
# Copy spritesheets.
|
# Copy spritesheets.
|
||||||
emoji_data_path = os.path.join(NODE_MODULES_PATH, 'emoji-datasource-' + emojiset)
|
emoji_data_path = os.path.join(NODE_MODULES_PATH, 'emoji-datasource-' + emojiset)
|
||||||
input_sprite_sheet = os.path.join(emoji_data_path, 'img', emojiset, 'sheets-256', '64.png')
|
input_sprite_sheet = os.path.join(emoji_data_path, 'img', emojiset, 'sheets-256', '64.png')
|
||||||
output_sprite_sheet = os.path.join(cache_path, 'sheet_%s_64.png' % (emojiset,))
|
output_sprite_sheet = os.path.join(cache_path, 'sheet-%s-64.png' % (emojiset,))
|
||||||
run(['cp', input_sprite_sheet, output_sprite_sheet])
|
run(['cp', input_sprite_sheet, output_sprite_sheet])
|
||||||
|
|
||||||
# We hardcode octopus emoji image to Google emojiset's old
|
# We hardcode octopus emoji image to Google emojiset's old
|
||||||
|
|
|
@ -99,19 +99,19 @@ TABLE_CSS = """
|
||||||
}
|
}
|
||||||
|
|
||||||
.google {
|
.google {
|
||||||
background-image: url('sheet_google_64.png') !important;
|
background-image: url('sheet-google-64.png') !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.apple {
|
.apple {
|
||||||
background-image: url('sheet_apple_64.png') !important;
|
background-image: url('sheet-apple-64.png') !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emojione {
|
.emojione {
|
||||||
background-image: url('sheet_emojione_64.png') !important;
|
background-image: url('sheet-emojione-64.png') !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.twitter {
|
.twitter {
|
||||||
background-image: url('sheet_twitter_64.png') !important;
|
background-image: url('sheet-twitter-64.png') !important;
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue