/ * *
* * -
* 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" ) {
newSidebar . innerHTML = `
< h2 > USEFUL LINKS < / h 2 >
< h3 > Some useful language learning sites < / h 3 >
< 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://www.japaneseverbconjugator.com/' > The Ultra Handy Japanese Verb Conjugator < / a >
< p > The verb conjugations are generated by computer so they ight not be completely correct but it is a very handy tool for conjugating Japanese verbs . < / 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 > w h i c h i n c l u d e s s o m e s h o r t e l e m e n t a r y l e s s o n s w i t h b o t h a u d i o a n d v i d e o . H i g h l y r e c o m m e n d e d ! < / 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 g u i d e t o h e l p y o u l e a r n t h e h i r a g a n a . < / 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 g u i d e t o h e l p y o u l e a r n t h e k a t a k a n a . < / p >
< a href = 'https://jisho.org/' > Jisho < / a >
< p > A Japanese / English dictionary . < / p >
< h2 > DOWNLOADS < / h 2 >
< 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" ) {
newSidebar . innerHTML = `
< h2 > Projects < / h 2 >
< a href = 'http://osztromok.com:3164/' > My Gitea Site < / a >
< h2 > Web Development Courses < / h 2 >
< 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 from 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" ) {
newSidebar . innerHTML = `
< h2 > Linux Courses < / h 2 >
< 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 to do 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 powerful . 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 >
`
}
else if ( theme == "raspberrypi" ) {
newSidebar . innerHTML = `
< h2Fun things to do with your Raspberry Pi / h2 >
< p > To be added later ... . < / p >
`
}
else if ( theme == "hungarian" ) {
newSidebar . innerHTML = `
< h2 > Useful Links < / h 2 >
< p > < a href = 'http://www.hungarianreference.com/' > Hungarian Reference < / a > < / p >
< p > This looks like a useful site for learning Hungarian grammar . < / p >
< p > < a href = 'https://en.wikipedia.org/wiki/Hungarian_alphabet' > Hungarian alphabet . < / a > W i k i p a g e f o r t h e H u n g a r i a n a l p h a b e t . I t c a n b e h a n d y a s a s h o r t c u t t o t y p i n g w o r d s w i t h s p e c i f i c a l l y H u n g a r i a n c h a r a c t e r s a l t h o u g h l e a r n i n g t o d o i t p r o p e r l y u s i n g a H u n g a r i n k e y b o a r d o r l a y o u t w o u l d b e m u c h b e t t e r . < / p >
< h2 > Downloads < / h 2 >
< p > < a href = 'https://myhunlang.com/wp-content/uploads/2013/09/summary_for_hungarian_verbs1.pdf' > Summary for Hungarian Verbs < / a > . A p d f f i l e o n t h e s u b j e c t o f H u n g a r i a n v e r b s . < / p >
< p > < a href = 'https://www.hungarianpod101.com/hungarian-workbooks/' > Hungarian POD 101 < / a > . O f f e r s f r e e w o r k b o o k s f o r b e g i n n n e r s b u t r e q u i r e s a s i g n u p . I d i d n ' t s i g n u p f o r t h e m b u t t h e y l o o k l i k e t h e y w o u l d b e f u n a n d g o o d f o r a b s o l u t e b e g i n n e r s . < / p >
`
}
else if ( theme == "programming" ) {
newSidebar . innerHTML = `
< p > The definition of programming seems fairly clear and recognisable but since there is a separate section on this site for Web Development , this section is really relating to programming that is not being done in the development of a website although a lot of it may be relevant or may relate to the desing of web api ' s and web apps . < / p >
< p > For that reason , you won 't see much (if anything) here related to topics such as JavaScript or PHP so if that' s what you are looking for - check out the Web Development section ! < / p >
< h2 > Useful Links < / h 2 >
< p class = "syntax" > Learning Paths on LinkedIn Learning > < / p >
< p > < a href = 'https://www.linkedin.com/learning/paths/become-a-programmer-foundations' > Becoming a Programmer : Foundations < / a > < . T h i s i s a f a i r l y b a s i c i n t r o d u c t i o n t o a n u m b e r o f p r o g r a m m i n g t o p i c s . I d o n ' t k n o w h o w o l d e a c h o f t h e c o u r s e s a r e b u t t h e y w e r e a l l u p d a t e d i n A p r i l 2 0 2 4 s o t h e y s h o u l d a l l b e u p t o d a t e . T h e r e a r e 1 2 c o u r s e s w i t h a t o t a l t i m e o f 1 2 h o u r s a n d t h e y a r e t a u g h t b e 1 4 d i f f e r e n t p e o p l e . I t s t a r t s f r o m v e r y b a s i c p r i n c i p l e s s u c h a s v a r i a b l e s a n d f u n c t i o n s b u t c o v e r s m o r e a d v a n c e d t o p i c s s u c h a s O b j e c t O r i e n t e d D e s i g n , A l g o r i t h m s , D a t a b a s e s , T e s t i n g a n d o t h e r s . I w o u l d r e c o m m e n d i t a s a g o o d i n t r o d u c t i o n f o r a n y o n e w a n t i n g t o g e t m o r e o f a n u n d e r s t a n d i n g o f p r o g r a m m i n g . I t d o e s n ' t r e a l l y f o c u s o n a n d o n e l a n g u a g e b u t t h e e a r l y c o u r s e s a t l e a s t d o f o c u s m o r e o n p y t h o n a n d u s e i t f o r m o s t o f t h e c o d e e x a m p l e s . < / p >
< h2 > Downloads < / h 2 >
< p class = "syntax" > Where to download programming languages < / p >
< p > < a href = 'https://www.python.org/downloads/' > Python < / p >
< p > < a href = 'https://go.dev/doc/install' > Go < / p >
< p > < a href = 'https://www.rust-lang.org/tools/install' > Rust < / p >
< p > < a href = 'https://sourceforge.net/projects/gnucobol/' > GnuCOBOL < / p >
< p class = "syntax" > Useful tools to download < / p >
< p > < a href = 'https://code.visualstudio.com/download' > Visual Studio Code < / a > < / p >
`
}
console . log ( "Sidebar is: " , newSidebar ) ;
return newSidebar
}
export { addSidebar }
/ *
*
* helper functions
*
* /