1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

Add toggle for reader mode

This commit is contained in:
ksamuel
2020-08-13 16:53:17 +02:00
parent 1939a6b89e
commit cda601a355
4 changed files with 40 additions and 5 deletions

View File

@@ -11,6 +11,7 @@
<link rel="icon" href="/static/img/favicon.ico" />
%if not settings.DEBUG:
<link href="/static/css/style.min.css?{{ VERSION }}" rel="stylesheet" />
%else:
@@ -26,7 +27,7 @@
<div id="app">
<div class="topnav" @mouseleave="openPreviousPastesMenu =false">
<div :class="{'topnav': true, 'reader-mode': readerMode}" @mouseleave="openPreviousPastesMenu =false">
<a class="brand" href="/"><span>ø</span>bin<em>.net</em></a>
<span class="tagline">"A client side encrypted PasteBin"<br><span>All pastes are AES256 encrypted, we cannot know
what you paste...</span>
@@ -34,6 +35,14 @@
<nav>
<ul>
<li>
<a href="#" v-if="currentPaste.type === 'text'" @click.prevent="toggleReaderMode()">📖</a>
<span v-if="readerMode">
<a href="#" @click.prevent="increaseFontSize()">+</a>
<a href="#" @click.prevent="decreaseFontSize()">-</a>
🔍
</span>
</li>
<li class="submenu"><a href="#" @click.prevent="openPreviousPastesMenu = !openPreviousPastesMenu">Previous
pastes v</a>
<ul class="previous-pastes" id="topmenu" v-if="openPreviousPastesMenu">

View File

@@ -54,12 +54,14 @@
<span id="expiration-tag">Expire {{ expiration }}</span>
%end
<pre id="paste-content" class="prettyprint">
<div class="paste-wrapper">
<pre id="paste-content" class="prettyprint" v-if="!readerMode">
<code>
{{ paste.content }}
</code>
</div>
</pre>
<pre id="readable-paste-content" v-if="readerMode">
{% currentPaste.content %}
</pre>
<div class="d-flex justify-content-between down">