Commit 8ea5f883 authored by yPhil's avatar yPhil

Merge branch 'q-string' into dev

parents 936941db b1b385c0
{
"name": "petrolette",
"version": "1.0.22",
"version": "1.0.23",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -2112,12 +2112,6 @@
}
}
},
"parallelshell": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/parallelshell/-/parallelshell-3.0.2.tgz",
"integrity": "sha512-aW73W8tmYiFZtQi41pweV3WWT6o/EvSxAVQHbumOhN53H47OuWQwrRc11xQ2i44GFvR5AjtzhD92r8Kv9X+7Iw==",
"dev": true
},
"parse-glob": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
......
{
"name": "petrolette",
"description": "Fly-by-night news reading webapp.",
"version": "1.0.22",
"version": "1.0.23",
"private": true,
"license": "GPL-3.0-only",
"engines": {
......@@ -14,8 +14,8 @@
"scripts": {
"start": "pm2 start -f bin/www --log-date-format='YYYY-MM-DD HH:mm Z' --name PTL",
"stop": "pm2 stop PTL",
"build:pre": "uglifyjs public/js/PTL.main.js public/js/PTL.prefs.js public/js/PTL.i18n.js -m -o dist/js/PTL.pre.js",
"build:post": "uglifyjs public/js/PTL.utilities.js public/js/PTL.tab.js public/js/PTL.feed.js public/js/PTL.dialog.js public/js/PTL.sync.js public/js/PTL.menu.js -m -o dist/js/PTL.post.js",
"build:pre": "uglifyjs public/js/PTL.main.js public/js/PTL.prefs.js public/js/PTL.i18n.js -m -o dist/js/PTL.pre.min.js",
"build:post": "uglifyjs public/js/PTL.utilities.js public/js/PTL.tab.js public/js/PTL.feed.js public/js/PTL.dialog.js public/js/PTL.sync.js public/js/PTL.menu.js -m -o dist/js/PTL.post.min.js",
"build:js": "mkdir -p dist/js && npm run build:pre && npm run build:post",
"watch:js": "onchange 'public/js/*.js' -- npm run build:js",
"postinstall": "npm run build:js && bower install"
......
......@@ -76,7 +76,15 @@
src: url('/static/font/BebasNeue.otf') format("opentype");
}
body {
color: var(--color-pri);
background-color: var(--color-oct);
font-family: Arial,Helvetica,sans-serif;
margin:0;
}
#noScript {
padding: 1em 0;
margin: 25% auto;
background: var(--ui-color-qua);
}
......@@ -103,17 +111,6 @@
font-family: fontello;
}
body {
background-color: var(--bg-color-ter);
font-family: Arial,Helvetica,sans-serif;
margin:0;
}
html,
body {
color: var(--color-pri);
}
h1,
h2,
h3,
......@@ -131,7 +128,7 @@ p,
.ui-dialog,
div.dialog {
line-height: 1.5em;
color: var(--color-pri);
color: var(--ui-color-pri);
}
ul {
......@@ -140,6 +137,21 @@ ul {
padding:0;
}
#noScript ul {
list-style-type: disc;
/* padding: .2em; */
}
#noScript h1 {
font-style: italic;
color: var(--ui-color-danger);
}
#noScript ul > li {
margin: .3em 0;
/* padding: .2em; */
}
a:link {
color: var(--color-pri);
text-decoration: none;
......@@ -153,7 +165,7 @@ li.error a:hover,
a:hover,
a:active,
i.feedItemSmallIcon:hover {
color: var(--ui-color-sec);
color: var(--color-sec);
}
i.feedItemSmallIcon {
......@@ -162,7 +174,7 @@ i.feedItemSmallIcon {
}
i.feedControl:hover {
color: var(--ui-color-sec);
color: var(--color-sec);
}
i.danger,
......@@ -182,7 +194,7 @@ i.dangerous:hover {
.mobHeader > .feedTitle > a.danger:hover,
.mobHeader > .feedTitle > a:hover {
color: var(--ui-color-sec);
color: var(--color-sec);
}
li.feedItem:not(.error) a {
......@@ -299,7 +311,7 @@ li.mobTab:first-child {
}
li.mobTab {
background-color: var(--bg-color-sec) !important;
background-color: var(--color-sep) !important;
}
p.dialog > a:link {
......@@ -336,7 +348,7 @@ div#sideMenu {
padding: 45px 0 0 0;
position: fixed;
top: 0;
transition: all 150ms ease-out;
transition: all .2s ease-out;
width: 275px;
z-index:11;
}
......@@ -684,42 +696,6 @@ div.testFlex {
margin-bottom:0;
}
/* Wait screen */
#waitScreen{
background-color: #7C818C;
}
#waitScreen > .wspinner {
width: 200px;
height: 200px;
margin: 30% auto;
background-color: #7395AE;
border-radius: 100%;
-webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
animation: sk-scaleout 1.0s infinite ease-in-out;
}
@-webkit-keyframes sk-scaleout {
0% { -webkit-transform: scale(0) }
100% {
-webkit-transform: scale(1.0);
opacity: 0;
}
}
@keyframes sk-scaleout {
0% {
-webkit-transform: scale(0);
transform: scale(0);
} 100% {
-webkit-transform: scale(1.0);
transform: scale(1.0);
opacity: 0;
}
}
#tabs {
white-space: nowrap;
overflow: hidden;
......@@ -794,33 +770,26 @@ li.mobTab,
ul.tabSort {
column-gap: .4em;
columns: var(--columns);
padding: 0 .2em .2em;
transition: all .5s ease-in-out;
padding: .4em .2em;
}
/* Feed */
li.feed {
font-family: -apple-system, BlinkMacSystemFont,
"Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans",
"Droid Sans", "Helvetica Neue", sans-serif;
/* font-size: 1.6rem; */
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-weight: 600 !important;
vertical-align:top;
margin: .4em 0 0 0;
display: inline-block;
margin: 0 0 .4em 0;
/* page-break-after: always; */
/* page-break-before: always; */
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
transition: all .2s linear;
}
.selected,
li.feed {
width: 100%;
min-height:20px !important;
width: 100%;
}
.feedBody {
......@@ -832,26 +801,23 @@ li.feed {
}
.truncate {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mobHeader {
/* min-height:20px; */
height: var(--var-header-height);
max-height: var(--var-header-height);
display: flex;
flex-direction:row;
/* align-content: stretch; */
height: var(--var-header-height);
max-height: var(--var-header-height);
padding:0;
}
.flexGrow {
flex-grow: 0 !important;
flex-shrink: 0 !important;
flex-basis: var(--var-controls-flex-basis) !important;
flex-basis: var(--var-controls-flex-basis);
flex-grow: 0;
flex-shrink: 0;
}
.open {
......@@ -859,8 +825,8 @@ li.feed {
}
.tabSort .ui-sortable-placeholder {
visibility: visible !important;
border: 3px dashed var(--ui-color-sec) !important;
visibility: visible;
outline: 3px dashed var(--color-sec) !important;
}
.mobHeader > .feedTitle {
......@@ -868,17 +834,17 @@ li.feed {
flex-basis: auto;
flex-grow: 4;
flex-shrink: 1;
font-family: BebasNeueRegular, Helvetica, Arial, sans-serif !important;
margin-left: var(--title-margin-left);
font-family: BebasNeueRegular, Helvetica, Arial, sans-serif;
font-size: var(--var-controls-font-size);
font-style: italic;
font-weight: normal;
margin-left: var(--title-margin-left);
}
.mobHeader > .feedHandle {
background-color: transparent;
border-left: 3px dotted var(--bg-color-ter);
border-right: 3px dotted var(--bg-color-ter);
border-left: 3px dotted var(--color-oct);
border-right: 3px dotted var(--color-oct);
cursor:move;
flex-basis: 4px;
flex-grow: 0;
......@@ -921,6 +887,11 @@ li.feed {
margin: 0 0 0 2px;
}
.feed * {
transition: all .1s linear;
}
.mobHeader > .feedToggle {
margin: 2px;
flex-basis: auto;
......@@ -967,12 +938,12 @@ li.ui-tabs-tab a:visited {
li.ui-tabs-active,
li.ui-state-hover:not(.ui-tabs-active),
div.ui-tabs-panel {
background-color: var(--bg-color-ter) !important;
background-color: var(--color-oct) !important;
}
li.ui-tabs-tab a.ui-tabs-anchor:hover,
li.ui-tabs-active a.ui-tabs-anchor:link {
color: var(--ui-color-sec) !important;
color: var(--color-sec) !important;
}
li.feedItem {
......@@ -988,55 +959,64 @@ li.feedItem {
word-wrap: break-word;
}
div.itemDiv img {
max-width:30%;
li.feedItem > div.itemDiv > a > img {
float:left;
margin: 0 .2rem .2rem 0; /* Some gutter */
margin: 0 .2rem .2rem 0;
max-width:30%;
}
div.itemDiv img.full {
li.feedItem > div.itemDiv > a > img.full {
min-width:100%;
}
table tr,
li.feedItem {
background-color: var(--bg-color-sec);
background-color: var(--color-sep);
}
table tr:nth-child(even),
li.feedItem:nth-child(even) {
background-color: var(--bg-color-qua);
background-color: var(--color-non);
}
table tr:nth-child(even),
li.feedItem:nth-child(even) {
background-color: var(--bg-color-qua);
background-color: var(--color-non);
}
table tr:hover,
li.feedItem:hover {
color: var(--bg-color-sec) !important;
background-color: var(--bg-color-pri) !important;
background-color: var(--color-sen) !important;
color: var(--color-sep) !important;
}
li.feed div.feedBody {
border-right: 1px solid var(--color-non);
border-bottom: 1px solid var(--color-non);
border-left: 1px solid var(--color-non);
}
li.feed:hover div.feedBody {
border-color: var(--color-den);
}
li.feedItem img:hover {
outline: 1px solid var(--ui-color-sec);
li.feedItem > div.itemDiv > a > img:hover {
outline: 1px solid var(--color-sec);
}
li.feed {
padding: 0;
transition: all .1s ease;
}
.mobHeader > .feedHandle:hover {
border-color: var(--ui-color-sec);
border-color: var(--color-sec);
}
@media (hover: none) {
a:active,
a:hover {
color: var(--color-link) !important;
color: var(--color-pri) !important;
}
li.feedItem:hover {
......@@ -1068,12 +1048,12 @@ div.introjs-helperLayer {
}
.mobHeader {
background-color: var(--bg-color-pri);
background-color: var(--color-sen);
color: var(--color-pri);
}
.fancybox-thumbs {
background-color: var(--bg-color-qua) !important;
background-color: var(--color-non) !important;
}
/* IntroJS (help tooltips) */
......@@ -1093,7 +1073,7 @@ div.introjs-helperLayer {
/* Gallery */
.fancybox-thumbs > ul > li::before {
border: 4px solid var(--ui-color-sec) !important;
border: 4px solid var(--color-sec) !important;
}
#remotestorage-widget > .rs-widget {
......@@ -1107,7 +1087,7 @@ div.introjs-helperLayer {
display:none;
position: fixed;
top: 0;
left: 275px;
left: 0;
width: 100%;
height: 100%;
z-index: 10;
......@@ -1261,6 +1241,20 @@ div#logoTitle > .logoTitle > a:hover {
}
/* Javascript */
#js {
background-color: var(--ui-color-qua);
}
#js h1 {
padding-top: 2em;
}
#js h1,
#js p {
margin-left: 40px;
}
table {
border-collapse: collapse;
width: 90vw;
......@@ -1279,16 +1273,3 @@ table th {
background-color: #4CAF50;
color: white;
}
#js {
background: var(--ui-color-qua);
}
#js h1 {
padding-top: 2em;
}
#js h1,
#js p {
margin-left: 40px;
}
:root {
--bg-color-pri: #C3DCD9;
--bg-color-sec: #eeeeee;
--bg-color-ter: #7C818C;
--bg-color-qua: #e3eff3;
--color-pri: #3C4440;
--color-sec: #dddddd;
--color-tri: #FFDC00;
--color-sec: #19B5FE;
--color-ter: #FFDC00;
--color-qua: #7395AE;
--color-qui: #B0C4DE; /* visited links */
--color-qui: #788780; /* visited links */
--color-sen: #C3DCD9;
--color-sep: #eeeeee;
--color-oct: #7C818C;
--color-non: #e3eff3;
--color-den: #94c2d1;
--color-danger: #660000;
--color-link: #3C4440;
--color-link-visited: #B0C4DE;
}
:root {
--bg-color-pri: #383C4A;
--bg-color-sec: #4B5162;
--bg-color-ter: #7C818C;
--bg-color-qua: #404552;
--bg-color-qui: #404552;
--color-pri: #ffffff;
--color-sec: #dddddd;
--color-sec: #FF4136;
--color-ter: #fdfae9;
--color-qua: #29323c;
--color-qui: #B0C4DE; /* visited links */
--color-sen: #383C4A;
--color-sep: #4B5162;
--color-oct: #7C818C;
--color-non: #404552;
--color-den: #5a6172;
--color-danger: #660000;
--color-link: #ffffff;
}
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
PTL.dialog = {
kill:function($dialog) {
$dialog.dialog('destroy');
......
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
PTL.feed = {
make:function($tab, url, type, limit, clickNew, progress) {
......@@ -38,7 +40,7 @@ PTL.feed = {
$feedIcon.click(function() {
$(this).toggleClass('down');
$(this).parent().parent().parent().children('div.feedBody').slideToggle(200);
$(this).parent().parent().parent().children('div.feedBody').slideToggle('slow');
});
$feedSelect.click(function() {
......
/*!
* @base: https://github.com/videojs/video.js
*
* @Source: cliplibrejs.dev.js
*
* @licstart The following is the entire license notice for the
* JavaScript code in this page.
*
* Copyleft 2017 Jesus Eduardo
*
* The JavaScript code in this page is free software: you can
* redistribute it and/or modify it under the terms of the GNU
* General Public License (GNU GPL) as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version. The code is distributed WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
*
* As additional permission under GNU GPL version 3 section 7, you
* may distribute non-source (e.g., minimized or compacted) forms of
* that code without the copy of the GNU GPL normally required by
* section 4, provided you include this license notice and a URL
* through which recipients can access the Corresponding Source.
*
* @licend The above is the entire license notice
* for the JavaScript code in this page.
*
*/
PTL.i18n = {
trans : function(term) {
......@@ -49,8 +78,13 @@ PTL.i18n.translations = {
"Slideshow speed" : { fr: "Vitesse du diaporama" , ja: "スライドショーのスピード", es: "Velocidad de la presentación" },
"Slide transition" : { fr: "Transition image" , ja: "画像の遷移", es: "Transición de imagen" },
"Help" : { fr: "Aide" , ja: "助けて", es: "Ayuda" },
"WtF" : { fr: "Heu" , ja: "一体", es: "Eh" },
"Pétrolette (really) needs your help" : { fr: "Pétrolette a (vraiment) besoin de votre aide" , ja: "Pétrolette(本当に)あなたの助けが必要です", es: "Pétrolette (realmente) necesita tu ayuda" },
"WtF?" : { fr: "Heu?" , ja: "ハァッ?", es: "Eh?" },
"JS Licences" : { fr: "Licences JS" , ja: "JSライセンス", es: "Licencias JS" },
"JavaScript licencing information" : { fr: "Informations de licence JavaScript" , ja: "JavaScriptのライセンス情報", es: "Información de licencia de JavaScript" },
"Send your love to Pétrolette" : { fr: "Aider Pétrolette" , ja: "Pétroletteにあなたの愛を送る", es: "Envíale tu amor a Pétrolette" },
"English" : { fr: "English" , ja: "English", es: "English" },
"Français" : { fr: "Français" , ja: "Français", es: "Français" },
......
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
var PTL = (function() {
return {
......
This diff is collapsed.
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
PTL.prefs = (function() {
var emptyTabList = [
{"name":"Group 1",
{"name":"News",
"feeds": [
{"url":"http://www.androidpolice.com/feed","type":"mixed","limit": 8},
{"url":"http://rss.nytimes.com/services/xml/rss/nyt/World.xml","type":"mixed","limit": 8},
{"url":"http://feeds.nature.com/nature/rss/current","type":"text","limit": 16},
{"url":"http://feeds.feedburner.com/hackaday/LgoM/","type":"mixed","limit": 16},
{"url":"http://createdigitalmusic.com/feed/","type":"mixed","limit": 16},
{"url":"https://www.nasa.gov/rss/dyn/lg_image_of_the_day.rss","type":"photo","limit": 4}
]
}
];
var newsTabList = [
{"name":"World",
"feeds": [
{"url":"http://feeds.bbci.co.uk/news/world/rss.xml","type":"mixed","limit":8},
{"url":"http://www.nytimes.com/services/xml/rss/nyt/World.xml","type":"mixed","limit": 4},
{"url":"http://feeds.reuters.com/Reuters/worldNews","type":"text","limit": 16},
{"url":"http://feeds.reuters.com/reuters/USVideoWorldNews","type":"photo","limit": 16},
{"url":"http://www.economist.com/sections/international/rss.xml","type":"text","limit": 8},
{"url":"https://www.reddit.com/.rss","type":"text","limit": 8}
]
},
{"name":"Europe",
"feeds": [
{"url":"http://www.economist.com/sections/europe/rss.xml", "type":"text", "limit": 12},
{"url":"https://feeds.feedburner.com/TechCrunch/","type":"mixed","limit": 8},
{"url":"http://xkcd.com/rss.xml","type":"photo","limit": 4},
{"url":"https://www.reddit.com/.rss","type":"text","limit": 8}
]
}
];
var miscTabList = [
{"name":"Tech",
"feeds": [
{"url":"https://feeds.feedburner.com/TechCrunch/","type":"mixed","limit": 8},
{"url":"http://feeds.reuters.com/reuters/technologyNews", "type":"text", "limit": 16},
{"url":"https://www.sciencedaily.com/rss/matter_energy/engineering.xml", "type":"mixed", "limit": 12},
{"url":"https://www.theengineer.co.uk/feed", "type":"mixed", "limit": 14},
{"url":"http://feed.cnet.com/feed/topics/tech-industry", "type":"mixed", "limit": 14},
{"url":"https://spectrum.ieee.org/rss/videos", "type":"mixed", "limit": 16}
]
},
{"name":"Computing",
{"name":"Comics",
"feeds": [
{"url":"http://feeds.reuters.com/reuters/technologyNews", "type":"text", "limit": 16},
{"url":"https://spectrum.ieee.org/rss/computing/fulltext", "type":"mixed", "limit": 12},
{"url":"https://www.technologyreview.com/c/computing/rss/", "type":"photo", "limit": 4},
{"url":"http://www.economist.com/blogs/gametheory/index.xml","type":"mixed","limit": 8},
{"url":"http://rss.slashdot.org/Slashdot/slashdot", "type":"mixed", "limit": 4},
{"url":"http://rss.slashdot.org/Slashdot/slashdot", "type":"mixed", "limit": 4},
{"url":"http://rss.slashdot.org/Slashdot/slashdot", "type":"mixed", "limit": 4},
{"url":"http://www.economist.com/topics/computer-technology/index.xml", "type":"text", "limit": 16}
{"url":"http://comicfeeds.chrisbenard.net/view/dilbert/default","type":"photo","limit": 8},
{"url":"http://xkcd.com/rss.xml","type":"photo","limit": 8},
{"url":"http://superphazed.tumblr.com/rss","type":"photo","limit": 8},
{"url":"http://phdcomics.com/gradfeed.php","type":"photo","limit": 4}
]
},
{"name":"Science",
{"name":"Movies",
"feeds": [
{"url":"http://feeds.bbci.co.uk/news/science_and_environment/rss.xml", "type":"mixed", "limit": 6},
{"url":"https://feeds.feedburner.com/TechCrunch/","type":"mixed","limit": 8},
{"url":"https://spectrum.ieee.org/rss/biomedical/fulltext","type":"mixed","limit": 4},
{"url":"https://www.technologyreview.com/topnews.rss","type":"mixed","limit": 4},
{"url":"https://www.technologyreview.com/c/biomedicine/rss/","type":"mixed","limit": 4},
{"url":"https://www.technologyreview.com/c/energy/rss/","type":"mixed","limit": 4},
{"url":"https://spectrum.ieee.org/rss/blog/energywise/fulltext","type":"mixed","limit": 4},
{"url":"https://spectrum.ieee.org/rss/blog/automaton/fulltext","type":"mixed","limit": 4},
{"url":"https://www.reddit.com/.rss","type":"text","limit": 8}
{"url":"https://thepiratebay.org/rss/top100/201","type":"text","limit": 18},
{"url":"http://www.newyorker.com/feed/culture/richard-brody","type":"mixed","limit": 8},
{"url":"http://www.metacritic.com/rss/features","type":"mixed","limit": 4}
]
},
{"name":"Comics",
{"name":"Group 3",
"feeds": [
{"url":"http://xkcd.com/rss.xml","type":"photo","limit": 8},
{"url":"http://thisisindexed.com/feed","type":"photo","limit": 8},
{"url":"http://what-if.xkcd.com/feed.atom","type":"photo","limit": 8},
{"url":"http://phdcomics.com/gradfeed.php","type":"photo","limit": 8},
{"url":"http://comicfeeds.chrisbenard.net/view/pennyarcade/default","type":"photo","limit": 8},
{"url":"http://comicfeeds.chrisbenard.net/view/dilbert/default","type":"photo","limit": 8}
{"url":"http://www.economist.com/sections/europe/rss.xml","type":"photo","limit": 8},
{"url":"https://feeds.feedburner.com/TechCrunch/","type":"photo","limit": 8},
{"url":"http://feeds.bbci.co.uk/news/technology/rss.xml?edition=uk","type":"mixed","limit": 8},
{"url":"https://hackernoon.com/feed","type":"mixed","limit": 8},
{"url":"https://www.reddit.com/.rss","type":"photo","limit": 4}
]
}
];
var defaults = {
'gallerySlideTransition': 'fade',
'gallerySlideshowSpeed': 3000,
'tabDropActivate': true,
'theme': 'day',
'theme': 'night',
'columns': 3,
'lang': 'en',
'explicitLang': false,
'tabs': JSON.stringify(emptyTabList)
};
var collections = {
'news': JSON.stringify(newsTabList),
'misc': JSON.stringify(miscTabList)
};
return {
collection:function(key) {
return collections[key];
},
isValidSourcesFile:function(sources) {
var isValid = false;