Skip to content

Commit

Permalink
Merge pull request #134 from nsosnsos/dev
Browse files Browse the repository at this point in the history
FEAT: ADDED PLUGIN SIMPLEMDE LOCALLY
  • Loading branch information
nsosnsos authored Oct 15, 2023
2 parents ce28ec8 + 5e203a5 commit 61ac0b9
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
1 change: 1 addition & 0 deletions hallelujah/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class Config:
SYS_THEMES = _get_themes()
SYS_THEME_DAY = SYS_THEMES.get('United')
SYS_THEME_NIGHT = SYS_THEMES.get('Darkly')
SYS_LOCAL_PLUGINS = True
SYS_MARIADB = True
SYS_REGISTER = False

Expand Down
7 changes: 7 additions & 0 deletions hallelujah/static/plugins/simplemde/simplemde.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions hallelujah/static/plugins/simplemde/simplemde.min.js

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions hallelujah/templates/plugins/simplemde.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@

{% block styles %}
{{ super() }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
{% if config.SYS_LOCAL_PLUGINS %}
<link rel="stylesheet" href="{{ url_for('static', filename='plugins/simplemde/simplemde.min.css', _external=True) }}">
{% else %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
{% endif %}
{% endblock styles %}

{% block scripts %}
{{ super() }}
<script type="text/javascript" src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
{% if config.SYS_LOCAL_PLUGINS %}
<script type="text/javascript" src="{{ url_for('static', filename='plugins/simplemde/simplemde.min.js', _external=True) }}"></script>
{% else %}
<script type="text/javascript" src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
{% endif %}
<script type="text/javascript">
var mde = new SimpleMDE({
element: document.getElementById("content"),
Expand Down

0 comments on commit 61ac0b9

Please sign in to comment.