Skip to content

Commit

Permalink
Merge pull request #769 from prajwalkulkarni/meta-tags
Browse files Browse the repository at this point in the history
Add og meta tags and icon
  • Loading branch information
dkoes committed Feb 28, 2024
2 parents 4d7c346 + 062f053 commit 8885c64
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
Binary file added favicon.ico
Binary file not shown.
33 changes: 18 additions & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
<head>
<meta charset="utf-8">
<title>3Dmol.js - A modern, object-oriented JavaScript library for visualizing molecular data</title>
<meta name="Author" content="David Koes">
<meta property="og:title" content="3Dmol.js - A modern, object-oriented JavaScript library for visualizing molecular data">
<meta property="og:description" content="3Dmol.js is an object-oriented, WebGL based JavaScript library for online molecular visualization - No Java required!">
<meta property="og:image" content="https://avatars.githubusercontent.com/u/15018659?s=200&v=4">
<meta property="og:url" content="https://3dmol.org">

<link rel="icon" type="image/png" href="favicon.ico">
<link rel="apple-touch-icon" href="favicon.ico">
<link type="text/css" rel="stylesheet" href="css/index.css">
<script src="https://code.jquery.com/jquery-3.6.3.min.js"
integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=" crossorigin="anonymous"></script>
Expand All @@ -22,18 +30,18 @@
</script>
<script>
var $3Dmol = $3Dmol || {};
var initSDF = function (viewer) {
var s1 = viewer.addSphere({ radius: 1.25, center: { x: -6.89, y: 0.75, z: 0.35 } });
const initSDF = function (viewer) {
const s1 = viewer.addSphere({ radius: 1.25, center: { x: -6.89, y: 0.75, z: 0.35 } });
s1.wireframe = true; s1.color = $3Dmol.CC.color("purple");
viewer.addLabel("Aromatic", { position: { x: -6.89, y: 0.75, z: 0.35 }, backgroundColor: 0x800080, backgroundOpacity: 0.8 });
var s2 = viewer.addSphere({ radius: 1.25, center: { x: 1.32, y: 2.91, z: -1.49 } });
const s2 = viewer.addSphere({ radius: 1.25, center: { x: 1.32, y: 2.91, z: -1.49 } });
s2.wireframe = true; s2.color = $3Dmol.CC.color("purple");
viewer.addLabel("Aromatic", { position: { x: 1.32, y: 2.91, z: -1.49 }, backgroundColor: 0x800080, backgroundOpacity: 0.8 });

var s3 = viewer.addSphere({ radius: 0.5, center: { x: -0.42, y: -0.48, z: 0.64 } });
const s3 = viewer.addSphere({ radius: 0.5, center: { x: -0.42, y: -0.48, z: 0.64 } });
s3.wireframe = true; s3.color = $3Dmol.CC.color(0xbbbbbb);

var a = viewer.addArrow({
const a = viewer.addArrow({
start: { x: -0.4217, y: -0.4795, z: 0.6395 }, end: { x: -0.613, y: -0.891, z: -0.198 },
radius: 0.1
});
Expand All @@ -44,7 +52,7 @@

};

var initShapes = function (viewer) {
const initShapes = function (viewer) {
$.get('tests/test_structs/benzene-homo.cube', function (data) {
var voldata = new $3Dmol.VolumeData(data, "cube");
if (viewer.hasVolumetricRender()) {
Expand All @@ -65,26 +73,21 @@
}, 'text');
};

var init1YCR = function (viewer) {
const init1YCR = function (viewer) {
viewer.addStyle({}, { "line": {} });
viewer.addSurface($3Dmol.SurfaceType.VDW, { 'opacity': 0.8, colorscheme: 'whiteCarbon' }, { "chain": "A" }, { "chain": "A" });
viewer.addStyle({ "chain": "B" }, { "stick": { colorscheme: 'Jmol' } });
viewer.zoomTo({ "chain": "B" });
};

var addSurf = function (viewer) {
const addSurf = function (viewer) {
viewer.addSurface($3Dmol.SurfaceType.VDW, { opacity: 0.75 },
{ hetflag: false }, { hetflag: false }, { chain: 'B' });
};

$(document).ready(function () {
var hidetext = function () {
$("#text3Dmol").hide();
$("#viewtext").hide();
$("#embedtext").hide();
$("#teachtext").hide();
$("#jupytertext").hide();
$("#developtext").hide();
const hidetext = function () {
$("#text3Dmol, #viewtext, #embedtext, #teachtext, #jupytertext, #developtext").hide();
};
$('#view').hover(
function () {
Expand Down

0 comments on commit 8885c64

Please sign in to comment.