Commit b4084cfc authored by yPhil's avatar yPhil
Browse files

#Bug: Report link URL

parent cc29e23f
Pipeline #396654 passed with stage
in 2 minutes and 51 seconds
......@@ -38,6 +38,7 @@
/* Relative to media */
--beggar-width: 360px;
--side-menu-width-expanded: 280px;
--side-menu-width: -291px;
--header-height: 24px;
......@@ -59,6 +60,7 @@
@media screen and (max-width: 700px) {
:root {
--beggar-width: 100%;
--side-menu-width-expanded: 90%;
--side-menu-width: -999px;
--header-height: 2.2em;
......@@ -151,10 +153,13 @@ a:active {
.topnav > div.menuBarItem {
color: var(--color-ui-pri);
cursor: pointer;
text-align: center;
}
.topnav > div.menuBarButton{
cursor: pointer;
}
.topnav .navLeft {
order: 1;
}
......@@ -859,8 +864,6 @@ button.ui-state-success {
#helpMiniButton {
font-size: 9pt;
font-weight: bold;
background-color: var(--color-ui-success);
/* border-color: var(--color-ui-danger); */
height: 20px;
padding: 1px;
position: absolute;
......@@ -869,10 +872,6 @@ button.ui-state-success {
width: 120px;
}
#helpDialog a {
text-decoration: underline;
}
ul.help {
/* list-style-type: circle; */
color: var(--color-ui-pri);
......@@ -1425,7 +1424,7 @@ div#logo-title > .logo-title > a:hover {
background-color: var(--color-ui-qua);
border: 1px solid var(--color-ui-oct);
border-radius: 5px;
width: 360px;
width: var(--beggar-width);
/* height: 220px; */
max-width: 100%;
padding: 2em;
......@@ -1461,13 +1460,13 @@ div#logo-title > .logo-title > a:hover {
font-size: 11pt;
}
#beggar a.beggarLink:link,
#beggar a.beggarLink:visited {
a.ptlInterface:link,
a.ptlInterface:visited {
text-decoration: underline !important;
color: var(--color-ui-pri);
}
#beggar a.beggarLink:hover {
#beggar a.ptlInterface:hover {
color: var(--color-ui-sec);
}
......
......@@ -7,32 +7,67 @@ PTL.dialog = {
},
beg:function() {
const $beggar = $('#beggar'),
$beggarH4 = $('#beggar > h4'),
$beggarClose = $('#beggar > span.beggarClose'),
$beggarOkButton = $('#beggar > #beggarOkButton'),
$beggarTourButton = $('#beggar > #beggarTourButton');
$beggarOkButton.on('click', function() {
$beggar.fadeOut('fast');
window.open('https://liberapay.com/yPhil/donate');
});
$('#dialogs').load('/static/templates/dialogs.html #beggarDialog', function() {
$beggarClose.on('click', function() {
$beggar.fadeOut('fast');
});
const $dialog = $(this),
$beggarH4 = $dialog.find('h4'),
$beggarClose = $dialog.find('span.beggarClose'),
$beggarOkButton = $dialog.find('#beggarOkButton'),
$beggarTourButton = $dialog.find('#beggarTourButton');
$beggarTourButton.on('click', function() {
$beggar.fadeOut('fast');
$dialog.dialog({
title: PTL.tr('Pétrolette needs you'),
position: { my: "left top", at: "left bottom" },
modal: false,
buttons: [
{
text: PTL.tr('Donate'),
title: PTL.tr('Send your love to Pétrolette'),
class: 'translate',
click: function() {
window.open('https://liberapay.com/yPhil/donate');
PTL.dialog.kill($dialog);
}
},
{
text: PTL.tr('Take the tour'),
title: PTL.tr('Learn to use it in a few easy steps'),
class: 'translate',
click: function() {
PTL.dialog.kill($dialog);
PTL.util.help('ui'); }
}
],
open: function () {
$('.ui-widget-overlay').on('click', function() {
PTL.dialog.kill($dialog);
});
PTL.sideMenu('close');
$('#tabs').tabs('option', 'active', 0);
PTL.util.help('ui');
}
});
});
// $beggarOkButton.on('click', function() {
// $beggar.fadeOut('fast');
// window.open('https://liberapay.com/yPhil/donate');
// });
$beggar.fadeIn('fast');
// $beggarClose.on('click', function() {
// $beggar.fadeOut('fast');
// });
// $beggarTourButton.on('click', function() {
// $beggar.fadeOut('fast');
// PTL.sideMenu('close');
// $('#tabs').tabs('option', 'active', 0);
// PTL.util.help('ui');
// });
$dialog.dialog('open');
});
},
notify:function(title, text) {
......@@ -50,6 +85,42 @@ PTL.dialog = {
});
},
about:function() {
$('#dialogs').load('/static/templates/dialogs.html #helpDialog', function() {
var $dialog = $(this);
$dialog.dialog({
title: PTL.tr('About Pétrolette'),
buttons: [
{
text: PTL.tr('Ok'),
title: PTL.tr('Ok'),
class: 'translate',
click: function() {
PTL.dialog.kill($dialog);
}
}
],
open: function () {
$('.ui-widget-overlay').on('click', function() {
PTL.dialog.kill($dialog);
});
$dialog.find('h1').text('Pétrolette');
$dialog.find('h2#name').text(PTL.tr('Index'));
$dialog.find('p#name').text('By yPhil');
$dialog.find('h2#number').text(PTL.tr('Number of feeds'));
$dialog.find('p#number').text(nbOfFeedsInCol);
}
});
$dialog.dialog('open');
});
},
help:function() {
$('#dialogs').load('/static/templates/dialogs.html #helpDialog', function() {
......
......@@ -243,7 +243,7 @@ PTL.feed = {
$reportLinkIcon
.attr('class', 'item-icon icon-petrolette')
.attr('title', PTL.tr('Report feed error'))
.appendTo($validateLink);
.appendTo($reportLink);
$reportLink
.attr('href', 'https://framagit.org/yphil/petrolette/-/issues/new?issue[title]=Feed%20error&issue[description]=' + feedUrl + ' (' + message + ')')
......
......@@ -94,8 +94,8 @@ var PTL = (function() {
});
$('body').on('click','.help-button', function() {
PTL.dialog.help();
// PTL.dialog.beg();
// PTL.dialog.help();
PTL.dialog.beg();
});
$('body').on('click','.new-feed-button', function() {
......
......@@ -133,12 +133,12 @@
data-content="Pétrolette is a news reader focused on preventing anyone to know what you are reading.">
Pétrolette is a news reader focused on preventing anyone to know what you are reading.
</span>
<button class="help-button help-tour translate"
<button class="help-tour translate ui-button ui-corner-all"
data-content="Take the tour">
Take the tour
</button>
<button class="help-button help-kb-shortcuts translate"
<button class="help-kb-shortcuts translate ui-button ui-corner-all"
data-content="Keyboard shortcuts">
Keyboard shortcuts
</button>
......@@ -152,7 +152,7 @@
<span class="translate"
data-content="Pétrolette uses a time-tested technology">
Pétrolette uses a time-tested technology
</span>: <a href="https://wikipedia.org/wiki/RSS">RSS</a>.
</span>: <a class="ptlInterface" href="https://wikipedia.org/wiki/RSS">RSS</a>.
<span class="translate"
data-content="Websites provide a feed of their headlines to facilitate access to their content ; Pétrolette updates and displays them.">
......@@ -242,7 +242,7 @@
data-content="You can also drag this button to your bookmark toolbar, and click it when you want to add a website to Pétrolette">
You can also drag this button to your bookmark toolbar, and click it when you want to add a website to Pétrolette</span>:
<a href="#"
class="help-button help-bookmarklet translate icon-petrolette"
class="help-bookmarklet translate icon-petrolette ui-button ui-corner-all"
data-title="Drag to the bookmark bar"
title="Drag to the bookmark bar"
data-content="Add to Pétrolette">
......@@ -261,7 +261,7 @@
data-content="Learn how to use">
Learn how to use
</span>
<button class="help-button help-tour translate"
<button class="help-tour ui-button ui-corner-all translate"
data-content="the tabs and the feeds">
the tabs and the feeds
</button>
......@@ -319,3 +319,34 @@
</fieldset>
</form>
</div>
<div id="beggarDialog" class="flex-box">
<span class="beggarClose icon-cancel"></span>
<span class="huge">🍏</span>
<h4 class="translate" data-content="Pétrolette needs you">Pétrolette needs you</h4>
<p>
<span class="translate"
data-content="Pétrolette is free software. However the development requires">
Pétrolette is free software. However the development requires</span> <span><a class="translate ptlInterface" data-content="a lot of time" href="https://www.youtube.com/watch?v=JlbMEx9H6FE">a lot of time</a></span> <span class="translate" data-content="and">and</span> <a class="translate ptlInterface" data-content="a lot of work" href="https://framagit.org/yphil/petrolette/-/commits/master">a lot of work</a>. <span data-content="In order to keep developing Pétrolette with new features I need your help." class="translate">In order to keep developing Pétrolette with new features I need your help.</span>
</p>
<p class="translate" data-content="Please consider to support the Pétrolette project by sending a donation. Even the smallest amount will help a lot.">
Please consider to support the Pétrolette project by sending a donation. Even the smallest amount will help a lot.
</p>
<a href="https://liberapay.com/yPhil/donate"
id="beggarOkButton"
class="ui-button ui-corner-all unique translate"
data-title="Donate"
title="Donate"
data-content="Donate">
Donate
</a>
<button id="beggarTourButton"
class="ui-button ui-corner-all unique translate"
data-title="Take the tour"
title="Take the tour"
data-content="Take the tour">
Take the tour
</button>
</div>
......@@ -112,14 +112,14 @@
<div class="topnav" id="topnav">
<div id="menuButton"
class="menuBarItem translate js-enabled-only navLeft"
class="menuBarItem menuBarButton translate js-enabled-only navLeft"
title="Main menu"
data-title="Main menu">
<i class="icon-menu topMenuIcon"></i>
</div>
<div id="newFeedButton"
class="menuBarItem translate new-feed-button js-enabled-only navLeft"
class="menuBarItem menuBarButton translate new-feed-button js-enabled-only navLeft"
title="New feed"
data-title="New feed">
<i class="icon-plus topMenuIcon"></i>
......@@ -127,7 +127,7 @@
<div id="ptlSearch" class="menuBarItem navLeft">
<input
class="ui-widget-content ui-corner-all translate"
class="ui-widget-content ui-corner-all"
type="text"
placeholder="Search in feeds">
<i class="icon-reset"></i>
......@@ -492,37 +492,6 @@
<p></p>
</div>
<div id="beggar" style="display:none" class="flex-box">
<span class="beggarClose icon-cancel"></span>
<span class="beggarIcon">🍏</span>
<h4 class="translate" data-content="Pétrolette needs you">Pétrolette needs you</h4>
<p>
<span class="translate"
data-content="Pétrolette is free software. However the development requires">
Pétrolette is free software. However the development requires</span> <span><a class="translate beggarLink" data-content="a lot of time" href="https://www.youtube.com/watch?v=JlbMEx9H6FE">a lot of time</a></span> <span class="translate" data-content="and">and</span> <a class="translate beggarLink" data-content="a lot of work" href="https://framagit.org/yphil/petrolette/-/commits/master">a lot of work</a>. <span data-content="In order to keep developing Pétrolette with new features I need your help." class="translate">In order to keep developing Pétrolette with new features I need your help.</span>
</p>
<p class="translate" data-content="Please consider to support the Pétrolette project by sending a donation. Even the smallest amount will help a lot.">
Please consider to support the Pétrolette project by sending a donation. Even the smallest amount will help a lot.
</p>
<a href="https://liberapay.com/yPhil/donate"
id="beggarOkButton"
class="ui-button ui-corner-all unique translate"
data-title="Donate"
title="Donate"
data-content="Donate">
Donate
</a>
<button id="beggarTourButton"
class="ui-button ui-corner-all unique translate"
data-title="Take the tour"
title="Take the tour"
data-content="Take the tour">
Take the tour
</button>
</div>
<script async src="/bower/responsively-lazy/responsivelyLazy.min.js"></script>
</body>
</html>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment