Main Page: Difference between revisions

Imported from pramati-sarvamoola XML (grantha.io importer v3)
Imported from pramati-sarvamoola XML (grantha.io importer v3)
Line 3: Line 3:
<div class="gr-home-page-title">सर्वमूलग्रन्थाः</div>
<div class="gr-home-page-title">सर्वमूलग्रन्थाः</div>
<div class="gr-home-toggle" id="gr-home-toggle">
<div class="gr-home-toggle" id="gr-home-toggle">
<button class="gr-toggle-btn gr-toggle-active" id="gr-toggle-grantha" onclick="grHomeView('grantha')">ग्रन्थानुसारम्</button>
<div class="gr-toggle-btn gr-toggle-active" id="gr-toggle-grantha" tabindex="0" role="button">ग्रन्थानुसारम्</div>
<button class="gr-toggle-btn" id="gr-toggle-author" onclick="grHomeView('author')">कर्त्रनुसारम्</button>
<div class="gr-toggle-btn" id="gr-toggle-author" tabindex="0" role="button">कर्त्रनुसारम्</div>
</div>
</div>


Line 247: Line 247:


</div>
</div>
<script>
function grHomeView(v){
  document.getElementById("gr-view-grantha").style.display = v==="grantha"?"":"none";
  document.getElementById("gr-view-author").style.display  = v==="author" ?"":"none";
  document.getElementById("gr-toggle-grantha").className = "gr-toggle-btn"+(v==="grantha"?" gr-toggle-active":"");
  document.getElementById("gr-toggle-author").className  = "gr-toggle-btn"+(v==="author" ?" gr-toggle-active":"");
  try{localStorage.setItem("gr_home_view",v);}catch(e){}
}
(function(){
  var v;try{v=localStorage.getItem("gr_home_view");}catch(e){}
  if(v==="author")grHomeView("author");
})();
</script>
[[Category:Sanskrit Documents]]
[[Category:Sanskrit Documents]]