summaryrefslogtreecommitdiff
diff options
from:
to:
context:
space:
mode:
-rw-r--r--config/config.local.yaml36
-rw-r--r--config/config.prod.yaml38
-rw-r--r--config/config.stage.yaml36
-rw-r--r--locale/localization.en.yaml120
-rw-r--r--locale/localization.ru.yaml132
-rw-r--r--views/layouts/general-mail.html196
-rw-r--r--views/pages/global-map.html600
-rw-r--r--views/pages/unsubscribe-page.html87
-rw-r--r--views/partials/general-page-footer.html26
-rw-r--r--views/partials/general-page-header.html10
10 files changed, 729 insertions, 552 deletions
diff --git a/config/config.local.yaml b/config/config.local.yaml
index fb79e97..7769438 100644
--- a/config/config.local.yaml
+++ b/config/config.local.yaml
@@ -5,19 +5,19 @@ blogPages:
config:
bucketName: sayana-pages
region: eu-central-003
- prefix: 'stage-'
- keyID: '${B2_KEY_ID}'
- applicationKey: '${B2_APPLICATION_KEY}'
+ prefix: "stage-"
+ keyID: "${B2_KEY_ID}"
+ applicationKey: "${B2_APPLICATION_KEY}"
factGiver:
storage:
type: b2
config:
bucketName: sayana-pages
region: eu-central-003
- prefix: ''
- keyID: '${B2_KEY_ID}'
- applicationKey: '${B2_APPLICATION_KEY}'
- factsFileName: 'facts-*.txt'
+ prefix: ""
+ keyID: "${B2_KEY_ID}"
+ applicationKey: "${B2_APPLICATION_KEY}"
+ factsFileName: "facts-*.txt"
localePath: ./locale/
availableLanguages:
- name: ru
@@ -33,19 +33,19 @@ auth:
type: sqlite3
config:
# dsn: 'file:/tmp/auth.db?cache=shared&mode=rwc&_journal_mode=WAL'
- dsn: 'file:/tmp/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2&_journal_mode=WAL'
- salt: '123'
+ dsn: "file:/tmp/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2&_journal_mode=WAL"
+ salt: "123"
mail:
- clientHost: '127.0.0.1:3000'
- mailHost: '${MAIL_HOST}'
- publicName: 'LOCAL.SAYA.TODAY'
- mailAddress: '${MAIL_ADDRESS}'
- username: '${MAIL_USERNAME}'
- password: '${MAIL_PASSWORD}'
- salt: '${MAIL_SALT}'
+ clientHost: "127.0.0.1:3000"
+ mailHost: "${MAIL_HOST}"
+ publicName: "LOCAL.SAYA.UZ"
+ mailAddress: "${MAIL_ADDRESS}"
+ username: "${MAIL_USERNAME}"
+ password: "${MAIL_PASSWORD}"
+ salt: "${MAIL_SALT}"
trigger:
onNewPost: "* * * * *"
-canonicalEndpoint: 'http://127.0.0.1:3000'
+canonicalEndpoint: "http://127.0.0.1:3000"
photoStorage:
full:
baseUrl: https://storage.yandexcloud.kz/sayauz-photos/%s
@@ -63,7 +63,7 @@ photoStorage:
baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp320/%s.webp
homePageGifs:
baseUrl: https://storage.yandexcloud.kz/sayauz-static/home-page-gifs/otter-%s.gif
- indexes: ['1', '2', '3']
+ indexes: ["1", "2", "3"]
staticStorage:
baseUrl: https://storage.yandexcloud.kz/sayauz-static
allowOrigins:
diff --git a/config/config.prod.yaml b/config/config.prod.yaml
index 868e242..91f606f 100644
--- a/config/config.prod.yaml
+++ b/config/config.prod.yaml
@@ -5,19 +5,19 @@ blogPages:
config:
bucketName: sayana-pages
region: eu-central-003
- prefix: 'prod-'
- keyID: '${B2_KEY_ID}'
- applicationKey: '${B2_APPLICATION_KEY}'
+ prefix: "prod-"
+ keyID: "${B2_KEY_ID}"
+ applicationKey: "${B2_APPLICATION_KEY}"
factGiver:
storage:
type: b2
config:
bucketName: sayana-pages
region: eu-central-003
- prefix: ''
- keyID: '${B2_KEY_ID}'
- applicationKey: '${B2_APPLICATION_KEY}'
- factsFileName: 'facts-*.txt'
+ prefix: ""
+ keyID: "${B2_KEY_ID}"
+ applicationKey: "${B2_APPLICATION_KEY}"
+ factsFileName: "facts-*.txt"
localePath: ./locale/
availableLanguages:
- name: ru
@@ -32,21 +32,21 @@ auth:
db:
type: sqlite3
config:
- dsn: 'file:/data/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2&_journal_mode=WAL'
- salt: '${AUTH_SALT}'
+ dsn: "file:/data/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2&_journal_mode=WAL"
+ salt: "${AUTH_SALT}"
mail:
- clientHost: '${FQDN}'
- mailHost: '${MAIL_HOST}'
- publicName: 'SAYA.TODAY'
- mailAddress: '${MAIL_ADDRESS}'
- username: '${MAIL_USERNAME}'
- password: '${MAIL_PASSWORD}'
- salt: '${MAIL_SALT}'
+ clientHost: "${FQDN}"
+ mailHost: "${MAIL_HOST}"
+ publicName: "SAYA.UZ"
+ mailAddress: "${MAIL_ADDRESS}"
+ username: "${MAIL_USERNAME}"
+ password: "${MAIL_PASSWORD}"
+ salt: "${MAIL_SALT}"
trigger:
onNewPost: "0/5 * * * *"
-canonicalEndpoint: 'https://${FQDN}'
+canonicalEndpoint: "https://${FQDN}"
meta:
- googleSiteVerification: '${GOOGLE_SITE_VERIFICATION}'
+ googleSiteVerification: "${GOOGLE_SITE_VERIFICATION}"
photoStorage:
full:
baseUrl: https://storage.yandexcloud.kz/sayauz-photos/%s
@@ -64,7 +64,7 @@ photoStorage:
baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp320/%s.webp
homePageGifs:
baseUrl: https://storage.yandexcloud.kz/sayauz-static/home-page-gifs/otter-%s.gif
- indexes: ['1', '2', '3']
+ indexes: ["1", "2", "3"]
staticStorage:
baseUrl: https://storage.yandexcloud.kz/sayauz-static
allowOrigins:
diff --git a/config/config.stage.yaml b/config/config.stage.yaml
index ab86709..3f1381b 100644
--- a/config/config.stage.yaml
+++ b/config/config.stage.yaml
@@ -5,19 +5,19 @@ blogPages:
config:
bucketName: sayana-pages
region: eu-central-003
- prefix: 'stage-'
- keyID: '${B2_KEY_ID}'
- applicationKey: '${B2_APPLICATION_KEY}'
+ prefix: "stage-"
+ keyID: "${B2_KEY_ID}"
+ applicationKey: "${B2_APPLICATION_KEY}"
factGiver:
storage:
type: b2
config:
bucketName: sayana-pages
region: eu-central-003
- prefix: ''
- keyID: '${B2_KEY_ID}'
- applicationKey: '${B2_APPLICATION_KEY}'
- factsFileName: 'facts-*.txt'
+ prefix: ""
+ keyID: "${B2_KEY_ID}"
+ applicationKey: "${B2_APPLICATION_KEY}"
+ factsFileName: "facts-*.txt"
localePath: ./locale/
availableLanguages:
- name: ru
@@ -32,19 +32,19 @@ auth:
db:
type: sqlite3
config:
- dsn: 'file:/data/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2&_journal_mode=WAL'
- salt: '${AUTH_SALT}'
+ dsn: "file:/data/auth.db?cache=private&mode=rwc&_locking_mode=EXCLUSIVE&_mutex=no&_auto_vacuum=2&_journal_mode=WAL"
+ salt: "${AUTH_SALT}"
mail:
- clientHost: '${FQDN}'
- mailHost: '${MAIL_HOST}'
- publicName: 'DEMO.SAYA.TODAY'
- mailAddress: '${MAIL_ADDRESS}'
- username: '${MAIL_USERNAME}'
- password: '${MAIL_PASSWORD}'
- salt: '${MAIL_SALT}'
+ clientHost: "${FQDN}"
+ mailHost: "${MAIL_HOST}"
+ publicName: "STAGE.SAYA.UZ"
+ mailAddress: "${MAIL_ADDRESS}"
+ username: "${MAIL_USERNAME}"
+ password: "${MAIL_PASSWORD}"
+ salt: "${MAIL_SALT}"
trigger:
onNewPost: "0/3 * * * *"
-canonicalEndpoint: 'https://${FQDN}'
+canonicalEndpoint: "https://${FQDN}"
photoStorage:
full:
baseUrl: https://storage.yandexcloud.kz/sayauz-photos/%s
@@ -62,7 +62,7 @@ photoStorage:
baseUrl: https://storage.yandexcloud.kz/sayauz-thumbnails-webp320/%s.webp
homePageGifs:
baseUrl: https://storage.yandexcloud.kz/sayauz-static/home-page-gifs/otter-%s.gif
- indexes: ['1', '2', '3']
+ indexes: ["1", "2", "3"]
staticStorage:
baseUrl: https://storage.yandexcloud.kz/sayauz-static
allowOrigins:
diff --git a/locale/localization.en.yaml b/locale/localization.en.yaml
index 9923881..10bcb94 100644
--- a/locale/localization.en.yaml
+++ b/locale/localization.en.yaml
@@ -1,77 +1,77 @@
-TagsLabel: 'Tags:'
+TagsLabel: "Tags:"
BlogSearch:
- Header: 'Blog Search'
+ Header: "Blog Search"
Description: "The Saya Blog posts' list"
- TagsHeader: 'Tags'
- OrderByHeader: 'Order by...'
- TitleOrdered: 'Title'
- ActionDateOrdered: 'Action Date'
- PublicationDateOrdered: 'Publication Date'
- ChooseAllTags: 'Choose All'
+ TagsHeader: "Tags"
+ OrderByHeader: "Order by..."
+ TitleOrdered: "Title"
+ ActionDateOrdered: "Action Date"
+ PublicationDateOrdered: "Publication Date"
+ ChooseAllTags: "Choose All"
GlobalMap:
- Header: 'Global Map'
+ Header: "Global Map"
Description: "Global map with all the tags of places I've been to"
HomePage:
- Header: 'Home Page'
- Contacts: 'Contacts'
- DidYouKnowThat: 'Did you know, that...'
- SidebarDescription: 'Describing the Sidebar'
- HomePageDescription: 'Home Page -- where we are right now!'
- BlogSearchDescription: 'Blog Search. You can find my travel notes there and, maybe, something else!'
- MarkerMapDescription: 'Map with markers of my travel notes -- a convinient way to find an interesting region and find related posts!'
- ThemeSwitchDescription: 'Theme Palette lets you change the theme of the site -- there are 2 dark and 2 bright themes currently!'
- Hymn1: 'We welcome you to Sayasite!'
+ Header: "Home Page"
+ Contacts: "Contacts"
+ DidYouKnowThat: "Did you know, that..."
+ SidebarDescription: "Describing the Sidebar"
+ HomePageDescription: "Home Page -- where we are right now!"
+ BlogSearchDescription: "Blog Search. You can find my travel notes there and, maybe, something else!"
+ MarkerMapDescription: "Map with markers of my travel notes -- a convinient way to find an interesting region and find related posts!"
+ ThemeSwitchDescription: "Theme Palette lets you change the theme of the site -- there are 2 dark and 2 bright themes currently!"
+ Hymn1: "We welcome you to Sayasite!"
Hymn2: "We've been expecting you!"
- Hymn3: 'You bring such joy in Sayasite!'
- Hymn4: 'No matter where you roam, know our love is true!~'
+ Hymn3: "You bring such joy in Sayasite!"
+ Hymn4: "No matter where you roam, know our love is true!~"
UnsubscribePage:
- Header: 'Cancelling the Subscription'
- UnsetCode: 'Your cancel code is not set. You just having a walk around the site?'
+ Header: "Cancelling the Subscription"
+ UnsetCode: "Your cancel code is not set. You just having a walk around the site?"
InvalidCode: "Your cancel code could not be verified. Maybe, the code expired after a day. Or maybe, you've already unsubscribed."
OnServerError: "We couldn't unsubscribe you, the problem is on our side! We will solve this problem as soon as possible."
- Success: 'Cancelled your subscription successfully! We do hope we will engage you again someday.'
+ Success: "Cancelled your subscription successfully! We do hope we will engage you again someday."
Metadata:
- Published: 'Published'
- Action: 'Took place on'
+ Published: "Published"
+ Action: "Took place on"
Mail:
- UnsubscribeFooter: 'If this letter got you in a bad mood, you can unsubscribe from my blog by {}this link{/}.'
+ UnsubscribeFooter: "If this letter got you in a bad mood, you can unsubscribe from my blog by {}this link{/}."
VerifyEmail:
- Subject: 'Verification Link for SAYA.TODAY is waiting for you!'
- Welcome: 'Greetings!'
- Intro: 'There are 2 ways for us to validate your profile:'
- GotoLink: 'Go by this link:'
+ Subject: "Verification Link for SAYA.UZ is waiting for you!"
+ Welcome: "Greetings!"
+ Intro: "There are 2 ways for us to validate your profile:"
+ GotoLink: "Go by this link:"
InputCode: "Or input this code on the personal page:"
- IfRandom: 'If you are unsure what this letter this, you can ignore it, and also, if you are interested, you may visit my site :)'
+ IfRandom: "If you are unsure what this letter this, you can ignore it, and also, if you are interested, you may visit my site :)"
NewPost:
- Subject: 'A new post arrived at SAYA.TODAY!'
- Intro: 'A new post came!'
- CapturedOn: 'Captured on'
+ Subject: "A new post arrived at SAYA.UZ!"
+ Intro: "A new post came!"
+ CapturedOn: "Captured on"
UserProfile:
- Header: 'Personal Settings'
- Description: 'Set and verify your e-mail here, as well as subscribe to favorite blog tags'
- EmailHeader: 'E-Mail'
- VerificationCodeHeader: 'Verification Code'
- TypeEmail: 'Please type your email'
- SendCodeButton: 'Send Code'
- VerifyButton: 'Verify'
- VerificationCodeSent: 'Verification code sent! Please check your e-mail. Your next verification attempt will be possible on {}.'
- DelayTilVerification: 'You have already requested the verification before! Please wait until {} for a new verification request.'
- FailedEmailRender: 'Failed to render the email status message, please ask administrator for a more detailed cause.'
- VerificationCodeSendingError: 'Failed to send a verification code, please ask administrator for a more detailed cause.'
- EmailAlreadyValidated: 'You already have this E-Mail validated.'
- EmailTaken: 'This E-Mail is already taken.'
- EmailEmpty: 'E-Mail is unset or empty.'
- VerificationSuccess: 'Success! You are now able to subscribe with your new e-mail.'
- VerificationFailed: 'Verification code is invalid, please ask administrator for a more detailed cause.'
- VerificationEmpty: 'Verification code is unset or empty.'
- SubscriptionHeader: 'Subscribe to...'
- TagsNone: 'None'
- TagsAll: 'All'
- TagsSpecific: 'Specific'
+ Header: "Personal Settings"
+ Description: "Set and verify your e-mail here, as well as subscribe to favorite blog tags"
+ EmailHeader: "E-Mail"
+ VerificationCodeHeader: "Verification Code"
+ TypeEmail: "Please type your email"
+ SendCodeButton: "Send Code"
+ VerifyButton: "Verify"
+ VerificationCodeSent: "Verification code sent! Please check your e-mail. Your next verification attempt will be possible on {}."
+ DelayTilVerification: "You have already requested the verification before! Please wait until {} for a new verification request."
+ FailedEmailRender: "Failed to render the email status message, please ask administrator for a more detailed cause."
+ VerificationCodeSendingError: "Failed to send a verification code, please ask administrator for a more detailed cause."
+ EmailAlreadyValidated: "You already have this E-Mail validated."
+ EmailTaken: "This E-Mail is already taken."
+ EmailEmpty: "E-Mail is unset or empty."
+ VerificationSuccess: "Success! You are now able to subscribe with your new e-mail."
+ VerificationFailed: "Verification code is invalid, please ask administrator for a more detailed cause."
+ VerificationEmpty: "Verification code is unset or empty."
+ SubscriptionHeader: "Subscribe to..."
+ TagsNone: "None"
+ TagsAll: "All"
+ TagsSpecific: "Specific"
TagDoesNotExist: 'The tag "{}" does not exist on the site.'
TagAlreadyAdded: 'The tag "{}" is already in your subscribed list.'
- SaveButton: 'Save'
- SubscribeInvalidType: 'Invalid subscription type.'
- FailedToSubscribe: 'Failed to subscribe by new settings, please ask administrator for a more detailed cause.'
- SubscribedSuccessfully: 'Successfully subscribed you by new settings!'
- RefreshPage: 'Please refresh the profile page on the device, where you requested the code.'
+ SaveButton: "Save"
+ SubscribeInvalidType: "Invalid subscription type."
+ FailedToSubscribe: "Failed to subscribe by new settings, please ask administrator for a more detailed cause."
+ SubscribedSuccessfully: "Successfully subscribed you by new settings!"
+ RefreshPage: "Please refresh the profile page on the device, where you requested the code."
diff --git a/locale/localization.ru.yaml b/locale/localization.ru.yaml
index 34e5387..17e1e41 100644
--- a/locale/localization.ru.yaml
+++ b/locale/localization.ru.yaml
@@ -1,77 +1,77 @@
-TagsLabel: 'Тэги:'
+TagsLabel: "Тэги:"
BlogSearch:
- Header: 'Поиск по блогу'
- Description: 'Каталог записей Saya Blog'
- TagsHeader: 'Тэги'
- OrderByHeader: 'Упорядочить по...'
- TitleOrdered: 'названию'
- ActionDateOrdered: 'дате действия'
- PublicationDateOrdered: 'времени публикации'
- ChooseAllTags: 'Выбрать все'
+ Header: "Поиск по блогу"
+ Description: "Каталог записей Saya Blog"
+ TagsHeader: "Тэги"
+ OrderByHeader: "Упорядочить по..."
+ TitleOrdered: "названию"
+ ActionDateOrdered: "дате действия"
+ PublicationDateOrdered: "времени публикации"
+ ChooseAllTags: "Выбрать все"
GlobalMap:
- Header: 'Глобальная карта'
- Description: 'Глобальная карта с метками мест, где я побывал'
+ Header: "Глобальная карта"
+ Description: "Глобальная карта с метками мест, где я побывал"
HomePage:
- Header: 'Домашняя страница'
- Contacts: 'Контакты'
- DidYouKnowThat: 'А вы знали, что...'
- SidebarDescription: 'Поясняем за сайдбар'
- HomePageDescription: 'Домашняя страница -- где мы сейчас и находимся!'
- BlogSearchDescription: 'Поиск по блогу. Там размещены мои путевые заметки и, может, что-то ещё!'
- MarkerMapDescription: 'Карта с маркерами моих путевых заметок, -- удобный способ найти интересный регион и перейти на заинтересовавшие посты!'
- ThemeSwitchDescription: 'Позволяет поменять тему сайта -- есть 2 светлые и 2 тёмные темы!'
- Hymn1: 'Приветствуем Вас на Саясайте!'
- Hymn2: 'Мы Вас столько ждали!'
- Hymn3: 'Столько радости от Вас на Саясайте!'
- Hymn4: 'Где бы Вы не были, знайте, -- наша любовь крепка!'
+ Header: "Домашняя страница"
+ Contacts: "Контакты"
+ DidYouKnowThat: "А вы знали, что..."
+ SidebarDescription: "Поясняем за сайдбар"
+ HomePageDescription: "Домашняя страница -- где мы сейчас и находимся!"
+ BlogSearchDescription: "Поиск по блогу. Там размещены мои путевые заметки и, может, что-то ещё!"
+ MarkerMapDescription: "Карта с маркерами моих путевых заметок, -- удобный способ найти интересный регион и перейти на заинтересовавшие посты!"
+ ThemeSwitchDescription: "Позволяет поменять тему сайта -- есть 2 светлые и 2 тёмные темы!"
+ Hymn1: "Приветствуем Вас на Саясайте!"
+ Hymn2: "Мы Вас столько ждали!"
+ Hymn3: "Столько радости от Вас на Саясайте!"
+ Hymn4: "Где бы Вы не были, знайте, -- наша любовь крепка!"
UnsubscribePage:
- Header: 'Отписка'
- UnsetCode: 'Код для отписки не проставлен. Вы случайно не заблудились?'
- InvalidCode: 'Код для отписки не подтверждён. Может, истекло время в сутки для кода. А может, вы уже успели отписаться.'
- OnServerError: 'Мы не смогли вас отписать, проблема на нашей стороне! В скором времени займёмся проблемой.'
- Success: 'Вы отписались от рассылки! Надеюсь, мы ещё сможем вас заинтересовать.'
+ Header: "Отписка"
+ UnsetCode: "Код для отписки не проставлен. Вы случайно не заблудились?"
+ InvalidCode: "Код для отписки не подтверждён. Может, истекло время в сутки для кода. А может, вы уже успели отписаться."
+ OnServerError: "Мы не смогли вас отписать, проблема на нашей стороне! В скором времени займёмся проблемой."
+ Success: "Вы отписались от рассылки! Надеюсь, мы ещё сможем вас заинтересовать."
Metadata:
- Published: 'Опубликовано'
- Action: 'Время действия'
+ Published: "Опубликовано"
+ Action: "Время действия"
Mail:
- UnsubscribeFooter: 'Если данное письмо пришло вам случайно, либо вы хотите отписаться, можете перейти по {}этой ссылке{/}.'
+ UnsubscribeFooter: "Если данное письмо пришло вам случайно, либо вы хотите отписаться, можете перейти по {}этой ссылке{/}."
VerifyEmail:
- Subject: 'Ссылка для верификации для подтверждения вашей почты SAYA.TODAY'
- Welcome: 'Приветствую!'
- Intro: 'Есть 2 способа, чтобы подтвердить свою электронную почту:'
- GotoLink: 'Перейти по этой ссылке:'
- InputCode: 'Либо ввести этот код на странице подписок:'
- IfRandom: 'Если ты не понимаешь, что это за спам, можешь проигнорировать это письмо, а ещё, если интересно, можешь посетить мой сайт :)'
+ Subject: "Ссылка для верификации для подтверждения вашей почты SAYA.UZ"
+ Welcome: "Приветствую!"
+ Intro: "Есть 2 способа, чтобы подтвердить свою электронную почту:"
+ GotoLink: "Перейти по этой ссылке:"
+ InputCode: "Либо ввести этот код на странице подписок:"
+ IfRandom: "Если ты не понимаешь, что это за спам, можешь проигнорировать это письмо, а ещё, если интересно, можешь посетить мой сайт :)"
NewPost:
- Subject: 'Новый пост на SAYA.TODAY!'
- Intro: 'Вышел новый пост!'
- CapturedOn: 'Снималось'
+ Subject: "Новый пост на SAYA.UZ!"
+ Intro: "Вышел новый пост!"
+ CapturedOn: "Снималось"
UserProfile:
- Header: 'Личные настройки'
- Description: 'Здесь можно настроить и верифицировать свою электронную почту, а также подписаться на избранные темы блога'
- EmailHeader: 'E-Mail'
- VerificationCodeHeader: 'Код верификации'
- TypeEmail: 'Пожалуйста, введите свою почту'
- SendCodeButton: 'Отправить код'
- VerifyButton: 'Верифицировать'
- VerificationCodeSent: 'Выслали вам код верификации! Проверьте свою почту. Следующая попытка верификации будет возможна {}.'
- DelayTilVerification: 'Вы уже запрашивали недавно верификацию! Дождитесь {} для новой попытки.'
- FailedEmailRender: 'Неудачная попытка создать электронное письмо, более подробно спрашивайте у администратора.'
- VerificationCodeSendingError: 'Неудачная попытка прислать код для верификации, более подробно спрашивайте у администратора.'
- EmailAlreadyValidated: 'Эту почту вы уже подтверждали.'
- EmailTaken: 'Эта почта уже занята.'
- EmailEmpty: 'Почта не введена.'
- VerificationSuccess: 'Поздравляем! Теперь по этой почте можно подписаться на блог.'
- VerificationFailed: 'Код для верификации невалиден, при вопросах, пожалуйста, обращайтесь к администратору.'
- VerificationEmpty: 'Код для верификации не введён.'
- SubscriptionHeader: 'Подписаться на...'
- TagsNone: 'Ничего'
- TagsAll: 'Всё'
- TagsSpecific: 'Определённое'
+ Header: "Личные настройки"
+ Description: "Здесь можно настроить и верифицировать свою электронную почту, а также подписаться на избранные темы блога"
+ EmailHeader: "E-Mail"
+ VerificationCodeHeader: "Код верификации"
+ TypeEmail: "Пожалуйста, введите свою почту"
+ SendCodeButton: "Отправить код"
+ VerifyButton: "Верифицировать"
+ VerificationCodeSent: "Выслали вам код верификации! Проверьте свою почту. Следующая попытка верификации будет возможна {}."
+ DelayTilVerification: "Вы уже запрашивали недавно верификацию! Дождитесь {} для новой попытки."
+ FailedEmailRender: "Неудачная попытка создать электронное письмо, более подробно спрашивайте у администратора."
+ VerificationCodeSendingError: "Неудачная попытка прислать код для верификации, более подробно спрашивайте у администратора."
+ EmailAlreadyValidated: "Эту почту вы уже подтверждали."
+ EmailTaken: "Эта почта уже занята."
+ EmailEmpty: "Почта не введена."
+ VerificationSuccess: "Поздравляем! Теперь по этой почте можно подписаться на блог."
+ VerificationFailed: "Код для верификации невалиден, при вопросах, пожалуйста, обращайтесь к администратору."
+ VerificationEmpty: "Код для верификации не введён."
+ SubscriptionHeader: "Подписаться на..."
+ TagsNone: "Ничего"
+ TagsAll: "Всё"
+ TagsSpecific: "Определённое"
TagDoesNotExist: 'Тэга "{}" нет на сайте.'
TagAlreadyAdded: 'Тэг "{}" уже у вас добавлен.'
- SaveButton: 'Сохранить'
- SubscribeInvalidType: 'Неизвестный тип подписки.'
- FailedToSubscribe: 'Неудачная попытка записать новую подписку, более подробно спрашивайте у администратора.'
- SubscribedSuccessfully: 'Вы успешно подписались по новым настройкам!'
- RefreshPage: 'Пожалуйста, обновите страницу с профилем на устройстве, откуда запрашивали код.'
+ SaveButton: "Сохранить"
+ SubscribeInvalidType: "Неизвестный тип подписки."
+ FailedToSubscribe: "Неудачная попытка записать новую подписку, более подробно спрашивайте у администратора."
+ SubscribedSuccessfully: "Вы успешно подписались по новым настройкам!"
+ RefreshPage: "Пожалуйста, обновите страницу с профилем на устройстве, откуда запрашивали код."
diff --git a/views/layouts/general-mail.html b/views/layouts/general-mail.html
index 00bd964..452982a 100644
--- a/views/layouts/general-mail.html
+++ b/views/layouts/general-mail.html
@@ -1,99 +1,119 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
- <meta charset="UTF-8">
+ <meta charset="UTF-8" />
<head>
<style>
-@font-face {
- font-family: 'Gentium Plus';
- font-style: normal;
- font-weight: 400;
- font-display: swap;
- src: local('Gentium Plus'),
- url(https://fonts.gstatic.com/s/gentiumplus/v2/Iurd6Ytw-oSPaZ00r2bNe8VZj5FNym499r7e.woff2) format('woff2');
- unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
-}
-@font-face {
- font-family: 'Gentium Plus';
- font-style: normal;
- font-weight: 400;
- font-display: swap;
- src: local('Gentium Plus'),
- url(https://fonts.gstatic.com/s/gentiumplus/v2/Iurd6Ytw-oSPaZ00r2bNe8VZi5FNym499g.woff2) format('woff2');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
-}
-html {
- font-family: 'Gentium Plus', sans-serif;
- --bg-paper: url(data:image/webp;base64,UklGRi4BAABXRUJQVlA4ICIBAABQCQCdASqAAIAAPm02lUmkIqIkIImIgA2JaW3rMFmGDAOKLAoJtP591ByFR74Tun2DP+Lygpfsz5FH7+cKgxi2Islfd03i5AJdXUfU0SDc8SXYAAD++hlzeYAJWQEF8ZdkJdlcA+5btZg0FMGaso8SHoBph0qAOQysElJ5C5SJFNoKIV1J550UyL7Y9Gh0/c/uzLnBmr8lvz7k1WeA81H4S5ViU/wBqa7aM1m8D9rDtrk8cSTqx+xWF6MS8UfZGSsks6CT/igtgv6syFN9uNA3LjnjiCJKYOvFcMkX+jB2578GWVo3nyLaM1QNPYCxn3TiUbnf7U0MdD2NsBpg1+Jd1wu6yW/U+goN+IQS6Nt4RMWltVcZHlxrneKJi0SobO0AAA==);
-}
-body {
- background-color: #e3e6ff;
-}
-a {
- text-decoration: underline;
- text-shadow: none !important;
-}
-.header {
- width: 100%;
- padding: 8px 8px 8px 32px;
- font-size: 48px;
- color: white;
- text-shadow: -2px 0 #343b58, 0 2px #343b58, 2px 0 #343b58, 0 -2px #343b58;
- background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='80'><path fill='#e5e8ff' d='M0 0h40v80H0z'/><g fill='none' stroke-linecap='square' stroke-width='4.5'><path stroke='#8d4453' d='m-10 5 20 10L30 5l20 10'/><path stroke='#375e0d' d='m-10 25 20 10 20-10 20 10'/><path stroke='#006a85' d='m-10 45 20 10 20-10 20 10'/><path stroke='#5a3e8e' d='m-10 65 20 10 20-10 20 10'/></g></svg>");
- background-color: #e3e6ff;
- background-size: contain;
- background-repeat: repeat-x;
-}
-.content {
- margin: 0 32px 0 32px;
- padding: 16px 16px 32px 16px;
- font-size: 24px;
- text-shadow: -1px 0 #343b58, 0 1px #343b58, 1px 0 #343b58, 0 -1px #343b58;
- color: white;
- background-color: #c3caff;
- background-image: var(--bg-paper);
- background-blend-mode: multiply;
- background-repeat: repeat;
- background-size: 128px;
-}
-.footer {
- margin: 0;
- padding: 1px 8px 1px 8px;
- font-size: 16px;
- color: white;
-}
-.darkened {
- background-color: #9aa5f4;
- background-image: var(--bg-paper);
- background-blend-mode: multiply;
- background-repeat: repeat;
- background-size: 128px;
-}
-.outlier {
- padding-inline: 4px;
- background-color: #6c6e75;
- background-image: var(--bg-paper);
- background-blend-mode: multiply;
- background-repeat: repeat;
- background-size: 128px;
-}
-table,th,td {
- border: 1px solid black;
-}
-td {
- padding: 5px;
-}
-img {
- width: 200px;
-}
+ @font-face {
+ font-family: "Gentium Plus";
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src:
+ local("Gentium Plus"),
+ url(https://fonts.gstatic.com/s/gentiumplus/v2/Iurd6Ytw-oSPaZ00r2bNe8VZj5FNym499r7e.woff2)
+ format("woff2");
+ unicode-range:
+ U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+ }
+ @font-face {
+ font-family: "Gentium Plus";
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src:
+ local("Gentium Plus"),
+ url(https://fonts.gstatic.com/s/gentiumplus/v2/Iurd6Ytw-oSPaZ00r2bNe8VZi5FNym499g.woff2)
+ format("woff2");
+ unicode-range:
+ U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
+ U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC,
+ U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+ }
+ html {
+ font-family: "Gentium Plus", sans-serif;
+ --bg-paper: url(data:image/webp;base64,UklGRi4BAABXRUJQVlA4ICIBAABQCQCdASqAAIAAPm02lUmkIqIkIImIgA2JaW3rMFmGDAOKLAoJtP591ByFR74Tun2DP+Lygpfsz5FH7+cKgxi2Islfd03i5AJdXUfU0SDc8SXYAAD++hlzeYAJWQEF8ZdkJdlcA+5btZg0FMGaso8SHoBph0qAOQysElJ5C5SJFNoKIV1J550UyL7Y9Gh0/c/uzLnBmr8lvz7k1WeA81H4S5ViU/wBqa7aM1m8D9rDtrk8cSTqx+xWF6MS8UfZGSsks6CT/igtgv6syFN9uNA3LjnjiCJKYOvFcMkX+jB2578GWVo3nyLaM1QNPYCxn3TiUbnf7U0MdD2NsBpg1+Jd1wu6yW/U+goN+IQS6Nt4RMWltVcZHlxrneKJi0SobO0AAA==);
+ }
+ body {
+ background-color: #e3e6ff;
+ }
+ a {
+ text-decoration: underline;
+ text-shadow: none !important;
+ }
+ .header {
+ width: 100%;
+ padding: 8px 8px 8px 32px;
+ font-size: 48px;
+ color: white;
+ text-shadow:
+ -2px 0 #343b58,
+ 0 2px #343b58,
+ 2px 0 #343b58,
+ 0 -2px #343b58;
+ background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='80'><path fill='#e5e8ff' d='M0 0h40v80H0z'/><g fill='none' stroke-linecap='square' stroke-width='4.5'><path stroke='#8d4453' d='m-10 5 20 10L30 5l20 10'/><path stroke='#375e0d' d='m-10 25 20 10 20-10 20 10'/><path stroke='#006a85' d='m-10 45 20 10 20-10 20 10'/><path stroke='#5a3e8e' d='m-10 65 20 10 20-10 20 10'/></g></svg>");
+ background-color: #e3e6ff;
+ background-size: contain;
+ background-repeat: repeat-x;
+ }
+ .content {
+ margin: 0 32px 0 32px;
+ padding: 16px 16px 32px 16px;
+ font-size: 24px;
+ text-shadow:
+ -1px 0 #343b58,
+ 0 1px #343b58,
+ 1px 0 #343b58,
+ 0 -1px #343b58;
+ color: white;
+ background-color: #c3caff;
+ background-image: var(--bg-paper);
+ background-blend-mode: multiply;
+ background-repeat: repeat;
+ background-size: 128px;
+ }
+ .footer {
+ margin: 0;
+ padding: 1px 8px 1px 8px;
+ font-size: 16px;
+ color: white;
+ }
+ .darkened {
+ background-color: #9aa5f4;
+ background-image: var(--bg-paper);
+ background-blend-mode: multiply;
+ background-repeat: repeat;
+ background-size: 128px;
+ }
+ .outlier {
+ padding-inline: 4px;
+ background-color: #6c6e75;
+ background-image: var(--bg-paper);
+ background-blend-mode: multiply;
+ background-repeat: repeat;
+ background-size: 128px;
+ }
+ table,
+ th,
+ td {
+ border: 1px solid black;
+ }
+ td {
+ padding: 5px;
+ }
+ img {
+ width: 200px;
+ }
</style>
</head>
<body>
- <div id="header" class="header">
- saya.today
- </div>
+ <div id="header" class="header">saya.uz</div>
- <div id="content" class="content" style="background-color: #e3e6ff !important;">
+ <div
+ id="content"
+ class="content"
+ style="background-color: #e3e6ff !important"
+ >
{{ block "body" . }}{{ end }}
</div>
diff --git a/views/pages/global-map.html b/views/pages/global-map.html
index 2459ca1..aa6ddfd 100644
--- a/views/pages/global-map.html
+++ b/views/pages/global-map.html
@@ -1,306 +1,412 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="{{ .L.GlobalMap.Description }}">
- <meta property="og:title" content="{{ .L.GlobalMap.Header }}">
- <meta property="og:description" content="{{ .L.GlobalMap.Description }}">
- <meta property="og:url" content="{{ .CanonicalEndpoint }}/{{ .Lang }}/map">
- <meta property="og:type" content="site">
- <title>{{ .L.GlobalMap.Header }} // SAYA TODAY</title>
- <link rel="canonical" href="{{ .CanonicalEndpoint }}/{{ .Lang }}/map">
- <link rel="stylesheet" href="{{ .StaticStorageBaseUrl }}/libs/font-awesome/7.2.0/css/fontawesome.min.css">
- <link rel="stylesheet" href="{{ .StaticStorageBaseUrl }}/libs/font-awesome/7.2.0/css/brands.min.css">
- <link rel="stylesheet" href="{{ .StaticStorageBaseUrl }}/libs/font-awesome/7.2.0/css/solid.min.css">
- {{ block "header" . }}{{ end }}
- <link href="/output.css" rel="stylesheet">
- <link rel="stylesheet" href="{{ .StaticStorageBaseUrl }}/libs/leaflet/1.9.4/leaflet.css">
- <link rel="stylesheet" href="{{ .StaticStorageBaseUrl }}/libs/leaflet.markercluster/1.4.1/MarkerCluster.css">
- <link rel="stylesheet" href="{{ .StaticStorageBaseUrl }}/libs/leaflet.markercluster/1.4.1/MarkerCluster.Default.css">
-</head>
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="description" content="{{ .L.GlobalMap.Description }}" />
+ <meta property="og:title" content="{{ .L.GlobalMap.Header }}" />
+ <meta
+ property="og:description"
+ content="{{ .L.GlobalMap.Description }}"
+ />
+ <meta
+ property="og:url"
+ content="{{ .CanonicalEndpoint }}/{{ .Lang }}/map"
+ />
+ <meta property="og:type" content="site" />
+ <title>{{ .L.GlobalMap.Header }} // SAYA.UZ</title>
+ <link rel="canonical" href="{{ .CanonicalEndpoint }}/{{ .Lang }}/map" />
+ <link
+ rel="stylesheet"
+ href="{{ .StaticStorageBaseUrl }}/libs/font-awesome/7.2.0/css/fontawesome.min.css"
+ />
+ <link
+ rel="stylesheet"
+ href="{{ .StaticStorageBaseUrl }}/libs/font-awesome/7.2.0/css/brands.min.css"
+ />
+ <link
+ rel="stylesheet"
+ href="{{ .StaticStorageBaseUrl }}/libs/font-awesome/7.2.0/css/solid.min.css"
+ />
+ {{ block "header" . }}{{ end }}
+ <link href="/output.css" rel="stylesheet" />
+ <link
+ rel="stylesheet"
+ href="{{ .StaticStorageBaseUrl }}/libs/leaflet/1.9.4/leaflet.css"
+ />
+ <link
+ rel="stylesheet"
+ href="{{ .StaticStorageBaseUrl }}/libs/leaflet.markercluster/1.4.1/MarkerCluster.css"
+ />
+ <link
+ rel="stylesheet"
+ href="{{ .StaticStorageBaseUrl }}/libs/leaflet.markercluster/1.4.1/MarkerCluster.Default.css"
+ />
+ </head>
-<body data-theme="ram" class="font-m-plus text-main-hard overflow-hidden bg-interlocked-hexagons h-dvh">
-
- <script>
- function switchTheme(theme) {
- if (theme == "" || typeof theme == "undefined") {
- const currentTheme = document.body.getAttribute('data-theme');
- switch (currentTheme) {
- case "olive": theme = "lettuce"; break;
- case "lettuce": theme = "night"; break;
- case "night": theme = "ram"; break;
- case "ram": theme = "lilac"; break;
- case "lilac": theme = "olive"; break;
+ <body
+ data-theme="ram"
+ class="font-m-plus text-main-hard overflow-hidden bg-interlocked-hexagons h-dvh"
+ >
+ <script>
+ function switchTheme(theme) {
+ if (theme == "" || typeof theme == "undefined") {
+ const currentTheme =
+ document.body.getAttribute("data-theme");
+ switch (currentTheme) {
+ case "olive":
+ theme = "lettuce";
+ break;
+ case "lettuce":
+ theme = "night";
+ break;
+ case "night":
+ theme = "ram";
+ break;
+ case "ram":
+ theme = "lilac";
+ break;
+ case "lilac":
+ theme = "olive";
+ break;
+ }
}
+ localStorage.setItem("theme", theme);
+ document.body.setAttribute("data-theme", theme);
}
- localStorage.setItem('theme', theme);
- document.body.setAttribute('data-theme', theme);
- }
- const savedTheme = localStorage.getItem('theme') || 'lilac';
- switchTheme(savedTheme);
- </script>
+ const savedTheme = localStorage.getItem("theme") || "lilac";
+ switchTheme(savedTheme);
+ </script>
- <script>
- const clientTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
+ <script>
+ const clientTimeZone =
+ Intl.DateTimeFormat().resolvedOptions().timeZone;
- function convertRemToPixels(rem) {
- return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
- }
- </script>
+ function convertRemToPixels(rem) {
+ return (
+ rem *
+ parseFloat(
+ getComputedStyle(document.documentElement).fontSize,
+ )
+ );
+ }
+ </script>
- <div id="sidebar" class="bg-sidebar block fixed shadow-[0_0_0.4rem_black] z-1001 w-fit h-auto">
- <div class="text-[3rem] flex flex-col gap-0 relative z-1001">
- <a href="./" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
- <i class="fas fa-circle-left flex faw-18 h-18 content-center text-center text-sidebar"></i>
- </a>
- <a href="/{{ .Lang }}" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
- <i class="fas fa-home flex faw-18 h-18 content-center text-center text-sidebar"></i>
- </a>
- <a href="/{{ .Lang }}/blog" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
- <i class="fas fa-search flex faw-18 h-18 content-center text-center text-sidebar"></i>
- </a>
- <a href="/{{ .Lang }}/map" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
- <i class="fas fa-map flex faw-18 h-18 content-center text-center text-sidebar"></i>
- </a>
- <div id="toolbar-theme-button" onclick="toggleThemeWheel();" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
- <i id="toolbar-theme-button-content" class="fas fa-swatchbook flex faw-18 h-18 content-center text-center text-sidebar"></i>
+ <div
+ id="sidebar"
+ class="bg-sidebar block fixed shadow-[0_0_0.4rem_black] z-1001 w-fit h-auto"
+ >
+ <div class="text-[3rem] flex flex-col gap-0 relative z-1001">
+ <a
+ href="./"
+ class="themed-button themed-button-sidebar w-fit h-fit"
+ draggable="false"
+ >
+ <i
+ class="fas fa-circle-left flex faw-18 h-18 content-center text-center text-sidebar"
+ ></i>
+ </a>
+ <a
+ href="/{{ .Lang }}"
+ class="themed-button themed-button-sidebar w-fit h-fit"
+ draggable="false"
+ >
+ <i
+ class="fas fa-home flex faw-18 h-18 content-center text-center text-sidebar"
+ ></i>
+ </a>
+ <a
+ href="/{{ .Lang }}/blog"
+ class="themed-button themed-button-sidebar w-fit h-fit"
+ draggable="false"
+ >
+ <i
+ class="fas fa-search flex faw-18 h-18 content-center text-center text-sidebar"
+ ></i>
+ </a>
+ <a
+ href="/{{ .Lang }}/map"
+ class="themed-button themed-button-sidebar w-fit h-fit"
+ draggable="false"
+ >
+ <i
+ class="fas fa-map flex faw-18 h-18 content-center text-center text-sidebar"
+ ></i>
+ </a>
+ <div
+ id="toolbar-theme-button"
+ onclick="toggleThemeWheel()"
+ class="themed-button themed-button-sidebar w-fit h-fit"
+ draggable="false"
+ >
+ <i
+ id="toolbar-theme-button-content"
+ class="fas fa-swatchbook flex faw-18 h-18 content-center text-center text-sidebar"
+ ></i>
+ </div>
+ <a
+ href="/{{ .Lang }}/user"
+ id="sidebar-user-button"
+ class="themed-button themed-button-sidebar w-fit h-fit"
+ draggable="false"
+ >
+ <i
+ onclick="return changeUrl('/{{ .Lang }}/user');"
+ class="fas fa-user flex faw-18 h-18 content-center text-center text-sidebar"
+ ></i>
+ </a>
+ </div>
+ <div class="theme-wheel" id="theme-wheel">
+ <div class="theme-icon" data-theme="olive"></div>
+ <div class="theme-icon" data-theme="lettuce"></div>
+ <div class="theme-icon" data-theme="night"></div>
+ <div class="theme-icon" data-theme="ram"></div>
+ <div class="theme-icon" data-theme="lilac"></div>
+ <div class="theme-pin"></div>
</div>
- <a href="/{{ .Lang }}/user" id="sidebar-user-button" class="themed-button themed-button-sidebar w-fit h-fit" draggable="false">
- <i onclick="return changeUrl('/{{ .Lang }}/user');" class="fas fa-user flex faw-18 h-18 content-center text-center text-sidebar"></i>
- </a>
- </div>
- <div class="theme-wheel" id="theme-wheel">
- <div class="theme-icon" data-theme="olive"></div>
- <div class="theme-icon" data-theme="lettuce"></div>
- <div class="theme-icon" data-theme="night"></div>
- <div class="theme-icon" data-theme="ram"></div>
- <div class="theme-icon" data-theme="lilac"></div>
- <div class="theme-pin"></div>
</div>
- </div>
-
- <div id="map-container" class="bg-paper bg-background-dark flex z-10 w-full h-full"></div>
-
- <script src="{{ .StaticStorageBaseUrl }}/libs/htmx/2.0.6/htmx.min.js"></script>
- <script src="{{ .StaticStorageBaseUrl }}/libs/leaflet/1.9.4/leaflet.js"></script>
- <script src="{{ .StaticStorageBaseUrl }}/libs/leaflet.markercluster/1.4.1/leaflet.markercluster.js"></script>
-
- <script>
- const themeWheel = document.getElementById('theme-wheel');
- const themeButton = document.getElementById('toolbar-theme-button');
- const themeIcons = document.querySelectorAll('.theme-icon');
- const themeWheelRadius = convertRemToPixels(6);
- const THUMB_BASE = "{{ .ThumbnailBaseUrl }}";
-
- themeIcons.forEach(icon => {
- if (icon.getAttribute('data-theme') == savedTheme) {
- icon.classList.add('active');
- }
- });
- function calculateVmax(percent) {
- const viewportWidth = window.innerWidth;
- const viewportHeight = window.innerHeight;
+ <div
+ id="map-container"
+ class="bg-paper bg-background-dark flex z-10 w-full h-full"
+ ></div>
- const largerDimension = Math.max(viewportWidth, viewportHeight);
+ <script src="{{ .StaticStorageBaseUrl }}/libs/htmx/2.0.6/htmx.min.js"></script>
+ <script src="{{ .StaticStorageBaseUrl }}/libs/leaflet/1.9.4/leaflet.js"></script>
+ <script src="{{ .StaticStorageBaseUrl }}/libs/leaflet.markercluster/1.4.1/leaflet.markercluster.js"></script>
- const vmaxValue = (largerDimension / 100) * percent;
+ <script>
+ const themeWheel = document.getElementById("theme-wheel");
+ const themeButton = document.getElementById("toolbar-theme-button");
+ const themeIcons = document.querySelectorAll(".theme-icon");
+ const themeWheelRadius = convertRemToPixels(6);
+ const THUMB_BASE = "{{ .ThumbnailBaseUrl }}";
- return vmaxValue;
- }
+ themeIcons.forEach((icon) => {
+ if (icon.getAttribute("data-theme") == savedTheme) {
+ icon.classList.add("active");
+ }
+ });
- function positionThemeIcons() {
- const sliceAngle = 360 / themeIcons.length;
+ function calculateVmax(percent) {
+ const viewportWidth = window.innerWidth;
+ const viewportHeight = window.innerHeight;
- themeIcons.forEach((icon, index) => {
- const startAngle = index * sliceAngle;
- const endAngle = (index + 1) * sliceAngle;
+ const largerDimension = Math.max(viewportWidth, viewportHeight);
- const clipPath = createSliceClipPath(startAngle, endAngle, themeWheelRadius);
- icon.style.clipPath = clipPath;
- });
- }
+ const vmaxValue = (largerDimension / 100) * percent;
- function createSliceClipPath(startAngle, endAngle, radius) {
- const centerX = radius;
- const centerY = radius;
+ return vmaxValue;
+ }
- let points = `${centerX}px ${centerY}px`;
+ function positionThemeIcons() {
+ const sliceAngle = 360 / themeIcons.length;
- const segments = Math.max(2, Math.ceil(Math.abs(endAngle - startAngle) / 5));
- const angleStep = (endAngle - startAngle) / segments;
+ themeIcons.forEach((icon, index) => {
+ const startAngle = index * sliceAngle;
+ const endAngle = (index + 1) * sliceAngle;
- for (let i = 0; i <= segments; i++) {
- const angle = ((startAngle + angleStep * i - 90) * Math.PI) / 180;
- const x = centerX + Math.cos(angle) * radius;
- const y = centerY + Math.sin(angle) * radius;
- points += `, ${x}px ${y}px`;
+ const clipPath = createSliceClipPath(
+ startAngle,
+ endAngle,
+ themeWheelRadius,
+ );
+ icon.style.clipPath = clipPath;
+ });
}
- points += `, ${centerX}px ${centerY}px`;
-
- return `polygon(${points})`;
- }
+ function createSliceClipPath(startAngle, endAngle, radius) {
+ const centerX = radius;
+ const centerY = radius;
- function positionThemeWheel() {
- const buttonRect = themeButton.getBoundingClientRect();
- const buttonCenterX = buttonRect.left + buttonRect.width / 2;
- const buttonCenterY = buttonRect.top + buttonRect.height / 2;
+ let points = `${centerX}px ${centerY}px`;
- const margin = 0;
+ const segments = Math.max(
+ 2,
+ Math.ceil(Math.abs(endAngle - startAngle) / 5),
+ );
+ const angleStep = (endAngle - startAngle) / segments;
- let wheelX = buttonCenterX - themeWheelRadius;
- let wheelY = buttonCenterY - themeWheelRadius;
+ for (let i = 0; i <= segments; i++) {
+ const angle =
+ ((startAngle + angleStep * i - 90) * Math.PI) / 180;
+ const x = centerX + Math.cos(angle) * radius;
+ const y = centerY + Math.sin(angle) * radius;
+ points += `, ${x}px ${y}px`;
+ }
- const viewportWidth = window.innerWidth;
- const viewportHeight = window.innerHeight;
+ points += `, ${centerX}px ${centerY}px`;
- if (wheelX < margin) {
- wheelX = margin;
- } else if (wheelX + (themeWheelRadius * 2) > viewportWidth - margin) {
- wheelX = viewportWidth - (themeWheelRadius * 2) - margin;
+ return `polygon(${points})`;
}
- if (wheelY < margin) {
- wheelY = margin;
- } else if (wheelY + (themeWheelRadius * 2) > viewportHeight - margin) {
- wheelY = viewportHeight - (themeWheelRadius * 2) - margin;
- }
+ function positionThemeWheel() {
+ const buttonRect = themeButton.getBoundingClientRect();
+ const buttonCenterX = buttonRect.left + buttonRect.width / 2;
+ const buttonCenterY = buttonRect.top + buttonRect.height / 2;
- themeWheel.style.left = wheelX + 'px';
- themeWheel.style.top = wheelY + 'px';
- }
+ const margin = 0;
- function hideThemeWheel() {
- themeWheel.classList.remove('active');
- }
+ let wheelX = buttonCenterX - themeWheelRadius;
+ let wheelY = buttonCenterY - themeWheelRadius;
- function showThemeWheel() {
- positionThemeWheel();
- positionThemeIcons();
- themeWheel.classList.add('active');
- }
+ const viewportWidth = window.innerWidth;
+ const viewportHeight = window.innerHeight;
- function toggleThemeWheel() {
- if (themeWheel.classList.contains('active')) {
- hideThemeWheel();
- } else {
- showThemeWheel();
- }
- }
+ if (wheelX < margin) {
+ wheelX = margin;
+ } else if (
+ wheelX + themeWheelRadius * 2 >
+ viewportWidth - margin
+ ) {
+ wheelX = viewportWidth - themeWheelRadius * 2 - margin;
+ }
- themeIcons.forEach(icon => {
- icon.addEventListener('click', (e) => {
- e.stopPropagation();
- const theme = icon.getAttribute('data-theme');
- switchTheme(theme);
- themeIcons.forEach(icon => {
- icon.classList.remove('active');
- })
- icon.classList.add('active');
- });
- });
+ if (wheelY < margin) {
+ wheelY = margin;
+ } else if (
+ wheelY + themeWheelRadius * 2 >
+ viewportHeight - margin
+ ) {
+ wheelY = viewportHeight - themeWheelRadius * 2 - margin;
+ }
- themeWheel.addEventListener('mouseleave', hideThemeWheel);
+ themeWheel.style.left = wheelX + "px";
+ themeWheel.style.top = wheelY + "px";
+ }
- document.addEventListener('click', (e) => {
- if (!themeWheel.contains(e.target) && e.target !== themeButton && !e.target.classList.contains("toolbar-theme-button-content")) {
- hideThemeWheel();
+ function hideThemeWheel() {
+ themeWheel.classList.remove("active");
}
- });
- </script>
- <script>
- var map;
- var markers = L.markerClusterGroup();
+ function showThemeWheel() {
+ positionThemeWheel();
+ positionThemeIcons();
+ themeWheel.classList.add("active");
+ }
- function createCustomIcon(color, borderColor = "var(--color-main-soft)") {
- const svgIcon = `
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
- <path d="M12 1C7.5 1 4 4.5 4 9c0 6.5 8 14 8 14s8-7.5 8-14c0-4.5-3.5-8-8-8zm0 11c-1.5 0-3-1.5-3-3s1.5-3 3-3 3 1.5 3 3-1.5 3-3 3z"
- fill="${color}"
- stroke="${borderColor}"
- stroke-width="1"
- stroke-linejoin="round"/>
- </svg>
- `;
+ function toggleThemeWheel() {
+ if (themeWheel.classList.contains("active")) {
+ hideThemeWheel();
+ } else {
+ showThemeWheel();
+ }
+ }
- return L.divIcon({
- html: svgIcon,
- className: 'custom-svg-marker',
- iconSize: [32, 32],
- iconAnchor: [16, 32],
- popupAnchor: [0, -32]
+ themeIcons.forEach((icon) => {
+ icon.addEventListener("click", (e) => {
+ e.stopPropagation();
+ const theme = icon.getAttribute("data-theme");
+ switchTheme(theme);
+ themeIcons.forEach((icon) => {
+ icon.classList.remove("active");
+ });
+ icon.classList.add("active");
+ });
});
- }
- function initLocationMap() {
- map = L.map('map-container').setView([{{ .MapLocationLat }}, {{ .MapLocationLong }}], 4);
+ themeWheel.addEventListener("mouseleave", hideThemeWheel);
- L.tileLayer('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', {
- maxZoom: 20,
- attribution: '<a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" title="CyclOSM - Open Bicycle render">CyclOSM</a> | Map data: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
- zoomControl: false
- }).addTo(map);
+ document.addEventListener("click", (e) => {
+ if (
+ !themeWheel.contains(e.target) &&
+ e.target !== themeButton &&
+ !e.target.classList.contains("toolbar-theme-button-content")
+ ) {
+ hideThemeWheel();
+ }
+ });
+ </script>
- L.control.zoom({
- position: 'topright'
- }).addTo(map);
+ <script>
+ var map;
+ var markers = L.markerClusterGroup();
- map.addLayer(markers);
- }
+ function createCustomIcon(color, borderColor = "var(--color-main-soft)") {
+ const svgIcon = `
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+ <path d="M12 1C7.5 1 4 4.5 4 9c0 6.5 8 14 8 14s8-7.5 8-14c0-4.5-3.5-8-8-8zm0 11c-1.5 0-3-1.5-3-3s1.5-3 3-3 3 1.5 3 3-1.5 3-3 3z"
+ fill="${color}"
+ stroke="${borderColor}"
+ stroke-width="1"
+ stroke-linejoin="round"/>
+ </svg>
+ `;
- function markerToHsl(str, newCoef) {
- let hash = 0;
- for (let i = 0; i < str.length / 2; i++) {
- hash = str.charCodeAt(i) + ((hash << 5) - hash);
- hash = str.charCodeAt(str.length - i - 1) + ((hash << 5) - hash);
- hash %= 360;
+ return L.divIcon({
+ html: svgIcon,
+ className: 'custom-svg-marker',
+ iconSize: [32, 32],
+ iconAnchor: [16, 32],
+ popupAnchor: [0, -32]
+ });
}
- return [hash, (20 + newCoef * 80).toFixed(0), (20 + newCoef * 75).toFixed(0)];
- }
+ function initLocationMap() {
+ map = L.map('map-container').setView([{{ .MapLocationLat }}, {{ .MapLocationLong }}], 4);
- function mapAddMarker(x, y, relativeErrorMeters = 0, title = "", link = "", thumbnail = "", newCoef = 1) {
- const [h, s, l] = markerToHsl(title, newCoef);
- const color = `hsl(${h} ${s}% ${l}%)`;
+ L.tileLayer('https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png', {
+ maxZoom: 20,
+ attribution: '<a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" title="CyclOSM - Open Bicycle render">CyclOSM</a> | Map data: &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
+ zoomControl: false
+ }).addTo(map);
- if (relativeErrorMeters != 0) {
- var circle = L.circle([x, y], {
- color: color,
- fillColor: color,
- fillOpacity: 0.15,
- radius: relativeErrorMeters
+ L.control.zoom({
+ position: 'topright'
}).addTo(map);
+
+ map.addLayer(markers);
}
- var marker = L.marker([x, y], {
- icon: createCustomIcon(color),
- title: title,
- }).bindPopup(`
- <div class="flex flex-row justify-center justify-items-center">
- <img onclick="location.href='${link}';" class="cursor-pointer object-cover rounded-[10%] select-none w-12 h-12 mr-1" src="${THUMB_BASE.replace('%s', thumbnail)}">
- <span><b><a href="${link}">${title}</a></b><br><a href="https://www.openstreetmap.org/#map=13/${x}/${y}">${x}, ${y}</a></span>
- </div>`);
+ function markerToHsl(str, newCoef) {
+ let hash = 0;
+ for (let i = 0; i < str.length / 2; i++) {
+ hash = str.charCodeAt(i) + ((hash << 5) - hash);
+ hash = str.charCodeAt(str.length - i - 1) + ((hash << 5) - hash);
+ hash %= 360;
+ }
- markers.addLayer(marker);
- }
+ return [hash, (20 + newCoef * 80).toFixed(0), (20 + newCoef * 75).toFixed(0)];
+ }
- document.addEventListener('DOMContentLoaded', () => {
- initLocationMap();
- {{- range .MapMarkers }}
- mapAddMarker({{ .Lat }}, {{ .Long }}, {{ .AccuracyMeters }}, {{ .Title }}, {{ .PageLink }}, {{ .Thumbnail }}, {{ fdiv .Index (len $.MapMarkers) }});
- {{- end }}
- });
+ function mapAddMarker(x, y, relativeErrorMeters = 0, title = "", link = "", thumbnail = "", newCoef = 1) {
+ const [h, s, l] = markerToHsl(title, newCoef);
+ const color = `hsl(${h} ${s}% ${l}%)`;
- window.addEventListener('resize', function() {
- setTimeout(() => {
- map.invalidateSize();
- }, 100);
- });
- </script>
+ if (relativeErrorMeters != 0) {
+ var circle = L.circle([x, y], {
+ color: color,
+ fillColor: color,
+ fillOpacity: 0.15,
+ radius: relativeErrorMeters
+ }).addTo(map);
+ }
-</body>
+ var marker = L.marker([x, y], {
+ icon: createCustomIcon(color),
+ title: title,
+ }).bindPopup(`
+ <div class="flex flex-row justify-center justify-items-center">
+ <img onclick="location.href='${link}';" class="cursor-pointer object-cover rounded-[10%] select-none w-12 h-12 mr-1" src="${THUMB_BASE.replace('%s', thumbnail)}">
+ <span><b><a href="${link}">${title}</a></b><br><a href="https://www.openstreetmap.org/#map=13/${x}/${y}">${x}, ${y}</a></span>
+ </div>`);
+
+ markers.addLayer(marker);
+ }
+
+ document.addEventListener('DOMContentLoaded', () => {
+ initLocationMap();
+ {{- range .MapMarkers }}
+ mapAddMarker({{ .Lat }}, {{ .Long }}, {{ .AccuracyMeters }}, {{ .Title }}, {{ .PageLink }}, {{ .Thumbnail }}, {{ fdiv .Index (len $.MapMarkers) }});
+ {{- end }}
+ });
+
+ window.addEventListener('resize', function() {
+ setTimeout(() => {
+ map.invalidateSize();
+ }, 100);
+ });
+ </script>
+ </body>
</html>
diff --git a/views/pages/unsubscribe-page.html b/views/pages/unsubscribe-page.html
index bb5d64b..c9de473 100644
--- a/views/pages/unsubscribe-page.html
+++ b/views/pages/unsubscribe-page.html
@@ -1,34 +1,65 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="robots" content="noindex,nofollow">
- <title>{{ .L.UnsubscribePage.Header }} // SAYA TODAY</title>
-<style>
- .bg-paper {
- background-image: url(data:image/webp;base64,UklGRi4BAABXRUJQVlA4ICIBAABQCQCdASqAAIAAPm02lUmkIqIkIImIgA2JaW3rMFmGDAOKLAoJtP591ByFR74Tun2DP+Lygpfsz5FH7+cKgxi2Islfd03i5AJdXUfU0SDc8SXYAAD++hlzeYAJWQEF8ZdkJdlcA+5btZg0FMGaso8SHoBph0qAOQysElJ5C5SJFNoKIV1J550UyL7Y9Gh0/c/uzLnBmr8lvz7k1WeA81H4S5ViU/wBqa7aM1m8D9rDtrk8cSTqx+xWF6MS8UfZGSsks6CT/igtgv6syFN9uNA3LjnjiCJKYOvFcMkX+jB2578GWVo3nyLaM1QNPYCxn3TiUbnf7U0MdD2NsBpg1+Jd1wu6yW/U+goN+IQS6Nt4RMWltVcZHlxrneKJi0SobO0AAA==);
- background-size: 128px;
- background-repeat: repeat;
- background-blend-mode: multiply;
- }
-</style>
-</head>
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta name="robots" content="noindex,nofollow" />
+ <title>{{ .L.UnsubscribePage.Header }} // SAYA.UZ</title>
+ <style>
+ .bg-paper {
+ background-image: url(data:image/webp;base64,UklGRi4BAABXRUJQVlA4ICIBAABQCQCdASqAAIAAPm02lUmkIqIkIImIgA2JaW3rMFmGDAOKLAoJtP591ByFR74Tun2DP+Lygpfsz5FH7+cKgxi2Islfd03i5AJdXUfU0SDc8SXYAAD++hlzeYAJWQEF8ZdkJdlcA+5btZg0FMGaso8SHoBph0qAOQysElJ5C5SJFNoKIV1J550UyL7Y9Gh0/c/uzLnBmr8lvz7k1WeA81H4S5ViU/wBqa7aM1m8D9rDtrk8cSTqx+xWF6MS8UfZGSsks6CT/igtgv6syFN9uNA3LjnjiCJKYOvFcMkX+jB2578GWVo3nyLaM1QNPYCxn3TiUbnf7U0MdD2NsBpg1+Jd1wu6yW/U+goN+IQS6Nt4RMWltVcZHlxrneKJi0SobO0AAA==);
+ background-size: 128px;
+ background-repeat: repeat;
+ background-blend-mode: multiply;
+ }
+ </style>
+ </head>
-<body style="width: 100dvw; height: 100dvh; display: flex; flex-direction: column; position: fixed">
+ <body
+ style="
+ width: 100dvw;
+ height: 100dvh;
+ display: flex;
+ flex-direction: column;
+ position: fixed;
+ "
+ >
+ <div
+ class="bg-paper"
+ style="flex: 3 0 0; background-color: rgba({{ .StatusColor }}, 0.1)"
+ ></div>
- <div class="bg-paper" style='flex: 3 0 0; background-color: rgba({{ .StatusColor }}, 0.1)'></div>
+ <div class="bg-paper" style="flex: 1 0 0; align-content: center">
+ <p
+ style="
+ position: relative;
+ width: 100%;
+ margin-inline: auto;
+ text-align: center;
+ font-size: 2rem;
+ "
+ >
+ {{ .StatusEmoji }}
+ </p>
+ </div>
- <div class="bg-paper" style="flex: 1 0 0; align-content: center;">
- <p style="position: relative; width: 100%; margin-inline: auto; text-align: center; font-size: 2rem;">{{ .StatusEmoji }}</p>
- </div>
-
- <div class="bg-paper" style="flex: 1 0 0; align-content: center;">
- <p style="position: relative; width: 100%; margin-inline: auto; text-align: center; font-size: 1.5rem;">{{ .StatusText }}</p>
- </div>
-
- <div class="bg-paper" style='flex: 3 0 0; background-color: rgba({{ .StatusColor }}, 0.2)'></div>
-
-</body>
+ <div class="bg-paper" style="flex: 1 0 0; align-content: center">
+ <p
+ style="
+ position: relative;
+ width: 100%;
+ margin-inline: auto;
+ text-align: center;
+ font-size: 1.5rem;
+ "
+ >
+ {{ .StatusText }}
+ </p>
+ </div>
+ <div
+ class="bg-paper"
+ style="flex: 3 0 0; background-color: rgba({{ .StatusColor }}, 0.2)"
+ ></div>
+ </body>
</html>
diff --git a/views/partials/general-page-footer.html b/views/partials/general-page-footer.html
index 3001d5d..3f5f9ee 100644
--- a/views/partials/general-page-footer.html
+++ b/views/partials/general-page-footer.html
@@ -1,7 +1,23 @@
{{ block "footer" . }}{{ end }}
-<p class="grow content-center text-base/[1] font-gentium font-thin italic text-right text-secondary mr-1">
- All the photos on <a href="https://saya.today/">saya.today</a> are licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> by <a href="https://t.me/EarlInisMona">Saya Andy</a> © {{ .PublishedYear }}
+<p
+ class="grow content-center text-base/[1] font-gentium font-thin italic text-right text-secondary mr-1"
+>
+ All the photos on <a href="https://saya.uz/">saya.uz</a> are licensed under
+ <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>
+ by <a href="https://t.me/EarlInisMona">Saya Andy</a> © {{ .PublishedYear }}
</p>
-<img class="max-w-4 max-h-4 self-center" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg" alt="CC">
-<img class="max-w-4 max-h-4 self-center" src="https://mirrors.creativecommons.org/presskit/icons/by.svg" alt="BY">
-<img class="max-w-4 max-h-4 self-center" src="https://mirrors.creativecommons.org/presskit/icons/sa.svg" alt="SA"> \ No newline at end of file
+<img
+ class="max-w-4 max-h-4 self-center"
+ src="https://mirrors.creativecommons.org/presskit/icons/cc.svg"
+ alt="CC"
+/>
+<img
+ class="max-w-4 max-h-4 self-center"
+ src="https://mirrors.creativecommons.org/presskit/icons/by.svg"
+ alt="BY"
+/>
+<img
+ class="max-w-4 max-h-4 self-center"
+ src="https://mirrors.creativecommons.org/presskit/icons/sa.svg"
+ alt="SA"
+/>
diff --git a/views/partials/general-page-header.html b/views/partials/general-page-header.html
index ad11ffb..995ebf3 100644
--- a/views/partials/general-page-header.html
+++ b/views/partials/general-page-header.html
@@ -1,5 +1,9 @@
-<title>{{ .Title }} // SAYA TODAY</title>
+<title>{{ .Title }} // SAYA.UZ</title>
<div class="flex flex-row mb-2">
{{ block "header" . }}{{ end }}
- <p class="text-4xl font-m-plus font-bold italic text-shadow-[0_2px_2px_var(--color-main-soft)] text-left my-auto">{{ .Title }}</p>
-</div> \ No newline at end of file
+ <p
+ class="text-4xl font-m-plus font-bold italic text-shadow-[0_2px_2px_var(--color-main-soft)] text-left my-auto"
+ >
+ {{ .Title }}
+ </p>
+</div>