mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Update profile embeds, filter sensitive posts
This commit is contained in:
parent
a1e162f095
commit
ede5ec3bf4
1 changed files with 75 additions and 74 deletions
|
@ -16,8 +16,8 @@
|
|||
<meta name="medium" content="image">
|
||||
<meta name="theme-color" content="#10c5f8">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link rel="shortcut icon" type="image/png" href="/img/favicon.png?v=2">
|
||||
<link rel="apple-touch-icon" type="image/png" href="/img/favicon.png?v=2">
|
||||
<link rel="shortcut icon" type="image/png" href="{{url('/img/favicon.png?v=2')}}">
|
||||
<link rel="apple-touch-icon" type="image/png" href="{{url('/img/favicon.png?v=2')}}">
|
||||
<link href="{{ mix('css/app.css') }}" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
body.embed-card {
|
||||
|
@ -30,7 +30,7 @@
|
|||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-white">
|
||||
<div class="embed-card">
|
||||
|
@ -46,8 +46,8 @@
|
|||
<a class="small font-weight-bold text-muted pr-1" href="{{config('app.url')}}" target="_blank">{{config('pixelfed.domain.app')}}</a>
|
||||
<img src="/img/pixelfed-icon-color.svg" width="26px">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body pb-1">
|
||||
</div>
|
||||
<div class="card-body pb-1">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="text-center">
|
||||
<p class="mb-0 font-weight-bold prettyCount" data-count="{{$profile['statuses_count']}}"></p>
|
||||
|
@ -60,39 +60,40 @@
|
|||
<div class="text-center">
|
||||
<p class="mb-0"><a href="/i/intent/follow?user={{$profile['username']}}" class="btn btn-primary btn-sm py-1 px-4 text-uppercase font-weight-bold" target="_blank">Follow</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-4 mb-1 embed-row"></div>
|
||||
</div>
|
||||
<div class="card-footer bg-white">
|
||||
</div>
|
||||
<div class="row mt-4 mb-1 embed-row"></div>
|
||||
</div>
|
||||
<div class="card-footer bg-white">
|
||||
<p class="text-center mb-0">
|
||||
<a href="{{$profile['url']}}" class="font-weight-bold" target="_blank">View More Posts</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="{{mix('js/manifest.js')}}"></script>
|
||||
<script type="text/javascript" src="{{mix('js/vendor.js')}}"></script>
|
||||
<script type="text/javascript" src="{{mix('js/app.js')}}"></script>
|
||||
<script type="text/javascript">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="{{mix('js/manifest.js')}}"></script>
|
||||
<script type="text/javascript" src="{{mix('js/vendor.js')}}"></script>
|
||||
<script type="text/javascript" src="{{mix('js/app.js')}}"></script>
|
||||
<script type="text/javascript">
|
||||
window.addEventListener("message", e=>{const t=e.data||{};});
|
||||
</script>
|
||||
<script type="text/javascript">document.querySelectorAll('.caption-container a').forEach(function(i) {i.setAttribute('target', '_blank');});</script>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<script type="text/javascript">document.querySelectorAll('.caption-container a').forEach(function(i) {i.setAttribute('target', '_blank');});</script>
|
||||
<script type="text/javascript">
|
||||
document.querySelectorAll('.prettyCount').forEach(function(i) {
|
||||
i.innerText = App.util.format.count(i.getAttribute('data-count'));
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
axios.get('/api/pixelfed/v1/accounts/{{$profile['id']}}/statuses', {
|
||||
params: {
|
||||
only_media: true,
|
||||
limit: 20
|
||||
limit: 24
|
||||
}
|
||||
})
|
||||
})
|
||||
.then(res => {
|
||||
let parent = $('.embed-row');
|
||||
res.data
|
||||
.filter(res => res.pf_type == 'photo')
|
||||
.filter(res => !res.sensitive)
|
||||
.slice(0, 9)
|
||||
.forEach(post => {
|
||||
let el = `<div class="col-4 mt-2 px-0">
|
||||
|
@ -105,13 +106,13 @@
|
|||
</div>`;
|
||||
parent.append(el);
|
||||
})
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
window.parent.postMessage({type:"setHeight",id:0,height:document.getElementsByTagName("html")[0].scrollHeight},"*");
|
||||
setTimeout(() => {
|
||||
window.parent.postMessage({type:"setHeight",id:0,height:document.getElementsByTagName("html")[0].scrollHeight},"*");
|
||||
}, 5000);
|
||||
})
|
||||
</script>
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue