-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
3,336 additions
and
445 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "sandbox", | ||
"version": "1.0.0", | ||
"description": "1. django 4.2", | ||
"main": "index.js", | ||
"directories": { | ||
"doc": "docs" | ||
}, | ||
"scripts": { | ||
"dev": "webpack --watch --mode development", | ||
"prod": "webpack --watch --mode production" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/lissa3/medsbox.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/lissa3/medsbox/issues" | ||
}, | ||
"homepage": "https://github.com/lissa3/medsbox#readme", | ||
"devDependencies": { | ||
"css-loader": "^6.8.1", | ||
"style-loader": "^3.3.3", | ||
"webpack": "^5.89.0", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"dependencies": { | ||
"bootstrap": "^5.3.2", | ||
"htmx.org": "^1.9.8" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.circle{ | ||
width:270px; | ||
height:270px; | ||
border-radius:50%; | ||
} | ||
.circle-left{ | ||
background:#ea605529; | ||
/* overflow:hidden; */ | ||
position:relative; | ||
} | ||
.circle-right{ | ||
background:#bacdcb63; | ||
right:-80%; | ||
position:absolute; | ||
} | ||
@media only screen and (max-width: 600px) { | ||
.circle{ | ||
max-width: 150px; | ||
max-height: 150px; | ||
} | ||
} | ||
.image-style-align-left{ | ||
float:left; | ||
margin-right: 10px; | ||
} | ||
.image-style-align-right{ | ||
float:right; | ||
margin-left: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
div.breadcrumbs { | ||
background:#765037; | ||
} | ||
|
||
module h2, .module caption, .inline-group h2 { | ||
background: #765037; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,4 @@ | |
height: 250px; | ||
width: 250px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@import 'bootstrap/dist/css/bootstrap.min.css'; | ||
@import "./sidebars.css"; | ||
@import "./categs.css"; | ||
@import "./styles.css"; | ||
@import "./search.css"; | ||
@import "./editor.css"; | ||
@import "./comments.css"; | ||
@import "./home.css"; | ||
@import "./creation.css"; | ||
@import "./custom_admin.css"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { getCookie } from "./utils"; | ||
// bookmarks | ||
const jsBox = document.getElementById("jsBox"); | ||
const bmarkDiv = document.getElementById("bmarkDiv"); | ||
const formBook = document.querySelector("#bookmark"); | ||
if(bmarkDiv){ | ||
const fd = new FormData(); | ||
fd.append("csrfmiddlewaretoken",getCookie("csrftoken")) | ||
formBook.addEventListener("submit",(e)=>{ | ||
e.preventDefault(); | ||
const url = formBook.getAttribute("action"); | ||
fd.append("post_uuid",formBook.post_uuid.value), | ||
fd.append("user_id",formBook.user_id.value) | ||
fetch(url,{ | ||
method:"POST", | ||
headers:{ "x-requested-with": "XMLHttpRequest"}, | ||
body:fd | ||
}).then((resp)=>resp.json()) | ||
.then((data)=>{ | ||
if(data.status_code ===200){ | ||
let msg = data.msg; | ||
jsBox.classList.add("green","slide"); | ||
jsBox.textContent= msg; | ||
if(data.del_button){ | ||
bmarkDiv.remove(); | ||
} | ||
} | ||
else if(data.status_code ===404){ | ||
// add error flash msg | ||
jsBox.classList.add("red","slide"); | ||
jsBox.textContent= "Failed to add to bookmarks"; | ||
throw new Error(message="Failed to add to bookmarks"); | ||
} | ||
}) | ||
.catch((err)=>{ | ||
console.log(err["message"]); | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//click button Categories-> toggle categs | ||
document.addEventListener('click',(e)=>{ | ||
let isCategBut = e.target.matches("[data-dropdown-but]"); | ||
if(!isCategBut&&e.target.closest("[data-dropdown]")!=null){ | ||
return | ||
} | ||
if(isCategBut){ | ||
// click button will show<->hide all categories | ||
const but = document.getElementById("show-cats") | ||
const ulMenu = document.querySelector(".root-cats"); | ||
if(!but.classList.contains('hide')){ | ||
but.classList.add("hide") | ||
but.innerHTML="Show Categories"; | ||
ulMenu.classList.remove("to-show") | ||
}else{ | ||
but.classList.remove('hide') | ||
but.innerHTML="Hide categories"; | ||
ulMenu.classList.add("to-show"); | ||
} | ||
} | ||
}); | ||
// help func to outroll (sub)categs; | ||
//maybe: custom click event(?) | ||
// by now: mouseover -> outroll categs; click -> make request | ||
let catSideBar = document.querySelector(".root-cats"); | ||
if(catSideBar){ | ||
catSideBar.addEventListener("mouseover",(e)=>{ | ||
const isDropDownLink = e.target.matches('[data-dropdown-link]'); | ||
if(!isDropDownLink&&e.target.closest("[data-li]")!=null){ | ||
return | ||
} | ||
if(isDropDownLink){ | ||
// get ul children (sibling "a" tag enbed in "li") | ||
let currentDropDown = e.target.nextElementSibling; | ||
// e.target is a a tag node-link to-toggle | ||
currentDropDown.classList.add("to-block"); | ||
} | ||
}) | ||
} | ||
|
Oops, something went wrong.