Skip to content

Feature: Duration Configuration to _config.yml and Update motion.js#846

Merged
stevenjoezhang merged 1 commit intonext-theme:masterfrom
Zerohertz:feat/anime-duration
Nov 21, 2024
Merged

Feature: Duration Configuration to _config.yml and Update motion.js#846
stevenjoezhang merged 1 commit intonext-theme:masterfrom
Zerohertz:feat/anime-duration

Conversation

@Zerohertz
Copy link
Contributor

PR Checklist

  • The changes have been tested (for bug fixes / features).
  • Docs in NexT website have been added / updated (for features).

PR Type

  • Bugfix.
  • Feature.
  • Improvement.
  • Code style update (e.g. formatting, linting).
  • Refactoring (no changes to functionality and APIs).
  • Documentation.
  • Translation.
  • Other... Please describe:

What is the current behavior?

Adjusting the duration required direct modification within source/js/motion.js.

What is the new behavior?

  • Added motion.duration configuration in _config.yml to manage the motion duration setting conveniently.
  • Updated source/js/motion.js to retrieve the duration value from CONFIG.motion.duration, defaulting to 200 if not set.

How to use?

In NexT _config.yml:

motion:
...
  duration: 200
...
duration-120.mov
duration-200.mov

@welcome
Copy link

welcome bot commented Nov 14, 2024

Thanks so much for opening your first PR here!

@CLAassistant
Copy link

CLAassistant commented Nov 14, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

This pull request contains changes to the configuration file. Please make sure the documentation in NexT website is changed or added.
Please edit relevant source files here: https://github.com/next-theme/theme-next-docs/tree/master/source/docs and create a pull request with the changes here: https://github.com/next-theme/theme-next-docs/pulls

@stevenjoezhang stevenjoezhang added this to the 8.22.0 milestone Nov 17, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 11828990925

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.446%

Totals Coverage Status
Change from base Build 11756704583: 0.0%
Covered Lines: 400
Relevant Lines: 405

💛 - Coveralls

@Zerohertz Zerohertz changed the title Add: Duration Configuration to _config.yml and Update motion.js Feature: Duration Configuration to _config.yml and Update motion.js Nov 21, 2024
@stevenjoezhang stevenjoezhang merged commit 183e89a into next-theme:master Nov 21, 2024
@welcome
Copy link

welcome bot commented Nov 21, 2024

Congrats on merging your first pull request here! 🎉 How awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants