fancyindex_header.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!DOCTYPE html><html>
  2. <head>
  3. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  4. <meta name="viewport" content="width=device-width">
  5. <link rel="stylesheet" href="/themes/tagblog/css/style.css" />
  6. <style type="text/css">
  7. <?php
  8. // You will need the php-yaml (Debian) package installed
  9. //~ $nl='<br/>';
  10. foreach (glob($_SERVER["DOCUMENT_ROOT"]."/config/*.yml") as $file) {
  11. $arr=yaml_parse_file($file);
  12. if (isset($arr['tagblog']['colors'])) {
  13. //~ echo $arr['tagblog']['colors'].$nl;
  14. foreach (['generated/custom-','custom-','generated/',''] as $path) {
  15. $path=$_SERVER["DOCUMENT_ROOT"].'/themes/tagblog/css/'.$path.$arr['tagblog']['colors'].'.css';
  16. //~ echo $path.$nl;
  17. if (file_exists($path)) {
  18. include $path;
  19. break;
  20. }
  21. }
  22. break;
  23. }
  24. }
  25. ?>
  26. body,html {
  27. padding: .3em;
  28. }
  29. h1 {
  30. font-weight: normal;
  31. padding: 0;
  32. margin-left: 1em;
  33. }
  34. div.home {
  35. font-size: 1em;
  36. transform: rotate(90deg);
  37. transform-origin: top left;
  38. margin-left: 1em;
  39. position: absolute;
  40. }
  41. tr:hover {
  42. background: var(--base00,#f5f0e7)
  43. }
  44. th {
  45. text-align:left;
  46. font-weight:bold;
  47. }
  48. #list {
  49. width:100%;
  50. }
  51. td.link {
  52. padding:0
  53. }
  54. td.link a {
  55. display: block;
  56. padding:.4em;
  57. width:100%;
  58. }
  59. </style>
  60. </head>
  61. <body><div class=home><a href="/">home</a></div>
  62. <h1>