From 2455fa869f54bdcc7a8ec3f60d49c2002e4c847b Mon Sep 17 00:00:00 2001 From: pawel Date: Wed, 15 May 2024 10:27:15 +0200 Subject: [PATCH 1/2] dodanie plikow --- css.css | 0 index.html | 22 ++++++++++++++++++++++ js.js | 13 +++++++++++++ text.txt | 3 +++ 4 files changed, 38 insertions(+) create mode 100644 css.css create mode 100644 index.html create mode 100644 js.js create mode 100644 text.txt diff --git a/css.css b/css.css new file mode 100644 index 0000000..e69de29 diff --git a/index.html b/index.html new file mode 100644 index 0000000..98e9f38 --- /dev/null +++ b/index.html @@ -0,0 +1,22 @@ + + + + + + Sortowanie Sufiksów + + +

Sortowanie Sufiksów

+ + +

Nieposortowane Sufiksy

+

+    

Posortowane Sufiksy

+

+    
+
+
+
+
\ No newline at end of file
diff --git a/js.js b/js.js
new file mode 100644
index 0000000..6f31706
--- /dev/null
+++ b/js.js
@@ -0,0 +1,13 @@
+function sortujSufiksy() {
+    const slowo = document.getElementById('slowo').value;
+    const sufiksy = [];
+    for (let i = 0; i < slowo.length; i++) {
+        sufiksy.push(slowo.slice(i));
+    }
+    document.getElementById('nieposortowane').textContent = formatSufiksy(sufiksy);
+    sufiksy.sort();
+    document.getElementById('posortowane').textContent = formatSufiksy(sufiksy);
+}
+function formatSufiksy(sufiksy) {
+    return sufiksy.map((sufiks, index) => `${index + 1} ${sufiks}`).join('\n');
+}
diff --git a/text.txt b/text.txt
new file mode 100644
index 0000000..8a3a552
--- /dev/null
+++ b/text.txt
@@ -0,0 +1,3 @@
+
+2247cb473670da4439f474d40c3120657b59f077
+

From 7e73a7cea6e84bc63a1a6f33e0de96d29aad8f92 Mon Sep 17 00:00:00 2001
From: pawel 
Date: Fri, 17 May 2024 09:40:03 +0200
Subject: [PATCH 2/2] css

---
 css.css    |  0
 index.html |  6 +++---
 styles.css | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 text.txt   |  3 ---
 4 files changed, 61 insertions(+), 6 deletions(-)
 delete mode 100644 css.css
 create mode 100644 styles.css
 delete mode 100644 text.txt

diff --git a/css.css b/css.css
deleted file mode 100644
index e69de29..0000000
diff --git a/index.html b/index.html
index 98e9f38..3ab907e 100644
--- a/index.html
+++ b/index.html
@@ -4,6 +4,8 @@
     
     
     Sortowanie Sufiksów
+    
+
 
 
     

Sortowanie Sufiksów

@@ -13,9 +15,7 @@

     

Posortowane Sufiksy


-    
+    
 
 
 
diff --git a/styles.css b/styles.css
new file mode 100644
index 0000000..c5012df
--- /dev/null
+++ b/styles.css
@@ -0,0 +1,58 @@
+
+body {
+    font-family: Arial, sans-serif;
+    background-color: #f5f5f5;
+    color: #333;
+    margin: 0;
+    padding: 20px;
+    line-height: 1.6;
+}
+
+h1 {
+    text-align: center;
+    color: #0056b3;
+    margin-bottom: 20px;
+}
+
+
+input[type="text"] {
+    width: calc(100% - 22px);
+    padding: 10px;
+    margin-bottom: 10px;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    box-sizing: border-box;
+}
+
+
+button {
+    display: block;
+    width: 100%;
+    padding: 10px;
+    background-color: #0056b3;
+    color: white;
+    border: none;
+    border-radius: 4px;
+    cursor: pointer;
+    font-size: 16px;
+}
+
+button:hover {
+    background-color: #004494;
+}
+
+
+h2 {
+    color: #0056b3;
+    border-bottom: 2px solid #0056b3;
+    padding-bottom: 5px;
+    margin-top: 20px;
+}
+
+pre {
+    background-color: #fff;
+    border: 1px solid #ccc;
+    padding: 10px;
+    border-radius: 4px;
+    overflow-x: auto;
+}
\ No newline at end of file
diff --git a/text.txt b/text.txt
deleted file mode 100644
index 8a3a552..0000000
--- a/text.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-
-2247cb473670da4439f474d40c3120657b59f077
-