Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

70 lines
1.7 KiB

  1. <?php
  2. /**
  3. * @file view/theme/quattro/style.php
  4. */
  5. use Friendica\Core\Config;
  6. use Friendica\DI;
  7. $uid = $_REQUEST['puid'] ?? 0;
  8. $color = false;
  9. $quattro_align = false;
  10. $site_color = Config::get("quattro", "color", "dark");
  11. $site_quattro_align = Config::get("quattro", "align", false);
  12. if ($uid) {
  13. $color = DI::pConfig()->get($uid, "quattro", "color", false);
  14. $quattro_align = DI::pConfig()->get($uid, 'quattro', 'align', false);
  15. }
  16. if ($color === false) {
  17. $color = $site_color;
  18. }
  19. if ($quattro_align === false) {
  20. $quattro_align = $site_quattro_align;
  21. }
  22. $color = \Friendica\Util\Strings::sanitizeFilePathItem($color);
  23. if (file_exists("$THEMEPATH/$color/style.css")) {
  24. echo file_get_contents("$THEMEPATH/$color/style.css");
  25. }
  26. if ($quattro_align == "center") {
  27. echo "
  28. html { width: 100%; margin:0px; padding:0px; }
  29. body {
  30. margin: 50px auto;
  31. width: 900px;
  32. }
  33. ";
  34. }
  35. $textarea_font_size = false;
  36. $post_font_size = false;
  37. $site_textarea_font_size = Config::get("quattro", "tfs", "20");
  38. $site_post_font_size = Config::get("quattro", "pfs", "12");
  39. if ($uid) {
  40. $textarea_font_size = DI::pConfig()->get($uid, "quattro", "tfs", false);
  41. $post_font_size = DI::pConfig()->get($uid, "quattro", "pfs", false);
  42. }
  43. if ($textarea_font_size === false) {
  44. $textarea_font_size = $site_textarea_font_size;
  45. }
  46. if ($post_font_size === false) {
  47. $post_font_size = $site_post_font_size;
  48. }
  49. echo "
  50. textarea { font-size: ${textarea_font_size}px; }
  51. .wall-item-comment-wrapper .comment-edit-text-full { font-size: ${textarea_font_size}px; }
  52. #jot .profile-jot-text:focus { font-size: ${textarea_font_size}px; }
  53. .wall-item-container .wall-item-content { font-size: ${post_font_size}px; }
  54. ";