Skip to content

Commit

Permalink
Use CSS from workflow dir instead of creating per-dict hard link
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-pennyworth committed Aug 4, 2024
1 parent f14755c commit 1b2fed2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dict-entry.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ body
margin-bottom: 1.5em;
/* font-size needs to come after font as the included
"-apple-system-body" comes with size too. */
font-size: calc(var(--result-text-size, 16pt) * 0.75);
font-size: calc(var(--result-text-size, 16pt) * 0.85);
}

html.apple_client-panel body
Expand Down
5 changes: 5 additions & 0 deletions extra-pane-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[{
"alignment" : {
"horizontal" : {"placement" : "right", "width" : 300, "minHeight" : 400}},
"customCSSFilename": "dict-entry.css"
}]
2 changes: 1 addition & 1 deletion info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ Subsequent searches should be snappy
<key>variablesdontexport</key>
<array/>
<key>version</key>
<string>0.2.16</string>
<string>0.2.17</string>
<key>webaddress</key>
<string>https://github.com/mr-pennyworth/alfred-better-dictionaries</string>
</dict>
Expand Down
1 change: 1 addition & 0 deletions mkworkflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"alfred-dict-server",
"cocoaDialog.app",
"dict-entry.css",
"extra-pane-config.json",
"icon.png",
"info.plist",
"jq",
Expand Down
6 changes: 0 additions & 6 deletions pyapp/BetterDict.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def create_html_file(word, definitions, html_dir):
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="dict-entry.css">
</head>
<body> {definition} </body>
</html>""".encode(
Expand All @@ -115,11 +114,6 @@ def create_html_files(word_defs_map_items, html_dir):
title=title,
)

os.link(
src=f"{WORKFLOW_DIR}/dict-entry.css",
dst=f"{html_dir}/dict-entry.css",
)


class AccumulatedIndexer:
def __init__(self, index):
Expand Down

0 comments on commit 1b2fed2

Please sign in to comment.