This commit is contained in:
scarlett kadan 2024-05-07 21:53:49 -04:00
parent f3d8ec0cc4
commit 4cea1b0832
4 changed files with 110 additions and 25 deletions

View File

@ -53,7 +53,11 @@ $white: #fff;
.browse-cable {
width: 80%;
height: 100px;
background: $white;
background: linear-gradient(
-30deg,
rgb(187, 208, 236) 0%,
rgba(255, 255, 255, 1) 100%
);
display: flex;
align-items: center;
justify-content: flex-start;
@ -66,6 +70,7 @@ $white: #fff;
transition: all 0.3s ease-in-out;
cursor: pointer;
text-decoration: none;
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
.browse-cable:hover {
@ -75,38 +80,57 @@ $white: #fff;
.browse-cable-image {
width: auto;
height: 100%;
margin-right: 25px;
background-color: transparent;
margin-right: 10px;
border: $gray solid 1px;
border-radius: 10px;
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
}
.browse-cable-label {
width: 90%;
height: auto;
background-color: transparent;
}
.browse-cable-arrow {
width: auto;
height: auto;
font-size: 45px;
font-family: "Gotham Light";
transform:scaleY(2);
color: $gray;
font-size: 35px;
transform: scaleY(2);
font-family: "Gotham Book";
color: $medium-blue;
background-color: transparent;
}
.browse-cable-name, .browse-cable-brand, .browse-cable-description, .browse-cable-short {
.browse-cable-name {
background-color: transparent;
font-size: 20px;
color: $medium-blue;
width: auto;
height: auto;
font-family: "Gotham Bold";
margin-bottom: 2px;
}
.browse-cable-description {
background-color: transparent;
font-size: 18px;
color: $medium-blue;
width: auto;
height: auto;
font-family: "Gotham Medium";
margin-bottom: 10px;
}
.browse-cable-brand,
.browse-cable-short,
.browse-cable-position {
background-color: transparent;
font-size: 16px;
color: $light-blue;
color: $light-blue;
width: auto;
height: auto;
font-family: "Gotham Medium";
}
.browse-cable-name {
padding-bottom: 10px;
}
.browse-cable-brand, .browse-cable-description, .browse-cable-short {
color: $black;
font-size: 16px;
}

View File

@ -33,13 +33,21 @@ class cable {
<img className="browse-cable-image" src={this.image} alt="Cable" />
<div className="browse-cable-label">
<div className="browse-cable-name">{this.name}</div>
<div className="browse-cable-description">
<span style={{ color: "#007cbe" }}></span>
{this.description}
</div>
<div className="browse-cable-brand">
<span style={{ color: "#007cbe" }}>Brand: </span>
<span style={{ color: "black", backgroundColor: "transparent" }}>
Brand:{" "}
</span>
{this.brand}
</div>
<div className="browse-cable-description">
<span style={{ color: "#007cbe" }}>About: </span>
{this.description}
<div className="browse-cable-position">
<span style={{ color: "black", backgroundColor: "transparent" }}>
Position:{" "}
</span>
{this.position}
</div>
</div>
<span className="browse-cable-arrow">{">"}</span>

View File

@ -1,17 +1,64 @@
import React, { Component } from "react";
import BeldenLogo from "../assets/images/belden-white.png";
import DefaultPartImg from "../assets/images/part.png";
import { NavLink } from "react-router-dom";
import "../assets/stylesheets/cabledetail.scss";
class cable {
constructor(
part_number,
position,
name,
brand,
description,
short_description,
image
) {
this.part_number = part_number;
this.position = position;
this.name = name;
this.brand = brand;
this.description = description;
this.short_description = short_description;
if (image === undefined) {
this.image = DefaultPartImg;
} else {
this.image = image;
}
}
returnDiv() {
return (
<NavLink className="browse-cable" to={"/cable/" + this.part_number}>
<img className="browse-cable-image" src={this.image} alt="Cable" />
<div className="browse-cable-label">
<div className="browse-cable-name">{this.name}</div>
<div className="browse-cable-brand">
<span style={{ color: "#007cbe" }}>Brand: </span>
{this.brand}
</div>
<div className="browse-cable-description">
<span style={{ color: "#007cbe" }}>About: </span>
{this.description}
</div>
</div>
<span className="browse-cable-arrow">{">"}</span>
</NavLink>
);
}
}
export default class CableDetailComponent extends Component {
constructor(props) {
super(props);
}
// componentDidMount() {
// this.props.socket.send('{"type":"cable_map","call":"request","data":{}}');
// this.props.socket.addEventListener("message", this.handleMessage);
// }
componentDidMount() {
// this.props.socket.send('{"type":"cable_map","call":"request","data":{}}');
// this.props.socket.addEventListener("message", this.handleMessage);
const id = this.props.cableId;
console.log("ID: ", id);
}
// handleMessage = (event) => {
// try {
@ -33,7 +80,6 @@ export default class CableDetailComponent extends Component {
<img src={BeldenLogo} alt="Belden" />
</div>
<div className="cable-fieldContainer">
</div>
</div>
);

View File

@ -8,6 +8,13 @@ export default class SummaryComponent extends Component {
<div className="summary">
<img className="summary-image" src={BeldenLogo} alt="Belden" />
<div className="summary-fieldContainer"></div>
{/* <iframe src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=7" width="450" height="200" frameborder="0"></iframe> */}
<iframe
src="http://192.168.1.12:3000/d-solo/cdiqwmlr8c9ogf/sensors?orgId=1&refresh=1s&theme=light&panelId=9"
width="450"
height="200"
frameborder="0"
></iframe>
</div>
);
}