Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #366

Merged
merged 31 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2e6499b
Uchen_webfont_applied
Lungsangg Sep 23, 2024
e299188
Uchen_webfont_applied (#352)
Lungsangg Sep 23, 2024
2a11550
feedbucket_closing_update
Lungsangg Sep 23, 2024
9afabe2
feedbucket_closing_update (#353)
Lungsangg Sep 23, 2024
f26bf10
margin-class
lobsam Sep 24, 2024
aae0fe9
margin-class (#354)
lobsam Sep 24, 2024
3c52a19
edit dropdown margin
lobsam Sep 24, 2024
d5982f8
edit dropdown margin (#355)
lobsam Sep 24, 2024
f27067d
webfont_updated
Lungsangg Sep 25, 2024
4ba50c8
form_localization_update
Lungsangg Sep 25, 2024
0fc1055
Rfc021/dropdown localization (#356)
Lungsangg Sep 25, 2024
61338cf
manifest_json_update
Lungsangg Sep 25, 2024
74c3d1f
manifest_json_update (#357)
Lungsangg Sep 25, 2024
7278c2a
manifest_screenshots_update
Lungsangg Sep 25, 2024
1181501
manifest_screenshots_extension_update
Lungsangg Sep 25, 2024
4a0d483
Rfc021/dropdown localization (#358)
Lungsangg Sep 25, 2024
4a46005
dropdown_localization_update
Lungsangg Sep 25, 2024
758147f
Merge branch 'dev' into RFC021/dropdown_localization
Lungsangg Sep 25, 2024
56cfdbd
dropdown_localization_update (#359)
Lungsangg Sep 25, 2024
5ff485a
manifest_update_for_wpa
Lungsangg Sep 25, 2024
b5fd9a8
manifest_update_for_wpa (#360)
Lungsangg Sep 25, 2024
e1607cf
square_icon_path_added_in_manifest_pwa
Lungsangg Sep 25, 2024
f516153
square_icon_path_added_in_manifest_pwa (#361)
Lungsangg Sep 25, 2024
8f8d9c0
manifest_icon_path_update_pwa
Lungsangg Sep 25, 2024
b6da8e7
manifest_icon_path_update_pwa (#362)
Lungsangg Sep 25, 2024
86a7b9e
text-styling for anotation
lobsam Sep 26, 2024
249687d
text-styling for anotation (#363)
lobsam Sep 26, 2024
cecb48c
feedbucket error fixed
lobsam Sep 27, 2024
d23a2f6
pecha_description_updated
Lungsangg Sep 29, 2024
d1130bb
pecha_description_updated (#364)
Lungsangg Sep 29, 2024
36de842
Dev (#365)
Lungsangg Sep 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified locale/es/LC_MESSAGES/django.mo
Binary file not shown.
Binary file modified locale/he/LC_MESSAGES/django.mo
Binary file not shown.
449 changes: 248 additions & 201 deletions locale/he/LC_MESSAGES/django.po

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions sefaria/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SefariaNewUserForm(EmailUserCreationForm):
# required=False)

CHOICES = [
('', _('Select an option...')),
('', _('Select an option')),
('Monastic', _('Monastic')),
('Teacher', _('Teacher')),
('Student', _('Student')),
Expand All @@ -63,7 +63,8 @@ class SefariaNewUserForm(EmailUserCreationForm):
# Add the select field
user_type = forms.ChoiceField(
choices=CHOICES,
widget=forms.Select(attrs={'placeholder': _("Select an Option")})
widget=forms.Select(attrs={
'class': 'custom-select-large-margin'})
)

captcha_lang = "iw" if get_language() == 'he' else "en"
Expand Down
1 change: 1 addition & 0 deletions static/css/feedbucketStyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
}
.hidden {
display: none;
visibility: hidden;
}

#feedbucketContainer {
Expand Down
39 changes: 32 additions & 7 deletions static/css/s2.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ a, a:hover {
}

@font-face {
/*Tibetan | Jomolhari */
/*Tibetan | Uchen */
font-family: 'Uchen';
src: url('/static/fonts/Uchen-Regular.ttf');
unicode-range: U+0F00-0FFF, U+10300-1032F, U+10380-1039F, U+0FCF, U+0FD0, U+0FD1, U+0FD2, U+0FD3, U+0FD4;
Expand All @@ -164,10 +164,10 @@ a, a:hover {
:root {
/* font stacks */
--english-sans-serif-font-family: "Roboto", "Helvetica Neue", "Helvetica", sans-serif;
--hebrew-sans-serif-font-family: "wujin+gangbi", "Heebo", "Roboto", sans-serif;
--hebrew-sans-serif-font-family: "Uchen", "Heebo", "Roboto", sans-serif;

--english-serif-font-family: "IndUni-P-Regular", "Cardo", "Meltho", "HebrewInEnglish Serif Font", "adobe-garamond-pro", "Crimson Text", Georgia, "Times New Roman", serif, "Noto Sans Samaritan";
--hebrew-serif-font-family: "Uchen-Regular", "Noto Color Emoji", "EnglishInHebrew Serif Font", "Cardo", "Taamey Frank", "adobe-garamond-pro", "Crimson Text", "Times New Roman", serif;
--hebrew-serif-font-family: "wujin+gangbi", "Noto Color Emoji", "EnglishInHebrew Serif Font", "Cardo", "Taamey Frank", "adobe-garamond-pro", "Crimson Text", "Times New Roman", serif;

--serif-h1-font-size: 48px;
--serif-h2-font-size: 30px;
Expand Down Expand Up @@ -236,7 +236,7 @@ body, .sans-serif {

.navSidebarModule > .int-he{
font-size: 19px;
font-family: var(--hebrew-serif-font-family) !important;
font-family: var(--hebrew-sans-serif-font-family) !important;
color: var(--selected-option) !important;
}

Expand All @@ -246,13 +246,13 @@ body, .sans-serif {
}

.navSidebarModule > h3 > .int-he {
font-family: var(--hebrew-serif-font-family) !important;
font-family: var(--hebrew-sans-serif-font-family) !important;
color: var(--selected-option) !important;
}

.navSidebarModule > .downloadTextModule > .button {
font-size: 20px;
font-family: var(--hebrew-serif-font-family) !important;
font-family: var(--hebrew-sans-serif-font-family) !important;
color: var(--selected-option) !important;
}

Expand Down Expand Up @@ -3150,7 +3150,7 @@ input.resourcesLink {
}

a.navBlockTitle {
font-size: 26px;
font-size: 23px;
color: #000;
margin-inline-end: 20px;
}
Expand Down Expand Up @@ -3638,6 +3638,8 @@ a.navBlockTitle:hover {
}

.readerApp.interface-hebrew .readerNavMenu.noLangToggleInHebrew .he {
font-family: "Uchen";
font-size: 20px;
display: inline;
}

Expand Down Expand Up @@ -6621,6 +6623,27 @@ body .ui-autocomplete.dictionary-toc-autocomplete .ui-menu-item a.ui-state-focus
position: relative;
}

/* text subche */
.segment .text-subche-style {
color: var(--pecha-red);
font-size: 30px;
font-style: italic;
}

/* text citation */
.segment .text-citation-style {
position: relative;
background-color: #fff58a;
font-style: bold;
}

/* text quotation */
.segment .text-quotation-style {
position: relative;
text-decoration: underline;
}


.textRange.lowlight .text {
color: #999;
}
Expand Down Expand Up @@ -10808,6 +10831,7 @@ body #keyboardInputMaster tbody tr td table tbody tr td.pressed {
}

.dropdown .dropdownMain {
--is-hebrew: ;
background: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
border-radius: 7px;
Expand All @@ -10827,6 +10851,7 @@ body #keyboardInputMaster tbody tr td table tbody tr td.pressed {
}

.dropdown .dropdownList .dropdownOption {
--is-hebrew: ;
font-size: 18px;
cursor: pointer;
padding: 0 22px;
Expand Down
15 changes: 14 additions & 1 deletion static/css/static.css
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,20 @@
padding-top: 10px;
padding-bottom: 10px;
}
.registrationContent #register-form p:nth-of-type(5){
.registrationContent #register-form p:nth-of-type(6){
padding-top: 10px;
}
/* Style the select element */
.registrationContent #register-form .custom-select-large-margin option {
padding: 12px;
font-size: 16px;
height: 2.5em; /* Ensures sufficient space */
}
/* Style the individual options within the select */
.registrationContent #register-form .custom-select-large-margin option {
padding: 15px 20px; /* Increase padding inside each option to simulate margin */
color:rgba(0, 0, 0, 0.572);
}
input#id_email::placeholder {
text-align: left;
}
Expand All @@ -618,6 +629,8 @@ input#id_email{
.registrationContent a.registration-links:hover{
color: #666;
}


p.registration-links a{
color: #999;
text-decoration: none;
Expand Down
91 changes: 51 additions & 40 deletions static/js/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,49 +431,60 @@ const LoggedOutButtons = ({mobile, loginOnly}) => {
);
}
const loadFeedBucket = (e) => {
const s = document.createElement('script');
s.module = true;
s.defer = true;
s.src = "https://cdn.feedbucket.app/assets/feedbucket.js";
s.dataset.feedbucket = '0csPeBQ216w32NZdoqnk';
document.head.appendChild(s);
const crossImage =document.querySelector("#crossImage");
crossImage.classList.toggle('hidden');

const feedbucket = document.querySelector("feedbucket-app");
if (feedbucket) {
// Toggle visibility of feedbucket
const isHidden = feedbucket.classList.toggle('hidden');

// Update visibility of crossImage based on feedbucket's visibility
if (isHidden) {
// If feedbucket is hidden, hide crossImage
crossImage.classList.add('hidden');
} else {
// If feedbucket is visible, show crossImage
crossImage.classList.remove('hidden');
}
// Function to check and hide feedbucket if necessary
function checkAndHideFeedbucket() {
if (crossImage.classList.contains('hidden') && !feedbucket.classList.contains('hidden')) {
// Use setTimeout to delay the hiding of feedbucket
setTimeout(() => {
feedbucket.classList.add('hidden'); // Hide feedbucket after delay
}, 3000); // Adjust the delay as needed (3000 ms = 3 seconds)
}
}
// Example event listener for crossImage click
crossImage.addEventListener('click', function() {
// Toggle the visibility of crossImage
crossImage.classList.toggle('hidden');

// Check and hide feedbucket if conditions are met
checkAndHideFeedbucket();
});
}

const crossImage =document.querySelector("#crossImage");
const feedbucket = document.querySelector("feedbucket-app");
feedbucket.classList.remove('hidden');
feedbucket.style.display = "block";
crossImage.classList.remove('hidden');

};


// function loadFeedBucket() {
// const s = document.createElement('script');
// s.module = true;
// s.defer = true;
// s.src = "https://cdn.feedbucket.app/assets/feedbucket.js";
// s.dataset.feedbucket = '0csPeBQ216w32NZdoqnk';
// document.head.appendChild(s);

// s.onload = function() {
// const feedbucket = document.querySelector("feedbucket-app");
// const crossImage = document.querySelector("#crossImage");
// const openImage = document.querySelector("#openImage");

// function toggleFeedbucket() {
// if (feedbucket.classList.contains('hidden')) {
// openFeedbucket(feedbucket);
// } else {
// closeFeedbucket(feedbucket);
// }
// }

// function openFeedbucket(feedbucket) {
// feedbucket.classList.remove('hidden');
// feedbucket.style.display = "block";
// crossImage.classList.remove('hidden');
// openImage.classList.add('hidden');
// }

// function closeFeedbucket(feedbucket) {
// feedbucket.classList.add('hidden');
// feedbucket.style.display = "none";
// crossImage.classList.add('hidden');
// openImage.classList.remove('hidden');
// }

// // Add event listeners to both images to toggle feedbucket
// crossImage.addEventListener("click", toggleFeedbucket);
// openImage.addEventListener("click", toggleFeedbucket);

// // Initial state
// feedbucket.classList.add('hidden'); // Initially hide feedbucket
// };
// }

const LoggedInButtons = ({headerMode}) => {
const [isClient, setIsClient] = useState(false);
useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion static/js/sefaria/localizationLanguage/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
"text.edit.origin": "Origin:",
"text.edit.translation_language:": "Translation language:",
"side_nav.about_pecha_title":"A Living Library of Buddhist Text",
"side_nav.about_pecha_description": "The Pecha platform provides access to Buddhist scriptures in a variety of languages and styles to accommodate everyone's needs. By searching for a single verse, users can discover its origins, various interpretations, translations into different languages, commentaries, annotations, sub-commentaries, and references in other scriptures—all in one place. Whether casually exploring various scriptures or engaging in deep study, users can share insights or personal experiences related to the subject through notes or comments with other Dharma friends. Additionally, users can gain from the fresh insights shared by fellow readers in their notes.",
"side_nav.about_pecha_description": "Pecha connects users to Buddhist scriptures in various languages. Search a verse to explore its origins, interpretations, and related texts. Engage with the community by sharing insights and learning from others through sheets and topics.",
"side_nav.about_text": "About This Text",
"side_nav.related_topic":"Related Topics",
"side_nav.download_text":"Download Text",
Expand Down
2 changes: 1 addition & 1 deletion static/js/sefaria/localizationLanguage/tibetan.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
"text.edit.origin": "འབྱུང་ཁུངས།",
"text.edit.translation_language:": "བསྒྱུར་སའི་སྐད་ཡིག།",
"side_nav.about_pecha_title":"ནང་པའི་དཔེ་ཆ་དྲ་བ།",
"side_nav.about_pecha_description": "དཔེ་ཆ་དྲ་བའི་ནང་དུ་ཁྱེད་རང་གི་དགོས་མཁོ་དང་འཚམ་པའི་ནང་པའི་གསུང་རབ་སྣ་ཚོགས་བཞུགས་ཡོད། དྲ་རྒྱ་འདིའི་ཁྱད་ཆོས་ནི། ཀློག་མཁན་རྣམས་ཀྱིས་སྟབས་བདེ་བོའི་ངང་ནས་གཞུང་ལུགས་ཆེན་པོ་རྣམས་ལ་སློབ་སྦྱོང་བྱེད་ཐུབ་ཀྱི་ཡོད། དཔེར་ན། རྩ་ཚིག་གཅིག་ཙམ་བཙལ་བས། ཚིག་དེ་གང་ནས་འབྱུང་བའི་ཁུངས་དང་། ཚིག་སྦྱོར་དང་འགྱུར་མི་འདྲ་བ། སྐད་ཡིག་གཞན་པའི་ནང་དུ་འགྱུར་བ་གང་ཡོད། རྩ་ཚིག་དེའི་འགྲེལ་བ་དང་། མཆན་འགྲེལ། ཡང་འགྲེལ། བསྟན་བཅོས་གཞན་པའི་ནང་དུ་ཚིག་དེ་ལུང་དྲངས་པ་སོགས་དེ་དང་འབྲེལ་ཡོད་ཕལ་ཆེ་བ་སྟབས་གཅིག་ཏུ་ཀློག་ཐུབ། ཀློག་མཁན་ཁྱེད་ཀྱིས་ཐུགས་ལྷོད་ལྷོད་ངང་གསུང་རབ་སྣ་ཚོགས་ལ་རགས་བལྟ་དང་། ཞིབ་ཀློག་བྱེད་པའི་ཞོར་དུ། སྐབས་བབ་བརྗོད་བྱ་དང་འབྲེལ་བའི་གོ་རྟོགས་གསར་པའམ། ཡང་ན་རང་གི་མི་ཚེའི་ནང་བྱུང་བའི་སྐྱིད་སྡུག་གི་ཉམས་མྱོང་རྣམས་ཟིན་བྲིས་དང་། མཆན་དུ་བྲིས་ཏེ་ཆོས་གྲོགས་གཞན་གྱི་ལོངས་སྤྱོད་དུ་སྤེལ་ཆོག་ལ་། ཆོས་གྲོགས་གཞན་གྱི་མྱོང་རྟོགས་གསར་པ་རྣམས་ཀྱང་རང་ཉིད་ཀྱིས་ལོངས་སྤྱོད་བྱེད་ཐུབ་ཀྱི་ཡོད།",
"side_nav.about_pecha_description": "དཔེ་ཆ་དྲ་བ་སྤྱོད་མཁན་རྣམས་ཀྱིས་སྐད་རིགས་འདྲ་མིན་གྱི་ནང་པའི་གསུང་རབ་དང་འབྲེལ་མཐུད་བྱེད་ཐུབ་ལ་ ཚིགས་བཅད་ཅིག་འཚོལ་ནས་དེའི་འབྱུང་ཁུངས་དང་ འགྲེལ་བཤད། འབྲེལ་ཡོད་གཞུང་ལུགས་བཅས་ལ་ཞིབ་འཇུག་བྱེད་ཐུབ། དེ་བཞིན་ཟིན་བྲིས་དང་བརྗོད་གཞིའི་བརྒྱུད་ནས་རང་གིས་རྟོགས་པ་རྣམས་གཞན་ལ་བརྒྱུད་བསྐུར་བྱེད་ཐུབ་ལ་གཞན་གྱིས་སྤེལ་བའི་བརྗོད་གཞི་དང་ཟིན་བྲིས་རྣམས་ལ་སློབ་སྦྱོང་བྱེད་པའི་སྒོ་ནས་མཉམ་ཞུགས་ཡང་བྱེད་ཐུབ།",
"side_nav.about_text": "ཡིག་ཆ་འདིའི་སྐོར།",
"side_nav.related_topic":"འབྲེལ་ཡོད་ཀྱི་དཔྱད་གླེང་།",
"side_nav.download_text":"ཡིག་ཆ་ཕབ་ལེན།",
Expand Down
46 changes: 43 additions & 3 deletions static/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,50 @@
"background_color": "#fdfdfd",
"theme_color": "#db4938",
"orientation": "portrait-primary",

"icons": [
{
"src": "https://pecha.org/static/img/pecha-icon.png",
"type": "image/png", "sizes": "72x72"
"src": "https://dev.pecha.org/static/screenshots/icon.png",
"sizes": "144x144",
"type": "image/png",
"purpose": "any"
},
{
"src": "https://dev.pecha.org/static/screenshots/pecha-icon.png",
"type": "image/png", "sizes": "72x74"
},
{
"src": "https://dev.pecha.org/static/screenshots/square-icon.png",
"type": "image/png", "sizes": "64x64"
}
]
],

"screenshots": [
{
"src": "https://dev.pecha.org/static/screenshots/desktop-homepage.png",
"type": "image/png",
"sizes": "1921x993",
"form_factor": "wide"
},
{
"src": "https://dev.pecha.org/static/screenshots/mobile-collection.jpg",
"type": "image/jpg",
"sizes": "962x2048"
},
{
"src": "https://dev.pecha.org/static/screenshots/mobile-homepage.jpg",
"type": "image/jpg",
"sizes": "967x2048"
},
{
"src": "https://dev.pecha.org/static/screenshots/mobile-menus.jpg",
"type": "image/jpg",
"sizes": "966x2048"
},
{
"src": "https://dev.pecha.org/static/screenshots/mobile-sheet.jpg",
"type": "image/jpg",
"sizes": "968x2048"
}
]
}
Binary file added static/screenshots/desktop-homepage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/screenshots/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/screenshots/mobile-collection.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/screenshots/mobile-homepage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/screenshots/mobile-menus.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/screenshots/mobile-sheet.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/screenshots/pecha-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/screenshots/square-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 18 additions & 17 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<head>
<title> Pecha - A Living Library of Buddhist Text </title>
<meta charset="utf-8"/>
<meta charset="UTF-8">
<!-- <meta name="description" content="{% block description %}{{ desc|striptags }}{% endblock %}"/> -->

<!-- SEO Tags -->
Expand Down Expand Up @@ -341,28 +342,28 @@
</div>

<script type="text/javascript">
// This function will load the feedbucket script dynamically
function loadFeedbucket() {
window.addEventListener("load", function(event) {
const s = document.createElement('script');
s.module = true;
s.defer = true;
s.src = "https://cdn.feedbucket.app/assets/feedbucket.js";
s.dataset.feedbucket = '0csPeBQ216w32NZdoqnk';
document.head.appendChild(s);
const crossImage =document.querySelector("#crossImage");
const messageImage =document.querySelector("#messageImage");

const feedbucket = document.querySelector("feedbucket-app");
// Remove the event listener so the script isn't loaded multiple times
let container=document.getElementById('imageContainer');
feedbucket.classList.toggle('hidden');
crossImage.classList.toggle('hidden');
if (!crossImage.classList.toggle('hidden')) {
feedbucket.classList.add('hidden'); // Hide feedbucket
crossImage.classList.add('hidden'); // Hide crossImage
} else {
feedbucket.classList.remove('hidden'); // Show feedbucket
}
s.onload = function() {
// Script has loaded, now try to find the feedbucket-app component
const feedbucket = document.querySelector("feedbucket-app");
feedbucket.classList.add('hidden');
feedbucket.style.display = "none";
crossImage.classList.add('hidden');
};
document.head.appendChild(s);
})
// This function will load the feedbucket script dynamically
function loadFeedbucket() {
const feedbucket = document.querySelector("feedbucket-app")
const crossImage =document.querySelector("#crossImage")
feedbucket.classList.add('hidden');
feedbucket.style.display = "none";
crossImage.classList.add('hidden');
}

// Add click event listener to the container
Expand Down
Loading
Loading