@@ -15,7 +15,7 @@ function metas_html(app::DashApp)
1515 ! has_ie_compat && push! (result, " <meta http-equiv=\" X-UA-Compatible\" content=\" IE=edge\" >" )
1616 ! has_charset && push! (result, " <meta charset=\" UTF-8\" >" )
1717
18- append! (result, formattag .(" meta" , meta_tags, opened = true ))
18+ append! (result, format_tag .(" meta" , meta_tags, opened = true ))
1919 return join (result, " \n " )
2020
2121end
@@ -49,66 +49,13 @@ function scripts_html(app::DashApp; debug = false)
4949 append! (scripts,
5050 ComponentPackages. components_js_sources (app. config. requests_pathname_prefix, debug = debug)
5151 )
52- return join (map (make_scipt_tag , scripts), " \n " )
52+ return join (map (make_script_tag , scripts), " \n " )
5353end
5454
5555renderer_html () = """ <script id="_dash-renderer" type="application/javascript">var renderer = new DashRenderer();</script>"""
5656
5757favicon_html (app:: DashApp ) = " "
5858
59- #=
60- def _walk_assets_directory(self):
61- walk_dir = self.config.assets_folder
62- slash_splitter = re.compile(r"[\\/]+")
63- ignore_str = self.config.assets_ignore
64- ignore_filter = re.compile(ignore_str) if ignore_str else None
65-
66- for current, _, files in os.walk(walk_dir):
67- if current == walk_dir:
68- base = ""
69- else:
70- s = current.replace(walk_dir, "").lstrip("\\").lstrip("/")
71- splitted = slash_splitter.split(s)
72- if len(splitted) > 1:
73- base = "/".join(slash_splitter.split(s))
74- else:
75- base = splitted[0]
76-
77- if ignore_filter:
78- files_gen = (x for x in files if not ignore_filter.search(x))
79- else:
80- files_gen = files
81-
82- for f in sorted(files_gen):
83- path = "/".join([base, f]) if base else f
84-
85- full = os.path.join(current, f)
86-
87- if f.endswith("js"):
88- self.scripts.append_script(self._add_assets_resource(path, full))
89- elif f.endswith("css"):
90- self.css.append_css(self._add_assets_resource(path, full))
91- elif f == "favicon.ico":
92- self._favicon = path
93- =#
94-
95- function find_assets_files (app:: DashApp )
96- result = (css = String[], js = String[], favicon = nothing )
97-
98- if app. config. include_assets_files
99- for (base, dirs, files) in walkdir (app. config. assets_folder)
100- if ! isempty (files)
101- relative = (base == app. config. assets_folder) ? " " : relpath (base, app. config. assets_folder)
102- relative_uri = join (splitpath (relative), " /" ) * " /"
103-
104-
105- end
106-
107-
108- end
109- end
110- return result
111- end
11259
11360function index_page (app:: DashApp ; debug = false )
11461
0 commit comments