diff --git a/src/diary/entries/240101 b/src/diary/entries/240101 index 6a1c61e..ff6e0f2 100644 --- a/src/diary/entries/240101 +++ b/src/diary/entries/240101 @@ -4,13 +4,13 @@

Colon cancer can look a lot like grief or fatigue, so I didn't recognize it for maybe 2 years. Lining up so well with my mom's passing and other stressful events isn't bad timing, though, because God's timing is always perfect.

-

It's Just Grief

+

It's just grief.

I've had low energy for months, maybe even a year. I haven't had energy for cooking, programming, or even videogames, so I've fallen massively behind in all my hobbies. Basically, I've been really lame. The timing lines up perfectly with my mom's passing in September 2022, so I assumed it was part of grieving and would pass eventually.

-

It's Just a Pulled Muscle

+

It's just a pulled muscle.

About six months before the diagnosis, I felt the worst pain I've ever felt in my right side. It felt like a dagger in my liver, and I could not lift my arm over my head. I could barely even sit up. Before the pain, I had been nonstop coughing every night for weeks, so constantly I couldn't have conversations. Google suggested it was a torn muscle, which constant coughing can cause, so that's what I went with as an explanation. After two or three weeks, the pain dropped to a manageable level, only hurting some days. It concerned me, but I ultimately let it go.

-

It's Just Stress

+

It's just stress.

My health was in the background all 2023. Instead, the entire year, I made it my mission to fix my relationship with my dad. He never accepted me as "I came out wrong," so he cut me out of his life as much as possible. Mom's death softened him and I think he has been making small efforts to try to be my dad, so I took it as a chance to mend. It's hard to read someone's heart, though. He is stony and never opened up to me even a little over the course of a year of accompanying him to his therapy group, trying to arrange father-daughter time, and numerous chatty phone calls.

It was more than wanting a normal relationship with my dad, though. I felt like I was sharing the gospel. Whenever I would suggest he pray about his grief, he would give vaguities like "I have been having conversations with God" that thrilled me. My dad, who used to disparage me for believing the Bible is true, is having conversations with God! I felt like I could convince him to pray, convince him to read his Bible, convince him to take spiritual matters seriously. I felt like I could share part of his spiritual life, like a healthy father and daughter should. I prayed for hours at a time that this would happen.

This was led by passion, not the Spirit, though, so no matter how tactfully I would bring up spiritual matters, he turned more and more vague until finally he used God's name in vain to shut me up. I had told him group counseling is good if it works for him, but he will have a deeper recovery if he combines it with personal Bible reading. He told me God said group counseling is all he needs, especially since it is already held at a church. My passion led him to put words in God's mouth, and I immediately felt convicted and dropped my mission. It is a difficult thing for me to hear, but Jesus told His disciples not to waste time on those who reject the Word, after all. All we are to do is share the way then leave people in God's hands. No one changes hearts but God.

@@ -19,17 +19,17 @@

It's Just Pneumonia

This entire time, I still had the cough. My husband kept having issues of his own, though, so I would delay any care for myself for his sake. The most extreme was Bell's palsy, which seems an awful lot like a stroke in the moment. Finally, my husband told me to go to the doctor today. Chest x-rays revealed fluid in my lungs, and my doctor called me with urgency in her voice to go to the ER ASAP. Doctors, illness, medicine, (and cancer) is my ultimate phobia, so hearing an emotional doctor like that got my heart pumping. However, when I got to the ER, the doctor massively downplayed the fluid, insisting there was barely any. But he was concerned that my symptoms didn't line up and ran test after test. God bless him for being thorough because he could have sent me home with antibiotics, but he somehow found the masses on my liver and free-floating in my caking based on a chest x-ray and a hunch. It wasn't long until I was formally diagnosed with colon cancer in November 2023. They said I probably have had it for 2 years.

-

It's Just Cancer

+

It's just cancer.

My grandmother died from cancer. My mom recently died from cancer. My aunt very recently overcame cancer. It seems like every woman on my mom's side gets cancer, so what hope is there for me? When I was told I have masses, it might as well have been a formal diagnosis. Dad, being the most anxious and overbearing person on earth, called me over and over telling me I will get cancer next and to get tested immediately, so I actually even went to a cancer clinic in January. Ironically, the most they were willing to do was a genetic test and told me to come back for screening when I am middle-aged - when I very likely had cancer right then at the age of 28!

Regardless, the paranoia was firmly planted in my head. Every time I had a weird pain in my belly, the thought of cancer would pass my mind. I didn't take it seriously, though, because cancer is a little extreme. It was like this meme that was floating around at the time, but...the painful spots actually were the same spots as the masses. Again, kinda ironic.

(Meme: I'm Gonna Fucking Die Disease. Symptoms: Tummy hurts a bit too much for a bit too long.)
-

Just Cancer??

+

Just cancer??

So I was primed for the worst news and suddenly confronted with my capital phobia. I was a wreck, right? Strangely, no.

My pastor had recently given sermons on how Christians ought to rejoice in tribulations as opportunities for spiritual growth. I had read some James and 1 Peter, too, which only reinforce the glory of tribulation. I honestly scoffed that I could ever be that Christian, especially in the context of cancer. It seemed impossible to praise God and thank Him for the day if that ever happened. But of course I don't want to be out of alignment with Scripture, so I prayed for God to search my heart and change it. And He sure flipped my perspective upside-down.

I was calm when they found the masses. The Bible already explains why very obviously. Unlike the prolonged fool's mission of healing all my dad's problems, God has obviously placed me square in the middle of cancer for a reason, and if He puts you somewhere, He provides everything you need. He gives me the strength, He gives me the peace, and He gives me countless reasons to praise Him day-in and day-out. Undoubtedly it's impossible to go through tribulations on my own. But if they are God-given and intended for spiritual growth, God will be and has been with me every step of the way. When you are with God, there is nothing to fear. Jesus' yoke is easy, and His burden is light.

So maybe these weird symptoms weren't from grief, pulled muscles, stress, or pneumonia, which would all be vastly preferable. But cancer isn't so different, knowing God holds the reins and will never leave my side. I really never thought I could say something like this, but...

I have cancer - praise God!


-Last updated January 1, 2024.
+Last updated February 29, 2024 - minor typos.

diff --git a/src/diary/entries/240108 b/src/diary/entries/240108 index e86ddd2..b53a134 100644 --- a/src/diary/entries/240108 +++ b/src/diary/entries/240108 @@ -4,7 +4,7 @@

God makes it clear. Psalm 27:14 ends with"Wait for the Lord; be strong and let your heart take courage; Yes, wait for the Lord." There is nothing to fear. His timing is perfect, so wait on Him. And you will see the goodness of the Lord in the land of the living, so sing praises to Him.

-

God's Perfect Timing

+

God's timing is perfect.

Since cancer and medical stuff in general is my specific phobia, it's best if I don't know all the details of my cancer. I want to understand enough to cooperate with my treatment, but if I knew the stage and all the little details, all it would do is scare me. My family doesn't have the same phobia, so they ask all those questions, but if I did, paranoia and doomscrolling would set in for sure.

Frankly, the severity doesn't really matter to me anyway. It's in God's hands. He has made massive tumors disappear, and He has taken people home during routine procedures. People's bodies are like clay to Him. Just as with Job, if even Satan himself is attacking my body, God has set His hand where no threat can pass. If that is my life, praise God, but if that is my soul, I trust His wisdom, praise God. Any place in my heart where that is not true, Father, please bring it into alignment with Your will.

Then Satan answered the Lord and said, “Skin for skin! All that a man has he will give for his life. But stretch out your hand and touch his bone and his flesh, and he will curse you to your face.” And the Lord said to Satan, “Behold, he is in your hand; only spare his life.” - Job 2:4-6

@@ -13,38 +13,39 @@

After all this bad timing, I finally caught it three months after reaching my lowest point and a year after I started feeling a little down. My husband had finally reached his limit of seeing me sick and ordered me to the doctor right away. I was diagnosed within days, but I had probably had cancer for 2 years. Was it really a bad time to be diagnosed, though, or was God waiting until He had lined everything up perfectly?

My pastor recommended I keep a list of miracles, so here's a few things I've noticed.

-

God Provided the Right Doctors and Nurses

+

God provides the right people.

I was diagnosed in the hospital and was kind of subjected to whatever doctor or nurse was in. Admission time is an RNG roll, and I feel like I received the best. My general practioner sent me to the ER for fluid in my lungs with urgency. It would turn out that I barely had any in the first place, but her urgency was well-placed. I feel like just any doctor would have sent me home with antibiotics, but the ER doctor on staff that day diligently investigated my mismatched symptoms until he found the cancer. Bless him richly. He is a good doctor. I was quickly matched with the oncologist and the surgeon available, and both would prove later to be just as excellent.

Then all my nurses were gentle, knowledgeable, and clean. One nurse in particular was like a friend, but several were close to my age and deeply empathetic for my health. They offered a lot of hugs and laughs and supportive words beyond the medicines and tests.

I got opportunities to show my nurses love, too, but the Holy Spirit's appearance overshadowed me. God blessed me with a peace that fragranced the room, and the nurses and everyone who visited commented on it. One night-shift nurse said I slept with a glow-in-the-dark smile. It wasn't the classic "be the only Jesus some people see" saying - God's presence was obvious in the room. I did get conventional opportunities to talk about God's love and pray with a lot of people, though, and my pastor was a frequent guest. One nurse was even sweet enough to return my prayer for her with a small gift. Having cancer and being stuck in the hospital for weeks is bad and all, but praise God for how special it was to feel His presence like that.

+

As for my at-home care and physical therapy, there is no guarantee to receive nurses that are trained to deal with my specific disability, but I had a richly knowledgeable nurses who casually dropped insights alongside spiritual encouragements, another nurse who was able to identify and explain all my new medical supply sample packs (I had no idea what half of it was!), and a physical therapist who told me exactly what I needed to hear to balance building my body back up vs. resting as needed and which exercises are gentle on my surgery. Not everyone gets what they need out of the programs, so I am so grateful for them.

-

God Provides for My Husband

+

God provides for my husband.

I believe God prepares the way for my husband and me. His vantage point is unfathomably vast, but I can see enough to know that we would have had some disadvantage if the cancer clinic had diagnosed me back in January.

My husband is my protector. When I am in danger, he swoops in and saves me or gives me the way out. He loves me and cares for me with all of his heart. This is true to the point I wonder if it's harder on him to see me with cancer than to go through it himself. He was by my side the entire time in the hospital, sleeping in his jeans in folding chairs, and he has been by my side ceaselessly since I've come home. This would be impossible for someone to do while maintaining a job, yet God has worked it all out.

I became a star in his office somehow. I don't work there, and I have no reason to really interact with his coworkers, but I had that bizarre Esther-like favor with them immediately when I met them. They were having an informal meeting at a bar. My husband and I don't attend the meetups, but we decided to one time when the CEO was in town. They all wanted to talk to me and were unironically trying to invent a position in the company for me at once. My husband even says they started bringing my "charm" up in meetings. Later, I accompanied my husband to company expos and conferences, and they let me into their booths and were even okay with me talking to guests. Then when the office Christmas party came, they were more enthusiastic about inviting me than my husband! It's not normal, but that's how favor looked in the book of Esther when God was placing her where she was needed - and my husband needed his coworkers' support.

When I got the diagnosis, they showered me with love, with offers to pick up things to bring to the hospital, and with flowers and really cool gifts. Even more, they showered my husband with advice on how to approach our insurance and have given him leave to work from home as much as he needs. They are like a family, and I am so surprised and grateful for their kindness. But they very well may not have been so supportive if God hadn't been setting this up all year! I think God is watching out for my husband as much as He has been for me.

As a longer-term complementary miracle, how amazing a husband I have. He first noticed me in a crowd, so thank God a hundred times that he picked me. God gave me the perfect husband to rely on and be loved by.

-

God Sent Helpers for My Husband

+

God sent helpers for my husband.

I did not want to be alone in the hospital for one minute. If a doctor came in, I wanted a second ear. If I needed something, I didn't want to rely on overworked nurses. My husband was ready to sacrifice his energy like that, but it's a totally unreasonable expectation for one person. Fortunately, God has been working in the background for years to send us family to support us. Doesn't He think of everything?

Usually, my father-in-law lacks seniority to get Christmas and New Year's off, so we celebrate on another day or without him. Traveling from their state to ours is out of the question. This was the year he finally got them off, and they planned on visiting us during the holidays instead of the other way around. (Of course, they only tell us things last-minute, so we had no idea all year.) So, right as my husband needs them, they have all the time off they want and can sit with me or run errands and give my husband much needed relief.

They could have avoided traveling for Christmas, but things are stressful at home for them, so they wanted to relax with us. It's tremendously helpful they were directed to us, but I feel a little bad that they landed in the middle of our own drama. I think my in-laws are really like family to me, though, way more than my biological family. They jumped right into caring for us. They were beyond helpful both when dealing with doctors and managing my neglected household chores. They got plenty of time to relax, too, and explore my city. It's crazy how everything lined up with that because any other year, my father-in-law would never be able to visit for even a full weekend. I didn't even know it was possible to see him off work for so long.

-

God Answered Prayer

+

God answered prayer.

After the diagnosis, all my doctors were deliberating the proper treatment. My oncologist was out, so her partner came in with a pessimistic presentation of treatments. My surgeon was visibly downcast, essentially telling me that my scans resembled someone who is inoperable and even if he could operate, the recovery would take dangerously long. There was no way forward.

However, my God is a Way Maker, so I had to go to Him. I prayed with my husband. I called the pastor in to pray. I called my two best friends in to pray. Prayer was being strategically deployed. We prayed for a way forward. Then my oncologist came in the next morning, saying we would begin Folfox promptly. She was so clear and confident, there was a clear contrast.

When I began treatment, I had no side effects, and in fact, all my superficial cancer symptoms disappeared immediately with the first treatment - no fever, no fatigue, no night sweats. My tumor pains even are far less frequent and nowhere near as painful. Even my nocturia almost disappeared after 3 treatments. It's like I get the chemo glow. I blossom with every treatment. Others suffer much harsher side effects and more nebulous benefits, so thank God for being so gracious with me so far.

-

God Denied Prayer

+

God denied prayer. (Sometimes I pray for dumb things!)

After going home, I developed a blockage in my colon but didn't realize it. No one knew what to do. Every day, I was in immense pain and became very swollen, but my mother-in-law and husband would continue to try to force me to eat, which increased only pressure. Whenever they would call my oncologist team, they would only suggest Miralax and stool softener, saying swelling in the abdomen is normal after chemo. This wasn't normal, though. I sounded like a fish tank with all the liquid and gas trapped in my colon.

The most the oncologists suggested was an ultrasound to detect if it was water and a way to remove any excess water. Of course I prayed that it was water and that the doctors would give instant relief, but the procedure found nothing of the sort. In retrospect, this was the better outcome. Water can be removed, but they said it would come back and have to be removed periodically. The alternative operation is not comfortable, but having to deal with that periodically would be way worse. Also, water around my organs is a cancer symptom, and I want less cancer symptoms, not more! When God says no and gives something better, doesn't He?

-

God Saved My Life

+

God saved my life

My mother-in-law kept calling and tried contacting other oncologists she knew, but my husband decided in a snap to take me to the ER instead. Thank God he did because my surgeon rushed down to meet me and said my colon could rupture at any moment. The surgery he originally said was impossible was now necessary. Honestly, this was a life-or-death situation.

He started by ordering an NG tube, but the ER nurses were out of their element with it. They couldn't find a tube small enough for me, so they were setting to sedate me and force it down my nose. When they consulted with my surgeon for a second opinion, he stepped in and transferred me to the surgery ward where the nurses routinely practice NG tube insertion on each other. It was such a smooth process. My nurses found a tube in my size and instructed me every step of the way. I have always had a phobia of tubes being inserted down my throat, but the Lord made it easy. Even if I needed some berry-flavored throat numbing spray every few hours, the NG tube brought the instant relief my husband and I prayed for. Praise God.

The surgery itself turned out not only to be possible, but I recovered in superhuman time. It takes time for the colon to function normally again, but it was fine right away. I was back on a normal diet in 3 days when recovery should take weeks. God worked an undeniable miracle, and my surgeon was nothing but smiles after having been so gloomy. Hallelujah. I didn't want the surgery at all, but before, I was on a low-roughage diet that cuts out all the joy (no quinoa, no strawberries...), and now I can eat with freedom. More so, it saved my life. God always takes care of me.

-

Clickbait Turns Out to be a God Save

+

Clickbait turns out to be a God save

My chemo treatment is FOLFOX, which includes oxaliplatin. It has a really weird side effect that increases cold sensitivity. Being exposed to cold feels like electrocution. The night after first infusion, a few drops spattered from the sink onto my arm, and I felt intense shocking for an hour. It freaked me out, even if I was warned to be careful.

The side effect was not so bad after first exposure, but I had to wait for the sink to warm up before coming anywhere near it, drink lukewarm water, cover my face and hands in the cold, and generally flee from cold. Thankfully, the shock goes away immediately if I touch something warm. It's supposedly not as bad as neuropathy, another potential side effect, but I want to avoid nerve damage on any level.

Of all the side effects to have from chemo, this, fatigue, food tasting slightly different but not enough to shift my preferences, and hair loss is a pretty light load compared to all the cancer symptoms it has wiped out. I've heard much worse, so thank God for being gentle with me.

@@ -56,5 +57,5 @@

A Thousand Little Miracles

I'll update as I go. :) Thanks for reading, and please thank God for all His faithfulness and lovingkindness.


-Last updated February 1, 2024.
+Last updated February 29, 2024 - always adding more as I think of them

diff --git a/src/diary/entries/240219 b/src/diary/entries/240219 index 13d3ea5..6d33819 100644 --- a/src/diary/entries/240219 +++ b/src/diary/entries/240219 @@ -4,31 +4,31 @@

You don't get attention unless you want it. My study wiki emulates my Bible study leader's methodology of examining Scripture through the eyes of each character, no matter how minor, and has brought the Bible to life for me. But without promotion, could it help anyone else?

-

I am Converting the Bible into a Wiki

+

I am converting the Bible into a wiki.

It's no Hexapla, but my Bible study wiki is solid study material. I'm moving chapter-by-chapter through the Bible, telling the story of each figure through their own, individual perspective. This method is not limited to the people but also locations, tribes, and common terms.

The value of this shines when isolating easily-overlooked figures. The Holy Spirit doesn't waste ink, so there is spiritual truth to learn from Lamech's brief appearance rather than locking solely onto high-profile Cain. The wiki format is perfect for dissecting Scripture in this way. Furthermore, I add information and summaries from Bible scholars, literature, history, and other related subjects.

I am sure people would appreciate this resource, but I doubt anyone actually uses it.

-

Preventing the Wiki's Success

+

I am preventing the wiki's success.

I've used LazyWiki as a Bible study tool since 2017. There's gold on my server, but it's a perpetual work-in-progress and a little crud-covered. I'm satisified keeping it for myself, but if it's something that could help others, why not improve its reach? Popularity would direct eyes to my husband's LazyWiki, too, which I certainly am the first fan of.

-

It's Still Set Up Like a Personal Wiki, Not a Mainstream Wiki

+

It's still set up like a personal wiki, not a mainstream wiki.

I've put diligent effort into my wiki, but I only began publishing in a way that suits others in 2023. My content comes slowly, too. I work on this alone, so even if I published a chapter's worth of content per day, it'd take over 3 years to finish one pass of the Bible. I break up my Bible content with online courses and other books, too, so it's difficult to finish anything.

Probably the worst point is my lack of focus. Scriptural studies dominate the wiki, but I also use the same database when studying programming and other scattered topics. Though pursuing my every interest is fun, diluting your identity is a popularity killer online.

-

Technical Issues

+

There are technical issues.

Regardless, LazyWiki itself is not set up for popularity. It was written for me to use at home on my own computer, not for an online audience. I already have to break up longer articles into smaller ones to prevent ridiculous loading times, and I'm the only user! The pages are served first come, first serve. Though my husband and I can spam-click pages together without slowdown, a spike in users would wreck the server. The issue is fundamental to LazyWiki's design, so I'd need a whole new replacement to fix it. One could be written for sure whenever necessary, but there's always more relevant things to work on.

-

No Energy or Skills for Marketing

+

I have no energy or skills for marketing.

Marketing is probably more important than a "product" itself anyway.

As for the site, I mostly like the overall look of the wiki subdomain, but as someone who honestly prefers janky 2000s web aesthetic, I wouldn't be surprised if my site's more off-putting than cute. I have virtually no brand. There's no logo or proper name or anything like that. It's shackled unattractively under my blog's study links. My site definitely lacks that professional touch, and I'm sure that holds it back.

As for promotion, I only recently added my links to my Discord bio. My effort level is less than zero. At this point, I'm not interested in pursuing social media or hitting up potential brand ambassadors. I'm also not interested in placing a price on the wiki or fiddling with donations, even though that bizarrely seems to increase the perceived value of a product. I certainly have a more serviceable wiki than I did 5 years ago, but I still doubt it's worth managing as a tiny "brand." Maybe in the future, when I have completed more books of the Bible?

The only sort of marketing that interests me for now (besides occasional Blessfrey blogging) would be streaming web development or starting a Bible study Youtube channel. Frankly, though, my self-esteem can't handle the cringe of recording myself talking, and I'd have to learn a whole new suite of skills when I'm pretty sick. Maybe I will try some time, but even then, it's likely going to be yet another cutesy project no one but me enjoys. I just never had that natural flair for garnering an audience.

-

Success Doesn't Matter So Much if You Enjoy It

+

Success doesn't matter so much if you enjoy it

Counterproductive to online success or not, my main goal is still to gain a deeper appreciation of Scripture and be able to access my notes online from anywhere. The Bible wiki fulfills that fully! The rest will improve over time.

At the same time, my 7 years of research is probably cool enough to be worth at least a few minutes of clicking around. I recommend starting in 2 Samuel, a fully rendered book of the Bible, or Origin of the Bible, a book I am currently studying. If you like it, consider adding the wiki to your bookmarks or infinite perpetually open phone tabs! The wiki's always growing, so check in whenever you remember.

Thanks for reading and have fun^^


-Last updated February 19, 2024.
+Last updated February 29, 2024 - minor typos, capitalization.

diff --git a/src/diary/entries/240228 b/src/diary/entries/240228 new file mode 100644 index 0000000..e7cc099 --- /dev/null +++ b/src/diary/entries/240228 @@ -0,0 +1,186 @@ + +

The Making of Blessfrey.me in BottlePy

+#bottlepy #css #html #python #simpletemplate #webdesign #webdev
+
+

Welcome to Blessfrey.me, my webdev playground written in BottlePy! Twice a month, God willing, I share my gamedev projects, art, Bible study, and personal reflections. Originally in PHP, Blessfrey.me now thrives on the efficiency of the Bottle Python web framework. To celebrate my website, I'll share some of my front end and back end code, as well as the evolution of my design philosophy.

+ +

Why not use a premade blogging platform like WordPress?

+

Generalized blogging platforms are overkill, as Blessfrey.me is mostly a few static pages and a blog. Unused features bog down the website and pose potential security vulnerabilities. And prominent blogging platforms like WordPress are flooded with features.

+

There's also blogging platforms like Medium or Wattpad, which throw you into giant established communities and probably give you better chances of ending up on the front page of Google. There's something dreamy about having your own corner of the internet that is unabashedly you, though. No risk of losing everything due to some policy change or business restructuring. I'm not lost in the droves of social media nor pressured to follow their trends and positioning tactics.

+

I just do what my friends and I think is cool, and maybe some people will stumble in through an old profile link or obscure keywords on a search engine and find this odd stash of personal projects and diaries. That's how the internet was in the 90s and into the 00s, and I'm really nostalgic for that mode of life. Even if it never amounted to fame or fortune, it was full of personality and discovery. I always daydreamed about having my own corner of the internet and what I could share on there.

+

But anyway, Blessfrey.me is a programming portfolio, so it just seems obvious to write my own frontend and backend. Taking my website from initial sketches, to Hello World, to various prototypes, to something polished enough to show my friends has been a valuable chance to learn. It's probably just as valuable if not more to demonstrate working knowledge of WordPress, Bootstrap, or other popular webdev utilities since that's what clients crave, so obviously figure out what best suits you!

+ +

Why Bottle?

+

Blessfrey.me was originally written in PHP. Designing the diary underscored how prohibitively repetitive raw HTML code is. It is not merely annoying; it's completely not scalable when managing years' worth of diary entries. HTML templates are a must for decoupling diary entries from the codebase and allowing for graphical redesigns.

+

While searching for a templating engine, I stumbled upon Bottle's SimpleTemple. Bottle not only comes with SimpleTemplate out of the box, but it also provides a lightweight and less verbose alternative to PHP. PHP may hold a place in my heart as the lingua franca of old petsites, but frankly, Python is more enjoyable to use.

+ +

How does Blessfrey.me work behind the scenes?

+

The strength of SimpleTemplate in building a dynamic page without all that repetitive HTML

+

Blessfrey.me's pages aren't a static collection of HTML pages hosted on my server but are dynamically constructed by a Bottle script upon request.

+

Bottle's templating engine receives content from Bottle in the form of a dictionary and populates the given template. SimpleTemplate also allows Python code to be written directly onto the template, which is how Blessfrey.me displays random styles of bullets with each refresh, populates galleries and diary snippets, and calculates the required number of pages needed for the diary's navigation links.

+

To stay consistent without copy-pasted code, every page is based upon the frame template below. Nested templates can be inserted into other templates through {{!base}} to create increasingly specific templates. (By the way, double curly brackets denote variables, and exclamation marks disable escaping.)

+

+<!DOCTYPE html> 
+<html lang="en"> 
+ 
+<head> 
+% include('header.tpl')https://wiki.blessfrey.me/view/Blessfrey
+</head> 
+ 
+<body> 
+ 
+<div class="grid"> 
+ 
+% include('logo-bar.tpl')
+ 
+% include('nav.tpl')
+ 
+    <div class="body-row"> </div> 
+ 
+{{!base}}
+ 
+</div>
+ 
+% include('footer.tpl')
+ 
+</body>
+ 
+</html>
+
+ +

There are a few variables in the header template below (incorporated into the main template at % include('header.tpl')). If Bottle doesn't provide a title, it defaults to 'blessfrey.me.' SimpleTemplate also allows for seamless integration of variables into paths and URLs, such as for Blessfrey.me's stylesheet links.

+ +

+<title>{{title or 'blessfrey.me'}}</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <link rel="stylesheet" type="text/css" href="/static/css/{{css}}.css"/>
+
+ +

Maybe I could feasibly copy-and-paste the header onto a couple of static pages, but the diary has an ever-expanding backlog of entries and demands a more scalable solution. SimpleTemplate allows Python code to mingle with HTML on the same template and programmatically adjust to an variable amount of content. Below is an excerpt of the diary's template that shows how Blessfrey.me builds its previews using a for loop.

+

Not shown is the template's first line % rebase('frame.tpl'), which tells the templating engine to insert this block of content at the {{!base}} variable in the main template.

+

The limit (max number of snippets per page) is provided by Bottle script. The snippetsvariable is a list of lists. It contains all diary snippets, which are themselves packaged as a list containing the title, content, timestamp, and so on. By iterating over snippets, any information about the article can be pulled out as needed for the HTML.

+ +

+    <div class="diary-pages">
+        % for s in snippets[page * limit:page * limit + limit]:
+            <div class="snippet">
+                <div class="snippet-title">
+                    <a href={{s[3]}} rel="nofollow"><h1>{{!s[0]}}</h1></a>
+                </div>
+                <div class="snippet-content">
+                    {{!s[1]}}
+                </div>
+                <div class="snippet-info">
+                    <b>{{!s[2]}} 
+                    • <a class="social-link social-twitter" 
+                        href='http://twitter.com/share?text={{s[4]}}
+                        &url=https://blessfrey.me{{s[3]}}&via=lilchimchooree' 
+                        target="_blank">tweet</a> 
+                    • <a class="social-link social-fb" 
+                        href='http://www.facebook.com/share.php?u={{s[3]}}'>
+                            facebook</a> 
+                    % message = "Hey,+check+out+this+post:+" + s[1] + ".,+" + s[3]
+                    % message = message.replace('+','\+')
+                    % message = re.sub('\s+?','+', message)
+                    % message = message.replace('\\','')
+                    % message = re.sub('<.*?>','', message)
+                    • <a class="social-link social-email" 
+                        href='mailto:?body={{message}}'>email</a></b>
+                </div>
+                <div class="snippet-link">
+                    <a href={{s[3]}} rel="nofollow"><b>read more</b></a>
+                </div>
+            </div>
+        % end
+    </div>
+
+ +The page number comes from the Bottle script shown in the next section and is derived from the URL.

+ +

What does Bottle look like on the backend?

+

Bottle takes URLs and generates the corresponding web page upon request. Each URL is coupled with a method, which returns a template and a dictionary of data to be used by SimpleTemplate. Since Bottle is a Python framework, it provides access to all the Python libraries out there.

+

By the way, the page is ensured to be an int by a line of assert isinstance(variable, datatyle).

+ +

+# Start on first Diary page if no page given
+@route('/diary')
+def diary():
+    return diary(0)
+ 
+# Diary Page - Diary Template - list all articles
+@route('/diary/<page:int>')
+def diary(page):
+    """diary"""
+    loc = 'diary/entries/'
+    assert isinstance(page, int)
+    info = {'css': 'diary', 'title': 'chimchooree\'s diary', 'year': find_year(), 
+        'snippets': list_snippets(gather_and_sort(loc), loc), 
+        'latest': list_headlines(gather_and_sort(loc)[0:5], loc), 
+        'tags': fill_word_cloud(curate_files(gather_files(loc)), loc), 
+        'total': len(curate_files(gather_files(loc))), 'limit': 8, 'cluster': 3, 
+        'page': page, 'category': "diary"
+    }
+    return template('diary.tpl', info)
+
+ +

This is how the methods for specific routes are structured. Every time you visit Blessfrey.me/diary, one of the above methods is called, depending on whether any query parameters follow the URL. To collect all the data the template will need, it calls a medley of Python functions to access my folder of diary entries, convert them into previews for the snippets section and headlines for the sidebar, and count the total number of entries.

+ +

The styling is nothing fancy, just CSS

+

The website is styled using CSS, heavily relying on the CSS Grid and a bit of Flexbox. CSS Grids can be used inside CSS Grids, so my pages are generally blocked out, with smaller internal grids managing specific content.

+ +
+(image: CSS Grid traced over screenshot of projects page.)
+

My 2021 design with the RPG skillbar nav pane...cute.

+
+ +

The projects page (predates the current games page) is an example of nested grids. Almost every page uses the yellow general layout. The content unique to the projects page is mapped out in green, with a section for the header, featured projects, and other projects. The other projects use a 2-column grid in blue to evenly space out all the little thumbnails.

+

Some CSS code for project's general grid and the nested 'more' grid are shown below. This code is very outdated, but you can always find my current stylesheets by right-clicking and choosing your browser's equivalent of "View Page Source" and examine the structure of my grids with the Inspector.

+ +

+.grid {
+    display: grid;
+    grid-template-columns: auto 800px auto;
+    grid-template-rows: 25px 90px repeat(2, auto);
+    grid-column-gap: 0px;
+    grid-row-gap: 0px;
+}
+ 
+.featured {
+    grid-area: 2 / 1 / 3 / 3;
+}
+
+.featured-desc {
+    color: #F9B3D7;
+    font-size: 25px;
+    text-align: right;
+    margin-right: 10px;
+}
+
+.more {
+    grid-area: 3 / 1 / 4 / 3;
+    width: 800px;
+    display: grid;
+    grid-template-columns: auto auto;
+}
+
+.more-desc {
+    color: #F9B3D7;
+    font-size: 18px;
+    text-align: center;
+    margin-right: 10px;
+}
+
+ +

Of course, design is its own beast you'll have to figure out on your own.

+

As I've attempted to emulate my favorite odd blogs and coding experiments from the 90s and 00s, Blessfrey.me has used HTML, CSS, PHP, BottlePy, SimpleTemplate, Apache, NGINX, Jenkins, Ansible, my husband's LazyWiki, and maybe other stuff, who knows? I think following a dream like that is a fun way to learn more than following a stuffy textbook or sticking to rigid website makers. After all, the more personal your requirements, the more likely you'll have to figure it out on your own.

+

It also leads you to explore all those existential questions like "What is even the point of having a website?" The evolution of the overall design and content mix reflects that journey. I began by taking heavy inspiration from the most iconic promotional Japanese websites for 00s Playstation and PSP otome games. (All are now broken with the loss of Adobe Flash Player.) It looked cool, but what's the point when I had no playable game for Blessfrey? Over time, I slowly adjusted to what actually suited my Godot RPG dream project, Blessfrey.

+

As I actually used my website, I yearned to include a broader range of content. It took years to shake out all my preconceived notions of what makes a cool website and all the boring, samey advice shared by online husslers. A laser-tight focus might work for businesses, but it's lame to narrow your personal showcase into a niche. I much prefer having a cute, comfy little site that accomodates anything I might make.

+

For example, the most random thing I've integrated is my Bible study notes wiki. Someone at church was unable to take a class that I had attended and wished to see my notes. My notes are comprehensive but unfortunately were completely inaccessible without setting up my family's private wiki software on a Linux computer and controlling it with the terminal. With a few changes, though, everyone can see my notes at Blessfrey.me's wiki! It's convenient to be able to access it on my phone and adds some value for other people, so why omit it?

+

It's pivots like that that let me get all the mileage out of my server rent and really fall in love with webdev. It took about 4 years of janky CSS and meandering purpose, but Blessfrey.me is finally something I proudly show to other people. :)

+ +

Now you know how to make your own website!

+

Or you can keep using blogging platforms or social media or whatever works for you. But at least admit it's cute to build your own playground! If you really decide to, be easy on yourself and open-minded while exploring webdev. Your site won't be perfect at first, but be honest about your needs and dreams, and you'll get there! See ya.

+ +
+Last updated February 29, 2024
+
diff --git a/src/diary/entries/hold/240222 b/src/diary/entries/240229 similarity index 100% rename from src/diary/entries/hold/240222 rename to src/diary/entries/240229 diff --git a/src/diary/entries/hold/240221 b/src/diary/entries/hold/240221 deleted file mode 100644 index de9e9be..0000000 --- a/src/diary/entries/hold/240221 +++ /dev/null @@ -1,67 +0,0 @@ - -

making of blessfrey.me

-october 15, 2020
-#bottle #css #html #simpletemplate #webdesign #webdevelopment
-
-Blessfrey.me is a personal website I use to showcase projects and blog my process. It was originally written in PHP, but now it uses Bottle, a Python web framework.
-
-

why not use a premade blogging platform like WordPress?


-Blessfrey.me's needs are fairly simple - some static pages and a blog page. Generalized blogging platforms are overkill for my purposes. I don't need support for multiple authors, comments, localization, e-commerce, and so on. Unused features bog down the website at best and contribute to security vulnerabilities at worst.
-
-Also, it's fun to write my own platform. I'm learning a lot as I take my website from initial sketches, to Hello World, to various prototypes, to something polished enough to show my friends. Regardless, since it can be considered my programming portfolio, it makes sense that it itself should be something I programmed.
-
-

why Bottle?


-I originally wrote Blessfrey.me in PHP. I switched to Bottle after looking for a templating engine. Bottle comes with SimpleTemplate and can do everything PHP can do but faster and with less verbosity. Plus, I get to write in Python, a much more enjoyable language.
-
-

how does blessfrey.me work?


-

SimpleTemplate


-Instead of existing as a static collection of HTML pages on my server, Blessfrey.me's pages are constructed upon request by the website's Bottle script from SimpleTemplate templates.
-
-Every page uses the frame template pictured below, so the basic skeleton is consistent without requiring copy-pasted code. Each page is individualize through bringing in a new template within {{!base}}. (Double curly brackets refer to variables, and exclamation marks disable escaping.)
-
-(image: basic template code.)
-
-(The code can be found on Pastebin.)
-
-The header template below (brought in at % include('header.tpl')) has some variables, too, which are supplied by the Bottle script. If Bottle doesn't provide a title, it defaults to 'blessfrey.me.' Variables can also be used in paths and URLs.
-
-(image: header template code.)
-
-(The code can be found on Pastebin.)
-
-You can insert Python code into the templates for dynamic pages. Below is an excerpt of the template for the diary page. This code fills the page with diary entry previews using a for loop. Not shown is the first line % rebase('frame.tpl'), which tells SimpleTemplate to insert this content at the {{!base}} variable in the frame template.
-
-(image: diary snippet code from diary template.)
-
-(The code can be found on Pastebin.)
-
-The Bottle script sends the max number of snippets per page (the limit) and a list of lists containing all the diary snippets. It receives the page number from the URL. For the snippets that will appear on the given page, it converts the list data into HTML code to be displayed in the browser.
-
-
-

Bottle


-Bottle takes URLs and generates the corresponding web page upon request. Each URL is tied to a method, which returns a template and a dictionary of data to be used in the template. Since Bottle is a Python framework, you have access to all the Python libraries you need.
-
-(image: Bottle script excerpt for diary routes.)
-
-(The code can be found on Pastebin.)
-
-This is what the methods for specific routes look like. So every time you go to Blessfrey.me/diary, one of the above methods is called, depending on whether also you supplied an integer. To generate the page content, it calls a lot of Python functions to find my diary entries, convert them into previews for the snippets section and headlines for the sidebar, and get the current time for the footer.
-
-
-
-

CSS


-The website is styled using CSS, heavily relying on the CSS Grid and a bit of Flexbox. CSS Grids can be used inside CSS Grids, so my pages are generally blocked out, with smaller internal grids managing specific content.
-
-(image: CSS Grid traced over screenshot of projects page.)
-
-
-The projects page is an example of nested grids. Almost every page uses the yellow general layout. The content unique to the projects page is mapped out in green, with a section for the header, featured projects, and other projects. The other projects use a 2-column grid in blue to evenly space out all the little thumbnails.
-
-The CSS code for project's general grid and the nested unfeatured grid are shown below.
-
-(image: projects css code.)
-
-(The code can be found on Pastebin, but you can always see a web page's CSS by right-clicking and viewing the source.)
-
-Last updated June 8, 2021
-
diff --git a/src/static/css/all.css b/src/static/css/all.css index 172b2d9..beef152 100755 --- a/src/static/css/all.css +++ b/src/static/css/all.css @@ -75,7 +75,7 @@ h1,h2,h3,h4,img,i { } h1 { font-family: 'mitochondriaregular', sans-serif; - font-size: 1.5em; + font-size: 1.2em; } h1 a,h1 a:visited,h1 a:hover,h1 a:active { font-family: 'mitochondriaregular', sans-serif; @@ -84,7 +84,7 @@ h2 a:hover,h2 a:active { font-family: 'mitochondriaregular', sans-serif; } h2 { - font-size: 1.5em; + font-size: 1.1em; } hr { background-color: transparent; @@ -114,13 +114,14 @@ p { color: white; } pre,code { - font-size: 0.9em; - font-family: monospace; + font-size: 0.95em; + line-height: 1.7em; + /*font-family: monospace;*/ margin-top: 1.5em; - margin-bottom: 1.5em; + margin-bottom: 1.3em; padding-left: 0.5em; padding-right: 0.5em; - padding-bottom: 0.1em; + padding-bottom: 0.35em; } img { margin-top: 1.5em; diff --git a/src/static/css/diary.css b/src/static/css/diary.css index ed1dbdb..dbfc1ad 100755 --- a/src/static/css/diary.css +++ b/src/static/css/diary.css @@ -1,3 +1,7 @@ +h2 { + font-size: 1.5em; +} + .content-grid { display: column; align-content: flex-start; diff --git a/src/static/css/entry.css b/src/static/css/entry.css index 7061852..712e903 100644 --- a/src/static/css/entry.css +++ b/src/static/css/entry.css @@ -55,6 +55,7 @@ img { } .diary-content { font-size: 0.9em; + line-height: 1.5em; background-color: #c0aac0; color: #080410; text-indent: 2em; @@ -67,7 +68,6 @@ img { margin-top: 1em; margin-bottom: 0em; margin-left: 0em; - /*max-width: 31.25em;*/ max-width: 100%; /* Ensures images don't exceed container width */ height: auto; /* Maintains aspect ratio */ } diff --git a/src/static/img/char/Aloin/Aloinavi.png b/src/static/img/char/Aloin/Aloinavi.png new file mode 100644 index 0000000..836f23f Binary files /dev/null and b/src/static/img/char/Aloin/Aloinavi.png differ diff --git a/src/static/img/char/Aloin/alchemy.png b/src/static/img/char/Aloin/alchemy.png new file mode 100644 index 0000000..f71706a Binary files /dev/null and b/src/static/img/char/Aloin/alchemy.png differ diff --git a/src/static/img/char/Aloin/alchemythumb.png b/src/static/img/char/Aloin/alchemythumb.png new file mode 100644 index 0000000..94f211d Binary files /dev/null and b/src/static/img/char/Aloin/alchemythumb.png differ diff --git a/src/static/img/char/Aloin/dream.jpg b/src/static/img/char/Aloin/dream.jpg new file mode 100644 index 0000000..01ac024 Binary files /dev/null and b/src/static/img/char/Aloin/dream.jpg differ diff --git a/src/static/img/char/Aloin/dreamthumb.jpg b/src/static/img/char/Aloin/dreamthumb.jpg new file mode 100644 index 0000000..727f809 Binary files /dev/null and b/src/static/img/char/Aloin/dreamthumb.jpg differ diff --git a/src/static/img/char/Cass/Cassavi.png b/src/static/img/char/Cass/Cassavi.png new file mode 100644 index 0000000..4a110e7 Binary files /dev/null and b/src/static/img/char/Cass/Cassavi.png differ diff --git a/src/static/img/char/Faber/Faberavi.png b/src/static/img/char/Faber/Faberavi.png new file mode 100644 index 0000000..9025c38 Binary files /dev/null and b/src/static/img/char/Faber/Faberavi.png differ diff --git a/src/static/img/char/Fifi/Fifiavi.png b/src/static/img/char/Fifi/Fifiavi.png new file mode 100644 index 0000000..a0dfffb Binary files /dev/null and b/src/static/img/char/Fifi/Fifiavi.png differ diff --git a/src/static/img/char/Fifi/dream.jpg b/src/static/img/char/Fifi/dream.jpg new file mode 100644 index 0000000..01ac024 Binary files /dev/null and b/src/static/img/char/Fifi/dream.jpg differ diff --git a/src/static/img/char/Fifi/dreamthumb.jpg b/src/static/img/char/Fifi/dreamthumb.jpg new file mode 100644 index 0000000..727f809 Binary files /dev/null and b/src/static/img/char/Fifi/dreamthumb.jpg differ diff --git a/src/static/img/char/Fifi/guitarpractice.jpg b/src/static/img/char/Fifi/guitarpractice.jpg new file mode 100644 index 0000000..c2cf3e6 Binary files /dev/null and b/src/static/img/char/Fifi/guitarpractice.jpg differ diff --git a/src/static/img/char/Fifi/guitarpracticethumb.jpg b/src/static/img/char/Fifi/guitarpracticethumb.jpg new file mode 100644 index 0000000..562e735 Binary files /dev/null and b/src/static/img/char/Fifi/guitarpracticethumb.jpg differ diff --git a/src/static/img/char/Fifi/mirrorofvenus.jpg b/src/static/img/char/Fifi/mirrorofvenus.jpg new file mode 100644 index 0000000..10eab21 Binary files /dev/null and b/src/static/img/char/Fifi/mirrorofvenus.jpg differ diff --git a/src/static/img/char/Fifi/mirrorofvenusthumb.jpg b/src/static/img/char/Fifi/mirrorofvenusthumb.jpg new file mode 100644 index 0000000..4877b2d Binary files /dev/null and b/src/static/img/char/Fifi/mirrorofvenusthumb.jpg differ diff --git a/src/static/img/char/Heather/Heatheravi.png b/src/static/img/char/Heather/Heatheravi.png new file mode 100644 index 0000000..5dbdf18 Binary files /dev/null and b/src/static/img/char/Heather/Heatheravi.png differ diff --git a/src/static/img/char/Leslie/Leslieavi.png b/src/static/img/char/Leslie/Leslieavi.png new file mode 100644 index 0000000..5863bde Binary files /dev/null and b/src/static/img/char/Leslie/Leslieavi.png differ diff --git a/src/static/img/char/Rodolphe/Rodolpheavi.png b/src/static/img/char/Rodolphe/Rodolpheavi.png new file mode 100644 index 0000000..9ca78f2 Binary files /dev/null and b/src/static/img/char/Rodolphe/Rodolpheavi.png differ diff --git a/src/static/img/char/Ryada/Ryadaavi.png b/src/static/img/char/Ryada/Ryadaavi.png new file mode 100644 index 0000000..af26a2f Binary files /dev/null and b/src/static/img/char/Ryada/Ryadaavi.png differ diff --git a/src/static/img/char/Theodosia/Theodosiaavi.png b/src/static/img/char/Theodosia/Theodosiaavi.png new file mode 100644 index 0000000..71021fc Binary files /dev/null and b/src/static/img/char/Theodosia/Theodosiaavi.png differ diff --git a/src/static/img/char/Tilly/Tillyavi.png b/src/static/img/char/Tilly/Tillyavi.png new file mode 100644 index 0000000..e184266 Binary files /dev/null and b/src/static/img/char/Tilly/Tillyavi.png differ diff --git a/src/static/img/ent/blessfrey_website_cssgrid.png b/src/static/img/ent/blessfrey_website_cssgrid.png new file mode 100644 index 0000000..73a9a46 Binary files /dev/null and b/src/static/img/ent/blessfrey_website_cssgrid.png differ