next-theme / hexo-theme-next

🎉 Elegant and powerful theme for Hexo.
https://theme-next.js.org
Other
2.32k stars 416 forks source link

Caption overlaps image due to `mobile_layout_economy: true` (图注与图片重叠) #641

Closed chuanjin-su closed 1 year ago

chuanjin-su commented 1 year ago

Issue Checklist

Expected behavior

Caption of image is normally shown below the image. 图注应当显示在图片的下方

Actual behavior

Caption overlaps image:

Wide screen Narrow screen

Steps to reproduce the behavior

  1. Activate mobile_layout_economy: true in _config.next.yml, according to the documentation of Misc Theme Settings.
  2. Start a new post and add pictures as following:
    
    ---
    title: Test
    date: 2023-04-26 15:41:59
    tags:
    ---

Here is an image

{% img /images/Test/Snipaste_2023-04-26_15-35-59.png 'Here is an image' %}

3. Launch `hexo s`, open `localhost:4000` and use a very narrow chrome window to observe (also verified on iOS safari)

### Node.js and NPM Information

```Text
9.6.5

Package dependencies Information

├── hexo-generator-index@3.0.0
├── hexo-generator-searchdb@1.4.1
├── hexo-generator-sitemap@3.0.1
├── hexo-generator-tag@2.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-pandoc@0.3.1
├── hexo-renderer-stylus@2.1.0
├── hexo-server@3.0.0
├── hexo-theme-next@8.15.1
├── hexo-word-counter@0.1.0
└── hexo@6.3.0

Hexo Configuration

Default settings

NexT Configuration

mobile_layout_economy: false

Other Information

It behaves normal when the option mobile_layout_economy is set back to false. So it seems that the problem is due to this option

welcome[bot] commented 1 year ago

Thanks for opening this issue, maintainers will get back to you as soon as possible!

stevenjoezhang commented 1 year ago

I pushed a patch to the master branch, can you test it? https://github.com/next-theme/hexo-theme-next/commit/c8b84567cc6ffff6105f152b7c1e98c713293fe4

chuanjin-su commented 1 year ago

Yes I checked again and it is now resolved! Thank you very much for this prompt reply and fix!

github-actions[bot] commented 1 month ago

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.