You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
1.9 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
Repository avatars (#6986) * Repository avatars - first variant of code from old work for gogs - add migration 87 - add new option in app.ini - add en-US locale string - add new class in repository.less * Add changed index.css, remove unused template name * Update en-us doc about configuration options * Add comments to new functions, add new option to docker app.ini * Add comment for lint * Remove variable, not needed * Fix formatting * Update swagger api template * Check if avatar exists * Fix avatar link/path checks * Typo * TEXT column can't have a default value * Fixes: - remove old avatar file on upload - use ID in name of avatar file - users may upload same files - add simple tests * Fix fmt check * Generate PNG instead of "static" GIF * More informative comment * Fix error message * Update avatar upload checks: - add file size check - add new option - update config docs - add new string to en-us locale * Fixes: - use FileHEader field for check file size - add new test - upload big image * Fix formatting * Update comments * Update log message * Removed wrong style - not needed * Use Sync2 to migrate * Update repos list view - bigger avatar - fix html blocks alignment * A little adjust avatar size * Use small icons for explore/repo list * Use new cool avatar preparation func by @lafriks * Missing changes for new function * Remove unused import, move imports * Missed new option definition in app.ini Add file size check in user/profile avatar upload * Use smaller field length for Avatar * Use session to update repo DB data, update DeleteAvatar - use session too * Fix err variable definition * As suggested @lafriks - return as soon as possible, code readability
5 years ago
  1. .explore {
  2. padding-top: 15px;
  3. .navbar {
  4. justify-content: center;
  5. padding-top: 15px !important;
  6. margin-top: -15px !important;
  7. margin-bottom: 15px !important;
  8. background-color: #fafafa !important;
  9. border-width: 1px !important;
  10. .octicon {
  11. width: 16px;
  12. text-align: center;
  13. margin-right: 5px;
  14. }
  15. }
  16. }
  17. .ui.repository.list {
  18. .item {
  19. padding-bottom: 25px;
  20. &:not(:first-child) {
  21. border-top: 1px solid #eeeeee;
  22. padding-top: 25px;
  23. }
  24. .ui.header {
  25. font-size: 1.5rem;
  26. padding-bottom: 10px;
  27. .name {
  28. word-break: break-all;
  29. }
  30. .metas {
  31. color: #888888;
  32. font-size: 14px;
  33. font-weight: normal;
  34. span:not(:last-child) {
  35. margin-right: 5px;
  36. }
  37. }
  38. }
  39. .time {
  40. font-size: 12px;
  41. color: #808080;
  42. }
  43. .ui.tags {
  44. margin-bottom: 1em;
  45. }
  46. .ui.avatar.image {
  47. width: 24px;
  48. height: 24px;
  49. }
  50. }
  51. }
  52. .ui.repository.branches {
  53. .time {
  54. font-size: 12px;
  55. color: #808080;
  56. }
  57. }
  58. .ui.user.list {
  59. .item {
  60. padding-bottom: 25px;
  61. &:not(:first-child) {
  62. border-top: 1px solid #eeeeee;
  63. padding-top: 25px;
  64. }
  65. .ui.avatar.image {
  66. width: 40px;
  67. height: 40px;
  68. }
  69. .description {
  70. margin-top: 5px;
  71. .octicon:not(:first-child) {
  72. margin-left: 5px;
  73. }
  74. a {
  75. color: #333333;
  76. &:hover {
  77. text-decoration: underline;
  78. }
  79. }
  80. }
  81. }
  82. }