fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
57041b3
)
Tighter editor layout with icons.
author
Radek Czajka
<rczajka@rczajka.pl>
Thu, 12 Nov 2020 14:48:44 +0000
(15:48 +0100)
committer
Radek Czajka
<rczajka@rczajka.pl>
Thu, 12 Nov 2020 14:48:44 +0000
(15:48 +0100)
requirements/requirements.txt
patch
|
blob
|
history
src/redakcja/static/css/html.css
patch
|
blob
|
history
src/redakcja/static/js/wiki/view_editor_wysiwyg.js
patch
|
blob
|
history
src/redakcja/templates/registration/head_login.html
patch
|
blob
|
history
src/wiki/templates/wiki/tabs/history_view_item.html
patch
|
blob
|
history
src/wiki/templates/wiki/tabs/source_editor_item.html
patch
|
blob
|
history
src/wiki/templates/wiki/tabs/summary_view_item.html
patch
|
blob
|
history
src/wiki/templates/wiki/tabs/wysiwyg_editor_item.html
patch
|
blob
|
history
diff --git
a/requirements/requirements.txt
b/requirements/requirements.txt
index
031670a
..
54ac60f
100644
(file)
--- a/
requirements/requirements.txt
+++ b/
requirements/requirements.txt
@@
-10,7
+10,7
@@
python-slugify
python-docx==0.8.10
Wikidata==0.6.1
python-docx==0.8.10
Wikidata==0.6.1
-librarian==1.
8.1
+librarian==1.
10
## Django
Django==3.0.4
## Django
Django==3.0.4
diff --git
a/src/redakcja/static/css/html.css
b/src/redakcja/static/css/html.css
index
98e41cd
..
5a969fb
100644
(file)
--- a/
src/redakcja/static/css/html.css
+++ b/
src/redakcja/static/css/html.css
@@
-608,6
+608,7
@@
div[x-node] > .uwaga {
padding: 1px;
z-index: 2000;
position: absolute;
padding: 1px;
z-index: 2000;
position: absolute;
+ text-align: left;
}
.html-editarea textarea {
}
.html-editarea textarea {
diff --git
a/src/redakcja/static/js/wiki/view_editor_wysiwyg.js
b/src/redakcja/static/js/wiki/view_editor_wysiwyg.js
index
72e218a
..
607fa3f
100644
(file)
--- a/
src/redakcja/static/js/wiki/view_editor_wysiwyg.js
+++ b/
src/redakcja/static/js/wiki/view_editor_wysiwyg.js
@@
-421,7
+421,7
@@
var w = $box.outerWidth();
var h = $box.innerHeight();
var w = $box.outerWidth();
var h = $box.innerHeight();
- if ($origin.is(".annotation-inline-box")
| $origin.is('.reference-inline-box')
) {
+ if ($origin.is(".annotation-inline-box")) {
w = Math.max(w, 400);
h = Math.max(h, 60);
if($('.htmlview div').offset().left + $('.htmlview div').width() > ($('.vsplitbar').offset().left - 480)){
w = Math.max(w, 400);
h = Math.max(h, 60);
if($('.htmlview div').offset().left + $('.htmlview div').width() > ($('.vsplitbar').offset().left - 480)){
@@
-430,6
+430,15
@@
x = 100;
}
}
x = 100;
}
}
+ if ($origin.is('.reference-inline-box')) {
+ w = 400;
+ h = 32;
+ y -= 32;
+ x = Math.min(
+ x,
+ $('.htmlview div').offset().left + $('.htmlview div').width() - 400
+ );
+ }
// start edition on this node
var $overlay = $('<div class="html-editarea"><button class="accept-button">Zapisz</button><button class="delete-button">Usuń</button><button class="tytul-button akap-edit-button">tytuł dzieła</button><button class="wyroznienie-button akap-edit-button">wyróżnienie</button><button class="slowo-button akap-edit-button">słowo obce</button><button class="znak-button akap-edit-button">znak spec.</button><textarea></textarea></div>').css({
// start edition on this node
var $overlay = $('<div class="html-editarea"><button class="accept-button">Zapisz</button><button class="delete-button">Usuń</button><button class="tytul-button akap-edit-button">tytuł dzieła</button><button class="wyroznienie-button akap-edit-button">wyróżnienie</button><button class="slowo-button akap-edit-button">słowo obce</button><button class="znak-button akap-edit-button">znak spec.</button><textarea></textarea></div>').css({
diff --git
a/src/redakcja/templates/registration/head_login.html
b/src/redakcja/templates/registration/head_login.html
index
1ae47fa
..
26ccfb5
100644
(file)
--- a/
src/redakcja/templates/registration/head_login.html
+++ b/
src/redakcja/templates/registration/head_login.html
@@
-1,11
+1,13
@@
{% load i18n %}
{% load i18n %}
+{% load gravatar %}
{% if user.is_authenticated %}
<div class="nav-item dropdown">
{% if user.is_authenticated %}
<div class="nav-item dropdown">
- <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- {{ user.username }}
+ <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
title="{{ user.username }}"
>
+ <img src="{% gravatar_url item.get_email 26 %}" alt="{{ user.username }}">
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
+ <h6 class="dropdown-header">{{ user.username }}</h6>
{% if user.is_staff %}
<a target="_blank" class="dropdown-item" href="{% url 'admin:index' %}">{% trans "Admin" %}</a>
{% endif %}
{% if user.is_staff %}
<a target="_blank" class="dropdown-item" href="{% url 'admin:index' %}">{% trans "Admin" %}</a>
{% endif %}
diff --git
a/src/wiki/templates/wiki/tabs/history_view_item.html
b/src/wiki/templates/wiki/tabs/history_view_item.html
index
8e88451
..
e3d00ac
100644
(file)
--- a/
src/wiki/templates/wiki/tabs/history_view_item.html
+++ b/
src/wiki/templates/wiki/tabs/history_view_item.html
@@
-1,4
+1,7
@@
{% load i18n %}
<li id="HistoryPerspective" data-ui-related="history-view-editor" data-ui-jsclass="HistoryPerspective" class="nav-item">
{% load i18n %}
<li id="HistoryPerspective" data-ui-related="history-view-editor" data-ui-jsclass="HistoryPerspective" class="nav-item">
- <a href="#" class="nav-link">{% trans "History" %}</a>
+ <a class="nav-link" href="#" title="{% trans "History" %}">
+ <span class="d-xl-none">⏰</span>
+ <span class="d-none d-xl-inline">{% trans "History" %}</span>
+ </a>
</li>
</li>
diff --git
a/src/wiki/templates/wiki/tabs/source_editor_item.html
b/src/wiki/templates/wiki/tabs/source_editor_item.html
index
ba915c3
..
92dd4f0
100644
(file)
--- a/
src/wiki/templates/wiki/tabs/source_editor_item.html
+++ b/
src/wiki/templates/wiki/tabs/source_editor_item.html
@@
-2,5
+2,8
@@
<li id="CodeMirrorPerspective" class="nav-item"
data-ui-related="source-editor"
data-ui-jsclass="CodeMirrorPerspective">
<li id="CodeMirrorPerspective" class="nav-item"
data-ui-related="source-editor"
data-ui-jsclass="CodeMirrorPerspective">
- <a class="nav-link" href="#">{% trans "Source code" %}</a>
+ <a class="nav-link" href="#" title="{% trans "Source code" %}">
+ <span class="d-xl-none"><></span>
+ <span class="d-none d-xl-inline">{% trans "Source code" %}</span>
+ </a>
</li>
</li>
diff --git
a/src/wiki/templates/wiki/tabs/summary_view_item.html
b/src/wiki/templates/wiki/tabs/summary_view_item.html
index
1d20591
..
fa0335b
100644
(file)
--- a/
src/wiki/templates/wiki/tabs/summary_view_item.html
+++ b/
src/wiki/templates/wiki/tabs/summary_view_item.html
@@
-1,4
+1,7
@@
{% load i18n %}
<li id="SummaryPerspective" data-ui-related="summary-view-editor" data-ui-jsclass="SummaryPerspective" class="nav-item">
{% load i18n %}
<li id="SummaryPerspective" data-ui-related="summary-view-editor" data-ui-jsclass="SummaryPerspective" class="nav-item">
- <a class="nav-link" href="#">{% trans "Summary" %}</a>
+ <a class="nav-link" href="#" title="{% trans "Summary" %}">
+ <span class="d-xl-none">📓</span>
+ <span class="d-none d-xl-inline">{% trans "Summary" %}</span>
+ </a>
</li>
</li>
diff --git
a/src/wiki/templates/wiki/tabs/wysiwyg_editor_item.html
b/src/wiki/templates/wiki/tabs/wysiwyg_editor_item.html
index
79ad89b
..
a1231b2
100644
(file)
--- a/
src/wiki/templates/wiki/tabs/wysiwyg_editor_item.html
+++ b/
src/wiki/templates/wiki/tabs/wysiwyg_editor_item.html
@@
-1,4
+1,7
@@
{% load i18n %}
<li id="VisualPerspective" data-ui-related="simple-editor" data-ui-jsclass="VisualPerspective" class="nav-item">
{% load i18n %}
<li id="VisualPerspective" data-ui-related="simple-editor" data-ui-jsclass="VisualPerspective" class="nav-item">
- <a href="#" class="nav-link">{% trans "Visual editor" %}</a>
+ <a class="nav-link" href="#" title="{% trans "Visual editor" %}">
+ <span class="d-xl-none">👁</span>
+ <span class="d-none d-xl-inline">{% trans "Visual editor" %}</span>
+ </a>
</li>
</li>