Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
gigamaster committed Oct 28, 2024
1 parent 0793b9e commit 7f44bff
Show file tree
Hide file tree
Showing 19 changed files with 745 additions and 978 deletions.
48 changes: 40 additions & 8 deletions app/asset/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ document.addEventListener('alpine:init', () => {
currentIndex: -1,
init() {
// Initialize data
fetch('https://gigamaster.github.io/codemo/asset/sourceData.json')
.then(res => res.json())
.then(data => this.data = data.data);
fetch('./search.json')
.then(res => res.json())
.then(data => this.data = data.data);
},
showSearchBar() {
this.show = true;
Expand All @@ -113,8 +113,10 @@ document.addEventListener('alpine:init', () => {
// Return filtered items if query is not empty
// then return the items which includes query string
return this.query && this.data.filter(item => {
const page_name = item.page_title + "—" + item.page_desc
return page_name.toLowerCase().includes(this.query.toLowerCase())
const page_name = item.page_title + "—" + item.page_desc + item.page_cat
return page_name
.toLowerCase()
.includes(this.query.toLowerCase())
})
},
previous() {
Expand Down Expand Up @@ -190,7 +192,26 @@ document.addEventListener('alpine:init', () => {
}
}))
})

function alpineInstance() {
return {
intro: 'Available Web applications and <b class="text-gray-400">tools</b> that run in the browser',
apps: [],
}
}
document.addEventListener('DOMContentLoaded', function(event) {
fetch('./modal-launcher.html')
.then(function (response) {
return response.text()
})
.then(function (html) {
console.info('Modal content has been fetched');
loadData(html, '#modal-launcher').then(function (html) {
//console.info('Pin content callback');
})
}).catch((error) => {
console.log(error);
})
});
/*
Usage Example:
openWithSelfMain('https://example.com','Example Title','960','540');
Expand Down Expand Up @@ -220,8 +241,19 @@ function openWithSelfMain(url, title, w, h) {
}

/* global LinkPreviewer */
const linkPreviewer = new LinkPreviewer();
linkPreviewer.attach('td a.preview');
document.addEventListener("DOMContentLoaded", function() {
function tester() {
if (solved) {
let linkPreviewer = new LinkPreviewer();
linkPreviewer.attach('td a.preview');
alert('it worked');
} else {
alert('Did not work');
}
}
});
var solved = true;


/* GitHub Fetch Repo Commits */
function commitsData() {
Expand Down
5 changes: 4 additions & 1 deletion app/asset/css/icons.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 6 additions & 61 deletions app/asset/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,67 +162,7 @@ height: 22px;
--tw-ring-offset-shadow:0 0 #0000;
--tw-ring-shadow:0 0 #0000;
--tw-shadow:0 0 #0000}
/* SVG ICONS */
[class^="icon"] {
background-color:currentColor;
display:inline-block;
width:1em;
height:1em;
mask-image:var(--svg);
mask-repeat:no-repeat;
mask-size:100% 100%;
vertical-align:-.175em;}
.icon-alert{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='m21.73 18l-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4m0 4h.01'/%3E%3C/svg%3E");
}
.icon-app{
--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Crect width='9' height='9' x='2' y='2' fill='%23000' rx='1'/%3E%3Crect width='9' height='9' x='2' y='13' fill='%23000' opacity='0.5' rx='1'/%3E%3Crect width='9' height='9' x='13' y='2' fill='%23000' opacity='0.5' rx='1'/%3E%3Crect width='9' height='9' x='13' y='13' fill='%23000' opacity='0.5' rx='1'/%3E%3C/svg%3E");
}
.icon-bookmark{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linejoin='round' stroke-width='1' d='M6 20V5a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v15l-6-3z'/%3E%3C/svg%3E");
}
.icon-close{
--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-width='2' d='M12 21a9 9 0 1 1 0-18a9 9 0 0 1 0 18zM9 9l6 6m0-6l-6 6'/%3E%3C/svg%3E");
}
.icon-construction{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1'%3E%3Crect width='20' height='8' x='2' y='6' rx='1'/%3E%3Cpath d='M17 14v7M7 14v7M17 3v3M7 3v3m3 8L2.3 6.3M14 6l7.7 7.7M8 6l8 8'/%3E%3C/g%3E%3C/svg%3E");
}
.icon-dataviz{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='M12 9v2m4 0V7m-8 4h.01M3 3h1m17 0h-1m0 0v12h-6m6-12H4m0 0v12h6m0 0l-2 6m2-6h4m0 0l2 6'/%3E%3C/svg%3E");
}
.icon-design-tools{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='M13 7L8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13m1-7l2-2m8 12l2-2m-3-3l4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4'/%3E%3C/svg%3E");
}
.icon-download2{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='m11.5 7l-4 4l-4-4H6V1h3v6zm-4 4H0v4h15v-4zm6.5 2h-2v-1h2z'/%3E%3C/svg%3E");
}
.icon-download{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5l5-5m-5-7v12'/%3E%3C/svg%3E");
}
.icon-draft{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1'%3E%3Cpath d='m12.99 6.74l1.93 3.44M19.136 12a10 10 0 0 1-14.271 0M21 21l-2.16-3.84M3 21l8.02-14.26'/%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3C/g%3E%3C/svg%3E");
}
.icon-edit{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='M4 20h4L18.5 9.5a2.828 2.828 0 1 0-4-4L4 16zm9.5-13.5l4 4'/%3E%3C/svg%3E");
}
.icon-notebook{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='1'%3E%3Crect width='13' height='17' x='6' y='4' rx='2'/%3E%3Cpath stroke-linecap='round' d='M15 10V8M4 9h4m-4 4h4m-4 4h4'/%3E%3C/g%3E%3C/svg%3E");
}
.icon-search{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21l-4.3-4.3'/%3E%3C/g%3E%3C/svg%3E");
}
.icon-share{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M12 3a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-2 1a2 2 0 1 1 .491 1.313L5.956 7.581a2 2 0 0 1 0 .838l4.535 2.268a2 2 0 1 1-.447.894L5.508 9.313a2 2 0 1 1 0-2.627l4.536-2.267A2 2 0 0 1 10 4M3 8a1 1 0 1 0 2 0a1 1 0 0 0-2 0m8 4a1 1 0 1 0 2 0a1 1 0 0 0-2 0'/%3E%3C/svg%3E");
}
.icon-updir{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23000' d='M19 9v7h-3v-6H6v3L1 8.5L6 4v3h11c1.104 0 2 .897 2 2'/%3E%3C/svg%3E");
}
.icon-view2{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23000' d='M.2 10a11 11 0 0 1 19.6 0A11 11 0 0 1 .2 10m9.8 4a4 4 0 1 0 0-8a4 4 0 0 0 0 8m0-2a2 2 0 1 1 0-4a2 2 0 0 1 0 4'/%3E%3C/svg%3E");
}
.icon-view{
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1'%3E%3Cpath d='M10 12a2 2 0 1 0 4 0a2 2 0 0 0-4 0'/%3E%3Cpath d='M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6'/%3E%3C/g%3E%3C/svg%3E");
}

/* background - border */
.backdrop-blur-sm {
--tw-backdrop-blur: blur(4px);
Expand Down Expand Up @@ -269,6 +209,7 @@ vertical-align:-.175em;}
.flex-col{flex-direction:column}
.flex-row{flex-direction:row}
.flex-nowrap{flex-wrap:nowrap}
.flex-wrap{flex-wrap:wrap}
.flex-1{flex:1 1 0%}
.flex-shrink-0{flex-shrink:0}
.gap-1{gap: 0.25rem;}
Expand Down Expand Up @@ -300,6 +241,7 @@ vertical-align:-.175em;}
.mb-6{margin-bottom:1.5rem}
.ml-2{margin-left:.5rem}
.ml-3{margin-left:.75rem}
.ml-4{margin-left:1rem}
.ml-auto{margin-left:auto}
.mt-1{margin-top:.25rem} /* no */
.mt-2{margin-top:.5rem}
Expand Down Expand Up @@ -354,6 +296,7 @@ vertical-align:-.175em;}
/* height - width */
.h-screen{height:100vh}
.h-full{height:100%}
.h-3\/4{height: 75%;}
.h-5{height:1.25rem}
.h-4{height:1rem}
.h-8{height:2rem}
Expand All @@ -367,6 +310,8 @@ vertical-align:-.175em;}
.max-w-xs{max-width:18rem}
.max-w-xl{max-width: 36rem;} /* 576px */
.max-w-5xl{max-width: 64rem;} /* 1024px */
.w-1\/5{width: 20%;}
.w-1\/4{width: 25%;}
.w-3\/4 {width: 75%;}
.w-4{width:1rem}
.w-5{width:1.25rem}
Expand Down
Loading

0 comments on commit 7f44bff

Please sign in to comment.