Commit bf13c737 authored by yPhil's avatar yPhil

Merge branch 'q-string' into dev

parents 5facd889 6362b0eb
......@@ -9,6 +9,7 @@ app.engine('html', require('ejs').renderFile);
app.set('view engine', 'html');
app.use('/static', express.static(__dirname + '/public'));
app.use('/dist', express.static(__dirname + '/dist'));
app.use('/tmp', express.static(__dirname + '/tmp'));
app.use('/bower', express.static(__dirname + '/bower_components'));
......
This diff is collapsed.
......@@ -12,14 +12,17 @@
"url": "https://framagit.org/yphil/petrolette"
},
"scripts": {
"start": "pm2 start bin/www --watch --log-date-format='YYYY-MM-DD HH:mm Z' --name petrolette",
"stop": "pm2 stop petrolette",
"postinstall": "bower install"
"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: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:pre && npm run build:post && bower install"
},
"devDependencies": {
"intro.js": "2.8.0-alpha.1",
"mocha": "4.1.0",
"should": "13.2.0"
"onchange": "3.3.0",
"uglify-es": "3.3.9"
},
"dependencies": {
"bower": "1.8.2",
......
......@@ -979,7 +979,6 @@ li.feedItem {
-moz-hyphens: auto;
-ms-hyphens: auto;
-webkit-hyphens: auto;
background-color: var(--bg-color-sec);
color: var(--color-pri);
font-size: 10pt;
hyphens: auto;
......@@ -999,10 +998,22 @@ div.itemDiv img.full {
min-width:100%;
}
table tr,
li.feedItem {
background-color: var(--bg-color-sec);
}
table tr:nth-child(even),
li.feedItem:nth-child(even) {
background-color: var(--bg-color-qua);
}
table tr:nth-child(even),
li.feedItem:nth-child(even) {
background-color: var(--bg-color-qua);
}
table tr:hover,
li.feedItem:hover {
color: var(--bg-color-sec) !important;
background-color: var(--bg-color-pri) !important;
......@@ -1152,12 +1163,12 @@ div.introjs-helperLayer {
color: var(--ui-color-sec);
}
.topnav > div#logoTitle {
div#logoTitle {
display:flex;
float: right;
}
.topnav i.icon-petrolette {
i.icon-petrolette {
display:block;
cursor: pointer;
font-size:24pt;
......@@ -1166,24 +1177,24 @@ div.introjs-helperLayer {
transition: all .3s linear;
}
.topnav i.icon-petrolette:hover,
.topnav i.icon-petrolette.writing {
i.icon-petrolette:hover,
i.icon-petrolette.writing {
color: var(--ui-color-sec);
}
.topnav i.icon-petrolette:before {
i.icon-petrolette:before {
font-style:italic !important;
}
.topnav i.icon-petrolette:hover {
i.icon-petrolette:hover {
font-style:normal !important;
}
.topnav > div#logoTitle > div {
div#logoTitle > div {
flex: 1 0 ;
}
.topnav > div#logoTitle > .logoTitle {
div#logoTitle > .logoTitle {
color: var(--ui-color-pri);
display:var(--logo-display);
font-family: LobsterRegular, Helvetica, Arial, sans-serif;
......@@ -1191,13 +1202,13 @@ div.introjs-helperLayer {
margin: -6px 0 0 0;
}
.topnav > div#logoTitle > .logoTitle > a:link,
.topnav > div#logoTitle > .logoTitle > a:visited {
div#logoTitle > .logoTitle > a:link,
div#logoTitle > .logoTitle > a:visited {
color: var(--ui-color-pri);
transition: all 0.3s linear;
}
.topnav > div#logoTitle > .logoTitle > a:hover {
div#logoTitle > .logoTitle > a:hover {
color: var(--ui-color-sec) !important;
}
......@@ -1248,3 +1259,36 @@ div.introjs-helperLayer {
color: var(--ui-color-sec);
top: 5px;
}
/* Javascript */
table {
border-collapse: collapse;
width: 90vw;
margin: auto;
}
table td, table th {
border: 1px solid #ddd;
padding: 8px;
}
table th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}
#js {
background: var(--ui-color-qua);
}
#js h1 {
padding-top: 2em;
}
#js h1,
#js p {
margin-left: 40px;
}
public/images/petrolette.png

10.7 KB | W: | H:

public/images/petrolette.png

868 Bytes | W: | H:

