Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,7 @@ function(oracleHtml, peaceMsg, shareBtn, resultBox) {
|
|
| 55 |
}
|
| 56 |
"""
|
| 57 |
|
| 58 |
-
# JS: Bluesky投稿
|
| 59 |
js_share_bluesky = """
|
| 60 |
function() {
|
| 61 |
const pairRawEl = document.getElementById('pair-raw');
|
|
@@ -70,7 +70,8 @@ function() {
|
|
| 70 |
}
|
| 71 |
|
| 72 |
const currentUrl = window.location.href;
|
| 73 |
-
|
|
|
|
| 74 |
const intentUrl = `https://bsky.app/intent/compose?text=${encodeURIComponent(text)}`;
|
| 75 |
window.open(intentUrl, '_blank');
|
| 76 |
}
|
|
@@ -79,12 +80,12 @@ function() {
|
|
| 79 |
custom_css = """
|
| 80 |
.gradio-container { max-width: 600px !important; text-align: center !important; }
|
| 81 |
|
| 82 |
-
/* 1. 最上部の空白を
|
| 83 |
.center-content {
|
| 84 |
display: flex !important;
|
| 85 |
flex-direction: column !important;
|
| 86 |
align-items: center !important;
|
| 87 |
-
padding-top:
|
| 88 |
}
|
| 89 |
|
| 90 |
/* 2. タイトルと教義の間を-5px */
|
|
|
|
| 55 |
}
|
| 56 |
"""
|
| 57 |
|
| 58 |
+
# JS: Bluesky投稿(URLの前に改行を入れてリンク認識を改善)
|
| 59 |
js_share_bluesky = """
|
| 60 |
function() {
|
| 61 |
const pairRawEl = document.getElementById('pair-raw');
|
|
|
|
| 70 |
}
|
| 71 |
|
| 72 |
const currentUrl = window.location.href;
|
| 73 |
+
// URLの直前に改行を2つ入れることで、SNS側がURLを独立したリンクとして認識しやすくなります
|
| 74 |
+
const text = `私は「${pairName}」を信仰しています。\\n\\n蓮ノ空聖書正典:\\n${currentUrl}`;
|
| 75 |
const intentUrl = `https://bsky.app/intent/compose?text=${encodeURIComponent(text)}`;
|
| 76 |
window.open(intentUrl, '_blank');
|
| 77 |
}
|
|
|
|
| 80 |
custom_css = """
|
| 81 |
.gradio-container { max-width: 600px !important; text-align: center !important; }
|
| 82 |
|
| 83 |
+
/* 1. 最上部の空白を45pxに設定 */
|
| 84 |
.center-content {
|
| 85 |
display: flex !important;
|
| 86 |
flex-direction: column !important;
|
| 87 |
align-items: center !important;
|
| 88 |
+
padding-top: 45px !important;
|
| 89 |
}
|
| 90 |
|
| 91 |
/* 2. タイトルと教義の間を-5px */
|