diff --git a/.gitignore b/.gitignore index fc13bef..18c426d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -css/style.css.map \ No newline at end of file +css/style.css.map +css/style.css \ No newline at end of file diff --git a/Archives/v1.html b/Archives/v1.html new file mode 100644 index 0000000..227371e --- /dev/null +++ b/Archives/v1.html @@ -0,0 +1,17 @@ + + + + + + STM Constitution V1 + + + + + + + + + + + diff --git a/Archives/v2.html b/Archives/v2.html new file mode 100644 index 0000000..4ae3005 --- /dev/null +++ b/Archives/v2.html @@ -0,0 +1,17 @@ + + + + + + STM Constitution V1 + + + + + + + + + + + diff --git a/README.md b/README.md index 959f218..3fdc2b3 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ To use OpenCodeLaw, follow these steps: @@ -32,7 +32,7 @@ To use OpenCodeLaw, follow these steps: - + ``` diff --git a/acts/First_Constitution_Amendment_Act_2024.pdf b/acts/First_Constitution_Amendment_Act_2024.pdf new file mode 100644 index 0000000..07aa012 Binary files /dev/null and b/acts/First_Constitution_Amendment_Act_2024.pdf differ diff --git a/acts/Second Constitution Amendment Act,2024.pdf b/acts/Second Constitution Amendment Act,2024.pdf new file mode 100644 index 0000000..1082a0d Binary files /dev/null and b/acts/Second Constitution Amendment Act,2024.pdf differ diff --git a/acts/Third Constitution Amendment Act,2024.pdf b/acts/Third Constitution Amendment Act,2024.pdf new file mode 100644 index 0000000..3694891 Binary files /dev/null and b/acts/Third Constitution Amendment Act,2024.pdf differ diff --git a/css/style.css b/css/style.css deleted file mode 100644 index 4f33f7b..0000000 --- a/css/style.css +++ /dev/null @@ -1,299 +0,0 @@ -@charset "UTF-8"; -@font-face { - font-family: "montserrat"; - src: url("../assets/fonts/Montserrat.ttf") format("ttf"); - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: "cuprumregular"; - src: url("../assets/fonts/cuprum-variablefont_wght-webfont.woff") format("woff2"), url("../assets/fonts/cuprum-variablefont_wght-webfont.woff") format("woff"); - font-weight: normal; - font-style: normal; -} -/* Define other theme-related styles here */ -* { - margin: 0; - padding: 0; - transition: all 0.6s; -} - -body { - background-color: #f5f5f5; - font-family: "montserrat"; -} - -.nav { - background-color: #f5f5f5; - padding: 10px 0; - margin-bottom: 20px; - border-radius: 5px; - margin: auto 2em; - padding: 2em; - position: relative; - box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.18); - /* Define styles for the toggle switch */ -} -.nav a { - color: #000; - text-decoration: none; - font-weight: bold; - text-align: center; -} -.nav a:hover { - color: #000; - text-decoration: underline; -} -.nav a .title-wrap { - display: flex; - justify-content: center; - align-items: center; -} -.nav a .title-wrap img { - width: 45px; - border-radius: 50%; - margin: 0 1em; -} -.nav a .title-wrap h1 { - font-family: "montserrat"; - font-size: 20px; - text-align: center; -} -.nav .toggle-container { - position: absolute; - top: 10px; - right: 10px; - display: flex; - align-items: center; -} -.nav .toggle-label { - margin-right: 10px; - font-family: "montserrat"; -} -.nav #theme-toggle { - visibility: hidden; -} -.nav .toggle-switch { - position: relative; - display: inline-block; - width: 55px; - height: 22px; - border: 1px solid black; - background-color: #ccc; - border-radius: 20px; -} -.nav .slider { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - line-height: 0; - background-color: yellow; - border-radius: 20px; - transition: 0.5s; -} -.nav .slider:before { - content: "🌑"; /* Default to Dark theme emoji */ - position: absolute; - transform: translateX(5px); - top: 50%; - left: 0; - transform: translate(0, -50%); - transition: all 0.6s ease; -} -.nav input:checked + .slider { - background-color: #fff; -} -.nav input:checked + .slider:before { - content: "☀️"; /* Change to Light theme emoji when checked */ - left: calc(100% - 0px); - transform: translate(-100%, -50%); -} -.nav input:focus + .slider { - box-shadow: 0 0 1px #fff; -} - -main { - margin: 2em; - display: flex; -} -main .vertical-nav { - background-color: #f5f5f5; - box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.18); - border-radius: 5px; - margin-right: 2em; - padding: 2em; - min-width: 180px; - height: calc(100vh - 0px); - top: 0; - position: sticky; -} -main .vertical-nav .nav-content { - display: flex; - align-items: center; -} -main .vertical-nav .nav-content img { - width: 5em; - height: 4.2em; - position: relative; - right: 1.5em; -} -main .vertical-nav .nav-content h2 { - font-family: "montserrat"; - position: relative; - right: 1.5em; - color: #333; - font-size: 18px; - font-style: normal; - font-weight: 700; - line-height: normal; -} -main .vertical-nav .nav-ul li.nav-list { - list-style: none; - color: #333; - font-size: 15px; - font-style: normal; - font-weight: 500; - line-height: normal; - margin: 0.6em 0; -} -main .vertical-nav .nav-ul li.nav-list a { - text-decoration: none; - color: #333; -} -main .vertical-nav .nav-ul li.nav-list a::-moz-selection { - color: #007bff; -} -main .vertical-nav .nav-ul li.nav-list a::selection { - color: #007bff; -} -main .vertical-nav .nav-ul li.nav-list a.active { - color: #007bff; -} -main .vertical-nav .nav-ul li.nav-list .nav-hide { - display: none; -} -main .vertical-nav .nav-ul li.nav-list .nav-show { - display: block; -} -main .vertical-nav .nav-ul li.nav-list .sub-nav { - margin-left: 1em; -} -main .vertical-nav .nav-ul li.nav-list .sub-nav li.nav-list { - list-style: none; - color: #333; - font-size: 15px; - font-style: normal; - font-weight: 500; - line-height: normal; - margin: 0.6em 0; -} -main .vertical-nav .nav-ul li.nav-list .sub-nav li.nav-list a.heading { - font-family: "montserrat"; - font-size: 16px; - font-style: normal; - font-weight: 600; - line-height: normal; -} -main .vertical-nav .nav-ul li.nav-list .sub-nav li.nav-list a.active { - color: #007bff; -} -main .vertical-nav .nav-ul li.heading { - font-family: "montserrat"; - font-size: 16px; - font-style: normal; - font-weight: 600; - line-height: normal; -} -main .vertical-nav .nav-ul li.heading a.active { - color: #007bff; -} -main .container-main { - background-color: #f5f5f5; - box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.18); - border-radius: 5px; - width: 100%; - overflow: hidden; - contain: layout; - -webkit-text-size-adjust: 100%; - -moz-text-size-adjust: 100%; - text-size-adjust: 100%; - text-rendering: optimizespeed !important; - -webkit-font-smoothing: antialiased; -} -main .container-main .container-main__content { - padding: 2em; -} -main .container-main .container-main__content .heading-primary { - color: #333; - font-family: "montserrat"; - font-size: 25px; - font-style: normal; - font-weight: 700; - line-height: normal; - text-align: center; - text-transform: uppercase; - margin-bottom: 0.5em; -} -main .container-main .container-main__content .paragraph { - color: #333; - text-align: justify; - font-family: Open Sans; - font-size: 15px; - font-style: normal; - font-weight: 400; - line-height: normal; -} -main .container-main .container-main__content .paragraph ol, -main .container-main .container-main__content .paragraph li { - margin-left: 1em; -} -main .container-main .container-main__content .adoption-d { - margin-top: 1.3em; -} -main .container-main .container-main__content .article-container .heading-secondary { - color: #333; - text-align: justify; - font-family: Open Sans; - font-size: 17px; - font-style: normal; - font-weight: 700; - line-height: normal; - margin: 0.5em; -} -main .container-main .container-main__content .article-container .heading-secondary .copy-link { - background: none; - border: 0; - margin: 0 0.8em; -} -main .container-main .container-main__content .section-container { - margin-left: 2em; -} - -@media (max-width: 768px) { - .vertical-nav { - display: none; - } - .nav, - .main { - margin: 10px auto; - } - .section-container { - margin-left: 1em !important; - margin: 0.8em auto; - } - li { - margin-left: 0.5em !important; - } - .container-main__content { - padding: 1.3em !important; - } - .paragraph { - margin-left: 0.4em !important; - } - .article-container { - margin: 2.3em 0; - } -}/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/css/style.scss b/css/style.scss index e68fff5..4cdca0d 100644 --- a/css/style.scss +++ b/css/style.scss @@ -1,10 +1,12 @@ @charset "UTF-8"; +// @import "bourbon@5.*"; @font-face { font-family: "montserrat"; src: url("../assets/fonts/Montserrat.ttf") format("ttf"); font-weight: normal; font-style: normal; } + @font-face { font-family: "cuprumregular"; src: url("../assets/fonts/cuprum-variablefont_wght-webfont.woff") @@ -17,6 +19,13 @@ $background-color_light: #f5f5f5; $primary-font: "montserrat"; $box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.18); +// Breakpoints +$bp-maggie: 15em; +$bp-lisa: 30em; +$bp-bart: 48em; +$bp-marge: 62em; +$bp-homer: 75em; + /* Define other theme-related styles here */ * { @@ -24,9 +33,9 @@ $box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.18); padding: 0; transition: all .6s; } - - - +html{ + scroll-behavior: smooth; +} body { background-color: $background-color_light; font-family: $primary-font; @@ -67,6 +76,9 @@ body { } } } + + + .toggle-container { position: absolute; top: 10px; @@ -305,3 +317,224 @@ main { margin: 2.3em 0; } } + + +#backToTop { + display: none; + position: fixed; + bottom: 20px; + right: 30px; + z-index: 1000; + border: none; + outline: none; + background-color: #c07534; + color: white; + cursor: pointer; + padding: 15px; + border-radius: 10px; + font-size: 18px; + + &:hover { + background-color: #555; + } +} +.container-ammendment { + // margin: 5% 3%; + margin: 2em !important; + + @media (min-width: $bp-bart) { + margin: 2em; + } + + @media (min-width: $bp-homer) { + margin: 2em auto; + max-width: $bp-homer; + } +} + +.responsive-table { + width: 100%; + margin-bottom: 1.5em; + border-spacing: 0; + + @media (min-width: $bp-bart) { + font-size: .9em; + } + + @media (min-width: $bp-marge) { + font-size: 1em; + } + + thead { + // Accessibly hide on narrow viewports + position: absolute; + clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ + padding: 0; + border: 0; + height: 1px; + width: 1px; + overflow: hidden; + + @media (min-width: $bp-bart) { + // Unhide on wide viewports + position: relative; + clip: auto; + height: auto; + width: auto; + overflow: auto; + } + + th { + background-color: #007bff; + border: 1px solid #007bff; + font-weight: normal; + text-align: center; + color: white; + + &:first-of-type { + text-align: left; + } + } + } + + // Set these items to display: block for narrow viewports + tbody, + tr, + th, + td { + display: block; + padding: 0; + text-align: left; + white-space: normal; + } + + tr { + @media (min-width: $bp-bart) { + // Undo display: block + display: table-row; + } + } + + th, + td { + padding: .5em; + vertical-align: middle; + + @media (min-width: $bp-lisa) { + padding: .75em .5em; + } + + @media (min-width: $bp-bart) { + // Undo display: block + display: table-cell; + padding: .5em; + } + + @media (min-width: $bp-marge) { + padding: .75em .5em; + } + + @media (min-width: $bp-homer) { + padding: .75em; + } + } + + caption { + margin-bottom: 1em; + font-size: 1em; + font-weight: bold; + text-align: center; + + @media (min-width: $bp-bart) { + font-size: 1.5em; + } + } + + tfoot { + font-size: .8em; + font-style: italic; + + @media (min-width: $bp-marge) { + font-size: .9em; + } + } + + tbody { + @media (min-width: $bp-bart) { + // Undo display: block + display: table-row-group; + } + + tr { + margin-bottom: 1em; + + @media (min-width: $bp-bart) { + // Undo display: block + display: table-row; + border-width: 1px; + } + + &:last-of-type { + margin-bottom: 0; + } + + &:nth-of-type(even) { + @media (min-width: $bp-bart) { + background-color: rgba(0,0,0,.12); + } + } + } + + th[scope="row"] { + background-color: #007bff; + color: white; + + @media (min-width: $bp-lisa) { + border-left: 1px solid #007bff; + border-bottom: 1px solid #007bff; + } + + @media (min-width: $bp-bart) { + background-color: transparent; + color: rgba(0,0,0.87); + text-align: left; + } + } + + td { + text-align: right; + + @media (min-width: $bp-bart) { + border-left: 1px solid #007bff; + border-bottom: 1px solid #007bff; + text-align: center; + } + + &:last-of-type { + @media (min-width: $bp-bart) { + border-right: 1px solid #007bff; + } + } + } + + td[data-type=currency] { + text-align: right; + } + + td[data-title]:before { + content: attr(data-title); + float: left; + font-size: .8em; + color: rgba(0,0,0,.54); + + @media (min-width: $bp-lisa) { + font-size: .9em; + } + + @media (min-width: $bp-bart) { + // Don’t show data-title labels + content: none; + } + } + } +} \ No newline at end of file diff --git a/index.html b/index.html index b66126f..69c43fa 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - + @@ -7,11 +7,11 @@ - - + + - + diff --git a/js/bak.js b/js/bak.js new file mode 100644 index 0000000..23c2c9f --- /dev/null +++ b/js/bak.js @@ -0,0 +1,477 @@ +// js/opencon.js +const body = document.querySelector('body') +// Convert Markdown content to HTML +function convertMarkdownToHTML(markdown) { + if (typeof marked !== 'undefined') { + return marked.parse(markdown) + } else { + return markdown + } + // return markdown; +} + +// get src content from "" tag +const opencodelawtag = document.querySelector('opencodelaw') +const src = opencodelawtag.getAttribute('spec-url') + +fetch(src) + .then((response) => response.text()) + .then((yamlData) => { + const jsonData = jsyaml.load(yamlData) + + info = jsonData.info + + // Create header + const nav = document.createElement('nav') + nav.classList.add('nav') + const navLink = document.createElement('a') + navLink.classList.add('nav__link') + navLink.href = 'index.html' + const titleWrap = document.createElement('div') + titleWrap.classList.add('title-wrap') + const logo = document.createElement('img') + logo.classList.add('nav__logo') + logo.src = info.logo.url + logo.alt = info.logo.alt + const title = document.createElement('h1') + title.textContent = info.title + const toggleContainer = document.createElement('div') + toggleContainer.classList.add('toggle-container') + toggleContainer.setAttribute('id', 'toggle-container') + const labelSpan = document.createElement('span') + labelSpan.classList.add('toggle-label') + labelSpan.innerText = 'Theme:' + toggleContainer.appendChild(labelSpan) + titleWrap.appendChild(logo) + titleWrap.appendChild(title) + navLink.appendChild(titleWrap) + nav.appendChild(navLink) + nav.appendChild(toggleContainer) + body.appendChild(nav) + + // create main + const main = document.createElement('main') + main.classList.add('main') + body.appendChild(main) + // create vertical nav + const verticalNav = document.createElement('div') + verticalNav.classList.add('vertical-nav') + const navContent = document.createElement('div') + navContent.classList.add('nav-content') + const navContentImg = document.createElement('img') + navContentImg.src = 'assets/img/nav-content.png' + navContentImg.alt = 'content-img' + const navContentTitle = document.createElement('h2') + navContentTitle.textContent = 'Contents' + navContent.appendChild(navContentImg) + navContent.appendChild(navContentTitle) + verticalNav.appendChild(navContent) + const navUl = document.createElement('ul') + navUl.classList.add('nav-ul') + verticalNav.appendChild(navUl) + main.appendChild(verticalNav) + + // create preamble heading + const navLiPreamble = document.createElement('li') + navLiPreamble.classList.add('nav-list') + navLiPreamble.classList.add('heading') + const navLinkPreamble = document.createElement('a') + navLinkPreamble.classList.add('nav-a') + navLinkPreamble.href = `#preamble` + navLinkPreamble.textContent = `Preamble` + navLiPreamble.appendChild(navLinkPreamble) + navUl.appendChild(navLiPreamble) + + // create artcle heading + const navLiMain = document.createElement('li') + navLiMain.classList.add('nav-list') + navLiMain.classList.add('heading') + const navLinkMain = document.createElement('a') + navLinkMain.classList.add('nav-a') + navLinkMain.href = `#articles` + navLinkMain.textContent = `Articles` + navLiMain.appendChild(navLinkMain) + navUl.appendChild(navLiMain) + + articles = jsonData.articles + + articles.forEach((article, index) => { + const navLi = document.createElement('li') + navLi.classList.add('nav-list') + // navLi.classList.add("heading"); + + + const navLink = document.createElement('a') + navLink.classList.add('nav-a') + navArticleId = navLink.href = `#article${index + 1}` + navLink.textContent = article.title + navLi.appendChild(navLink) + navUl.appendChild(navLi) + sections = article.sections + if (sections != undefined) { + navLi.classList.add('sub-menu') + // navLi.classList.remove("heading"); + + const navSectionUl = document.createElement('ul') + navSectionUl.classList.add('nav-ul') + navSectionUl.classList.add('nav-section') + navSectionUl.classList.add('sub-nav') + navSectionUl.classList.add('nav-hide') + navLi.appendChild(navSectionUl) + + //dropdown icon + const downArrow = document.createElement("span"); + downArrow.classList.add("down-arrow", "arrow-rotate"); // Add both classes + downArrow.textContent = "▼"; // Unicode character for down arrow + navLink.appendChild(downArrow); // Append the arrow to the link + + const navSectionLi = document.createElement('li') + navSectionLi.classList.add('nav-list') + const navSectionLink = document.createElement('a') + navSectionLink.classList.add('nav-a') + navSectionLink.classList.add('heading') + sections.forEach((section, index) => { + const navSectionSubLi = document.createElement('li') + navSectionSubLi.classList.add('nav-list') + const navSectionSubLink = document.createElement('a') + navSectionSubLink.classList.add('nav-a') + navSectionSubLink.href = `${navArticleId}-section${index + 1}` + navSectionSubLink.textContent = `${index + 1}. ${section.title}` + navSectionSubLi.appendChild(navSectionSubLink) + navSectionUl.appendChild(navSectionSubLi) + }) + } + }) + preamble = jsonData.preamble + + // Create the toggle theme switch + const themeToggle = document.createElement('label') + themeToggle.classList.add('toggle-switch') + themeToggle.innerHTML = ` + + + ` + + + // Append the toggle switch to the toggle container + toggleContainer.appendChild(themeToggle) + themeToggle.querySelector('input').addEventListener('change', toggleTheme) + // Function to toggle between dark and light themes + const darkBackgroundColor = "#333333" + const lightBackgroundColor = "#f5f5f5" + const darkTextColor = "#f2f2f2" + const lightTextColor = "#333" + function toggleTheme() { + const slider = themeToggle.querySelector('.slider') + const nav = document.querySelector('.nav') + const vertical_nav = document.querySelector('main .vertical-nav') + const container_main = document.querySelector('main .container-main') + const articleDesc = document.querySelectorAll("main .container-main .container-main__content .paragraph") + const sideBarLinks = document.querySelectorAll("main .vertical-nav .nav-ul li.nav-list a") + const h1 = document.querySelectorAll("h1") + const h2 = document.querySelectorAll("h2") + const h3 = document.querySelectorAll("h3") + const themeText = document.querySelector(".toggle-label") + + + if (themeToggle.querySelector('input').checked) { + slider.style.backgroundColor = '#533566' + nav.style.backgroundColor = `${darkBackgroundColor}` + vertical_nav.style.backgroundColor = `${darkBackgroundColor}` + container_main.style.backgroundColor = `${darkBackgroundColor}` + body.style.backgroundColor = `${darkBackgroundColor}` + articleDesc.forEach((e) => e.style.color = `#cecdcd`) + sideBarLinks.forEach((e) => e.style.color = `${darkTextColor}`) + h1.forEach((e) => e.style.color = `${darkTextColor}`) + h2.forEach((e) => e.style.color = `${darkTextColor}`) + h3.forEach((e) => e.style.color = `${darkTextColor}`) + themeText.style.color = `${darkTextColor}` + localStorage.setItem('theme', 'dark') + } else { + slider.style.backgroundColor = 'yellow' + nav.style.backgroundColor = '#f5f5f5' + vertical_nav.style.backgroundColor = `${lightBackgroundColor}` + container_main.style.backgroundColor = `${lightBackgroundColor}` + body.style.backgroundColor = `${lightBackgroundColor}` + articleDesc.forEach((e) => e.style.color = `${lightTextColor}`) + h1.forEach((e) => e.style.color = `${lightTextColor}`) + h2.forEach((e) => e.style.color = `${lightTextColor}`) + h3.forEach((e) => e.style.color = `${lightTextColor}`) + sideBarLinks.forEach((e) => e.style.color = `${lightTextColor}`) + themeText.style.color = `${lightTextColor}` + localStorage.setItem('theme', 'light') + } + } + + // create
+ const containerMain = document.createElement('div') + containerMain.classList.add('container-main') + main.appendChild(containerMain) + // create container-main__content + const containerMainContent = document.createElement('div') + containerMainContent.classList.add('container-main__content') + containerMain.appendChild(containerMainContent) + const containerMainContentH1 = document.createElement('h1') + containerMainContentH1.id = `preamble` + containerMainContentH1.classList.add('heading-primary') + containerMainContentH1.textContent = preamble.title + containerMainContent.appendChild(containerMainContentH1) + const containerMainContentP1 = document.createElement('p') + containerMainContentP1.classList.add('paragraph') + containerMainContentP1.innerHTML = convertMarkdownToHTML(preamble.content) + containerMainContent.appendChild(containerMainContentP1) + const containerMainContentP2 = document.createElement('p') + containerMainContentP2.classList.add('paragraph') + containerMainContentP2.classList.add('adoption-d') + containerMainContentP2.textContent = 'Adopted on : ' + preamble.adopted + containerMainContent.appendChild(containerMainContentP2) + + // create article container with heading + const containerMainContentArticle = document.createElement('div') + containerMainContentArticle.classList.add('container-main__content') + containerMain.appendChild(containerMainContentArticle) + const containerMainContentArticleH1 = document.createElement('h1') + containerMainContentArticleH1.id = `articles` + containerMainContentArticleH1.classList.add('heading-primary') + containerMainContentArticleH1.textContent = 'Articles' + containerMainContentArticle.appendChild(containerMainContentArticleH1) + + // append all articles + articles.forEach((article, index) => { + const articleContainer = document.createElement('div') + articleContainer.classList.add('article-container') + containerMainContentArticle.appendChild(articleContainer) + const articleContainerH2 = document.createElement('h2') + const articleId = (articleContainerH2.id = `article${index + 1}`) + articleContainerH2.classList.add('heading-secondary') + articleContainerH2.textContent = `${index + 1}. ${article.title}` + articleContainer.appendChild(articleContainerH2) + // add copy link button + const copyLink = document.createElement('button') + copyLink.classList.add('copy-link') + copyLink.textContent = '🔗' + copyLink.addEventListener('click', () => { + // initialize remaining copy link buttons to 🔗 + const copyLinks = document.querySelectorAll('.copy-link') + copyLinks.forEach((copyLink) => { + copyLink.textContent = '🔗' + }) + const url = window.location.href + navigator.clipboard.writeText(`${url}#${articleId}`) + copyLink.textContent = '✅' + }) + articleContainerH2.appendChild(copyLink) + const articleContainerP = document.createElement('p') + articleContainerP.classList.add('paragraph') + articleContainerP.innerHTML = convertMarkdownToHTML(article.content) + articleContainer.appendChild(articleContainerP) + sections = article.sections + if (sections != undefined) { + const sectionContainer = document.createElement('div') + sectionContainer.classList.add('section-container') + articleContainer.appendChild(sectionContainer) + sections.forEach((section, index) => { + const sectionContainerH3 = document.createElement('h3') + sectionContainerH3.id = `${articleId}-section${index + 1}` + sectionContainerH3.classList.add('heading-secondary') + sectionContainerH3.textContent = `${index + 1}. ${section.title}` + sectionContainer.appendChild(sectionContainerH3) + // add copy link button + const copyLink = document.createElement('button') + copyLink.classList.add('copy-link') + copyLink.textContent = '🔗' + copyLink.addEventListener('click', () => { + const copyLinks = document.querySelectorAll('.copy-link') + copyLinks.forEach((copyLink) => { + copyLink.textContent = '🔗' + }) + const url = window.location.href + navigator.clipboard.writeText( + `${url}#${articleId}-section${index + 1}` + ) + copyLink.textContent = '✅' + }) + sectionContainerH3.appendChild(copyLink) + const sectionContainerP = document.createElement('p') + sectionContainerP.classList.add('paragraph') + sectionContainerP.innerHTML = convertMarkdownToHTML(section.content) + sectionContainer.appendChild(sectionContainerP) + }) + } + }) +// Ammendment data (replace with your actual jsonData.ammendments) +const ammendmentData = jsonData.ammendments; +console.log(ammendmentData); + +// Create amendments table +const ammendment_container = document.createElement("div"); +ammendment_container.classList.add('container-ammendment'); + +const table = document.createElement('table'); +table.classList.add('responsive-table'); + +const caption = document.createElement('caption'); +caption.textContent = 'Ammendments'; +table.appendChild(caption); + +const thead = document.createElement('thead'); +const headRow = document.createElement('tr'); + +const headers = ['Date', 'Act', 'Description', 'Author', 'Archive']; +headers.forEach(header => { + const th = document.createElement('th'); + th.textContent = header; + th.scope = header === 'Act' ? 'col' : 'row'; + headRow.appendChild(th); +}); + +thead.appendChild(headRow); +table.appendChild(thead); + +const tbody = document.createElement('tbody'); + +// Loop through ammendmentData and create table rows +ammendmentData.forEach(ammendment => { + const row = document.createElement('tr'); + + // Extract data from each amendment object + const title = ammendment.title; + const date = ammendment.date; + const description = ammendment.content; + const author = ammendment.author; + const archive = ammendment.archive; + + // Create table cells and populate with data + const cells = [date, title, description, author, archive]; + cells.forEach(cellData => { + const cell = document.createElement('td'); + cell.textContent = cellData; + row.appendChild(cell); + }); + + tbody.appendChild(row); +}); + +table.appendChild(tbody); +ammendment_container.appendChild(table); + +// Append the container to your desired location (replace with your logic) +containerMain.appendChild(ammendment_container); + +console.log("Ammendments table created and appended"); + + + // create back to top button + const backToTop = document.createElement("button") + backToTop.classList.add("back-to-top") + backToTop.id = "backToTop" + backToTop.title = "Go to top" + backToTop.textContent = "↑" + backToTop.addEventListener("click", () => { + window.scrollTo({ top: 0, behavior: "smooth" }) + } + ) + body.appendChild(backToTop) + // Check the user's theme preference in localStorage + const savedTheme = localStorage.getItem('theme') + if (savedTheme === 'dark') { + const themeToggle = document.querySelector(".toggle-switch") + themeToggle.querySelector('input').checked = true + toggleTheme() + } + }) + .then(() => { + // ui script + + const subMenus = document.querySelectorAll('.sub-menu') + const navLinks = document.querySelectorAll('.nav-a') + + // Function to toggle visibility of sub-menus + // Function to toggle visibility of sub-menus and rotate arrow +function toggleSubMenu(event) { + const subMenu = event.currentTarget.querySelector('.sub-nav') + subMenu.classList.toggle('nav-hide') +} + + // Function to prevent sub-menu from closing on click inside + function preventSubMenuClose(event) { + event.stopPropagation() + } + + // Add event listeners to each sub-menu parent + subMenus.forEach((subMenu) => { + subMenu.addEventListener('click', toggleSubMenu) + subMenu + .querySelector('.nav-section') + .addEventListener('click', preventSubMenuClose) + }) + + // Highlight the active menu based on content scroll + function updateActiveMenu() { + const currentPosition = window.scrollY + navLinks.forEach((link) => { + const section = document.querySelector(link.getAttribute('href')) + if ( + section.offsetTop <= currentPosition + 100 && // Adding an offset to improve accuracy + section.offsetTop + section.offsetHeight > currentPosition + 100 + ) { + link.classList.add('active') + } else { + link.classList.remove('active') + } + }) + } + + // Update "active" class when a menu item is clicked + navLinks.forEach((link) => { + link.addEventListener('click', (event) => { + navLinks.forEach((link) => link.classList.remove('active')) + link.classList.add('active') + const target = document.querySelector(link.getAttribute('href')) + + // Scroll to the target element with smooth scrolling + target.scrollIntoView({ behavior: 'smooth' }) + + // Close open sub-menus when a menu item is clicked + subMenus.forEach((subMenu) => { + const subNav = subMenu.querySelector('.nav-section') + if (!subNav.contains(target)) { + subMenu.querySelector('.sub-nav').classList.add('nav-hide') + } + }) + }) + }) + + // Update active menu on scroll + window.addEventListener('scroll', updateActiveMenu) + updateActiveMenu() // Initial update on page load + + + + + }) + .catch((error) => { + console.error("Error loading YAML data:", error); + }); + window.addEventListener("scroll", scrollFunction); + + function scrollFunction() { + const topButton = document.getElementById("backToTop"); + + if ( + document.body.scrollTop > 20 || + document.documentElement.scrollTop > 20 + ) { + topButton.style.display = "block"; + } else { + topButton.style.display = "none"; + } + } + + // When the button is clicked, scroll to the top of the document + function topFunction() { + document.body.scrollIntoView({ behavior: "smooth", block: "start" }); + } + + // Add this event listener to handle button click + const topButton = document.getElementById("backToTop"); \ No newline at end of file diff --git a/js/opencodelaw.js b/js/opencodelaw.js index 47ead9f..6adaec5 100644 --- a/js/opencodelaw.js +++ b/js/opencodelaw.js @@ -99,6 +99,8 @@ fetch(src) const navLi = document.createElement('li') navLi.classList.add('nav-list') // navLi.classList.add("heading"); + + const navLink = document.createElement('a') navLink.classList.add('nav-a') navArticleId = navLink.href = `#article${index + 1}` @@ -109,12 +111,20 @@ fetch(src) if (sections != undefined) { navLi.classList.add('sub-menu') // navLi.classList.remove("heading"); + const navSectionUl = document.createElement('ul') navSectionUl.classList.add('nav-ul') navSectionUl.classList.add('nav-section') navSectionUl.classList.add('sub-nav') navSectionUl.classList.add('nav-hide') navLi.appendChild(navSectionUl) + + //dropdown icon + const downArrow = document.createElement("span"); + downArrow.classList.add("down-arrow", "arrow-rotate"); // Add both classes + downArrow.textContent = "▼"; // Unicode character for down arrow + navLink.appendChild(downArrow); // Append the arrow to the link + const navSectionLi = document.createElement('li') navSectionLi.classList.add('nav-list') const navSectionLink = document.createElement('a') @@ -141,7 +151,7 @@ fetch(src) ` - + // Append the toggle switch to the toggle container toggleContainer.appendChild(themeToggle) @@ -151,31 +161,31 @@ fetch(src) const lightBackgroundColor = "#f5f5f5" const darkTextColor = "#f2f2f2" const lightTextColor = "#333" - function toggleTheme() { - const slider = themeToggle.querySelector('.slider') - const nav = document.querySelector('.nav') - const vertical_nav = document.querySelector('main .vertical-nav') - const container_main = document.querySelector('main .container-main') - const articleDesc = document.querySelectorAll("main .container-main .container-main__content .paragraph") - const sideBarLinks = document.querySelectorAll("main .vertical-nav .nav-ul li.nav-list a") - const h1 = document.querySelectorAll("h1") - const h2 = document.querySelectorAll("h2") - const h3 = document.querySelectorAll("h3") - const themeText = document.querySelector(".toggle-label") - - + function toggleTheme() { + const slider = themeToggle.querySelector('.slider') + const nav = document.querySelector('.nav') + const vertical_nav = document.querySelector('main .vertical-nav') + const container_main = document.querySelector('main .container-main') + const articleDesc = document.querySelectorAll("main .container-main .container-main__content .paragraph") + const sideBarLinks = document.querySelectorAll("main .vertical-nav .nav-ul li.nav-list a") + const h1 = document.querySelectorAll("h1") + const h2 = document.querySelectorAll("h2") + const h3 = document.querySelectorAll("h3") + const themeText = document.querySelector(".toggle-label") + + if (themeToggle.querySelector('input').checked) { slider.style.backgroundColor = '#533566' nav.style.backgroundColor = `${darkBackgroundColor}` vertical_nav.style.backgroundColor = `${darkBackgroundColor}` - container_main.style.backgroundColor = `${darkBackgroundColor}` - body.style.backgroundColor = `${darkBackgroundColor}` + container_main.style.backgroundColor = `${darkBackgroundColor}` + body.style.backgroundColor = `${darkBackgroundColor}` articleDesc.forEach((e) => e.style.color = `#cecdcd`) sideBarLinks.forEach((e) => e.style.color = `${darkTextColor}`) h1.forEach((e) => e.style.color = `${darkTextColor}`) h2.forEach((e) => e.style.color = `${darkTextColor}`) - h3.forEach((e) => e.style.color = `${darkTextColor}`) - themeText.style.color = `${darkTextColor}` + h3.forEach((e) => e.style.color = `${darkTextColor}`) + themeText.style.color = `${darkTextColor}` localStorage.setItem('theme', 'dark') } else { slider.style.backgroundColor = 'yellow' @@ -183,11 +193,11 @@ fetch(src) vertical_nav.style.backgroundColor = `${lightBackgroundColor}` container_main.style.backgroundColor = `${lightBackgroundColor}` body.style.backgroundColor = `${lightBackgroundColor}` - articleDesc.forEach((e)=> e.style.color = `${lightTextColor}`) - h1.forEach((e)=> e.style.color = `${lightTextColor}`) - h2.forEach((e)=> e.style.color = `${lightTextColor}`) - h3.forEach((e)=> e.style.color = `${lightTextColor}`) - sideBarLinks.forEach((e)=> e.style.color = `${lightTextColor}`) + articleDesc.forEach((e) => e.style.color = `${lightTextColor}`) + h1.forEach((e) => e.style.color = `${lightTextColor}`) + h2.forEach((e) => e.style.color = `${lightTextColor}`) + h3.forEach((e) => e.style.color = `${lightTextColor}`) + sideBarLinks.forEach((e) => e.style.color = `${lightTextColor}`) themeText.style.color = `${lightTextColor}` localStorage.setItem('theme', 'light') } @@ -289,13 +299,91 @@ fetch(src) }) } }) - // Check the user's theme preference in localStorage - const savedTheme = localStorage.getItem('theme') - if (savedTheme === 'dark') { - const themeToggle = document.querySelector(".toggle-switch") - themeToggle.querySelector('input').checked = true - toggleTheme() - } + // Ammendment data (replace with your actual jsonData.ammendments) + const ammendmentData = jsonData.ammendments + console.log(ammendmentData) + // Create amendments table + const ammendment_container = document.createElement("div") + ammendment_container.classList.add('container-ammendment') + const table = document.createElement('table') + table.classList.add('responsive-table') + const caption = document.createElement('caption') + caption.textContent = 'Ammendments' + table.appendChild(caption) + const thead = document.createElement('thead') + const headRow = document.createElement('tr') + const headers = ['Date', 'Act', 'Description', 'Author', 'Archive'] + headers.forEach(header => { + const th = document.createElement('th') + th.textContent = header + th.scope = 'col' + // th.setAttribute('data-title', header) + headRow.appendChild(th) + }); + thead.appendChild(headRow) + table.appendChild(thead) + const tbody = document.createElement('tbody') + // Loop through ammendmentData and create table rows + ammendmentData.forEach(ammendment => { + const row = document.createElement('tr') + // Extract data from each amendment object + const title = ammendment.title + const date = ammendment.date + const description = ammendment.content + const author = ammendment.author + const archive = ammendment.archive + // Create table cells and populate with data + const cells = [date, title, description, author, archive] + cells.forEach((cellData, index) => { + if(index===0){ + cell = document.createElement('th') + cell.scope='row' + }else{ + cell = document.createElement('td') + cell.setAttribute('data-title', headers[index]); + } + if (index === cells.length - 1) { + const paragraph = document.createElement('p') + const actLink = document.createElement('a') + actLink.href = ammendment.act + actLink.textContent = 'Act' + const archiveLink = document.createElement('a') + archiveLink.href = ammendment.archive + archiveLink.textContent = 'Constitution' + paragraph.appendChild(actLink) + paragraph.appendChild(document.createTextNode(' / ')) + paragraph.appendChild(archiveLink) + cell.appendChild(paragraph) + } else { + cell.textContent = cellData + } + row.appendChild(cell) + }); + tbody.appendChild(row) + }); + table.appendChild(tbody) + ammendment_container.appendChild(table) + // Append the container to your desired location (replace with your logic) + containerMain.appendChild(ammendment_container) + + // create back to top button + const backToTop = document.createElement("button") + backToTop.classList.add("back-to-top") + backToTop.id = "backToTop" + backToTop.title = "Go to top" + backToTop.textContent = "↑" + backToTop.addEventListener("click", () => { + window.scrollTo({ top: 0, behavior: "smooth" }) + } + ) + body.appendChild(backToTop) + // Check the user's theme preference in localStorage + const savedTheme = localStorage.getItem('theme') + if (savedTheme === 'dark') { + const themeToggle = document.querySelector(".toggle-switch") + themeToggle.querySelector('input').checked = true + toggleTheme() + } }) .then(() => { // ui script @@ -304,10 +392,11 @@ fetch(src) const navLinks = document.querySelectorAll('.nav-a') // Function to toggle visibility of sub-menus - function toggleSubMenu(event) { - const subMenu = event.currentTarget.querySelector('.sub-nav') + // Function to toggle visibility of sub-menus and rotate arrow +function toggleSubMenu(event) { + const subMenu = event.currentTarget.querySelector('.sub-nav') subMenu.classList.toggle('nav-hide') - } +} // Function to prevent sub-menu from closing on click inside function preventSubMenuClose(event) { @@ -362,10 +451,32 @@ fetch(src) window.addEventListener('scroll', updateActiveMenu) updateActiveMenu() // Initial update on page load - - + + }) .catch((error) => { - console.error('Error loading YAML data:', error) - }) + console.error("Error loading YAML data:", error); + }); + window.addEventListener("scroll", scrollFunction); + + function scrollFunction() { + const topButton = document.getElementById("backToTop"); + + if ( + document.body.scrollTop > 20 || + document.documentElement.scrollTop > 20 + ) { + topButton.style.display = "block"; + } else { + topButton.style.display = "none"; + } + } + + // When the button is clicked, scroll to the top of the document + function topFunction() { + document.body.scrollIntoView({ behavior: "smooth", block: "start" }); + } + + // Add this event listener to handle button click + const topButton = document.getElementById("backToTop"); \ No newline at end of file diff --git a/specs/v1.yaml b/specs/v1.yaml new file mode 100644 index 0000000..71cff0a --- /dev/null +++ b/specs/v1.yaml @@ -0,0 +1,302 @@ +openconstitution: 1.0.0 +info: + title: SERVICE TO MANKIND + termsOfService: https://example.com/terms + logo: + url: https://stmorg.in/accesories/service_to_man_kind-20200709-0001.jpg + alt: Logo + contact: + name: Pranay Kiran + url: https://example.com/contact + email: pranay@stmorg.in + license: MIT + version: 2.0.0 +preamble: + title: PREAMBLE + content: | + Service to Mankind is a Non-Governmental Organization (NGO) registered under Telangana Societies Registration Act., 2001 that was started to create a platform for students who are + intent on doing their bit towards the betterment of society. Service to Mankind is a platform for the students to serve the society and to inculcate a sense of social responsibility in them. + adopted: 2023-10-08T20:20:00+05:30 +articles: + - title: Name of the Organization + content: | + The name of the organization shall be Service to Mankind (hereinafter referred to as + "the NGO").The acronym that might be used to refer to the NGO will be STM. + The Registered Office of the Society shall be STM India Headquarters, Ft No. 25/24, Bowrampet, 500043, Hyderabad, Telangana + will operate anywhere. + - title: Interpretations/Definitions + content: | + In this Constitution, unless the context otherwise requires: + 1. "Act" means the Telangana Societies Registration Act., 2001. + 2. "Board" means the Board Members of the NGO. + 3. "Constitution" means the Constitution of the NGO. + 4. "Executive Committee" means the Executive Committee of the NGO. + 5. "College Unit" means the College Unit of the NGO. + 6. "Member" means a member of the NGO. + 7. "NGO" means the Service to Mankind. + 8. "Office" means the Registered Office of the NGO. + 9. "President" means the President of the NGO. + 10. "Secretary" means the Secretary of the NGO. + 11. "Treasurer" means the Treasurer of the NGO. + 12. "Trustee" means a Trustee of the NGO. + 13. "Vice President" means the Vice President of the NGO. + 14. "Year" means the financial year of the NGO. + 15. "IBM" means the Intermediate Board Members of the NGO. + 16. "STM" means the Service to Mankind. + - title: Aims and Objectives + content: | + The NGO has been established to create a platform for the students who are intent on doing + their bit towards the betterment of society with the objective of helping the underprivileged + and the destitute in any and every way possible. + - title: Mission Statement + content: | + The mission of the NGO is to provide a platform for the students to serve the society and + to inculcate a sense of social responsibility in them. + - title: Vision Statement + content: | + The vision of the NGO is to create a society where everyone has access to basic amenities + and to create a society where everyone is treated equally. + - title: STM Roles + content: | + The membership of the NGO shall be open to all the students of the college who are willing to + serve the society and who are willing to abide by the rules and regulations of the NGO. + sections: + - title: Board Member + content: | + Any person who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO to serve the STM for the lifetime and manage every thing in the STM. + - title: Intermediate Board Member + content: | + Any person who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO to serve the STM for the lifetime and manage every thing in the STM under the board. + - title: College Unit Board Member + content: | + Any person who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO to serve the STM in thier respective college unit within thier academic life. + - title: Coordinator + content: | + Any person who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO to serve and work for the STM after the successfull interview. + - title: Volunteer + content: | + Any person who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO to do service on thier will. + - title: Donor + content: | + Any person who agrees to donate a certain amount of money to the NGO is eligible to become a donor. + - title: Membership + content: | + 1. A person who has been recruited into the organization on follow of process as per Organization rules and regulations and is duly appointed by STM as such for any of the college units or works for the NGO in certain form shall be called as an STM ‘Member’.. + 2. A person who has registered online in the STM website and admitted in the NGO through a confirmation email and according to its regulations continues to be a member of the NGO. + 3. An applicant can only be a member if appointed through the recruitment process by the competent authority as may be defined by society from time to time via the Board. + 4. Any person who donates atleast INR 30 (Rupees Thirty Only) shall be a ‘Donor Member’ of STM, however, a Donor Member is not an official STM ‘Member’ and does not work for the organization. + 5. Eligibility of membership + * (a)The following shall be eligible for membership in the society:- + 1. The applicant will strive to work for the achievement of the objectives of the society. + 2. The applicant shall abide by the Rules and Regulations of the Society. + 3. They shall maintain good moral conduct and behavior. + 6. Termination of membership + * (a)The membership of a member shall be terminated if he/she: + 1. Resigns from the membership of the society. + 2. Is found to be of unsound mind by a competent court. + 3. Is convicted of any offence involving moral turpitude. + 4. On the death of any member. + 5. If they are expelled from the society \ + (a) for misconduct \ + (b) for insubordination \ + (c) due to non-performance + 6. If found inactive or nonperforming, the member would be termed as inactive + member in writing, the member is put under a performance plan by giving + due notice of 3 months’ time from the date of declaration in writing to + perform their duties at a satisfactory level, failing which the membership of + an individual shall be terminated.. + * (b)The authority to terminate or revoke the status of a member shall be vested with the Board for all members. + Intermediate board can terminate or revoke the membership of a member for college units. + Head of the college units can terminate or revoke the membership of a member within the college unit. + - title: Internship + content: | + Internship is a program where the students of the college are given an opportunity to work for the NGO and to learn the working of the NGO as a coordinator in respective collage unit. + sections: + - title: Stipend + content: | + There is no stipend for the internship program. But the interns will be provided with the certificate of internship in thier respective college units. + - title: Duration + content: | + The duration of the internship program is 3 academic years. + - title: Eligibility + content: | + Any student who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO is eligible to become an intern according to the article 7 of the constitution. + - title: Selection Process + content: | + The selection process for the internship program is as follows: + 1. The student should fill the application form for the internship program. + 2. The student should attend the interview conducted by the college board. + 3. The student should be selected by the board. + - title: Roles and Responsibilities + content: | + All the interns should abide by the rules and regulations of the NGO. The interns should work for the NGO in thier respective departments and should work for the betterment of the society. + - title: Board Members + content: | + The board members are the members who are selected by the board of the NGO to manage the NGO and to take care of the NGO. + They are responsible for the all legal and financial activities of the NGO. + The board consists of the following members: + 1. President + 2. Vice President + 3. General Secretary + 4. Joint Secretary + 5. Treasurer + 6. Executive Members + + The board members are selected by the board of the NGO. + sections: + - title: Eligibility + content: | + Any member who is extremely active and has been working for the NGO for selfless service and who is willing to abide by the rules and regulations of the NGO is eligible to become a board member. + - title: Selection Process + content: | + The selection process for the board members is as follows: + 1. The member should fill the application form for the board member. + 2. The member should attend the interview conducted by the board. + 3. The member should be selected by the board. + - title: Roles and Responsibilities + content: | + All the board members should abide by the rules and regulations of the NGO and work according to the constitution of the NGO and by-laws of the NGO. + The board members are responsible for the all legal and financial activities of the NGO. + The board members are responsible for the all activities of the NGO. + - title: Intermediate Board Members + content: | + The IBM are the members who are selected by the board of the NGO to manage the NGO and to take care of the NGO. + They are responsible for the all legal and financial activities of the NGO. + The IBM consists of the following members: + 1. HR & Internshipment Controller Coordinator + 2. Finance Controller Coordinator + 3. Designing Coordinator + 4. Public Relations Coordinator + 5. Technical Coordinator + 6. Internal Compliance Coordinator + 7. Operations Coordinator + 8. Content Coordinator + 9. Volunteer Coordinator + sections: + - title: Eligibility + content: | + Any member who is extremely active and has been working for the NGO for selfless service and who is willing to abide by the rules and regulations of the NGO is eligible to become a IBM. + - title: Selection Process + content: | + The selection process for the IBM is as follows: + 1. The member should fill the application form for the IBM. + 2. The member should attend the interview conducted by the board. + 3. The member should be selected by the board. + - title: Roles and Responsibilities + content: | + All the IBM should abide by the rules and regulations of the NGO and work according to the constitution. \ + The IMB members responsibilities are as follows: + 1. HR & Internshipment Controller Coordinator + HR & Internshipment Controller Coordinator are responsible for the all activities of the recruitment process and internship program. They are responsible for the all recruitment activities of the college units. + 2. Finance Controller Coordinator + Finance Controller Coordinator are responsible for the all financial activities of the NGO. They are responsible for the all financial activities of the college units. + They need to maintain the accounts of the NGO of all the college units and need to submit the accounts to the board.4 + Annual report of the accounts of the NGO should be submitted to the board. + 3. Designing Coordinator + Designing Coordinator are responsible for the all designing activities of the NGO. They are responsible for the all designing activities of the college units. + They are responsible for the all designing activities of the NGO and maintain high quality of the designing in the NGO. + 4. Public Relations Coordinator + Public Relations Coordinator are responsible for the all public relations activities of the NGO. They are responsible for the all public relations activities of the college units. + They are responsible for the all public relations activities of the NGO and maintain high quality of the public relations in the NGO. + 5. Technical Coordinator + Technical Coordinator are responsible for the all technical activities of the NGO. They are responsible for the all technical activities of the college units. + They must maintain the website of the NGO and maintain high quality of the technical activities in the NGO. + They promote the open source technologies in the NGO. + 6. Internal Compliance Coordinator + Internal Compliance Coordinator are responsible for the all internal compliance activities of the NGO. They are responsible for the all internal compliance activities of the college units. + They can take any action on any member of the NGO if they are not following the rules and regulations of the NGO and constitution of the NGO including the board members. + 7. Operations Coordinator + Operations Coordinator are responsible for the all operations activities of the NGO. They are responsible for the all operations activities of the college units. + They are responsible for the all operations activities of the NGO and maintain high quality of the operations in the NGO. + 8. Content Coordinator + Content Coordinator are responsible for the all content activities of the NGO. They are responsible for the all content activities of the college units. + They are responsible for the all content activities of the NGO and maintain high quality of the content in the NGO. + 9. Volunteer Coordinator + Volunteer Coordinator are responsible for the all volunteer activities of the NGO. They are responsible for the all volunteer activities of the college units. + They are responsible for the all volunteer activities of the NGO and maintain high quality of the volunteer activities in the NGO. + + - title: College Units + content: | + The college units are the units of the NGO which are established in the colleges to manage the NGO and to take care of the NGO. + The college units consists of the following members: + 1. Head + 2. Vice Head + 3. Management Department Head + 4. Donations and Finance Department Head + 5. Technical Department Head + 6. Content Department Head + 7. Reseseach and Development Department Head + 8. Graphics Department Head + sections: + - title: Establishment + content: | + To establish a college unit in a college, the following conditions should be satisfied: + 1. There should be atleast 10 members in the college who are willing to work for the NGO. + 2. The head of the college unit must consult the board of the NGO and get permission to establish the college unit. + 3. The head of the college unit must fill the application form for the college unit. + 4. The head of the college unit must attend the interview conducted by the board. + 5. The head of the college unit must be selected by the board. + - title: Funds + content: | + All college units should should submit the accounts to the IBM (Finance Coordinator) of the NGO. The college units should get permission from the IBM (Finance Coordinator) or Board (Treasurer) of the NGO to use the funds of the NGO. + - title: Roles and Responsibilities + content: | + All the college units should abide by the rules and regulations of the NGO and work according to the constitution. + They can raise funds, and do any activity for the betterment of the society. + - title: Alumini + content: | + Refers to a person who has previously worked with the NGO and has maintained good membership standing. + - title: Anual Reports + content: | + 1. All divisions and units must maintain the task reports of all the events taken up during the + year, and must submit the reports to the Finance Controller Coordinator of STM at least 2 weeks + prior to the AGM + 2. A detailed annual report of all the events conducted throughout the NGO shall be + consolidated and maintained by the Finance Controller Coordinator of STM + 3. The Annual Report of the NGO must be compulsorily prepared by the Finance Controller + of STM by the AGM in the prescribed format mentioned in the Documentation policy + 4. All the Annual Reports from the inception of the NGO must be maintained in the STM management portal + - title: Sabbatical Leave + content: | + Sabbatical leave is a leave given to the members of the NGO who are working for the NGO for a long time and who are willing to take a break from the NGO for a certain period of time. + sections: + - title: Eligibility + content: | + Any member who is working for the NGO for a long time and who is willing to take a break from the NGO for a certain period of time is eligible for the sabbatical leave. + - title: Application + content: | + The member should fill the application form for the sabbatical leave and should submit the application to the board. + - title: Duration + content: | + The duration of the sabbatical leave will be varied from 6 months to 1 year. According to the application of the member. + - title: Resignation + content: | + Resignation is a process where the member of the NGO can leave the NGO if they are not willing to work for the NGO. + sections: + - title: Eligibility + content: | + Any member who is not willing to work for the NGO is eligible for the resignation. + - title: Application + content: | + The member should fill the application form for the resignation and should submit the application to the board. + - title: Duration + content: | + The duration of the resignation will be varied from 1 month to 3 months. According to the application of the member. + - title: Ammendments + content: | + 1. Any changes to the constitution of the NGO should be done by the board of the NGO. + 2. The ammenments should be done according to the by-laws of the NGO. + 3. All the proposed ammendments should be approved by the board of the NGO, intermediate board of the NGO and all college units of the NGO. + - title: Dissolution + content: | + (a). In an event that the NGO fails to function totally and needs to be dissolved, the whole + board of the NGO shall be dissolved and a new board shall be elected by the General Body. Else, the whole NGO shall be dissolved. \ + (b). College Units of the NGO can only be dissolved by the Board of the NGO +ammendments: + - title: Establishing the Constitution + content: | + Establishing the Constitution + archive: /archives/v1 + act: # + date: 2023-10-08T20:20:00+05:30 + author: Pranay Kiran \ No newline at end of file diff --git a/specs/v2.yaml b/specs/v2.yaml new file mode 100644 index 0000000..75a9e75 --- /dev/null +++ b/specs/v2.yaml @@ -0,0 +1,300 @@ +openconstitution: 1.0.0 +info: + title: SERVICE TO MANKIND + termsOfService: https://example.com/terms + logo: + url: https://stmorg.in/accesories/service_to_man_kind-20200709-0001.jpg + alt: Logo + contact: + name: Pranay Kiran + url: https://example.com/contact + email: pranay@stmorg.in + license: MIT + version: 2.0.0 +preamble: + title: PREAMBLE + content: | + Service to Mankind is a Non-Governmental Organization (NGO) registered under Telangana Societies Registration Act., 2001 that was started to create a platform for students who are + intent on doing their bit towards the betterment of society. Service to Mankind is a platform for the students to serve the society and to inculcate a sense of social responsibility in them. + adopted: 2023-10-08T20:20:00+05:30 +articles: + - title: Name of the Organization + content: | + The name of the organization shall be Service to Mankind (hereinafter referred to as + "the NGO").The acronym that might be used to refer to the NGO will be STM. + The Registered Office of the Society shall be STM India Headquarters, Ft No. 25/24, Bowrampet, 500043, Hyderabad, Telangana + will operate anywhere. + - title: Interpretations/Definitions + content: | + In this Constitution, unless the context otherwise requires: + 1. "Act" means the Telangana Societies Registration Act., 2001. + 2. "Board" means the Board Members of the NGO. + 3. "Constitution" means the Constitution of the NGO. + 4. "Executive Committee" means the Executive Committee of the NGO. + 5. "College Unit" means the College Unit of the NGO. + 6. "Member" means a member of the NGO. + 7. "NGO" means the Service to Mankind. + 8. "Office" means the Registered Office of the NGO. + 9. "President" means the President of the NGO. + 10. "Secretary" means the Secretary of the NGO. + 11. "Treasurer" means the Treasurer of the NGO. + 12. "Trustee" means a Trustee of the NGO. + 13. "Vice President" means the Vice President of the NGO. + 14. "Year" means the financial year of the NGO. + 15. "IBM" means the Intermediate Board Members of the NGO. + 16. "STM" means the Service to Mankind. + - title: Aims and Objectives + content: | + The NGO has been established to create a platform for the students who are intent on doing + their bit towards the betterment of society with the objective of helping the underprivileged + and the destitute in any and every way possible. + - title: Mission Statement + content: | + The mission of the NGO is to provide a platform for the students to serve the society and + to inculcate a sense of social responsibility in them. + - title: Vision Statement + content: | + The vision of the NGO is to create a society where everyone has access to basic amenities + and to create a society where everyone is treated equally. + - title: STM Roles + content: | + The membership of the NGO shall be open to all the students of the college who are willing to + serve the society and who are willing to abide by the rules and regulations of the NGO. + sections: + - title: Board Member + content: | + Any person who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO to serve the STM for the lifetime and manage every thing in the STM. + - title: Intermediate Board Member + content: | + Any person who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO to serve the STM for the lifetime and manage every thing in the STM under the board. + - title: College Unit Board Member + content: | + Any person who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO to serve the STM in thier respective college unit within thier academic life. + - title: Coordinator + content: | + Any person who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO to serve and work for the STM after the successfull interview. + - title: Volunteer + content: | + Any person who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO to do service on thier will. + - title: Donor + content: | + Any person who agrees to donate a certain amount of money to the NGO is eligible to become a donor. + - title: Membership + content: | + 1. A person who has been recruited into the organization on follow of process as per Organization rules and regulations and is duly appointed by STM as such for any of the college units or works for the NGO in certain form shall be called as an STM ‘Member’.. + 2. A person who has registered online in the STM website and admitted in the NGO through a confirmation email and according to its regulations continues to be a member of the NGO. + 3. An applicant can only be a member if appointed through the recruitment process by the competent authority as may be defined by society from time to time via the Board. + 4. Any person who donates atleast INR 30 (Rupees Thirty Only) shall be a ‘Donor Member’ of STM, however, a Donor Member is not an official STM ‘Member’ and does not work for the organization. + 5. Eligibility of membership + * (a)The following shall be eligible for membership in the society:- + 1. The applicant will strive to work for the achievement of the objectives of the society. + 2. The applicant shall abide by the Rules and Regulations of the Society. + 3. They shall maintain good moral conduct and behavior. + 6. Termination of membership + * (a)The membership of a member shall be terminated if he/she: + 1. Resigns from the membership of the society. + 2. Is found to be of unsound mind by a competent court. + 3. Is convicted of any offence involving moral turpitude. + 4. On the death of any member. + 5. If they are expelled from the society \ + (a) for misconduct \ + (b) for insubordination \ + (c) due to non-performance + 6. If found inactive or nonperforming, the member would be termed as inactive + member in writing, the member is put under a performance plan by giving + due notice of 3 months’ time from the date of declaration in writing to + perform their duties at a satisfactory level, failing which the membership of + an individual shall be terminated.. + * (b)The authority to terminate or revoke the status of a member shall be vested with the Board for all members. + Intermediate board can terminate or revoke the membership of a member for college units. + Head of the college units can terminate or revoke the membership of a member within the college unit. + - title: Internship + content: | + Internship is a program where the students of the college are given an opportunity to work for the NGO and to learn the working of the NGO as a coordinator in respective collage unit. + sections: + - title: Stipend + content: | + There is no stipend for the internship program. But the interns will be provided with the certificate of internship in thier respective college units. + - title: Duration + content: | + The duration of the internship program is 3 academic years. + - title: Eligibility + content: | + Any student who is willing to serve the society and who is willing to abide by the rules and regulations of the NGO is eligible to become an intern according to the article 7 of the constitution. + - title: Selection Process + content: | + The selection process for the internship program is as follows: + 1. The student should fill the application form for the internship program. + 2. The student should attend the interview conducted by the college board. + 3. The student should be selected by the board. + - title: Roles and Responsibilities + content: | + All the interns should abide by the rules and regulations of the NGO. The interns should work for the NGO in thier respective departments and should work for the betterment of the society. + - title: Board Members + content: | + 1. The board members are responsible for proper functioning of the NGO by guiding IBM.
+ 2. The board members are responsible for all activities of the NGO, but they are not held responsible for any activity undertaken by any member without informing the authorized person.
+ 3. Any new establishments and any modifications shall be done with the final document approval of the board.
+ 4. Board holds the ultimate powers over the STM and its final decisions
+ 5. The board consists of the following members:
+ 1. President + 2. Vice President + 3. General Secretary + 4. Treasurer + 5. Joint Secretary + 6. Executive Members + 6. All the board members should abide by the rules and regulations of the NGO and work according to the constitution of the NGO and by-laws of the NGO.
+ - title: Intermediate Board Members + content: | + The IBM are the members who are selected by the board of the NGO to manage the NGO and to take care of the NGO. + They are responsible for the all legal and financial activities of the NGO. + The IBM consists of the following members: + 1. Human Resources Coordinator + 2. Finance Coordinator + 3. Designing Coordinator + 4. Public Relations Coordinator + 5. Technical Coordinator + 6. Internal Compliance Coordinator + 7. Operations Coordinator + 8. Documentation Coordinator + sections: + - title: Eligibility + content: | + Any person who has been selfless service to the NGO and abides by the rules and regulations of the NGO is eligible to become an IBM. + - title: Selection Process + content: | + The selection process for the IBM is as follows: + 1. The person should fill out the application form for IBM. + 2. The person will engage in recruitment rounds conducted by the board. + 3. The person should be selected by the board. + - title: Roles and Responsibilities + content: | + The Intermediate Board Members are responsible for proper functioning of STM units. IBM should abide by the rules and regulations of the NGO and work according to the constitution. \ + The IBM are as follows: + 1. Human Resources Coordinator: + The Human Resources coordinator is responsible for all activities of the recruitment process and internship programs of the NGO. + 2. Finance Coordinator: + The Finance coordinator is responsible for all financial + activities of the NGO and needs to submit the details time to time to the + Treasurer. The annual report of the NGO should be submitted to the board. + 3. Designing Coordinator: + The Designing coordinator is responsible for all graphics designing activities of the NGO. They are responsible for maintaining high quality designs. + 4. Public Relations Coordinator: + The Public Relations coordinator is + responsible for all public relations activities of the NGO. + 5. Technical Coordinator: + The Technical coordinator is responsible for all + technical activities of the NGO and maintains the high quality of the + technical work. The coordinator needs to promote the open source + technologies of the NGO. + 6. Internal Compliance Coordinator: + The Internal Compliance coordinator is + responsible to ensure that members are acting in accordance with the + constitution and guidelines of the NGO. They can take any action on any + member if they are not following the constitution and guidelines of the + NGO. + 7. Operations Coordinator: + The Operations Coordinator is responsible for day + to day operations of the NGO. + 8. Documentation Coordinator: + The Documentation Coordinator is responsible + for all documents of the NGO and to maintain all documents secured. + + - title: Units + content: | + + sections: + - title: units + content: | + - (a) The units of the NGO which are established in the colleges. Every unit consists a board with following members: + 1. Head + 2. Vice Head + 3. Operations Department Head + 4. Donations Department Head + 5. Technical Department Head + 6. Content and Report writing Department Head + 7. Research and Development Department Head + 8. Graphics Department Head + - (b) All the members of the Unit should abide by the rules and regulations of the NGO and work according to the constitution. \ + - (c) Coordinators are recruited every year through a selection process wherein the candidates are filtered through rounds and are recruited based on the criteria of the STM. \ + - (d) Unselected candidates can still contribute as volunteers for the STM. \ + - title: Establishment + content: | + To establish a unit in a college, the following conditions should be satisfied: + - (a) There should be at least 10 people in the college who are willing to work for the NGO. + - (b) The head of the unit must consult the IBM-Human Resources Coordinator + - (c) The head of the unit must fill the application form for the college unit. + - (d) The head of the unit must attend the interview conducted by the IBM-Human Resources Coordinator + - title: Alumini + content: | + “Alumni” refers to the member who has previously worked with the NGO. + - title: Anual Reports + content: | + 1. All divisions and units must maintain the task reports of all the events taken up during the year, and must submit the reports to the Finance Controller Coordinator of STM at least 2 weeks prior to the AGM + 2. A detailed annual report of all the events conducted throughout the NGO shall be consolidated and maintained by the Finance Controller Coordinator of STM + 3. The Annual Report of the NGO must be compulsorily prepared by the Finance Controller of STM by the AGM in the prescribed format mentioned in the Documentation policy + 4. All the Annual Reports from the inception of the NGO must be maintained in the STM management portal + - title: Sabbatical Leave + content: | + Sabbatical leave is a leave given to the members of the NGO who are working for the NGO for a long time and who are willing to take a break from the NGO for a certain period of time. + sections: + - title: Eligibility + content: | + Any member who is working for the NGO for a long time and who is willing to take a break from the NGO for a certain period of time is eligible for the sabbatical leave. + - title: Application + content: | + The member should fill the application form for the sabbatical leave and should submit the application to the board. + - title: Duration + content: | + The duration of the sabbatical leave will be varied from 6 months to 1 year. According to the application of the member. + - title: Resignation + content: | + Resignation is a process where the member of the NGO can leave the NGO if they are not willing to work for the NGO. + sections: + - title: Eligibility + content: | + Any member who is not willing to work for the NGO is eligible for the resignation. + - title: Application + content: | + The member should fill the application form for the resignation and should submit the application to the board. + - title: Duration + content: | + The duration of the resignation will be varied from 1 month to 3 months. According to the application of the member. + - title: Ammendments + content: | + 1. Any changes to the constitution of the NGO should be done by the board of the NGO. + 2. The ammenments should be done according to the by-laws of the NGO. + 3. All the proposed ammendments should be approved by the board of the NGO, intermediate board of the NGO and all college units of the NGO. + - title: Dissolution + content: | + (a). In an event that the NGO fails to function totally and needs to be dissolved, the whole + board of the NGO shall be dissolved and a new board shall be elected by the General Body. Else, the whole NGO shall be dissolved. \ + (b). College Units of the NGO can only be dissolved by the Board of the NGO + - title: Suspension/Termination + content: | + 1. The Internal Compliance coordinator holds the right to suspend or terminate any member if they violate the constitution or guidelines in any way. + 2. Any member defaming the NGO in any form will be terminated. + 3. Any member of the NGO using the funds for personal/mismanagement, fake bills + and any finance related issues will be terminated and face legal prosecutions. + 4. Any member of the NGO doing fraudulent works, misbehaving with a member + and making false allegations against any member will be terminated. + 5. Any member who does not respond to calls/messages/emails for 2 days will be + warned. If the same instance repeats and fails to inform the reason, he will be + suspended/terminated. + 6. Suspension or termination only happens after receiving a confirmation letter from + the Internal Compliance Coordinator. +ammendments: + - title: Establishing the Constitution + content: | + Establishing the Constitution + archive: /archives/v1 + act: # + date: 2023-10-08T20:20:00+05:30 + author: Pranay Kiran + - title: First Constitution Amendment Act, 2024 + content: | + This Act also called the “Membership Act, 2024” + archive: /archives/v2 + act: acts/First_Constitution_Amendment_Act_2024.pdf + date: 2024-05-02T21:25:00+05:30 + author: M. Revanth Reddy \ No newline at end of file