public/images/petrolette.png
public/images/petrolette.png
public/images/petrolette.png
public/images/petrolette.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -206,7 +206,7 @@ PTL.i18n.translations = {
"When you click an image, you can view it in a gallery, and start a slideshow." : { fr: "Un clic sur une image l'affiche dans une galerie." , ja: "イメージをクリックすると、ギャラリーでそのイメージを表示し、スライドショーを開始できます", es: "Cuando hace clic en una imagen, puede verla en una galería." },
"Help Pétrolette according to your spiritual mood of the day." : { fr: "Aider (en vrai) Pétrolette." , ja: "あなたの精神的な日の気分に応じてPétroletteを助けてください", es: "Ayuda a Pétrolette de acuerdo con tu estado de ánimo espiritual del día." },
"This file is bad" : { fr: "Ce fichier est chelou" , ja: "このファイルは悪いです", es: "Este archivo es malo" },
"This file is bad [%1]" : { fr: "Ce fichier est chelou [%1]" , ja: "[%1]このファイルは悪いです", es: "Este archivo es malo [%1]" },
"Loading of [%1] OK" : { fr: "Lecture de [%1] OK" , ja: "[%1]をロードしました。OK", es: "Cargado [%1] bien" },
"Erase all" : { fr: "Tout effacer" , ja: "すべてを消去する", es: "Borrar todo" },
......
......@@ -43,7 +43,6 @@ PTL.menu = {
$newSourceButton.click(function() {
var $openGroupPanel = $($('.ui-tabs-active').find('a').attr('href')).find('.tabSort');
console.log('$openGroupPanel: ', $openGroupPanel.attr('class'));
$overlay.removeClass('visible');
$menu.removeClass('expanded');
PTL.feed.make($openGroupPanel, 'New Feed', 'mixed', 8, true);
......@@ -114,7 +113,6 @@ PTL.menu = {
.checkboxradio('refresh');
$('.themeSwitcher').change(function() {
console.log('Theme: ' + '/static/css/themes/' + $(this).attr('value') + '.css');
$("#mobStyle").attr({href : '/static/css/themes/' + $(this).attr('value') + '.css'});
......@@ -130,7 +128,6 @@ PTL.menu = {
$.fancybox.defaults.slideShow.speed = gallerySlideshowSpeed;
$menu.find('select#gallerySlideTransition').change(function() {
console.log('New FX: %s', $(this).val());
$.fancybox.defaults.transitionEffect = $(this).val();
PTL.prefs.writeConfig('gallerySlideTransition', $(this).val());
});
......@@ -228,14 +225,14 @@ PTL.menu = {
if (isJsonString(y)) {
p = JSON.parse(y);
} else {
console.error('Pétrolette | ' + PTL.tr('This file is bad'));
console.error('Pétrolette | ' + PTL.tr('This file is bad [%1]', f.name));
}
if (p && isOk(p) === true){
console.info('Pétrolette | ' + PTL.tr('Loading of [%s] OK', f.name));
console.info('Pétrolette | ' + PTL.tr('Loading of [%1] OK', f.name));
PTL.tab.populate(p, true);
} else {
console.error('Pétrolette | ' + PTL.tr('This file is bad'));
console.error('Pétrolette | ' + PTL.tr('This file is bad [%1]', f.name));
}
};
......
......@@ -221,4 +221,6 @@
</fieldset>
<a href="/about/javascript" data-jslicense="1">JavaScript license information</a>
</form>
......@@ -11,6 +11,10 @@ router.get('/', function(req, res) {
res.render('index', {qstring:req.query.source});
});
router.get('/about/javascript', function(req, res) {
res.render('javascript');
});
router.use(function(req,res,next){
var _send = res.send;
var sent = false;
......
......@@ -41,9 +41,7 @@
<script src="/bower/remotestorage/release/remotestorage.js"></script>
<script src="/bower/rs-widget/build/widget.js"></script>
<script src="/static/lib/js/PTL.main.js"></script>
<script src="/static/lib/js/PTL.prefs.js"></script>
<script src="/static/lib/js/PTL.i18n.js"></script>
<script src="/dist/js/PTL.pre.js"></script>
<script>
......@@ -62,9 +60,7 @@
<i class="fontello"></i>
<i class="logoTitle">.</i>
<i class="feedTitle">.</i>
<i class="feedIcon"></i>
<i class="ui-icon"></i>
<i class="feedToggleArrow"></i>
</div>
<header></header>
......@@ -90,12 +86,7 @@
</span>
</footer>
<script src="/static/lib/js/PTL.utilities.js"></script>
<script src="/static/lib/js/PTL.tab.js"></script>
<script src="/static/lib/js/PTL.feed.js"></script>
<script src="/static/lib/js/PTL.dialog.js"></script>
<script src="/static/lib/js/PTL.sync.js"></script>
<script src="/static/lib/js/PTL.menu.js"></script>
<script src="/dist/js/PTL.post.js"></script>
<script>
......@@ -107,16 +98,8 @@
setTimeout(
function() {
PTL.tab.init(qstring);
// if (qstring) {
// var $openGroupPanel = $('#sortable1');
// console.log('qstring: %s, $openGroupPanel: ', qstring, $openGroupPanel.get())
// }
}, 500);
</script>
</body>
......
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