diff --git a/bundle.js b/bundle.js
index 6b675bf..aff1cbc 100644
--- a/bundle.js
+++ b/bundle.js
@@ -1,7 +1,9 @@
$(function() {
- $('#word').each(function(index, elem) {
+ $('#words-xxxxx').each(function() {
+ var word_id = Number(window.location.hash.substring(1))
+
$.getJSON(
- 'http://localhost:4567/words/' + $(elem).data('id'),
+ 'http://localhost:4567/words/' + word_id,
function(data) {
var primary_form = data['primary_form']
var part_of_speech = data['part_of_speech']
@@ -22,6 +24,13 @@ $(function() {
data['inflections'].forEach(function(item) {
var descr = item['descr']
var value = item['value'] || ''
+ var other_word_id = item['other_word_id']
+
+ if (other_word_id !== null) {
+ value =
+ '' + value + ''
+ }
+
inflections.push(
'
' + descr + ': ' + value + ''
)
@@ -56,6 +65,8 @@ $(function() {
)
})
+ document.title = primary_form
+
$('#primary-form').text(primary_form)
$('#part-of-speech').text(part_of_speech)
diff --git a/words.html b/words.html
index 32a4236..60c844c 100644
--- a/words.html
+++ b/words.html
@@ -10,12 +10,12 @@
Глаголы
- - არის - быть
- - აქვს - иметь (неодушевлённое)
- - ყავს - иметь (одушевлённое)
- - აქებს - хвалить
- - ცემს - бить
- - ხატავს - рисовать
+ - არის - быть
+ - აქვს - иметь (неодушевлённое)
+ - ყავს - иметь (одушевлённое)
+ - აქებს - хвалить
+ - ცემს - бить
+ - ხატავს - рисовать
Существительные
diff --git a/words/არის.html b/words/xxxxx.html
similarity index 93%
rename from words/არის.html
rename to words/xxxxx.html
index 0b39d61..aa1a2e9 100644
--- a/words/არის.html
+++ b/words/xxxxx.html
@@ -2,11 +2,11 @@
- არის
+
-
+
diff --git a/words/აქებს.html b/words/აქებს.html
deleted file mode 100644
index 359da27..0000000
--- a/words/აქებს.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
- აქებს
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Примеры употребления
-
-
-
-
-
-
-
diff --git a/words/აქვს.html b/words/აქვს.html
deleted file mode 100644
index 3ae8f59..0000000
--- a/words/აქვს.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
- აქვს
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Примеры употребления
-
-
-
-
-
-
-
diff --git a/words/ყავს.html b/words/ყავს.html
deleted file mode 100644
index 1ea5eb1..0000000
--- a/words/ყავს.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
- ყავს
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Примеры употребления
-
-
-
-
-
-
-
diff --git a/words/ცემს.html b/words/ცემს.html
deleted file mode 100644
index f9ea473..0000000
--- a/words/ცემს.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
- ცემს
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Примеры употребления
-
-
-
-
-
-
-
diff --git a/words/ხატავს.html b/words/ხატავს.html
deleted file mode 100644
index 7f3c84e..0000000
--- a/words/ხატავს.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
- ხატავს
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Примеры употребления
-
-
-
-
-
-
-