]> git.feebdaed.xyz Git - gomehub.git/commitdiff
Base tui
authorseantywork <seantywork@gmail.com>
Sat, 27 Jul 2024 09:33:41 +0000 (18:33 +0900)
committerseantywork <seantywork@gmail.com>
Sat, 27 Jul 2024 09:33:41 +0000 (18:33 +0900)
Makefile
pkg/log/log.go
public/js/index/index.js
public/vendor/TuiCss [new submodule]
view/content/article.html
view/index/index.html
view/index/signin.html
view/room/index.html

index b4fefe2094152a8e1ed4448b775b088a4d064a7d..c96d64b43dd5c2cb3bbef8bb296aec479afe34cf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,6 @@ clean-data:
        rm -rf data/session/*.json 
        rm -rf data/user/*.json
        rm -rf data/log/*.txt
-       rm -rf data/log/*.json
 
 
 clean:
index 664c42cf5104e517ef46e203ff0172387a3b8446..5849f0ca99e778da096d6aab4dc77fc8a85b5475 100644 (file)
@@ -88,6 +88,7 @@ func LogFlush() {
 
                log.Printf("error log flush: load: %s\n", err.Error())
 
+               GMTX.Unlock()
                return
        }
 
@@ -97,6 +98,7 @@ func LogFlush() {
 
                log.Printf("error log flush: unmarshal: %s\n", err.Error())
 
+               GMTX.Unlock()
                return
        }
 
@@ -122,6 +124,7 @@ func LogFlush() {
 
                log.Printf("error log flush: unmarshal new stat: %s\n", err.Error())
 
+               GMTX.Unlock()
                return
        }
 
@@ -147,6 +150,7 @@ func LogFlush() {
 
                log.Printf("error log flush: unload log stat: %s\n", err.Error())
 
+               GMTX.Unlock()
                return
 
        }
@@ -157,6 +161,8 @@ func LogFlush() {
 
                log.Printf("error log flush: unload log detail: %s\n", err.Error())
 
+               GMTX.Unlock()
+
                return
 
        }
index 9d2e67108fc036d28a64b62499422eeb0b4b6977..798274dd70307c0c9d53281d46e590cf13b017e1 100644 (file)
@@ -43,7 +43,10 @@ async function getContentList(){
   if (contentEntry.entry == null){
 
     contentReader.innerHTML = `
+    <fieldset class="tui-fieldset tui-border-dotted">
         <pre> :(    Nothing to see here, yet </pre>
+    </fieldset>
+
     `
 
 
@@ -54,10 +57,9 @@ async function getContentList(){
     for(let i = 0; i < sortedEntry.length; i ++){
 
       contentReader.innerHTML += `
-      <a href="/content/${sortedEntry[i].type}/${sortedEntry[i].id}">
+      <a class="tui-button" href="/content/${sortedEntry[i].type}/${sortedEntry[i].id}">
         ${sortedEntry[i].title} 
       </a> [${sortedEntry[i].author}:${sortedEntry[i].timestamp}] 
-      <input type="button" onclick="deleteArticle('${sortedEntry[i].id}')" value="delete">
       <br>
       `
      
@@ -93,7 +95,9 @@ async function getRoomList(){
     if (roomEntry.room_name == null){
   
       roomReader.innerHTML = `
+      <fieldset class="tui-fieldset tui-border-dotted">
           <pre> :(     You're not invited, yet </pre>
+      </fieldset>
       `
   
   
@@ -102,7 +106,7 @@ async function getRoomList(){
       for(let i = 0; i < roomEntry.room_name.length; i ++){
   
           roomReader.innerHTML += `
-          <a href="/room/${roomEntry.room_name[i]}">
+          <a class="tui-button" href="/room/${roomEntry.room_name[i]}">
               ${roomEntry.room_name[i]}
           </a>
           <br>
diff --git a/public/vendor/TuiCss b/public/vendor/TuiCss
new file mode 160000 (submodule)
index 0000000..6a021ec
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 6a021ecc2abb1fbe6da62bd370d1f2a764da1195
index 73c06ab01b76ef0522a2e39e9bf301a5fc2a2bf6..a0833b648266245aac6bf99dd04332f5fedbc1e2 100644 (file)
@@ -1,6 +1,6 @@
 {{ define "content/article.html" }}
 <!doctype html>
-<html>
+<html class="tui-bg-blue-black">
   <head>
     <title> article</title>
   </head>
   <script src="https://cdn.jsdelivr.net/npm/@editorjs/inline-code@latest"></script>
   <script src="https://cdn.jsdelivr.net/npm/@editorjs/image@latest"></script>
   <script src="https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest"></script>
-
+  <link rel="stylesheet" href="/public/vendor/TuiCss/dist/tuicss.min.css"/>
+  <script src="/public/vendor/TuiCss/dist/tuicss.min.js"></script>
   <script>
 
       CONTENT_ID = "{{ .article_code }}"
 
   </script>
   <body>
-    <div id="article-reader">
+    <div class="tui-window tui-scroll-white">
+      <fieldset class="tui-fieldset tui-border-double">
+        <div id="article-reader">
 
+        </div>
+      </fieldset>
     </div>
 
-
     <script src="/public/js/content/article.js"> </script>
   </body>
 </html>
index 0f195e68f40ab8990529e5d150c8b9b79fb6ff9f..eb2f500b3b8f3c0354f34fc605003e8f2ebfe129 100644 (file)
@@ -1,6 +1,6 @@
 {{ define "index/index.html" }}
 <!doctype html>
-<html>
+<html class="tui-bg-blue-black">
   <head>
     <title> feebdaed.xyz </title>
     <link rel="icon" type="image/x-icon" href="/public/image/favicon.ico">
@@ -9,58 +9,71 @@
   </head>
   <body>
 
-    <h1> feebdaed.xyz </h1>
 
-    {{ if .logged_in }}
-    <a href="/api/auth/signout"> Sign Out </a>
-    <br>
-    <a href="/mypage"> My Page </a>
-    {{ else }}
-    <a href="/signin"> Sign in </a>
-    {{ end }}
+      <div class="tui-window tui-scroll-white">
 
-    <br>
-    <br>
+        <fieldset class="tui-fieldset tui-border-double">
 
-    <input type="button" value="README" onclick="toggleDisplayById('readme-reader')">
-    <div id="readme-reader" style="display: none;"> 
-      <pre> 
-        This website is part of a broader project named <a href="https://github.com/seantywork/sorrylinus"> "sorrylinus" </a>
+          <h1> feebdaed.xyz </h1>
+          {{ if .logged_in }}
+          <a class="tui-button" href="/api/auth/signout"> Sign Out </a>
+          <br>
+          <br>
+          <a class="tui-button" href="/mypage"> My Page </a>
+          {{ else }}
+          <a class="tui-button" href="/signin"> Sign in </a>
+          {{ end }}
 
-        You can also check some more out from my <a href="https://github.com/seantywork"> GitHub </a> 
+          <br>
+          <br>
 
-        I've been uploading to <a href="https://medium.com/@seantywork"> Medium.com </a>
-        but I intend to direct my contents here onward.
-      </pre>
+          <input class="tui-button" type="button" value="README" onclick="toggleDisplayById('readme-reader')">
+          <div id="readme-reader" style="display: none;"> 
+            <fieldset class="tui-fieldset tui-border-dotted">
+              <pre> 
+                This website is part of a broader project named <a class="tui-button" href="https://github.com/seantywork/sorrylinus"> "sorrylinus" </a>
 
-      <pre>
-        Every content listed down there is freely accessible shareable.
+                You can also check some more out from my <a class="tui-button" href="https://github.com/seantywork"> GitHub </a> 
 
-        Except for video chat.
-        
-        To sign in and use video chat,
-        Contact [ seantywork@gmail.com ] 
+                I've been uploading to <a class="tui-button" href="https://medium.com/@seantywork"> Medium.com </a>
+                but I intend to direct my contents here onward.
+              </pre>
+            </fieldset>
+
+            <fieldset class="tui-fieldset tui-border-dotted">
+              <pre>
+                Every content listed down there is freely accessible shareable.
+
+                Except for video chat.
+                
+                To sign in and use video chat,
+                Contact [ seantywork@gmail.com ] 
 
-        If deemed fit, I will send you back: 
+                If deemed fit, I will send you back: 
 
-          - temporary ID, password
-          - video chat room address
+                  - temporary ID, password
+                  - video chat room address
+
+              </pre>
+            </fieldset>
+          </div>
+
+        
+          <h2> Contents </h2>
 
-      </pre>
-    </div>
+          <div id="content-reader"></div>
 
-   
-    <h2> Contents </h2>
+          <br>
 
-    <div id="content-reader"></div>
+          <h2> Video Chat </h2>
 
-    <br>
+          <div id="room-reader"></div>
 
-    <h2> Video Chat </h2>
+          <br>
+        </fieldset>
 
-    <div id="room-reader"></div>
+      </div>
 
-    <br>
 
     <script src="/public/js/common.js"></script>
     <script src="/public/js/index/index.js"></script>
index dc5c4ce5f5a69350a5e6882d832e79a3fbe1c279..a0d0dde0978c601d953333b7fd94d161c44fd12e 100644 (file)
@@ -1,38 +1,43 @@
 {{ define "index/signin.html" }}
-
-<html>
+<!doctype html>
+<html class="tui-bg-blue-black">
 
     <head>
         <title> feebdaed.xyz </title>
         <link rel="icon" type="image/x-icon" href="/public/image/favicon.ico">
+        <link rel="stylesheet" href="/public/vendor/TuiCss/dist/tuicss.min.css"/>
+        <script src="/public/vendor/TuiCss/dist/tuicss.min.js"></script>
     </head>
 
     <body>
 
-
-        <div>
-            <div>
-                <input type='text' id='user-id'/>
-                <label for='user-id'>Enter User ID</label>
-            </div>
-        </div>
-        <div>
-            <div>
-                <input type='password' id='user-pw'/>
-                <label for='user-pw'>Enter User Password</label>
-            </div>
-        </div>
-
-        <br/>
-        <div>
-            <input type="button" onclick="userSignin()" value="user login">
-        </div>
-
-        <br>
-        <div>
-            <a href="/api/oauth2/google/signin">
-                Admin Login
-            </a>
+        <div class="tui-window tui-scroll-white">
+            <fieldset class="tui-fieldset tui-border-double">
+                <fieldset class="tui-fieldset tui-border-dotted">
+                    <div>
+                        <input class="tui-input" type='text' id='user-id'/>
+                        <label for='user-id'>Enter User ID</label>
+                    </div>
+                </fieldset>
+                <fieldset class="tui-fieldset tui-border-dotted">
+                    <div>
+                        <input class="tui-input" type='password' id='user-pw'/>
+                        <label for='user-pw'>Enter User Password</label>
+                    </div>
+                </fieldset>
+
+                <br/>
+                <div>
+                    <input class="tui-button" type="button" onclick="userSignin()" value="user login">
+                </div>
+
+                <br>
+                <div>
+                    <a class="tui-button" href="/api/oauth2/google/signin">
+                        admin Login
+                    </a>
+                </div>
+            </fieldset>
         </div>
 
 
index b39a85b8acdcaff44f07b952afa5983d731b8583..650f3d28febb74c9293e4f080089d01d58d7368e 100644 (file)
@@ -1,12 +1,13 @@
 {{ define "room/index.html" }}
 <!DOCTYPE html>
-<html>
+<html class="tui-bg-blue-black">
   <head>
 
     <meta charset="utf-8">
     <title> room </title>
     <link rel="icon" type="image/x-icon" href="/public/image/favicon.ico">
-
+    <link rel="stylesheet" href="/public/vendor/TuiCss/dist/tuicss.min.css"/>
+    <script src="/public/vendor/TuiCss/dist/tuicss.min.js"></script>
     <script>
 
       ROOM_INFO = JSON.parse("{{ .room_code }}")
 
   </head>
   <body>
-    <h3> Local Video </h3>
-    <video id="localVideo" width="160" height="120" autoplay muted></video> <br />
-
-    <h3> Remote Video </h3>
-    <div id="remoteVideos"></div> <br />
-
-    <h3> Chat </h3>
-
-    <textarea id="chat-sender"></textarea>
-    <br>
-
-    <input type="button" value="send" onclick="sendChat()">
-  
-    <p>Thread</p>
+    <div class="container">
+      <div class="row">
+        <div class="tui-window tui-scroll-white">
+          <fieldset class="tui-fieldset tui-border-double">
+            <h3> Local Video </h3>
+            <video id="localVideo" width="160" height="120" autoplay muted></video> <br />
+
+            <h3> Remote Video </h3>
+            <div id="remoteVideos"></div> <br />      
+
+          </fieldset>
+
+        </div>
+        <div class="tui-window tui-scroll-white">
+          <fieldset class="tui-fieldset tui-border-double">
+            <h3>Chat</h3>
+            <textarea class="tui-input" id="chat-sender"></textarea>
+            <br>
+            <input class="tui-button" type="button" value="send" onclick="sendChat()">
+            <p>Thread</p>
+            <fieldset class="tui-fieldset tui-border-dotted">
+              <pre id="chat-reader"></pre>
+            </fieldset>
+          </fieldset>
+
+        </div>
+      </div>
+    </div>
 
-    <pre id="chat-reader"></pre>
 
 
   </body>