上传附件表的Drupal自定义样式

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了上传附件表的Drupal自定义样式相关的知识,希望对你有一定的参考价值。

The following styles are designed to work with the markup from a custom theme override template called [upload_attachments.tpl.php](http://snipplr.com/view/11851)
  1. /* @group Attachments table */
  2. table.attachments caption {
  3. display: none;
  4. }
  5. table.attachments {
  6. border-color: #CCC;
  7. border-width: 1px;
  8. border-style: solid none none solid;
  9. width: auto;
  10. }
  11. table.attachments thead { border: 1px solid #CCC }
  12. table.attachments td {
  13. line-height: 24px; padding: 0;
  14. border-right: 1px solid #CCC;
  15. border-bottom: 1px solid #CCC;
  16. }
  17. table.attachments tr {
  18. border-right: 1px solid #CCC;
  19. }
  20. table.attachments td a {
  21. line-height: 24px;
  22. padding: 0 26px;
  23. background-position: 5px;
  24. background-repeat: no-repeat;
  25. }
  26. table.attachments th {
  27. background-color: #F2F2F2;
  28. font-weight: normal;
  29. font-family: Arial, Helvetica, "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif;
  30. font-size: 77%;
  31. }
  32. table.attachments td.size {
  33. padding: 0 5px;
  34. font-family: Arial, Helvetica, "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif;
  35. font-size: 77%;
  36. color: #404040;
  37. font-style: normal;
  38. }
  39. /* @end */
  40. /* @group Mime-type icons */
  41. .pdf a, .application-pdf a {
  42. background-image: url(images/icon-pdf.gif); }
  43. .jpeg a, .jpg a, .png a, .gif a {
  44. background-image: url(images/icon-image.png); }
  45. .eps a, .application-postscript a {
  46. background-image: url(images/icon-postscript.png); }
  47. .html a, .text-html a {
  48. background-image: url(images/icon-html.gif); }
  49. .qt a, .video-quicktime a {
  50. background-image: url(images/icon-quicktime.gif); }
  51. .ical a, .text-calendar a {
  52. background-image: url(images/icon-ical.gif); }
  53. .dl a {
  54. background-image: url(images/icon-download.gif); }
  55. .dmg a, .application-x-diskcopy a {
  56. background-image: url(images/icon-dmg.gif); }
  57. .zip a, .application-zip a {
  58. background-image: url(images/icon-zip.gif); }
  59. .audio a, .audio-mpeg a {
  60. background-image: url(images/icon-audio.gif); }
  61. .website a {
  62. background: url(images/icon-website.gif) left center no-repeat;
  63. margin: 0; padding: 2px 0 2px 25px; line-height: 25px; }
  64. .doc a, .msword a {
  65. background-image: url(images/icon-doc.png); }
  66. .txt a {
  67. background-image: url(images/icon-txt.gif); }
  68. /* @end */

以上是关于上传附件表的Drupal自定义样式的主要内容,如果未能解决你的问题,请参考以下文章

Drupal创建自定义表单,上传文件代码

自定义input文件上传 file的提示文字及样式

设置Drupal附件表的主题

如何在 Drupal 8 中自定义/样式/主题自定义内容类型的输出?

Drupal 自定义表单记住文本字段数据

Servicenow:表格中的自定义附件小部件未在提交时上传文档