OSDN Git Service

ファイル構成変更、ウィンドウデザイン考え中
authorNeko7sora <75793267+Neko7sora@users.noreply.github.com>
Fri, 21 May 2021 16:00:04 +0000 (01:00 +0900)
committerNeko7sora <75793267+Neko7sora@users.noreply.github.com>
Fri, 21 May 2021 16:00:04 +0000 (01:00 +0900)
17 files changed:
README.md
src/comment.json [new file with mode: 0644]
src/index.html
src/main.js
src/plugin/MultiCommentViewer/README.md
src/preload.js
src/skins/comments/hcg/skin_FPS.png [moved from src/skins/img/default/skin_FPS.png with 100% similarity]
src/skins/comments/hcg/skin_horror.png [moved from src/skins/img/default/skin_horror.png with 100% similarity]
src/skins/comments/hcg/skin_messenger1.png [moved from src/skins/img/default/skin_messenger1.png with 100% similarity]
src/skins/comments/hcg/skin_messenger2.png [moved from src/skins/img/default/skin_messenger2.png with 100% similarity]
src/skins/comments/hcg/skin_simple1.png [moved from src/skins/img/default/skin_simple1.png with 100% similarity]
src/skins/comments/hcg/skin_simple2.png [moved from src/skins/img/default/skin_simple2.png with 100% similarity]
src/skins/comments/hcg/skin_simple3.png [moved from src/skins/img/default/skin_simple3.png with 100% similarity]
src/skins/comments/hcg/skin_symbol.png [moved from src/skins/img/default/skin_symbol.png with 100% similarity]
src/skins/comments/material/.gitkeep [moved from src/skins/img/Re/.gitkeep with 100% similarity]
src/theme/hcg/.gitkeep [moved from src/theme/.gitkeep with 100% similarity]
src/theme/material/.gitkeep [moved from src/comment.sql with 100% similarity]

index a06f9f5..f5a1bbe 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
 # CommentGenerator-Re
