Skip to content

Commit 8cfe665

Browse files
committed
Make JottingsList more responsive, remove Powered by Vercel
1 parent 590c000 commit 8cfe665

13 files changed

Lines changed: 37 additions & 29 deletions

File tree

components/Jotting/jotting.module.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
border: none;
66
text-align: left;
77
padding: 1em;
8-
width: 100%;
98
height: 100%;
109
}
1110

@@ -32,15 +31,13 @@
3231

3332
.previewButton {
3433
display: flex;
34+
width: 100%;
3535
align-items: center;
36+
justify-content: space-between;
3637
}
3738

3839
.previewTitle {
3940
display: inline-block;
40-
width: 170px;
41-
}
42-
43-
.previewPin {
4441
}
4542

4643
.jottingOptionsBar {

components/Jotting/notePreview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function NotePreview(props) {
1212

1313
return (
1414
<data className={jotting.jotting} value={"N" + props.id}>
15-
<button onClick={handleNoteBtnClick}>
15+
<button className={jotting.previewButton} onClick={handleNoteBtnClick}>
1616
<span className={jotting.previewTitle}>{props.title}</span>
1717
{props.priority == 1 ? <PinImage className={jotting.previewPin} /> : ""}
1818
</button>

components/Jotting/taskPreview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function TaskPreview(props) {
99
return (
1010
<data className={jotting.jotting} value={"T" + props.id}>
1111
<button className={jotting.previewButton} onClick={() => Jotting.openJotting(router, "task", props)}>
12-
<span className={`${jotting.previewTitle} ${props.completed == "1" && jotting.completed}`}>{props.title}</span>
12+
<span className={`${jotting.previewTitle} ${props.completed == "1" ? jotting.completed : ''}`}>{props.title}</span>
1313
{props.priority == 1 ? <PinImage className={jotting.previewPin} /> : ""}
1414
</button>
1515
</data>

components/JottingList/jottingList.module.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
ul.jottingList > li {
12-
flex-basis: 50%;
12+
width: 100%;
1313
}
1414

1515
ul.jottingList > li:hover {
@@ -22,4 +22,8 @@ ul.jottingList > li:hover {
2222
flex-wrap: wrap;
2323
flex-direction: row;
2424
}
25+
26+
ul.jottingList > li {
27+
flex: 1 1 200px;
28+
}
2529
}

components/JottingsControls/jottingsControl.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useRouter } from "next/router";
22
import { useEffect, useState } from "react";
33
import { compareArrays } from "../../libs/arrayExtensions";
44
import { getJottings, getLabels, getSharedJottings } from "../../libs/Datastore/requests";
5-
import { useWindowSize } from "../../libs/view";
65
import LabelControl from "./labelControl";
76
import LabelsControl from "./labelsControl";
87
import NoteControl from "./noteControl";

components/JottingsControls/jottingsControl.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828

2929
.ownTaskList {
30-
grid-column: 5 / 9;
30+
grid-column: 5 / 8;
3131
}
3232

3333
.ownNoteList,
@@ -47,7 +47,7 @@
4747
grid-column-end: -1;
4848
justify-self: flex-start;
4949
overflow: auto;
50-
grid-template-columns: subgrid;
50+
grid-template-columns: 255px repeat(6, 175px);
5151
}
5252

5353
.taskControl {

components/JottingsControls/notesControl.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import ProgressSpinner from "../ProgressSpinner/progressSpinner";
22
import CreateNoteButton from "../CreateJottingButton/createNoteButton";
33
import NoteList from "../JottingList/noteList";
44
import jottingsControl from "./jottingsControl.module.css";
5+
import CreateJottingButton from "../CreateJottingButton/createJottingButton";
56

67
/**
78
* Control for Notes heading,
@@ -19,7 +20,7 @@ export default function NotesControl({notesState, active}) {
1920
<article className={`${active ? "active" : ""} ${jottingsControl.ownNoteList}`}>
2021
<h1>Notes</h1>
2122
{notes ? <NoteList notes={notes} /> : <ProgressSpinner />}
22-
<CreateNoteButton setJots={setNotes} />
23+
<CreateJottingButton jotType="Note" setJots={setNotes} />
2324
</article>
2425
);
2526
}

components/LabelPreview/labelPreview.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ button.previewButton {
77
font-size: 1rem;
88
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
99
text-align: left;
10+
width: 100%;
1011
}
1112

1213
button.previewButton:hover {

components/Layout/layout.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ export default function Layout(props) {
1313
{props.children}
1414

1515
<footer className={layout.footer}>
16-
<a
17-
className={layout.vercelText}
18-
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
19-
target="_blank"
20-
rel="noopener noreferrer"
21-
>
22-
Powered by{" "}
23-
<img src="/vercel.svg" alt="Vercel Logo" className={layout.logo} />
24-
</a>
25-
<p>&copy; 2022 Borum Tech</p>
2616
<div className={layout.platformList}>
2717
<PlatformButton
2818
downloadLink="https://play.google.com/store/apps/details?id=com.boruminc.borumjot.android"
2919
imgSrc="/images/platforms/android-icon.png"
3020
label="Get for free on the Google Play Store"
3121
/>
3222
</div>
23+
<p>&copy; 2020-{new Date().getFullYear()} Borum Tech</p>
3324
<ul className={layout.legalLinks}>
3425
<li className={layout.privacyPolicy}>
3526
<Link href="/legal/PrivacyPolicy">

components/pinImage.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import Image from "next/image";
21

32
export default function PinImage(props) {
43
return (
5-
<Image
4+
<img
65
className={props.className ?? ""}
76
height={25}
87
width={25}

0 commit comments

Comments
 (0)