Revamped site's common scripts, Many pages slightly broken
Update commons.yml, excel-password-remover.yml, and 31 more files...
This commit is contained in:
@@ -126,6 +126,9 @@ class ContentResource:
|
||||
self.scripts = [ContentResourceDefinition(x) for x in self.scripts]
|
||||
self.stylesheets = [ContentResourceDefinition(x) for x in self.stylesheets]
|
||||
|
||||
self.scripts: list[ContentResourceDefinition]
|
||||
self.stylesheets: list[ContentResourceDefinition]
|
||||
|
||||
|
||||
@dataclass
|
||||
class ContentApplet:
|
||||
@@ -135,6 +138,7 @@ class ContentApplet:
|
||||
def __post_init__(self):
|
||||
self.resources: dict
|
||||
self.resources = ContentResource(**self.resources)
|
||||
self.resources: ContentResource
|
||||
# print(self.resources)
|
||||
|
||||
|
||||
@@ -148,6 +152,7 @@ class ContentTool:
|
||||
def __post_init__(self):
|
||||
self.metadata: dict
|
||||
self.metadata = ContentMetadata(**self.metadata)
|
||||
self.metadata: ContentMetadata
|
||||
|
||||
|
||||
@dataclass
|
||||
|
@@ -20,7 +20,7 @@ def render_applet_head(applet_data: ContentApplet, is_standalone: bool = False)
|
||||
"./static/resources/NibblePoker/applets/",
|
||||
applet_data.id,
|
||||
applet_style.get_clean_path())
|
||||
print(applet_style)
|
||||
# print(applet_style)
|
||||
elif applet_style.is_standalone():
|
||||
rsc_path = os.path.join(
|
||||
"./static/resources/Standalone/",
|
||||
@@ -61,6 +61,7 @@ def render_applet_scripts(applet_data: ContentApplet, is_standalone: bool = Fals
|
||||
"./static/resources/NibblePoker/applets/",
|
||||
applet_data.id,
|
||||
applet_script.get_clean_path())
|
||||
rsc_path = rsc_path.replace(".mjs", ".min.js")
|
||||
elif applet_script.is_standalone():
|
||||
rsc_path = os.path.join(
|
||||
"./static/resources/Standalone/",
|
||||
@@ -68,7 +69,7 @@ def render_applet_scripts(applet_data: ContentApplet, is_standalone: bool = Fals
|
||||
|
||||
if rsc_path is not None:
|
||||
with open(rsc_path) as applet_script_file:
|
||||
applet_script_html += "<script" +(" type='module'>" if applet_script.raw_uri.endswith(".mjs") else ">")
|
||||
applet_script_html += "<script" + (" type='module'>" if applet_script.raw_uri.endswith(".mjs") else ">")
|
||||
applet_script_html += applet_script_file.read()
|
||||
applet_script_html += "</script>"
|
||||
|
||||
|
Reference in New Issue
Block a user