-HTML5コメントジェネレーターRe
+HTML5コメントジェネレーターRe(未完成)
 
 ```
 [Warn] This repoligy is currently undergoing destructive changes. Until program configuration is available, pull requests and issues submitted may be ignored or rejected.
diff --git a/src/comment.json b/src/comment.json
new file mode 100644 (file)
index 0000000..9e26dfe
--- /dev/null
@@ -0,0 +1 @@
+{}
\ No newline at end of file
index 1079145..ca97dc4 100644 (file)
 <!DOCTYPE html>
 <html>
+
 <head>
     <meta charset="UTF-8">
     <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
-    <title>Hello World!</title>
+    <title>CommentGenerator-Re</title>
     <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
+    <style>
+        /*タブ切り替え全体のスタイル*/
+        .tabs {
+            margin-top: 50px;
+            padding-bottom: 40px;
+            background-color: #fff;
+            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
+            margin: 0 auto;
+            min-height: calc(100% - 40px);
+        }
+
+        /*タブのスタイル*/
+        .tab_item {
+            width: calc(100%/3);
+            height: 30px;
+            border-bottom: 3px solid #5ab4bd;
+            background-color: #d9d9d9;
+            line-height: 30px;
+            font-size: 12px;
+            text-align: center;
+            color: #565656;
+            display: block;
+            float: left;
+            text-align: center;
+            font-weight: bold;
+            transition: all 0.2s ease;
+        }
+
+        .tab_item:hover {
+            opacity: 0.75;
+        }
+
+        /*ラジオボタンを全て消す*/
+        input[name="tab_item"] {
+            display: none;
+        }
+
+        /*タブ切り替えの中身のスタイル*/
+        .tab_content {
+            display: none;
+            padding: 20px 20px 0;
+            clear: both;
+            overflow: hidden;
+        }
+
+
+        /*選択されているタブのコンテンツのみを表示*/
+        #setsumei:checked~#setsumei_content,
+        #kihon:checked~#kihon_content,
+        #shousai:checked~#shousai_content,
+        #risuna:checked~#risuna_content,
+        #hontai:checked~#hontai_content,
+        #maruti:checked~#maruti_content {
+            display: block;
+        }
+
+        /*選択されているタブのスタイルを変える*/
+        .tabs input:checked+.tab_item {
+            background-color: #5ab4bd;
+            color: #fff;
+        }
+    </style>
 </head>
+
 <body style="background: white;">
-    <h1>Hello World!</h1>
-    <p>
-        We are using Node.js <span id="node-version"></span>,
-        Chromium <span id="chrome-version"></span>,
-        and Electron <span id="electron-version"></span>.
-    </p>
-    <p>補足、このソフトを開いた直後に閉じるとエラーが起きます。ソフトウェアフレームワーク仕様なので修正はできません。(timerなんちゃらとか出てくるけど無視で....</p>
+    <div class="tabs">
+        <input id="setsumei" type="radio" name="tab_item" checked>
+        <label class="tab_item" for="setsumei">説明</label>
+        <input id="kihon" type="radio" name="tab_item">
+        <label class="tab_item" for="kihon">基本</label>
+        <input id="shousai" type="radio" name="tab_item">
+        <label class="tab_item" for="shousai">詳細</label>
+        <input id="risuna" type="radio" name="tab_item">
+        <label class="tab_item" for="risuna">リスナー</label>
+        <input id="hontai" type="radio" name="tab_item">
+        <label class="tab_item" for="hontai">本体</label>
+        <input id="maruti" type="radio" name="tab_item">
+        <label class="tab_item" for="maruti">マルチ</label>
+        <div class="tab_content" id="setsumei_content">
+            <h1>CommentGenerator-Re</h1>
+            <p>
+                We are using Node.js <span id="node-version"></span>,
+                Chromium <span id="chrome-version"></span>,
+                and Electron <span id="electron-version"></span>.
+            </p>
+            <p>補足、このソフトを開いた直後に閉じるとエラーが起きます。ソフトウェアフレームワーク仕様なので修正はできません。(timerなんちゃらとか出てくるけど無視で....</p>
+        </div>
+        <div class="tab_content" id="kihon_content">
+            kihonの内容がここに入ります
+        </div>
+        <div class="tab_content" id="shousai_content">
+            shousaiの内容がここに入ります
+        </div>
+        <div class="tab_content" id="risuna_content">
+            risunaの内容がここに入ります
+        </div>
+        <div class="tab_content" id="hontai_content">
+            hontaiの内容がここに入ります
+        </div>
+        <div class="tab_content" id="maruti_content">
+            marutiの内容がここに入ります
+        </div>
+    </div>
     <!--通知-->
     <script src="./renderer.js"></script>
 </body>
+
 </html>
\ No newline at end of file
index 1e5c49a..2e9aca7 100644 (file)
@@ -44,7 +44,7 @@ const template = Menu.buildFromTemplate([
   {
     label: 'ファイル',
     submenu: [
-      isMac ? {role:'close', label:'ウィンドウを閉じる'} : {role:'quit', label:'終了'}
+      isMac ? {role:'close', label:'ウィンドウを閉じる'} : {C}
     ]
   },
   {
@@ -123,8 +123,12 @@ const template = Menu.buildFromTemplate([
 function createWindow() {
   //ブラウザウィンドウを作成します。
   window = new BrowserWindow({
-    width: 800,
+    width: 400,
     height: 600,
+    minWidth: 400,
+    minHeight: 600,
+    maxWidth: 600,
+    maxHeight: 800,
     frame: false,
     webPreferences: {
       preload: path.join(__dirname, 'preload.js'),
@@ -157,7 +161,7 @@ app.whenReady().then(() => {/*
   })//*/
 }).then(() => {
   createWindow()// <-- function createWindow のやつを動かす。
-
+/*
   window.setProgressBar(0.555555555555,{mode:"paused"})
   setTimeout(() => {
     window.setProgressBar(0)
@@ -186,7 +190,7 @@ app.whenReady().then(() => {/*
       }, 2000)
     }, 2000)
   }, 2000)
-
+*/
   // このリスナーは、アプリケーションが起動した後に動きます。
   app.on('activate', () => {
 
@@ -224,89 +228,9 @@ const exampleMenuTemplate = () => [
     label: "Options",
     submenu: [
       {
-        label: "Quit",
+        label: `${app.name}を完全終了する`,
         click: () => app.quit()
-      },
-      {
-        label: "Radio1",
-        type: "radio",
-        checked: true
-      },
-      {
-        label: "Radio2",
-        type: "radio",
-      },
-      {
-        label: "Checkbox1",
-        type: "checkbox",
-        checked: true,
-        click: (item) => {
-          console.log("item is checked? " + item.checked);
-        }
-      },
-      {type: "separator"},
-      {
-        label: "Checkbox2",
-        type: "checkbox",
-        checked: false,
-        click: (item) => {
-          console.log("item is checked? " + item.checked);
-        }
-      },
-      {
-        label: "Radio Test",
-        submenu: [
-          {
-            label: "Sample Checkbox",
-            type: "checkbox",
-            checked: true
-          },
-          {
-            label: "Radio1",
-            checked: true,
-            type: "radio"
-          },
-          {
-            label: "Radio2",
-            type: "radio"
-          },
-          {
-            label: "Radio3",
-            type: "radio"
-          },
-          { type: "separator" },
-                      {
-            label: "Radio1",
-            checked: true,
-            type: "radio"
-          },
-          {
-            label: "Radio2",
-            type: "radio"
-          },
-          {
-            label: "Radio3",
-            type: "radio"
-          }
-        ]
-      },
-      {
-        label: "zoomIn",
-        role: "zoomIn"
-      },
-      {
-        label: "zoomOut",
-        role: "zoomOut"
-      },
-      {
-        label: "Radio1",
-        type: "radio"
-      },
-      {
-        label: "Radio2",
-        checked: true,
-        type: "radio"
-      },
+      }
     ]
   }
 ];
\ No newline at end of file
index c664f84..32b8bb7 100644 (file)
@@ -1,4 +1,6 @@
 ## MultiCommentViewer 互換性プラグイン
-.xmlファイルをSQL形式に変換し、コメントを一カ所にまとめるためにSQLに送信します。(予定ではsqlliteを使用します。)
+.xmlファイルを.json形式に変換し、コメントを一カ所にまとめるために「まとめるシステム(仮)」に送信します。
+
+.json形式は、Node.js及びelectronが扱いやすい形式です。
 
 理由: もし、他のコメント取得ソフトが登場した場合、MultiCommentViewerがまだプラットフォームに対応していないときなどに、コメントが別々にならないようにするためです。
\ No newline at end of file
index bcca39a..3a5ef3a 100644 (file)
@@ -1,66 +1,25 @@
 // Node.jsのすべてのAPIがプリロードプロセスで利用できます。
 // !Chrome の拡張機能と同じサンドボックスを持っています。
-
-
 const customTitlebar = require('custom-electron-titlebar');
 
 window.addEventListener('DOMContentLoaded', () => {
-/*
-  const menu = new Menu();
-menu.append(new MenuItem({
-       label: 'Item 1',
-       submenu: [
-               {
-                       label: 'Subitem 1',
-                       click: () => console.log('Click on subitem 1')
-               },
-               {
-                       type: 'separator'
-               }
-       ]
-}));
 
-menu.append(new MenuItem({
-       label: 'Item 2',
-       submenu: [
-               {
-                       label: 'Subitem checkbox',
-                       type: 'checkbox',
-                       checked: true
-               },
-               {
-                       type: 'separator'
-               },
-               {
-                       label: 'Subitem with submenu',
-                       submenu: [
-                               {
-                                       label: 'Submenu &item 1',
-                                       accelerator: 'Ctrl+T'
-                               }
-                       ]
-               }
-       ]
-}));
 
-new customTitlebar.Titlebar({
-  backgroundColor: customTitlebar.Color.fromHex('#444'),
-  menu: menu,
-});
-titlebar.updateBackground(new Color(new RGBA(0, 0, 0, .7)));
-*/
+       new customTitlebar.Titlebar({
+               backgroundColor: customTitlebar.Color.fromHex('#444'),
+       });
+       titlebar.updateBackground(new Color(new RGBA(0, 0, 0, .7)));
+
 
-new customTitlebar.Titlebar()
+       new customTitlebar.Titlebar()
 
-    const replaceText = (selector, text) => {
-      const element = document.getElementById(selector)
-      if (element) element.innerText = text
-    }
-  
-    for (const type of ['chrome', 'node', 'electron']) {
-      replaceText(`${type}-version`, process.versions[type])
-    }
-  })
+       const replaceText = (selector, text) => {
+               const element = document.getElementById(selector)
+               if (element) element.innerText = text
+       }
 
+       for (const type of ['chrome', 'node', 'electron']) {
+               replaceText(`${type}-version`, process.versions[type])
+       }
+})
 
-  
similarity index 100%
rename from src/theme/.gitkeep
rename to src/theme/hcg/.gitkeep
similarity index 100%
rename from src/comment.sql
rename to src/theme/material/.gitkeep