mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
Fixed tailwindcss and layout.
This commit is contained in:
parent
9767a78b78
commit
1f980bb813
4 changed files with 60 additions and 8 deletions
|
@ -83,6 +83,8 @@
|
||||||
"etherpad-lite": "node/server.ts"
|
"etherpad-lite": "node/server.ts"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"autoprefixer": "^10.4.17",
|
||||||
|
"postcss": "^8.4.35",
|
||||||
"@types/async": "^3.2.24",
|
"@types/async": "^3.2.24",
|
||||||
"@types/express": "^4.17.21",
|
"@types/express": "^4.17.21",
|
||||||
"@types/http-errors": "^2.0.4",
|
"@types/http-errors": "^2.0.4",
|
||||||
|
|
|
@ -1,9 +1,31 @@
|
||||||
|
import 'tailwindcss/tailwind.css'
|
||||||
|
import {connect} from 'socket.io-client'
|
||||||
|
import {useEffect} from "react";
|
||||||
|
|
||||||
export const Admin = ()=>{
|
export const Admin = ()=>{
|
||||||
|
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const socket = connect('/settings')
|
||||||
|
|
||||||
|
socket.on('connect', () => {
|
||||||
|
socket.emit('load');
|
||||||
|
});
|
||||||
|
|
||||||
|
socket.on('disconnect', (reason) => {
|
||||||
|
// The socket.io client will automatically try to reconnect for all reasons other than "io
|
||||||
|
// server disconnect".
|
||||||
|
if (reason === 'io server disconnect') socket.connect();
|
||||||
|
});
|
||||||
|
|
||||||
|
socket.on('settings', (settings) => {
|
||||||
|
console.log(settings)
|
||||||
|
})
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div>
|
<h1 className="">Admin1234</h1>
|
||||||
<h1 className="text-red-50">Admin12345</h1>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
28
src/pages/admin/layout.tsx
Normal file
28
src/pages/admin/layout.tsx
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
import {FC} from "react";
|
||||||
|
import packageJson from '../../../package.json';
|
||||||
|
|
||||||
|
type Repo = {
|
||||||
|
name: string
|
||||||
|
}
|
||||||
|
|
||||||
|
import { Metadata } from 'next'
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Home',
|
||||||
|
description: 'Welcome to Next.js',
|
||||||
|
}
|
||||||
|
|
||||||
|
type RootLayoutProps = {
|
||||||
|
children: React.ReactNode|React.ReactNode[]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const RootLayout:FC<RootLayoutProps> = ({children})=>{
|
||||||
|
|
||||||
|
return <div>
|
||||||
|
{children}
|
||||||
|
{packageJson.name}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
export default RootLayout
|
|
@ -2,9 +2,9 @@ import type { Config } from "tailwindcss";
|
||||||
|
|
||||||
const config: Config = {
|
const config: Config = {
|
||||||
content: [
|
content: [
|
||||||
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
|
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
|
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
],
|
],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue