diff --git a/sample.json b/sample.json new file mode 100644 index 0000000..1443df1 --- /dev/null +++ b/sample.json @@ -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"] +}} \ No newline at end of file diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 20d793f..6b8d66a 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1446,7 +1446,7 @@ dependencies = [ [[package]] name = "odicto" -version = "0.2.0" +version = "0.3.0" dependencies = [ "serde", "serde_json", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index a24ede8..c80deab 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -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" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 2d003ea..a5b2eff 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -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/128x128@2x.png", - "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/128x128@2x.png", + "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 + } + ] + } } diff --git a/src/components/Info.jsx b/src/components/Info.jsx index 3637ee3..1d4f8a3 100644 --- a/src/components/Info.jsx +++ b/src/components/Info.jsx @@ -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 (

{props.props.word}

{elements} + {synonyms? "Synonyms: " : ""} + {synonyms? synonyms: ""} +

+ {antonyms? "Antonyms: " : ""} + {antonyms? "Antonyms " + antonyms: ""} +
); } diff --git a/src/style.css b/src/style.css index 805daf3..08565e3 100644 --- a/src/style.css +++ b/src/style.css @@ -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; @@ -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{ @@ -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; } \ No newline at end of file