Drupal 实施之前的 xhtml-css 编码?

发布于 2024-08-31 22:42:46 字数 205 浏览 2 评论 0原文

我即将开始我的第一个 Drupal 项目:) 非常兴奋。我脑子里有很多问题:/但我会在从事这个项目的过程中找到答案并了解很多关于 Drupal 的知识。

好的,我已经设计完成了。

现在是否最好对所有页面进行xhtml-css编码,然后将这些代码实现到Drupal? 或者直接将 xhtml-css 编码放入 Drupal 主题中更好?

感谢建议!

I'm going to start my first Drupal project :) pretty excited. I have many questions in my head :/ but I will find out the answers and learn many about Drupal while working on this project.

ok, I have the design completed.

now is it better to make xhtml-css coding of all pages, and then implementing these codes to Drupal?
or is it better to make xhtml-css coding straight into Drupal theme?

Appreciate advices!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

春风十里 2024-09-07 22:42:46

我更喜欢先编写 XHTML/CSS 代码,然后将其复制粘贴/调整到模板中,一切都更加一致,并且您可以真正预览页面动态工作后的外观(并在不同的环境中进行测试)浏览器等)。

(在我看来)这样做也更快,因为您首先完全专注于前端,然后开始复制粘贴/调整代码片段(一旦您开始开发几个主题,您可以创建一个代码片段集合以及您需要的一切)。

当我尝试直接编码时,我总是留下未封闭的标签,创建不一致的 CSS 类/ID(特别是在创建具有数百个 CSS 行的大型网站时)以及其他我需要花时间稍后修复的小错误......

我最好的建议是尝试两种方式编码。然后比较哪一个开发速度更快、您感觉如何以及您在未来的项目中更喜欢哪一个。

祝你好运!

I prefer to code the XHTML/CSS first and then copy-paste/adapt it into the templates, everything is more consistent and you can have a real preview of how the page will look like once it is working dynamically (plus test it in different browsers, etc...).

(In my opinion) It is also faster to do it this way because you first focus purely on the Front-end and then start copy-pasting/adapting the code snippets (once you get to develop several themes you can create a code snippet collection with everything you need).

When I have tried to code it straight I always leave unclosed tags, create non-consistent CSS classes/IDs (specially when creating big websites with hundreds of CSS lines) and other minor mistakes in which I need to spend time later fixing...

My best advice is for you to try coding both ways. Then compare which one has been faster to develop, how comfortable have you felt and which one you prefer for your future projects.

Good luck!

狼性发作 2024-09-07 22:42:46

我想说这取决于你的目标是什么。在接触 Drupal 之前准备好 HTML 和 CSS 将使您非常熟悉 Drupal 主题,并为您提供您想要的标记,但它会带来一个很大的缺点,即需要花费大量时间。

另一方面,尽可能使用 Drupal 的默认标记会更快、更容易,但不会让您熟悉 Drupal 主题,并且会导致一些 CSS 与非 Drupal 相比可能会感觉有点臃肿CSS。

从长远来看,我认为按照您的意愿弯曲 Drupal 标记是最好的,但事实可能会证明,这可能比您在第一个 Drupal 项目上感到满意更令人沮丧。

I'd say it depends what your goals are. Preparing HTML and CSS before touching Drupal will make you very familiar with Drupal theming and give you exactly the markup you want, but it will come with a big downside of taking a LOT of time.

On the other hand, going with Drupal's default markup as much as possible will be faster and easier, but won't get you as familiar with Drupal theming and will result in some CSS that will probably feel a little bloated compared to your non-Drupal CSS.

Long term, I'd say bending Drupal markup to your will is best, but it may prove more frustrating than satisfying on your first Drupal project.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文