線上書籍

Home

XOOPS 新版佈景設計

一、關於 theme_css.html
  1. theme_css.html 裡面分別為「網頁文字設定」、「連結文字設定」、「背景設定」的CSS設定,另引入 theme_css_blocks.html(區塊標題的樣式設定檔)及/theme_css_navbar.html(導覽列的樣式設定檔)
  2. theme_css.html 就是用來將使用者在後台針對「網頁文字」、「連結文字」、「背景」、「區塊標題」、「導覽列」設定的值套用到佈景上。
  3. theme_css.html 其內容為: <style type="text/css"> body{ color:<{$font_color}>; background: <{$bg_color}> url(<{$bg_img}>) <{$bg_position}> <{$bg_repeat}> <{$bg_attachment}>; font-size:<{$font_size}>; } a{ color:<{$link_color}>; } a:hover{ color:<{$hover_color}>; } <{includeq file="$xoops_rootpath/modules/tadtools/themes_tpl/theme_css_blocks.html"}> <{includeq file="$xoops_rootpath/modules/tadtools/themes_tpl/theme_css_navbar.html"}> </style>
二、若背景不開放修改,文字或連結也不開放修改
  1. 那就按照「加入首頁.txt」中的預設值即可: <style type="text/css"> body{ font-family:<{$font_family}>; } <{includeq file="$xoops_rootpath/modules/tadtools/themes_tpl/theme_css_blocks.html"}> <{includeq file="$xoops_rootpath/modules/tadtools/themes_tpl/theme_css_navbar.html"}> </style>
  2. 若不放「區塊標題設定」,可將「theme_css_blocks.html」那行刪除。
  3. 若不放「導覽列設定」,可將「theme_css_navbar.html」那行刪除。
三、若背景不開放修改,但文字或連結開放修改
  1. 那就將 theme_css.html 中的內容複製到頁首中,並刪除 background 的CSS設定即可:
  2. 看起來如下: <style type="text/css"> body{ color:<{$font_color}>; font-size:<{$font_size}>; } a{ color:<{$link_color}>; } a:hover{ color:<{$hover_color}>; } <{includeq file="$xoops_rootpath/modules/tadtools/themes_tpl/theme_css_blocks.html"}> <{includeq file="$xoops_rootpath/modules/tadtools/themes_tpl/theme_css_navbar.html"}> </style>
  3. 若不放「區塊標題設定」,可將「theme_css_blocks.html」那行刪除。
  4. 若不放「導覽列設定」,可將「theme_css_navbar.html」那行刪除。
四、若背景、文字或連結都開放修改
  1. 那只要確定預設背景有放進images/bg下,config.php中的背景圖預設值為該圖檔檔名,然後在頁首加入以下這行: <{includeq file="$xoops_rootpath/modules/tadtools/themes_tpl/theme_css.html"}>