Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yPhil
Pétrolette
Commits
759b52cc
Commit
759b52cc
authored
Mar 02, 2021
by
yPhil
Browse files
Div OK (but height not saved yet) lazy loading OK
parent
f67f0d17
Changes
5
Hide whitespace changes
Inline
Side-by-side
bower.json
View file @
759b52cc
...
...
@@ -25,7 +25,8 @@
"remotestorage"
:
"rs#1.1.0"
,
"rs-widget"
:
"1.3.0"
,
"bLazy"
:
"blazy#^1.8.2"
,
"DOMPurify"
:
"dompurify#^2.2.6"
"DOMPurify"
:
"dompurify#^2.2.6"
,
"responsively-lazy"
:
"^2.0.2"
},
"resolutions"
:
{
"intro.js"
:
"^3.3.1"
...
...
public/css/petrolette.css
View file @
759b52cc
...
...
@@ -1070,10 +1070,6 @@ li.feed.selected {
opacity
:
0.6
;
}
.feed-body
{
margin
:
0
;
}
.feed-header
{
display
:
flex
;
flex-direction
:
row
;
...
...
@@ -1190,9 +1186,17 @@ table {
}
li
.feed
div
.feed-body
{
border-right
:
1px
solid
var
(
--color-bg1
);
border-bottom
:
1px
solid
var
(
--color-bg2
);
border-left
:
1px
solid
var
(
--color-bg1
);
border-right
:
1px
solid
var
(
--color-bg1
);
margin
:
0
;
height
:
150px
;
overflow-y
:
auto
;
/* resize: vertical; */
}
.folded
{
height
:
0
!important
;
}
li
.feed
:hover
div
.feed-body
{
...
...
public/js/PTL.dialog.js
View file @
759b52cc
...
...
@@ -240,7 +240,7 @@ PTL.dialog = {
.
attr
(
'
id
'
,
'
helpMiniButton
'
)
.
attr
(
'
title
'
,
PTL
.
tr
(
'
How does it work?
'
))
.
attr
(
'
type
'
,
'
button
'
)
.
text
(
PTL
.
tr
(
'
Take the tour
'
))
.
text
(
PTL
.
tr
(
'
Help
'
))
.
on
(
'
click
'
,
function
()
{
PTL
.
util
.
help
(
'
dialog
'
);
}).
appendTo
(
$dialog
.
parent
().
find
(
'
.ui-dialog-titlebar
'
));
...
...
public/js/PTL.feed.js
View file @
759b52cc
...
...
@@ -24,7 +24,7 @@ PTL.feed = {
$
(
this
).
removeClass
(
'
fold
'
)
.
parent
().
parent
().
parent
()
.
children
(
'
div.feed-body
'
)
.
slideUp
(
350
);
.
addClass
(
'
folded
'
);
$feedControls
.
data
(
'
status
'
,
'
off
'
);
$reloadIcon
.
removeClass
(
'
icon-refresh
'
)
.
addClass
(
'
icon-pin
'
);
...
...
@@ -32,7 +32,7 @@ PTL.feed = {
$
(
this
).
addClass
(
'
fold
'
)
.
parent
().
parent
().
parent
()
.
children
(
'
div.feed-body
'
)
.
slideDown
(
350
);
.
removeClass
(
'
folded
'
);
$feedControls
.
data
(
'
status
'
,
'
on
'
);
$reloadIcon
.
removeClass
(
'
icon-pin
'
)
.
addClass
(
'
icon-refresh
'
);
...
...
@@ -200,7 +200,6 @@ PTL.feed = {
if
(
$dataStore
.
data
(
'
status
'
)
==
'
on
'
)
{
$feedIcon
.
removeClass
(
'
fold
'
);
$refreshButton
.
addClass
(
'
spin
'
);
$feedLink
.
removeClass
(
'
danger
'
);
...
...
@@ -447,10 +446,12 @@ PTL.feed = {
.
attr
(
'
data-caption
'
,
'
<a href="
'
+
item
.
link
+
'
" class="ui-button ui-corner-all" title="
'
+
$summary
.
trim
()
+
'
">
'
+
item
.
title
+
'
</a>
'
);
$image
=
$
(
'
<img>
'
)
.
attr
(
'
src
'
,
imageUrl
)
.
attr
(
'
src
'
,
'
/static/images/loading.jpg
'
)
.
attr
(
'
data-srcset
'
,
imageUrl
)
.
attr
(
'
srcset
'
,
'
data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
'
)
.
attr
(
'
title
'
,
$summary
.
trim
())
.
attr
(
'
alt
'
,
item
[
'
mastodon:scope
'
]
?
$summary
.
trim
()
:
item
.
title
)
.
attr
(
'
class
'
,
'
ptl-img
b
-lazy
'
)
.
attr
(
'
class
'
,
'
ptl-img
responsively
-lazy
'
)
.
appendTo
(
$imageLink
);
if
(
PTL
.
prefs
.
readConfig
(
'
brokenImages
'
)
===
'
hide
'
)
$image
.
attr
(
'
onerror
'
,
"
this.style.display='none'
"
);
...
...
@@ -479,6 +480,12 @@ PTL.feed = {
}
else
{
$dataStore
.
parent
()
.
parent
()
.
children
(
'
div.feed-body
'
)
.
addClass
(
'
folded
'
);
const
u
=
new
URL
(
feedUrl
);
$feedLink
.
text
(
u
.
hostname
.
replace
(
/^www./
,
''
)
+
u
.
pathname
)
...
...
views/index.html
View file @
759b52cc
...
...
@@ -65,6 +65,7 @@
<link
rel=
"stylesheet"
href=
"/static/css/fontello.css"
>
<link
rel=
"stylesheet"
href=
"/bower/fancybox/dist/jquery.fancybox.min.css"
/>
<link
rel=
"stylesheet"
href=
"/bower/intro.js/dist/minified/introjs.min.css"
/>
<link
rel=
"stylesheet"
href=
"/bower/responsively-lazy/responsivelyLazy.min.css"
/>
<link
rel=
"stylesheet"
href=
"/static/css/petrolette.css"
...
...
@@ -512,6 +513,6 @@
</button>
</div>
<script
async
src=
" /bower/responsively-lazy/responsivelyLazy.min.js"
></script>
</body>
</html>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment