Skip to content

Commit

Permalink
Some improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
aandrew-me committed Jan 10, 2023
1 parent 6b09073 commit 27cc93a
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 72 deletions.
39 changes: 39 additions & 0 deletions sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{"WATER": {
"MEANINGS": {
"1": [
"Verb",
"supply with water, as with channels or ditches or streams",
["Wet"],
["Water the fields"]
],
"3": [
"Verb",
"secrete or form water, as tears or saliva",
["Secrete", "Release"],
[
"My mouth watered at the prospect of a good dinner",
"His eyes watered"
]
],
"6": [
"Noun",
"a liquid necessary for the life of most animals and plants",
["Food", "Nutrient", "Liquid", "Nutrient"],
["he asked for a drink of water"]
],
"2": [
"Verb",
"provide with water",
["Supply", "Provide", "Render", "Furnish"],
["We watered the buffalo"]
],
"4": [
"Verb",
"fill with tears",
["Fill", "Fill up"],
["His eyes were watering"]
]
},
"ANTONYMS": [],
"SYNONYMS": ["Body of water", "Piddle", "Water system", "Water", "Pee"]
}}
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "odicto"
version = "0.2.0"
version = "0.3.0"
description = "Offline English dictionary app"
authors = ["Andrew"]
license = "GPL-3"
Expand Down
136 changes: 68 additions & 68 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
{
"build": {
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build",
"devPath": "http://localhost:1420",
"distDir": "../dist",
"withGlobalTauri": false
},
"package": {
"productName": "odicto",
"version": "0.2.0"
},
"tauri": {
"allowlist": {
"all": false,
"shell": {
"all": false,
"open": true
}
},
"bundle": {
"active": true,
"category": "Utility",
"copyright": "",
"deb": {
"depends": []
},
"externalBin": [],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
],
"identifier": "app.vercel.odicto",
"longDescription": "Offline English dictionary app",
"macOS": {
"entitlements": null,
"exceptionDomain": "",
"frameworks": [],
"providerShortName": null,
"signingIdentity": null
},
"resources": [],
"shortDescription": "",
"targets": "all",
"windows": {
"certificateThumbprint": null,
"digestAlgorithm": "sha256",
"timestampUrl": ""
}
},
"security": {
"csp": null
},
"updater": {
"active": false
},
"windows": [
{
"fullscreen": false,
"height": 600,
"resizable": true,
"title": "OdictO - Offline Dictionary",
"width": 800
}
]
}
"build": {
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build",
"devPath": "http://localhost:1420",
"distDir": "../dist",
"withGlobalTauri": false
},
"package": {
"productName": "odicto",
"version": "0.3.0"
},
"tauri": {
"allowlist": {
"all": false,
"shell": {
"all": false,
"open": true
}
},
"bundle": {
"active": true,
"category": "Utility",
"copyright": "",
"deb": {
"depends": []
},
"externalBin": [],
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
],
"identifier": "app.vercel.odicto",
"longDescription": "Offline English dictionary app",
"macOS": {
"entitlements": null,
"exceptionDomain": "",
"frameworks": [],
"providerShortName": null,
"signingIdentity": null
},
"resources": [],
"shortDescription": "",
"targets": "all",
"windows": {
"certificateThumbprint": null,
"digestAlgorithm": "sha256",
"timestampUrl": ""
}
},
"security": {
"csp": null
},
"updater": {
"active": false
},
"windows": [
{
"fullscreen": false,
"resizable": true,
"title": "OdictO - Offline Dictionary",
"height": 900,
"width": 1200
}
]
}
}
16 changes: 16 additions & 0 deletions src/components/Info.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,26 @@ export default function Meaning(props) {
);
});

let synonyms = ""
props.props.SYNONYMS.forEach(item => {
synonyms += ` ${item} `
})

let antonyms = ""
props.props.ANTONYMS.forEach(item => {
antonyms += ` ${item} `
})
console.log(synonyms)
return (
<div id="info">
<h1>{props.props.word}</h1>
{elements}
<span className="synonym">{synonyms? "Synonyms: " : ""}</span>
<span>{synonyms? synonyms: ""}</span>
<br></br>
<span className="antonym">{antonyms? "Antonyms: " : ""}</span>
<span>{antonyms? "Antonyms " + antonyms: ""}</span>

</div>
);
}
21 changes: 19 additions & 2 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ h1{
border-radius: 10px;
border: none;
cursor: pointer;
border-bottom: 5px solid rgb(20, 170, 27);
border-bottom: 4px solid rgb(20, 170, 27);
font-size: large;
position: relative;
}
#searchBtn:active{
top:4px;
border:none;

}
#searchBox{
padding:10px;
Expand All @@ -35,9 +42,11 @@ h1{
#info{
text-align: left;
background-color: aliceblue;
padding: 0px 55px;
padding: 0px 55px 55px 55px;
border-radius: 10px;
display:inline-block;
width:80%;
box-shadow: 2px 2px 5px gray;
}

.meaning{
Expand All @@ -52,4 +61,12 @@ h1{

.example{
font-style: italic;
}
.synonym{
color:rgb(4, 186, 50);
font-weight: bold;
}
.antonym{
color:rgb(202, 45, 18);
font-weight: bold;
}

0 comments on commit 27cc93a

Please sign in to comment.