Skip to content

Commit

Permalink
chore: Update routes to include lazy loading for images
Browse files Browse the repository at this point in the history
  • Loading branch information
tako0614 committed Jul 28, 2024
1 parent 1c46de5 commit 92e57a5
Show file tree
Hide file tree
Showing 4 changed files with 117 additions and 4 deletions.
102 changes: 102 additions & 0 deletions markdowns/takos/v2/client/ws.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
## Endpoint

```
GET /takos/v2/client/ws
```

## descripton

websocketです


## ws request

### join friend room

reqest
```
{
type: "joinFriendRoom",
friendName: string
}
```
response
```
{
type: "joinFriendRoom",
status: string
}
```

### join room

reqest
```
{
type: "joinRoom",
roomid: string
}
```
response
```
{
type: "joinRoom",
status: string
}
```

### ここからはサーバーから送られてくるのものみ

on open
```
{
sessionid: string
}
```
message(friend)
```
{
type: "friendMessage",
message: string,
userName: string,
messageid: string,
time: Date,
}
```
message(room)
```
{
type: "roomMessage",
message: string,
userName: string,
messageid: string,
time: Date
}
```
read(friend)

```
{
type: "friendRead",
friendid: string,
messageid: string
}
```

read(room)

```
{
type: "roomRead",
roomid: string,
messageid: string
}
```
通知
```
{
type: "notification",
message: string,
link: string
}
```
4 changes: 2 additions & 2 deletions routes/[...path].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ export default function Home(
{/*content */}
<Partial name="body">
<div
class="w-full min-w-0 text-white h-screen overflow-y-hidden flex"
class="w-full min-w-0 text-white overflow-y-hidden flex"
id="md"
>
<div class="lg:ml-[18rem] mt-4 min-w-0 flex w-full">
<div class="w-2/3 lg:w-1/2 mx-auto">
<div class="w-2/3 lg:w-1/2 mx-auto overflow-y-auto hidden-scrollbar">
<div
class="markdown-body"
style={{ backgroundColor: "#181818" }}
Expand Down
2 changes: 1 addition & 1 deletion routes/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function App({ Component }: PageProps) {
<title>tako-api-doc-template</title>
<link rel="stylesheet" href="/styles.css" />
</head>
<body f-client-nav>
<body class="" f-client-nav>
<Component />
</body>
</html>
Expand Down
13 changes: 12 additions & 1 deletion static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
.file-tree ul {
padding-left: 5px;
}

}
.folder,
.file {
Expand Down Expand Up @@ -52,3 +51,15 @@
.folder2.open:before {
content: "▼";
}


@layer utilities {
.hidden-scrollbar {
-ms-overflow-style: none; /* IE, Edge 対応 */
scrollbar-width: none; /* Firefox 対応 */
}
.hidden-scrollbar::-webkit-scrollbar {
/* Chrome, Safari 対応 */
display: none;
}
}

0 comments on commit 92e57a5

Please sign in to comment.