move jq/cash to _common_libs template partial
This commit is contained in:
parent
bb744df727
commit
efd450e6b5
34 changed files with 121 additions and 167 deletions
|
@ -202,7 +202,12 @@ MEDIA_URL = '/media/'
|
|||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
|
||||
|
||||
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
|
||||
SITE_INFO = {'site_name': 'NiceDB', 'support_link': 'https://github.com/doubaniux/boofilsic/issues', 'version_hash': current_commit_hash(PROJECT_ROOT)}
|
||||
SITE_INFO = {
|
||||
'site_name': 'NeoDB', 'support_link': 'https://mastodon.social/@neodb',
|
||||
'version_hash': current_commit_hash(PROJECT_ROOT),
|
||||
'settings_module': os.getenv('DJANGO_SETTINGS_MODULE'),
|
||||
'sentry_dsn': None,
|
||||
}
|
||||
|
||||
# Mastodon configs
|
||||
CLIENT_NAME = 'NiceDB'
|
||||
|
|
|
@ -26,16 +26,13 @@
|
|||
{% if book.isbn %}
|
||||
<meta property="og:book:isbn" content="{{ book.isbn }}">
|
||||
{% endif %}
|
||||
|
||||
|
||||
<title>{{ site_name }} - {% trans '书籍详情' %} | {{ book.title }}</title>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="{% static 'lib/js/hyperscript-0.9.5.min.js' %}"></script>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/htmx/1.8.0/htmx.min.js"></script>
|
||||
|
||||
{% include "partial/_common_libs.html" with jquery=1 %}
|
||||
|
||||
<script src="{% static 'lib/js/rating-star.js' %}"></script>
|
||||
<script src="{% static 'js/detail.js' %}"></script>
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.min.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/rating-star.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/neo.css' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -19,15 +19,13 @@
|
|||
<meta property="og:article:author" content="{{ collection.owner.username }}">
|
||||
<meta property="og:url" content="{{ request.build_absolute_uri }}">
|
||||
<meta property="og:image" content="{{ collection.cover|thumb:'normal' }}">
|
||||
|
||||
<title>{{ site_name }} {% trans '收藏单' %} - {{ collection.title }}</title>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
|
||||
{% include "partial/_common_libs.html" with jquery=1 %}
|
||||
|
||||
<script src="{% static 'lib/js/rating-star.js' %}"></script>
|
||||
<script src="{% static 'js/rating-star-readonly.js' %}"></script>
|
||||
<link rel="stylesheet" href="{% static 'lib/css/rating-star.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.min.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/neo.css' %}">
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/htmx/1.8.0/htmx.min.js"></script>
|
||||
<script src="{% static 'lib/js/hyperscript-0.9.5.min.js' %}"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -3,7 +3,7 @@ $(document).ready( function() {
|
|||
$(".markdownx-preview").hide();
|
||||
$(".markdownx textarea").attr("placeholder", "从剪贴板粘贴或者拖拽文件至编辑框即可插入图片");
|
||||
|
||||
$(".review-form__preview-button").click(function() {
|
||||
$(".review-form__preview-button").on('click', function() {
|
||||
if ($(".markdownx-preview").is(":visible")) {
|
||||
$(".review-form__preview-button").text("预览");
|
||||
$(".markdownx-preview").hide();
|
||||
|
|
|
@ -7,7 +7,7 @@ $(document).ready( function() {
|
|||
|
||||
// pop up new rating modal
|
||||
$("#addMarkPanel button").each(function() {
|
||||
$(this).click(function(e) {
|
||||
$(this).on('click', function(e) {
|
||||
e.preventDefault();
|
||||
let title = $(this).text().trim();
|
||||
$(".mark-modal__title").text(title);
|
||||
|
@ -29,7 +29,7 @@ $(document).ready( function() {
|
|||
})
|
||||
|
||||
// pop up modify mark modal
|
||||
$(".mark-panel a.edit").click(function(e) {
|
||||
$(".mark-panel a.edit").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
let title = $(".mark-panel__status").text().trim();
|
||||
$(".mark-modal__title").text(title);
|
||||
|
@ -79,7 +79,7 @@ $(document).ready( function() {
|
|||
if ($("#statusSelection input[type='radio']:checked").val() == WISH_CODE) {
|
||||
$(".mark-modal .rating-star-edit").hide();
|
||||
}
|
||||
$("#statusSelection input[type='radio']").click(function() {
|
||||
$("#statusSelection input[type='radio']").on('click', function() {
|
||||
if ($(this).val() == WISH_CODE) {
|
||||
$(".mark-modal .rating-star-edit").hide();
|
||||
} else {
|
||||
|
@ -89,14 +89,14 @@ $(document).ready( function() {
|
|||
});
|
||||
|
||||
// show confirm modal
|
||||
$(".mark-panel a.delete").click(function(e) {
|
||||
$(".mark-panel a.delete").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$(".confirm-modal").show();
|
||||
$(".bg-mask").show();
|
||||
});
|
||||
|
||||
// confirm modal
|
||||
$(".confirm-modal input[type='submit']").click(function(e) {
|
||||
$(".confirm-modal input[type='submit']").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
$(".mark-panel form").submit();
|
||||
});
|
||||
|
@ -116,20 +116,20 @@ $(document).ready( function() {
|
|||
});
|
||||
|
||||
// expand hidden long text
|
||||
$(".entity-desc__unfold-button a").click(function() {
|
||||
$(".entity-desc__unfold-button a").on('click', function() {
|
||||
$(this).parent().siblings(".entity-desc__content").removeClass('entity-desc__content--folded');
|
||||
$(this).parent(".entity-desc__unfold-button").remove();
|
||||
});
|
||||
|
||||
// disable delete mark button after click
|
||||
const confirmDeleteMarkButton = $('.confirm-modal__confirm-button > input');
|
||||
confirmDeleteMarkButton.click(function() {
|
||||
confirmDeleteMarkButton.on('click', function() {
|
||||
confirmDeleteMarkButton.prop("disabled", true);
|
||||
});
|
||||
|
||||
// disable sumbit button after click
|
||||
const confirmSumbitMarkButton = $('.mark-modal__confirm-button > input');
|
||||
confirmSumbitMarkButton.click(function() {
|
||||
confirmSumbitMarkButton.on('click', function() {
|
||||
confirmSumbitMarkButton.prop("disabled", true);
|
||||
confirmSumbitMarkButton.closest('form')[0].submit();
|
||||
});
|
||||
|
|
|
@ -16,26 +16,6 @@ $(document).ready( function() {
|
|||
$("#followers h5").after(followersSpinner);
|
||||
$(".mast-following-more").hide();
|
||||
$(".mast-followers-more").hide();
|
||||
// getUserInfo(
|
||||
// id,
|
||||
// mast_uri,
|
||||
// token,
|
||||
// function(userData) {
|
||||
// let userName;
|
||||
// if (userData.display_name) {
|
||||
// userName = translateEmojis(userData.display_name, userData.emojis, true);
|
||||
// } else {
|
||||
// userName = userData.username;
|
||||
// }
|
||||
// //$("#userInfoCard .mast-acct").text(userData.acct);
|
||||
// $("#userInfoCard .mast-acct").attr("href", userData.url);
|
||||
// $("#userInfoCard .mast-avatar").attr("src", userData.avatar);
|
||||
// $("#userInfoCard .mast-displayname").html(userName);
|
||||
// $("#userInfoCard .mast-brief").text($("<div>"+userData.note.replace(/\<br/g,'\n<br').replace(/\<p/g,'\n<p')+"</div>").text());
|
||||
// $("#userInfoCard .mast-brief").html($("#userInfoCard .mast-brief").html().replace(/\n/g,'<br/>'));
|
||||
// $(userInfoSpinner).remove();
|
||||
// }
|
||||
// );
|
||||
|
||||
getFollowers(
|
||||
id,
|
||||
|
@ -122,7 +102,7 @@ $(document).ready( function() {
|
|||
button.children('.icon-arrow').toggleClass("icon-arrow--expand");
|
||||
button.siblings('.relation-dropdown__body').toggleClass("relation-dropdown__body--expand");
|
||||
}
|
||||
$(".relation-dropdown__button").click(onClickDropdownButton)
|
||||
$(".relation-dropdown__button").on('click', onClickDropdownButton);
|
||||
|
||||
// close when click outside
|
||||
window.onclick = evt => {
|
||||
|
@ -133,7 +113,7 @@ $(document).ready( function() {
|
|||
};
|
||||
|
||||
// import panel
|
||||
$("#uploadBtn").click(e => {
|
||||
$("#uploadBtn").on('click', e => {
|
||||
const btn = $("#uploadBtn")
|
||||
const form = $(".import-panel__body form")
|
||||
|
||||
|
|
|
@ -54,38 +54,32 @@ const NUMBER_PER_REQUEST = 20
|
|||
// "fields": []
|
||||
// }
|
||||
// ]
|
||||
function getFollowers(id, mastodonURI, token, callback) {
|
||||
let url = mastodonURI + API_FOLLOWERS.replace(":id", id);
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + token,
|
||||
},
|
||||
data: {
|
||||
'limit': NUMBER_PER_REQUEST
|
||||
},
|
||||
success: function(data, status, request){
|
||||
callback(data, request);
|
||||
},
|
||||
async function getFollowers(id, mastodonURI, token, callback) {
|
||||
const url = mastodonURI + API_FOLLOWERS.replace(":id", id);
|
||||
const response = await fetch(url+'?limit='+NUMBER_PER_REQUEST, {headers: {'Authorization': 'Bearer ' + token}});
|
||||
const json = await response.json();
|
||||
let nextUrl = null;
|
||||
response.headers.get('link').split(',').forEach(link => {
|
||||
if (link.includes('next')) {
|
||||
let regex = /<(.*?)>/;
|
||||
nextUrl = link.match(regex)[1];
|
||||
}
|
||||
});
|
||||
callback(json, nextUrl);
|
||||
}
|
||||
|
||||
function getFollowing(id, mastodonURI, token, callback) {
|
||||
let url = mastodonURI + API_FOLLOWING.replace(":id", id);
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + token,
|
||||
},
|
||||
data: {
|
||||
'limit': NUMBER_PER_REQUEST
|
||||
},
|
||||
success: function(data, status, request){
|
||||
callback(data, request);
|
||||
},
|
||||
async function getFollowing(id, mastodonURI, token, callback) {
|
||||
const url = mastodonURI + API_FOLLOWING.replace(":id", id);
|
||||
const response = await fetch(url+'?limit='+NUMBER_PER_REQUEST, {headers: {'Authorization': 'Bearer ' + token}});
|
||||
const json = await response.json();
|
||||
let nextUrl = null;
|
||||
response.headers.get('link').split(',').forEach(link => {
|
||||
if (link.includes('next')) {
|
||||
let regex = /<(.*?)>/;
|
||||
nextUrl = link.match(regex)[1];
|
||||
}
|
||||
});
|
||||
callback(json, nextUrl);
|
||||
}
|
||||
|
||||
// {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$(document).ready( function() {
|
||||
|
||||
$(".submit").click(function(e) {
|
||||
$(".submit").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
let form = $("#scrapeForm form");
|
||||
if (form.data('submitted') === true) {
|
||||
|
|
|
@ -8,7 +8,7 @@ $(() => {
|
|||
$(e).data("visibility", true);
|
||||
}
|
||||
let btn = $("#toggleDisplayButtonTemplate").clone().removeAttr("id");
|
||||
btn.click(e => {
|
||||
btn.on('click', e => {
|
||||
if ($(e.currentTarget).parent().data('visibility') === true) {
|
||||
// flip text
|
||||
$(e.currentTarget).children("span.showText").show();
|
||||
|
@ -72,7 +72,7 @@ $(() => {
|
|||
});
|
||||
|
||||
// activate sorting
|
||||
$("#sortEditButton").click(evt => {
|
||||
$("#sortEditButton").on('click', evt => {
|
||||
// test if edit mode is activated
|
||||
isActivated = $("#sortSaveIcon").is(":visible");
|
||||
|
||||
|
@ -134,7 +134,7 @@ $(() => {
|
|||
});
|
||||
|
||||
// exit edit mode
|
||||
$("#sortExitButton").click(evt => {
|
||||
$("#sortExitButton").on('click', evt => {
|
||||
initialLayoutData.forEach(elem => {
|
||||
// set visiblity
|
||||
$('#' + elem.id).data('visibility', elem.visibility);
|
||||
|
|
23
common/templates/partial/_common_libs.html
Normal file
23
common/templates/partial/_common_libs.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% load static %}
|
||||
{% if sentry_dsn %}
|
||||
<script src="https://static.neodb.social/browser.sentry-cdn.com/7.7.0/bundle.min.js"></script>
|
||||
<script>
|
||||
if (window.Sentry) Sentry.init({
|
||||
dsn: "{{ sentry_dsn }}",
|
||||
release: "NeoDB@{{ version_hash }}",
|
||||
environment: "{{ settings_module }}",
|
||||
tracesSampleRate: 1.0,
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
{% if jquery %}
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
{% else %}
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/cash/8.1.1/cash.min.js"></script>
|
||||
{% endif %}
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/htmx/1.8.0/htmx.min.js"></script>
|
||||
<script src="https://static.neodb.social/unpkg.com/hyperscript.org@0.9.7.js"></script>
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/rating-star.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/neo.css' %}">
|
||||
<link rel="search"type="application/opensearchdescription+xml" title="{{ site_name }}" href="{% static 'opensearch.xml' %}">
|
|
@ -23,14 +23,11 @@
|
|||
|
||||
<title>{{ site_name }} - {% trans '游戏详情' %} | {{ game.title }}</title>
|
||||
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="{% static 'lib/js/hyperscript-0.9.5.min.js' %}"></script>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/htmx/1.8.0/htmx.min.js"></script>
|
||||
{% include "partial/_common_libs.html" with jquery=1 %}
|
||||
|
||||
<script src="{% static 'lib/js/rating-star.js' %}"></script>
|
||||
<script src="{% static 'js/detail.js' %}"></script>
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/rating-star.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/neo.css' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -75,7 +72,7 @@
|
|||
{% if game.other_title|length > 5 %}
|
||||
<a href="javascript:void(0);" id="otherTitleMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#otherTitleMore").click(function (e) {
|
||||
$("#otherTitleMore").on('click', function (e) {
|
||||
$("span.other_title:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
{% if movie.director|length > 5 %}
|
||||
<a href="javascript:void(0);" id="directorMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#directorMore").click(function (e) {
|
||||
$("#directorMore").on('click', function (e) {
|
||||
$("span.director:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
@ -89,7 +89,7 @@
|
|||
{% if movie.actor|length > 5 %}
|
||||
<a href="javascript:void(0);" id="actorMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#actorMore").click(function (e) {
|
||||
$("#actorMore").on('click', function (e) {
|
||||
$("span.actor:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -36,14 +36,10 @@
|
|||
<title>{{ site_name }} - {% trans '电影详情' %} | {{ movie.title }}</title>
|
||||
{% endif %}
|
||||
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="{% static 'lib/js/hyperscript-0.9.5.min.js' %}"></script>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/htmx/1.8.0/htmx.min.js"></script>
|
||||
{% include "partial/_common_libs.html" with jquery=1 %}
|
||||
|
||||
<script src="{% static 'lib/js/rating-star.js' %}"></script>
|
||||
<script src="{% static 'js/detail.js' %}"></script>
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/rating-star.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/neo.css' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -102,7 +98,7 @@
|
|||
{% if movie.director|length > 5 %}
|
||||
<a href="javascript:void(0);" id="directorMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#directorMore").click(function (e) {
|
||||
$("#directorMore").on('click', function (e) {
|
||||
$("span.director:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
@ -121,7 +117,7 @@
|
|||
{% if movie.playwright|length > 5 %}
|
||||
<a href="javascript:void(0);" id="playwrightMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#playwrightMore").click(function (e) {
|
||||
$("#playwrightMore").on('click', function (e) {
|
||||
$("span.playwright:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
@ -141,7 +137,7 @@
|
|||
{% if movie.actor|length > 5 %}
|
||||
<a href="javascript:void(0);" id="actorMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#actorMore").click(function(e) {
|
||||
$("#actorMore").on('click', function(e) {
|
||||
$("span.actor:not(:visible)").each(function(e){
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
{% if movie.director|length > 5 %}
|
||||
<a href="javascript:void(0);" id="directorMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#directorMore").click(function (e) {
|
||||
$("#directorMore").on('click', function (e) {
|
||||
$("span.director:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
{% if movie.director|length > 5 %}
|
||||
<a href="javascript:void(0);" id="directorMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#directorMore").click(function (e) {
|
||||
$("#directorMore").on('click', function (e) {
|
||||
$("span.director:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
{% if movie.director|length > 5 %}
|
||||
<a href="javascript:void(0);" id="directorMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#directorMore").click(function (e) {
|
||||
$("#directorMore").on('click', function (e) {
|
||||
$("span.director:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -23,14 +23,10 @@
|
|||
|
||||
<title>{{ site_name }} - {% trans '音乐详情' %} | {{ album.title }}</title>
|
||||
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="{% static 'lib/js/hyperscript-0.9.5.min.js' %}"></script>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/htmx/1.8.0/htmx.min.js"></script>
|
||||
{% include "partial/_common_libs.html" with jquery=1 %}
|
||||
|
||||
<script src="{% static 'lib/js/rating-star.js' %}"></script>
|
||||
<script src="{% static 'js/detail.js' %}"></script>
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/rating-star.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/neo.css' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -76,7 +72,7 @@
|
|||
{% if album.artist|length > 5 %}
|
||||
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#artistMore").click(function (e) {
|
||||
$("#artistMore").on('click', function (e) {
|
||||
$("span.artist:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
@ -95,7 +91,7 @@
|
|||
{% if album.company|length > 5 %}
|
||||
<a href="javascript:void(0);" id="companyMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#companyMore").click(function (e) {
|
||||
$("#companyMore").on('click', function (e) {
|
||||
$("span.company:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
{% if album.artist|length > 5 %}
|
||||
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#artistMore").click(function (e) {
|
||||
$("#artistMore").on('click', function (e) {
|
||||
$("span.artist:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
{% if album.artist|length > 5 %}
|
||||
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#artistMore").click(function (e) {
|
||||
$("#artistMore").on('click', function (e) {
|
||||
$("span.artist:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
{% if album.artist|length > 5 %}
|
||||
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#artistMore").click(function (e) {
|
||||
$("#artistMore").on('click', function (e) {
|
||||
$("span.artist:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
{% if album.artist|length > 5 %}
|
||||
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#artistMore").click(function (e) {
|
||||
$("#artistMore").on('click', function (e) {
|
||||
$("span.artist:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
{% if song.artist|length > 5 %}
|
||||
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#artistMore").click(function (e) {
|
||||
$("#artistMore").on('click', function (e) {
|
||||
$("span.artist:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -23,14 +23,10 @@
|
|||
|
||||
<title>{{ site_name }} - {% trans '音乐详情' %} | {{ song.title }}</title>
|
||||
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="{% static 'lib/js/hyperscript-0.9.5.min.js' %}"></script>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/htmx/1.8.0/htmx.min.js"></script>
|
||||
{% include "partial/_common_libs.html" with jquery=1 %}
|
||||
|
||||
<script src="{% static 'lib/js/rating-star.js' %}"></script>
|
||||
<script src="{% static 'js/detail.js' %}"></script>
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/rating-star.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/neo.css' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -75,7 +71,7 @@
|
|||
{% if song.artist|length > 5 %}
|
||||
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#artistMore").click(function (e) {
|
||||
$("#artistMore").on('click', function (e) {
|
||||
$("span.artist:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
{% if song.artist|length > 5 %}
|
||||
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#artistMore").click(function (e) {
|
||||
$("#artistMore").on('click', function (e) {
|
||||
$("span.artist:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
{% if song.artist|length > 5 %}
|
||||
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#artistMore").click(function (e) {
|
||||
$("#artistMore").on('click', function (e) {
|
||||
$("span.artist:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
{% if song.artist|length > 5 %}
|
||||
<a href="javascript:void(0);" id="artistMore">{% trans '更多' %}</a>
|
||||
<script>
|
||||
$("#artistMore").click(function (e) {
|
||||
$("#artistMore").on('click', function (e) {
|
||||
$("span.artist:not(:visible)").each(function (e) {
|
||||
$(this).parent().removeAttr('style');
|
||||
});
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ site_name }}</title>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/htmx/1.8.0/htmx.min.js"></script>
|
||||
|
||||
{% include "partial/_common_libs.html" with jquery=1 %}
|
||||
|
||||
<script src="{% static 'lib/js/rating-star.js' %}"></script>
|
||||
<script>
|
||||
$(document).ready( function() {
|
||||
|
@ -37,10 +38,6 @@
|
|||
</script>
|
||||
<script src="{% static 'js/mastodon.js' %}"></script>
|
||||
<script src="{% static 'js/home.js' %}"></script>
|
||||
<link rel="stylesheet" href="{% static 'lib/css/rating-star.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.min.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'lib/css/neo.css' %}">
|
||||
<link rel="search"type="application/opensearchdescription+xml" title="{{ site_name }}" href="{% static 'opensearch.xml' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -46,7 +46,7 @@ $(document).ready( function() {
|
|||
id,
|
||||
mast_uri,
|
||||
token,
|
||||
function(userList, request) {
|
||||
function(userList, nextPage) {
|
||||
let subUserList = null;
|
||||
if (userList.length == 0) {
|
||||
$(".mast-followers").hide();
|
||||
|
@ -102,12 +102,7 @@ $(document).ready( function() {
|
|||
});
|
||||
|
||||
mainSpinner.hide();
|
||||
request.getResponseHeader('link').split(',').forEach(link => {
|
||||
if (link.includes('next')) {
|
||||
let regex = /<(.*?)>/;
|
||||
nextUrl = link.match(regex)[1];
|
||||
}
|
||||
});
|
||||
nextUrl = nextPage;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ $(document).ready( function() {
|
|||
id,
|
||||
mast_uri,
|
||||
token,
|
||||
function(userList, request) {
|
||||
function(userList, nextPage) {
|
||||
// aside
|
||||
let subUserList = null;
|
||||
if (userList.length == 0) {
|
||||
|
@ -140,12 +140,7 @@ $(document).ready( function() {
|
|||
});
|
||||
|
||||
mainSpinner.hide();
|
||||
request.getResponseHeader('link').split(',').forEach(link => {
|
||||
if (link.includes('next')) {
|
||||
let regex = /<(.*?)>/;
|
||||
nextUrl = link.match(regex)[1];
|
||||
}
|
||||
});
|
||||
nextUrl = nextPage;
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -12,10 +12,9 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ site_name }} - 数据管理</title>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
{% include "partial/_common_libs.html" with jquery=1 %}
|
||||
<script src="{% static 'js/mastodon.js' %}"></script>
|
||||
<script src="{% static 'js/home.js' %}"></script>
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.min.css' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -116,7 +115,7 @@
|
|||
</a>
|
||||
<script>
|
||||
$("#failedUrlsBtn").data("collapse", true);
|
||||
$("#failedUrlsBtn").click(()=>{
|
||||
$("#failedUrlsBtn").on('click', ()=>{
|
||||
const btn = $("#failedUrlsBtn");
|
||||
if(btn.data("collapse") == true) {
|
||||
btn.data("collapse", false);
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
{% else %}
|
||||
<title>{{ site_name }} - {{user.display_name}}</title>
|
||||
{% endif %}
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
|
||||
{% include "partial/_common_libs.html" %}
|
||||
|
||||
<script src="{% static 'js/mastodon.js' %}"></script>
|
||||
<script src="{% static 'js/home.js' %}"></script>
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.min.css' %}">
|
||||
<link rel="search"type="application/opensearchdescription+xml" title="{{ site_name }}" href="{% static 'opensearch.xml' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -10,26 +10,13 @@
|
|||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="{{ request.build_absolute_uri }}">
|
||||
<meta property="og:image" content="{{ request.scheme }}://{{ request.get_host }}{% static 'img/logo_square.jpg' %}">
|
||||
<title>{{ site_name }} - {% trans '登录' %}</title>
|
||||
{% include "partial/_common_libs.html" %}
|
||||
<link rel="stylesheet" href="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.min.css">
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic_edit.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic_box.css' %}">
|
||||
<script
|
||||
src="https://browser.sentry-cdn.com/7.5.1/bundle.min.js"
|
||||
integrity="sha384-hqfUBwcPJtjcyE8jgb0/5s4wee/hsu/uZckh1FWBsUXNpjPYhee9ohNwbZE6N9Xt"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script type="text/javascript">
|
||||
Sentry.init({
|
||||
dsn: "https://4114d1a8e46f465e9fd2ced88ad39455@o1312956.ingest.sentry.io/6562215",
|
||||
release: "NeoDB@{{ version_hash }}",
|
||||
tracesSampleRate: 1.0,
|
||||
});
|
||||
</script>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/cash/8.1.1/cash.min.js"></script>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.1/js.cookie.min.js"></script>
|
||||
<script> $(document).ready( function() { $('.delayed').remove(); $('#loginButton').prop("disabled", false); } ); </script>
|
||||
<title>{{ site_name }} - {% trans '登录' %}</title>
|
||||
<link rel="search"type="application/opensearchdescription+xml" title="{{ site_name }}" href="{% static 'opensearch.xml' %}">
|
||||
<style type="text/css">
|
||||
.delayed {
|
||||
animation: 10s fadeIn;
|
||||
|
@ -100,7 +87,7 @@
|
|||
{% else %}
|
||||
$("#sitesSelect").val($("#sitesSelect option:first").val());
|
||||
{% endif %}
|
||||
$("button[name=login]").click(function(e) {
|
||||
$("button[name=login]").on('click', function(e) {
|
||||
e.preventDefault();
|
||||
let selected = $("#sitesSelect").find(":selected");
|
||||
let client_id = selected.data("client-id");
|
||||
|
|
|
@ -12,10 +12,9 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ site_name }} - 设置</title>
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
{% include "partial/_common_libs.html" %}
|
||||
<script src="{% static 'js/mastodon.js' %}"></script>
|
||||
<script src="{% static 'js/home.js' %}"></script>
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.min.css' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
{% else %}
|
||||
<title>{{ site_name }} - {% trans '关注的人' %}</title>
|
||||
{% endif %}
|
||||
<script src="https://static.neodb.social/cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
|
||||
{% include "partial/_common_libs.html" with jquery=1 %}
|
||||
|
||||
<script src="{% static 'js/mastodon.js' %}"></script>
|
||||
|
||||
{% if is_followers_page %}
|
||||
|
@ -23,8 +25,6 @@
|
|||
{% else %}
|
||||
<script src="{% static 'js/following_list.js' %}"></script>
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" href="{% static 'css/boofilsic.min.css' %}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
Loading…
Add table
Reference in a new issue