0% found this document useful (0 votes)
19 views6 pages

My 6 Sem Main

The document is an HTML template for a web page titled 'Semester 6 Materials' that provides a user interface for selecting and viewing educational materials related to various subjects. It includes dropdown menus for subjects and units, a file viewer for displaying selected content, and buttons for viewing or downloading materials. The page is styled with CSS for a visually appealing layout and includes JavaScript for interactivity, allowing users to dynamically select and access course materials.

Uploaded by

mrbob999w42
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

My 6 Sem Main

The document is an HTML template for a web page titled 'Semester 6 Materials' that provides a user interface for selecting and viewing educational materials related to various subjects. It includes dropdown menus for subjects and units, a file viewer for displaying selected content, and buttons for viewing or downloading materials. The page is styled with CSS for a visually appealing layout and includes JavaScript for interactivity, allowing users to dynamically select and access course materials.

Uploaded by

mrbob999w42
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 6

<!

DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Semester 6 Materials</title>
<style>
body {
font-family: Arial, sans-serif;
background: linear-gradient(to bottom, #4a90e2, #8bcefc);
color: #333;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
}

.container {
width: 90%;
max-width: 1200px;
margin-top: 50px;
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

h1 {
text-align: center;
color: #1d61af;
margin-bottom: 20px;
}

.dropdown {
margin-bottom: 20px;
display: flex;
justify-content: space-between;
gap: 10px;
}

select {
padding: 10px;
font-size: 1em;
border-radius: 5px;
border: 1px solid #ccc;
width: 45%;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

select:focus {
border-color: #0078ff;
outline: none;
}

iframe {
width: 100%;
height: 500px;
border: none;
margin-top: 20px;
display: block;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#selected-content {
font-size: 1.2em;
font-weight: bold;
color: #0078ff;
text-align: center;
margin-top: 20px;
}

.fallback-link {
text-align: center;
margin-top: 10px;
}

.fallback-link a {
color: #1d61af;
text-decoration: none;
font-weight: bold;
}

.fallback-link a:hover {
text-decoration: underline;
}

footer {
text-align: center;
margin-top: 40px;
font-size: 0.9em;
color: #777;
}

footer a {
color: #1d61af;
text-decoration: none;
}

footer a:hover {
text-decoration: underline;
}

#actions {
text-align: center;
margin-top: 20px;
}

#actions button {
padding: 10px 20px;
font-size: 1em;
margin: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
}
#actions button:hover {
background-color: #0078ff;
color: white;
}
</style>
</head>
<body>

<div class="container">
<h1>Semester 6 Materials</h1>

<div class="dropdown">
<form id="material-form">
<select id="subject" name="subject">
<option value="">--Select Subject--</option>
<option value="Fundamentals of IoT">Fundamentals of
IoT</option>
<option value="Network Forensics">Network Forensics</option>
<option value="Computer Maintenance and
Troubleshooting">Computer Maintenance and Troubleshooting</option>
<option value="Basic Information Security">Basic Information
Security</option>
<option value="DDCET BOOK">DDCET BOOK</option>
</select>

<select id="unit" name="unit" disabled>


<option value="">--Select Unit--</option>
</select>
</form>
</div>

<div id="selected-content">Please select a subject and unit to view or


download the content.</div>

<div id="actions">
<button id="view-button" style="display: none;">View</button>
<button id="download-button" style="display: none;">Download</button>
</div>

<iframe id="file-viewer" src=""></iframe>


<div class="fallback-link" id="fallback-link"></div>
</div>

<footer>
<p>Content Credits: VPMP Polytechnic and Atul Prakashan Books</p>
<p>&copy; 2025 Om Patel. All rights reserved.</p>
<p>For issues, email: <a
href="mailto:[email protected]">[email protected]</a></p>
</footer>

