返回文章列表文章索引阅读全文
STARBLOG / 阅读手记
StarBlog番外

StarBlog minor update, significant improvement in article management experience, rewrote several admin dashboard pages.

Facing a clunky backend, I could only start with patchwork fixes. I rewrote the notoriously ugly login page, and also implemented a category tree and a photo wall. Looking at the code written years ago, I can't help but exclaim, wow—this kind of temporary solution will eventually need to be refactored.

曦远 (DealiAxy)约 16 分钟
目录12 个章节

Foreword

Recently, I've been wanting to organize the articles in my blog.

It turns out that the backend of this blog is really rudimentary, making organization quite a hassle.

Even though I've already decided to refactor starblog,

that's a long-term solution that won't help with the immediate problem.

I still have to use the current shoddy admin backend to address the needs at hand.

So, I've decided to patch up the admin backend and keep using it 😂

Admin Dashboard

The admin dashboard for starblog is currently built with Vue.

Originally, the entire framework was extracted from a Spring Cloud project I worked on earlier.

You could say it's old code from back in the day.

When I first built this dashboard, I hadn't even touched the threshold of frontend development; I only knew how to write CRUD operations using templates with Vue like this.

That's why the result was quite rough—let alone aesthetics, many of the interaction designs were also unreasonable.

This time, I'm just making do with some patches and fixes, but a full redesign will be needed in the future.

Let me share what work was done in this round~

Login Page

The original login page was unacceptably ugly.

The most intolerable part was this login page. After the rewrite, it looks like this.

image-20251029192627455

Let's take a look at the original login interface 😂

image-20251029223936160

New Category Pages

Made two

Card-style Category List

This approach is actually not ideal because blog categories have a hierarchical structure.
A card-style layout flattens all categories side by side,
which results in too many items and makes it difficult to find the right one.

image-20251029232525653

Category Tree

This is the truly user-friendly one.

On the left is the category tree. Clicking a category node on the left allows you to view category details, and the right side will load and display the article list.

The article list can be displayed in two different styles. The current style is the icon style, similar to a file manager's layout.

image-20251029232701128

There is also a card-style layout.

image-20251029232808363

It's also worth mentioning the operations available for category nodes.

Hovering the mouse over each node reveals a menu.

image-20251029233556070

The options are: Add Subcategory, Article List, Edit Category, and Delete.

By the way, the divider in the middle of this page is adjustable, allowing you to change the width of the left and right columns.

image-20251029234846450

Adding Subcategories

When adding, the parent category is automatically filled in, greatly enhancing the convenience of category management.

image-20251029233731350

Category Article List

This new interface makes it very convenient to manage articles within a specific category.

Due to backend design requirements, articles cannot exist without a category.

Therefore, this feature primarily facilitates adding articles to a specific category.

It still uses a two-column layout.

The left column displays all articles and supports searching and filtering by category tree.

The right column shows articles in this category. Existing articles cannot be removed because articles must always have a category assigned.

However, newly added articles in the current editing session that have not yet saved can be removed.

image-20251029233906597

I used this feature to organize the articles under the "Linux" and "Unboxing Reviews" categories.

By the way, this interface also supports pagination loading. The interaction is a type of pull-up loading, where you can load the next page by scrolling to the bottom and clicking the "Load More" button.

image-20251029234300517

Old Classification Page

Looking at the new features

Let's take a look at how poorly the old one was done

To call it rubbish might be an overstatement—after all, it does have basic CRUD operations for categories.

But it’s definitely not user-friendly.

It’s really just stuck at the database CRUD level.

In terms of functionality, it can be described as quite rudimentary.

image-20251029234951229

New Photo Wall Page

This is truly a major upgrade.

It now supports searching, filtering, and batch operations (like setting as recommended or deleting). You can also edit image information. Basically, all the essential features are included.

Previously, I used the vue-waterfall component, but it seems like it's either no longer maintained or incompatible with the Vue version used in this project, and modifying it led to quite a few bugs.

So, this time I hand-wrote a waterfall flow component based on Vue.

It's much better to use than vue-waterfall.

image-20251029235140688

Old Version

The old version looks like this - what the heck, this is the admin panel (管理后台), not the frontend display interface. How is it possible that only the display is shown while other features are all incomplete?

image-20251029235417426

Summary

Honestly, the recent modifications to the backend don't quite qualify as a "major version update"; they're more like a "good enough" set of patches and fixes.

However, going through the process did give me a chance to re-examine the old code written years ago—there was definitely some cringe at my past self's work.

Although these temporary fixes will eventually need to be refactored, at least the backend is now usable for the time being.

When it comes to refactoring StarBlog in the future, the experience gained from this round will serve as lessons learned from pitfalls encountered along the way.

Sometimes, an imperfect solution is still a step on the path to perfection.

—— Xi Yuan · October 2025

_EOF_

StarBlog minor update, significant improvement in article management experience, rewrote several admin dashboard pages.

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

StarBlog 番外篇 (2) 深入解析Markdig源码,优化ToC标题提取和文章目录树生成逻辑

本文介绍了作者在开发博客发布工具时,针对Markdown目录生成逻辑的改进。作者深入研究了Markdig源码,优化了目录生成逻辑,使用AutoIdentifiers扩展自动生成标题ID,提高了代码的可维护性和准确性。文章详细解析了Markdig的heading处理部分和ID生成机制,并提供了解决ID冲突的方法。最终,作者实现了与Markdig一致的ToC提取功能。

2025-03-25 · StarBlog番外 · 约 1 分钟

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…

StarBlog minor update, significant improvement in article management experience, rewrote several admin dashboard pages. · StarBlog