diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 8520ad691..ea2532333 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -12,6 +12,7 @@ @use 'footer'; @use 'like_and_weixin'; @use 'about'; +@use 'changelog'; .turbo-progress-bar { height: 2px; @@ -20,4 +21,4 @@ img { display: block; -} +} \ No newline at end of file diff --git a/app/assets/stylesheets/changelog.scss b/app/assets/stylesheets/changelog.scss new file mode 100644 index 000000000..9a1091d9b --- /dev/null +++ b/app/assets/stylesheets/changelog.scss @@ -0,0 +1,54 @@ +// Changelog page styles +.changelog-entry { + margin: 2rem 0; + padding: 1.5rem; + border: 1px solid #e9ecef; + border-radius: 0.25rem; + transition: all 0.3s ease; + + &:hover { + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); + border-color: #ddd; + } + + .entry-date { + font-size: 0.9rem; + color: #868e96; + margin-bottom: 0.5rem; + font-weight: 300; + } + + .entry-title { + font-size: 1.5rem; + margin-bottom: 1rem; + color: #343a40; + font-weight: 500; + } + + .entry-features { + padding-left: 1.5rem; + margin: 0; + + li { + margin: 0.5rem 0; + color: #495057; + line-height: 1.5; + + &:first-child { + margin-top: 0; + } + + &:last-child { + margin-bottom: 0; + } + } + } +} + +.page-title { + margin: 2rem 0; + padding-bottom: 1rem; + border-bottom: 1px solid #e9ecef; + color: #343a40; + font-weight: 500; +} \ No newline at end of file diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index a9a1eff0e..950441c39 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -6,4 +6,7 @@ def index def about end -end + + def changelog + end +end \ No newline at end of file diff --git a/app/views/home/changelog.html.slim b/app/views/home/changelog.html.slim new file mode 100644 index 000000000..a979b9060 --- /dev/null +++ b/app/views/home/changelog.html.slim @@ -0,0 +1,51 @@ +- content_for(:title) do + | #{t('title.changelog')} +.container + .row + .col-sm-12 + h1.page-title #{t('title.changelog')} + + .changelog-entry + .entry-date Apr 24, 2025 + h2.entry-title CDE Editor Enhancements + ul.entry-features + li Added syntax highlighting for Python, JavaScript, and Ruby + li Improved code completion suggestions + li Fixed several bugs in the auto-indentation feature + li Added keyboard shortcuts for common operations + + .changelog-entry + .entry-date Mar 15, 2025 + h2.entry-title Performance Improvements + ul.entry-features + li Reduced page load time by 40% + li Optimized database queries for faster response + li Implemented caching for frequently accessed content + li Decreased memory usage for background processes + + .changelog-entry + .entry-date Feb 08, 2025 + h2.entry-title New User Interface + ul.entry-features + li Redesigned dashboard with improved usability + li Added dark mode support + li Enhanced mobile responsiveness + li Updated icon set for better visual consistency + + .changelog-entry + .entry-date Jan 12, 2025 + h2.entry-title Security Updates + ul.entry-features + li Implemented two-factor authentication + li Enhanced password security requirements + li Added IP-based access restrictions + li Updated third-party dependencies to latest secure versions + + .changelog-entry + .entry-date Dec 05, 2024 + h2.entry-title Initial Release + ul.entry-features + li Core blogging functionality + li Comment system with moderation + li Responsive design for mobile and desktop + li Basic analytics integration \ No newline at end of file diff --git a/app/views/layouts/_footer.html.slim b/app/views/layouts/_footer.html.slim index 4aa4cff77..f2ce32a72 100644 --- a/app/views/layouts/_footer.html.slim +++ b/app/views/layouts/_footer.html.slim @@ -13,6 +13,8 @@ | Built with span = link_to 'wblog', 'https://github.com/windy/wblog', target: '_blank' + .license + = link_to t('head.changelog'), changelog_path - if ENV['SITE_BEIAN'].present? .license - = link_to ENV['SITE_BEIAN'], 'http://beian.miit.gov.cn/', target: '_blank' + = link_to ENV['SITE_BEIAN'], 'http://beian.miit.gov.cn/', target: '_blank' \ No newline at end of file diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim index 93b3695f9..a269cb04c 100644 --- a/app/views/layouts/application.html.slim +++ b/app/views/layouts/application.html.slim @@ -37,10 +37,12 @@ html = link_to '时间线', archives_path, class: 'nav-link' li class="nav-item" = link_to '关于', about_path, class: 'nav-link' + li class="nav-item" + = link_to t('head.changelog'), changelog_path, class: 'nav-link' li class="nav-item" a class="nav-link" href=archives_path .fa.fa-search main = render 'common/welcome_new_year' = yield - = render "layouts/footer" + = render "layouts/footer" \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 51275c3ae..7c6d5e05e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -38,11 +38,13 @@ en: creator: 'Startup' timeline: 'Timeline' about: 'About' + changelog: 'Changelog' title: home: 'Home' timeline: 'Timeline' about: 'About Me' + changelog: 'Changelog' comment_attributes: email: 'Format Validation Failed' @@ -115,4 +117,4 @@ en: login_success: 'Login successfully' no_configuration: 'There is no admin user, login failed' username_error: 'Admin username error' - password_error: 'Admin password error' + password_error: 'Admin password error' \ No newline at end of file diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 938d92c4b..bb039cf4a 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -38,11 +38,13 @@ zh-CN: creator: '创业' timeline: '时间线' about: '关于我' + changelog: '更新日志' title: home: '首页' timeline: '时间线' about: '关于我' + changelog: '更新日志' activerecord: @@ -129,4 +131,4 @@ zh-CN: login_success: '登录成功' no_configuration: '系统未配置管理员, 无法登录' username_error: '用户名错误' - password_error: '密码错误' + password_error: '密码错误' \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index a6efd21ba..2d4949895 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,6 +24,7 @@ def matches?(request) resources :photos, only: [:create] get '/about', to: 'home#about' + get '/changelog', to: 'home#changelog' namespace :admin do get 'login', to: 'sessions#new', as: :login @@ -48,4 +49,4 @@ def matches?(request) mount Sidekiq::Web => '/sidekiq', constraints: AdminConstraint.new #mount ActionCable.server => '/cable' root to: 'home#index' -end +end \ No newline at end of file