Skip to content

Commit 5246909

Browse files
committed
fix css classes, add simple.html
1 parent 6372dbd commit 5246909

File tree

6 files changed

+23
-15
lines changed

6 files changed

+23
-15
lines changed

config-overrides.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ module.exports = function override (config, env) {
4848
filename: 'foobar/index.html'
4949
})
5050
)
51+
config.plugins.splice(2, 0,
52+
new HtmlWebpackPlugin({
53+
inject: true,
54+
template: path.resolve(__dirname, 'public', 'simple.html'),
55+
filename: 'simple.html'
56+
})
57+
)
5158
}
5259
// console.dir(config, { depth: 10, colors: true })
5360
return config

public/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
</head>
2626
<body>
2727
<main>
28-
<a href="https://github.com/tutorcruncher/socket-frontend">github.com/tutorcruncher/socket-frontend</a>
28+
<p><a href="https://github.com/tutorcruncher/socket-frontend">github.com/tutorcruncher/socket-frontend</a></p>
29+
<p><a href="/simple.html">view simple socket panel</a></p>
2930
<p>mode defined by options:</p>
3031
<div id="socket1"></div>
3132
<p>Grid mode:</p>
@@ -39,7 +40,7 @@
3940
<script>
4041
var public_key = '9c79f14df986a1ec693c' // '61e9d8d03109e44d7c67'
4142
var api_root = null // 'https://socket-beta.tutorcruncher.com' 'http://localhost:8000'
42-
var socket1 = socket(public_key, {
43+
window.socket = socket(public_key, {
4344
element: '#socket1',
4445
router_mode: 'history',
4546
api_root: api_root,

src/components/contractors/List.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const Grid = ({contractors, root}) => (
77
<div className="tcs-flex">
88
{contractors.map((contractor, i) => (
99
<div key={i} className="tcs-col">
10-
<Link to={root.url(contractor.link)} className="tcs-box">
10+
<Link to={root.url(contractor.link)} className="tcs-item tcs-box">
1111
<img src={contractor.photo} alt={contractor.name} className="tcs-thumb"/>
1212
<h3 className="tcs-name">{contractor.name}</h3>
1313
</Link>
@@ -19,7 +19,7 @@ export const Grid = ({contractors, root}) => (
1919
export const List = ({contractors, root}) => (
2020
<div className="tcs-list">
2121
{contractors.map((contractor, i) => (
22-
<Link key={i} to={root.url(contractor.link)} className="tcs-box">
22+
<Link key={i} to={root.url(contractor.link)} className="tcs-item">
2323
<div className="tcs-image-col">
2424
<img src={contractor.photo} alt={contractor.name} className="tcs-thumb"/>
2525
<button className="tcs-button">
@@ -38,7 +38,7 @@ export const List = ({contractors, root}) => (
3838
</div>
3939
</div>
4040

41-
<div className="tcs-box-extra">
41+
<div className="tcs-list-extra">
4242
<Stars contractor={contractor} root={root}/>
4343

4444
<div className="tcs-location">

src/styles/contractors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727
}
2828

29-
.tcs-box {
29+
.tcs-item {
3030
text-decoration: none;
3131
user-select: none;
3232
h3.tcs-name {

src/styles/grid.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
.tcs-flex {
1212
display: flex;
1313
flex-wrap: wrap;
14-
.tcs-box {
14+
.tcs-item {
1515
display: block;
1616
border-radius: $border-radius;
1717
background-color: #005377;
@@ -39,7 +39,7 @@
3939
.tcs-col {
4040
padding: 10px 2px 20px;
4141
}
42-
.tcs-box {
42+
.tcs-item {
4343
width: 140px;
4444
}
4545
}

src/styles/list.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
$box-height: 186px;
33

44
.tcs-list {
5-
.tcs-box {
5+
.tcs-item {
66
box-sizing: content-box;
77
color: #444;
88
padding: 15px 0;
@@ -42,12 +42,12 @@ $box-height: 186px;
4242
rgba(255, 255, 255, 1) 100%
4343
);
4444
}
45+
}
4546

46-
.tcs-box-extra {
47-
display: grid;
48-
grid-template-rows: 100px 1fr auto;
49-
.tcs-stars {
50-
grid-row: span 2;
51-
}
47+
.tcs-list-extra {
48+
display: grid;
49+
grid-template-rows: 100px 1fr auto;
50+
.tcs-stars {
51+
grid-row: span 2;
5252
}
5353
}

0 commit comments

Comments
 (0)