Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Dec 4, 2023
1 parent 19ca3bf commit 3323f7a
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 57 deletions.
14 changes: 7 additions & 7 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@
<body class="bg-gray-200">
<div class="bg-white">
<nav class="grid grid-cols-3 md:flex md:flex-row">
<button class="text-lg justify-center text-gray-600 py-1 px-1 block hover:text-violet-500 focus:outline-none text-violet-500 border-b-2 font-medium border-violet-500 flex">
<button class="text-lg justify-center text-gray-600 py-1 px-1 block hover:text-violet-500 focus:outline-none text-violet-500 border-b-2 font-medium border-violet-500 flex" style="margin-top: -0.125rem">
About
</button>
<button class="text-lg justify-center text-gray-600 py-1 px-1 block hover:text-indigo-500 focus:outline-none flex">
Use Cases
<button class="text-lg justify-center text-gray-600 py-1 px-1 block hover:text-indigo-500 focus:outline-none flex" style="margin-top: -0.125rem">
Cases
</button>
<button class="text-lg justify-center text-gray-600 py-1 px-1 block hover:text-blue-500 focus:outline-none flex">
<button class="text-lg justify-center text-gray-600 py-1 px-1 block hover:text-blue-500 focus:outline-none flex" style="margin-top: -0.125rem">
Solutions
</button>
<button class="text-lg justify-center text-gray-600 py-1 px-1 block hover:text-sky-500 focus:outline-none flex">
<button class="text-lg justify-center text-gray-600 py-1 px-1 block hover:text-sky-500 focus:outline-none flex" style="margin-top: -0.125rem">
Pricing
</button>
<button class="text-lg justify-center text-gray-600 py-1 px-1 block hover:text-cyan-500 focus:outline-none flex">
<button class="text-lg justify-center text-gray-600 py-1 px-1 block hover:text-cyan-500 focus:outline-none flex" style="margin-top: -0.125rem">
Resources
</button>
<div class="hidden md:inline md:grow"></div>
Expand All @@ -52,7 +52,7 @@
<svg class="mr-1" width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 6C8 3.79086 9.79086 2 12 2H17.5C19.9853 2 22 4.01472 22 6.5V17.5C22 19.9853 19.9853 22 17.5 22H12C9.79086 22 8 20.2091 8 18V17C8 16.4477 8.44772 16 9 16C9.55228 16 10 16.4477 10 17V18C10 19.1046 10.8954 20 12 20H17.5C18.8807 20 20 18.8807 20 17.5V6.5C20 5.11929 18.8807 4 17.5 4H12C10.8954 4 10 4.89543 10 6V7C10 7.55228 9.55228 8 9 8C8.44772 8 8 7.55228 8 7V6ZM12.2929 8.29289C12.6834 7.90237 13.3166 7.90237 13.7071 8.29289L16.7071 11.2929C17.0976 11.6834 17.0976 12.3166 16.7071 12.7071L13.7071 15.7071C13.3166 16.0976 12.6834 16.0976 12.2929 15.7071C11.9024 15.3166 11.9024 14.6834 12.2929 14.2929L13.5858 13L5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11L13.5858 11L12.2929 9.70711C11.9024 9.31658 11.9024 8.68342 12.2929 8.29289Z" fill="currentColor"/>
</svg>
Login
<span style="margin-top: -0.125rem">Login</span>
</button>
</nav>
</div>
Expand Down
16 changes: 8 additions & 8 deletions web/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,28 @@
<body class="bg-gray-200">
<div class="bg-white pb-2">
<nav class="grid grid-cols-3 md:flex md:flex-row">
<button class="justify-center text-gray-600 py-1 px-1 text-lg block hover:text-violet-500 focus:outline-none flex"
<button class="justify-center text-gray-600 py-1 px-1 text-lg block hover:text-violet-500 focus:outline-none flex" style="margin-top: -0.125rem"
onclick="window.location.assign('index.html')">
About
</button>
<button class="justify-center text-gray-600 py-1 px-1 text-lg block hover:text-indigo-500 focus:outline-none flex">
Use Cases
<button class="justify-center text-gray-600 py-1 px-1 text-lg block hover:text-indigo-500 focus:outline-none flex" style="margin-top: -0.125rem">
Cases
</button>
<button class="justify-center text-gray-600 py-1 px-1 text-lg block hover:text-blue-500 focus:outline-none flex">
<button class="justify-center text-gray-600 py-1 px-1 text-lg block hover:text-blue-500 focus:outline-none flex" style="margin-top: -0.125rem">
Solutions
</button>
<button class="justify-center text-gray-600 py-1 px-1 text-lg block hover:text-sky-500 focus:outline-none flex">
<button class="justify-center text-gray-600 py-1 px-1 text-lg block hover:text-sky-500 focus:outline-none flex" style="margin-top: -0.125rem">
Pricing
</button>
<button class="justify-center text-gray-600 py-1 px-1 text-lg block hover:text-cyan-500 focus:outline-none flex">
<button class="justify-center text-gray-600 py-1 px-1 text-lg block hover:text-cyan-500 focus:outline-none flex" style="margin-top: -0.125rem">
Resources
</button>
<div class="hidden md:inline md:grow"></div>
<button class="justify-center text-teal-600 py-1 px-2 text-lg block hover:text-teal-500 focus:outline-none flex border-b-2 font-medium border-teal-500">
<svg class="mr-1" width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 6C8 3.79086 9.79086 2 12 2H17.5C19.9853 2 22 4.01472 22 6.5V17.5C22 19.9853 19.9853 22 17.5 22H12C9.79086 22 8 20.2091 8 18V17C8 16.4477 8.44772 16 9 16C9.55228 16 10 16.4477 10 17V18C10 19.1046 10.8954 20 12 20H17.5C18.8807 20 20 18.8807 20 17.5V6.5C20 5.11929 18.8807 4 17.5 4H12C10.8954 4 10 4.89543 10 6V7C10 7.55228 9.55228 8 9 8C8.44772 8 8 7.55228 8 7V6ZM12.2929 8.29289C12.6834 7.90237 13.3166 7.90237 13.7071 8.29289L16.7071 11.2929C17.0976 11.6834 17.0976 12.3166 16.7071 12.7071L13.7071 15.7071C13.3166 16.0976 12.6834 16.0976 12.2929 15.7071C11.9024 15.3166 11.9024 14.6834 12.2929 14.2929L13.5858 13L5 13C4.44772 13 4 12.5523 4 12C4 11.4477 4.44772 11 5 11L13.5858 11L12.2929 9.70711C11.9024 9.31658 11.9024 8.68342 12.2929 8.29289Z" fill="currentColor"/>
</svg>
Login
<span style="margin-top: -0.125rem">Login</span>
</button>
</nav>
<main>
Expand Down Expand Up @@ -88,7 +88,7 @@
</div>
</div>

<div class="pt-2 px-2 text-right">
<div class="px-2 text-right">
Telegram
</div>
<div class="max-w-[200px] col-span-2 md:col-span-1 h-[32px]">
Expand Down
6 changes: 3 additions & 3 deletions web/pub.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@
<nav class="flex flex-row">
<button class="text-gray-600 py-1 px-1 block hover:text-indigo-500 focus:outline-none text-indigo-500 border-b-2 font-medium border-indigo-500 flex text-lg">
<svg class="mr-1" width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 17a1 1 0 1 1 2 0v1.077c0 .76-.082 1.185-.319 1.627a2.363 2.363 0 0 1-.977.977c-.442.237-.867.319-1.627.319H5.923c-.76 0-1.185-.082-1.627-.319a2.363 2.363 0 0 1-.978-.977C3.082 19.262 3 18.838 3 18.077L2.999 6.5A2.5 2.5 0 0 1 5.502 4l1.5.005a1 1 0 1 1-.005 2L5.499 6a.5.5 0 0 0-.5.5v11.577c0 .459.023.57.083.684.038.07.087.12.157.157.113.06.225.082.684.082h11.154c.459 0 .57-.022.684-.082a.363.363 0 0 0 .157-.157c.06-.113.082-.225.082-.684V17zm4-4a1 1 0 1 1-2 0 9 9 0 0 0-9-9 1 1 0 1 1 0-2c6.075 0 11 4.925 11 11zm-4 0a1 1 0 1 1-2 0 5 5 0 0 0-5-5 1 1 0 1 1 0-2 7 7 0 0 1 7 7zm-4 0a1 1 0 1 1-2 0 1 1 0 0 0-1-1 1 1 0 1 1 0-2 3 3 0 0 1 3 3z" fill="currentColor"/></svg>
Pub
<span style="margin-top: -0.125rem">Pub</span>
</button>
<button class="text-gray-600 py-1 px-1 block hover:text-sky-500 focus:outline-none flex text-lg"
onclick="window.location.assign('sub.html')">
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 20.5H10C9.80189 20.4974 9.61263 20.4176 9.47253 20.2775C9.33244 20.1374 9.25259 19.9481 9.25 19.75V12L3.9 4.69C3.81544 4.58007 3.76395 4.44832 3.75155 4.31018C3.73915 4.17204 3.76636 4.03323 3.83 3.91C3.89375 3.78712 3.98984 3.68399 4.10792 3.61173C4.226 3.53947 4.36157 3.50084 4.5 3.5H19.5C19.6384 3.50084 19.774 3.53947 19.8921 3.61173C20.0101 3.68399 20.1062 3.78712 20.17 3.91C20.2336 4.03323 20.2608 4.17204 20.2484 4.31018C20.236 4.44832 20.1846 4.58007 20.1 4.69L14.75 12V19.75C14.7474 19.9481 14.6676 20.1374 14.5275 20.2775C14.3874 20.4176 14.1981 20.4974 14 20.5ZM10.75 19H13.25V11.75C13.2492 11.5907 13.302 11.4357 13.4 11.31L18 5H6L10.62 11.31C10.718 11.4357 10.7708 11.5907 10.77 11.75L10.75 19Z" fill="currentColor"/>
</svg>
Sub
<span style="margin-top: -0.125rem">Sub</span>
</button>
<div class="grow"></div>
<button class="text-gray-600 py-1 px-2 block hover:text-gray-500 focus:outline-none flex text-lg"
onclick="logout()">
<svg class="mr-1" width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 6.5C2 4.01472 4.01472 2 6.5 2H12C14.2091 2 16 3.79086 16 6V7C16 7.55228 15.5523 8 15 8C14.4477 8 14 7.55228 14 7V6C14 4.89543 13.1046 4 12 4H6.5C5.11929 4 4 5.11929 4 6.5V17.5C4 18.8807 5.11929 20 6.5 20H12C13.1046 20 14 19.1046 14 18V17C14 16.4477 14.4477 16 15 16C15.5523 16 16 16.4477 16 17V18C16 20.2091 14.2091 22 12 22H6.5C4.01472 22 2 19.9853 2 17.5V6.5ZM18.2929 8.29289C18.6834 7.90237 19.3166 7.90237 19.7071 8.29289L22.7071 11.2929C23.0976 11.6834 23.0976 12.3166 22.7071 12.7071L19.7071 15.7071C19.3166 16.0976 18.6834 16.0976 18.2929 15.7071C17.9024 15.3166 17.9024 14.6834 18.2929 14.2929L19.5858 13L11 13C10.4477 13 10 12.5523 10 12C10 11.4477 10.4477 11 11 11L19.5858 11L18.2929 9.70711C17.9024 9.31658 17.9024 8.68342 18.2929 8.29289Z" fill="currentColor"/>
</svg>
Exit
<span style="margin-top: -0.125rem">Exit</span>
</button>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ input[type=checkbox] {
input[type=text] {
display: flex;
flex-grow: 1;
min-width: 64px;
width: 64px;
height: 20px;
border-color: #94a3b8;
border-width: 1px;
Expand Down
20 changes: 14 additions & 6 deletions web/sub-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,23 @@
</head>
<body onload="loadSubscription()">

<div id="sub_new" class="m-2 flex-1 flex flex-col" style="display: flex">
<p class="text-lg">Subscription Details</p>
<div id="sub_new" class="m-2 flex-1 flex flex-col space-y-1">
<div class="text-lg flex">
<button onclick="window.location.assign('sub.html')">
<svg width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<polyline id="Right-2" data-name="Right" points="7.6 7 2.5 12 7.6 17" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<line x1="21.5" y1="12" x2="4.8" y2="12" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</svg>
</button>
<span class="ml-2">Subscription Details</span>
</div>
<div class="flex">
<span class="pt-1">Id</span>
<span id="subId" class="ml-1 pt-1 font-mono"></span>
<span>Id</span>
<span id="subId" class="ml-2 font-mono text-sm"></span>
</div>
<div class="flex">
<label class="pt-1">Description</label>
<input type="text" id="subDescr" class="ml-1">
<label style="padding-top: 0.125rem">Description</label>
<input type="text" id="subDescr" class="ml-2">
</div>
<form class="space-y-2">
<div class="container">
Expand Down
58 changes: 29 additions & 29 deletions web/sub-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,34 @@ function loadSubscription() {
const id = urlParams.get("id");
document.getElementById("subId").innerHTML = urlParams.get("id");
//
// const data = {"description":"Exoplanets","enabled":true,"cond":{"gc":{"logic":"Or","group":[{"tc":{"id":"txt_651f009c25fef58d2c176c06","term":"exoplanet экзопланета экзопланет экзопланеты экзопланету"}},{"gc":{"group":[{"tc":{"id":"txt_651f009c25fef58d2c176c13","term":"planet"}},{"tc":{"id":"txt_651f009c25fef58d2c176c27","term":"extrasolar"}}]}}]}},"expires":"0001-01-01T00:00:00Z"};
// editor.setValue(data.cond);
const data = {"description":"Exoplanets","enabled":true,"cond":{"gc":{"logic":"Or","group":[{"tc":{"id":"txt_651f009c25fef58d2c176c06","term":"exoplanet экзопланета экзопланет экзопланеты экзопланету"}},{"gc":{"group":[{"tc":{"id":"txt_651f009c25fef58d2c176c13","term":"planet"}},{"tc":{"id":"txt_651f009c25fef58d2c176c27","term":"extrasolar"}}]}}]}},"expires":"0001-01-01T00:00:00Z"};
editor.setValue(data.cond);
//
let authToken = sessionStorage.getItem("authToken");
let userId = sessionStorage.getItem("userId");
let optsReq = {
method: "GET",
headers: {
"Authorization": `Bearer ${authToken}`,
"X-Awakari-Group-Id": defaultGroupId,
"X-Awakari-User-Id": userId,
},
cache: "default",
}
fetch(`/v1/sub/${id}`, optsReq)
.then(resp => {
if (!resp.ok) {
throw new Error(`Request failed with status: ${resp.status}`);
}
return resp.json();
})
.then(data => {
if (data != null) {
document.getElementById("subDescr").value = data.description;
editor.setValue(data.cond);
}
})
.catch(err => {
alert(err);
});
// let authToken = sessionStorage.getItem("authToken");
// let userId = sessionStorage.getItem("userId");
// let optsReq = {
// method: "GET",
// headers: {
// "Authorization": `Bearer ${authToken}`,
// "X-Awakari-Group-Id": defaultGroupId,
// "X-Awakari-User-Id": userId,
// },
// cache: "default",
// }
// fetch(`/v1/sub/${id}`, optsReq)
// .then(resp => {
// if (!resp.ok) {
// throw new Error(`Request failed with status: ${resp.status}`);
// }
// return resp.json();
// })
// .then(data => {
// if (data != null) {
// document.getElementById("subDescr").value = data.description;
// editor.setValue(data.cond);
// }
// })
// .catch(err => {
// alert(err);
// });
}
6 changes: 3 additions & 3 deletions web/sub.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@
<button class="text-gray-600 py-1 px-1 block hover:text-indigo-500 focus:outline-none flex text-lg"
onclick="window.location.assign('pub.html')">
<svg class="mr-1" width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 17a1 1 0 1 1 2 0v1.077c0 .76-.082 1.185-.319 1.627a2.363 2.363 0 0 1-.977.977c-.442.237-.867.319-1.627.319H5.923c-.76 0-1.185-.082-1.627-.319a2.363 2.363 0 0 1-.978-.977C3.082 19.262 3 18.838 3 18.077L2.999 6.5A2.5 2.5 0 0 1 5.502 4l1.5.005a1 1 0 1 1-.005 2L5.499 6a.5.5 0 0 0-.5.5v11.577c0 .459.023.57.083.684.038.07.087.12.157.157.113.06.225.082.684.082h11.154c.459 0 .57-.022.684-.082a.363.363 0 0 0 .157-.157c.06-.113.082-.225.082-.684V17zm4-4a1 1 0 1 1-2 0 9 9 0 0 0-9-9 1 1 0 1 1 0-2c6.075 0 11 4.925 11 11zm-4 0a1 1 0 1 1-2 0 5 5 0 0 0-5-5 1 1 0 1 1 0-2 7 7 0 0 1 7 7zm-4 0a1 1 0 1 1-2 0 1 1 0 0 0-1-1 1 1 0 1 1 0-2 3 3 0 0 1 3 3z" fill="currentColor"/></svg>
Pub
<span style="margin-top: -0.125rem">Pub<span>
</button>
<button class="text-gray-600 py-1 px-1 block hover:text-sky-500 focus:outline-none text-sky-500 border-b-2 font-medium border-sky-500 flex text-lg">
<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14 20.5H10C9.80189 20.4974 9.61263 20.4176 9.47253 20.2775C9.33244 20.1374 9.25259 19.9481 9.25 19.75V12L3.9 4.69C3.81544 4.58007 3.76395 4.44832 3.75155 4.31018C3.73915 4.17204 3.76636 4.03323 3.83 3.91C3.89375 3.78712 3.98984 3.68399 4.10792 3.61173C4.226 3.53947 4.36157 3.50084 4.5 3.5H19.5C19.6384 3.50084 19.774 3.53947 19.8921 3.61173C20.0101 3.68399 20.1062 3.78712 20.17 3.91C20.2336 4.03323 20.2608 4.17204 20.2484 4.31018C20.236 4.44832 20.1846 4.58007 20.1 4.69L14.75 12V19.75C14.7474 19.9481 14.6676 20.1374 14.5275 20.2775C14.3874 20.4176 14.1981 20.4974 14 20.5ZM10.75 19H13.25V11.75C13.2492 11.5907 13.302 11.4357 13.4 11.31L18 5H6L10.62 11.31C10.718 11.4357 10.7708 11.5907 10.77 11.75L10.75 19Z" fill="currentColor"/>
</svg>
Sub
<span style="margin-top: -0.125rem">Sub</span>
</button>
<div class="grow"></div>
<button class="text-gray-600 py-1 px-2 block hover:text-gray-500 focus:outline-none flex text-lg"
onclick="logout()">
<svg class="mr-1" width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 6.5C2 4.01472 4.01472 2 6.5 2H12C14.2091 2 16 3.79086 16 6V7C16 7.55228 15.5523 8 15 8C14.4477 8 14 7.55228 14 7V6C14 4.89543 13.1046 4 12 4H6.5C5.11929 4 4 5.11929 4 6.5V17.5C4 18.8807 5.11929 20 6.5 20H12C13.1046 20 14 19.1046 14 18V17C14 16.4477 14.4477 16 15 16C15.5523 16 16 16.4477 16 17V18C16 20.2091 14.2091 22 12 22H6.5C4.01472 22 2 19.9853 2 17.5V6.5ZM18.2929 8.29289C18.6834 7.90237 19.3166 7.90237 19.7071 8.29289L22.7071 11.2929C23.0976 11.6834 23.0976 12.3166 22.7071 12.7071L19.7071 15.7071C19.3166 16.0976 18.6834 16.0976 18.2929 15.7071C17.9024 15.3166 17.9024 14.6834 18.2929 14.2929L19.5858 13L11 13C10.4477 13 10 12.5523 10 12C10 11.4477 10.4477 11 11 11L19.5858 11L18.2929 9.70711C17.9024 9.31658 17.9024 8.68342 18.2929 8.29289Z" fill="currentColor"/>
</svg>
Exit
<span style="margin-top: -0.125rem">Exit</span>
</button>
</nav>
<main class="py-2 mr-2">
Expand Down
10 changes: 10 additions & 0 deletions web/tailwind.output.css
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,10 @@ video {
margin-right: -0.25rem;
}

.-mt-1 {
margin-top: -0.25rem;
}

.-mt-4 {
margin-top: -1rem;
}
Expand Down Expand Up @@ -942,6 +946,12 @@ video {
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
}

.space-y-1 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
}

.space-y-2 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
Expand Down

0 comments on commit 3323f7a

Please sign in to comment.