Simple Slideshow

I needed a simple slideshow to display images on a large-screen TV and I came across Simple Fullscreen Image Slideshow. It was exactly what I needed and the codes are just so simple. I loved it so much, I replaced all my Flickity slideshows with this one. Here’s an example. Although it works as webpage, my goal is to create a digital display slider. Here’s the entire page:


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Slideshow</title>
<style>
@keyframes fadey {
0% { opacity: 0; }
15% { opacity: 1; }
85% { opacity: 1; }
100% { opacity: 0; }
}
body {
  font-family: Avenir, Arial, sans-serif;
  font-size: 0;
  background: #000;
}

body, figure {  margin: 0; padding: 0;}

figure#slideshow {
  width: 100%;
  margin: 0 auto;
  position: relative;
  /*border: 1px solid #000;*/
  cursor: pointer;
}
figure#slideshow img {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: auto;
  opacity: 0;
}
figure#slideshow img:first-child { position: relative; }

#container:fullscreen {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}
#container:-moz-full-screen figure, #container:-ms-full-screen figure, #container:-webkit-fullscreen figure, #container:fullscreen figure {
  width: 100%;
  margin: 0 auto;
  background: #000;
}
:-webkit-full-screen {
  width: 100%; height: 100%;
}
*:-moz-full-screen {
  background: #000;
}
*:-webkit-full-screen {
  background: #000;
}
</style>

<script>
function cancelFullScreen() {
if (document.cancelFullScreen) {
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
} else if (document.msCancelFullScreen) {
document.msCancelFullScreen();
}
link = document.getElementById("container");
link.removeAttribute("onclick");
link.setAttribute("onclick", "fullScreen(this)");
}

function fullScreen(element) {
if (element.requestFullScreen) {
element.requestFullScreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
}
link = document.getElementById("container");
link.removeAttribute("onclick");
link.setAttribute("onclick", "cancelFullScreen()");
}

window.onload = function() {
  imgs = document.getElementById('slideshow').children;
  interval = 8000;
  currentPic = 0;
  imgs[currentPic].style.webkitAnimation = 'fadey '+interval+'ms';
  imgs[currentPic].style.animation = 'fadey '+interval+'ms';
  var infiniteLoop = setInterval(function(){
imgs[currentPic].removeAttribute('style');
if ( currentPic == imgs.length - 1) { currentPic = 0; } else { currentPic++; }
imgs[currentPic].style.webkitAnimation = 'fadey '+interval+'ms';
imgs[currentPic].style.animation = 'fadey '+interval+'ms';
  }, interval);
}
</script>
</head>
<body>
<figure id="container" onclick="fullScreen(this)">
<figure id="slideshow">
<img loading="lazy" src="img/01.jpg" alt>
<img loading="lazy" src="img/02.jpg" alt>
<img loading="lazy" src="img/03.jpg" alt>
</figure>
</figure>
</body>
</html>

Statement of Research Interests

As a web designer and an adjunct professor who has a passion for typography, I researched and wrote a book on web typography. Professional Web Typography was my independent study in pursuing my Master of Arts (MA) degree in graphic design at George Mason University.

The first edition of Professional Web Typography was released as a web book in 2015 when web fonts started to take off. At the time, I could not find a book that combined typography principles with web technologies; therefore, I decided to write the book myself.

With my experience of designing websites for over two decades, I understood the importance of legibility, readability, usability, and accessibility when setting type on the web; therefore, I delved into topics such as selecting body text, choosing headlines, picking type for user interface, and discerning typographical details.

My goal was to prove that typesetting on the web was fun and rewarding—not intimidating. As a result, I kept the technical aspects as simple as possible. Back in 2015, variable font was still in its infancy. Not all browsers adopted variable fonts. Today, browser makers, type creators, and web designers are all on board.

My current research is to show the benefits of variable fonts for designing web experiences. Using just a few lines of CSS, designers can have a wide range of possibilities including setting specific weight, width, and optical size.

My future research is to expand the power of variable fonts to make the web experiences more diverse. One of my research interests is language support. As a native Vietnamese speaker and writer, my goal is to see more support for the Vietnamese in typefaces.

Checked Out Whitetail

I skied and snowboarded at Whitetail for the first time this season. The condition was surprisingly good given the warm weather in the past week and the heavy rain on Tuesday. Only two blue trails and the learning center opened. I practiced carving on both ski and snowboard on the blue trails. I was not complaining. It was better than nothing. I hope they’ll be able to make more snow in next few weeks.

Ngọc Bích Vol. 2: Ru giấc tàn phai

Ngọc Bích mở đầu “Giọt mưa thu” (Đặng Thế Phong và Bùi Công Kỳ) với chất giọng thấp trầm khiến tôi hình dung ngay nữ danh ca Thanh Thúy. Cái đặc điểm trong phiên bản của Ngọc Bích là phần hòa âm. Nhạc sĩ Nguyễn Tuấn Nam khéo léo kết hợp giai điệu dân gian Việt Nam vào phong cách jazz. Các ca khúc trong album được phối theo jazz và blues nhẹ nhàng thích hợp với cách hát nồng nàn và chất giọng trầm ấm của Ngọc Bích như “Thu hát cho người” (Vũ Đức Sao Biển), “Lá rơi bên thềm” (Nguyễn Hiền và Lê Trọng Nguyễn), và “Ru giấc tàn phai” (Trường Sa). Trong những ngày mùa đông lạnh lẽo của miền bắc Mỹ nhờ chín ca khúc này sưởi ấm con tim.

Visualgui 2024: The Button

It’s only January and I already cooked up a second iteration for this blog. The design is inspired by my son Đán Trương who created the cool button and asked me to add it to this site. At first, I refused because his button was a bit too flashy for my site (try hover the next and previous buttons). He insisted that I should use it.

To include his button, I had to redesign the entire site. I went with the Bauhaus style. For the header and footer, I added vibrant, colorful, AI-generate illustrations of Bauhaus architecture, created by Eyetronic. I also added a vector set of abstract avant-garde minimal geometric dividers (to separate each blog post), designed by Vitaneo.

To keep the Bauhaus vibe, I had to remove the scripted typeface for the blog titles. The new titles are now set in Neue DIN, designed by Hendrik Weber, Andreas Frohloff, and Olli Meier, which I had already used for large display text and UI elements.

Of course, I have to give a shoutout to Đán, one of my awesome sons, for creating the supercool button using CSS. Keep learning HTML and CSS, kiddo. You’ll be a superstar designer and you’ll create way cooler sites than your dad. I love you!

Skiing & Snowboarding

I spent three weekdays alone skiing and snowboarding at Seven Springs. When I was skiing and sharing a lift with other skiers, I would ask them if they snowboarded too. In contrast, when I was snowboarding, I would ask other snowboarders if they skied as well. The general consensus was that skiers felt snowboarding was hard and snowboarders felt skiing was uncool. As for me, I enjoy both sports and split my time in half on the slopes.

I started out skiing four seasons ago at the age of 40—better late than never. I didn’t want to try because the price tag was enormous, but my wife bought me the whole package (lift ticket, rental, and a two-hour lesson) and made me learn to ski with my boys. I took a lesson and skied straight down the bunny slope for the first time without crashing into anyone. I was hooked.

Three seasons ago, I wanted to try snowboarding. I took a semi-private lesson with one of my second son who wanted to switch from skiing to snowboarding. As a natural snowboarder, he picked up it right away. I fell trying to get on the magic carpet, landed my hand inside the edge of the conveyor belt, and bruised my left thumb. I was not sure where I stuck my finger into, but I had a feeling it might be one of the pulleys. Luckily, my finger didn’t get chopped off. I put snowboarding away and focused on skiing for the rest of the season.

Last season, I determined to challenge myself once again trying to learn snowboarding. I took another group lesson. I fell repeatedly and miserably. The instructor said it would take three days of falling in order to learn how to snowboard. I fell for about ten days straight before I could figure out how not to catch an edge. To this day, I continue to fall occasionally, but I have beat the challenge.

I am not an advanced skier or snowboarder, but I have come to understand the concept of both sports. Even though they share the slopes and the terrains, skiing and snowboarding are two worlds apart. Learning each sport has given me a whole new perspective on how relationships worked.

Skiing is a marriage between my left and right foot. Even though I strap on each foot individually, my feet have to work together in parallel. Whether I skid or carve down the trails, my inside foot has to follow my outside foot in order for me to make a smooth turn. As in life, a couple has to be on the same path for a marriage to work. One cannot leave the other behind and both have to take turns to lead.

Snowboarding is a sibling between my left and right foot. Even though I strap them onto the same board, they have to do their own part in order to create a smooth ride. I learned this concept the hard way. When I tried to make them work together, I ended up catching the edges and fell on my behind or flat on my face. I had to learn to separate them so they could hold up their end of the bargain. Once I figured out each individual role, I could carve or short turn my way down any trails. As siblings, they are bounded by the same mother board, but they have their own role to play to keep the family together.

I am so glad that I have picked up these two snowsports. They not only opened up a whole new world for me on the mountains, but also opened up my eyes in life. I hope to continue to play both sports for many years to come.

My Wife Rocks

My wife knows how much I love skiing and snowboarding. Even though we already spent an entire week at Stowe, she encouraged me to check out Laurel Mountain, Hidden Valley, and Seven Springs while I was still on vacation. I felt a bit guilty when she had to stay home to take care of the kids. I missed them while I was on the trails and I was so excited when they came to join me. I got to spend time with Vương on the bunny slopes. Soon I will take him on the green slopes. I also spent time with the older three boys on the blue and black slopes.

My wife knows how to save my face. When my friend came to visit from Canada, she let me spend all night singing and drinking. She even reminded me to take the Lyft home instead of driving. Even though I could drive, I definitely couldn’t afford a DUI. I could only pull a few all-nighters in a row. The drinking and lack of sleeping put a toll on my body, but I had so much fun singing while my friend accompanied me on the keyboard. I loved sipping the Yamazaki 12. It’s my favorite Japanese whiskey. I will stop buying cheap liquor and just save up to buy expensive ones. It will help cut down my alcohol consumption. When I was skiing or snowboarding, I didn’t have a drink at all.

My wife knows the flexibility. My buddies often wonder how I get to go out drinking and partying without her. I would love for her to join me like other couples, but she doesn’t like socializing. She rather stayed home with her mom and our kids. I respect that and she also respects my social life. I need to get out every now and then to clear my head.

My wife knows my loyalty to her. I appreciate her trust and would never do anything to jeopardize our relationship. Once the trust is broken, nothing will be able to repair it. As a man, of course, I am attracted to beauties and my wife is beautiful in her own way. She is all that I need. I love the fact that she got a mind of her own. No need to shop around I got the good shit at home. I love you, boo!

Responding to Đạo’s Post

Đạo uses his blog to vent his frustrations. I appreciate and encourage that since I can’t get much out of him when we talk face to face.

Recently I wanted to implement time-limit programs on their devices, especially Đạo’s and Đán’s. I don’t want to control what they do, but I want them to manage their time. Without time limitations, they don’t stop. Even when his mom and I asked them to turn off and go to bed, they still linger on after many hours of usage.

They have 24 hours a day. At least 8 hours are reserved for sleeping. The rest of the hours need to be balanced out with off-screen activities, and not just phone and PC. They need to be able to switch their minds off.

When we went to Stowe for a week, Đán wanted to go home on the first day as we took the first chair lift to the top of the mountain. He hadn’t even started to snowboard yet. We paid all this money and drove almost 12 hours so we could have a nice ski trip together. Yet all he could think about was spending time on his PC? That just made me want to take away their devices for good.

Đạo goes everywhere with his phone and spends hours on it, even when he uses the bathroom. He used to read voraciously. Now I hardly see him hold a book. It breaks my heart. He used to be socialized. He could talk to anyone. Last week, I took him and Đán to a seafood buffet with my friends and their kids. All they did was glued to their phones even though I asked them to put them away and talked.

As for Đạo’s grades, my wife has to constantly check his work, remind him to do his assignments, and retake his tests. If he is allowed to retake his tests, he should not get anything below a B. In fact, he should be able to get all A’s. The issue is that he isn’t being on top of his school work. They aren’t his priority. Digital screens take over his academics.

We had a discussion on time limitation and they both strongly opposed it. I made them a deal. I won’t put on a time limitation. I won’t ask them to turn off their devices. I asked my wife not to remind them about their assignments unless they come and ask for help. I want to give them an opportunity to prove themselves that they can manage their time. If the next quarter report comes in, Ðạo gets below a 3.5 GPA and Đán gets more than five 2’s, their devices will be gone for the entire quarter. Freedom comes with responsibility.

Last Day at Seven Springs

My wife, her mother, and our youngest son went home after we checked out of the hotel. I took the three older kids back to Seven Springs for a few hours.

The crowd today was as bad as yesterday. We waited at the Polar Bear Express for almost 30 minutes. We took the green trails to warm up. Xuân got hungry so we took the North Face Lift up to Tahoe Lodge for lunch. The wait was about 15 minutes. We didn’t want to go back down and have to wait for another 30 minutes at the Polar Bear Express. We did a run on the North Face, but the boys got bored waiting. We waited another 15 minutes to get us to the top and we skied back to the main base.

Before heading home, I got them to take Cortina for a run. We spent 3 hours (including lunch) for 4 runs. We headed out around 2:30 pm and called it the day. I don’t like weekend skiing. Way too crowded.

Saturday at Seven Springs

My mother-in-law, wife, and kids joined me today at Seven Springs. I wanted my boys to experience the night-skiing scene; therefore, we didn’t need to get up early.

After having breakfast at the hotel, we headed to the resort around 10 am. It was snowing. Our mini-van struggled to get up the mountains. We were going around 15 miles per hour with a few cars tailgating behind us.

At one point, I thought we would just skid backward. I prayed to my mother from above to save us and her respond was immediate. Just a few minutes later, a snow-plowing truck pulled out in front of me and cleared the way for me to drive all the way to the resort.

I skied with Vương at the bunny slopes. After the disappointing all-day group lessons at Stowe, I decided to teach him myself. He could now go straight down hill and pizza to slow himself down. He did a great job today.

I skied with Đạo, Đán, and Xuân on the blue and black slopes. Around 4 pm, I called it off. I didn’t want to risk driving back in the dark with my whole family in the back.

We went out to have dinner at Ruby Tuesday and went back to the hotel to chill out. I am debating whether we would go straight home or go ski for a couple of hours before heading home.