|
@@ -2,6 +2,11 @@
|
|
|
|
|
|
|
|
{% block html_title %}{{ t('Customize') }} {% endblock %}
|
|
{% block html_title %}{{ t('Customize') }} {% endblock %}
|
|
|
|
|
|
|
|
|
|
+{% block style_css_block %}
|
|
|
|
|
+<link rel="stylesheet" href="{{ webpack_asset('style').css }}">
|
|
|
|
|
+<link rel="stylesheet" id="jssDefault" {# append id for style-switcher #} href="{{ webpack_asset('style-theme-default').css }}">
|
|
|
|
|
+{% endblock %}
|
|
|
|
|
+
|
|
|
{% block html_additional_headers %}
|
|
{% block html_additional_headers %}
|
|
|
{% parent %}
|
|
{% parent %}
|
|
|
<!-- CodeMirror -->
|
|
<!-- CodeMirror -->
|
|
@@ -43,6 +48,44 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="col-md-9">
|
|
<div class="col-md-9">
|
|
|
|
|
|
|
|
|
|
+ <form action="/_api/admin/customize/theme" method="post" class="form-horizontal" id="cutomthemeSettingForm" role="form">
|
|
|
|
|
+ <fieldset>
|
|
|
|
|
+ <legend>{{ t('customize_page.Theme') }}</legend>
|
|
|
|
|
+ <!-- <div class="form-group">
|
|
|
|
|
+ <label for="settingForm[customize:highlightJsStyle]" class="col-xs-3 control-label">{{ t('customize_page.Theme') }}</label>
|
|
|
|
|
+ <div class="col-xs-9">
|
|
|
|
|
+ <select class="form-control selectpicker" name="settingForm[customize:highlightJsStyle]" onChange="selectHighlightJsStyle(event)">
|
|
|
|
|
+ {% for key in Object.keys(highlightJsCssSelectorOptions) %}
|
|
|
|
|
+ <option value={{key}} {% if key == highlightJsStyle() %} selected {% endif %}>{{highlightJsCssSelectorOptions[key].name}}</option>
|
|
|
|
|
+ {% endfor %}
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+
|
|
|
|
|
+ <script type="text/javascript">
|
|
|
|
|
+ // $(document).ready(function() {
|
|
|
|
|
+ // $('#styleOptions').styleSwitcher();
|
|
|
|
|
+ // });
|
|
|
|
|
+ </script>
|
|
|
|
|
+ <ul id="styleOptions">
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <a href="javascript: void(0)" data-theme="{{ webpack_asset('style-theme-default').css }}">Default</a>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <a href="javascript: void(0)" data-theme="{{ webpack_asset('style-theme-default-dark').css }}">Default Dark</a>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="form-group">
|
|
|
|
|
+ <div class="col-xs-offset-5 col-xs-6">
|
|
|
|
|
+ <input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
|
|
|
+ <button type="submit" class="btn btn-primary">{{ t('Update') }}</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ </fieldset>
|
|
|
|
|
+ </form>
|
|
|
|
|
+
|
|
|
<form action="/_api/admin/customize/behavior" method="post" class="form-horizontal" id="cutombehaviorSettingForm" role="form">
|
|
<form action="/_api/admin/customize/behavior" method="post" class="form-horizontal" id="cutombehaviorSettingForm" role="form">
|
|
|
<fieldset>
|
|
<fieldset>
|
|
|
<legend>{{ t('customize_page.Behavior') }}</legend>
|
|
<legend>{{ t('customize_page.Behavior') }}</legend>
|
|
@@ -391,7 +434,10 @@ window.addEventListener('load', (event) => {
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+{% endblock content_main %}
|
|
|
|
|
|
|
|
|
|
+{% block body_end %}
|
|
|
|
|
+ {% parent %}
|
|
|
<script>
|
|
<script>
|
|
|
$('#cutomcssSettingForm, #cutomscriptSettingForm, #cutomlayoutSettingForm, #cutombehaviorSettingForm, #customfeaturesSettingForm, #cutomheaderSettingForm, #cutomhighlightJsStyleSettingForm').each(function() {
|
|
$('#cutomcssSettingForm, #cutomscriptSettingForm, #cutomlayoutSettingForm, #cutombehaviorSettingForm, #customfeaturesSettingForm, #cutomheaderSettingForm, #cutomhighlightJsStyleSettingForm').each(function() {
|
|
|
$(this).submit(function()
|
|
$(this).submit(function()
|
|
@@ -441,7 +487,9 @@ window.addEventListener('load', (event) => {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- // init highlight.js
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ * highlight.js style switcher
|
|
|
|
|
+ */
|
|
|
hljs.initHighlightingOnLoad()
|
|
hljs.initHighlightingOnLoad()
|
|
|
|
|
|
|
|
function selectHighlightJsStyle(event) {
|
|
function selectHighlightJsStyle(event) {
|
|
@@ -453,10 +501,24 @@ window.addEventListener('load', (event) => {
|
|
|
highlightJsCssDOM.href = highlightJsCssDOM.href.replace(/[^/]+\.css$/, `${val}.css`);
|
|
highlightJsCssDOM.href = highlightJsCssDOM.href.replace(/[^/]+\.css$/, `${val}.css`);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
|
+ * Theme switcher
|
|
|
|
|
+ */
|
|
|
|
|
+ options = {
|
|
|
|
|
+ hasPreview: false,
|
|
|
|
|
+ fullPath: '',
|
|
|
|
|
+ cookie: {
|
|
|
|
|
+ isManagingLoad: false
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
|
+ $('#styleOptions').styleSwitcher(options);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
-{% endblock content_main %}
|
|
|
|
|
|
|
+{% endblock %}
|
|
|
|
|
|
|
|
{% block content_footer %}
|
|
{% block content_footer %}
|
|
|
{% endblock content_footer %}
|
|
{% endblock content_footer %}
|