diff --git a/Gemfile.lock b/Gemfile.lock index 2e8d0a7b3902..bb9672cca361 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,16 +1,17 @@ GEM remote: https://rubygems.org/ specs: - activesupport (7.1.3.4) + activesupport (7.2.1) base64 bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) base64 (0.2.0) @@ -27,7 +28,7 @@ GEM fast-stemmer (~> 1.0) matrix (~> 0.4) colorator (1.1.0) - concurrent-ruby (1.3.3) + concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) csl (1.6.0) @@ -35,7 +36,7 @@ GEM rexml csl-styles (1.0.1.11) csl (~> 1.0) - css_parser (1.17.1) + css_parser (1.19.0) addressable cssminify2 (2.0.1) csv (3.3.0) @@ -56,16 +57,16 @@ GEM ffi (1.17.0-x86_64-linux-gnu) forwardable-extended (2.6.0) gemoji (4.1.0) - google-protobuf (4.27.5-aarch64-linux) + google-protobuf (4.28.2-aarch64-linux) bigdecimal rake (>= 13) - google-protobuf (4.27.5-arm64-darwin) + google-protobuf (4.28.2-arm64-darwin) bigdecimal rake (>= 13) - google-protobuf (4.27.5-x86_64-darwin) + google-protobuf (4.28.2-x86_64-darwin) bigdecimal rake (>= 13) - google-protobuf (4.27.5-x86_64-linux) + google-protobuf (4.28.2-x86_64-linux) bigdecimal rake (>= 13) html-pipeline (2.14.3) @@ -77,9 +78,9 @@ GEM csv mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) - jekyll (4.3.3) + jekyll (4.3.4) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) @@ -146,26 +147,26 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) latex-decode (0.4.0) - libv8-node (22.5.1.0-aarch64-linux) - libv8-node (22.5.1.0-arm64-darwin) - libv8-node (22.5.1.0-x86_64-darwin) - libv8-node (22.5.1.0-x86_64-linux) + libv8-node (22.7.0.4-aarch64-linux) + libv8-node (22.7.0.4-arm64-darwin) + libv8-node (22.7.0.4-x86_64-darwin) + libv8-node (22.7.0.4-x86_64-linux) liquid (4.0.4) listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + logger (1.6.1) loofah (2.22.0) crass (~> 1.0.2) nokogiri (>= 1.12.0) matrix (0.4.2) mercenary (0.4.0) mini_mime (1.1.5) - mini_racer (0.13.0) - libv8-node (~> 22.5.1.0) - minitest (5.24.1) + mini_racer (0.15.0) + libv8-node (~> 22.7.0.1) + minitest (5.25.1) multi_xml (0.7.1) bigdecimal (~> 3.1) - mutex_m (0.2.0) namae (1.2.0) racc (~> 1.7) nokogiri (1.16.7-aarch64-linux) @@ -184,29 +185,28 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.3.6) - strscan - rouge (4.3.0) + rexml (3.3.7) + rouge (4.4.0) safe_yaml (1.0.5) - sass-embedded (1.77.8-aarch64-linux-gnu) - google-protobuf (~> 4.26) - sass-embedded (1.77.8-arm64-darwin) - google-protobuf (~> 4.26) - sass-embedded (1.77.8-x86_64-darwin) - google-protobuf (~> 4.26) - sass-embedded (1.77.8-x86_64-linux-gnu) - google-protobuf (~> 4.26) + sass-embedded (1.79.3-aarch64-linux-gnu) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-arm64-darwin) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86_64-darwin) + google-protobuf (~> 4.27) + sass-embedded (1.79.3-x86_64-linux-gnu) + google-protobuf (~> 4.27) sax-machine (1.3.2) - strscan (3.1.0) + securerandom (0.3.1) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - uglifier (4.2.0) + uglifier (4.2.1) execjs (>= 0.3.0, < 3) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) unicode_utils (1.4.0) - webrick (1.8.1) + webrick (1.8.2) PLATFORMS aarch64-linux diff --git a/_bibliography/papers.bib b/_bibliography/papers.bib index 7eb630d8bff8..d8c6b05cf255 100644 --- a/_bibliography/papers.bib +++ b/_bibliography/papers.bib @@ -1,207 +1,115 @@ -@inproceedings{chen2015fpa, - abbr={CVPR}, - bibtex_show={true}, - title={FPA-CS: Focal Plane Array-based Compressive Imaging in Short-wave Infrared}, - author={Chen, Huaijin and Asif, M Salman and Sankaranarayanan, Aswin C and Veeraraghavan, Ashok}, - booktitle={Computer Vision and Pattern Recognition (CVPR), 2015}, - pages={2358--2366}, - year={2015}, - pdf={http://imagesci.ece.cmu.edu/files/paper/2015/FPA-CS.pdf} -} - -@inproceedings{chen2016asp, - abbr={CVPR}, - bibtex_show={true}, - title={ASP Vision: Optically Computing the First Layer of Convolutional Neural Networks using Angle Sensitive Pixels}, - author={Chen, Huaijin and Jayasuriya, Suren and Yang, Jiyue and Stephen, Judy and Sivaramakrishnan, Sriram and Veeraraghavan, Ashok and Molnar, Alyosha}, - booktitle={Computer Vision and Pattern Recognition (CVPR), 2016}, - year={2016}, - website={https://openaccess.thecvf.com/content_cvpr_2016/html/Chen_ASP_Vision_Optically_CVPR_2016_paper.html}, - pdf={https://openaccess.thecvf.com/content_cvpr_2016/papers/Chen_ASP_Vision_Optically_CVPR_2016_paper.pdf}, - code={https://github.com/sjayasur/ASPVision}, - slides={https://www.youtube.com/watch?v=QWnDo6ahjg0}, - note={Oral} -} - -@article{wang2017compressive, - abbr={OSA OE}, - bibtex_show={true}, - title={Compressive holographic video}, - author={Wang, Zihao and Spinoulas, Leonidas and He, Kuan and Tian, Lei and Cossairt, Oliver and Katsaggelos, Aggelos K and Chen, Huaijin}, - journal={Optics express}, - volume={25}, - number={1}, - pages={250--262}, - year={2017}, - publisher={Optica Publishing Group}, - pdf={https://opg.optica.org/oe/viewmedia.cfm?uri=oe-25-1-250&seq=0}, - website={https://compphotolab.northwestern.edu/project/chv/} -} - -@inproceedings{chen2018reblur2deblur, - abbr={ICCP}, - bibtex_show={true}, - title={Reblur2Deblur: Deblurring Videos via Self-Supervised Learning}, - author={Chen, Huaijin and Gu, Jinwei and Gallo, Orazio and Liu, Ming-Yu and Veeraraghavan, Ashok and Kautz, Jan}, - booktitle={International Conference on Computational Photography (ICCP), 2018}, - year={2018}, - organization={IEEE}, - pdf={https://ieeexplore.ieee.org/iel7/8363087/8368460/08368468.pdf}, - code={https://drive.google.com/file/d/1VDbeyFz4GVYvd8uitsI7Hx4d-ed_JiTg/view?usp=sharing}, - website={https://research.nvidia.com/publication/2018-05_reblur2deblur-deblurring-videos-self-supervised-learning}, - slides={https://youtu.be/MvDNGDn_TtM?t=2950} -} +--- +--- -@inproceedings{wu2019phasecam3d, - abbr={ICCP}, - bibtex_show={true}, - title={PhaseCam3D—Learning Phase Masks for Passive Single View Depth Estimation}, - author={Wu, Yicheng and Boominathan, Vivek and Chen, Huaijin and Sankaranarayanan, Aswin and Veeraraghavan, Ashok}, - booktitle={2019 IEEE International Conference on Computational Photography (ICCP)}, - pages={1--12}, - year={2019}, - organization={IEEE}, - website={https://yichengwu.github.io/PhaseCam3D/}, - code={https://github.com/YichengWu/PhaseCam3D}, - slides={https://www.youtube.com/watch?v=CV4vEAjBv20}, - pdf={http://imagesci.ece.cmu.edu/files/paper/2019/PhaseCam_ICCP19.pdf}, - note={{Best Poster Award}} -} +@string{aps = {American Physical Society,}} -@article{chen2019fast, - abbr={IEEE TCI}, - bibtex_show={true}, - title={Fast retinomorphic event-driven representations for video gameplay and action recognition}, - author={Chen, Huaijin and Liu, Wanjia and Goel, Rishab and Lua, Rhonald C and Mittal, Siddharth and Huang, Yuzhong and Veeraraghavan, Ashok and Patel, Ankit B}, - journal={IEEE Transactions on Computational Imaging}, - volume={6}, - pages={276--290}, - year={2019}, - publisher={IEEE}, - pdf={https://ieeexplore.ieee.org/iel7/6745852/8977810/08878127.pdf} +@book{einstein1920relativity, + title={Relativity: the Special and General Theory}, + author={Einstein, Albert}, + year={1920}, + publisher={Methuen & Co Ltd}, + html={relativity.html} } -@article{chen2017cs, - abbr={OSA OE}, +@book{einstein1956investigations, bibtex_show={true}, - title={CS-ToF: High-resolution compressive time-of-flight imaging}, - author={Chen, Huaijin and Li, Fengqiang and Pediredla, Adithya and Yeh, Chiakai and He, Kuan and Veeraraghavan, Ashok and Cossairt, Oliver}, - journal={Optics express}, - volume={25}, - number={25}, - pages={31096--31110}, - year={2017}, - publisher={Optical Society of America}, - website={https://compphotolab.northwestern.edu/project/cs-tof-high-resolution-compressive-time-of-flight-imaging/}, - slides={https://compphotolab.northwestern.edu/wordpress/wp-content/uploads/2017/11/Slides-OE-CS-ToF.pdf}, - pdf={https://opg.optica.org/oe/viewmedia.cfm?uri=oe-25-25-31096&seq=0} + title={Investigations on the Theory of the Brownian Movement}, + author={Einstein, Albert}, + year={1956}, + publisher={Courier Corporation}, + preview={brownian-motion.gif} } -@article{gutierrez2021itof2dtof, - abbr={IEEE TCI}, +@article{einstein1950meaning, + abbr={AJP}, bibtex_show={true}, - title={iToF2dToF: A robust and flexible representation for data-driven time-of-flight imaging}, - author={Gutierrez-Barragan, Felipe and Chen, Huaijin and Gupta, Mohit and Velten, Andreas and Gu, Jinwei}, - journal={IEEE Transactions on Computational Imaging}, - volume={7}, - pages={1205--1214}, - year={2021}, - publisher={IEEE}, - website={https://tinyurl.com/itof2dtof/}, - slides={https://www.youtube.com/watch?v=otMm0RtggNo}, - code={https://tinyurl.com/itof2dtof/}, - pdf={https://ieeexplore.ieee.org/iel7/6745852/6960042/09609533.pdf}, - arxiv={2103.07087} + title={The meaning of relativity}, + author={Einstein, Albert and Taub, AH}, + journal={American Journal of Physics}, + volume={18}, + number={6}, + pages={403--404}, + year={1950}, + publisher={American Association of Physics Teachers} } -@inproceedings{feng2021removing, - abbr={CVPR}, - bibtex_show={true}, - title={Removing diffraction image artifacts in under-display camera via dynamic skip connection network}, - author={Feng, Ruicheng and Li, Chongyi and Chen, Huaijin and Li, Shuai and Loy, Chen Change and Gu, Jinwei}, - booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, - pages={662--671}, - year={2021}, - website={https://jnjaby.github.io/projects/UDC/}, - code={https://github.com/jnjaby/DISCNet}, - pdf={https://openaccess.thecvf.com/content/CVPR2021/papers/Feng_Removing_Diffraction_Image_Artifacts_in_Under-Display_Camera_via_Dynamic_Skip_CVPR_2021_paper.pdf} +@article{PhysRev.47.777, + abbr={PhysRev}, + title={Can Quantum-Mechanical Description of Physical Reality Be Considered Complete?}, + author={Einstein*†, A. and Podolsky*, B. and Rosen*, N.}, + abstract={In a complete theory there is an element corresponding to each element of reality. A sufficient condition for the reality of a physical quantity is the possibility of predicting it with certainty, without disturbing the system. In quantum mechanics in the case of two physical quantities described by non-commuting operators, the knowledge of one precludes the knowledge of the other. Then either (1) the description of reality given by the wave function in quantum mechanics is not complete or (2) these two quantities cannot have simultaneous reality. Consideration of the problem of making predictions concerning a system on the basis of measurements made on another system that had previously interacted with it leads to the result that if (1) is false then (2) is also false. One is thus led to conclude that the description of reality as given by a wave function is not complete.}, + journal={Phys. Rev.}, + location={New Jersey}, + volume={47}, + issue={10}, + pages={777--780}, + numpages={0}, + year={1935}, + month={May}, + publisher=aps, + doi={10.1103/PhysRev.47.777}, + url={http://link.aps.org/doi/10.1103/PhysRev.47.777}, + html={https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777}, + pdf={example_pdf.pdf}, + altmetric={248277}, + dimensions={true}, + google_scholar_id={qyhmnyLat1gC}, + video={https://www.youtube-nocookie.com/embed/aqz-KE-bpKQ}, + additional_info={. *More Information* can be [found here](https://github.com/alshedivat/al-folio/)}, + annotation={* Example use of superscripts
† Albert Einstein}, + selected={true}, + inspirehep_id = {3255} } -@inproceedings{zhou2020udc, - abbr={ECCV}, - bibtex_show={true}, - title={UDC 2020 challenge on image restoration of under-display camera: Methods and results}, - author={Zhou, Yuqian and Kwan, Michael and Tolentino, Kyle and Emerton, Neil and Lim, Sehoon and Large, Tim and Fu, Lijiang and Pan, Zhihong and Li, Baopu and Yang, Qirui and others}, - booktitle={European Conference on Computer Vision}, - pages={337--351}, - year={2020}, - organization={Springer, Cham}, - arxiv={2008.07742} +@article{einstein1905molekularkinetischen, + title={{\"U}ber die von der molekularkinetischen Theorie der W{\"a}rme geforderte Bewegung von in ruhenden Fl{\"u}ssigkeiten suspendierten Teilchen}, + author={Einstein, A.}, + journal={Annalen der physik}, + volume={322}, + number={8}, + pages={549--560}, + year={1905}, + publisher={Wiley Online Library} } -@article{duan2022jpd, - abbr={IEEE TIP}, - bibtex_show={true}, - title={JPD-SE: High-Level Semantics for Joint Perception-Distortion Enhancement in Image Compression}, - author={Duan, Shiyu and Chen, Huaijin and Gu, Jinwei}, - journal={IEEE Transactions on Image Processing}, - volume={31}, - pages={4405--4416}, - year={2022}, - publisher={IEEE}, - code={https://github.com/SenseBrain/JPD-SE}, - pdf={https://ieeexplore.ieee.org/iel7/83/4358840/09807639.pdf}, - doi={https://doi.org/10.1109/TIP.2022.3180208} +@article{einstein1905movement, + abbr={Ann. Phys.}, + title={Un the movement of small particles suspended in statiunary liquids required by the molecular-kinetic theory 0f heat}, + author={Einstein, A.}, + journal={Ann. Phys.}, + volume={17}, + pages={549--560}, + year={1905} } -@article{rego2022deep, - abbr={OSA OE}, - bibtex_show={true}, - title={Deep camera obscura: an image restoration pipeline for pinhole photography}, - author={Rego, Joshua D and Chen, Huaijin and Li, Shuai and Gu, Jinwei and Jayasuriya, Suren}, - journal={Optics Express}, - volume={30}, - number={15}, - pages={27214--27235}, - year={2022}, - publisher={Optica Publishing Group}, - pdf={https://opg.optica.org/oe/viewmedia.cfm?uri=oe-30-15-27214&seq=0}, - code={https://github.com/ImagingLyceum-ASU/dco-pinhole-restoration/} +@article{einstein1905electrodynamics, + title={On the electrodynamics of moving bodies}, + author={Einstein, A.}, + year={1905} } -@inproceedings{hu2022joint, - abbr={WACV}, +@Article{einstein1905photoelectriceffect, bibtex_show={true}, - title={Joint Multi-Scale Tone Mapping and Denoising for HDR Image Enhancement}, - author={Hu, Litao and Chen, Huaijin and Allebach, Jan P}, - booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision}, - pages={729--738}, - year={2022}, - code={https://github.com/hulitaotom/Joint-Multi-Scale-Tone-Mapping-and-Denoising-for-HDR-Image-Enhancement}, - pdf={https://openaccess.thecvf.com/content/WACV2022W/WACI/papers/Hu_Joint_Multi-Scale_Tone_Mapping_and_Denoising_for_HDR_Image_Enhancement_WACVW_2022_paper.pdf} + abbr={Ann. Phys.}, + title="{{\"U}ber einen die Erzeugung und Verwandlung des Lichtes betreffenden heuristischen Gesichtspunkt}", + author={Albert Einstein}, + abstract={This is the abstract text.}, + journal={Ann. Phys.}, + volume={322}, + number={6}, + pages={132--148}, + year={1905}, + doi={10.1002/andp.19053220607}, + award={Albert Einstein receveid the **Nobel Prize in Physics** 1921 *for his services to Theoretical Physics, and especially for his discovery of the law of the photoelectric effect*}, + award_name={Nobel Prize} } -@inproceedings{feng2023generating, - abbr={CVPR}, +@book{przibram1967letters, bibtex_show={true}, - title={Generating Aligned Pseudo-Supervision from Non-Aligned Data for Image Restoration in Under-Display Camera}, - author={Feng, Ruicheng and Li, Chongyi and Chen, Huaijin and Li, Shuai and Gu, Jinwei and Loy, Chen Change}, - booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, - pages={5013--5022}, - year={2023}, - code={https://github.com/jnjaby/AlignFormer}, - pdf={https://openaccess.thecvf.com/content/CVPR2023/papers/Feng_Generating_Aligned_Pseudo-Supervision_From_Non-Aligned_Data_for_Image_Restoration_in_CVPR_2023_paper.pdf} + title={Letters on wave mechanics}, + author={Einstein, Albert and Schrödinger, Erwin and Planck, Max and Lorentz, Hendrik Antoon and Przibram, Karl}, + year={1967}, + publisher={Vision}, + preview={wave-mechanics.gif}, + abbr={Vision} } - -@inproceedings{lu2023transflow, - abbr={CVPR}, - bibtex_show={true}, - title={Transflow: Transformer as flow learner}, - author={Lu, Yawen and Wang, Qifan and Ma, Siqi and Geng, Tong and Chen, Yingjie Victor and Chen, Huaijin and Liu, Dongfang}, - booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition}, - pages={18063--18073}, - year={2023}, - pdf={https://openaccess.thecvf.com/content/CVPR2023/papers/Lu_TransFlow_Transformer_As_Flow_Learner_CVPR_2023_paper.pdf}, - code={https://github.com/Alvin0629/TransFlow} -} - diff --git a/_config.yml b/_config.yml index 9b93cf88054a..4411534b7f60 100644 --- a/_config.yml +++ b/_config.yml @@ -3,24 +3,24 @@ # ----------------------------------------------------------------------------- title: blank # the website title (if blank, full name will be used instead) -first_name: Huaijin -middle_name: (George) -last_name: Chen -email: huaijin.chen@gmail.com +first_name: You +middle_name: R. +last_name: Name +email: you@example.com description: > # the ">" symbol means to ignore newlines until "footer_text:" - Huaijin (George) Chen's Personal Website. + A simple, whitespace theme for academics. Based on [*folio](https://github.com/bogoli/-folio) design. footer_text: > Powered by Jekyll with al-folio theme. Hosted by GitHub Pages. -keywords: computational photography, deep learning # add your own keywords or leave empty - + Photos from Unsplash. +keywords: jekyll, jekyll-theme, academic-website, portfolio-website # add your own keywords or leave empty lang: en # the language of your site (for example: en, fr, cn, ru, etc.) -icon: 📷 # the emoji used as the favicon (alternatively, provide image name in /assets/img/) +icon: ⚛️ # the emoji used as the favicon (alternatively, provide image name in /assets/img/) -url: https://hgchen.com # the base hostname & protocol for your site -baseurl: # the subpath of your site, e.g. /blog/ -last_updated: true # set to true if you want to display last updated in the footer -impressum_path: # set to path to include impressum link in the footer, use the same path as permalink in a page, helps to conform with EU GDPR +url: https://alshedivat.github.io # the base hostname & protocol for your site +baseurl: /al-folio # the subpath of your site, e.g. /blog/. Leave blank for root +last_updated: false # set to true if you want to display last updated in the footer +impressum_path: # set to path to include impressum link in the footer, use the same path as permalink in a page, helps to conform with EU GDPR back_to_top: true # set to false to disable the back to top button # ----------------------------------------------------------------------------- @@ -31,9 +31,9 @@ back_to_top: true # set to false to disable the back to top button repo_theme_light: default # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md repo_theme_dark: dark # https://github.com/anuraghazra/github-readme-stats/blob/master/themes/README.md repo_trophies: - enabled: false - theme_light: flat # https://github.com/ryo-ma/github-profile-trophy - theme_dark: gitdimmed # https://github.com/ryo-ma/github-profile-trophy + enabled: true + theme_light: flat # https://github.com/ryo-ma/github-profile-trophy + theme_dark: gitdimmed # https://github.com/ryo-ma/github-profile-trophy # ----------------------------------------------------------------------------- # RSS Feed @@ -81,13 +81,13 @@ flickr_id: # your flickr id github_username: # your GitHub user name gitlab_username: # your GitLab user name ieee_id: # your ieeexplore.ieee.org/author/id -inspirehep_id: # Inspire HEP author ID +inspirehep_id: 1010907 # Inspire HEP author ID instagram_id: # your instagram id kaggle_id: # your kaggle id keybase_username: # your keybase user name lastfm_id: # your lastfm id lattes_id: # your ID on Lattes (Brazilian Lattes CV) -linkedin_username: huaijinchen # your LinkedIn user name +linkedin_username: # your LinkedIn user name mastodon_username: # your mastodon instance+username in the format instance.tld/@username medium_username: # your Medium username orcid_id: # your ORCID ID @@ -96,7 +96,7 @@ pinterest_id: # your pinterest id publons_id: # your ID on Publons quora_username: # your Quora username research_gate_profile: # your profile on ResearchGate -scholar_userid: 6E9elWUAAAAJ # your Google Scholar ID +scholar_userid: qc6CJjYAAAAJ # your Google Scholar ID scopus_id: # your profile on Scopus semanticscholar_id: # your Semantic Scholar ID spotify_id: # your spotify id @@ -111,7 +111,9 @@ work_url: # work page URL x_username: # your X handle youtube_id: # your youtube channel id (youtube.com/@) zotero_username: # your zotero username -contact_note: # You can even add a little note about which of these is the best way to reach you. + +contact_note: > + You can even add a little note about which of these is the best way to reach you. # ----------------------------------------------------------------------------- # Analytics and search engine verification @@ -127,52 +129,52 @@ pirsch_analytics: # your Pirsch analytics site ID (length 32 characters) google_site_verification: # your google-site-verification ID (Google Search Console) bing_site_verification: # out your bing-site-verification ID (Bing Webmaster) -## ----------------------------------------------------------------------------- -## Blog -## ----------------------------------------------------------------------------- -# -#blog_name: al-folio # blog_name will be displayed in your blog page -#blog_description: a simple whitespace theme for academics -#permalink: /blog/:year/:title/ -#lsi: false # produce an index for related posts -# -## Pagination -#pagination: -# enabled: true -# -#related_blog_posts: -# enabled: true -# max_related: 5 -# -## Giscus comments (RECOMMENDED) -## Follow instructions on https://giscus.app/ to setup for your repo to fill out the information below. -#giscus: -# repo: # / -# repo_id: # leave empty or specify your repo_id (see https://giscus.app/) -# category: Comments # name of the category under which discussions will be created -# category_id: # leave empty or specify your category_id (see https://giscus.app/) -# mapping: title # identify discussions by post title -# strict: 1 # use strict identification mode -# reactions_enabled: 1 # enable (1) or disable (0) emoji reactions -# input_position: bottom # whether to display input form below (bottom) or above (top) the comments -# theme: preferred_color_scheme # name of the color scheme (preferred works well with al-folio light/dark mode) -# emit_metadata: 0 -# lang: en -# -## Disqus comments (DEPRECATED) -#disqus_shortname: al-folio # put your disqus shortname -## https://help.disqus.com/en/articles/1717111-what-s-a-shortname -# -## External sources. -## If you have blog posts published on medium.com or other external sources, -## you can display them in your blog by adding a link to the RSS feed. -#external_sources: -# - name: medium.com -# rss_url: https://medium.com/@al-folio/feed -# - name: Google Blog -# posts: -# - url: https://blog.google/technology/ai/google-gemini-update-flash-ai-assistant-io-2024/ -# published_date: 2024-05-14 +# ----------------------------------------------------------------------------- +# Blog +# ----------------------------------------------------------------------------- + +blog_name: al-folio # blog_name will be displayed in your blog page +blog_description: a simple whitespace theme for academics +permalink: /blog/:year/:title/ +lsi: false # produce an index for related posts + +# Pagination +pagination: + enabled: true + +related_blog_posts: + enabled: true + max_related: 5 + +# Giscus comments (RECOMMENDED) +# Follow instructions on https://giscus.app/ to setup for your repo to fill out the information below. +giscus: + repo: # / + repo_id: # leave empty or specify your repo_id (see https://giscus.app/) + category: Comments # name of the category under which discussions will be created + category_id: # leave empty or specify your category_id (see https://giscus.app/) + mapping: title # identify discussions by post title + strict: 1 # use strict identification mode + reactions_enabled: 1 # enable (1) or disable (0) emoji reactions + input_position: bottom # whether to display input form below (bottom) or above (top) the comments + theme: preferred_color_scheme # name of the color scheme (preferred works well with al-folio light/dark mode) + emit_metadata: 0 + lang: en + +# Disqus comments (DEPRECATED) +disqus_shortname: al-folio # put your disqus shortname +# https://help.disqus.com/en/articles/1717111-what-s-a-shortname + +# External sources. +# If you have blog posts published on medium.com or other external sources, +# you can display them in your blog by adding a link to the RSS feed. +external_sources: + - name: medium.com + rss_url: https://medium.com/@al-folio/feed + - name: Google Blog + posts: + - url: https://blog.google/technology/ai/google-gemini-update-flash-ai-assistant-io-2024/ + published_date: 2024-05-14 # ----------------------------------------------------------------------------- # Newsletter @@ -194,7 +196,7 @@ collections: output: true permalink: /:collection/:title/ projects: - output: false + output: true permalink: /:collection/:title/ announcements: @@ -203,7 +205,7 @@ announcements: limit: 5 # leave blank to include all the news in the `_news` folder latest_posts: - enabled: false + enabled: true scrollable: true # adds a vertical scroll bar if there are more than 3 new posts items limit: 3 # leave blank to include all the blog posts @@ -311,9 +313,8 @@ display_categories: ["external-services"] # these categories will be displayed o # ----------------------------------------------------------------------------- scholar: - - last_name: [Chen] - first_name: [Huaijin, H.] + last_name: [Einstein] + first_name: [Albert, A.] style: apa locale: en @@ -372,8 +373,8 @@ filtered_bibtex_keywords: ] # Maximum number of authors to be shown for each publication (more authors are visible on click) -max_author_limit: 6 # leave blank to always show all authors -more_authors_animation_delay: 10 # more authors are revealed on click using animation; smaller delay means faster animation +max_author_limit: 3 # leave blank to always show all authors +more_authors_animation_delay: 10 # more authors are revealed on click using animation; smaller delay means faster animation # Enables publication thumbnails. If disabled, none of the publications will display thumbnails, even if specified in the bib entry. enable_publication_thumbnails: true @@ -433,7 +434,7 @@ enable_masonry: true # enables automatic project cards arrangement enable_math: true # enables math typesetting (uses MathJax) enable_tooltips: false # enables automatic tooltip links generated for each section titles on pages and posts enable_darkmode: true # enables switching between light/dark modes -enable_navbar_social: true # enables displaying social links in the navbar on the about page +enable_navbar_social: false # enables displaying social links in the navbar on the about page enable_project_categories: true # enables categorization of projects into multiple categories enable_medium_zoom: true # enables image zoom feature (as on medium.com) enable_progressbar: true # enables a horizontal progress bar linked to the vertical scroll position diff --git a/_data/coauthors.yml b/_data/coauthors.yml index cc0fe384fc20..5a989cf01e3e 100644 --- a/_data/coauthors.yml +++ b/_data/coauthors.yml @@ -1,19 +1,34 @@ -"Veeraraghavan": - - firstname: ["Ashok", "A."] - url: https://computationalimaging.rice.edu/team/ashok-veeraraghavan/ +"adams": + - firstname: ["Edwin", "E.", "E. P.", "Edwin Plimpton"] + url: https://en.wikipedia.org/wiki/Edwin_Plimpton_Adams -"Gu": - - firstname: ["Jinwei", "J."] - url: https://www.gujinwei.org/ +"podolsky": + - firstname: ["Boris", "B.", "B. Y.", "Boris Yakovlevich"] + url: https://en.wikipedia.org/wiki/Boris_Podolsky -"Gutierrez-Barragan": - - firstname: ["Felipe", "F."] - url: https://pages.cs.wisc.edu/~felipe/ +"rosen": + - firstname: ["Nathan", "N."] + url: https://en.wikipedia.org/wiki/Nathan_Rosen -"Jayasuriya": - - firstname: ["Suren", "S."] - url: https://search.asu.edu/profile/3183646/ +"bach": + - firstname: ["Johann Sebastian", "J. S."] + url: https://en.wikipedia.org/wiki/Johann_Sebastian_Bach -"Cossairt": - - firstname: ["Oliver", "O."] - url: https://compphotolab.northwestern.edu/people/oliver-ollie-cossairt/ + - firstname: ["Carl Philipp Emanuel", "C. P. E."] + url: https://en.wikipedia.org/wiki/Carl_Philipp_Emanuel_Bach + +"przibram": + - firstname: ["Karl"] + url: https://link.springer.com/article/10.1007/s00016-019-00242-z + +"schrodinger": + - firstname: ["Erwin"] + url: https://en.wikipedia.org/wiki/Erwin_Schr%C3%B6dinger + +"lorentz": + - firstname: ["Hendrik Antoon"] + url: https://en.wikipedia.org/wiki/Hendrik_Lorentz + +"planck": + - firstname: ["Max"] + url: https://en.wikipedia.org/wiki/Max_Planck diff --git a/_data/cv.yml b/_data/cv.yml index e69de29bb2d1..5885b30b6304 100644 --- a/_data/cv.yml +++ b/_data/cv.yml @@ -0,0 +1,97 @@ +- title: General Information + type: map + contents: + - name: Full Name + value: Albert Einstein + - name: Date of Birth + value: 14th March 1879 + - name: Languages + value: English, German + +- title: Education + type: time_table + contents: + - title: PhD + institution: University of Zurich, Zurich, Switzerland + year: 1905 + description: + - Description 1. + - Description 2. + - title: Description 3. + contents: + - Sub-description 1. + - Sub-description 2. + - title: Federal teaching diploma + institution: Eidgenössische Technische Hochschule, Zurich, Switzerland + year: 1900 + description: + - Description 1. + - Description 2. + +- title: Experience + type: time_table + contents: + - title: Professor of Theoretical Physics + institution: Institute for Advanced Study, Princeton University + year: 1933 - 1955 + description: + - Description 1. + - Description 2. + - title: Description 3. + contents: + - Sub-description 1. + - Sub-description 2. + - title: Visiting Professor + institution: California Institute of Technology, Pasadena, California, US + year: 1933 + description: + - Description 1. + - Description 2. + + - title: Director + institution: Kaiser Wilhelm Institute for Physics, Berlin, Germany. + year: 1917-1933 + + - title: Professor of Theoretical Physics + institution: Karl-Ferdinand University, Prague, Czechoslovakia + year: 1911 - 1917 + description: + + - title: Associate Professor of Theoretical Physics + institution: University of Zurich, Zurich, Switzerland + year: 1909 - 1911 + +- title: Open Source Projects + type: time_table + contents: + - title: al-folio + year: 2015-now + description: A beautiful, simple, clean, and responsive Jekyll theme for academics. + +- title: Honors and Awards + type: time_table + contents: + - year: 1921 + items: + - Nobel Prize in Physics + - Matteucci Medal + - year: 2029 + items: + - Max Planck Medal + +- title: Academic Interests + type: nested_list + contents: + - title: Topic 1. + items: + - Description 1. + - Description 2. + - title: Topic 2. + items: + - Description 1. + - Description 2. + +- title: Other Interests + type: list + contents: + - Hobbies: Hobby 1, Hobby 2, etc. diff --git a/_data/repositories.yml b/_data/repositories.yml index 583b10250529..c2d7269e7bab 100644 --- a/_data/repositories.yml +++ b/_data/repositories.yml @@ -1,9 +1,14 @@ github_users: - - hgchen + - torvalds + - alshedivat + +repo_description_lines_max: 2 github_repos: - - SenseBrain/JPD-SE - - ImagingLyceum-ASU/dco-pinhole-restoration - - hulitaotom/Joint-Multi-Scale-Tone-Mapping-and-Denoising-for-HDR-Image-Enhancement - - jnjaby/DISCNet - - YichengWu/PhaseCam3D + - alshedivat/al-folio + - jekyll/jekyll + - twbs/bootstrap + - jquery/jquery + - FortAwesome/Font-Awesome + - mathjax/MathJax + - jpswalsh/academicons diff --git a/_data/venues.yml b/_data/venues.yml index ca8df76f8cfe..41963201fba1 100644 --- a/_data/venues.yml +++ b/_data/venues.yml @@ -1,3 +1,9 @@ -"CVPR": - url: https://openaccess.thecvf.com/menu +"AJP": + url: https://aapt.scitation.org/journal/ajp + color: "#00369f" +"PhysRev": + url: https://journals.aps.org/ + +"Vision": + color: "#009f36" diff --git a/_news/announcement_1.md b/_news/announcement_1.md new file mode 100644 index 000000000000..e5349ced3893 --- /dev/null +++ b/_news/announcement_1.md @@ -0,0 +1,8 @@ +--- +layout: post +date: 2015-10-22 15:59:00-0400 +inline: true +related_posts: false +--- + +A simple inline announcement. diff --git a/_news/announcement_2.md b/_news/announcement_2.md new file mode 100644 index 000000000000..92693959602a --- /dev/null +++ b/_news/announcement_2.md @@ -0,0 +1,33 @@ +--- +layout: post +title: A long announcement with details +date: 2015-11-07 16:11:00-0400 +inline: false +related_posts: false +--- + +Announcements and news can be much longer than just quick inline posts. In fact, they can have all the features available for the standard blog posts. See below. + +--- + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. + +#### Hipster list + +
    +
  • brunch
  • +
  • fixie
  • +
  • raybans
  • +
  • messenger bag
  • +
+ +Hoodie Thundercats retro, tote bag 8-bit Godard craft beer gastropub. Truffaut Tumblr taxidermy, raw denim Kickstarter sartorial dreamcatcher. Quinoa chambray slow-carb salvia readymade, bicycle rights 90's yr typewriter selfies letterpress cardigan vegan. + +--- + +Pug heirloom High Life vinyl swag, single-origin coffee four dollar toast taxidermy reprehenderit fap distillery master cleanse locavore. Est anim sapiente leggings Brooklyn ea. Thundercats locavore excepteur veniam eiusmod. Raw denim Truffaut Schlitz, migas sapiente Portland VHS twee Bushwick Marfa typewriter retro id keytar. + +> We do not grow absolutely, chronologically. We grow sometimes in one dimension, and not in another, unevenly. We grow partially. We are relative. We are mature in one realm, childish in another. +> —Anais Nin + +Fap aliqua qui, scenester pug Echo Park polaroid irony shabby chic ex cardigan church-key Odd Future accusamus. Blog stumptown sartorial squid, gastropub duis aesthetic Truffaut vero. Pinterest tilde twee, odio mumblecore jean shorts lumbersexual. diff --git a/_news/announcement_3.md b/_news/announcement_3.md new file mode 100644 index 000000000000..4d540883b38e --- /dev/null +++ b/_news/announcement_3.md @@ -0,0 +1,8 @@ +--- +layout: post +date: 2016-01-15 07:59:00-0400 +inline: true +related_posts: false +--- + +A simple inline announcement with Markdown emoji! :sparkles: :smile: diff --git a/_pages/about.md b/_pages/about.md index a7b6bd09ed01..13d968705185 100644 --- a/_pages/about.md +++ b/_pages/about.md @@ -2,36 +2,24 @@ layout: about title: about permalink: / -subtitle: 陳懷瑾 | Assistant Professor, University of Hawaii at Manoa +subtitle: Affiliations. Address. Contacts. Motto. Etc. profile: align: right image: prof_pic.jpg image_circular: false # crops the image to make it circular - # address: > - #

380 Portage Ave

- #

Palo Alto, CA 94306

+ more_info: > +

555 your office number

+

123 your address street

+

Your City, State 12345

-news: true # includes a list of news items -latest_posts: true # includes a list of the newest posts -selected_papers: false # includes a list of papers marked as "selected={true}" -social: true # includes social icons at the bottom of the page +news: true # includes a list of news items +selected_papers: true # includes a list of papers marked as "selected={true}" +social: true # includes social icons at the bottom of the page --- -I'm an Assistant Professor of Computer Science at University of Hawaii at Manoa, where I direct the Computational Imaging -and Robotic Perception Lab. +Write your biography here. Tell the world about yourself. Link to your favorite [subreddit](http://reddit.com). You can put a picture in, too. The code is already in, just name your picture `prof_pic.jpg` and put it in the `img/` folder. -From 2022 to 2024, I was the founding Computational Imaging Lead at Vayu Robotics, focusing on enhancing autonomous vehicle perception through -innovative imaging techniques. Vayu is backed by -[Khosla Ventures](https://www.vayurobotics.com/press-releases/vayu-robotics-emerges-from-stealth-with-12-7-million-in-seed-funding-from-khosla-ventures-and-lockheed-martin-ventures), -and advised by globally renowned AI scientist [Geoffrey Hinton](https://twitter.com/geoffreyhinton/status/1712171599636435105). - -From 2019 to 2022, I was with SenseBrain Technology, where I contributed to computational photography on smartphones. -My team made strides in areas like novel image sensor, [under-display camera tech](https://jnjaby.github.io/projects/UDC/), -[3D ToF imaging](https://pages.cs.wisc.edu/~felipe/project-pages/2021-itof2dtof/), -and [neural image compression](https://github.com/SenseBrain/JPD-SE). - -I obtained my Ph.D. in Electrical and Computer Engineering from Rice University in 2019, -where I explored physics-aware deep learning in computational imaging, -and obtained my B.S. from RIT in Imaging Science in 2013. +Put your address / P.O. box / other info right below your picture. You can also disable any of these elements by editing `profile` property of the YAML header of your `_pages/about.md`. Edit `_bibliography/papers.bib` and Jekyll will render your [publications page](/al-folio/publications/) automatically. +Link to your social media connections, too. This theme is set up to use [Font Awesome icons](https://fontawesome.com/) and [Academicons](https://jpswalsh.github.io/academicons/), like the ones below. Add your Facebook, Twitter, LinkedIn, Google Scholar, or just disable all of them. diff --git a/_pages/about_einstein.md b/_pages/about_einstein.md new file mode 100644 index 000000000000..7914a2fc9412 --- /dev/null +++ b/_pages/about_einstein.md @@ -0,0 +1,5 @@ +Write your biography here. Tell the world about yourself. Link to your favorite [subreddit](http://reddit.com). You can put a picture in, too. The code is already in, just name your picture `prof_pic.jpg` and put it in the `img/` folder. + +Put your address / P.O. box / other info right below your picture. You can also disable any these elements by editing `profile` property of the YAML header of your `_pages/about.md`. Edit `_bibliography/papers.bib` and Jekyll will render your [publications page](/al-folio/publications/) automatically. + +Link to your social media connections, too. This theme is set up to use [Font Awesome icons](https://fontawesome.com/) and [Academicons](https://jpswalsh.github.io/academicons/), like the ones below. Add your Facebook, Twitter, LinkedIn, Google Scholar, or just disable all of them. diff --git a/_pages/blog.md b/_pages/blog.md new file mode 100644 index 000000000000..784938b5d261 --- /dev/null +++ b/_pages/blog.md @@ -0,0 +1,196 @@ +--- +layout: default +permalink: /blog/ +title: blog +nav: true +nav_order: 1 +pagination: + enabled: true + collection: posts + permalink: /page/:num/ + per_page: 5 + sort_field: date + sort_reverse: true + trail: + before: 1 # The number of links before the current page + after: 3 # The number of links after the current page +--- + +
+ +{% assign blog_name_size = site.blog_name | size %} +{% assign blog_description_size = site.blog_description | size %} + +{% if blog_name_size > 0 or blog_description_size > 0 %} + +
+

{{ site.blog_name }}

+

{{ site.blog_description }}

+
+ {% endif %} + +{% if site.display_tags and site.display_tags.size > 0 or site.display_categories and site.display_categories.size > 0 %} + +
+
    + {% for tag in site.display_tags %} +
  • + {{ tag }} +
  • + {% unless forloop.last %} +

    + {% endunless %} + {% endfor %} + {% if site.display_categories.size > 0 and site.display_tags.size > 0 %} +

    + {% endif %} + {% for category in site.display_categories %} +
  • + {{ category }} +
  • + {% unless forloop.last %} +

    + {% endunless %} + {% endfor %} +
+
+ {% endif %} + +{% assign featured_posts = site.posts | where: "featured", "true" %} +{% if featured_posts.size > 0 %} +
+ + +
+ +{% endif %} + +
    + + {% if page.pagination.enabled %} + {% assign postlist = paginator.posts %} + {% else %} + {% assign postlist = site.posts %} + {% endif %} + + {% for post in postlist %} + + {% if post.external_source == blank %} + {% assign read_time = post.content | number_of_words | divided_by: 180 | plus: 1 %} + {% else %} + {% assign read_time = post.feed_content | strip_html | number_of_words | divided_by: 180 | plus: 1 %} + {% endif %} + {% assign year = post.date | date: "%Y" %} + {% assign tags = post.tags | join: "" %} + {% assign categories = post.categories | join: "" %} + +
  • + +{% if post.thumbnail %} + +
    +
    +{% endif %} +

    + {% if post.redirect == blank %} + {{ post.title }} + {% elsif post.redirect contains '://' %} + {{ post.title }} + + + + {% else %} + {{ post.title }} + {% endif %} +

    +

    {{ post.description }}

    + + + +{% if post.thumbnail %} + +
    + +
    + image +
    +
    +{% endif %} +
  • + + {% endfor %} + +
+ +{% if page.pagination.enabled %} +{% include pagination.liquid %} +{% endif %} + +
diff --git a/_pages/cv.md b/_pages/cv.md new file mode 100644 index 000000000000..ad3e26ddd234 --- /dev/null +++ b/_pages/cv.md @@ -0,0 +1,11 @@ +--- +layout: cv +permalink: /cv/ +title: cv +nav: true +nav_order: 5 +cv_pdf: example_pdf.pdf +description: This is a description of the page. You can modify it in '_pages/cv.md'. You can also change or remove the top pdf download button. +toc: + sidebar: left +--- diff --git a/_pages/dropdown.md b/_pages/dropdown.md new file mode 100644 index 000000000000..aa32f2212369 --- /dev/null +++ b/_pages/dropdown.md @@ -0,0 +1,16 @@ +--- +layout: page +title: submenus +nav: true +nav_order: 8 +dropdown: true +children: + - title: publications + permalink: /publications/ + - title: divider + - title: projects + permalink: /projects/ + - title: divider + - title: blog + permalink: /blog/ +--- diff --git a/_pages/profiles.md b/_pages/profiles.md new file mode 100644 index 000000000000..d7ca0450403c --- /dev/null +++ b/_pages/profiles.md @@ -0,0 +1,28 @@ +--- +layout: profiles +permalink: /people/ +title: people +description: members of the lab or group +nav: true +nav_order: 7 + +profiles: + # if you want to include more than one profile, just replicate the following block + # and create one content file for each profile inside _pages/ + - align: right + image: prof_pic.jpg + content: about_einstein.md + image_circular: false # crops the image to make it circular + more_info: > +

555 your office number

+

123 your address street

+

Your City, State 12345

+ - align: left + image: prof_pic.jpg + content: about_einstein.md + image_circular: false # crops the image to make it circular + more_info: > +

555 your office number

+

123 your address street

+

Your City, State 12345

+--- diff --git a/_pages/projects.md b/_pages/projects.md new file mode 100644 index 000000000000..e19d6555648f --- /dev/null +++ b/_pages/projects.md @@ -0,0 +1,65 @@ +--- +layout: page +title: projects +permalink: /projects/ +description: A growing collection of your cool projects. +nav: true +nav_order: 3 +display_categories: [work, fun] +horizontal: false +--- + + +
+{% if site.enable_project_categories and page.display_categories %} + + {% for category in page.display_categories %} + +

{{ category }}

+
+ {% assign categorized_projects = site.projects | where: "category", category %} + {% assign sorted_projects = categorized_projects | sort: "importance" %} + + {% if page.horizontal %} +
+
+ {% for project in sorted_projects %} + {% include projects_horizontal.liquid %} + {% endfor %} +
+
+ {% else %} +
+ {% for project in sorted_projects %} + {% include projects.liquid %} + {% endfor %} +
+ {% endif %} + {% endfor %} + +{% else %} + + + +{% assign sorted_projects = site.projects | sort: "importance" %} + + + +{% if page.horizontal %} + +
+
+ {% for project in sorted_projects %} + {% include projects_horizontal.liquid %} + {% endfor %} +
+
+ {% else %} +
+ {% for project in sorted_projects %} + {% include projects.liquid %} + {% endfor %} +
+ {% endif %} +{% endif %} +
diff --git a/_pages/teaching.md b/_pages/teaching.md new file mode 100644 index 000000000000..87bb1a5c469a --- /dev/null +++ b/_pages/teaching.md @@ -0,0 +1,12 @@ +--- +layout: page +permalink: /teaching/ +title: teaching +description: Materials for courses you taught. Replace this text with your description. +nav: true +nav_order: 6 +--- + +For now, this page is assumed to be a static description of your courses. You can convert it to a collection similar to `_projects/` so that you can have a dedicated page for each course. + +Organize your courses by years, topics, or universities, however you like! diff --git a/_posts/2015-03-15-formatting-and-links.md b/_posts/2015-03-15-formatting-and-links.md new file mode 100644 index 000000000000..0962756d5a78 --- /dev/null +++ b/_posts/2015-03-15-formatting-and-links.md @@ -0,0 +1,36 @@ +--- +layout: post +title: a post with formatting and links +date: 2015-03-15 16:40:16 +description: march & april, looking forward to summer +tags: formatting links +categories: sample-posts +--- + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. [Pinterest](https://www.pinterest.com) DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. + +#### Hipster list + +- brunch +- fixie +- raybans +- messenger bag + +#### Check List + +- [x] Brush Teeth +- [ ] Put on socks + - [x] Put on left sock + - [ ] Put on right sock +- [x] Go to school + +Hoodie Thundercats retro, tote bag 8-bit Godard craft beer gastropub. Truffaut Tumblr taxidermy, raw denim Kickstarter sartorial dreamcatcher. Quinoa chambray slow-carb salvia readymade, bicycle rights 90's yr typewriter selfies letterpress cardigan vegan. + +
+ +Pug heirloom High Life vinyl swag, single-origin coffee four dollar toast taxidermy reprehenderit fap distillery master cleanse locavore. Est anim sapiente leggings Brooklyn ea. Thundercats locavore excepteur veniam eiusmod. Raw denim Truffaut Schlitz, migas sapiente Portland VHS twee Bushwick Marfa typewriter retro id keytar. + +> We do not grow absolutely, chronologically. We grow sometimes in one dimension, and not in another, unevenly. We grow partially. We are relative. We are mature in one realm, childish in another. +> —Anais Nin + +Fap aliqua qui, scenester pug Echo Park polaroid irony shabby chic ex cardigan church-key Odd Future accusamus. Blog stumptown sartorial squid, gastropub duis aesthetic Truffaut vero. Pinterest tilde twee, odio mumblecore jean shorts lumbersexual. diff --git a/_posts/2015-05-15-images.md b/_posts/2015-05-15-images.md new file mode 100644 index 000000000000..61f687f8b806 --- /dev/null +++ b/_posts/2015-05-15-images.md @@ -0,0 +1,49 @@ +--- +layout: post +title: a post with images +date: 2015-05-15 21:01:00 +description: this is what included images could look like +tags: formatting images +categories: sample-posts +thumbnail: assets/img/9.jpg +--- + +This is an example post with image galleries. + +
+
+ {% include figure.liquid loading="eager" path="assets/img/9.jpg" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/7.jpg" class="img-fluid rounded z-depth-1" %} +
+
+
+ A simple, elegant caption looks good between image rows, after each row, or doesn't have to be there at all. +
+ +Images can be made zoomable. +Simply add `data-zoomable` to `` tags that you want to make zoomable. + +
+
+ {% include figure.liquid loading="eager" path="assets/img/8.jpg" class="img-fluid rounded z-depth-1" zoomable=true %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/10.jpg" class="img-fluid rounded z-depth-1" zoomable=true %} +
+
+ +The rest of the images in this post are all zoomable, arranged into different mini-galleries. + +
+
+ {% include figure.liquid path="assets/img/11.jpg" class="img-fluid rounded z-depth-1" zoomable=true %} +
+
+ {% include figure.liquid path="assets/img/12.jpg" class="img-fluid rounded z-depth-1" zoomable=true %} +
+
+ {% include figure.liquid path="assets/img/7.jpg" class="img-fluid rounded z-depth-1" zoomable=true %} +
+
diff --git a/_posts/2015-07-15-code.md b/_posts/2015-07-15-code.md new file mode 100644 index 000000000000..c721ec96ae6f --- /dev/null +++ b/_posts/2015-07-15-code.md @@ -0,0 +1,100 @@ +--- +layout: post +title: a post with code +date: 2015-07-15 15:09:00 +description: an example of a blog post with some code +tags: formatting code +categories: sample-posts +featured: true +--- + +This theme implements a built-in Jekyll feature, the use of Rouge, for syntax highlighting. +It supports more than 100 languages. +This example is in C++. +All you have to do is wrap your code in markdown code tags: + +````markdown +```c++ +code code code +``` +```` + +```c++ +int main(int argc, char const \*argv[]) +{ + string myString; + + cout << "input a string: "; + getline(cin, myString); + int length = myString.length(); + + char charArray = new char * [length]; + + charArray = myString; + for(int i = 0; i < length; ++i){ + cout << charArray[i] << " "; + } + + return 0; +} +``` + +For displaying code in a list item, you have to be aware of the indentation, as stated in this [Stackoverflow answer](https://stackoverflow.com/questions/34987908/embed-a-code-block-in-a-list-item-with-proper-indentation-in-kramdown/38090598#38090598). You must indent your code by **(3 \* bullet_indent_level)** spaces. This is because kramdown (the markdown engine used by Jekyll) indentation for the code block in lists is determined by the column number of the first non-space character after the list item marker. For example: + +````markdown +1. We can put fenced code blocks inside nested bullets, too. + + 1. Like this: + + ```c + printf("Hello, World!"); + ``` + + 2. The key is to indent your fenced block in the same line as the first character of the line. +```` + +Which displays: + +1. We can put fenced code blocks inside nested bullets, too. + + 1. Like this: + + ```c + printf("Hello, World!"); + ``` + + 2. The key is to indent your fenced block in the same line as the first character of the line. + +By default, it does not display line numbers. If you want to display line numbers for every code block, you can set `kramdown.syntax_highlighter_opts.block.line_numbers` to true in your `_config.yml` file. + +If you want to display line numbers for a specific code block, all you have to do is wrap your code in a liquid tag: + +{% raw %} +{% highlight c++ linenos %}
code code code
{% endhighlight %} +{% endraw %} + +The keyword `linenos` triggers display of line numbers. +Produces something like this: + +{% highlight c++ linenos %} + +int main(int argc, char const \*argv[]) +{ +string myString; + + cout << "input a string: "; + getline(cin, myString); + int length = myString.length(); + + char charArray = new char * [length]; + + charArray = myString; + for(int i = 0; i < length; ++i){ + cout << charArray[i] << " "; + } + + return 0; + +} + +{% endhighlight %} diff --git a/_posts/2015-10-20-disqus-comments.md b/_posts/2015-10-20-disqus-comments.md new file mode 100644 index 000000000000..cf5388403a17 --- /dev/null +++ b/_posts/2015-10-20-disqus-comments.md @@ -0,0 +1,12 @@ +--- +layout: post +title: a post with disqus comments +date: 2015-10-20 11:59:00-0400 +description: an example of a blog post with disqus comments +tags: comments +categories: sample-posts external-services +disqus_comments: true +related_posts: false +--- + +This post shows how to add DISQUS comments. diff --git a/_posts/2015-10-20-math.md b/_posts/2015-10-20-math.md new file mode 100644 index 000000000000..9ef0657badbe --- /dev/null +++ b/_posts/2015-10-20-math.md @@ -0,0 +1,29 @@ +--- +layout: post +title: a post with math +date: 2015-10-20 11:12:00-0400 +description: an example of a blog post with some math +tags: formatting math +categories: sample-posts +related_posts: false +--- + +This theme supports rendering beautiful math in inline and display modes using [MathJax 3](https://www.mathjax.org/) engine. You just need to surround your math expression with `$$`, like `$$ E = mc^2 $$`. If you leave it inside a paragraph, it will produce an inline expression, just like $$ E = mc^2 $$. + +To use display mode, again surround your expression with `$$` and place it as a separate paragraph. Here is an example: + +$$ +\sum_{k=1}^\infty |\langle x, e_k \rangle|^2 \leq \|x\|^2 +$$ + +You can also use `\begin{equation}...\end{equation}` instead of `$$` for display mode math. +MathJax will automatically number equations: + +\begin{equation} +\label{eq:cauchy-schwarz} +\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) +\end{equation} + +and by adding `\label{...}` inside the equation environment, we can now refer to the equation using `\eqref`. + +Note that MathJax 3 is [a major re-write of MathJax](https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html) that brought a significant improvement to the loading and rendering speed, which is now [on par with KaTeX](http://www.intmath.com/cg5/katex-mathjax-comparison.php). diff --git a/_posts/2018-12-22-distill.md b/_posts/2018-12-22-distill.md new file mode 100644 index 000000000000..6fa2e8d8002b --- /dev/null +++ b/_posts/2018-12-22-distill.md @@ -0,0 +1,321 @@ +--- +layout: distill +title: a distill-style blog post +description: an example of a distill-style blog post and main elements +tags: distill formatting +giscus_comments: true +date: 2021-05-22 +featured: true + +authors: + - name: Albert Einstein + url: "https://en.wikipedia.org/wiki/Albert_Einstein" + affiliations: + name: IAS, Princeton + - name: Boris Podolsky + url: "https://en.wikipedia.org/wiki/Boris_Podolsky" + affiliations: + name: IAS, Princeton + - name: Nathan Rosen + url: "https://en.wikipedia.org/wiki/Nathan_Rosen" + affiliations: + name: IAS, Princeton + +bibliography: 2018-12-22-distill.bib + +# Optionally, you can add a table of contents to your post. +# NOTES: +# - make sure that TOC names match the actual section names +# for hyperlinks within the post to work correctly. +# - we may want to automate TOC generation in the future using +# jekyll-toc plugin (https://github.com/toshimaru/jekyll-toc). +toc: + - name: Equations + # if a section has subsections, you can add them as follows: + # subsections: + # - name: Example Child Subsection 1 + # - name: Example Child Subsection 2 + - name: Citations + - name: Footnotes + - name: Code Blocks + - name: Interactive Plots + - name: Layouts + - name: Other Typography? + +# Below is an example of injecting additional post-specific styles. +# If you use this post as a template, delete this _styles block. +_styles: > + .fake-img { + background: #bbb; + border: 1px solid rgba(0, 0, 0, 0.1); + box-shadow: 0 0px 4px rgba(0, 0, 0, 0.1); + margin-bottom: 12px; + } + .fake-img p { + font-family: monospace; + color: white; + text-align: left; + margin: 12px 0; + text-align: center; + font-size: 16px; + } +--- + +## Equations + +This theme supports rendering beautiful math in inline and display modes using [MathJax 3](https://www.mathjax.org/) engine. +You just need to surround your math expression with `$$`, like `$$ E = mc^2 $$`. +If you leave it inside a paragraph, it will produce an inline expression, just like $$ E = mc^2 $$. + +To use display mode, again surround your expression with `$$` and place it as a separate paragraph. +Here is an example: + +$$ +\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) +$$ + +Note that MathJax 3 is [a major re-write of MathJax](https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html) that brought a significant improvement to the loading and rendering speed, which is now [on par with KaTeX](http://www.intmath.com/cg5/katex-mathjax-comparison.php). + +--- + +## Citations + +Citations are then used in the article body with the `` tag. +The key attribute is a reference to the id provided in the bibliography. +The key attribute can take multiple ids, separated by commas. + +The citation is presented inline like this: (a number that displays more information on hover). +If you have an appendix, a bibliography is automatically created and populated in it. + +Distill chose a numerical inline citation style to improve readability of citation dense articles and because many of the benefits of longer citations are obviated by displaying more information on hover. +However, we consider it good style to mention author last names if you discuss something at length and it fits into the flow well — the authors are human and it’s nice for them to have the community associate them with their work. + +--- + +## Footnotes + +Just wrap the text you would like to show up in a footnote in a `` tag. +The number of the footnote will be automatically generated.This will become a hoverable footnote. + +--- + +## Code Blocks + +Syntax highlighting is provided within `` tags. +An example of inline code snippets: `let x = 10;`. +For larger blocks of code, add a `block` attribute: + + + var x = 25; + function(x) { + return x * x; + } + + +**Note:** `` blocks do not look good in the dark mode. +You can always use the default code-highlight using the `highlight` liquid tag: + +{% highlight javascript %} +var x = 25; +function(x) { +return x \* x; +} +{% endhighlight %} + +--- + +## Interactive Plots + +You can add interative plots using plotly + iframes :framed_picture: + +
+ +
+ +The plot must be generated separately and saved into an HTML file. +To generate the plot that you see above, you can use the following code snippet: + +{% highlight python %} +import pandas as pd +import plotly.express as px +df = pd.read_csv( +'https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv' +) +fig = px.density_mapbox( +df, +lat='Latitude', +lon='Longitude', +z='Magnitude', +radius=10, +center=dict(lat=0, lon=180), +zoom=0, +mapbox_style="stamen-terrain", +) +fig.show() +fig.write_html('assets/plotly/demo.html') +{% endhighlight %} + +--- + +## Details boxes + +Details boxes are collapsible boxes which hide additional information from the user. They can be added with the `details` liquid tag: + +{% details Click here to know more %} +Additional details, where math $$ 2x - 1 $$ and `code` is rendered correctly. +{% enddetails %} + +--- + +## Layouts + +The main text column is referred to as the body. +It is the assumed layout of any direct descendants of the `d-article` element. + +
+

.l-body

+
+ +For images you want to display a little larger, try `.l-page`: + +
+

.l-page

+
+ +All of these have an outset variant if you want to poke out from the body text a little bit. +For instance: + +
+

.l-body-outset

+
+ +
+

.l-page-outset

+
+ +Occasionally you’ll want to use the full browser width. +For this, use `.l-screen`. +You can also inset the element a little from the edge of the browser by using the inset variant. + +
+

.l-screen

+
+
+

.l-screen-inset

+
+ +The final layout is for marginalia, asides, and footnotes. +It does not interrupt the normal flow of `.l-body` sized text except on mobile screen sizes. + +
+

.l-gutter

+
+ +--- + +## Other Typography? + +Emphasis, aka italics, with _asterisks_ (`*asterisks*`) or _underscores_ (`_underscores_`). + +Strong emphasis, aka bold, with **asterisks** or **underscores**. + +Combined emphasis with **asterisks and _underscores_**. + +Strikethrough uses two tildes. ~~Scratch this.~~ + +1. First ordered list item +2. Another item + ⋅⋅\* Unordered sub-list. +3. Actual numbers don't matter, just that it's a number + ⋅⋅1. Ordered sub-list +4. And another item. + +⋅⋅⋅You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown). + +⋅⋅⋅To have a line break without a paragraph, you will need to use two trailing spaces.⋅⋅ +⋅⋅⋅Note that this line is separate, but within the same paragraph.⋅⋅ +⋅⋅⋅(This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.) + +- Unordered list can use asterisks + +* Or minuses + +- Or pluses + +[I'm an inline-style link](https://www.google.com) + +[I'm an inline-style link with title](https://www.google.com "Google's Homepage") + +[I'm a reference-style link][Arbitrary case-insensitive reference text] + +[You can use numbers for reference-style link definitions][1] + +Or leave it empty and use the [link text itself]. + +URLs and URLs in angle brackets will automatically get turned into links. +http://www.example.com or and sometimes +example.com (but not on Github, for example). + +Some text to show that the reference links can follow later. + +[arbitrary case-insensitive reference text]: https://www.mozilla.org +[1]: http://slashdot.org +[link text itself]: http://www.reddit.com + +Here's our logo (hover to see the title text): + +Inline-style: +![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1") + +Reference-style: +![alt text][logo] + +[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2" + +Inline `code` has `back-ticks around` it. + +```javascript +var s = "JavaScript syntax highlighting"; +alert(s); +``` + +```python +s = "Python syntax highlighting" +print s +``` + +``` +No language indicated, so no syntax highlighting. +But let's throw in a tag. +``` + +Colons can be used to align columns. + +| Tables | Are | Cool | +| ------------- | :-----------: | ----: | +| col 3 is | right-aligned | $1600 | +| col 2 is | centered | $12 | +| zebra stripes | are neat | $1 | + +There must be at least 3 dashes separating each header cell. +The outer pipes (|) are optional, and you don't need to make the +raw Markdown line up prettily. You can also use inline Markdown. + +| Markdown | Less | Pretty | +| -------- | --------- | ---------- | +| _Still_ | `renders` | **nicely** | +| 1 | 2 | 3 | + +> Blockquotes are very handy in email to emulate reply text. +> This line is part of the same quote. + +Quote break. + +> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote. + +Here's a line for us to start with. + +This line is separated from the one above by two newlines, so it will be a _separate paragraph_. + +This line is also a separate paragraph, but... +This line is only separated by a single newline, so it's a separate line in the _same paragraph_. diff --git a/_posts/2020-09-28-twitter.md b/_posts/2020-09-28-twitter.md new file mode 100644 index 000000000000..e99c12d882b1 --- /dev/null +++ b/_posts/2020-09-28-twitter.md @@ -0,0 +1,24 @@ +--- +layout: post +title: a post with twitter +date: 2020-09-28 11:12:00-0400 +description: an example of a blog post with twitter +tags: formatting +categories: sample-posts external-services +--- + +A sample blog page that demonstrates the inclusion of Tweets/Timelines/etc. + +# Tweet + +An example of displaying a tweet: +{% twitter https://twitter.com/rubygems/status/518821243320287232 %} + +# Timeline + +An example of pulling from a timeline: +{% twitter https://twitter.com/jekyllrb maxwidth=500 limit=3 %} + +# Additional Details + +For more details on using the plugin visit: [jekyll-twitter-plugin](https://github.com/rob-murray/jekyll-twitter-plugin) diff --git a/_posts/2021-07-04-diagrams.md b/_posts/2021-07-04-diagrams.md new file mode 100644 index 000000000000..c85baa22dae6 --- /dev/null +++ b/_posts/2021-07-04-diagrams.md @@ -0,0 +1,34 @@ +--- +layout: post +title: a post with diagrams +date: 2021-07-04 17:39:00 +tags: formatting diagrams +description: an example of a blog post with diagrams +mermaid: + enabled: true + zoomable: true +--- + +This theme supports generating various diagrams from a text description using [mermaid](https://mermaid-js.github.io/mermaid/){:target="\_blank"}. Previously, this was done using the [jekyll-diagrams](https://github.com/zhustec/jekyll-diagrams){:target="\_blank"} plugin. For more information on this matter, see the [related issue](https://github.com/alshedivat/al-folio/issues/1609#issuecomment-1656995674). To disable the zooming feature, set `mermaid.zoomable` to `false` in this post frontmatter. + +## Mermaid + +The diagram below was generated by the following code: + +````markdown +```mermaid +sequenceDiagram + participant John + participant Alice + Alice->>John: Hello John, how are you? + John-->>Alice: Great! +``` +```` + +```mermaid +sequenceDiagram + participant John + participant Alice + Alice->>John: Hello John, how are you? + John-->>Alice: Great! +``` diff --git a/_posts/2022-02-01-redirect.md b/_posts/2022-02-01-redirect.md new file mode 100644 index 000000000000..62be5f3cc327 --- /dev/null +++ b/_posts/2022-02-01-redirect.md @@ -0,0 +1,9 @@ +--- +layout: post +title: a post with redirect +date: 2022-02-01 17:39:00 +description: you can also redirect to assets like pdf +redirect: /assets/pdf/example_pdf.pdf +--- + +Redirecting to another page. diff --git a/_posts/2022-12-10-giscus-comments.md b/_posts/2022-12-10-giscus-comments.md new file mode 100644 index 000000000000..72e08474a3bd --- /dev/null +++ b/_posts/2022-12-10-giscus-comments.md @@ -0,0 +1,12 @@ +--- +layout: post +title: a post with giscus comments +date: 2022-12-10 11:59:00-0400 +description: an example of a blog post with giscus comments +tags: comments +categories: sample-posts external-services +giscus_comments: true +related_posts: false +--- + +This post shows how to add GISCUS comments. diff --git a/_posts/2023-03-20-table-of-contents.md b/_posts/2023-03-20-table-of-contents.md new file mode 100644 index 000000000000..ec91cd33f5f9 --- /dev/null +++ b/_posts/2023-03-20-table-of-contents.md @@ -0,0 +1,45 @@ +--- +layout: post +title: a post with table of contents +date: 2023-03-20 11:59:00-0400 +description: an example of a blog post with table of contents +tags: formatting toc +categories: sample-posts +giscus_comments: true +related_posts: false +toc: + beginning: true +--- + +This post shows how to add a table of contents in the beginning of the post. + +## Adding a Table of Contents + +To add a table of contents to a post, simply add + +```yml +toc: + beginning: true +``` + +to the front matter of the post. The table of contents will be automatically generated from the headings in the post. + +### Example of Sub-Heading 1 + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. + +### Example of another Sub-Heading 1 + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. + +## Table of Contents Options + +If you want to learn more about how to customize the table of contents, you can check the [jekyll-toc](https://github.com/toshimaru/jekyll-toc) repository. + +### Example of Sub-Heading 2 + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. + +### Example of another Sub-Heading 2 + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. diff --git a/_posts/2023-03-21-tables.md b/_posts/2023-03-21-tables.md new file mode 100644 index 000000000000..ca9549912a86 --- /dev/null +++ b/_posts/2023-03-21-tables.md @@ -0,0 +1,120 @@ +--- +layout: post +title: displaying beautiful tables with Bootstrap Tables +date: 2023-03-20 14:37:00-0400 +description: an example of how to use Bootstrap Tables +tags: formatting tables +categories: sample-posts +giscus_comments: true +related_posts: true +pretty_table: true +--- + +Using markdown to display tables is easy. + +## Simple Example + +First, add the following to the post's front matter + +```yml +pretty_table: true +``` + +Then, the following syntax + +```markdown +| Left aligned | Center aligned | Right aligned | +| :----------- | :------------: | ------------: | +| Left 1 | center 1 | right 1 | +| Left 2 | center 2 | right 2 | +| Left 3 | center 3 | right 3 | +``` + +will generate + +| Left aligned | Center aligned | Right aligned | +| :----------- | :------------: | ------------: | +| Left 1 | center 1 | right 1 | +| Left 2 | center 2 | right 2 | +| Left 3 | center 3 | right 3 | + +

+ +## HTML Example + +It is also possible to use HTML to display tables. For example, the following HTML code will display a table with [Bootstrap Table](https://bootstrap-table.com/), loaded from a JSON file: + +{% raw %} + +```html + + + + + + + + +
IDItem NameItem Price
+``` + +{% endraw %} + + + + + + + + + +
IDItem NameItem Price
+ +

+ +## More Complex Example + +By using [Bootstrap Table](https://bootstrap-table.com/) it is possible to create pretty complex tables, with pagination, search, and more. For example, the following HTML code will display a table, loaded from a JSON file, with pagination, search, checkboxes, and header/content alignment. For more information, check the [documentation](https://examples.bootstrap-table.com/index.html). + +{% raw %} + +```html + + + + + + + + + +
IDItem NameItem Price
+``` + +{% endraw %} + + + + + + + + + + +
IDItem NameItem Price
diff --git a/_posts/2023-04-24-videos.md b/_posts/2023-04-24-videos.md new file mode 100644 index 000000000000..d408d6bb0c2b --- /dev/null +++ b/_posts/2023-04-24-videos.md @@ -0,0 +1,33 @@ +--- +layout: post +title: a post with videos +date: 2023-04-24 21:01:00 +description: this is what included videos could look like +tags: formatting videos +categories: sample-posts +--- + +This is an example post with videos. It supports local video files. + +
+
+ {% include video.liquid path="assets/video/pexels-engin-akyurt-6069112-960x540-30fps.mp4" class="img-fluid rounded z-depth-1" controls=true autoplay=true %} +
+
+ {% include video.liquid path="assets/video/pexels-engin-akyurt-6069112-960x540-30fps.mp4" class="img-fluid rounded z-depth-1" controls=true %} +
+
+
+ A simple, elegant caption looks good between video rows, after each row, or doesn't have to be there at all. +
+ +It does also support embedding videos from different sources. Here are some examples: + +
+
+ {% include video.liquid path="https://www.youtube.com/embed/jNQXAC9IVRw" class="img-fluid rounded z-depth-1" %} +
+
+ {% include video.liquid path="https://player.vimeo.com/video/524933864?h=1ac4fd9fb4&title=0&byline=0&portrait=0" class="img-fluid rounded z-depth-1" %} +
+
diff --git a/_posts/2023-04-25-audios.md b/_posts/2023-04-25-audios.md new file mode 100644 index 000000000000..1f3691ca61d9 --- /dev/null +++ b/_posts/2023-04-25-audios.md @@ -0,0 +1,22 @@ +--- +layout: post +title: a post with audios +date: 2023-04-25 10:25:00 +description: this is what included audios could look like +tags: formatting audios +categories: sample-posts +--- + +This is an example post with audios. It supports local audio files. + +
+
+ {% include audio.liquid path="assets/audio/epicaly-short-113909.mp3" controls=true %} +
+
+ {% include audio.liquid path="https://cdn.pixabay.com/download/audio/2022/06/25/audio_69a61cd6d6.mp3" controls=true %} +
+
+
+ A simple, elegant caption looks good between video rows, after each row, or doesn't have to be there at all. +
diff --git a/_posts/2023-04-25-sidebar-table-of-contents.md b/_posts/2023-04-25-sidebar-table-of-contents.md new file mode 100644 index 000000000000..2afb8fcab93f --- /dev/null +++ b/_posts/2023-04-25-sidebar-table-of-contents.md @@ -0,0 +1,47 @@ +--- +layout: post +title: a post with table of contents on a sidebar +date: 2023-04-25 10:14:00-0400 +description: an example of a blog post with table of contents on a sidebar +tags: formatting toc sidebar +categories: sample-posts +giscus_comments: true +related_posts: false +toc: + sidebar: left +--- + +This post shows how to add a table of contents as a sidebar. + +## Adding a Table of Contents + +To add a table of contents to a post as a sidebar, simply add + +```yml +toc: + sidebar: left +``` + +to the front matter of the post. The table of contents will be automatically generated from the headings in the post. If you wish to display the sidebar to the right, simply change `left` to `right`. + +### Example of Sub-Heading 1 + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. + +### Example of another Sub-Heading 1 + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. + +## Customizing Your Table of Contents + +{:data-toc-text="Customizing"} + +If you want to learn more about how to customize the table of contents of your sidebar, you can check the [bootstrap-toc](https://afeld.github.io/bootstrap-toc/) documentation. Notice that you can even customize the text of the heading that will be displayed on the sidebar. + +### Example of Sub-Heading 2 + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. + +### Example of another Sub-Heading 2 + +Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. diff --git a/_posts/2023-05-12-custom-blockquotes.md b/_posts/2023-05-12-custom-blockquotes.md new file mode 100644 index 000000000000..fdaf47e6fd1d --- /dev/null +++ b/_posts/2023-05-12-custom-blockquotes.md @@ -0,0 +1,131 @@ +--- +layout: post +title: a post with custom blockquotes +date: 2023-05-12 15:53:00-0400 +description: an example of a blog post with custom blockquotes +tags: formatting blockquotes +categories: sample-posts +giscus_comments: true +related_posts: true +--- + +This post shows how to add custom styles for blockquotes. Based on [jekyll-gitbook](https://github.com/sighingnow/jekyll-gitbook) implementation. + +We decided to support the same custom blockquotes as in [jekyll-gitbook](https://sighingnow.github.io/jekyll-gitbook/jekyll/2022-06-30-tips_warnings_dangers.html), which are also found in a lot of other sites' styles. The styles definitions can be found on the [\_base.scss](https://github.com/alshedivat/al-folio/blob/master/_sass/_base.scss) file, more specifically: + +```scss +/* Tips, warnings, and dangers */ +.post .post-content blockquote { + &.block-tip { + border-color: var(--global-tip-block); + background-color: var(--global-tip-block-bg); + + p { + color: var(--global-tip-block-text); + } + + h1, + h2, + h3, + h4, + h5, + h6 { + color: var(--global-tip-block-title); + } + } + + &.block-warning { + border-color: var(--global-warning-block); + background-color: var(--global-warning-block-bg); + + p { + color: var(--global-warning-block-text); + } + + h1, + h2, + h3, + h4, + h5, + h6 { + color: var(--global-warning-block-title); + } + } + + &.block-danger { + border-color: var(--global-danger-block); + background-color: var(--global-danger-block-bg); + + p { + color: var(--global-danger-block-text); + } + + h1, + h2, + h3, + h4, + h5, + h6 { + color: var(--global-danger-block-title); + } + } +} +``` + +A regular blockquote can be used as following: + +```markdown +> This is a regular blockquote +> and it can be used as usual +``` + +> This is a regular blockquote +> and it can be used as usual + +These custom styles can be used by adding the specific class to the blockquote, as follows: + + + +```markdown +> ##### TIP +> +> A tip can be used when you want to give advice +> related to a certain content. +{: .block-tip } +``` + +> ##### TIP +> +> A tip can be used when you want to give advice +> related to a certain content. +{: .block-tip } + +```markdown +> ##### WARNING +> +> This is a warning, and thus should +> be used when you want to warn the user +{: .block-warning } +``` + +> ##### WARNING +> +> This is a warning, and thus should +> be used when you want to warn the user +{: .block-warning } + +```markdown +> ##### DANGER +> +> This is a danger zone, and thus should +> be used carefully +{: .block-danger } +``` + +> ##### DANGER +> +> This is a danger zone, and thus should +> be used carefully +{: .block-danger } + + diff --git a/_posts/2023-07-04-jupyter-notebook.md b/_posts/2023-07-04-jupyter-notebook.md new file mode 100644 index 000000000000..8c1a1fc8f42c --- /dev/null +++ b/_posts/2023-07-04-jupyter-notebook.md @@ -0,0 +1,45 @@ +--- +layout: post +title: a post with jupyter notebook +date: 2023-07-04 08:57:00-0400 +description: an example of a blog post with jupyter notebook +tags: formatting jupyter +categories: sample-posts +giscus_comments: true +related_posts: false +--- + +To include a jupyter notebook in a post, you can use the following code: + +{% raw %} + +```liquid +{::nomarkdown} +{% assign jupyter_path = 'assets/jupyter/blog.ipynb' | relative_url %} +{% capture notebook_exists %}{% file_exists assets/jupyter/blog.ipynb %}{% endcapture %} +{% if notebook_exists == 'true' %} + {% jupyter_notebook jupyter_path %} +{% else %} +

Sorry, the notebook you are looking for does not exist.

+{% endif %} +{:/nomarkdown} +``` + +{% endraw %} + +Let's break it down: this is possible thanks to [Jekyll Jupyter Notebook plugin](https://github.com/red-data-tools/jekyll-jupyter-notebook) that allows you to embed jupyter notebooks in your posts. It basically calls [`jupyter nbconvert --to html`](https://nbconvert.readthedocs.io/en/latest/usage.html#convert-html) to convert the notebook to an html page and then includes it in the post. Since [Kramdown](https://jekyllrb.com/docs/configuration/markdown/) is the default Markdown renderer for Jekyll, we need to surround the call to the plugin with the [::nomarkdown](https://kramdown.gettalong.org/syntax.html#extensions) tag so that it stops processing this part with Kramdown and outputs the content as-is. + +The plugin takes as input the path to the notebook, but it assumes the file exists. If you want to check if the file exists before calling the plugin, you can use the `file_exists` filter. This avoids getting a 404 error from the plugin and ending up displaying the main page inside of it instead. If the file does not exist, you can output a message to the user. The code displayed above outputs the following: + +{::nomarkdown} +{% assign jupyter_path = "assets/jupyter/blog.ipynb" | relative_url %} +{% capture notebook_exists %}{% file_exists assets/jupyter/blog.ipynb %}{% endcapture %} +{% if notebook_exists == "true" %} +{% jupyter_notebook jupyter_path %} +{% else %} + +

Sorry, the notebook you are looking for does not exist.

+{% endif %} +{:/nomarkdown} + +Note that the jupyter notebook supports both light and dark themes. diff --git a/_posts/2023-07-12-post-bibliography.md b/_posts/2023-07-12-post-bibliography.md new file mode 100644 index 000000000000..168356c8ba03 --- /dev/null +++ b/_posts/2023-07-12-post-bibliography.md @@ -0,0 +1,22 @@ +--- +layout: post +title: a post with bibliography +date: 2023-07-12 09:56:00-0400 +description: an example of a blog post with bibliography +tags: formatting bib +categories: sample-posts +giscus_comments: true +related_posts: false +related_publications: true +--- + +This post shows how to add bibliography to simple blog posts. We support every citation style that [jekyll-scholar](https://github.com/inukshuk/jekyll-scholar) does. That means simple citation like {% cite einstein1950meaning %}, multiple citations like {% cite einstein1950meaning einstein1905movement %}, long references like {% reference einstein1905movement %} or also quotes: + +{% quote einstein1905electrodynamics %} +Lorem ipsum dolor sit amet, consectetur adipisicing elit, +sed do eiusmod tempor. + +Lorem ipsum dolor sit amet, consectetur adipisicing. +{% endquote %} + +If you would like something more academic, check the [distill style post]({% post_url 2018-12-22-distill %}). diff --git a/_posts/2023-12-12-tikzjax.md b/_posts/2023-12-12-tikzjax.md new file mode 100644 index 000000000000..a0df3313bacb --- /dev/null +++ b/_posts/2023-12-12-tikzjax.md @@ -0,0 +1,19 @@ +--- +layout: post +title: a post with TikZJax +date: 2023-12-12 22:25:00 +description: this is what included TikZ code could look like +tags: formatting diagrams +categories: sample-posts +tikzjax: true +--- + +This is an example post with TikZ code. TikZJax converts script tags (containing TikZ code) into SVGs. + + diff --git a/_posts/2024-01-26-chartjs.md b/_posts/2024-01-26-chartjs.md new file mode 100644 index 000000000000..210557d6df1f --- /dev/null +++ b/_posts/2024-01-26-chartjs.md @@ -0,0 +1,188 @@ +--- +layout: post +title: a post with chart.js +date: 2024-01-26 01:04:00 +description: this is what included chart.js code could look like +tags: formatting charts +categories: sample-posts +chart: + chartjs: true +--- + +This is an example post with some [chart.js](https://www.chartjs.org/) code. + +````markdown +```chartjs +{ + "type": "line", + "data": { + "labels": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July" + ], + "datasets": [ + { + "label": "# of bugs", + "fill": false, + "lineTension": 0.1, + "backgroundColor": "rgba(75,192,192,0.4)", + "borderColor": "rgba(75,192,192,1)", + "borderCapStyle": "butt", + "borderDash": [], + "borderDashOffset": 0, + "borderJoinStyle": "miter", + "pointBorderColor": "rgba(75,192,192,1)", + "pointBackgroundColor": "#fff", + "pointBorderWidth": 1, + "pointHoverRadius": 5, + "pointHoverBackgroundColor": "rgba(75,192,192,1)", + "pointHoverBorderColor": "rgba(220,220,220,1)", + "pointHoverBorderWidth": 2, + "pointRadius": 1, + "pointHitRadius": 10, + "data": [ + 65, + 59, + 80, + 81, + 56, + 55, + 40 + ], + "spanGaps": false + } + ] + }, + "options": {} +} +``` +```` + +This is how it looks like: + +```chartjs +{ + "type": "line", + "data": { + "labels": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July" + ], + "datasets": [ + { + "label": "# of bugs", + "fill": false, + "lineTension": 0.1, + "backgroundColor": "rgba(75,192,192,0.4)", + "borderColor": "rgba(75,192,192,1)", + "borderCapStyle": "butt", + "borderDash": [], + "borderDashOffset": 0, + "borderJoinStyle": "miter", + "pointBorderColor": "rgba(75,192,192,1)", + "pointBackgroundColor": "#fff", + "pointBorderWidth": 1, + "pointHoverRadius": 5, + "pointHoverBackgroundColor": "rgba(75,192,192,1)", + "pointHoverBorderColor": "rgba(220,220,220,1)", + "pointHoverBorderWidth": 2, + "pointRadius": 1, + "pointHitRadius": 10, + "data": [ + 65, + 59, + 80, + 81, + 56, + 55, + 40 + ], + "spanGaps": false + } + ] + }, + "options": {} +} +``` + +Also another example chart. + +````markdown +```chartjs +{ + "type": "doughnut", + "data": { + "labels": [ + "Red", + "Blue", + "Yellow" + ], + "datasets": [ + { + "data": [ + 300, + 50, + 100 + ], + "backgroundColor": [ + "#FF6384", + "#36A2EB", + "#FFCE56" + ], + "hoverBackgroundColor": [ + "#FF6384", + "#36A2EB", + "#FFCE56" + ] + } + ] + }, + "options": {} +} +``` +```` + +Which generates: + +```chartjs +{ + "type": "doughnut", + "data": { + "labels": [ + "Red", + "Blue", + "Yellow" + ], + "datasets": [ + { + "data": [ + 300, + 50, + 100 + ], + "backgroundColor": [ + "#FF6384", + "#36A2EB", + "#FFCE56" + ], + "hoverBackgroundColor": [ + "#FF6384", + "#36A2EB", + "#FFCE56" + ] + } + ] + }, + "options": {} +} +``` diff --git a/_posts/2024-01-26-echarts.md b/_posts/2024-01-26-echarts.md new file mode 100644 index 000000000000..b496288d05ef --- /dev/null +++ b/_posts/2024-01-26-echarts.md @@ -0,0 +1,68 @@ +--- +layout: post +title: a post with echarts +date: 2024-01-26 16:03:00 +description: this is what included echarts code could look like +tags: formatting charts +categories: sample-posts +chart: + echarts: true +--- + +This is an example post with some [echarts](https://echarts.apache.org/) code. + +````markdown +```echarts +{ + "title": { + "text": "ECharts Getting Started Example" + }, + "responsive": true, + "tooltip": {}, + "legend": { + "top": "30px", + "data": ["sales"] + }, + "xAxis": { + "data": ["Shirts", "Cardigans", "Chiffons", "Pants", "Heels", "Socks"] + }, + "yAxis": {}, + "series": [ + { + "name": "sales", + "type": "bar", + "data": [5, 20, 36, 10, 10, 20] + } + ] +} +``` +```` + +Which generates: + +```echarts +{ + "title": { + "text": "ECharts Getting Started Example" + }, + "responsive": true, + "tooltip": {}, + "legend": { + "top": "30px", + "data": ["sales"] + }, + "xAxis": { + "data": ["Shirts", "Cardigans", "Chiffons", "Pants", "Heels", "Socks"] + }, + "yAxis": {}, + "series": [ + { + "name": "sales", + "type": "bar", + "data": [5, 20, 36, 10, 10, 20] + } + ] +} +``` + +Note that this library offer support for both light and dark themes. You can switch between them using the theme switcher in the top right corner of the page. diff --git a/_posts/2024-01-26-geojson-map.md b/_posts/2024-01-26-geojson-map.md new file mode 100644 index 000000000000..6909aee64e02 --- /dev/null +++ b/_posts/2024-01-26-geojson-map.md @@ -0,0 +1,93 @@ +--- +layout: post +title: a post with geojson +date: 2024-01-26 17:57:00 +description: this is what included geojson code could look like +tags: formatting charts maps +categories: sample-posts +map: true +--- + +This is an example post with some [geojson](https://geojson.org/) code. The support is provided thanks to [Leaflet](https://leafletjs.com/). To create your own visualization, go to [geojson.io](https://geojson.io/). + +````markdown +```geojson +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + [ + [ + -60.11363029935569, + -2.904625022183211 + ], + [ + -60.11363029935569, + -3.162613728707967 + ], + [ + -59.820894493858034, + -3.162613728707967 + ], + [ + -59.820894493858034, + -2.904625022183211 + ], + [ + -60.11363029935569, + -2.904625022183211 + ] + ] + ], + "type": "Polygon" + } + } + ] +} +``` +```` + +Which generates: + +```geojson +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "coordinates": [ + [ + [ + -60.11363029935569, + -2.904625022183211 + ], + [ + -60.11363029935569, + -3.162613728707967 + ], + [ + -59.820894493858034, + -3.162613728707967 + ], + [ + -59.820894493858034, + -2.904625022183211 + ], + [ + -60.11363029935569, + -2.904625022183211 + ] + ] + ], + "type": "Polygon" + } + } + ] +} +``` diff --git a/_posts/2024-01-27-advanced-images.md b/_posts/2024-01-27-advanced-images.md new file mode 100644 index 000000000000..3baa160bb07c --- /dev/null +++ b/_posts/2024-01-27-advanced-images.md @@ -0,0 +1,35 @@ +--- +layout: post +title: a post with advanced image components +date: 2024-01-27 11:46:00 +description: this is what advanced image components could look like +tags: formatting images +categories: sample-posts +thumbnail: assets/img/9.jpg +images: + compare: true + slider: true +--- + +This is an example post with advanced image components. + +## Image Slider + +This is a simple image slider. It uses the [Swiper](https://swiperjs.com/) library. Check the [examples page](https://swiperjs.com/demos) for more information of what you can achieve with it. + + + {% include figure.liquid loading="eager" path="assets/img/9.jpg" class="img-fluid rounded z-depth-1" %} + {% include figure.liquid loading="eager" path="assets/img/7.jpg" class="img-fluid rounded z-depth-1" %} + {% include figure.liquid loading="eager" path="assets/img/8.jpg" class="img-fluid rounded z-depth-1" %} + {% include figure.liquid loading="eager" path="assets/img/10.jpg" class="img-fluid rounded z-depth-1" %} + {% include figure.liquid loading="eager" path="assets/img/12.jpg" class="img-fluid rounded z-depth-1" %} + + +## Image Comparison Slider + +This is a simple image comparison slider. It uses the [img-comparison-slider](https://img-comparison-slider.sneas.io/) library. Check the [examples page](https://img-comparison-slider.sneas.io/examples.html) for more information of what you can achieve with it. + + + {% include figure.liquid path="assets/img/prof_pic.jpg" class="img-fluid rounded z-depth-1" slot="first" %} + {% include figure.liquid path="assets/img/prof_pic_color.png" class="img-fluid rounded z-depth-1" slot="second" %} + diff --git a/_posts/2024-01-27-code-diff.md b/_posts/2024-01-27-code-diff.md new file mode 100644 index 000000000000..6ec06d5b7107 --- /dev/null +++ b/_posts/2024-01-27-code-diff.md @@ -0,0 +1,473 @@ +--- +layout: post +title: a post with code diff +date: 2024-01-27 19:22:00 +description: this is how you can display code diffs +tags: formatting code +categories: sample-posts +code_diff: true +--- + +You can display diff code by using the regular markdown syntax: + +````markdown +```diff +diff --git a/sample.js b/sample.js +index 0000001..0ddf2ba +--- a/sample.js ++++ b/sample.js +@@ -1 +1 @@ +-console.log("Hello World!") ++console.log("Hello from Diff2Html!") +``` +```` + +Which generates: + +```diff +diff --git a/sample.js b/sample.js +index 0000001..0ddf2ba +--- a/sample.js ++++ b/sample.js +@@ -1 +1 @@ +-console.log("Hello World!") ++console.log("Hello from Diff2Html!") +``` + +But this is difficult to read, specially if you have a large diff. You can use [diff2html](https://diff2html.xyz/) to display a more readable version of the diff. For this, just use `diff2html` instead of `diff` for the code block language: + +````markdown +```diff2html +diff --git a/sample.js b/sample.js +index 0000001..0ddf2ba +--- a/sample.js ++++ b/sample.js +@@ -1 +1 @@ +-console.log("Hello World!") ++console.log("Hello from Diff2Html!") +``` +```` + +If we use a longer example, for example [this commit from diff2html](https://github.com/rtfpessoa/diff2html/commit/c2c253d3e3f8b8b267f551e659f72b44ca2ac927), it will generate the following output: + +```diff2html +From 2aaae31cc2a37bfff83430c2c914b140bee59b6a Mon Sep 17 00:00:00 2001 +From: Rodrigo Fernandes +Date: Sun, 9 Oct 2016 16:41:54 +0100 +Subject: [PATCH 1/2] Initial template override support + +--- + scripts/hulk.js | 4 ++-- + src/diff2html.js | 3 +-- + src/file-list-printer.js | 11 ++++++++--- + src/hoganjs-utils.js | 29 +++++++++++++++++------------ + src/html-printer.js | 6 ++++++ + src/line-by-line-printer.js | 6 +++++- + src/side-by-side-printer.js | 6 +++++- + test/file-list-printer-tests.js | 2 +- + test/hogan-cache-tests.js | 18 +++++++++++++++--- + test/line-by-line-tests.js | 3 +-- + test/side-by-side-printer-tests.js | 3 +-- + 11 files changed, 62 insertions(+), 29 deletions(-) + +diff --git a/scripts/hulk.js b/scripts/hulk.js +index 5a793c18..a4b1a4d5 100755 +--- a/scripts/hulk.js ++++ b/scripts/hulk.js +@@ -173,11 +173,11 @@ function namespace(name) { + // write a template foreach file that matches template extension + templates = extractFiles(options.argv.remain) + .map(function(file) { +- var openedFile = fs.readFileSync(file, 'utf-8'); ++ var openedFile = fs.readFileSync(file, 'utf-8').trim(); + var name; + if (!openedFile) return; + name = namespace(path.basename(file).replace(/\..*$/, '')); +- openedFile = removeByteOrderMark(openedFile.trim()); ++ openedFile = removeByteOrderMark(openedFile); + openedFile = wrap(file, name, openedFile); + if (!options.outputdir) return openedFile; + fs.writeFileSync(path.join(options.outputdir, name + '.js') +diff --git a/src/diff2html.js b/src/diff2html.js +index 21b0119e..64e138f5 100644 +--- a/src/diff2html.js ++++ b/src/diff2html.js +@@ -7,7 +7,6 @@ + + (function() { + var diffParser = require('./diff-parser.js').DiffParser; +- var fileLister = require('./file-list-printer.js').FileListPrinter; + var htmlPrinter = require('./html-printer.js').HtmlPrinter; + + function Diff2Html() { +@@ -43,7 +42,7 @@ + + var fileList = ''; + if (configOrEmpty.showFiles === true) { +- fileList = fileLister.generateFileList(diffJson, configOrEmpty); ++ fileList = htmlPrinter.generateFileListSummary(diffJson, configOrEmpty); + } + + var diffOutput = ''; +diff --git a/src/file-list-printer.js b/src/file-list-printer.js +index e408d9b2..1e0a2c61 100644 +--- a/src/file-list-printer.js ++++ b/src/file-list-printer.js +@@ -8,11 +8,16 @@ + (function() { + var printerUtils = require('./printer-utils.js').PrinterUtils; + +- var hoganUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ var hoganUtils; ++ + var baseTemplatesPath = 'file-summary'; + var iconsBaseTemplatesPath = 'icon'; + +- function FileListPrinter() { ++ function FileListPrinter(config) { ++ this.config = config; ++ ++ var HoganJsUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ hoganUtils = new HoganJsUtils(config); + } + + FileListPrinter.prototype.generateFileList = function(diffFiles) { +@@ -38,5 +43,5 @@ + }); + }; + +- module.exports.FileListPrinter = new FileListPrinter(); ++ module.exports.FileListPrinter = FileListPrinter; + })(); +diff --git a/src/hoganjs-utils.js b/src/hoganjs-utils.js +index 9949e5fa..0dda08d7 100644 +--- a/src/hoganjs-utils.js ++++ b/src/hoganjs-utils.js +@@ -8,18 +8,19 @@ + (function() { + var fs = require('fs'); + var path = require('path'); +- + var hogan = require('hogan.js'); + + var hoganTemplates = require('./templates/diff2html-templates.js'); + +- var templatesPath = path.resolve(__dirname, 'templates'); ++ var extraTemplates; + +- function HoganJsUtils() { ++ function HoganJsUtils(configuration) { ++ this.config = configuration || {}; ++ extraTemplates = this.config.templates || {}; + } + +- HoganJsUtils.prototype.render = function(namespace, view, params, configuration) { +- var template = this.template(namespace, view, configuration); ++ HoganJsUtils.prototype.render = function(namespace, view, params) { ++ var template = this.template(namespace, view); + if (template) { + return template.render(params); + } +@@ -27,17 +28,16 @@ + return null; + }; + +- HoganJsUtils.prototype.template = function(namespace, view, configuration) { +- var config = configuration || {}; ++ HoganJsUtils.prototype.template = function(namespace, view) { + var templateKey = this._templateKey(namespace, view); + +- return this._getTemplate(templateKey, config); ++ return this._getTemplate(templateKey); + }; + +- HoganJsUtils.prototype._getTemplate = function(templateKey, config) { ++ HoganJsUtils.prototype._getTemplate = function(templateKey) { + var template; + +- if (!config.noCache) { ++ if (!this.config.noCache) { + template = this._readFromCache(templateKey); + } + +@@ -53,6 +53,7 @@ + + try { + if (fs.readFileSync) { ++ var templatesPath = path.resolve(__dirname, 'templates'); + var templatePath = path.join(templatesPath, templateKey); + var templateContent = fs.readFileSync(templatePath + '.mustache', 'utf8'); + template = hogan.compile(templateContent); +@@ -66,12 +67,16 @@ + }; + + HoganJsUtils.prototype._readFromCache = function(templateKey) { +- return hoganTemplates[templateKey]; ++ return extraTemplates[templateKey] || hoganTemplates[templateKey]; + }; + + HoganJsUtils.prototype._templateKey = function(namespace, view) { + return namespace + '-' + view; + }; + +- module.exports.HoganJsUtils = new HoganJsUtils(); ++ HoganJsUtils.prototype.compile = function(templateStr) { ++ return hogan.compile(templateStr); ++ }; ++ ++ module.exports.HoganJsUtils = HoganJsUtils; + })(); +diff --git a/src/html-printer.js b/src/html-printer.js +index 585d5b66..13f83047 100644 +--- a/src/html-printer.js ++++ b/src/html-printer.js +@@ -8,6 +8,7 @@ + (function() { + var LineByLinePrinter = require('./line-by-line-printer.js').LineByLinePrinter; + var SideBySidePrinter = require('./side-by-side-printer.js').SideBySidePrinter; ++ var FileListPrinter = require('./file-list-printer.js').FileListPrinter; + + function HtmlPrinter() { + } +@@ -22,5 +23,10 @@ + return sideBySidePrinter.generateSideBySideJsonHtml(diffFiles); + }; + ++ HtmlPrinter.prototype.generateFileListSummary = function(diffJson, config) { ++ var fileListPrinter = new FileListPrinter(config); ++ return fileListPrinter.generateFileList(diffJson); ++ }; ++ + module.exports.HtmlPrinter = new HtmlPrinter(); + })(); +diff --git a/src/line-by-line-printer.js b/src/line-by-line-printer.js +index b07eb53c..d230bedd 100644 +--- a/src/line-by-line-printer.js ++++ b/src/line-by-line-printer.js +@@ -11,7 +11,8 @@ + var utils = require('./utils.js').Utils; + var Rematch = require('./rematch.js').Rematch; + +- var hoganUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ var hoganUtils; ++ + var genericTemplatesPath = 'generic'; + var baseTemplatesPath = 'line-by-line'; + var iconsBaseTemplatesPath = 'icon'; +@@ -19,6 +20,9 @@ + + function LineByLinePrinter(config) { + this.config = config; ++ ++ var HoganJsUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ hoganUtils = new HoganJsUtils(config); + } + + LineByLinePrinter.prototype.makeFileDiffHtml = function(file, diffs) { +diff --git a/src/side-by-side-printer.js b/src/side-by-side-printer.js +index bbf1dc8d..5e3033b3 100644 +--- a/src/side-by-side-printer.js ++++ b/src/side-by-side-printer.js +@@ -11,7 +11,8 @@ + var utils = require('./utils.js').Utils; + var Rematch = require('./rematch.js').Rematch; + +- var hoganUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ var hoganUtils; ++ + var genericTemplatesPath = 'generic'; + var baseTemplatesPath = 'side-by-side'; + var iconsBaseTemplatesPath = 'icon'; +@@ -26,6 +27,9 @@ + + function SideBySidePrinter(config) { + this.config = config; ++ ++ var HoganJsUtils = require('./hoganjs-utils.js').HoganJsUtils; ++ hoganUtils = new HoganJsUtils(config); + } + + SideBySidePrinter.prototype.makeDiffHtml = function(file, diffs) { +diff --git a/test/file-list-printer-tests.js b/test/file-list-printer-tests.js +index a502a46f..60ea3208 100644 +--- a/test/file-list-printer-tests.js ++++ b/test/file-list-printer-tests.js +@@ -1,6 +1,6 @@ + var assert = require('assert'); + +-var fileListPrinter = require('../src/file-list-printer.js').FileListPrinter; ++var fileListPrinter = new (require('../src/file-list-printer.js').FileListPrinter)(); + + describe('FileListPrinter', function() { + describe('generateFileList', function() { +diff --git a/test/hogan-cache-tests.js b/test/hogan-cache-tests.js +index 190bf6f8..3bb754ac 100644 +--- a/test/hogan-cache-tests.js ++++ b/test/hogan-cache-tests.js +@@ -1,6 +1,6 @@ + var assert = require('assert'); + +-var HoganJsUtils = require('../src/hoganjs-utils.js').HoganJsUtils; ++var HoganJsUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(); + var diffParser = require('../src/diff-parser.js').DiffParser; + + describe('HoganJsUtils', function() { +@@ -21,16 +21,28 @@ describe('HoganJsUtils', function() { + }); + assert.equal(emptyDiffHtml, result); + }); ++ + it('should render view without cache', function() { + var result = HoganJsUtils.render('generic', 'empty-diff', { + contentClass: 'd2h-code-line', + diffParser: diffParser + }, {noCache: true}); +- assert.equal(emptyDiffHtml + '\n', result); ++ assert.equal(emptyDiffHtml, result); + }); ++ + it('should return null if template is missing', function() { +- var result = HoganJsUtils.render('generic', 'missing-template', {}, {noCache: true}); ++ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)({noCache: true}); ++ var result = hoganUtils.render('generic', 'missing-template', {}); + assert.equal(null, result); + }); ++ ++ it('should allow templates to be overridden', function() { ++ var emptyDiffTemplate = HoganJsUtils.compile('

{{myName}}

'); ++ ++ var config = {templates: {'generic-empty-diff': emptyDiffTemplate}}; ++ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(config); ++ var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); ++ assert.equal('

Rodrigo Fernandes

', result); ++ }); + }); + }); +diff --git a/test/line-by-line-tests.js b/test/line-by-line-tests.js +index 1cd92073..8869b3df 100644 +--- a/test/line-by-line-tests.js ++++ b/test/line-by-line-tests.js +@@ -14,7 +14,7 @@ describe('LineByLinePrinter', function() { + ' File without changes\n' + + ' \n' + + ' \n' + +- '\n'; ++ ''; + + assert.equal(expected, fileHtml); + }); +@@ -422,7 +422,6 @@ describe('LineByLinePrinter', function() { + ' \n' + + ' \n' + + '\n' + +- '\n' + + ' \n' + + ' \n' + + ' \n' + +diff --git a/test/side-by-side-printer-tests.js b/test/side-by-side-printer-tests.js +index 76625f8e..771daaa5 100644 +--- a/test/side-by-side-printer-tests.js ++++ b/test/side-by-side-printer-tests.js +@@ -14,7 +14,7 @@ describe('SideBySidePrinter', function() { + ' File without changes\n' + + ' \n' + + ' \n' + +- '\n'; ++ ''; + + assert.equal(expectedRight, fileHtml.right); + assert.equal(expectedLeft, fileHtml.left); +@@ -324,7 +324,6 @@ describe('SideBySidePrinter', function() { + ' \n' + + ' \n' + + '\n' + +- '\n' + + ' \n' + + ' \n' + + ' \n' + + +From f3cadb96677d0eb82fc2752dc3ffbf35ca9b5bdb Mon Sep 17 00:00:00 2001 +From: Rodrigo Fernandes +Date: Sat, 15 Oct 2016 13:21:22 +0100 +Subject: [PATCH 2/2] Allow uncompiled templates + +--- + README.md | 3 +++ + src/hoganjs-utils.js | 7 +++++++ + test/hogan-cache-tests.js | 24 +++++++++++++++++++++++- + 3 files changed, 33 insertions(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index 132c8a28..46909f25 100644 +--- a/README.md ++++ b/README.md +@@ -98,6 +98,9 @@ The HTML output accepts a Javascript object with configuration. Possible options + - `synchronisedScroll`: scroll both panes in side-by-side mode: `true` or `false`, default is `false` + - `matchWordsThreshold`: similarity threshold for word matching, default is 0.25 + - `matchingMaxComparisons`: perform at most this much comparisons for line matching a block of changes, default is `2500` ++ - `templates`: object with previously compiled templates to replace parts of the html ++ - `rawTemplates`: object with raw not compiled templates to replace parts of the html ++ > For more information regarding the possible templates look into [src/templates](https://github.com/rtfpessoa/diff2html/tree/master/src/templates) + + ## Diff2HtmlUI Helper + +diff --git a/src/hoganjs-utils.js b/src/hoganjs-utils.js +index 0dda08d7..b2e9c275 100644 +--- a/src/hoganjs-utils.js ++++ b/src/hoganjs-utils.js +@@ -17,6 +17,13 @@ + function HoganJsUtils(configuration) { + this.config = configuration || {}; + extraTemplates = this.config.templates || {}; ++ ++ var rawTemplates = this.config.rawTemplates || {}; ++ for (var templateName in rawTemplates) { ++ if (rawTemplates.hasOwnProperty(templateName)) { ++ if (!extraTemplates[templateName]) extraTemplates[templateName] = this.compile(rawTemplates[templateName]); ++ } ++ } + } + + HoganJsUtils.prototype.render = function(namespace, view, params) { +diff --git a/test/hogan-cache-tests.js b/test/hogan-cache-tests.js +index 3bb754ac..a34839c0 100644 +--- a/test/hogan-cache-tests.js ++++ b/test/hogan-cache-tests.js +@@ -36,7 +36,7 @@ describe('HoganJsUtils', function() { + assert.equal(null, result); + }); + +- it('should allow templates to be overridden', function() { ++ it('should allow templates to be overridden with compiled templates', function() { + var emptyDiffTemplate = HoganJsUtils.compile('

{{myName}}

'); + + var config = {templates: {'generic-empty-diff': emptyDiffTemplate}}; +@@ -44,5 +44,27 @@ describe('HoganJsUtils', function() { + var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); + assert.equal('

Rodrigo Fernandes

', result); + }); ++ ++ it('should allow templates to be overridden with uncompiled templates', function() { ++ var emptyDiffTemplate = '

{{myName}}

'; ++ ++ var config = {rawTemplates: {'generic-empty-diff': emptyDiffTemplate}}; ++ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(config); ++ var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); ++ assert.equal('

Rodrigo Fernandes

', result); ++ }); ++ ++ it('should allow templates to be overridden giving priority to compiled templates', function() { ++ var emptyDiffTemplate = HoganJsUtils.compile('

{{myName}}

'); ++ var emptyDiffTemplateUncompiled = '

Not used!

'; ++ ++ var config = { ++ templates: {'generic-empty-diff': emptyDiffTemplate}, ++ rawTemplates: {'generic-empty-diff': emptyDiffTemplateUncompiled} ++ }; ++ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(config); ++ var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); ++ assert.equal('

Rodrigo Fernandes

', result); ++ }); + }); + }); +``` diff --git a/_posts/2024-01-27-vega-lite.md b/_posts/2024-01-27-vega-lite.md new file mode 100644 index 000000000000..099eb88f6940 --- /dev/null +++ b/_posts/2024-01-27-vega-lite.md @@ -0,0 +1,105 @@ +--- +layout: post +title: a post with vega lite +date: 2024-01-27 00:20:00 +last_updated: 2024-04-14 04:30:00 +description: this is what included vega lite code could look like +tags: formatting charts +categories: sample-posts +chart: + vega_lite: true +--- + +This is an example post with some [vega lite](https://vega.github.io/vega-lite/) code. + +````markdown +```vega_lite +{ + "$schema": "https://vega.github.io/schema/vega-lite/v5.json", + "description": "A dot plot showing each movie in the database, and the difference from the average movie rating. The display is sorted by year to visualize everything in sequential order. The graph is for all Movies before 2019.", + "data": { + "url": "https://raw.githubusercontent.com/vega/vega/main/docs/data/movies.json" + }, + "transform": [ + {"filter": "datum['IMDB Rating'] != null"}, + {"filter": {"timeUnit": "year", "field": "Release Date", "range": [null, 2019]}}, + { + "joinaggregate": [{ + "op": "mean", + "field": "IMDB Rating", + "as": "AverageRating" + }] + }, + { + "calculate": "datum['IMDB Rating'] - datum.AverageRating", + "as": "RatingDelta" + } + ], + "mark": "point", + "encoding": { + "x": { + "field": "Release Date", + "type": "temporal" + }, + "y": { + "field": "RatingDelta", + "type": "quantitative", + "title": "Rating Delta" + }, + "color": { + "field": "RatingDelta", + "type": "quantitative", + "scale": {"domainMid": 0}, + "title": "Rating Delta" + } + } +} +``` +```` + +Which generates: + +```vega_lite +{ + "$schema": "https://vega.github.io/schema/vega-lite/v5.json", + "description": "A dot plot showing each movie in the database, and the difference from the average movie rating. The display is sorted by year to visualize everything in sequential order. The graph is for all Movies before 2019.", + "data": { + "url": "https://raw.githubusercontent.com/vega/vega/main/docs/data/movies.json" + }, + "transform": [ + {"filter": "datum['IMDB Rating'] != null"}, + {"filter": {"timeUnit": "year", "field": "Release Date", "range": [null, 2019]}}, + { + "joinaggregate": [{ + "op": "mean", + "field": "IMDB Rating", + "as": "AverageRating" + }] + }, + { + "calculate": "datum['IMDB Rating'] - datum.AverageRating", + "as": "RatingDelta" + } + ], + "mark": "point", + "encoding": { + "x": { + "field": "Release Date", + "type": "temporal" + }, + "y": { + "field": "RatingDelta", + "type": "quantitative", + "title": "Rating Delta" + }, + "color": { + "field": "RatingDelta", + "type": "quantitative", + "scale": {"domainMid": 0}, + "title": "Rating Delta" + } + } +} +``` + +This plot supports both light and dark themes. diff --git a/_posts/2024-04-15-pseudocode.md b/_posts/2024-04-15-pseudocode.md new file mode 100644 index 000000000000..d7ff18b86334 --- /dev/null +++ b/_posts/2024-04-15-pseudocode.md @@ -0,0 +1,71 @@ +--- +layout: post +title: a post with pseudo code +date: 2024-04-15 00:01:00 +description: this is what included pseudo code could look like +tags: formatting code +categories: sample-posts +pseudocode: true +--- + +This is an example post with some pseudo code rendered by [pseudocode](https://github.com/SaswatPadhi/pseudocode.js). The example presented here is the same as the one in the [pseudocode.js](https://saswat.padhi.me/pseudocode.js/) documentation, with only one simple but important change: everytime you would use `$`, you should use `$$` instead. Also, note that the `pseudocode` key in the front matter is set to `true` to enable the rendering of pseudo code. As an example, using this code: + +````markdown +```pseudocode +% This quicksort algorithm is extracted from Chapter 7, Introduction to Algorithms (3rd edition) +\begin{algorithm} +\caption{Quicksort} +\begin{algorithmic} +\PROCEDURE{Quicksort}{$$A, p, r$$} + \IF{$$p < r$$} + \STATE $$q = $$ \CALL{Partition}{$$A, p, r$$} + \STATE \CALL{Quicksort}{$$A, p, q - 1$$} + \STATE \CALL{Quicksort}{$$A, q + 1, r$$} + \ENDIF +\ENDPROCEDURE +\PROCEDURE{Partition}{$$A, p, r$$} + \STATE $$x = A[r]$$ + \STATE $$i = p - 1$$ + \FOR{$$j = p$$ \TO $$r - 1$$} + \IF{$$A[j] < x$$} + \STATE $$i = i + 1$$ + \STATE exchange + $$A[i]$$ with $$A[j]$$ + \ENDIF + \STATE exchange $$A[i]$$ with $$A[r]$$ + \ENDFOR +\ENDPROCEDURE +\end{algorithmic} +\end{algorithm} +``` +```` + +Generates: + +```pseudocode +% This quicksort algorithm is extracted from Chapter 7, Introduction to Algorithms (3rd edition) +\begin{algorithm} +\caption{Quicksort} +\begin{algorithmic} +\PROCEDURE{Quicksort}{$$A, p, r$$} + \IF{$$p < r$$} + \STATE $$q = $$ \CALL{Partition}{$$A, p, r$$} + \STATE \CALL{Quicksort}{$$A, p, q - 1$$} + \STATE \CALL{Quicksort}{$$A, q + 1, r$$} + \ENDIF +\ENDPROCEDURE +\PROCEDURE{Partition}{$$A, p, r$$} + \STATE $$x = A[r]$$ + \STATE $$i = p - 1$$ + \FOR{$$j = p$$ \TO $$r - 1$$} + \IF{$$A[j] < x$$} + \STATE $$i = i + 1$$ + \STATE exchange + $$A[i]$$ with $$A[j]$$ + \ENDIF + \STATE exchange $$A[i]$$ with $$A[r]$$ + \ENDFOR +\ENDPROCEDURE +\end{algorithmic} +\end{algorithm} +``` diff --git a/_posts/2024-04-28-post-citation.md b/_posts/2024-04-28-post-citation.md new file mode 100644 index 000000000000..4b47a27fca18 --- /dev/null +++ b/_posts/2024-04-28-post-citation.md @@ -0,0 +1,11 @@ +--- +layout: post +title: a post that can be cited +date: 2024-04-28 15:06:00 +description: this is what a post that can be cited looks like +tags: formatting citation +categories: sample-posts +citation: true +--- + +This is an example post that can be cited. The content of the post ends here, while the citation information is automatically provided below. The only thing needed is for you to set the `citation` key in the front matter to `true`. diff --git a/_posts/2024-04-29-typograms.md b/_posts/2024-04-29-typograms.md new file mode 100644 index 000000000000..6caff4e67a65 --- /dev/null +++ b/_posts/2024-04-29-typograms.md @@ -0,0 +1,85 @@ +--- +layout: post +title: a post with typograms +date: 2024-04-29 23:36:10 +description: this is what included typograms code could look like +tags: formatting diagrams +categories: sample-posts +typograms: true +--- + +This is an example post with some [typograms](https://github.com/google/typograms/) code. + +````markdown +```typograms ++----+ +| |---> My first diagram! ++----+ +``` +```` + +Which generates: + +```typograms ++----+ +| |---> My first diagram! ++----+ +``` + +Another example: + +````markdown +```typograms +.------------------------. +|.----------------------.| +||"https://example.com" || +|'----------------------'| +| ______________________ | +|| || +|| Welcome! || +|| || +|| || +|| .----------------. || +|| | username | || +|| '----------------' || +|| .----------------. || +|| |"*******" | || +|| '----------------' || +|| || +|| .----------------. || +|| | "Sign-up" | || +|| '----------------' || +|| || +|+----------------------+| +.------------------------. +``` +```` + +which generates: + +```typograms +.------------------------. +|.----------------------.| +||"https://example.com" || +|'----------------------'| +| ______________________ | +|| || +|| Welcome! || +|| || +|| || +|| .----------------. || +|| | username | || +|| '----------------' || +|| .----------------. || +|| |"*******" | || +|| '----------------' || +|| || +|| .----------------. || +|| | "Sign-up" | || +|| '----------------' || +|| || +|+----------------------+| +.------------------------. +``` + +For more examples, check out the [typograms documentation](https://google.github.io/typograms/#examples). diff --git a/_posts/2024-05-01-tabs.md b/_posts/2024-05-01-tabs.md new file mode 100644 index 000000000000..f3d6e2d2211e --- /dev/null +++ b/_posts/2024-05-01-tabs.md @@ -0,0 +1,122 @@ +--- +layout: post +title: a post with tabs +date: 2024-05-01 00:32:13 +description: this is what included tabs in a post could look like +tags: formatting code +categories: sample-posts +tabs: true +--- + +This is how a post with [tabs](https://github.com/Ovski4/jekyll-tabs) looks like. Note that the tabs could be used for different purposes, not only for code. + +## First tabs + +To add tabs, use the following syntax: + +{% raw %} + +```liquid +{% tabs group-name %} + +{% tab group-name tab-name-1 %} + +Content 1 + +{% endtab %} + +{% tab group-name tab-name-2 %} + +Content 2 + +{% endtab %} + +{% endtabs %} +``` + +{% endraw %} + +With this you can generate visualizations like: + +{% tabs log %} + +{% tab log php %} + +```php +var_dump('hello'); +``` + +{% endtab %} + +{% tab log js %} + +```javascript +console.log("hello"); +``` + +{% endtab %} + +{% tab log ruby %} + +```javascript +pputs 'hello' +``` + +{% endtab %} + +{% endtabs %} + +## Another example + +{% tabs data-struct %} + +{% tab data-struct yaml %} + +```yaml +hello: + - "whatsup" + - "hi" +``` + +{% endtab %} + +{% tab data-struct json %} + +```json +{ + "hello": ["whatsup", "hi"] +} +``` + +{% endtab %} + +{% endtabs %} + +## Tabs for something else + +{% tabs something-else %} + +{% tab something-else text %} + +Regular text + +{% endtab %} + +{% tab something-else quote %} + +> A quote + +{% endtab %} + +{% tab something-else list %} + +Hipster list + +- brunch +- fixie +- raybans +- messenger bag + +{% endtab %} + +{% endtabs %} diff --git a/_projects/1_project.md b/_projects/1_project.md new file mode 100644 index 000000000000..ac87b64b2fef --- /dev/null +++ b/_projects/1_project.md @@ -0,0 +1,81 @@ +--- +layout: page +title: project 1 +description: with background image +img: assets/img/12.jpg +importance: 1 +category: work +related_publications: true +--- + +Every project has a beautiful feature showcase page. +It's easy to include images in a flexible 3-column grid format. +Make your photos 1/3, 2/3, or full width. + +To give your project a background in the portfolio page, just add the img tag to the front matter like so: + + --- + layout: page + title: project + description: a project with a background image + img: /assets/img/12.jpg + --- + +
+
+ {% include figure.liquid loading="eager" path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles. +
+
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ This image can also have a caption. It's like magic. +
+ +You can also put regular text between your rows of images, even citations {% cite einstein1950meaning %}. +Say you wanted to write a bit about your project before you posted the rest of the images. +You describe how you toiled, sweated, _bled_ for your project, and then... you reveal its glory in the next row of images. + +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ You can also have artistically styled 2/3 + 1/3 images, like these. +
+ +The code is simple. +Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system). +To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. +Here's the code for the last row of images above: + +{% raw %} + +```html +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+``` + +{% endraw %} diff --git a/_projects/2_project.md b/_projects/2_project.md new file mode 100644 index 000000000000..25de228cf2a7 --- /dev/null +++ b/_projects/2_project.md @@ -0,0 +1,81 @@ +--- +layout: page +title: project 2 +description: a project with a background image and giscus comments +img: assets/img/3.jpg +importance: 2 +category: work +giscus_comments: true +--- + +Every project has a beautiful feature showcase page. +It's easy to include images in a flexible 3-column grid format. +Make your photos 1/3, 2/3, or full width. + +To give your project a background in the portfolio page, just add the img tag to the front matter like so: + + --- + layout: page + title: project + description: a project with a background image + img: /assets/img/12.jpg + --- + +
+
+ {% include figure.liquid loading="eager" path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles. +
+
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ This image can also have a caption. It's like magic. +
+ +You can also put regular text between your rows of images. +Say you wanted to write a little bit about your project before you posted the rest of the images. +You describe how you toiled, sweated, _bled_ for your project, and then... you reveal its glory in the next row of images. + +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ You can also have artistically styled 2/3 + 1/3 images, like these. +
+ +The code is simple. +Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system). +To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. +Here's the code for the last row of images above: + +{% raw %} + +```html +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+``` + +{% endraw %} diff --git a/_projects/3_project.md b/_projects/3_project.md new file mode 100644 index 000000000000..4f981b4d8b5c --- /dev/null +++ b/_projects/3_project.md @@ -0,0 +1,81 @@ +--- +layout: page +title: project 3 with very long name +description: a project that redirects to another website +img: assets/img/7.jpg +redirect: https://unsplash.com +importance: 3 +category: work +--- + +Every project has a beautiful feature showcase page. +It's easy to include images in a flexible 3-column grid format. +Make your photos 1/3, 2/3, or full width. + +To give your project a background in the portfolio page, just add the img tag to the front matter like so: + + --- + layout: page + title: project + description: a project with a background image + img: /assets/img/12.jpg + --- + +
+
+ {% include figure.liquid loading="eager" path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles. +
+
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ This image can also have a caption. It's like magic. +
+ +You can also put regular text between your rows of images. +Say you wanted to write a little bit about your project before you posted the rest of the images. +You describe how you toiled, sweated, _bled_ for your project, and then... you reveal its glory in the next row of images. + +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ You can also have artistically styled 2/3 + 1/3 images, like these. +
+ +The code is simple. +Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system). +To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. +Here's the code for the last row of images above: + +{% raw %} + +```html +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+``` + +{% endraw %} diff --git a/_projects/4_project.md b/_projects/4_project.md new file mode 100644 index 000000000000..1144b9c837d6 --- /dev/null +++ b/_projects/4_project.md @@ -0,0 +1,80 @@ +--- +layout: page +title: project 4 +description: another without an image +img: +importance: 3 +category: fun +--- + +Every project has a beautiful feature showcase page. +It's easy to include images in a flexible 3-column grid format. +Make your photos 1/3, 2/3, or full width. + +To give your project a background in the portfolio page, just add the img tag to the front matter like so: + + --- + layout: page + title: project + description: a project with a background image + img: /assets/img/12.jpg + --- + +
+
+ {% include figure.liquid loading="eager" path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles. +
+
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ This image can also have a caption. It's like magic. +
+ +You can also put regular text between your rows of images. +Say you wanted to write a little bit about your project before you posted the rest of the images. +You describe how you toiled, sweated, _bled_ for your project, and then... you reveal its glory in the next row of images. + +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ You can also have artistically styled 2/3 + 1/3 images, like these. +
+ +The code is simple. +Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system). +To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. +Here's the code for the last row of images above: + +{% raw %} + +```html +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+``` + +{% endraw %} diff --git a/_projects/5_project.md b/_projects/5_project.md new file mode 100644 index 000000000000..35c8e6381d57 --- /dev/null +++ b/_projects/5_project.md @@ -0,0 +1,80 @@ +--- +layout: page +title: project 5 +description: a project with a background image +img: assets/img/1.jpg +importance: 3 +category: fun +--- + +Every project has a beautiful feature showcase page. +It's easy to include images in a flexible 3-column grid format. +Make your photos 1/3, 2/3, or full width. + +To give your project a background in the portfolio page, just add the img tag to the front matter like so: + + --- + layout: page + title: project + description: a project with a background image + img: /assets/img/12.jpg + --- + +
+
+ {% include figure.liquid loading="eager" path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles. +
+
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ This image can also have a caption. It's like magic. +
+ +You can also put regular text between your rows of images. +Say you wanted to write a little bit about your project before you posted the rest of the images. +You describe how you toiled, sweated, _bled_ for your project, and then... you reveal its glory in the next row of images. + +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ You can also have artistically styled 2/3 + 1/3 images, like these. +
+ +The code is simple. +Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system). +To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. +Here's the code for the last row of images above: + +{% raw %} + +```html +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+``` + +{% endraw %} diff --git a/_projects/6_project.md b/_projects/6_project.md new file mode 100644 index 000000000000..36ea874c8011 --- /dev/null +++ b/_projects/6_project.md @@ -0,0 +1,80 @@ +--- +layout: page +title: project 6 +description: a project with no image +img: +importance: 4 +category: fun +--- + +Every project has a beautiful feature showcase page. +It's easy to include images in a flexible 3-column grid format. +Make your photos 1/3, 2/3, or full width. + +To give your project a background in the portfolio page, just add the img tag to the front matter like so: + + --- + layout: page + title: project + description: a project with a background image + img: /assets/img/12.jpg + --- + +
+
+ {% include figure.liquid loading="eager" path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles. +
+
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ This image can also have a caption. It's like magic. +
+ +You can also put regular text between your rows of images. +Say you wanted to write a little bit about your project before you posted the rest of the images. +You describe how you toiled, sweated, _bled_ for your project, and then... you reveal its glory in the next row of images. + +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ You can also have artistically styled 2/3 + 1/3 images, like these. +
+ +The code is simple. +Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system). +To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. +Here's the code for the last row of images above: + +{% raw %} + +```html +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+``` + +{% endraw %} diff --git a/_projects/7_project.md b/_projects/7_project.md new file mode 100644 index 000000000000..f9522cea04d0 --- /dev/null +++ b/_projects/7_project.md @@ -0,0 +1,81 @@ +--- +layout: page +title: project 7 +description: with background image +img: assets/img/4.jpg +importance: 1 +category: work +related_publications: true +--- + +Every project has a beautiful feature showcase page. +It's easy to include images in a flexible 3-column grid format. +Make your photos 1/3, 2/3, or full width. + +To give your project a background in the portfolio page, just add the img tag to the front matter like so: + + --- + layout: page + title: project + description: a project with a background image + img: /assets/img/12.jpg + --- + +
+
+ {% include figure.liquid loading="eager" path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles. +
+
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ This image can also have a caption. It's like magic. +
+ +You can also put regular text between your rows of images, even citations {% cite einstein1950meaning %}. +Say you wanted to write a bit about your project before you posted the rest of the images. +You describe how you toiled, sweated, _bled_ for your project, and then... you reveal its glory in the next row of images. + +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ You can also have artistically styled 2/3 + 1/3 images, like these. +
+ +The code is simple. +Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system). +To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. +Here's the code for the last row of images above: + +{% raw %} + +```html +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+``` + +{% endraw %} diff --git a/_projects/8_project.md b/_projects/8_project.md new file mode 100644 index 000000000000..c6079016a62e --- /dev/null +++ b/_projects/8_project.md @@ -0,0 +1,81 @@ +--- +layout: page +title: project 8 +description: an other project with a background image and giscus comments +img: assets/img/9.jpg +importance: 2 +category: work +giscus_comments: true +--- + +Every project has a beautiful feature showcase page. +It's easy to include images in a flexible 3-column grid format. +Make your photos 1/3, 2/3, or full width. + +To give your project a background in the portfolio page, just add the img tag to the front matter like so: + + --- + layout: page + title: project + description: a project with a background image + img: /assets/img/12.jpg + --- + +
+
+ {% include figure.liquid loading="eager" path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles. +
+
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ This image can also have a caption. It's like magic. +
+ +You can also put regular text between your rows of images. +Say you wanted to write a little bit about your project before you posted the rest of the images. +You describe how you toiled, sweated, _bled_ for your project, and then... you reveal its glory in the next row of images. + +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ You can also have artistically styled 2/3 + 1/3 images, like these. +
+ +The code is simple. +Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system). +To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. +Here's the code for the last row of images above: + +{% raw %} + +```html +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+``` + +{% endraw %} diff --git a/_projects/9_project.md b/_projects/9_project.md new file mode 100644 index 000000000000..7345bbb66dc2 --- /dev/null +++ b/_projects/9_project.md @@ -0,0 +1,80 @@ +--- +layout: page +title: project 9 +description: another project with an image 🎉 +img: assets/img/6.jpg +importance: 4 +category: fun +--- + +Every project has a beautiful feature showcase page. +It's easy to include images in a flexible 3-column grid format. +Make your photos 1/3, 2/3, or full width. + +To give your project a background in the portfolio page, just add the img tag to the front matter like so: + + --- + layout: page + title: project + description: a project with a background image + img: /assets/img/12.jpg + --- + +
+
+ {% include figure.liquid loading="eager" path="assets/img/1.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/3.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ Caption photos easily. On the left, a road goes through a tunnel. Middle, leaves artistically fall in a hipster photoshoot. Right, in another hipster photoshoot, a lumberjack grasps a handful of pine needles. +
+
+
+ {% include figure.liquid loading="eager" path="assets/img/5.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ This image can also have a caption. It's like magic. +
+ +You can also put regular text between your rows of images. +Say you wanted to write a little bit about your project before you posted the rest of the images. +You describe how you toiled, sweated, _bled_ for your project, and then... you reveal its glory in the next row of images. + +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+
+ You can also have artistically styled 2/3 + 1/3 images, like these. +
+ +The code is simple. +Just wrap your images with `
` and place them inside `
` (read more about the Bootstrap Grid system). +To make images responsive, add `img-fluid` class to each; for rounded corners and shadows use `rounded` and `z-depth-1` classes. +Here's the code for the last row of images above: + +{% raw %} + +```html +
+
+ {% include figure.liquid path="assets/img/6.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+ {% include figure.liquid path="assets/img/11.jpg" title="example image" class="img-fluid rounded z-depth-1" %} +
+
+``` + +{% endraw %} diff --git a/_sass/_themes.scss b/_sass/_themes.scss index 7982cec5f02c..54518eccdba5 100644 --- a/_sass/_themes.scss +++ b/_sass/_themes.scss @@ -2,6 +2,8 @@ * Themes ******************************************************************************/ +@use "sass:color"; + :root { --global-bg-color: #{$white-color}; --global-code-bg-color: #{$code-bg-color-light}; @@ -17,7 +19,12 @@ --global-divider-color: rgba(0, 0, 0, 0.1); --global-card-bg-color: #{$white-color}; --global-highlight-color: #{$red-color-dark}; - --global-back-to-top-bg-color: rgba(#{red($black-color)}, #{green($black-color)}, #{blue($black-color)}, 0.4); + --global-back-to-top-bg-color: rgba( + #{color.channel($black-color, "red", $space: rgb)}, + #{color.channel($black-color, "green", $space: rgb)}, + #{color.channel($black-color, "blue", $space: rgb)}, + 0.4 + ); --global-back-to-top-text-color: #{$white-color}; --global-newsletter-bg-color: #{$white-color}; --global-newsletter-text-color: #{$black-color}; @@ -81,7 +88,12 @@ html[data-theme="dark"] { --global-distill-app-color: #{$grey-color-light}; --global-divider-color: #424246; --global-card-bg-color: #{$grey-900}; - --global-back-to-top-bg-color: rgba(#{red($white-color)}, #{green($white-color)}, #{blue($white-color)}, 0.5); + --global-back-to-top-bg-color: rgba( + #{color.channel($white-color, "red", $space: rgb)}, + #{color.channel($white-color, "green", $space: rgb)}, + #{color.channel($white-color, "blue", $space: rgb)}, + 0.5 + ); --global-back-to-top-text-color: #{$black-color}; --global-newsletter-bg-color: #{$grey-color-light}; --global-newsletter-text-color: #{$grey-color-dark}; diff --git a/_sass/_variables.scss b/_sass/_variables.scss index 85b6c72624f1..538a92bda131 100644 --- a/_sass/_variables.scss +++ b/_sass/_variables.scss @@ -3,6 +3,8 @@ * To adjust anything, simply edit the variables below and rebuild the theme. ******************************************************************************/ +@use "sass:color"; + // Colors $red-color: #ff3636 !default; $red-color-dark: #b71c1c !default; @@ -10,20 +12,20 @@ $orange-color: #f29105 !default; $blue-color: #0076df !default; $blue-color-dark: #00369f !default; $cyan-color: #2698ba !default; -$light-cyan-color: lighten($cyan-color, 25%); +$light-cyan-color: color.adjust($cyan-color, $lightness: 25%); $green-color: #00ab37 !default; $green-color-lime: #b7d12a !default; $green-color-dark: #009f06 !default; $green-color-light: #ddffdd !default; $green-color-bright: #11d68b !default; $purple-color: #b509ac !default; -$light-purple-color: lighten($purple-color, 25%); +$light-purple-color: color.adjust($purple-color, $lightness: 25%); $pink-color: #f92080 !default; $pink-color-light: #ffdddd !default; $yellow-color: #efcc00 !default; $grey-color: #828282 !default; -$grey-color-light: lighten($grey-color, 40%); +$grey-color-light: color.adjust($grey-color, $lightness: 40%); $grey-color-dark: #1c1c1d; $grey-900: #212529; diff --git a/assets/img/prof_pic.jpg b/assets/img/prof_pic.jpg index 43c8c3492a75..46bcf9c91ade 100644 Binary files a/assets/img/prof_pic.jpg and b/assets/img/prof_pic.jpg differ diff --git a/bin/entry_point.sh b/bin/entry_point.sh index 917ae3572a6a..9627ab1b89b9 100755 --- a/bin/entry_point.sh +++ b/bin/entry_point.sh @@ -1,22 +1,34 @@ #!/bin/bash -CONFIG_FILE=_config.yml - -/bin/bash -c "rm -f Gemfile.lock && exec jekyll serve --watch --port=8080 --host=0.0.0.0 --livereload --verbose --trace --force_polling"& +CONFIG_FILE=_config.yml + +# Function to manage Gemfile.lock +manage_gemfile_lock() { + git config --global --add safe.directory '*' + if command -v git &> /dev/null && [ -f Gemfile.lock ]; then + if git ls-files --error-unmatch Gemfile.lock &> /dev/null; then + echo "Gemfile.lock is tracked by git, keeping it intact" + git restore Gemfile.lock 2>/dev/null || true + else + echo "Gemfile.lock is not tracked by git, removing it" + rm Gemfile.lock + fi + fi +} + +start_jekyll() { + manage_gemfile_lock + exec jekyll serve --watch --port=8080 --host=0.0.0.0 --livereload --verbose --trace --force_polling & +} + +start_jekyll while true; do - - inotifywait -q -e modify,move,create,delete $CONFIG_FILE - - if [ $? -eq 0 ]; then - - echo "Change detected to $CONFIG_FILE, restarting Jekyll" - - jekyll_pid=$(pgrep -f jekyll) - kill -KILL $jekyll_pid - - /bin/bash -c "rm -f Gemfile.lock && exec jekyll serve --watch --port=8080 --host=0.0.0.0 --livereload --verbose --trace --force_polling"& - - fi - + inotifywait -q -e modify,move,create,delete $CONFIG_FILE + if [ $? -eq 0 ]; then + echo "Change detected to $CONFIG_FILE, restarting Jekyll" + jekyll_pid=$(pgrep -f jekyll) + kill -KILL $jekyll_pid + start_jekyll + fi done