mirror of
https://github.com/bendtherules/piktochart-create-editor.git
synced 2026-08-18 13:52:56 +00:00
Use basic styling from sample html
This commit is contained in:
Vendored
+6760
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@
|
|||||||
-->
|
-->
|
||||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
||||||
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
|
||||||
|
<link rel="stylesheet" href="%PUBLIC_URL%/bootstrap.css">
|
||||||
<!--
|
<!--
|
||||||
Notice the use of %PUBLIC_URL% in the tags above.
|
Notice the use of %PUBLIC_URL% in the tags above.
|
||||||
It will be replaced with the URL of the `public` folder during the build.
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
.drag-container {
|
.add-to-canvas-input {
|
||||||
overflow: hidden;
|
padding-left: 0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-to-canvas-input .desc {
|
||||||
|
padding: 0.5em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-to-canvas-input input {
|
||||||
|
margin: 0.5em 0;
|
||||||
}
|
}
|
||||||
@@ -48,13 +48,18 @@ export class AddToCanvasInput extends React.Component<AddToCanvasInputProps, Add
|
|||||||
return (
|
return (
|
||||||
<div className="add-to-canvas-input">
|
<div className="add-to-canvas-input">
|
||||||
<div className="add-text-input">
|
<div className="add-text-input">
|
||||||
<div className="desc">
|
<h4>Text</h4>
|
||||||
Add text
|
<input
|
||||||
</div>
|
type="text"
|
||||||
<input type="text" value={this.state.textInputValue} onChange={this.updateInputText} />
|
className="form-control"
|
||||||
<input type="button" value="Add" onClick={this.addTextNodeOnSubmit} />
|
value={this.state.textInputValue}
|
||||||
|
onChange={this.updateInputText}
|
||||||
|
/>
|
||||||
|
<button id="addText" className="btn btn-default" onClick={this.addTextNodeOnSubmit} >
|
||||||
|
Add Text
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div >
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
.canvas-area {
|
.canvas-area {
|
||||||
float: right;
|
margin: 10px;
|
||||||
width: 80%;
|
padding: 0;
|
||||||
height: 100%;
|
box-shadow: 0px 0px 5px black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.canvas-area .block {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 600px;
|
||||||
|
|
||||||
|
border: 1px solid;
|
||||||
|
}
|
||||||
@@ -37,9 +37,9 @@ export class CanvasArea extends React.Component<CanvasAreaProps, CanvasAreaState
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="canvas-area">
|
<div className="canvas-area col-sm-8 col-md-8 col-lg-8">
|
||||||
<DragContainer id={this.containerId} >
|
<DragContainer id={this.containerId} >
|
||||||
<div className="drag-container-inner" style={{ width: '500px', height: '500px' }}>
|
<div className="block">
|
||||||
{
|
{
|
||||||
this.renderDraggableNodes()
|
this.renderDraggableNodes()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,30 @@
|
|||||||
.sidebar {
|
.sidebar {
|
||||||
float: left;
|
height: 100%;
|
||||||
width: 20%;
|
background: #E8E8EA;
|
||||||
height: 100%;
|
}
|
||||||
|
|
||||||
|
.sidebar .form {
|
||||||
|
height: 80px;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .assets {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .assets .text, .sidebar .assets .image {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .assets .image ul li {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
margin-right: 5px;
|
||||||
|
float: left;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar .assets .image ul li img {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
@@ -18,9 +18,24 @@ export class Sidebar extends React.Component<SidebarProps, SidebarState> {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="sidebar">
|
<div className="sidebar col-sm-2 col-md-2 col-lg-2">
|
||||||
<UploadResourcesInput />
|
<UploadResourcesInput />
|
||||||
<AddToCanvasInput addTextNode={this.props.addTextNode} />
|
|
||||||
|
<div className="assets">
|
||||||
|
<h3>Assets</h3>
|
||||||
|
<div className="text">
|
||||||
|
<AddToCanvasInput addTextNode={this.props.addTextNode} />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div className="image">
|
||||||
|
<h4>Images</h4>
|
||||||
|
<ul className="list-unstyled">
|
||||||
|
{/* List of images here
|
||||||
|
<li><img src="images/sample.jpeg" class="img-rounded" /></li> */}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
export { DragContextProvider, DragStartFn, DragSharedInfo } from './DragContextProvider';
|
export { DragContextProvider, DragStartFn, DragSharedInfo } from './DragContextProvider';
|
||||||
export { XYPair } from './utils';
|
export { XYPair, deppCloneNaive, CanvasTextNode } from './utils';
|
||||||
+13
-1
@@ -1,5 +1,17 @@
|
|||||||
body {
|
*,*::before,*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body, #root {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user