mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-22 11:57:34 +00:00
Separating js and css in render_bundle (#3054)
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
{% extends "base_for_react.html" %}
|
||||
{% load render_bundle from webpack_loader %}
|
||||
|
||||
{% block extra_style %}
|
||||
{% render_bundle 'draft' 'css' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
<script type="text/javascript">
|
||||
window.draft = {
|
||||
@@ -18,5 +22,5 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
{% render_bundle 'draft' %}
|
||||
{% render_bundle 'draft' 'js' %}
|
||||
{% endblock %}
|
||||
|
@@ -1,7 +1,12 @@
|
||||
{% extends "base_for_react.html" %}
|
||||
{% load render_bundle from webpack_loader %}
|
||||
|
||||
{% block extra_style %}
|
||||
{% render_bundle 'app' 'css' %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block extra_script %}
|
||||
|
||||
{% render_bundle 'app' %}
|
||||
{% render_bundle 'app' 'js' %}
|
||||
{% endblock %}
|
||||
|
@@ -2,6 +2,18 @@
|
||||
{% load seahub_tags i18n %}
|
||||
{% load render_bundle from webpack_loader %}
|
||||
|
||||
{% block extra_style %}
|
||||
{% if filetype == 'Markdown' %}
|
||||
{% render_bundle 'sharedFileViewMarkdown' 'css' %}
|
||||
{% elif filetype == 'Text' %}
|
||||
{% render_bundle 'sharedFileViewText' 'css' %}
|
||||
{% elif filetype == 'Image' %}
|
||||
{% render_bundle 'sharedFileViewImage' 'css' %}
|
||||
{% elif filetype == 'Video' %}
|
||||
{% render_bundle 'sharedFileViewVideo' 'css' %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_script %}
|
||||
<script type="text/javascript">
|
||||
window.shared = {
|
||||
@@ -26,12 +38,12 @@
|
||||
};
|
||||
</script>
|
||||
{% if filetype == 'Markdown' %}
|
||||
{% render_bundle 'sharedFileViewMarkdown' %}
|
||||
{% render_bundle 'sharedFileViewMarkdown' 'js' %}
|
||||
{% elif filetype == 'Text' %}
|
||||
{% render_bundle 'sharedFileViewText' %}
|
||||
{% render_bundle 'sharedFileViewText' 'js' %}
|
||||
{% elif filetype == 'Image' %}
|
||||
{% render_bundle 'sharedFileViewImage' %}
|
||||
{% render_bundle 'sharedFileViewImage' 'js' %}
|
||||
{% elif filetype == 'Video' %}
|
||||
{% render_bundle 'sharedFileViewVideo' %}
|
||||
{% render_bundle 'sharedFileViewVideo' 'js' %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@@ -10,6 +10,7 @@
|
||||
<link rel="shortcut icon" href="{{ MEDIA_URL }}{{ favicon_path }}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seafile-ui.css" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/seahub_react.css?t=1398068110" />
|
||||
{% render_bundle 'markdownEditor' 'css' %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
@@ -48,6 +49,6 @@
|
||||
}
|
||||
</script>
|
||||
<script src="{{ STATIC_URL }}scripts/i18n/{{ LANGUAGE_CODE }}/djangojs.js"></script>
|
||||
{% render_bundle 'markdownEditor' %}
|
||||
{% render_bundle 'markdownEditor' 'js' %}
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user