开发者

How to share the same style between few websites?

开发者 https://www.devze.com 2023-01-02 21:12 出处:网络
There is a website with a master-page, set of css-files,... menus. It is necessary to implement another one that will have same (or at least very similar) look-and-feel. And also it is necessary to ha

There is a website with a master-page, set of css-files,... menus. It is necessary to implement another one that will have same (or at least very similar) look-and-feel. And also it is necessary to have look-and-feel in sync.

I've tried to find for appropriate solution (at least idea, not implementation) in the internet but didn't find anything.

My idea is to use an additional project (class library) that will contain an implementation of the master-page and all its comnponents (menus, images, css, etc will be stored as resources), this project开发者_高级运维 will be refferenced from all web-sites that need to sare look-and-feel.

Do you see any best approach or any pitfalls in my idea?

Thanks.


I would recommend a class library for your masterpage, but I would put images and css on a web server and make links to it from your sites with absolute paths.


Maintaining images, css and menus (? menu entries?) in resources seems a lot of pain to me.

Would it not be enough to simply share a common css file and the images needed? That's what css files are for.

You probably could set up version control to have every project include the same css and image files.

0

精彩评论

暂无评论...
验证码 换一张
取 消