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