diff --git a/assets/css/v2.css b/assets/css/v2.css index ded3327..2f84967 100644 --- a/assets/css/v2.css +++ b/assets/css/v2.css @@ -1,14 +1,27 @@ +@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,400;0,800;0,900;1,300;1,700;1,800;1,900&display=swap'); + body { background-color: rgb(0 52 45); } +#wrapper { + text-align: center; + align-items: center; + color: #05ffe4; +} + #bale-image { margin-top: 20px; margin-bottom: 20px; + display: block; + margin-left: auto; + margin-right: auto; + width: 150px; } #title { font-family: Roboto, serif; + font-weight: bold; } #short-description, .lang-description { @@ -17,6 +30,14 @@ body { margin-left: 10px; } +#more-info { + color: rgb(5,231,231); +} + +.help-text { + color: #abfe06; +} + .link { color: rgba(225, 255, 121, 0.58); cursor: pointer; @@ -120,6 +141,12 @@ p { display: block; } +.gist { + margin-left: 20px; + margin-right: 20px; + border-radius: 7px; +} + .developers-p p:hover {background-color: rgb(128, 214, 214);border-radius: 5px;} .developers-p .link:hover {color: rgba(252, 19, 19, 0.78);} .developers:hover .developers-p {display: block;} @@ -152,6 +179,10 @@ p { margin-left: 10px; } +.hidden { + display: none; +} + footer { padding: 10px; } @@ -160,6 +191,11 @@ footer p { font-family: Vazir, serif; } +footer p b, code { + font-family: Poppins, sans-serif; + font-size: 15px; +} + @media (width >= 600px) { #title { font-size: 60px; @@ -167,7 +203,7 @@ footer p { #short-description { font-size: 32.5px; } - .lang-description, footer p, #alert-box p { + .lang-description, footer p, footer p b, #alert-box p { font-size: 19px; } .v2-button { @@ -182,7 +218,7 @@ footer p { #short-description { font-size: 26.5px; } - .lang-description, footer p { + .lang-description, footer p, footer p b { font-size: 15px; } .v2-button, #alert-box p { @@ -197,7 +233,7 @@ footer p { #short-description { font-size: 21.5px; } - .lang-description, footer p { + .lang-description, footer p, footer p b { font-size: 14px; } .v2-button, #alert-box p { @@ -215,10 +251,30 @@ footer p { #short-description { font-size: 16px; } - .lang-description, footer p { + .lang-description, footer p, footer p b, footer p b { font-size: 13px; } .v2-button, #alert-box p { font-size: 14px; } } + +::-webkit-scrollbar { + width: 7px; + height: 7px; + background-color: transparent; + border-radius: 5px; +} + +::-webkit-scrollbar-corner { + border-radius: 5px; +} + +::-webkit-scrollbar-thumb { + background-color: #2a2a30; + border-radius: 5px; +} + +::-webkit-scrollbar-thumb:hover { + background-color: #407e99; +} \ No newline at end of file diff --git a/assets/js/v2.js b/assets/js/v2.js index 528ed3b..4d28c04 100644 --- a/assets/js/v2.js +++ b/assets/js/v2.js @@ -1,11 +1,53 @@ -let address = { github: "github.com/python-bale-bot/python-bale-bot", github_examples: "github.com/python-bale-bot/python-bale-bot/tree/master/examples", documention: "docs.python-bale-bot.ir", bale: "bale.ai", dev_kian_ahmadian: "github.com/kian-ahmadian", dev_amin_shahrabi: "github.com/AminShahrabi", dev_kasra_gamasaee: "github.com/kasragamasaee", pypi: "pypi.org/project/python-bale-bot/", bale_bot_developers: "dev.bale.ai", bale_api_problems: "github.com/python-bale-bot/python-bale-bot/discussions/24", changelog: "python-bale-bot.ir/changelog" } +const address = { github: "github.com/python-bale-bot/python-bale-bot", github_examples: "github.com/python-bale-bot/python-bale-bot/tree/master/examples", documention: "docs.python-bale-bot.ir", bale: "bale.ai", dev_kian_ahmadian: "github.com/kian-ahmadian", dev_amin_shahrabi: "github.com/AminShahrabi", dev_kasra_gamasaee: "github.com/kasragamasaee", pypi: "pypi.org/project/python-bale-bot/", bale_bot_developers: "dev.bale.ai", bale_api_problems: "github.com/python-bale-bot/python-bale-bot/discussions/24", changelog: "python-bale-bot.ir/changelog" } function openAddress(name){ const key = name.replaceAll("-", "_"); if (!address[key]) return; open("https://" + address[key], "_blank"); } -document.getElementById("close-alert-box-btn").addEventListener("click", () => { - document.getElementById("alert-box").classList.add("remove-anim"); - setInterval(() => document.getElementById("alert-box").remove(), 500) -}) \ No newline at end of file +const words = [ + ['1', '۱'], + ['2', '۲'], + ['3', '۳'], + ['4', '۴'], + ['5', '۵'], + ['6', '۶'], + ['7', '۷'], + ['8', '۸'], + ['9', '۹'] +] + +window.onload = async () => { + document.getElementById("close-alert-box-btn").addEventListener("click", () => { + document.getElementById("alert-box").classList.add("remove-anim"); + setInterval(() => document.getElementById("alert-box").remove(), 500) + }) + + setInterval(async () => { + let versionName = await getStableVersion() + // https://python-bale-bot.ir/changelog#v-2-4-8 + + if (versionName == null) return; + versionName = versionName.toLowerCase() + const alertBox = document.getElementById("alert-box") + const element = alertBox.children[0]; + element.innerHTML = replaceWords(`نسخه رسمی ${versionName.toLowerCase().replaceAll('v', '')} منتشر شد!`); + element.addEventListener('click', () => open(`/changelog#${versionName.replaceAll('v', 'v-').replaceAll('.', '-')}`, '_blank')) + alertBox.classList.remove('hidden') + }, 1500) +} + +async function getStableVersion(){ + const response = await fetch('https://api.github.com/repos/python-bale-bot/python-bale-bot/releases') + const json = await response.json() + if (Object.keys(json).length >= 1){ + return json[0].tag_name + } else return null +} + +function replaceWords(element){ + for (let index in words){ + element = element.replaceAll(words[index][0], words[index][1]) + } + return element +} \ No newline at end of file diff --git a/index.html b/index.html index 4b03e2e..233bd94 100644 --- a/index.html +++ b/index.html @@ -26,13 +26,13 @@
-نسخه 2.4.7.2 منتشر شد!
+بله
بله
یکی از پیام رسان هایی است که توانسته با توجه به امکانات مختلف آن (پرداخت، ساخت و برنامه نویسی بازو و ...) کاربران و برنامه نویسان را به سمت خود بکشاند. حال ما برای راحتی برنامه نویسان، کتابخانه ای سریع، مدرن و امن به وجود آورده ایمpip install python-bale-bot
from bale import Bot, Message
-bot = Bot("YOUR TOKEN")
-
-@bot.listen("on_message")
-async def on_message(message: Message):
- return await message.reply("Hi")
-
-bot.run()
+
گیت هاب
مراجعه نمائید.گیت هاب
مراجعه نمائید.