85 Commits

Author SHA1 Message Date
面条
b800869aa5 refactor: improve image dimension inference logic
Enhances the algorithm for extracting image dimensions from Telegram widget styles by introducing a more robust fallback mechanism. Previously relied on partial style matching which could miss dimension data encoded across multiple DOM elements.

Now checks wrapper elements and padding-top percentage ratios more systematically to synthesize layout dimensions when explicit width/height are unavailable. This ensures more reliable image aspect ratio calculation for content rendering.

Also clarifies error messages in the sync workflow and updates code comments from Chinese to English for better maintainability.
2026-03-27 13:46:55 +08:00
面条
6ec262d8cf refactor: migrate to Tailwind CSS v4 and TypeScript
Replaces PostCSS-based styling with Tailwind CSS v4 via Vite plugin
Converts all .js files to .ts with proper type annotations
Adds comprehensive type definitions for Telegram data structures
Extracts reusable UI components and standardizes class utilities

Improves maintainability by eliminating custom CSS in favor of
Tailwind utilities and design tokens
Enhances type safety across Telegram parsing, env access, and API routes
Centralizes agent guidelines in AGENTS.md following repository standards
Upgrades iconography to astro-icon with Remix Icon integration

Expands accessible HTML patterns including ARIA labels, semantic
navigation, and keyboard interaction support
Refactors static proxy logic into shared utility functions
Consolidates modal and image preview markup for consistency
2026-03-26 21:11:11 +08:00
bunizao
8a92952c54 refactor: remove async/await from getCustomEmojiImage and getReactions functions for improved performance 2026-01-16 21:42:09 +08:00
bunizao
9118442a7e feat: enable conditional loading of reactions in getPost function 2026-01-16 21:36:33 +08:00
bunizao
571072fe58 fix: correct static proxy usage in custom emoji image URL construction 2026-01-16 21:32:00 +08:00
bunizao
116a20dc89 fix: normalize target URL construction to handle protocol-less URLs 2026-01-12 04:50:48 +08:00
bunizao
fbd6bbe018 feat: add REACTIONS environment variable and integrate it into item component 2026-01-12 04:39:24 +08:00
bunizao
63f7dab32d refactor: simplify custom emoji image retrieval by removing caching logic and using direct URL construction 2026-01-12 04:28:58 +08:00
bunizao
56a06cc410 style: update reaction styling and layout; remove unused emoji fallback logic 2026-01-12 04:10:12 +08:00
bunizao
d56245169a feat: add reaction support with custom emoji handling and styling 2026-01-12 03:56:37 +08:00
copilot-swe-agent[bot]
9e6da8fdb8 fix: properly compare HIDE_DESCRIPTION env variable as string
Co-authored-by: miantiao-me <2959393+miantiao-me@users.noreply.github.com>
2025-12-14 02:44:31 +00:00
copilot-swe-agent[bot]
a3b8c97bc3 feat: add HIDE_DESCRIPTION env variable to control TG description visibility
Co-authored-by: miantiao-me <2959393+miantiao-me@users.noreply.github.com>
2025-12-14 02:43:11 +00:00
面条
d5249adc12 Merge pull request #111 from NahidaBuer/main
feat: support expandable quoteblock
2025-12-13 16:25:03 +08:00
looechao
7444e66994 fix: decode URL parameter in search page 2025-12-10 13:14:01 +08:00
ccbikai
bcc27cf219 chore: update usernames and references
Updates social media handles, repository links, and funding references from old username to new one across configuration files, documentation, and layouts.
2025-12-07 15:32:13 +08:00
ccbikai
6a0bf4abdd chore: upgrade version 2025-11-15 19:46:00 +08:00
Nahida
8069fe3266 feat: support expandable quoteblock 2025-09-07 00:29:52 +08:00
ccbikai
876ba3e9a2 refactor: optimize RSS feed generation
Switches from getRssString to modern rss helper function
Moves XSL stylesheet to dedicated static file
Improves code organization and maintainability

Simplifies RSS feed configuration while maintaining beautification option
2025-01-01 19:03:22 +08:00
ccbikai
0dbec343b4 feat: add RSS feed beautification option
Introduces a new RSS_BEAUTIFY configuration flag to enable RSS feed styling
- Adds XSL styling support for RSS feeds when enabled
- Updates documentation in both English and Chinese
- Modifies RSS generation to support the new styling option

Migration from rss to getRssString for enhanced customization
2025-01-01 18:07:00 +08:00
ccbikai
a4ee6ef435 feat: enhance channel favicon with dynamic resizing
Implements dynamic favicon handling using wsrv.nl image service:
- Resizes channel avatar to 64x64
- Applies circular mask for consistent appearance
- Ensures HTTPS compatibility by stripping protocol
- Falls back to default favicon when no avatar exists

Improves visual consistency across different platforms and scales
2024-12-22 19:24:32 +08:00
ccbikai
b4a5dd021c feat: enhance SEO settings and improve title extraction
- Prioritize SEO settings from page data over environment variables
- Improve title extraction logic to handle new line characters
- Set SEO parameters for specific pages to improve search visibility
2024-11-14 20:37:13 +08:00
ccbikai
1d22719070 fix: ensure canonical URL pathname consistency 2024-11-09 15:46:43 +08:00
ccbikai
e12a0d0f95 feat: enhance RSS handling and improve middleware logic 2024-11-07 19:05:16 +08:00
ccbikai
6632363520 feat: switch to server-side rendering 2024-11-06 20:03:43 +08:00
ccbikai
98a1030907 feat: add support for links and navigation in sidebar 2024-11-06 20:01:40 +08:00
ccbikai
ed9393011c feat: add support for displaying comments on posts 2024-11-04 20:49:24 +08:00
ccbikai
0035b84e2c feat: enhance middleware to set speculation rules header 2024-11-04 19:56:30 +08:00
ccbikai
affd4d2a9b feat: add tags functionality and UI enhancements 2024-11-04 19:55:58 +08:00
ccbikai
7e3e6117ef feat: add Google site search integration for enhanced search functionality 2024-11-02 15:47:33 +08:00
ccbikai
ff418d81a8 fix: improve accessibility and remove unnecessary attributes
Enhanced accessibility by wrapping time display in a semantic `<time>` element, ensuring better screen reader support. Removed inline styles and onclick attributes from elements, simplifying the code and improving performance.
2024-09-21 16:39:57 +08:00
ccbikai
f36f07cf35 feat: enhance response handling for fetch requests
Improve reliability by ensuring fetch responses are properly wrapped in a new Response object, preserving headers and status codes.
2024-09-06 18:35:39 +08:00
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