diff --git a/README.md b/README.md index 7766e4a..98489ce 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,169 @@ # Mabasej_Team We are working on system, that will help tourists in cities to get information about city more easily. -# Hardware +## Hardware - Raspberry PI (for now tested only on rpi4. Works on rpi zero too, but it will be slow if more devices are connected) - External/Internal WiFi antena -# Software +## Software - python 3.9.2 compatible server with basic web interface - Kotlin based mobile app -# Server -To run server you need to install -- hypercorn - "pip install hypercorn" -- fastapi - "pip install fastapi" -- requests - "pip install requests" -- aiofiles - "pip install aiofiles" +## Install +Wikispot is in testing stages, but it is possible to install it using our .img file (link coming soon) based on DietPi or custom script. -then run by command - "hypercorn main:app --bind " -To connect to another rpi you need to edit settings.json with different ID and fill heartbeat table. +| Device | Server compatible | Instalation | +| :-------------------- | :------------------------------------------------------------------------------------------ | :-----------: | +| Ubuntu (I7, 16GB ram) | :heavy_check_mark: WORKING (Only server) | Manual/script | +| RPI 4b (2GB) | :heavy_check_mark: WORKING | .img/script | +| RPI 400 (4GB) | :grey_question: Untested. Should work. | .img/script | +| RPI 3b+ | :grey_question: Untested. Should work. | .img/script | +| RPI zero w | :white_check_mark: Working with fewer devices (Only server. No AP, Computer vision) | .img/script | +| RPI 2 | :question: Untested. | :x: | +| RPI | :question: Untested. | :x: | -This is not finished product + +### Fresh istall (.img) Only RPI +login credentials +> login: dietpi + +> password: WikiSpot2021 + + +requirements: +1. WikiSpot image file (download: *soon*) +2. MicroSd card (recommended: >=16GB, :exclamation: ALL DATA STORED ON SD CARD WILL BE FORMATED :exclamation:) +3. BalenaEtcher (or another sd card flasher) *link:* https://www.balena.io/etcher/ +4. SD card reader + + +Install: +1. Download all required files (wikispot.img and balenaetcher) and install BalenaEtcher +2. Insert SD card into computer/reader, open BalenaEtcher -> chose Flash from file -> chose downloaded wikispot.img -> Select your sd in *Select target* -> Flash! +3. :exclamation: WINDOWS will show unformated drive. Cancel it. It is because of uncompatible format for windows :exclamation: +4. After flashing open partition *boot* (should apear as USB), find file *dietpi.txt* and open it in text editor. + - Accept license by changing `AUTO_SETUP_ACCEPT_LICENSE=0` to `AUTO_SETUP_ACCEPT_LICENSE=1` + - Change name of WikiSpot `AUTO_SETUP_NET_HOSTNAME=WikiSpot-CHANGE_ME` by changing only *CHANGE_ME* or leave *CHANGE_ME* for random number name *WikiSpot-54346 + - You can set static ip address by changing `AUTO_SETUP_NET_USESTATIC=0` to `AUTO_SETUP_NET_USESTATIC=1` And entering your setting into required lines. + - If you want to use computer vision plugin with rpi camera set `ENABLE_COMPUTER_VISION_PLUGIN=0` to `ENABLE_COMPUTER_VISION_PLUGIN=1` (*recommended only on RPI4) + - If you want to use RPI as access point to WikiSpot change `#AUTO_SETUP_INSTALL_SOFTWARE_ID=60` to `AUTO_SETUP_INSTALL_SOFTWARE_ID=60` + - *wifi setup in testing* +5. :grey_exclamation:For advanced users:grey_exclamation: You can now change contens of WikiSpot server in `/boot/WikiSpot`according to an example in server filesystem +6. Eject sd card from computer, insert it in Raspberry Pi and power it on. :bangbang:Raspberry Pi needs to be connected to intenet via Ethernet (*wifi coming soon*) othervise the setup will crash. +7. The setup will take approximately 25-40 min (RPI 4b (2gb) and 70 mb download speed) +8. Done you can start using WikiSpot and edit contents of WikiSpot with our app (*coming soon*) + + +### Script install +*coming soon* + + +### Manual install +*coming soon* + + +## Server filesystem + +``` +└── test_directory + ├── cache # files forwarded from another servers to client + ├── engine.py # engine for server (log, recovery, update) + ├── files # content of WikiSpot server + │   └── test.jpg + ├── filesystem.json # data settings of server (name, description, files) + ├── main.py # main server file + ├── plugins # plugins file + │   └── computer_vision # oficial WikiSpot computer vision plugin for RPI 4 + │   ├── MobileNetSSD_deploy.caffemodel + │   ├── MobileNetSSD_deploy.prototxt + │   └── com_vision.py + ├── run.py # start script for server + ├── settings.json # settings (log, debug, connected WikiSpots, cache size,...) + ├── system.py # update and clean script + └── version.json # version of WikiSpot +``` + + +### filesystem + +``` +{ + "ID": 0, # ID of WikiSpots, Needs to be different, because network will crash + "location": "25.997417761947318, -97.15738221291177", # Location of WikiSpot server copied from google maps + "description": { + "title": "WikiSpot demo", # Name of WikiSpot server (swiming pool, school, ...) + "description_s": "This is showcase of WikiSpot", # Short description showed on web/app in list of servers + "description_l": "This will show after opening server in app", # Long description showed after opening the server in web/app + "photo_s": "test.jpg", # Small image showed on web/app in list of servers + "photo_b": "test.png" # Big image showed after opening the server in web/app + }, + "files": [ # files on server in /files that will be mediated to the web/app + { + "name": "test", # Name of the file, without spaces. App will change "_" to spaces + "format": ".jpg", # Format of the file + "description": "This is test file" # Description showed next to the file + } + ] +} +``` + +To manualy add new file to server (on setup or via ssh) add file to `server_directory/files` +and add record for file into `files` list in `filesystem.json`. :exclamation:do not forget "," after last record:exclamation: + +``` + + { + "name": "new_file_name", + "format": ".txt", + "description": "This is how you add new file" + } +``` + + +### settings.json + +``` +{ + "time_to_heartbeat": 20, # Time to ping of another online servers in seconds + "time_to_heartbeat_offline": 25, # Time to ping of another offline servers in seconds + "save_table": true, # Save connected servers to reconnect after restart + "time_to_save": 60, # Time to save server in seconds + "max_mess": 20, # Maximum messages stored in RAM + "cache_size_mb": 1000, # Maximum size of cache directory in mb + "clear_cache_on_startup": false, # Remove contents of cache on startup (slower first downloads) + "log": { # Log settings + "save_error": true, # Save errors into log.txt + "print_error": true, # Print errors into console (if running as service into linux log) + "save_warning": true, # Save warnings into log.txt + "print_warning": true, # Print warnings into console (if running as service into linux log) + "save_message": false, # Save messages (new server, etc. not messages from clients) into log.txt + "print_message": true, # Print messages into console (if running as service into linux log) + "enable_debug": false # Enable debug into console (if running as service into linux log) + }, + "heartbeat_table": { # Saved servers + "ID": [], + "IP": [], + "location": [], + "file_system": [], + "last_heartbeat": [] + } +} +``` + +If you want to manually add server on first setup or via ssh fill heartbeat table like this. + +``` +"heartbeat_table": { # Saved servers + "ID": [1], # ID of server as integer (number) + "IP": ["192.168.1.2"], # IP of server as string + "location": [""], # Empty string as placeholder. location will be downloaded after first connection + "file_system": [""], # Empty string as placeholder. filesystem will be downloaded after first connection + "last_heartbeat": [10] # After how many seconds will server try to connect for the first time + } +``` + +:bangbang:If the server will be offline for long time (heartbeat + offline heartbeat) it will be removed from heartbeat table. If the save function is disabled server will trying to connect after restart:bangbang: + + + +*This is not finished product* diff --git a/app/WikiSpot/.idea/codeStyles/Project.xml b/app/WikiSpot/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..7643783 --- /dev/null +++ b/app/WikiSpot/.idea/codeStyles/Project.xml @@ -0,0 +1,123 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/WikiSpot/.idea/codeStyles/codeStyleConfig.xml b/app/WikiSpot/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/app/WikiSpot/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/app/WikiSpot/.idea/compiler.xml b/app/WikiSpot/.idea/compiler.xml index 61a9130..fb7f4a8 100644 --- a/app/WikiSpot/.idea/compiler.xml +++ b/app/WikiSpot/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/app/WikiSpot/.idea/misc.xml b/app/WikiSpot/.idea/misc.xml index d5d35ec..860da66 100644 --- a/app/WikiSpot/.idea/misc.xml +++ b/app/WikiSpot/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/app/WikiSpot/.idea/runConfigurations.xml b/app/WikiSpot/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/app/WikiSpot/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/ic_launcher-playstore.png b/app/WikiSpot/app/src/main/ic_launcher-playstore.png index d39dc90..5ffb030 100644 Binary files a/app/WikiSpot/app/src/main/ic_launcher-playstore.png and b/app/WikiSpot/app/src/main/ic_launcher-playstore.png differ diff --git a/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/FileViewsAdapter.kt b/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/FileViewsAdapter.kt index 4155e77..db8b88d 100644 --- a/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/FileViewsAdapter.kt +++ b/app/WikiSpot/app/src/main/java/com/example/wikispot/adapters/FileViewsAdapter.kt @@ -9,6 +9,8 @@ import android.view.View import android.view.ViewGroup import android.view.animation.Animation import android.view.animation.AnimationUtils +import android.widget.RelativeLayout +import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.content.ContextCompat.startActivity import androidx.core.view.setPadding import androidx.recyclerview.widget.RecyclerView @@ -32,6 +34,7 @@ class FileViewsAdapter(private val context: Context, private val fileViews: Arra var textInfo: String? = null var imgInfo: String? = null var pdfUrl: String? = null + var generalUrl: String? = null var opened = false init { @@ -39,7 +42,9 @@ class FileViewsAdapter(private val context: Context, private val fileViews: Arra if (!opened) { itemView.downloadFileBtn.visibility = View.VISIBLE itemView.downloadFileBtn.startAnimation(fadeIn) - itemView.showFileBtn.startAnimation(rotateOpen) + if (generalUrl == null) { + itemView.showFileBtn.startAnimation(rotateOpen) + } fileView?.let { textInfo?.let { @@ -70,17 +75,18 @@ class FileViewsAdapter(private val context: Context, private val fileViews: Arra pdfUrl?.let { itemView.pdfContent.visibility = View.VISIBLE ServerManagement.serverManager.loadPdfView(itemView.pdfContent, pdfUrl!!, true) - println("current page is: ${itemView.pdfContent.currentPage}") } } } else { - itemView.showFileBtn.startAnimation(rotateClose) - itemView.textContent.textSize = 0F - itemView.textContent.setPadding(0) - + if (generalUrl == null) { + itemView.showFileBtn.startAnimation(rotateClose) + } val downloadBtnVanishActionThread = Thread(DownloadBtnVanishAction()) downloadBtnVanishActionThread.start() + itemView.textContent.textSize = 0F + itemView.textContent.setPadding(0) + itemView.imageContent.visibility = View.GONE itemView.pdfContent.visibility = View.GONE } @@ -109,6 +115,11 @@ class FileViewsAdapter(private val context: Context, private val fileViews: Arra val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(pdfUrl)) startActivity(context, browserIntent, null) } + + generalUrl?.let { + val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(generalUrl)) + startActivity(context, browserIntent, null) + } } } @@ -123,6 +134,20 @@ class FileViewsAdapter(private val context: Context, private val fileViews: Arra fileView.pdfUrl?.let { pdfUrl = it } + fileView.generalUrl?.let { + generalUrl = it + itemView.showFileBtn.visibility = View.INVISIBLE + // setting new margins + + var params = itemView.downloadFileBtn.layoutParams as ConstraintLayout.LayoutParams + params.marginEnd = 24 + itemView.downloadFileBtn.layoutParams = params + + params = itemView.showFileBtn.layoutParams as ConstraintLayout.LayoutParams + params.marginEnd = 0 + itemView.showFileBtn.layoutParams = params + + } itemView.filenameText.text = fileView.filename.replace("_", " ") itemView.fileDescription.text = fileView.fileDescription diff --git a/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/infoFragment.kt b/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/infoFragment.kt index d05e7a3..9f12a3b 100644 --- a/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/infoFragment.kt +++ b/app/WikiSpot/app/src/main/java/com/example/wikispot/fragments/infoFragment.kt @@ -41,6 +41,8 @@ class infoFragment : Fragment(R.layout.fragment_info) { updateSensorsRecyclerView() updateFileViewsRecyclerView() + //file_views_recycler_view.isNestedScrollingEnabled = false + try { executeLoadFunction = args.executeLoadFuntion } catch (e: Throwable) { @@ -168,7 +170,7 @@ class infoFragment : Fragment(R.layout.fragment_info) { } // handling images - if ("jpg png".contains(filetype)) { + else if ("jpg png".contains(filetype)) { val fileView = FileView(filetype, filename, fileDescription, null, "$serverId|||||$filename.$filetype") if (!FileViewsSupplier.checkIfContains(fileView)) { FileViewsSupplier.appendFileView(fileView) @@ -177,7 +179,7 @@ class infoFragment : Fragment(R.layout.fragment_info) { } // handling pdf files - if ("pdf".contains(filetype)) { + else if ("pdf".contains(filetype)) { val fileView = FileView(filetype, filename, fileDescription, null, null, "${ServerManagement.baseUrl}files/$serverId/$filename.$filetype") if (!FileViewsSupplier.checkIfContains(fileView)) { FileViewsSupplier.appendFileView(fileView) @@ -185,6 +187,14 @@ class infoFragment : Fragment(R.layout.fragment_info) { } } + + else { + val fileView = FileView(filetype, filename, fileDescription, null, null, null, "${ServerManagement.baseUrl}files/$serverId/$filename.$filetype") + if (!FileViewsSupplier.checkIfContains(fileView)) { + FileViewsSupplier.appendFileView(fileView) + updateFileViewsRecyclerView() + } + } } } catch (e: Throwable) { println("[debug] exception in infoFragment load data request Exception: $e") } } @@ -290,6 +300,7 @@ class infoFragment : Fragment(R.layout.fragment_info) { try { file_views_recycler_view.post { val layoutManager = LinearLayoutManager(context) + layoutManager.orientation = LinearLayoutManager.VERTICAL file_views_recycler_view.layoutManager = layoutManager diff --git a/app/WikiSpot/app/src/main/java/com/example/wikispot/modelsForAdapters/FilesListModel.kt b/app/WikiSpot/app/src/main/java/com/example/wikispot/modelsForAdapters/FilesListModel.kt index de0cea6..7977e73 100644 --- a/app/WikiSpot/app/src/main/java/com/example/wikispot/modelsForAdapters/FilesListModel.kt +++ b/app/WikiSpot/app/src/main/java/com/example/wikispot/modelsForAdapters/FilesListModel.kt @@ -1,7 +1,8 @@ package com.example.wikispot.modelsForAdapters data class FileView(val filetype: String, val filename: String, val fileDescription: String, - var textInfo: String? = null, var imgInfo: String? = null, var pdfUrl: String? = null) + var textInfo: String? = null, var imgInfo: String? = null, var pdfUrl: String? = null, + var generalUrl: String? = null) object FileViewsSupplier { diff --git a/app/WikiSpot/app/src/main/res/drawable/ic_launcher_background.xml b/app/WikiSpot/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 07d5da9..0000000 --- a/app/WikiSpot/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/WikiSpot/app/src/main/res/layout/fragment_info.xml b/app/WikiSpot/app/src/main/res/layout/fragment_info.xml index 3c0b5c7..e4d7e89 100644 --- a/app/WikiSpot/app/src/main/res/layout/fragment_info.xml +++ b/app/WikiSpot/app/src/main/res/layout/fragment_info.xml @@ -1,5 +1,5 @@ - + android:layout_height="wrap_content" + android:nestedScrollingEnabled="false"/> + android:layout_height="wrap_content" + android:nestedScrollingEnabled="false" /> - \ No newline at end of file + \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/layout/fragment_settings.xml b/app/WikiSpot/app/src/main/res/layout/fragment_settings.xml index 762cc62..233e070 100644 --- a/app/WikiSpot/app/src/main/res/layout/fragment_settings.xml +++ b/app/WikiSpot/app/src/main/res/layout/fragment_settings.xml @@ -47,7 +47,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="32dp" - android:text="More colors" + android:text="@string/more_colors" android:background="@drawable/text_background_gradient" android:padding="5dp" android:textColor="?attr/textOnTextBgColor" @@ -64,6 +64,7 @@ android:layout_marginStart="16dp" app:layout_constraintBottom_toBottomOf="@+id/moreColorsSwitchText" app:layout_constraintStart_toEndOf="@+id/moreColorsSwitchText" - app:layout_constraintTop_toTopOf="@+id/moreColorsSwitchText" /> + app:layout_constraintTop_toTopOf="@+id/moreColorsSwitchText" + tools:ignore="UseSwitchCompatOrMaterialXml" /> \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 7353dbd..036d09b 100644 --- a/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index 7353dbd..036d09b 100644 --- a/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/WikiSpot/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher.png index 8c6e630..87eab67 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png index 1528974..a36a81f 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index 6f7a1e6..1ba917c 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/app/WikiSpot/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher.png index f500abb..7cda595 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png index d697cd1..30b0e2c 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index 0f6457a..9bb759f 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/app/WikiSpot/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 1112784..2596049 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png index b1921be..1ac8ace 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index c217eef..172e0ac 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/app/WikiSpot/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 0b2aa44..87d390d 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png index 1d3038e..00962f3 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index a34b3fc..cb196e3 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/app/WikiSpot/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index e31cc76..5202b90 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png index 7d7964b..ade2531 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index 7e7c423..c54ceeb 100644 Binary files a/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/app/WikiSpot/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml b/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml index 59c0e27..50243aa 100644 --- a/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-de-rDE/strings.xml @@ -13,4 +13,5 @@ Anzahl der Personen : Status : Temperatur : + Mehr Farben \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml b/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml index c6efd0d..4d0dbe3 100644 --- a/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-es-rES/strings.xml @@ -13,4 +13,5 @@ Número de personas: Abierto Cerrado + Mas colores \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml b/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml index 055be46..44e58cd 100644 --- a/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-fr-rFR/strings.xml @@ -13,4 +13,5 @@ Nombre de personnes : Ouvert Fermé + Plus de couleurs \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml b/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml index 17d99cb..0c85fcd 100644 --- a/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-ja-rJP/strings.xml @@ -13,4 +13,5 @@ 人々の数 : 状態 : 温度: + より多くの色 \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml b/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml index 9527ec0..44a3503 100644 --- a/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-ru-rRU/strings.xml @@ -13,4 +13,5 @@ Число людей : Открыть Закрыто + Больше цветов \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml b/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml index 5053834..30888c2 100644 --- a/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-sk-rSK/strings.xml @@ -14,4 +14,5 @@ Otvorené Zatvorené Teplota : + Viac farieb \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml b/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml index c21a3ae..6a191d5 100644 --- a/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/WikiSpot/app/src/main/res/values-zh-rCN/strings.xml @@ -13,4 +13,5 @@ 人数 : 温度 : 地位 : + 更多颜色 \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values/ic_launcher_background.xml b/app/WikiSpot/app/src/main/res/values/ic_launcher_background.xml index 06ea7bf..4e823a0 100644 --- a/app/WikiSpot/app/src/main/res/values/ic_launcher_background.xml +++ b/app/WikiSpot/app/src/main/res/values/ic_launcher_background.xml @@ -1,4 +1,4 @@ - #84ABFC + #3DDC84 \ No newline at end of file diff --git a/app/WikiSpot/app/src/main/res/values/strings.xml b/app/WikiSpot/app/src/main/res/values/strings.xml index b666206..9b78d59 100644 --- a/app/WikiSpot/app/src/main/res/values/strings.xml +++ b/app/WikiSpot/app/src/main/res/values/strings.xml @@ -17,4 +17,5 @@ Files Dark theme + More colors \ No newline at end of file diff --git a/websites/.vscode/launch.json b/websites/.vscode/launch.json new file mode 100644 index 0000000..2ba986f --- /dev/null +++ b/websites/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/websites/WikiSpotCSS.css b/websites/WikiSpotCSS.css index d95e3b7..49bb271 100644 --- a/websites/WikiSpotCSS.css +++ b/websites/WikiSpotCSS.css @@ -1,210 +1,114 @@ -/* elements */ -body{ - background-color: #00B4D8; +/* ---------- Základné štýly ---------- */ +header { + background-image: url(header-background.jpg); +} +body { + background-image: url(header-background.jpg); margin: 0; -} -header{ - background-color:#0077B6; - padding-bottom: 23px; -} -img{ - padding-top: 25px; - padding-left: 25px; -} -nav{ - float: right; - position: sticky; -} -ul{ - margin: 0; - margin-left: 280px; -} -li{ - padding-top: 50px; - padding-bottom: 48px; - padding-left: 50px; - padding-right: 50px; - margin-right: -5px; - display: inline-block; - font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; - font-size: 20px; - transition: background-color 0.5s; - position: relative; -} -#contact{ - margin: 0; -} -li:hover{ - background-color: rgba(79, 80, 80, 0.356); - transition: ease-in-out; - transition: background-color 0.5s; - -} -a{ - text-decoration: none; - color: #FFFFFF; -} -label{ - visibility: collapse; user-select: none; } -/* classes */ -.expandable{ - visibility: collapse; - display: block; - margin-left: 0; - padding-top: 10px; - padding-bottom: 10px; - text-decoration: none; - color: black; - font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; - font-size: 20px; - text-align: center; +/* ---------- Navigačná lišta (navbar) ---------- */ +.list { + margin: 0px; + padding: 1rem 0; + display: flex; + justify-content: flex-end; + align-items: center; } -.an{ +.item { + list-style: none; + margin-right: 3rem; + cursor: pointer; +} +.item:first-child { + margin-right: auto; + margin-left: 1.3rem; +} +.itemImg { + margin-right: auto; + margin-left: 1.3rem; +} +.list li { color: #FFFFFF; font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; - font-size: 35px; - margin: 0; - margin-top: 340px; - margin-left: 150px; + font-size: 20px; } -/* IDs */ -#here{ - margin-top: 150px; +.list li:hover { + color: chartreuse; + transition: color 0.2s ease-in-out; } -#phone{ - width: 200px; - height: 400px; - border: 10px solid grey; - border-radius: 5%; - background-color: black; - margin-left: 150px; - margin-top: 150px; - position: relative; +.wsImg { + border-radius: 10px; } -#ref{ - position: relative; - margin-top: 180px; - margin-left: -30px; - width: 2px; - height: 250px; - border: 2px solid rgba(79, 80, 80, 0.356); - border-radius: 30%; - background: rgba(126, 133, 133, 0.356); +.wsImg:first-child { + margin-right: auto; } -#ref2{ - position: relative; - margin-top: 450px; - margin-left: -30px; - width:50; - border: 3px solid rgba(166, 172, 172, 0.39); - border-radius: 50%; +/* ---------- Burger Menu ---------- */ +.burger { + cursor: pointer; + font-size: 40px; + color: white; + display: flex; + visibility: collapse; + margin-right: 2rem; + margin-top: -10px; + position: absolute; } -#phone, #ref, #ref2, #android{ - display: inline; - float: left; -} -#check{ +.burgerList { display: none; } -/* responsive */ -@media (max-width: 1250px){ - ul{ +@media (max-width: 800px) { + .item { + display: none; + } + .burger { + visibility: visible; + } + .burgerList { + display: none; + flex-direction: column; + align-items: center; + margin-right: 30px; margin-top: 0px; - margin-left: 0px; - } -} -@media (max-width: 955px){ - #check:checked ~ * .expandable{ - visibility: visible; - } - ul{ - visibility: collapse; - padding: 0; - } - label{ - font-size: 40px; - float: right; - margin-top: -90px; - margin-right: 45px; - position: relative; - visibility: visible; - } - .expandable{ - visibility: collapse; - display: block; - position: relative; - margin-left: 400px; - text-decoration: none; - color: black; + color: white; + list-style: none; font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; font-size: 20px; - text-align: center; } - .menu{ - position: relative; - margin-left: -12em; + .bItem { + margin-top: 10px; } - -} -@media (max-width: 914px){ - label{ - font-size: 40px; - float: right; - margin-top: -90px; - margin-right: 45px; - position: relative; - } - .menu{ - margin-top: -97px; + .appear { + display: flex; } } -@media (max-width: 860px){ - label{ - font-size: 40px; - float: right; - margin-top: -90px; - margin-right: 45px; - position: relative; - } +/* ---------- Hlavná stránka ---------- */ +#downloadHolder { + margin-top: 5%; + margin-left: 25%; + display: flex; + justify-content: space-between; + width: 550px; + align-items: center; + } -@media (max-width: 840px){ - label{ - font-size: 40px; - float: right; - margin-top: -90px; - margin-right: 45px; - position: relative; - } +#download { + cursor: pointer; + background-color: none; + color: white; + border: 4px white solid; + border-radius: 50px; + width: auto; + height: 20px; + padding: 10px; + position: static; + font-size: 20px; + font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; } -@media (max-width: 692px){ - label{ - font-size: 40px; - float: right; - margin-top: -90px; - margin-right: 45px; - position: relative; - } - .menu{ - margin-top: -217px; - } +#download:hover { + background-color: white; + color: rgb(47, 40, 150) ; } -@media (max-width: 635px){ - label{ - font-size: 40px; - float: right; - margin-top: -90px; - margin-right: 45px; - position: relative; - } -} -@media (max-width: 618px){ - label{ - font-size: 40px; - float: right; - margin-top: -90px; - margin-right: 45px; - position: relative; - } +#phoneImg { + width: 350px; } \ No newline at end of file diff --git a/websites/WikiSpotCon.html b/websites/WikiSpotCon.html new file mode 100644 index 0000000..6b4f73a --- /dev/null +++ b/websites/WikiSpotCon.html @@ -0,0 +1,33 @@ + + + + WikiSpot + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/websites/WikiSpotLoc.html b/websites/WikiSpotLoc.html new file mode 100644 index 0000000..b2b0f3a --- /dev/null +++ b/websites/WikiSpotLoc.html @@ -0,0 +1,158 @@ + + + + WikiSpot + + + + + + + + + +
+ + + home + + +
+ + + + + +
+
+
+
+
+ wsData1img +
+
+ + +
+
+
+
+
+ wsData2img +
+
+ + + + +
+
+
+
+
+ wsData3img +
+
+ + + + +
+
+
+
+
+ wsData4img +
+
+ + + + +
+
+
+
+
+ wsData5img +
+
+ + diff --git a/websites/WikiSpotPro.html b/websites/WikiSpotPro.html new file mode 100644 index 0000000..6b4f73a --- /dev/null +++ b/websites/WikiSpotPro.html @@ -0,0 +1,33 @@ + + + + WikiSpot + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/websites/WikiSpotWS.html b/websites/WikiSpotWS.html new file mode 100644 index 0000000..13f8ef9 --- /dev/null +++ b/websites/WikiSpotWS.html @@ -0,0 +1,146 @@ + + + + + + + + Flextest + + + + +
+ +
+ + + + + +
+ # +
+
Kniznica
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem, numquam facilis aut officia.
+
+
+
+ +
+ # +
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus recusandae et repellat saepe modi tenetur provident. Perferendis dolorum odit dolorem delectus consequatur eos, deleniti, pariatur corporis in magnam dolor quam? Consequuntur asperiores provident repellendus itaque tenetur, accusantium aperiam nemo architecto cum magnam amet necessitatibus dolore eaque tempore iusto incidunt nihil voluptatem dolores facilis rem cumque animi perferendis. Error, molestias deserunt.
+
+
Teplota
+
+
+
+
+ +
+ # +
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus recusandae et repellat saepe modi tenetur provident. Perferendis dolorum odit dolorem delectus consequatur eos, deleniti, pariatur corporis in magnam dolor quam? Consequuntur asperiores provident repellendus itaque tenetur, accusantium aperiam nemo architecto cum magnam amet necessitatibus dolore eaque tempore iusto incidunt nihil voluptatem dolores facilis rem cumque animi perferendis. Error, molestias deserunt.
+
+ + + + +
+ # +
+
Kniznica
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem, numquam facilis aut officia.
+
+
+
+ +
+ # +
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus recusandae et repellat saepe modi tenetur provident. Perferendis dolorum odit dolorem delectus consequatur eos, deleniti, pariatur corporis in magnam dolor quam? Consequuntur asperiores provident repellendus itaque tenetur, accusantium aperiam nemo architecto cum magnam amet necessitatibus dolore eaque tempore iusto incidunt nihil voluptatem dolores facilis rem cumque animi perferendis. Error, molestias deserunt.
+
+
Teplota
+
+
+
+
+ +
+ # +
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus recusandae et repellat saepe modi tenetur provident. Perferendis dolorum odit dolorem delectus consequatur eos, deleniti, pariatur corporis in magnam dolor quam? Consequuntur asperiores provident repellendus itaque tenetur, accusantium aperiam nemo architecto cum magnam amet necessitatibus dolore eaque tempore iusto incidunt nihil voluptatem dolores facilis rem cumque animi perferendis. Error, molestias deserunt.
+
+ + + + +
+ # +
+
Kniznica
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem, numquam facilis aut officia.
+
+
+
+ +
+ # +
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus recusandae et repellat saepe modi tenetur provident. Perferendis dolorum odit dolorem delectus consequatur eos, deleniti, pariatur corporis in magnam dolor quam? Consequuntur asperiores provident repellendus itaque tenetur, accusantium aperiam nemo architecto cum magnam amet necessitatibus dolore eaque tempore iusto incidunt nihil voluptatem dolores facilis rem cumque animi perferendis. Error, molestias deserunt.
+
+
Teplota
+
+
+
+
+ +
+ # +
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus recusandae et repellat saepe modi tenetur provident. Perferendis dolorum odit dolorem delectus consequatur eos, deleniti, pariatur corporis in magnam dolor quam? Consequuntur asperiores provident repellendus itaque tenetur, accusantium aperiam nemo architecto cum magnam amet necessitatibus dolore eaque tempore iusto incidunt nihil voluptatem dolores facilis rem cumque animi perferendis. Error, molestias deserunt.
+
+ + + + +
+ # +
+
Kniznica
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem, numquam facilis aut officia.
+
+
+
+ +
+ # +
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus recusandae et repellat saepe modi tenetur provident. Perferendis dolorum odit dolorem delectus consequatur eos, deleniti, pariatur corporis in magnam dolor quam? Consequuntur asperiores provident repellendus itaque tenetur, accusantium aperiam nemo architecto cum magnam amet necessitatibus dolore eaque tempore iusto incidunt nihil voluptatem dolores facilis rem cumque animi perferendis. Error, molestias deserunt.
+
+
Teplota
+
+
+
+
+ +
+ # +
Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus recusandae et repellat saepe modi tenetur provident. Perferendis dolorum odit dolorem delectus consequatur eos, deleniti, pariatur corporis in magnam dolor quam? Consequuntur asperiores provident repellendus itaque tenetur, accusantium aperiam nemo architecto cum magnam amet necessitatibus dolore eaque tempore iusto incidunt nihil voluptatem dolores facilis rem cumque animi perferendis. Error, molestias deserunt.
+
+ + + + + \ No newline at end of file diff --git a/websites/app.css b/websites/app.css new file mode 100644 index 0000000..22f4852 --- /dev/null +++ b/websites/app.css @@ -0,0 +1,278 @@ +/* ---------- Základné štýly ---------- */ +header { + background-image: url(header-background.jpg); +} +body { + background-image: url(header-background.jpg); + margin: 0; + user-select: none; +} +/* ---------- Navigačná lišta (navbar) ---------- */ +.list { + margin: 0px; + padding: 1rem 0; + display: flex; + justify-content: flex-end; + align-items: center; +} +.item { + list-style: none; + margin-right: 3rem; + cursor: pointer; +} +.item:first-child { + margin-right: auto; + margin-left: 1.3rem; +} +.itemImg { + margin-right: auto; + margin-left: 1.3rem; +} +.list li { + color: #FFFFFF; + font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; + font-size: 20px; +} +.list li:hover { + color: chartreuse; + transition: color 0.2s ease-in-out; +} +.wsImg { + border-radius: 10px; +} +.wsImg:first-child { + margin-right: auto; +} +/* ---------- Burger Menu ---------- */ +.burger { + cursor: pointer; + font-size: 40px; + color: white; + display: flex; + visibility: collapse; + margin-right: 2rem; + margin-top: -10px; + position: absolute; +} +.burgerList { + display: none; +} +/* ---------- 1 ---------- */ +#list1 { + cursor: pointer; + height: 40px; + width: 40px; + font-size: 40px; + margin-right: 30px; + margin-top: 28px; + transition: transform 0.5s ease-in-out; +} +#hey1 { + font-weight: bold; + margin-top: 15px; +} +#hou1 { + margin-top: 50px; + margin-left: -60px; +} +/* ---------- 2 ---------- */ +#list2 { + cursor: pointer; + height: 40px; + width: 40px; + font-size: 40px; + margin-right: 30px; + margin-top: 28px; + transition: transform 0.5s ease-in-out; +} +#hey2 { + font-weight: bold; + margin-top: 15px; +} +#hou2 { + margin-top: 50px; + margin-left: -60px; +} +/* ---------- 3 ---------- */ +#list3 { + cursor: pointer; + height: 40px; + width: 40px; + font-size: 40px; + margin-right: 30px; + margin-top: 28px; + transition: transform 0.5s ease-in-out; +} +#hey3 { + font-weight: bold; + margin-top: 15px; +} +#hou3 { + margin-top: 50px; + margin-left: -60px; +} +/* ---------- 4 ---------- */ +#list4 { + cursor: pointer; + height: 40px; + width: 40px; + font-size: 40px; + margin-right: 30px; + margin-top: 28px; + transition: transform 0.5s ease-in-out; +} +#hey4 { + font-weight: bold; + margin-top: 15px; +} +#hou4 { + margin-top: 50px; + margin-left: -60px; +} +/* ---------- 5 ---------- */ +#list5 { + cursor: pointer; + height: 40px; + width: 40px; + font-size: 40px; + margin-right: 30px; + margin-top: 28px; + transition: transform 0.5s ease-in-out; +} +#hey5 { + font-weight: bold; + margin-top: 15px; +} +#hou5 { + margin-top: 50px; + margin-left: -60px; +} +/* ---------- Zdieľané štýly (classes) ---------- */ +.wsList { + background: white; + width: 550px; + height: 100px; + border-radius: 10px; + margin-left: 20px; + margin-top: 5px; +} +.hey { + display: flex; + flex-direction: row; + justify-content: flex-end; +} +.klol { + display: flex; + flex-direction: row; + justify-content: flex-end; + margin-bottom: 10px; + margin-left: 10px; + font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; +} +.constantImg { + grid-area: obrazok; + display: flex; + width: 300px; + height: 300px; + top: 250px; + left: 50px; + transition: display 1s 1s; +} +.mystyle { + transform: rotate(180deg); +} +.appear { + display: flex; +} +.arrow { + cursor: pointer; + height: 40px; + width: 40px; + font-size: 40px; + margin-right: 30px; + margin-top: 28px; + transition: transform 0.5s ease-in-out; +} +/* ---------- Grid Layout ---------- */ +.obrazok { + grid-area: obrazok; + width: 500px; + height: 300px; + margin-left: 25px; +} +.text { + grid-area: description; +} +.senzory { + grid-area: senzory; +} +.info { + grid-area: info; +} +.listHide { + display: none; + background: #ffffff; +} +.expand { + display: grid; + grid-template-columns: 1.3fr 0.7fr; + grid-template-rows: 1fr 1fr; + gap: 5px 5px; + grid-template-areas: + "obrazok senzory" + "description info"; + margin-top: 2px; + margin-left: 20px; + margin-bottom: 2px; + border-radius: 10px; + height: 600px; + width: 550px; +} +.big { + display: grid; + grid-template-columns: 1.3fr 0.7fr; + grid-template-rows: 1fr 1fr; + gap: 5px 5px; + grid-template-areas: + "obrazok senzory" + "description info"; + position: absolute; + border-radius: 10px; + left: 650px; + top: 117px; + height: 700px; + width: 900px; + background: royalblue; + align-items: center; +} +.appear { + display: flex; +} +/* ---------- Responzívnosť (media tag) ---------- */ +@media (max-width: 1000px) { + .big { + display: none; + } +} +@media (max-width: 800px) { + .item { + display: none; + } + .burger { + visibility: visible; + } + .burgerList { + display: none; + flex-direction: column; + align-items: center; + margin-right: 30px; + margin-top: 0px; + color: white; + list-style: none; + font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; + font-size: 20px; + } + .bItem { + margin-top: 10px; + } +} \ No newline at end of file diff --git a/websites/appjs.js b/websites/appjs.js new file mode 100644 index 0000000..45f618e --- /dev/null +++ b/websites/appjs.js @@ -0,0 +1,44 @@ +function onclick1() { + var click = document.getElementById("arrow1"); + click.classList.toggle("mystyle"); + var expand = document.getElementById("listExpand1"); + expand.classList.toggle("expand"); + var appear = document.getElementById("roko1"); + appear.classList.toggle("appear"); +} +function onclick2() { + var click = document.getElementById("arrow2"); + click.classList.toggle("mystyle"); + var expand = document.getElementById("listExpand2"); + expand.classList.toggle("expand"); + var appear = document.getElementById("roko2"); + appear.classList.toggle("appear"); +} +function onclick3() { + var click = document.getElementById("arrow3"); + click.classList.toggle("mystyle"); + var expand = document.getElementById("listExpand3"); + expand.classList.toggle("expand"); + var appear = document.getElementById("roko3"); + appear.classList.toggle("appear"); +} +function onclick4() { + var click = document.getElementById("arrow4"); + click.classList.toggle("mystyle"); + var expand = document.getElementById("listExpand4"); + expand.classList.toggle("expand"); + var appear = document.getElementById("roko4"); + appear.classList.toggle("appear"); +} +function onclick5() { + var click = document.getElementById("arrow5"); + click.classList.toggle("mystyle"); + var expand = document.getElementById("listExpand5"); + expand.classList.toggle("expand"); + var appear = document.getElementById("roko5"); + appear.classList.toggle("appear"); +} +function bmenu() { + var burger = document.getElementById("bonger"); + burger.classList.toggle("appear") +} \ No newline at end of file diff --git a/websites/desc_short.js b/websites/desc_short.js new file mode 100644 index 0000000..809c3c5 --- /dev/null +++ b/websites/desc_short.js @@ -0,0 +1,118 @@ +// fetch("http://192.168.1.105:8000/devices_list") +// .then(function(response){ +// return response.json(); +// }) +// .then(function(data){ +// appendData(data); +// }) +// .catch(function(err){ +// console.log(err); + +// }); +// function appendData(data){ +// console.log(data); +// console.log(data[1]["files"][0]); +// var myJson = JSON.stringify(data[1]["description"]["description_s"]); +// var myJson1 = JSON.stringify(data[1]["description"]["title"]); +// var myJson2 = JSON.stringify(data[1]["description"]["description_l"]); +// var uJson = myJson.replace(/\"/g, ""); +// var str = (uJson); +// var str_esc = escape(str); +// console.log(str_esc + "
" + myJson1); +// console.log(unescape(str_esc)); +// var mainContainer = document.getElementById("hou1"); +// var div = document.createElement("div"); +// div.setAttribute("id", "hou"); +// div.innerHTML = unescape(str_esc); + +// mainContainer.appendChild(div); + +// var mainContainer1 = document.getElementById("hey1"); +// var uJson1 = myJson1.replace(/\"/g, ""); +// var div1 = document.createElement("div"); +// div1.setAttribute("id", "hey"); +// div1.innerHTML = unescape(escape(uJson1)); +// var uJson1 = myJson1.replace(/\"/g, ""); + +// mainContainer1.appendChild(div1); +// } +$(document).ready(function() { + let urls = ["http://192.168.1.105:8000/files/0/library.jpg", "http://192.168.1.105:8000/files/0/library.jpg", "http://192.168.1.105:8000/files/0/library.jpg"]; + let descriptions = ["here", "there"]; + let n = 1; + function append_element(urls, descriptions, n) { + + let template = `
+
+ # +
+
+
+
+
+
+ +
+ # +
${descriptions[0]}
+
+
Teplota
+
+
+
+
+ +
+ # +
${descriptions[1]}
+
`; + + $("body").append(template); + + } + append_element(urls, descriptions, n); + + $.get("http://192.168.1.105:8000/devices_list", function(data) { + console.log(data); + var myJson = JSON.stringify(data[1]["description"]["description_s"]); + var myJson1 = JSON.stringify(data[1]["description"]["title"]); + console.log(myJson); + console.log(myJson1); + uJson = myJson.replace(/\"/g, ""); + var str = (uJson); + var str_esc = escape(str); + console.log(str_esc + "
" + myJson); + console.log(unescape(str_esc)); + var main = document.getElementById("hou1"); + var div = document.createElement("div"); + div.setAttribute("id", "hou"); + div.innerHTML = unescape(str_esc); + + main.appendChild(div); + + var sub = document.getElementById("hey1"); + var uJson1 = myJson1.replace(/\"/g, ""); + var div1 = document.createElement("div"); + div1.setAttribute("id", "hey"); + div1.innerHTML = unescape(escape(uJson1)); + + sub.appendChild(div1); + + + + ID = 0; + $.get(`http://192.168.1.105:8000/${ID}/sensors`, function(data1) { + console.log(data1); + var sens = JSON.stringify(data1["teplota"]); + console.log(sens); + var uSens = sens.replace(/\"/g, ""); + var heat = document.getElementById("heat"); + var div2 = document.createElement("div"); + div2.setAttribute("id", "hot"); + div2.innerHTML = unescape(escape(uSens)); + + heat.appendChild(div2); +}) + }) + +}) diff --git a/websites/header-background.jpg b/websites/header-background.jpg new file mode 100644 index 0000000..f369c89 Binary files /dev/null and b/websites/header-background.jpg differ diff --git a/websites/index.html b/websites/index.html index 7e7d51d..cd0c55c 100644 --- a/websites/index.html +++ b/websites/index.html @@ -1,41 +1,37 @@ - + - Travellly - - + WikiSpot + + + +
+ +
-
- - -
- +
+
SŤIAHNUŤ ▼
+
+
\ No newline at end of file diff --git a/websites/samsung1.png b/websites/samsung1.png new file mode 100644 index 0000000..9f070f7 Binary files /dev/null and b/websites/samsung1.png differ diff --git a/websites/wikispot-white.png b/websites/wikispot-white.png new file mode 100644 index 0000000..76a9264 Binary files /dev/null and b/websites/wikispot-white.png differ diff --git a/websites/wikispot.png b/websites/wikispot.png deleted file mode 100644 index 10d4fac..0000000 Binary files a/websites/wikispot.png and /dev/null differ