<script>
const materials = {
'Fundamentals of IoT': {
'FIoT book': 'https://drive.google.com/file/d/1gz-
Z9Kb0dr7HSqCDiINBcNh735N6Rzsy/view?usp=sharing',
'Unit 1':
'https://drive.google.com/file/d/1vrGGhIKzCsXhoWqvGcwgU4jkPZy1Y38r/preview',
'Unit 2': 'https://drive.google.com/file/d/1nH0-
g29mkiQEyy3Mfv1sZNVSYc-6WoWw/preview',
'Unit 3':
'https://drive.google.com/file/d/1p3HE3SU7n0XWVW9NYU1zlh4o2DZUYtvl/preview',
'Unit 4':
'https://drive.google.com/file/d/1KfKqu_TwFxlxk4ETZqCM7jnhcPLQZZJX/preview',
'Unit 5':
'https://drive.google.com/file/d/1Ypn7sFNmS9MzN_o5gc8u41hSKiQyR6Rv/preview',
'Winter Paper':
'https://drive.google.com/file/d/1ZUxQiAjKMUD68nx_VEJvadowlelO9Us_/preview',
'Summer Paper':
'https://drive.google.com/file/d/1A9eVIxvajrMCaKfMBvhq3vZgLGd-OsXC/preview',
'Syllabus': 'https://drive.google.com/file/d/1RBlbk-
0zKbGtXBzfwgILvtCnzty58Tz-/preview',

},
'Network Forensics': {
'Summer Paper':
'https://drive.google.com/file/d/1ab9q51rEDi9uI8aQLQOSY3s0eah9rsXe/preview',
'Winter Paper': 'https://drive.google.com/file/d/1pkqznM9Kwr-
N0LmxbUAsvnbT6xlVqMvU/preview',
'Syllabus':
'https://drive.google.com/file/d/1K9CzWIO5W9d9wwJWDmob9W7khN4UNxi-/preview',

},
'Computer Maintenance and Troubleshooting': {
'Unit 1': 'https://drive.google.com/file/d/1vYmnE6Wv-
RcjDVpcC6QSxgNQI7fP5PkW/preview',
'Unit 2':
'https://drive.google.com/file/d/1drwCqXnKKzQPTmyg0vdSEdhTLLBVCWAx/preview',
'Unit 3':
'https://drive.google.com/file/d/1HwBiBaAdi8z3zyBApRqy0A_w7UgQA8Rz/preview',
'Unit 4': 'https://drive.google.com/file/d/1dioKKK-
cOAk5TLLKpSIf6M_1_BNL8qNM/preview',
'Unit 5':
'https://drive.google.com/file/d/1B_PaLr4J8_KF9kiWsYY1GU5W-J2UViyN/preview',
'Summer Paper':
'https://drive.google.com/file/d/1rJLMucQn3dqIpRL4MzCEL3NmLjnl6wE4/preview',
'Winter Paper':
'https://drive.google.com/file/d/1dCOZv5y73hD_qrl2zAe7WxeHLyBQNJhQ/preview',
'Syllabus':
'https://drive.google.com/file/d/16xeXV8BxP6R4EFW_ry4SeaI4Ne3CO4au/preview',
'CMT Book':
'https://drive.google.com/file/d/1TqyJWil3VDWbmBgavcXfqkErr5wgOa8J/preview',
},
'Basic Information Security': {
'Unit 1':
'https://drive.google.com/file/d/19hHVthDrG6CbOOILxjKF0uuU3S8qUVAv/preview',
'Unit 2':
'https://drive.google.com/file/d/1HXLmAD2fKSRnms2Gx_neuuFxtQSJwfXU/preview',
'Unit 3': 'https://drive.google.com/file/d/1q4-SGiqX-
y80f7EmWaMbq0DMiqLyxjSw/preview',
'Unit 4':
'https://drive.google.com/file/d/1rnaqcQdJe_bUVoWpvYaIunWDU_nF0bP2/preview',
'Unit 5':
'https://drive.google.com/file/d/1j7e_IuxJT1SL0VtkzDH8QIm-3d87-AcR/preview',
'Summer Paper': 'https://drive.google.com/file/d/1ST2Wz-
iSiBSLhHKZZd7B8nNol5atWa_f/preview',
'Winter Paper':
'https://drive.google.com/file/d/1iOCzfIazHclDd2XAuRevgjBbm4CjXGJt/preview',
'Syllabus': 'https://drive.google.com/file/d/1j-
OAXvgaNPWcmk1uErHzJhLRivdrbflh/preview',
'BIS Book':
'https://drive.google.com/file/d/1UJClb5Ri8ohZ6XzjjlGeC7DR6Wq-UqqX/preview',
},
'DDCET BOOK': {
'DDCET Book': 'https://drive.google.com/file/d/1K2FMt-
U0JUcJfz2PsHijXMYIB1MiFhFc/preview',
}

};

const subjectSelect = document.getElementById('subject');


const unitSelect = document.getElementById('unit');
const selectedContent = document.getElementById('selected-content');
const fileViewer = document.getElementById('file-viewer');
const fallbackLink = document.getElementById('fallback-link');
const viewButton = document.getElementById('view-button');
const downloadButton = document.getElementById('download-button');

subjectSelect.addEventListener('change', function () {
const subject = subjectSelect.value;
unitSelect.innerHTML = '<option value="">--Select Unit--</option>';
fallbackLink.innerHTML = ''; // Clear the fallback link

if (subject) {
unitSelect.disabled = false;
Object.keys(materials[subject]).forEach(unit => {
const option = document.createElement('option');
option.value = unit;
option.textContent = unit;
unitSelect.appendChild(option);
});
} else {
unitSelect.disabled = true;
selectedContent.textContent = 'Please select a subject and unit to
view the content.';
fileViewer.src = '';
viewButton.style.display = 'none';
downloadButton.style.display = 'none';
}
});

unitSelect.addEventListener('change', function () {
const subject = subjectSelect.value;
const unit = unitSelect.value;

if (subject && unit && materials[subject][unit]) {


const pdfLink = materials[subject][unit].replace('/view');
selectedContent.textContent = `You have selected: ${unit}`;
fileViewer.src = pdfLink;

// Special case for FIoT book to handle download link directly


if (subject === 'Fundamentals of IoT' && unit === 'FIoT book') {
fileViewer.style.display = 'none';
downloadButton.style.display = 'inline-block';
viewButton.style.display = 'none';

downloadButton.onclick = () => {
const downloadLink =
materials[subject][unit].replace('/view?usp=sharing', '/preview');
window.open(downloadLink, '_blank');
};
} else {
fileViewer.style.display = 'block';
viewButton.style.display = 'inline-block';
downloadButton.style.display = 'inline-block';

viewButton.onclick = () => window.open(pdfLink, '_blank');


downloadButton.onclick = () => {
const downloadLink =
materials[subject][unit].replace('/preview', '');
window.open(downloadLink, '_blank');
};
}
} else {
selectedContent.textContent = 'Please select a subject and unit to
view the content.';
fileViewer.src = '';
viewButton.style.display = 'none';
downloadButton.style.display = 'none';
}
});
</script>

</body>
</html>

You might also like