Commit Graph

54 Commits

Author SHA1 Message Date
ccbikai
58be3f399c chore: eslint fix and upgrade dependencies 2024-08-31 16:29:02 +08:00
ccbikai
2b9807bd89 feat: add Docker support and enhance environment configuration
- Introduce .dockerignore for Docker build optimization
- Add Dockerfile for containerization setup
- Update .env.example to clear Sentry variables and rename HOST to TELEGRAM_HOST
- Modify astro.config.mjs to conditionally exclude SSR dependencies in Docker builds
- Adjust postinstall script to safely handle missing .git directory
- Refactor telegram host retrieval for clarity and consistency
2024-08-31 13:41:16 +08:00
ccbikai
67e4f89e35 chore: upgrade pnpm to 9.8.0 and update various package versions 2024-08-23 19:19:43 +08:00
ccbikai
0dd9ef80c3 feat: use avatar as favicon 2024-08-23 19:12:42 +08:00
ccbikai
8d2520b858 fix: code block 2024-08-13 19:20:45 +08:00
ccbikai
958109752b refactor: improve pagination logic and URL handling
Enhanced pagination logic by adjusting the condition for displaying the 'Before' link, ensuring it appears when there's more than one item, improving user navigation. Improved URL handling in Telegram post and reply processing by using regular expressions for channel replacement, enhancing compatibility and robustness.
2024-08-13 12:03:20 +08:00
ccbikai
ca765c9b18 feat: integrate prismjs components importer for modular syntax highlighting
Enhances PrismJS usage by adopting a dedicated importer tool to manage language components, improving maintainability and reducing bundle size.
2024-08-11 15:36:36 +08:00
ccbikai
f2304673b3 feat: enhance build and syntax highlighting
- Updated .gitignore to include new deployment and build tools
- Added @types/prismjs for improved TypeScript support in syntax highlighting
- Integrated PrismJS with additional languages for comprehensive code highlighting
2024-08-11 10:36:06 +08:00
ccbikai
793bc52f19 feat: enhance code highlighting with flourite
Integrate flourite for improved language detection in code blocks, replacing manual detection logic. This enhances accuracy and supports a broader range of languages for syntax highlighting. Additionally, streamline CSS inclusion for code highlighting by importing directly from the package, reducing reliance on external CDN.
2024-08-11 10:14:03 +08:00
面条
16400d5257 Merge pull request #36 from pierrenel/feature/code_highlight
feat: code highlighting
2024-08-11 09:57:08 +08:00
ccbikai
c6fe4742aa feat: enhance image loading and sanitization
- Standardized image loading to lazy for consistency in modal previews
- Expanded allowed attributes for sanitization to support additional image properties
- Introduced an exclusive filter to exclude specific images by class during sanitization
2024-08-10 14:00:53 +08:00
Pierre Nel
cee00bde0d Update base.astro
Undid vscode mangling the rest of the file
2024-08-09 11:46:50 +02:00
Pierre Nel
ddfcec21c2 parse code snippets ie ``js const a = 1;`` in Telegram and perform syntax highlighting in the post using Prism 2024-08-09 11:37:54 +02:00
ccbikai
50fc7413a9 feat: enhance UI and fix video handling
- Hide video elements in widget for improved user experience
- Update header background for better contrast
- Prevent empty image containers from rendering
- Remove unsupported video player elements
- Add onclick attribute to links for enhanced functionality
- Include Yandex.ru in target whitelist for expanded compatibility
2024-08-09 12:03:02 +08:00
ccbikai
4f9a403c90 feat: expand whitelist for secure redirects
Add telesco.pe to targetWhitelist to enhance security and allow for additional trusted redirect destinations.
2024-08-09 08:32:41 +08:00
ccbikai
8bec08657d feat: enhance image layout and handling
Improved image display by introducing a responsive grid layout for image lists, optimizing the first image's placement in odd-numbered lists to span across both columns. This change enhances visual appeal and usability, especially on larger screens. Additionally, refactored image retrieval logic to wrap images in a container, dynamically adjusting the class based on the number of images for tailored styling.
2024-08-09 08:20:53 +08:00
ccbikai
d72c03fd34 feat: improve back-to-top icon integration
Refactor back-to-top icon import for better performance and maintainability.
2024-08-08 21:44:42 +08:00
ccbikai
7d98d481cc feat: enhance scroll behavior and back-to-top button
Improved scrolling smoothness and updated back-to-top button styling for better user experience. Simplified button visibility control using modern CSS techniques, ensuring compatibility and responsiveness across browsers.
2024-08-08 21:41:36 +08:00
ccbikai
7e21021f6d Merge branch 'dev' of github.com:ccbikai/BroadcastChannel into dev 2024-08-08 21:00:57 +08:00
面条
2d895e46ce Merge pull request #20 from stvlynn/main
add backToTop button
2024-08-08 21:00:47 +08:00
ccbikai
44a6f86830 feat: improve regex for title extraction
Enhanced regex pattern to more accurately capture titles in posts by adjusting the lookahead assertion to better handle various punctuation marks and URLs. This improves the robustness of title extraction, ensuring more consistent and correct results across different post formats.
2024-08-08 12:14:29 +08:00
ccbikai
e7cd5d61ca feat: enhance reply handling in posts
Refactor to improve handling of reply links within posts by introducing a dedicated function, ensuring more accurate and consistent URL modifications. This enhancement simplifies future maintenance and scalability of the codebase.
2024-08-07 21:56:03 +08:00
ccbikai
2a4a3be3cc feat: enhance null safety in content retrieval
Improved content retrieval logic to handle potential null values, enhancing robustness and reliability of the Telegram message parsing functionality.
2024-08-07 21:49:38 +08:00
面条
8e0fc38055 Merge pull request #26 from mitian233/main
fix: quote message display
2024-08-07 21:47:49 +08:00
ccbikai
d7afe256c5 Merge branch 'main' of github.com:ccbikai/BroadcastChannel 2024-08-07 21:46:55 +08:00
ccbikai
8db461e881 feat: add audio handling in posts
Enhances post rendering by integrating audio element processing, ensuring audio files are correctly proxied and controls are enabled for user interaction. This improvement expands multimedia support within posts, enhancing user experience and engagement.
2024-08-07 21:46:08 +08:00
ccbikai
4fa62bf68d feat: add sanitize-html for content filtering
Enhance RSS feed content safety by integrating sanitize-html to allow specific media tags and attributes, ensuring a secure and controlled presentation of content.
2024-08-07 21:00:55 +08:00
Steven Lynn
3e122dbd39 add back-to-top.svg 2024-08-07 19:23:11 +08:00
某M氏
d9f41423bf chore: modify getPost function to handle different message text classes 2024-08-07 11:20:25 +00:00
Yunfi
1be9fde7c5 chore(typo): "Macth" to "Match" in lib/telegram/index.js 2024-08-06 14:19:00 +00:00
Steven Lynn
2007b6392f removed backToTop.js 2024-08-06 21:37:17 +08:00
ccbikai
877279ac03 feat: add meta charset in head for SEO improvement 2024-08-06 20:49:24 +08:00
ccbikai
e18cc8e3a8 feat: enhance tg-spoiler styling for better integration
Improved tg-spoiler component with additional margin and border-radius for enhanced visual consistency and integration within the layout.
2024-08-06 20:46:47 +08:00
ccbikai
d184a50e2c feat: improve visual consistency in item background
Adjusted the repeating-conic-gradient to enhance visual consistency by using a transparent color stop, addressing a subtle visual artifact.
2024-08-06 20:35:26 +08:00
ccbikai
69c7eb2da7 chore(css): adjust gradient color for better contrast
Improved contrast in item background gradient to enhance visibility.
2024-08-06 19:58:14 +08:00
ccbikai
2a23887e7c feat: enhance spoiler visibility and style consistency
Simplified spoiler styling to improve visibility and maintain consistent appearance across different devices and browsers. This change removes the text color and background color overlap, making the spoiler content more accessible and visually appealing.
2024-08-06 19:48:08 +08:00
ccbikai
d7eeca2b16 feat: add background color to spoiler for consistency 2024-08-06 19:12:51 +08:00
ccbikai
bd7bba2f06 feat: enhance CSS handling and optimize global styles
- Enabled PostCSS nesting with specific configuration for modern compatibility
- Added global CSS reset for consistent tap highlights across browsers
- Optimized package configuration for broader browser support
- Refactored and streamlined global CSS, removing redundant styles for better maintainability
- Integrated additional CSS import in component for modular styling approach
2024-08-06 19:02:56 +08:00
Steven Lynn
348192f1b9 add backToTop button 2024-08-06 17:46:59 +08:00
ccbikai
4085dd2143 Merge branch 'dev' 2024-08-06 13:35:09 +08:00
ccbikai
06f81a2d14 chore: improve sticker rendering and CSS specificity
Enhanced sticker rendering by adding optional chaining for safer DOM traversal and reordered sticker rendering logic to ensure proper inclusion in post content. Improved CSS specificity for sticker styling to ensure consistent application across components.
2024-08-06 13:34:37 +08:00
面条
78f82c84cf Merge pull request #7 from mitian233/patch-1
feat: add support for stickers and video stickers
2024-08-06 13:22:00 +08:00
面条
609a594cc0 Merge pull request #11 from siygle/more-sns
feat: support Mastodon/BlueSky social button
2024-08-06 13:20:34 +08:00
ccbikai
a83c3069e6 refactor(emoji): adjust spacing for better alignment
Improved spacing around emojis in multiple components to enhance visual consistency and readability. Simplified the selector for content modification in the Telegram library function for better maintainability.
2024-08-06 13:12:51 +08:00
ccbikai
b8ab845520 feat: enhance CSS processing and content rendering
- Added postcss-nesting for improved CSS nesting support
- Updated dependencies to support new CSS processing features
- Modified HTML content handling to improve accessibility and styling
- Enhanced post content parsing for better rendering and SEO
2024-08-06 13:02:57 +08:00
sy
7896e90c92 feat: support Mastodon/BlueSky social button 2024-08-06 13:00:40 +08:00
ccbikai
5c998c6c34 feat: enhance header rendering and description extraction
- Optimized header component to directly set HTML content for improved rendering performance and security.
- Modified description extraction method to retrieve HTML content, enhancing the accuracy and richness of displayed information.
- Added word-break property to site intro for better handling of long words and URLs.
2024-08-06 09:30:07 +08:00
某M氏
a08547ef95 chore: fix style 2024-08-05 16:42:28 +00:00
某M氏
086c00bd2c support stickers display 2024-08-05 20:14:44 +08:00
ccbikai
2df9b66ed9 feat: enhance deployment and media handling
- Updated deployment configurations to disable Incremental Static Regeneration (ISR) and cache on demand pages for better performance control.
- Extended .gitignore to include deployment-specific directories, preventing unnecessary files from being tracked.
- Improved video handling in content by adding support for additional video types and enhancing video element attributes for better playback control.
- Refactored post retrieval logic to ensure channel information is correctly merged and SEO data is accurately assigned.
- Enhanced static file handling to include error handling and domain whitelisting for security and reliability.
2024-08-05 18:57:28 +08:00