You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
136 lines
8.0 KiB
136 lines
8.0 KiB
/** |
|
**- |
|
* JavaScript providing functions for |
|
* generating the HTML elements |
|
* required by an article |
|
* |
|
* Author - Philip Osztromok |
|
* |
|
* 27 March 2022 |
|
*+ |
|
*/ |
|
|
|
const addSidebar = function (theme) { |
|
const newSidebar = document.getElementById("sidebar") |
|
console.log("The theme is:", theme) |
|
|
|
if (theme == "japanese") { |
|
console.log("japanese clause activated") |
|
newSidebar.innerHTML =` |
|
<h2>USEFUL LINKS</h2> |
|
<h3>Some useful language learning sites</h3> |
|
<a href='https://www.japaneseaudiolessons.com/'>Japanese Audio Flashcard Lessons</a> |
|
<p>A site with some free downloadable resources including audio files and pdfs which can be downloaded for free!</p> |
|
<a href="https://www3.nhk.or.jp/nhkworld/">NHK World Japan</a> |
|
<p>A fun website with a variety of videos teaching viewers about Japanese culture as well as the language. They have a comprehensive section called <a href='https://www3.nhk.or.jp/nhkworld/en/learnjapanese/'>Learn Japanese</a> and a new Japanese course (at time of writing) called <a href='https://www.nhk.or.jp/lesson/en/'>Easy Japanese</a> which includes some short elementary lessons with both audio and video. Highly recommended!</p> |
|
<a href='https://www.tokiniandy.com/'>tokinandy.com</a> |
|
<p>Japanese tutorial site - requires a paid subscription.</p> |
|
<a href='https://www.sljfaq.org/cgi/romaji-kana.cgi'>Convert romaji to kana</a> |
|
<p>A really handy site that allows to to type a word or sentence in romaji and convert it to hiragana and kanji but also Cyrillic (Russian) and Hangul (Korean).</p> |
|
<a href='https://www.tofugu.com/japanese/learn-hiragana/'>Learn Hiragana</a> |
|
<p>From <a href='https://www.tofugu.com/'>tofugu.com</a>, a guide to help you learn the hiragana.</p> |
|
<a href='https://www.tofugu.com/japanese/learn-katakana/'>Learn Katakana</a> |
|
<p>From <a href='https://www.tofugu.com/'>tofugu.com</a>, a guide to help you learn the katakana.</p> |
|
<a href='https://jisho.org/'>Jisho</a> |
|
<p>A Japanese/English dictionary.</p> |
|
<h2>DOWNLOADS</h2> |
|
<a href='/downloads/Hiragana_Unicode.pdf'>Hiragana Unicode</a> |
|
<p>A list of the Hiragana with Unicode values.</p> |
|
<a href='/downloads/Katakana_Unicode.pdf'>Katakana Unicode</a> |
|
<p>A list of the Katakana with Unicode values.</p> |
|
` |
|
} |
|
|
|
else if (theme == "webdev") { |
|
console.log("webdev clause activated") |
|
newSidebar.innerHTML =` |
|
<h2>Web Development Courses</h2> |
|
<a href='https://www.linkedin.com/learning/paths/learn-css'>Learning Path: Learn CSS</a> |
|
<p>12 courses, 26 hours of videos. Some basic CSS courses and more advanced topics including layouts, images and selectors.</p> |
|
<a href='https://www.linkedin.com/learning/paths/advance-your-skills-in-html'>Learning Path: Advance Your Skills in HTML.</a> |
|
<p>11 courses, 25 hours of Video with a good variety frp, basic HTML, to forms, images, multimedia components and tables.</p> |
|
<a href='https://www.linkedin.com/learning/paths/become-a-javascript-developer'>Learning Path: Become a JavaScript Developer</a> |
|
<p>13 courses, 26 hours of videos/ From basic courses to more advanced topics such as Ajax and Modern Browser APIs</p> |
|
<a href='https://www.linkedin.com/learning/paths/advance-your-javascript-skills'>Learning Path: Advance Your JavaScript Skills</a> |
|
<p>10 courses, 14+ hours of videos. Getting into more advanced JavaScript topics such as testing, debugging and security.</p> |
|
<a href='https://www.linkedin.com/learning/paths/explore-react-js-development'>Explore React.js Development</a> |
|
<p>8 courses, 20+ hours pf videos. Introduction to React with some more advanced topics including authentication and server-side rendering.</p> |
|
<a href='https://www.linkedin.com/learning/paths/improve-your-react-skills'>Learning Path: Improve Your React Skills</a> |
|
<p>10 courses, 20+ hours of videos. More advanced topics with a good range, including Security, Testing and Debugging. GraphQL and Firebase</p> |
|
|
|
` |
|
} |
|
|
|
else if (theme == "linux") { |
|
console.log("linux clause activated") |
|
newSidebar.innerHTML =` |
|
<h2>Linux Courses</h2> |
|
<a href='https://www.linkedin.com/learning/learning-ssh-14571185'>Learning SSH</a> |
|
<p>A really good introoduction to SSH, it covers topics such as setting up public/private keys to access a server without a password and port forwarding.</p> |
|
<a href='https://www.linkedin.com/learning/learning-vpn'>Learning VPN</a> |
|
<p>A fairly in-depth introduction to VPN it covers protocols, SSH forwarding and OpenVPN.</p> |
|
<a href='https://www.linkedin.com/learning/learning-sftp'>Learning SFTP</a> |
|
<p>The course covers the basics of using SFTP to transfer files between computers and goes into a bit of depth on how to connect with SFTP.</p> |
|
<a href='https://www.linkedin.com/learning/learning-rsync'>Learning Rsync</a> |
|
<p>The course covers using rsync both locally and remotely.</p> |
|
<a href='https://www.linkedin.com/learning/awk-essential-training'>AWK Essential Training</a> |
|
<p>AWK is something that can be incredibly useful but if you aren't aware of it, you may not realise how much you need. This course gives you a very good introduction to the subject and if you use text files a lot, even if you don't tend to edit them via a command line, you might realise that with AWK, it can be a lot easier to do it that way.</p> |
|
<a href='https://www.linkedin.com/learning/sed-essential-training'>SED Essential Training</a> |
|
<p>SED and AWK are often treated as complementary technologies and with good reason. You could reasonably think of SED as being an extension of AWK, it allows you ro so some of the things you might like to do in AWK but can't.</p> |
|
<a href='https://www.linkedin.com/learning/linux-bash-shell-and-scripts'>Linux: Bash Shell and Scripts</a> |
|
<p>The course was released in 2016 so it is quite old for a tech course, but bash scripting hasn't changed much in the last 20 years or so, so that's not an issue. This is a great introsuction to the topic and it covers both basic topics sucj as variables and arithmetic as well as some advcanced topics like debugging scripts.</p> |
|
<a href='https://www.linkedin.com/learning/bash-patterns-and-regular-expressions'>Bash Patterns and Regular Expressions</a> |
|
<p>Regular Expressions in particular are used in a lot of different technologies in Linux (and other places) so you will find it useful in AWK, Bash Scripting, Perl and so on. Most courses on those topics would include a basic introduction to regexes but having a good understanding can be a good start in learning them.</p> |
|
<a href='https://www.linkedin.com/learning/bash-patterns-and-regular-expressions'>Learning Vim</a> |
|
<p>Vim can seem like a very primitive text editor but if you delve into it a bit, you will find it can be quite powerfiul. At around 75 minutes, this isn't a very long course but it has 7 chapters not counting Conclusion and very few of the individual videos are more than 2 mintes long so it os covering a lot of very short topics but it will give you a good idea of what you can do with Vim.</p> |
|
<a href=''></a> |
|
<p></p> |
|
<a href=''></a> |
|
<p></p> |
|
<a href=''></a> |
|
<p></p> |
|
|
|
` |
|
} |
|
|
|
console.log("The sidebar content is: ", newSidebar) |
|
return newSidebar |
|
} |
|
|
|
function addLinktoCourse (course) { |
|
const newSidebar = document.getElementById("sidebar") |
|
|
|
if (course == "versioncontrolwithgit") { |
|
let href="https://www.linkedin.com/learning/programming-foundations-version-control-with-git/don-t-lose-work" |
|
let name="PROGRAMMING FOUNDATIONS: VERSION CONTROL WITH GIT" |
|
|
|
var my_link = ` |
|
<h2>Link to the course on LinkedIn Learning</h2> |
|
<a href=${href}>${name} |
|
` |
|
} |
|
|
|
else if (course == "learningreactjs") { |
|
let href="https://www.linkedin.com/learning/react-js-essential-training-14836121/building-modern-user-interfaces-with-react?resume=false" |
|
let name="React.js Essential Training" |
|
|
|
var my_link = ` |
|
<h2>Link to the course on LinkedIn Learning</h2> |
|
<a href=${href}>${name} |
|
<p>This is a more up to date replacement for the original Learning ReactJS course and is also by Eve Porcello.</p> |
|
` |
|
} |
|
|
|
console.log("Inserting HTML: ", my_link) |
|
|
|
return my_link; |
|
} |
|
|
|
export { addSidebar, addLinktoCourse } |
|
|
|
/* |
|
* |
|
* helper functions |
|
* |
|
*/ |
|
|
|
|