refactor(client): use css modules
This commit is contained in:
		
							parent
							
								
									c2d05b507a
								
							
						
					
					
						commit
						194fb14e07
					
				
					 1 changed files with 52 additions and 60 deletions
				
			
		|  | @ -1,25 +1,25 @@ | ||||||
| <template> | <template> | ||||||
| <div class="wrpstxzv" :class="{ children: depth > 1 }"> | <div :class="[$style.root, { [$style.children]: depth > 1 }]"> | ||||||
| 	<div class="main"> | 	<div :class="$style.main"> | ||||||
| 		<MkAvatar class="avatar" :user="note.user"/> | 		<MkAvatar :class="$style.avatar" :user="note.user"/> | ||||||
| 		<div class="body"> | 		<div :class="$style.body"> | ||||||
| 			<MkNoteHeader class="header" :note="note" :mini="true"/> | 			<MkNoteHeader :class="$style.header" :note="note" :mini="true"/> | ||||||
| 			<div class="body"> | 			<div> | ||||||
| 				<p v-if="note.cw != null" class="cw"> | 				<p v-if="note.cw != null" :class="$style.cw"> | ||||||
| 					<Mfm v-if="note.cw != ''" class="text" :text="note.cw" :author="note.user" :i="$i"/> | 					<Mfm v-if="note.cw != ''" style="margin-right: 8px;" :text="note.cw" :author="note.user" :i="$i"/> | ||||||
| 					<MkCwButton v-model="showContent" :note="note"/> | 					<MkCwButton v-model="showContent" :note="note"/> | ||||||
| 				</p> | 				</p> | ||||||
| 				<div v-show="note.cw == null || showContent" class="content"> | 				<div v-show="note.cw == null || showContent"> | ||||||
| 					<MkSubNoteContent class="text" :note="note"/> | 					<MkSubNoteContent :class="$style.text" :note="note"/> | ||||||
| 				</div> | 				</div> | ||||||
| 			</div> | 			</div> | ||||||
| 		</div> | 		</div> | ||||||
| 	</div> | 	</div> | ||||||
| 	<template v-if="depth < 5"> | 	<template v-if="depth < 5"> | ||||||
| 		<MkNoteSub v-for="reply in replies" :key="reply.id" :note="reply" class="reply" :detail="true" :depth="depth + 1"/> | 		<MkNoteSub v-for="reply in replies" :key="reply.id" :note="reply" :class="$style.reply" :detail="true" :depth="depth + 1"/> | ||||||
| 	</template> | 	</template> | ||||||
| 	<div v-else class="more"> | 	<div v-else :class="$style.more"> | ||||||
| 		<MkA class="text _link" :to="notePage(note)">{{ i18n.ts.continueThread }} <i class="ti ti-chevron-double-right"></i></MkA> | 		<MkA class="_link" :to="notePage(note)">{{ i18n.ts.continueThread }} <i class="ti ti-chevron-double-right"></i></MkA> | ||||||
| 	</div> | 	</div> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  | @ -57,8 +57,8 @@ if (props.detail) { | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <style lang="scss" scoped> | <style lang="scss" module> | ||||||
| .wrpstxzv { | .root { | ||||||
| 	padding: 16px 32px; | 	padding: 16px 32px; | ||||||
| 	font-size: 0.9em; | 	font-size: 0.9em; | ||||||
| 
 | 
 | ||||||
|  | @ -66,11 +66,13 @@ if (props.detail) { | ||||||
| 		padding: 10px 0 0 16px; | 		padding: 10px 0 0 16px; | ||||||
| 		font-size: 1em; | 		font-size: 1em; | ||||||
| 	} | 	} | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| 	> .main { | .main { | ||||||
| 	display: flex; | 	display: flex; | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| 		> .avatar { | .avatar { | ||||||
| 	flex-shrink: 0; | 	flex-shrink: 0; | ||||||
| 	display: block; | 	display: block; | ||||||
| 	margin: 0 8px 0 0; | 	margin: 0 8px 0 0; | ||||||
|  | @ -79,49 +81,39 @@ if (props.detail) { | ||||||
| 	border-radius: 8px; | 	border-radius: 8px; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 		> .body { | .body { | ||||||
| 	flex: 1; | 	flex: 1; | ||||||
| 	min-width: 0; | 	min-width: 0; | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| 			> .header { | .header { | ||||||
| 	margin-bottom: 2px; | 	margin-bottom: 2px; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 			> .body { | .cw { | ||||||
| 				> .cw { |  | ||||||
| 	cursor: default; | 	cursor: default; | ||||||
| 	display: block; | 	display: block; | ||||||
| 	margin: 0; | 	margin: 0; | ||||||
| 	padding: 0; | 	padding: 0; | ||||||
| 	overflow-wrap: break-word; | 	overflow-wrap: break-word; | ||||||
| 
 |  | ||||||
| 					> .text { |  | ||||||
| 						margin-right: 8px; |  | ||||||
| 					} |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 				> .content { | .text { | ||||||
| 					> .text { |  | ||||||
| 	margin: 0; | 	margin: 0; | ||||||
| 	padding: 0; | 	padding: 0; | ||||||
| } | } | ||||||
| 				} |  | ||||||
| 			} |  | ||||||
| 		} |  | ||||||
| 	} |  | ||||||
| 
 | 
 | ||||||
| 	> .reply, > .more { | .reply, .more { | ||||||
| 	border-left: solid 0.5px var(--divider); | 	border-left: solid 0.5px var(--divider); | ||||||
| 	margin-top: 10px; | 	margin-top: 10px; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 	> .more { | .more { | ||||||
| 	padding: 10px 0 0 16px; | 	padding: 10px 0 0 16px; | ||||||
| } | } | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| @container (max-width: 450px) { | @container (max-width: 450px) { | ||||||
| 	.wrpstxzv { | 	.root { | ||||||
| 		padding: 14px 16px; | 		padding: 14px 16px; | ||||||
| 
 | 
 | ||||||
| 		&.children { | 		&.children { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue