Skip to content

Commit 3faf06b

Browse files
authored
Merge pull request #27 from takanory/t26-add-width-to-table
#26 add width to table
2 parents 173ff0d + f8fcce5 commit 3faf06b

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.3.4 - 2025-03-28
4+
5+
* 📝 Set the width to the emoji cell of nekochan emoji list
6+
37
## v0.3.3 - 2025-03-22
48

59
* 📝 Add search function to nekochan emoji list(by [List.js](https://listjs.com/))

docs/images/nekochan-search.gif

-19.9 KB
Loading

sphinx_nekochan/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""sphinx-nekochan emoji extension"""
22

3-
__version__ = "0.3.3"
3+
__version__ = "0.3.4"
44

55
from functools import cache
66
from importlib import resources
@@ -191,9 +191,11 @@ def run(self) -> list[nodes.Node]:
191191

192192
return node_list
193193

194+
194195
def create_table_header(self) -> nodes.Node:
195196
"""create table and table header node"""
196197
table = nodes.table()
198+
# table["classes"] += ["colwidths-given"]
197199

198200
tgroup = nodes.tgroup(cols=3)
199201
table += tgroup
@@ -209,6 +211,8 @@ def create_table_header(self) -> nodes.Node:
209211
row = nodes.row()
210212
thead += row
211213
cell = nodes.entry()
214+
# add class for setting emoji width
215+
cell["classes"].append("width-64px")
212216
row += cell
213217
cell += nodes.Text("Emoji", "Emoji")
214218
cell = nodes.entry()

sphinx_nekochan/_static/sphinx_nekochan.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
.nekochan-flip-both {
2222
transform: scale(-1);
2323
}
24+
.width-64px {
25+
width: 64px;
26+
}
2427

2528
/* https://www.cssportal.com/css-tooltip-generator/ */
2629
[data-tooltip] {

0 commit comments

Comments
 (0)