"save a link" added to top menu (default theme) to toggle "save link" form message, issue #461. "Mark all the entries as read" link added in default theme.

This commit is contained in:
Maryana Rozhankivska 2014-02-16 21:00:30 +02:00
parent 488fc63b67
commit 01cd443441
4 changed files with 40 additions and 1 deletions

View File

@ -3,6 +3,9 @@
<li><a href="./?view=fav" {% if view == 'fav' %}class="current"{% endif %}>{% trans "favorites" %}</a></li>
<li><a href="./?view=archive" {% if view == 'archive' %}class="current"{% endif %}>{% trans "archive" %}</a></li>
<li><a href="./?view=tags" {% if view == 'tags' %}class="current"{% endif %}>{% trans "tags" %}</a></li>
<li><a href="javascript: void(null);" id="pocheit">{% trans "save a link" %}</a><span id="pocheit-arrow"></span></li>
<li><a href="./?view=config" {% if view == 'config' %}class="current"{% endif %}>{% trans "config" %}</a></li>
<li><a href="./?logout" title="{% trans "logout" %}">{% trans "logout" %}</a></li>
</ul>
</ul>
{% include '_pocheit-form.twig' %}

View File

@ -0,0 +1,22 @@
<div id="pocheit-form" class="messages info">
<center>
<form method="get" action="index.php">
<input required placeholder="example.com/article" class="addurl" id="plainurl" name="plainurl" type="url" />
<input type="submit" value="{% trans "save link!" %}" />
</form>
</center>
</div>
<script type="text/javascript">
$(document).ready(function() {
$("#pocheit-form").hide();
$("#pocheit").click(function(){
$("#pocheit-form").toggle();
$("#pocheit").toggleClass("current");
$("#pocheit-arrow").toggleClass("arrow-down");
});
});
</script>

View File

@ -334,3 +334,16 @@ a.bad-display span,
a.reading-time span {
background-repeat: no-repeat;
}
.arrow-down {
width: 0px;
height: 0px;
border-style: solid;
border-width: 10px 10px 0 10px;
border-color: #000 transparent transparent transparent;
position: absolute;
margin-top: 1.5em;
margin-left: -30px;
}

View File

@ -46,4 +46,5 @@
{% endfor %}
{% endif %}
{{ block('pager') }}
{% if view == 'home' %}{% if nb_results > 1 %}<a title="{% trans "mark all the entries as read" %}" href="./?action=archive_all">{% trans "mark all the entries as read" %}</a>{% endif %}{% endif %}
{% endblock %}