Commit c23fcbf6 authored by yPhil's avatar yPhil
Browse files

Sensible color variable scoping (yes, again)

parent 23c78cda
......@@ -314,6 +314,10 @@ ul {
list-style-type: none;
}
ul.dialogTextList {
list-style-type: lower-greek;
}
.ui-tab,
.ui-tabs,
ul,
......@@ -348,7 +352,7 @@ ul.help li {
}
.ui-tab.ui-state-default {
color: var(--color-non);
color: var(--color-pri);
background: var(--color-non);
border-right: 1px solid var(--color-sep) !important;
}
......@@ -1052,7 +1056,7 @@ ul.column div.buttons > button {
li.feed {
position: relative;
background: var(--color-qua);
/* background: var(--color-qua); */
/* z-index: 2; */
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
......@@ -1148,17 +1152,30 @@ li.feed {
color: var(--color-ui-rss) !important;
}
table tr {
padding: 0.5em;
}
li.feed-item {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
color: var(--color-pri);
font-size: 10pt;
hyphens: auto;
overflow-wrap: break-word;
padding: 0.2rem;
word-break: break-word;
word-wrap: break-word;
background-color: var(--color-sen);
}
table tr:nth-child(even),
li.feed-item:nth-child(even) {
background-color: var(--color-sep);
}
li.feed-item:hover {
background-color: var(--color-oct);
}
li.feed-item > div.itemDiv > a > .ptl-img {
......@@ -1187,37 +1204,18 @@ table {
white-space: nowrap;
}
table tr {
padding: 0.5em;
}
table tr:nth-child(even),
li.feed-item:nth-child(even) {
background-color: var(--color-sep);
}
li.feed-item:nth-child(even) {
background-color: var(--color-sen);
}
li.feed div.feed-body {
border-right: 1px solid var(--color-non);
border-bottom: 1px solid var(--color-non);
border-left: 1px solid var(--color-non);
border-right: 1px solid var(--color-oct);
border-bottom: 1px solid var(--color-oct);
border-left: 1px solid var(--color-oct);
}
li.feed:hover div.feed-body {
border-color: var(--color-sep);
}
li.feed-item:hover {
background-color: var(--color-oct);
/* color: var(--color-sep); */
border-color: var(--color-non);
}
a.feed-link:hover {
color: var(--color-sec) !important;
/* color: var(--color-sec) !important; */
}
.feed-header > .feed-handle:hover {
......
:root {
--color-pri: #2F365F;
--color-sec: #F0EFF4;
--color-ter: #333333;
--color-qua: #8CA9D3;
--color-qui: #788780; /* visited links */
--color-sen: #c2c8d6;
--color-sep: #8590ad;
--color-oct: #7C818C;
--color-non: #e3eff3;
--color-pri: #000000;
--color-sec: #3700B3;
--color-ter: #FFFFFF;
--color-qua: #FFFFFF;
--color-qui: #c2c8d6; /* visited links */
--color-sen: #FFFFFF;
--color-sep: #BBBBBB;
--color-oct: #DDDDDD;
--color-non: #6200EE;
--color-den: #94c2d1;
--color-danger: #660000;
--color-danger: #B00020;
}
......@@ -5,9 +5,9 @@
--color-qua: #29323c;
--color-qui: #B0C4DE; /* visited links */
--color-sen: #383C4A;
--color-sep: #4B5162;
--color-oct: #7C818C;
--color-non: #404552;
--color-sep: #424657;
--color-oct: #404552;
--color-non: #4d5266;
--color-den: #5a6172;
--color-danger: #660000;
}
......@@ -8,14 +8,18 @@ PTL.dialog = {
nagUser:function() {
var $dialogs = $('#dialogs'),
isOpen = $dialogs.length > 0;
isOpen = $dialogs.dialog('instance') === 'undefined';
if (isOpen) {
// PTL.dialog.kill($dialog);
PTL.util.console(PTL.tr('A window is already open, so not nagging'), 'warning');
} else {
$dialogs.val('');
$dialogs.load('/static/templates/dialogs.html #nagDialog', function() {
var $dialog = $(this);
......@@ -27,20 +31,23 @@ PTL.dialog = {
.text('🍏')))
.append($('<div>').attr('class', 'dialogText')
.append($('<h1>').text(PTL.tr('Pétrolette needs you')))
.append($('<h2>').text(PTL.tr('Help me pay the bills'))
.append($('<span>').attr('class', 'dialogHeaderIcon')
.text('💸')))
.append($('<p>').text(PTL.tr('Pétrolette is free software. However the development requires a lot of time and a lot of work.')))
.append($('<p>').text(PTL.tr('In order to keep developing Pétrolette with new features I need your help.')))
.append($('<p>').text(PTL.tr('Please consider to support the Pétrolette project by sending a donation. Even the smallest amount will help a lot.'))));
var $nag2 = $('<div>').attr('class', 'dialogContent')
.append($('<div>').attr('class', 'dialogImage')
.append($('<span>')
.attr('class', 'huge dialogImage')
.append($('<span>').attr('class', 'huge dialogImage')
.text('🌴')))
.append($('<div>').attr('class', 'dialogText')
.append($('<h1>').text(PTL.tr('Pétrolette is cool')))
.append($('<p>').text(PTL.tr('Pétrolette is free software. However the development requires a lot of time and a lot of work.')))
.append($('<p>').text(PTL.tr('In order to keep developing Pétrolette with new features I need your help.')))
.append($('<p>').text(PTL.tr('Please consider to support the Pétrolette project by sending a donation. Even the smallest amount will help a lot.'))));
.append($('<h2>').text(PTL.tr('Pétrolette is cool')).append($('<span>').text('🌤')))
.append($('<p>').text(PTL.tr('Pétrolette is designed from the outset to respect the user: It does not embed any tracker or statistical tool, and does not call on any online resource.')))
.append($('<p>').text(PTL.tr('Pétrolette is completely transparent, its source code is directly available.')))
.append($('<p>').text(PTL.tr('This site is just a test instance ; You can install Pétrolette on your own server and manage it on your own.'))));
var $nag3 = $('<div>').attr('class', 'dialogContent')
.append($('<div>').attr('class', 'dialogImage')
......@@ -49,7 +56,36 @@ PTL.dialog = {
.text('🌱')))
.append($('<div>').attr('class', 'dialogText')
.append($('<h1>').text(PTL.tr('Pétrolette is growing')))
.append($('<p>').text(PTL.tr('Pétrolette is free software. However the development requires a lot of time and a lot of work.')))
.append($('<h2>').text(PTL.tr('Early and often'))
.append($('<span>').attr('class', 'dialogHeaderIcon')
.text('')))
.append($('<p>').text(PTL.tr('A lot of exciting things are in the pipeline:'))
.append($('<ul>').attr('class', 'dialogTextList')
.append($('<li>')
.append($('<a>').attr('href', 'https://framagit.org/yphil/petrolette/-/issues/72')
.append($('<span>')
.attr('class', 'translate')
.text(PTL.tr('Dedicated feeds')))))
.append($('<li>')
.append($('<a>').attr('href', 'https://framagit.org/yphil/petrolette/-/issues/48')
.append($('<span>')
.attr('class', 'translate')
.text(PTL.tr('Even better mobile device experience')))))
.append($('<li>')
.append($('<a>').attr('href', 'https://framagit.org/yphil/petrolette/-/issues/59')
.append($('<span>')
.attr('class', 'translate')
.text(PTL.tr('HTTPS / SSL')))))
.append($('<li>')
.append($('<a>').attr('href', 'https://framagit.org/yphil/petrolette/-/issues/63')
.append($('<span>')
.attr('class', 'translate')
.text(PTL.tr('Asynchronous / infinite loading of feed items')))))
.append($('<li>')
.append($('<a>').attr('href', 'https://framagit.org/yphil/petrolette/-/issues/new?issue')
.append($('<span>')
.attr('class', 'translate')
.text(PTL.tr('Any improvement or proposal you have for Pétrolette')))))))
.append($('<p>').text(PTL.tr('In order to keep developing Pétrolette with new features I need your help.')))
.append($('<p>').text(PTL.tr('Please consider to support the Pétrolette project by sending a donation. Even the smallest amount will help a lot.'))));
......
......@@ -96,17 +96,37 @@ PTL.i18n.translations = {
"Support Pétrolette" : { fr: "Soutenir Pétrolette" , ja: "ペトロレットのサポート", es: "Soporte Pétrolette" },
"Pétrolette needs you" : { fr: "Pétrolette a besoin de vous" , ja: "ペトロレットはあなたを必要としています", es: "Pétrolette te necesita" },
"Help me pay the bills" : { fr: "Aide-moi à payer les factures" , ja: "手形を支払うのを手伝ってください", es: "Ayúdame a pagar las facturas" },
"Pétrolette is free software. However the development requires a lot of time and a lot of work." : { fr: "Pétrolette est un logiciel libre. Cependant, le développement demande beaucoup de temps et beaucoup de travail." , ja: "Pétroletteはフリーソフトウェアです。 ただし、開発には多くの時間と作業が必要です。", es: "Pétrolette es un software gratuito. Sin embargo, el desarrollo requiere mucho tiempo y mucho trabajo." },
"In order to keep developing Pétrolette with new features I need your help." : { fr: "Afin de continuer à développer Pétrolette avec de nouvelles fonctionnalités, j'ai besoin de votre aide." , ja: "新しい機能を備えたペトロレットを開発し続けるために、私はあなたの助けが必要です。", es: "Para seguir desarrollando Pétrolette con nuevas funciones, necesito su ayuda." },
"Please consider to support the Pétrolette project by sending a donation. Even the smallest amount will help a lot." : { fr: "Pensez à soutenir le projet Pétrolette en envoyant un don. Même la plus petite quantité aidera beaucoup." , ja: "寄付を送って、ペトロレットプロジェクトを支援することを検討してください。 少量でも大いに役立ちます。", es: "Considere apoyar el proyecto Pétrolette enviando una donación. Incluso la cantidad más pequeña ayudará mucho." },
"Pétrolette is cool" : { fr: "Pétrolette est cool" , ja: "「ペトロレット」はかっこいい", es: "Pétrolette es genial" },
"Free as the wind" : { fr: "Libre comme l'air" , ja: "風のように自由", es: "Libre como el viento" },
"Pétrolette is designed from the outset to respect the user: It does not embed any tracker or statistical tool, and does not call on any online resource." : { fr: "Pétrolette est conçu dés le départ pour réspecter l'utilisateur : Il n'embarque aucun pisteur ni outil de statistique, et ne fait appel à aucun ressource en ligne." , ja: "Pétroletteは最初からユーザーを尊重するように設計されています。トラッカーや統計ツールを組み込んでおらず、オンラインリソースを必要としません。", es: "Pétrolette está diseñada desde el principio para respetar al usuario: no incorpora ningún rastreador o herramienta estadística, y no recurre a ningún recurso en línea." },
"Pétrolette is completely transparent, its source code is directly available." : { fr: "Pétrolette est totalement transparent, son code source est directement disponible." , ja: "Pétroletteは完全に透過的であり、そのソースコードは直接入手できます。", es: "Pétrolette es completamente transparente, su código fuente está disponible directamente." },
"This site is just a test instance ; You can install Pétrolette on your own server and manage it on your own." : { fr: "Ce site n'est qu'une instance de test ; vous pouvez installer Pétrolette sur votre propre serveur et le gérer vous-même." , ja: "このサイトは単なるテストインスタンスです。 Pétroletteを自分のサーバーにインストールして、自分で管理することができます。", es: "Este sitio es solo una instancia de prueba; puede instalar Pétrolette en su propio servidor y administrarlo por su cuenta." },
"In order to keep developing Pétrolette with new features I need your help." : { fr: "Afin de continuer à développer Pétrolette avec de nouvelles fonctionnalités, j'ai besoin de votre aide." , ja: "新しい機能を備えたペトロレットを開発し続けるために、私はあなたの助けが必要です。", es: "Para seguir desarrollando Pétrolette con nuevas funciones, necesito su ayuda." },
"Please consider to support the Pétrolette project by sending a donation. Even the smallest amount will help a lot." : { fr: "Pensez à soutenir le projet Pétrolette en envoyant un don. Même la plus petite quantité aidera beaucoup." , ja: "寄付を送って、ペトロレットプロジェクトを支援することを検討してください。 少量でも大いに役立ちます", es: "Considere apoyar el proyecto Pétrolette enviando una donación. Incluso la cantidad más pequeña ayudará mucho." },
"Pétrolette is growing" : { fr: "Pétrolette grandit" , ja: "ペトロレットは成長しています", es: "Pétrolette está creciendo" },
"A lot of exciting things are in the pipeline:" : { fr: "Beaucoup de choses passionnantes sont en préparation:" , ja: "多くのエキサイティングなことがパイプラインにあります。", es: "Hay muchas cosas interesantes en proceso:" },
"Pétrolette needs you" : { fr: "Pétrolette a besoin de vous" , ja: "ペトロレットはあなたを必要としています", es: "Pétrolette te necesita" },
"Dedicated feeds" : { fr: "Flux dédiés" , ja: "専用フィード", es: "Fuentes dedicados" },
"Even better mobile device experience" : { fr: "Expérience mobile encore meilleure" , ja: "さらに優れたモバイルデバイスエクスペリエンス", es: "Experiencia de dispositivo móvil aún mejor" },
"Asynchronous / infinite loading of feed items" : { fr: "Chargement asynchrone / infini des éléments de flux" , ja: "フィードアイテムの非同期/無限ロード", es: "Carga asincrónica / infinita de elementos del fuente" },
"Any improvement or proposal you have for Pétrolette" : { fr: "Toute amélioration ou proposition que vous avez pour Pétrolette" , ja: "Pétroletteの改善点や提案", es: "Cualquier mejora o propuesta que tengas para Pétrolette" },
"Early and often" : { fr: "Tôt et souvent" , ja: "早くそして頻繁に", es: "Temprano y a menudo" },
"Full weather report" : { fr: "Bulletin météo complet" , ja: "完全な天気予報", es: "Informe meteorológico completo" },
"Search prefix" : { fr: "Préfixe de recherche" , ja: "検索プレフィックス", es: "Prefijo de búsqueda" },
......@@ -132,9 +152,6 @@ PTL.i18n.translations = {
"Open" : { fr: "Ouvrir" , ja: "負荷", es: "Carga" },
"Save" : { fr: "Sauver" , ja: "セーブ", es: "Salvar" },
"Open" : { fr: "Ouvrir" , ja: "インポート", es: "Importar" },
"Save" : { fr: "Sauver" , ja: "輸出する", es: "Exportar" },
"Rename Group" : { fr: "Groupe: Renommer" , ja: "名前の変更タブ", es: "Cambiar el nombre de la grupo" },
"Add" : { fr: "Ajouter" , ja: "追加", es: "Añadir" },
"Add feed" : { fr: "Ajouter flux" , ja: "ソースを追加", es: "Agregue fuente" },
......
......@@ -8,6 +8,8 @@ var PTL = (function() {
language: 'en',
start : function() {
PTL.util.console(PTL.tr('Pétrolette starting up OK'), 'success');
var $menu = $('nav#sideMenu'),
$overlay = $('#overlay'),
$feedCodeButton = $('button#feedCode'),
......@@ -56,7 +58,7 @@ var PTL = (function() {
$('body').on('click','.help-button', function() {
// PTL.dialog.help();
PTL.dialog.nagUser();
PTL.util.nagUser();
});
$('body').on('click','.new-feed-button', function() {
......
......@@ -86,8 +86,6 @@ PTL.tab = {
.button();
$('a.rs-help').text(PTL.tr(' More info'));
PTL.util.console(PTL.tr('Pétrolette starting up OK'), 'success');
if (!feeds || feeds.length <= 0) {
PTL.util.console(PTL.tr('No feeds found'), 'warning');
feeds = ['empty'];
......
......@@ -3,17 +3,17 @@
PTL.util = {
nagUser:function() {
PTL.util.console(PTL.tr('Pétrolette needs you'), 'success');
var nextNag = PTL.prefs.readConfig('nextNag');
const dateNow = Date.now();
PTL.util.console(PTL.tr('Pétrolette needs you, nextNag is ' + nextNag), 'success');
// PTL.dialog.nagUser();
if (nextNag === 0) {
nextNag = dateNow;
console.log('dateNow: %s (%s)', dateNow);
PTL.prefs.writeConfig('nextNag', dateNow);
PTL.dialog.nagUser();
return;
console.log('dateNow: %s (%s)', dateNow);
PTL.prefs.writeConfig('nextNag', dateNow + 300000);
}
if (dateNow > nextNag) {
......
Markdown is supported
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