Get initial implementation for react working
This commit is contained in:
parent
37715762cd
commit
3f2a4b5762
8 changed files with 344 additions and 422 deletions
|
@ -1,18 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Pterodactyl Dev</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
</head>
|
||||
<body>
|
||||
<div id="pterodactyl">
|
||||
<router-view></router-view>
|
||||
<div class="w-full m-auto mt-0 container">
|
||||
<p class="text-right text-neutral-600 text-xs">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
12
resources/scripts/components/App.tsx
Normal file
12
resources/scripts/components/App.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import * as React from 'react';
|
||||
import { hot } from 'react-hot-loader/root';
|
||||
|
||||
class App extends React.PureComponent {
|
||||
render () {
|
||||
return (
|
||||
<h1>Hello</h1>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default hot(App);
|
5
resources/scripts/index.tsx
Normal file
5
resources/scripts/index.tsx
Normal file
|
@ -0,0 +1,5 @@
|
|||
import * as React from 'react';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import App from "@/components/App";
|
||||
|
||||
ReactDOM.render(<App/>, document.getElementById('app'));
|
|
@ -35,15 +35,13 @@
|
|||
<body class="{{ $css['body'] ?? 'bg-neutral-50' }}">
|
||||
@section('content')
|
||||
@yield('above-container')
|
||||
<div id="pterodactyl" class="flex flex-col">
|
||||
<div id="app" class="flex flex-col">
|
||||
@yield('container')
|
||||
</div>
|
||||
@yield('below-container')
|
||||
@show
|
||||
@section('scripts')
|
||||
{!! $asset->js('main.js') !!}
|
||||
{!! $asset->js('vendor.js') !!}
|
||||
{!! $asset->js('locales.js') !!}
|
||||
@show
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue