Merge branch 'prevodi'

master
Jurij Podgoršek 2024-07-11 11:27:48 +02:00
commit 4721c6a3fe
133 changed files with 5703 additions and 8531 deletions

3
.gitattributes vendored
View File

@ -42,6 +42,9 @@
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
# PHPStan's baseline uses tabs instead of spaces.
core/.phpstan-baseline.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tabwidth=2 diff=php linguist-language=php
# Define binary file attributes.
# - Do not treat them as text.
# - Include binary diff in patches instead of "binary files differ."

1102
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
interval: 21600

View File

@ -0,0 +1,30 @@
uuid: 691eb53b-bb3f-4a0c-9b6d-086aebab566a
langcode: en
status: true
dependencies:
module:
- search
- system
theme:
- claro
enforced:
config:
- search.page.help_search
id: claro_help_search
theme: claro
region: help
weight: -4
provider: null
plugin: search_form_block
settings:
id: search_form_block
label: 'Search help'
label_display: visible
provider: search
page_id: help_search
visibility:
request_path:
id: request_path
negate: false
context_mapping: { }
pages: /admin/help

View File

@ -1,6 +1,6 @@
uuid: c048753b-259e-4210-8e53-031ae5cbae0f
langcode: en
status: true
status: false
dependencies: { }
id: spremembe_sprejete
workflow: concept_workflow

View File

@ -6,6 +6,7 @@ dependencies:
- field.field.node.concept.body
- field.field.node.concept.field_media
- field.field.node.concept.field_related_concept
- field.field.node.concept.field_strojni_prevod
- node.type.concept
- workflows.workflow.concept_workflow
module:
@ -51,6 +52,13 @@ content:
size: 60
placeholder: ''
third_party_settings: { }
field_strojni_prevod:
type: boolean_checkbox
weight: 26
region: content
settings:
display_label: true
third_party_settings: { }
langcode:
type: language_select
weight: 3

View File

@ -6,6 +6,7 @@ dependencies:
- field.field.node.concept.body
- field.field.node.concept.field_media
- field.field.node.concept.field_related_concept
- field.field.node.concept.field_strojni_prevod
- node.type.concept
module:
- text
@ -44,6 +45,16 @@ content:
third_party_settings: { }
weight: 103
region: content
field_strojni_prevod:
type: boolean
label: above
settings:
format: default
format_custom_false: ''
format_custom_true: ''
third_party_settings: { }
weight: 104
region: content
links:
settings: { }
third_party_settings: { }

View File

@ -7,6 +7,7 @@ dependencies:
- field.field.node.concept.body
- field.field.node.concept.field_media
- field.field.node.concept.field_related_concept
- field.field.node.concept.field_strojni_prevod
- node.type.concept
module:
- text
@ -37,4 +38,5 @@ content:
hidden:
field_media: true
field_related_concept: true
field_strojni_prevod: true
langcode: true

View File

@ -15,4 +15,5 @@ general_settings:
unified_fields:
enabled: true
weight: 2
visual_default_view_mode: full
visual_inline_theme: default

View File

@ -11,9 +11,9 @@ dependencies:
third_party_settings:
content_translation:
translation_sync:
alt: alt
title: title
file: '0'
file: file
alt: '0'
title: '0'
_core:
default_config_hash: PmVL51L3A9QGbPLoeLHw5epAPszeZRasCeC3imeeDRQ
id: node.article.field_image

View File

@ -15,7 +15,7 @@ bundle: concept
label: Media
description: ''
required: false
translatable: true
translatable: false
default_value: { }
default_value_callback: ''
settings:

View File

@ -0,0 +1,23 @@
uuid: 959946bc-d4cb-47dc-8b5b-ab2bcf6f7bfc
langcode: sl
status: true
dependencies:
config:
- field.storage.node.field_strojni_prevod
- node.type.concept
id: node.concept.field_strojni_prevod
field_name: field_strojni_prevod
entity_type: node
bundle: concept
label: 'Strojni prevod?'
description: ''
required: false
translatable: true
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: Da
off_label: Ne
field_type: boolean

View File

@ -0,0 +1,18 @@
uuid: 24af25a5-ec60-4d6f-b3c5-7e22dc08c082
langcode: sl
status: true
dependencies:
module:
- node
id: node.field_strojni_prevod
field_name: field_strojni_prevod
entity_type: node
type: boolean
settings: { }
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@ -0,0 +1,11 @@
uuid: 85dff136-e8f0-4adb-97fc-deb1e45dca2b
langcode: en
status: true
dependencies:
module:
- content_moderation
id: content_moderation_state.content_moderation_state
target_entity_type_id: content_moderation_state
target_bundle: content_moderation_state
default_langcode: site_default
language_alterable: false

View File

@ -10,7 +10,7 @@ third_party_settings:
content_translation:
enabled: true
bundle_settings:
untranslatable_fields_hide: '0'
untranslatable_fields_hide: '1'
id: node.concept
target_entity_type_id: node
target_bundle: concept

View File

@ -0,0 +1,9 @@
uuid: 4179da2f-6dc6-4689-bbab-13b1655171fe
langcode: en
status: true
dependencies: { }
id: de
label: German
direction: ltr
weight: 4
locked: false

View File

@ -0,0 +1,9 @@
uuid: 46587206-0c5c-4431-9e3f-012fc2ca3e73
langcode: en
status: true
dependencies: { }
id: es
label: Spanish
direction: ltr
weight: 5
locked: false

View File

@ -1,9 +1,9 @@
uuid: b3b0ec66-bf9e-4114-8e61-b74b40fe2860
uuid: 32738130-df06-46f9-88b0-0beda10c2fd8
langcode: en
status: true
dependencies: { }
id: hr
label: Croatian
direction: ltr
weight: 2
weight: 6
locked: false

View File

@ -7,5 +7,5 @@ _core:
id: und
label: 'Not specified'
direction: ltr
weight: 4
weight: 7
locked: true

View File

@ -7,5 +7,5 @@ _core:
id: zxx
label: 'Not applicable'
direction: ltr
weight: 5
weight: 8
locked: true

View File

@ -5,14 +5,17 @@ session:
url:
source: path_prefix
prefixes:
en: ''
en: en
sl: sl
hr: hr
sr: sr
'': null
de: de
es: es
hr: hr
domains:
en: ''
sl: ''
hr: ''
sr: ''
de: ''
es: ''
hr: ''
selected_langcode: site_default

View File

@ -1,2 +0,0 @@
settings:
label: 'Glavni sadržaj stranice'

View File

@ -1,2 +0,0 @@
settings:
label: 'Poruke statusa'

View File

@ -1,2 +0,0 @@
settings:
label: 'Naziv stranice'

View File

@ -1,2 +0,0 @@
settings:
label: 'Primarne oznake'

View File

@ -1,2 +0,0 @@
settings:
label: 'Sekundarne oznake'

View File

@ -1,2 +0,0 @@
settings:
label: 'Glavni sadržaj stranice'

View File

@ -1,2 +0,0 @@
settings:
label: 'Poruke statusa'

View File

@ -1,2 +0,0 @@
settings:
label: 'Naziv stranice'

View File

@ -1,2 +0,0 @@
settings:
label: 'Primarne oznake'

View File

@ -1,2 +0,0 @@
settings:
label: 'Sekundarne oznake'

View File

@ -1,2 +0,0 @@
settings:
label: 'Glavni sadržaj stranice'

View File

@ -1,2 +0,0 @@
settings:
label: 'Poruke statusa'

View File

@ -1,2 +0,0 @@
settings:
label: 'Naziv stranice'

View File

@ -1,2 +0,0 @@
settings:
label: 'Pokreće Drupal'

View File

@ -1,2 +0,0 @@
settings:
label: 'Primarne oznake'

View File

@ -1,2 +0,0 @@
settings:
label: 'Sekundarne oznake'

View File

@ -1,2 +0,0 @@
settings:
label: 'RSS feed'

View File

@ -1,2 +0,0 @@
settings:
label: Administracija

View File

@ -1,2 +0,0 @@
settings:
label: 'Poruke statusa'

View File

@ -1,2 +0,0 @@
settings:
label: 'Naziv stranice'

View File

@ -1,2 +0,0 @@
settings:
label: Alati

View File

@ -1 +0,0 @@
label: 'Registriraj se'

View File

@ -1 +0,0 @@
label: 'Cijeli komentar'

View File

@ -1 +0,0 @@
label: 'Puni sadržaj'

View File

@ -1 +0,0 @@
label: 'Puni sadržaj'

View File

@ -1 +0,0 @@
label: RSS

View File

@ -1 +0,0 @@
label: 'Indeks pretraživanja'

View File

@ -1 +0,0 @@
label: 'Reultati pretrage s istaknutim unosom'

View File

@ -1 +0,0 @@
label: Mamac

View File

@ -1 +0,0 @@
label: 'Stranica taksonomijskog pojma'

View File

@ -1 +0,0 @@
label: 'Korisnički račun'

View File

@ -1 +0,0 @@
name: 'Obični tekst'

View File

@ -1 +0,0 @@
label: Engleski

View File

@ -1 +0,0 @@
label: Sadržaj

View File

@ -1 +0,0 @@
label: 'Izbriši komentar'

View File

@ -1 +0,0 @@
label: 'Objavi komentar'

View File

@ -1 +0,0 @@
label: 'Spremi komentar'

View File

@ -1 +0,0 @@
label: 'Prekini objavu komentara'

View File

@ -1 +0,0 @@
label: 'Učini sadržaj ljepljivim'

View File

@ -1 +0,0 @@
label: 'Ukloni ljepljivost sa sadržaja'

View File

@ -1 +0,0 @@
label: 'Promoviraj sadržaj na naslovnicu'

View File

@ -1 +0,0 @@
label: 'Objavi sadržaj'

View File

@ -1 +0,0 @@
label: 'Spremi sadržaj'

View File

@ -1 +0,0 @@
label: 'Degradiraj sadržaj s naslovnice'

View File

@ -1 +0,0 @@
label: 'Prekini objavu sadržaja'

View File

@ -1 +0,0 @@
message: '@site je trenutno van mreže. Uskoro bi trebao biti umrežen. Hvala na strpljenju.'

View File

@ -1 +0,0 @@
label: Administracija

View File

@ -1 +0,0 @@
label: Podnožje

View File

@ -1 +0,0 @@
label: Alati

View File

@ -1,2 +0,0 @@
register_admin_created:
subject: 'Administrator vam je otvorio račun pri [site:name]'

View File

@ -1 +0,0 @@
label: 'Anonimni korisnik'

View File

@ -1 +0,0 @@
anonymous: Anoniman

View File

@ -1,33 +0,0 @@
label: 'Custom block library'
description: 'Find and manage custom blocks.'
display:
default:
display_title: Zadano
display_options:
title: 'Custom block library'
fields:
info:
label: 'Opis bloka'
changed:
label: Osvježeno
operations:
label: Operacije
exposed_form:
options:
submit_button: Primjeni
reset_button_label: Poništi
exposed_sorts_label: 'Rasporedi po'
sort_asc_label: Uzlazno
sort_desc_label: Silazno
empty:
area_text_custom:
content: 'There are no custom blocks available.'
filters:
info:
expose:
label: 'Opis bloka'
page_1:
display_title: Stranica
display_options:
menu:
title: 'Custom block library'

View File

@ -1,74 +0,0 @@
label: Komentari
display:
default:
display_title: Zadano
display_options:
title: Komentari
fields:
comment_bulk_form:
action_title: Akcija
subject:
label: Naziv
name:
label: Autor
entity_id:
label: 'Objavljeno u'
changed:
label: Osvježeno
operations:
label: Operacije
pager:
options:
tags:
next: 'sljedeća '
previous: ' prethodna'
first: '« prva'
last: 'posljednja »'
exposed_form:
options:
submit_button: Pročisti
reset_button_label: Poništi
exposed_sorts_label: 'Rasporedi po'
sort_asc_label: Uzlazno
sort_desc_label: Silazno
empty:
area_text_custom:
content: 'Nema dostupnih komentara.'
filters:
subject:
expose:
label: Naziv
langcode:
expose:
label: Jezik
use_more_text: više
page_published:
display_title: 'Objavljeni komentari'
display_options:
menu:
title: Komentari
page_unapproved:
display_title: 'Neodobreni komentari'
display_options:
fields:
comment_bulk_form:
action_title: Akcija
subject:
label: Naziv
name:
label: Autor
entity_id:
label: 'Objavljeno u'
changed:
label: Osvježeno
operations:
label: Operacije
filters:
subject:
expose:
label: Naziv
langcode:
expose:
label: Jezik
menu:
title: 'Neodobreni komentari'

View File

@ -1,13 +0,0 @@
label: 'Posljednji komentari'
display:
default:
display_title: Zadano
display_options:
title: 'Posljednji komentari'
empty:
area_text_custom:
content: 'Nema dostupnih komentara.'
block_1:
display_title: Blok
display_options:
block_description: 'Posljednji komentari'

View File

@ -1,55 +0,0 @@
label: Sadržaj
display:
default:
display_title: Zadano
display_options:
title: Sadržaj
fields:
title:
label: Naziv
type:
label: 'Vrsta sadržaja'
name:
label: Autor
status:
label: Status
settings:
format_custom_true: Objavljeno
changed:
label: Osvježeno
operations:
label: Operacije
exposed_form:
options:
submit_button: Pročisti
reset_button_label: Poništi
exposed_sorts_label: 'Rasporedi po'
sort_asc_label: Uzlazno
sort_desc_label: Silazno
empty:
area_text_custom:
content: 'Na voljo ni nobene vsebine.'
filters:
title:
expose:
label: Naziv
type:
expose:
label: 'Vrsta sadržaja'
status:
expose:
label: Status
group_info:
group_items:
1:
title: Objavljeno
langcode:
expose:
label: Jezik
page_1:
display_title: Stranica
display_options:
menu:
title: Sadržaj
tab_options:
title: Sadržaj

View File

@ -1,47 +0,0 @@
label: Mediji
display:
default:
display_title: Zadano
display_options:
title: Mediji
fields:
media_bulk_form:
action_title: Akcija
bundle:
label: Vrsta
uid:
label: Autor
status:
label: Status
settings:
format_custom_true: Objavljeno
changed:
label: Osvježeno
operations:
label: Operacije
exposed_form:
options:
submit_button: Pročisti
reset_button_label: Poništi
exposed_sorts_label: 'Rasporedi po'
sort_asc_label: Uzlazno
sort_desc_label: Silazno
filters:
bundle:
expose:
label: Vrsta
status:
expose:
label: Istina
group_info:
group_items:
1:
title: Objavljeno
langcode:
expose:
label: Jezik
media_page_list:
display_title: Mediji
display_options:
menu:
title: Mediji

View File

@ -1,75 +0,0 @@
display:
default:
display_title: Zadano
display_options:
title: Mediji
fields:
media_bulk_form:
action_title: Akcija
exposed_form:
options:
reset_button_label: Poništi
exposed_sorts_label: 'Rasporedi po'
sort_asc_label: Uzlazno
sort_desc_label: Silazno
filters:
status:
group_info:
label: Objavljeno
group_items:
1:
title: Objavljeno
name:
expose:
label: Naziv
langcode:
expose:
label: Jezik
page:
display_title: Stranica
display_options:
fields:
media_bulk_form:
action_title: Akcija
edit_media:
text: Uredi
delete_media:
text: Ukloni
widget:
display_title: Widget
display_options:
arguments:
bundle:
exception:
title: Svi
filters:
name:
expose:
label: Naziv
header:
display_link_grid:
label: Mreža
display_link_table:
label: Tablica
widget_table:
display_options:
fields:
name:
label: Naziv
uid:
label: Autor
changed:
label: Osvježeno
arguments:
bundle:
exception:
title: Svi
filters:
name:
expose:
label: Naziv
header:
display_link_grid:
label: Mreža
display_link_table:
label: Tablica

View File

@ -1,36 +0,0 @@
label: 'Moderirani sadržaj'
display:
default:
display_title: Zadano
display_options:
title: 'Moderirani sadržaj'
fields:
title:
label: Naziv
type:
label: 'Vrsta sadržaja'
name:
label: Autor
changed:
label: Osvježeno
operations:
label: Operacije
exposed_form:
options:
submit_button: Pročisti
reset_button_label: Poništi
exposed_sorts_label: 'Rasporedi po'
sort_asc_label: Uzlazno
sort_desc_label: Silazno
filters:
title:
expose:
label: Naziv
type:
expose:
label: 'Vrsta sadržaja'
langcode:
expose:
label: Jezik
moderated_content:
display_title: 'Moderirani sadržaj'

View File

@ -1,18 +0,0 @@
label: 'Pojam taksonomije'
display:
default:
display_title: Zadano
display_options:
exposed_form:
options:
submit_button: Primjeni
reset_button_label: Poništi
exposed_sorts_label: 'Rasporedi po'
sort_asc_label: Uzlazno
sort_desc_label: Silazno
arguments:
tid:
exception:
title: Svi
page_1:
display_title: Stranica

View File

@ -0,0 +1 @@
label: German

View File

@ -0,0 +1 @@
label: Španščina

View File

@ -1 +1 @@
label: Sadržaj
label: Poizvedba

View File

@ -26,7 +26,7 @@ display:
last: 'posljednja »'
exposed_form:
options:
submit_button: Počisti
submit_button: Filtriraj
reset_button_label: Ponastavi
exposed_sorts_label: 'Rasporedi po'
sort_asc_label: Naraščajoče

View File

@ -12,7 +12,6 @@ display:
uid:
label: Avtor
status:
label: Status
settings:
format_custom_true: Objavljeno
changed:
@ -21,7 +20,7 @@ display:
label: Operacije
exposed_form:
options:
submit_button: Počisti
submit_button: Filtriraj
reset_button_label: Ponastavi
exposed_sorts_label: 'Rasporedi po'
sort_asc_label: Naraščajoče

View File

@ -15,7 +15,7 @@ display:
label: Operacije
exposed_form:
options:
submit_button: Počisti
submit_button: Filtriraj
reset_button_label: Ponastavi
exposed_sorts_label: 'Rasporedi po'
sort_asc_label: Naraščajoče

View File

@ -0,0 +1 @@
label: German

View File

@ -0,0 +1 @@
label: Španščina

View File

@ -9,9 +9,9 @@ third_party_settings:
available_menus:
- main
parent: 'main:'
name: Concept
name: Koncept
type: concept
description: 'Basic element of manifest'
description: 'Osnovni element manifesta'
help: ''
new_revision: true
preview_mode: 1

View File

@ -0,0 +1,12 @@
uuid: fdd9470a-e90a-4b10-a203-16e6b95a0cfe
langcode: en
status: true
dependencies:
module:
- help
id: help_search
label: Help
path: help
weight: 0
plugin: help_search
configuration: { }

View File

@ -11,4 +11,4 @@ page:
front: /zadnje-spremembe
admin_compact_mode: false
weight_select_max: 100
default_langcode: en
default_langcode: sl

View File

@ -2,15 +2,17 @@ uuid: f14b889b-d1ee-4cd6-93d7-336ec58070f3
langcode: sl
status: true
dependencies:
config:
- field.storage.node.field_strojni_prevod
module:
- node
- user
_core:
default_config_hash: 12Bd0mJQFIaXAkRfMVCAAcZ0oaxm94PoK8oHR9hkLmY
id: content
label: Vsebine
label: Sadržaj
module: node
description: 'Find and manage content.'
description: 'Upravljaj vsebino.'
tag: default
base_table: node_field_data
base_field: nid
@ -114,7 +116,7 @@ display:
entity_type: node
entity_field: type
plugin_id: field
label: 'Tip vsebine'
label: 'Content type'
exclude: false
alter:
alter_text: false
@ -235,6 +237,71 @@ display:
multi_type: separator
separator: ', '
field_api_classes: false
field_strojni_prevod:
id: field_strojni_prevod
table: node__field_strojni_prevod
field: field_strojni_prevod
relationship: none
group_type: group
admin_label: ''
plugin_id: field
label: Strojni
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: boolean
settings:
format: default
format_custom_false: ''
format_custom_true: ''
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
name:
id: name
table: users_field_data
@ -369,7 +436,7 @@ display:
exposed_form:
type: basic
options:
submit_button: Počisti
submit_button: Filtriraj
reset_button: true
reset_button_label: Ponastavi
exposed_sorts_label: 'Rasporedi po'
@ -451,7 +518,7 @@ display:
exposed: true
expose:
operator_id: type_op
label: 'Tip vsebine'
label: 'Content type'
description: ''
use_operator: false
operator: type_op
@ -702,7 +769,8 @@ display:
- user
- 'user.node_grants:view'
- user.permissions
tags: { }
tags:
- 'config:field.storage.node.field_strojni_prevod'
page_1:
id: page_1
display_title: Stranica
@ -734,4 +802,5 @@ display:
- user
- 'user.node_grants:view'
- user.permissions
tags: { }
tags:
- 'config:field.storage.node.field_strojni_prevod'

View File

@ -1,3 +1,25 @@
<script setup="setup">
const { $i18n } = useNuxtApp()
const nastavitveStore = useNastavitveStore()
const pojmiStore = usePojmiStore()
const straniStore = useStraniStore()
const { izbraniJezik } = storeToRefs(nastavitveStore)
// Nastavi locale ko se jezik spremeni
watch(izbraniJezik, jezik => {
$i18n.setLocale(jezik)
pojmiStore.naloziPojme(jezik)
straniStore.naloziStrani(jezik)
})
// V store nastavi prvotno stanje
nastavitveStore.izberiJezik($i18n.locale.value)
</script>
<template>
<section class="yufu">
<Glava />
@ -48,6 +70,7 @@
}
a.gumb {
text-transform: uppercase;
text-decoration: underline;
font-size: 3rem;
position: relative;

View File

@ -3,7 +3,8 @@
const route = useRoute()
const pot = computed(() => route.path)
const naManifestu = computed(() => route.path.indexOf('/manifest') === 0)
const naManifestu = computed(() => route.name.indexOf('manifest') === 0
|| route.name.indexOf('pojem') === 0)
const { baseUrl } = useRuntimeConfig().public
@ -13,15 +14,20 @@ const { baseUrl } = useRuntimeConfig().public
<section class="glava" :class="{ manifest: naManifestu }">
<ul class="meni">
<li>
<NuxtLink to="/">
Domov
<NuxtLink :to="localePath('index')">
{{ $t('domov') }}
</NuxtLink>
</li>
<li>
<NuxtLink to="/manifest">
Manifest
<NuxtLink :to="localePath('manifest')">
{{ $t('manifest') }}
</NuxtLink>
</li>
<li>
<a @click.prevent>
<IzborJezika />
</a>
</li>
<li>
<NuxtLink :to="baseUrl + '/user'" class="posivljen" target="_blank">
admin
@ -31,8 +37,8 @@ const { baseUrl } = useRuntimeConfig().public
<img src="/images/zvezda.png">
<h1 v-if="naManifestu">MANIFEST</h1>
<h1 v-else>JUGOFUTURIZEM</h1>
<h1 v-if="naManifestu">{{ $t('manifest') }}</h1>
<h1 v-else>{{ $t('jugofuturizem') }}</h1>
</section>
</template>
@ -53,6 +59,7 @@ h1 {
font-family: Trailers;
font-size: 16rem;
z-index: 50;
text-transform: uppercase;
}
@media screen and (max-width: 1090px) {
@ -84,10 +91,8 @@ img {
}
}
.meni {
position: absolute;
position: fixed;
top: 0;
left: 0;
width: 100%;

View File

@ -0,0 +1,57 @@
<script setup="setup">
const store = useNastavitveStore()
const izbraniJezik = computed(() => store.izbraniJezik)
const kodeJezikov = computed(() => Object.keys(store.mozniJeziki))
const kodeDrugihJezikov = computed(() => kodeJezikov.value.filter(
(jezik) => jezik !== store.izbraniJezik
))
const slikaJezika = (jezik) => `/images/jezik_${jezik}.png`
// console.log('izbrani jezik!', izbraniJezik.value)
const izbor = ref(false)
</script>
<template>
<div class="izbor">
<div class="jezik" @click="izbor = !izbor">
<img :src="slikaJezika(izbraniJezik)" /> {{ store.mozniJeziki[izbraniJezik] }}
</div>
<div class="drugiJeziki" v-if="izbor">
<div class="jezik" :class="`jezik-${jezik}`" v-for="jezik in kodeDrugihJezikov" @click="() => { store.izberiJezik(jezik); izbor = false }">
<img :src="slikaJezika(jezik)" /> {{ store.mozniJeziki[jezik] }}
</div>
</div>
</div>
</template>
<style>
.izbor {
width: 10rem;
cursor: pointer;
}
.jezik {
display: flex;
align-items: center;
}
.jezik-de img,
.jezik-hr img {
transform: scaleX(-1);
}
.drugiJeziki > div {
margin-top: 5px;
}
img {
margin-right: 5px;
}
</style>

View File

@ -6,16 +6,23 @@ const { etherFetch } = useEtherpadApi()
const { poskrolaj } = useUi()
const store = usePojmiStore()
const nastavitveStore = useNastavitveStore()
const route = useRoute()
const { izbraniJezik } = storeToRefs(nastavitveStore)
const props = defineProps({
naslov: String
})
if (props.naslov && !(props.naslov in store.pojmi)) {
await store.naloziPojme()
await store.naloziPojme(izbraniJezik.value)
}
watch(izbraniJezik, jezik => {
store.naloziPojme(jezik)
})
const pojem = computed(() => store.pojmi[props.naslov])
const revisionId = computed(() => pojem.value ? pojem.value.id : null)
@ -35,8 +42,8 @@ const urediPojem = async () => {
onMounted(() => {
// Prazen pojem? Nazaj na manifest
if (!pojem.value.id) {
navigateTo('/manifest#skrol')
if ((!pojem.value || !pojem.value.id) && store.pojmi) {
navigateTo(localePath('manifest') + '#skrol')
}
// Link na editiranje pojma? Poskrolaj nanj + odpri editiranje
@ -58,9 +65,12 @@ onUpdated(() => {
<template>
<section ref="container">
<div v-if="!urejanje" class="gumb" @click="urediPojem">Uredi</div>
<div v-if="!urejanje" class="gumb" @click="urediPojem">{{ $t('Uredi')}}</div>
<div v-if="pojem" class="pojem">
<h2>{{ naslov }}</h2>
<h2>
{{ naslov }}
<StrojniPrevod v-if="pojem.strojni_prevod" />
</h2>
<div class="tekst" v-html="pojem.tekst" />
</div>
<div class="obrazec" ref="obrazec">

View File

@ -35,7 +35,7 @@ const oddajPredlog = async data => {
stvarjenje.then(() => {
console.log('NOV NASLOV?', starNaslov, props.pojem.naslov)
if (starNaslov !== props.pojem.naslov) {
navigateTo('/manifest/' + encodeURIComponent(props.pojem.naslov))
navigateTo(localePath({ name: 'pojem_poglej', params: { naslov: props.pojem.naslov }}))
}
})
@ -45,13 +45,14 @@ const oddajPredlog = async data => {
// @TODO tole raje v pojmi.vue oz nov_pojem.vue - page!
const etherNalozen = ev => {
if (props.pojem.nov) {
navigateTo('/manifest/dodaj/' + props.revisionId, {
navigateTo(localePath({ name: 'pojem_dodaj', params: { guid: revisionId }}), {
replace: true
})
} else {
navigateTo('/manifest/' + encodeURIComponent(props.pojem.naslov) + '/uredi/' + props.revisionId, {
replace: true
})
navigateTo(localePath({ name: 'pojem_uredi', params: {
naslov: props.pojem.naslov,
guid: props.revisionId
}}), { replace: true })
}
//window.location.hash = props.revisionId
}
@ -60,17 +61,17 @@ const etherNalozen = ev => {
<template>
<form class="pojem" @submit.prevent>
<input name="naslov" type="text" placeholder="Naslov" v-model="naslov">
<input name="naslov" type="text" placeholder="Naslov" v-model="naslov" @keydown.enter.prevent>
<EtherpadTextarea :onLoad="etherNalozen" :revisionId="props.revisionId" />
<input name="email" type="email" placeholder="E-poštni naslov" v-model="email">
<input name="email" type="email" placeholder="E-poštni naslov" v-model="email" @keydown.enter="oddajPredlog">
<div class="gumbi">
<button class="gumb" @click="props.onZapri">
{{ props.zapriLabel ?? 'Zapri' }}
{{ props.zapriLabel ?? $t('Zapri') }}
</button>
<button class="gumb oddaj" @click="oddajPredlog">
Predlagaj
{{ $t("Predlagaj") }}
</button>
</div>

View File

@ -0,0 +1,15 @@
<template>
<span alt="Ikona za strojni prevod" :title="$t('strojni prevod')" />
</template>
<style scoped>
span {
background-image: url('/images/Strojni prevod.png');
height: 24px;
width: 24px;
display: inline-block;
position: relative;
top: 2px;
left: 2px;
}
</style>

View File

@ -1,9 +1,18 @@
import jsonapi from 'jsonapi-serializer'
function idmap(arr, idattr = 'id') {
if (!arr) { return {} }
return arr.reduce((vse, i) => {
const id = i[idattr]
vse[id] = i
return vse
}, {})
}
export const useApi = () => {
const { baseUrl, jsonapiPath } = useRuntimeConfig().public
const apiBaseUrl = `${baseUrl}${jsonapiPath}`
const headers = {
'Content-Type': 'application/vnd.api+json'
}
@ -16,20 +25,18 @@ export const useApi = () => {
return idmap(ds.map(mapfun), idAttr)
}
const jsonApiUrl = jezik => {
if (!jezik) {
jezik = 'sl'
}
return `${baseUrl}/${jezik}${jsonapiPath}`
}
return {
baseUrl: baseUrl,
jsonApiUrl: apiBaseUrl,
jsonApiUrl,
headers,
deserialize
}
}
export const idmap = (arr, idattr = 'id') => {
if (!arr) { return {} }
return arr.reduce((vse, i) => {
const id = i[idattr]
vse[id] = i
return vse
}, {})
}

Some files were not shown because too many files have changed in this diff Show More