mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Fix contributor graphs mobile layout and responsiveness (#29597)
Also removed a unneeded and actually conflicting class name `stats-table`. Fixes: https://github.com/go-gitea/gitea/issues/29192 <img width="445" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/787804ed-6ba4-437f-b314-f23cbe2edf7a">
This commit is contained in:
		| @@ -303,7 +303,7 @@ export default { | |||||||
| </script> | </script> | ||||||
| <template> | <template> | ||||||
|   <div> |   <div> | ||||||
|     <h2 class="ui header gt-df gt-ac gt-sb"> |     <div class="ui header gt-df gt-ac gt-sb"> | ||||||
|       <div> |       <div> | ||||||
|         <relative-time |         <relative-time | ||||||
|           v-if="xAxisMin > 0" |           v-if="xAxisMin > 0" | ||||||
| @@ -334,7 +334,7 @@ export default { | |||||||
|         <div class="ui dropdown jump" id="repo-contributors"> |         <div class="ui dropdown jump" id="repo-contributors"> | ||||||
|           <div class="ui basic compact button"> |           <div class="ui basic compact button"> | ||||||
|             <span class="text"> |             <span class="text"> | ||||||
|               {{ locale.filterLabel }} <strong>{{ locale.contributionType[type] }}</strong> |               <span class="not-mobile">{{ locale.filterLabel }} </span><strong>{{ locale.contributionType[type] }}</strong> | ||||||
|               <svg-icon name="octicon-triangle-down" :size="14"/> |               <svg-icon name="octicon-triangle-down" :size="14"/> | ||||||
|             </span> |             </span> | ||||||
|           </div> |           </div> | ||||||
| @@ -351,7 +351,7 @@ export default { | |||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|     </h2> |     </div> | ||||||
|     <div class="gt-df ui segment main-graph"> |     <div class="gt-df ui segment main-graph"> | ||||||
|       <div v-if="isLoading || errorText !== ''" class="gt-tc gt-m-auto"> |       <div v-if="isLoading || errorText !== ''" class="gt-tc gt-m-auto"> | ||||||
|         <div v-if="isLoading"> |         <div v-if="isLoading"> | ||||||
| @@ -370,7 +370,8 @@ export default { | |||||||
|     </div> |     </div> | ||||||
|     <div class="contributor-grid"> |     <div class="contributor-grid"> | ||||||
|       <div |       <div | ||||||
|         v-for="(contributor, index) in sortedContributors" :key="index" class="stats-table" |         v-for="(contributor, index) in sortedContributors" | ||||||
|  |         :key="index" | ||||||
|         v-memo="[sortedContributors, type]" |         v-memo="[sortedContributors, type]" | ||||||
|       > |       > | ||||||
|         <div class="ui top attached header gt-df gt-f1"> |         <div class="ui top attached header gt-df gt-f1"> | ||||||
| @@ -406,13 +407,25 @@ export default { | |||||||
| <style scoped> | <style scoped> | ||||||
| .main-graph { | .main-graph { | ||||||
|   height: 260px; |   height: 260px; | ||||||
|  |   padding-top: 2px; | ||||||
| } | } | ||||||
|  |  | ||||||
| .contributor-grid { | .contributor-grid { | ||||||
|   display: grid; |   display: grid; | ||||||
|   grid-template-columns: repeat(2, 1fr); |   grid-template-columns: repeat(2, 1fr); | ||||||
|   gap: 1rem; |   gap: 1rem; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .contributor-grid > * { | ||||||
|  |   min-width: 0; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @media (max-width: 991.98px) { | ||||||
|  |   .contributor-grid { | ||||||
|  |     grid-template-columns: repeat(1, 1fr); | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
| .contributor-name { | .contributor-name { | ||||||
|   margin-bottom: 0; |   margin-bottom: 0; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user