#interaction:
Explore tagged Tumblr posts
Text
Creating an Auto-Closing Notification With an HTML Popover
New Post has been published on https://thedigitalinsider.com/creating-an-auto-closing-notification-with-an-html-popover/
Creating an Auto-Closing Notification With an HTML Popover


The HTML popover attribute transforms elements into top-layer elements that can be opened and closed with a button or JavaScript. Most popovers can be light-dismissed, closing when the user clicks or taps outside the popup. Currently, HTML popover lacks built-in auto-close functionality, but it’s easy to add. Auto closing popups are useful for user interfaces like banner notifications — the new-message alerts in phones, for instance.
A picture demo, is worth a thousand words, right? Click on the “Add to my bookmarks” button in the following example. It triggers a notification that dismisses itself after a set amount of time.
Let’s start with the popover
The HTML popover attribute is remarkably trivial to use. Slap it on a div, specify the type of popover you need, and you’re done.
<div popover="manual" id="pop">Bookmarked!</div>
A manual popover simply means it cannot be light-dismissed by clicking outside the element. As a result, we have to hide, show, or toggle the popover’s visibility ourselves explicitly with either buttons or JavaScript. Let’s use a semantic HTML button.
<button popovertarget="pop" popovertargetaction="show"> Add to my bookmarks </button> <div popover="manual" id="pop">Bookmarked!</div>
The popovertarget and popovertargetaction attributes are the final two ingredients, where popovertarget links the button to the popover element and popovertargetaction ensures that the popover is show-n when the button is clicked.
Hiding the popover with a CSS transition
OK, so the challenge is that we have a popover that is shown when a certain button is clicked, but it cannot be dismissed. The button is only wired up to show the popover, but it does not hide or toggle the popover (since we are not explicitly declaring it). We want the popover to show when the button is clicked, then dismiss itself after a certain amount of time.
The HTML popover can’t be closed with CSS, but it can be hidden from the page. Adding animation to that creates a visual effect. In our example, we will hide the popover by eliminating its CSS height property. You’ll learn in a moment why we’re using height, and that there are other ways you can go about it.
We can indeed select the popover attribute using an attribute selector:
[popover] height: 0; transition: height cubic-bezier(0.6, -0.28, 0.735, 0.045) .3s .6s; @starting-style height: 1lh;
When the popover is triggered by the button, its height value is the one declared in the @starting-style ruleset (1lh). After the transition-delay (which is .6s in the example), the height goes from 1lh to 0 in .3s, effectively hiding the popover.
Once again, this is only hiding the popover, not closing it properly. That’s the next challenge and we’ll need JavaScript for that level of interaction.
Closing the popover with JavaScript
We can start by setting a variable that selects the popover:
const POPOVER = document.querySelector('[popover]');
Next, we can establish a ResizeObserver that monitors the popover’s size:
const POPOVER = document.querySelector('[popover]'); const OBSERVER = new ResizeObserver((entries) => if(entries[0].contentBoxSize[0].blockSize == 0) OBSERVER.unobserve((POPOVER.hidePopover(), POPOVER)); );
And we can fire that off starting when the button to show the popover is clicked:
const POPOVER = document.querySelector('[popover]'); const OBSERVER = new ResizeObserver((entries) => if(entries[0].contentBoxSize[0].blockSize == 0) OBSERVER.unobserve((POPOVER.hidePopover(), POPOVER)); ); document.querySelector('button').onclick = () => OBSERVER.observe(POPOVER);
The observer will know when the popover’s CSS height reaches zero at the end of the transition, and, at that point, the popover is closed with hidePopover(). From there, the observer is stopped with unobserve().
In our example, height and ResizeObserver are used to auto-close the notification. You can try any other CSS property and JavaScript observer combination that might work with your preference. Learning about ResizeObserver and MutationObserver can help you find some options.
Setting an HTML fallback
When JavaScript is disabled in the browser, if the popover type is set to any of the light-dismissible types, it acts as a fallback. Keep the popover visible by overriding the style rules that hide it. The user can dismiss it by clicking or tapping anywhere outside the element.
If the popover needs to be light-dismissible only when JavaScript is disabled, then include that popover inside a <noscript> element before the manual popover. It’s the same process as before, where you override CSS styles as needed.
<noscript> <div popover="auto" id="pop">Bookmarked!</div> </noscript> <div popover="manual" id="pop">Bookmarked!</div> <!-- goes where <head> element's descendants go --> <noscript> <style> [popover] transition: none; height: 1lh; </style> </noscript>
When to use this method?
Another way to implement all of this would be to use setTimeout() to create a delay before closing the popover in JavaScript when the button is clicked, then adding a class to the popover element to trigger the transition effect. That way, no observer is needed.
With the method covered in this post, the delay can be set and triggered in CSS itself, thanks to @starting-style and transition-delay — no extra class required! If you prefer to implement the delay through CSS itself, then this method works best. The JavaScript will catch up to the change CSS makes at the time CSS defines, not the other way around.
#ADD#alerts#animation#Articles#attributes#browser#buttons#challenge#change#CSS#Delay#easy#HTML#indeed#interaction#it#JavaScript#Learn#learning#Light#links#message#Method#Moment#monitors#notifications#One#Other#phones#picture
0 notes
Text
🌷 [ ROSALIE ] liked for a starter
“You know? Repeating this...” Lillian gestured around the fairly quiet school cafeteria, “...the first time it was interesting, the novelty, you know? But now, it’s not even challenging.”
@lcstpaths
#lcstpaths#001; lcstpaths#talk#roleplay#closed starter#v; cullen era#[ hope this was ok? ]#[ I kind of went for something random to get an idea of how they interact ]
0 notes
Text
JUDGING LIBERATED FEDERALISM, XII
With the four elements of a liberated federalist model described and explained over the last series of postings, this posting begins the description and explanation of the model itself. To remind readers, the four elements are covenant or compact, equality, communal democracy, and covenant of reason. Readers are encouraged to visit those postings – if not read already – and become familiar with these elements. But for now, this blog will proceed with addressing the model.
This blogger would like to emphasize that what follows in no way attempts to offer a model suitable for initiating professional federalist studies in political science. Instead, the model is meant to provide a starting point, a source of ideas and questions that would be suitable for designing curricular content regarding the study of government and politics at the secondary level of American schools.
The model is made up of three main components: the community, participating entities, and the association. A visual representation of the model is depicted in a graphic rendition and can be seen in this blogger’s book, Toward a Federated Nation.[1] Unfortunately, the platform upon which this blog appears is not amenable to including that illustration, but the book’s rendition is well displayed, and the book is inexpensive (available through Amazon). In any event, readers will be able to understand what follows without having the graphic version before them.
In general, the model attempts to place the interactive elements and their aspects in relationship to each other. The model is normative in that it presents an ideal set of relationships. The model is also non-specific regarding levels of political activity. That is, the model can be applied to local, state, regional, or national arrangements, both within and without government.
The model is also situational, depicting situations in which political actors are confronted with politically challenging conditions. Therefore, the community, participating entities, and the association are represented by different symbols. There are outer boxes, made up of dashed lines and that symbolically enclose the community in which featured associations exist – these can be the government or other arrangements such as churches, schools, corporations, non-incorporated businesses, etc.
An ideal community is characterized by the attributes identified along the boundary of the model, i.e., they are a functioning community holding cultural commitment to federalist values to a significant degree, a set of functioning and interacting institutions, and a community with moral primacy. Of course, these are ideal characterizations and worthy, in real life, to pursue their eventuality to whatever degree possible. They will be further explained in upcoming postings.
Participating entities can be persons, arrangements (any organized groups), or associations within the community in which the studied association exists. For example, that could be a labor union as a participating entity in the national community ruled by the US government, which in this example is the association under study.
The center of the model has an enclosed area that represents the association under study. From that center, arrows emanate to the entity boxes and represent those bonds that ideally characterize the relationship between those persons, arrangements, or associations with the studied association.
The characteristics of those bonds are preferred qualities such as equality and communal links. Each entity ideally should extend to the studied association loyalty, trust, skills, and knowledge. In exchange, the entity ideally should expect from the association equal standing and, if needed, allowances so that the entity can viably participate in the expected processes with the studied association.
To further characterize each entity, it should be afforded constitutional integrity. That affirmation refers to the individual or group rights that protect the integrity of each entity. In terms of how the entity defines his/her/its station within the relationships denoted in the model, there are the following types of held qualities: status of entity, its conscience, and its practical attributes. These last elements identify the relevant assets and designations that the entity brings to the association.
The large, central enclosure, the association, has in its encompassing character (or designation of its type) reference to its founding agreement which would be in the form of a compact, covenant, or charter. In addition, the association ideally should be based on two qualities: qualified majority rule and minority rights. These are familiar to most people.
In a more central sense of what an association is – what type it is – there are characteristics that establish the distinctive characteristics of the studied association. Those would be the terms of the specific compact-al, covenantal, or chartered agreement among its members. In this last concern, there are three characteristics which are fraternal ethos (or sense of partnership), elements of communal democracy, and a deliberative process by which decisions are made.
Not all arrangements are associations; some are merely arrangements. An association is an arrangement, making association a subclass under arrangement. Associations need to be sufficiently federalist in their makeup – such as a sufficient sense of partnership among their members – to be so considered or defined as an association and not merely an arrangement.
The final element of the model refers to the specific conditions that would be studied in an instructional lesson utilizing this model. That is, a particular lesson would investigate a case in which the association is confronted by a politically challenging condition. The study would apply an analysis of the situation based on the ideals presented by the model.
Ideally, an association would produce some action that could be defended as a moral response and one which would portray the responsibility of the association to uphold the communal well-being of the community. The condition studied is represented as an input to the association. The ideal reaction by the association is illustrated by an output from the association.
Hopefully, readers will have access to the graphic illustration of the model, but all of this will be described and explained in upcoming postings. That material will review each of the above identified “interactions” among the elements of this model. Again, readers without the illustration, this blogger believes, will be able to make sense of the model and how it portrays the ideas and ideals of the liberated federalist construct. But, truly, feel free to purchase the book, Toward a Federated Nation, and look at page 230 for the graphic illustration.
[1] Robert Gutierrez, Toward a Federated Nation: Implementing National Civics Standards (Tallahassee, FL: Gravitas/Civics Books, 2020), 230.
#liberated federalism#liberated federalism model#associations#arrangements#political interactions#normative politics#civics education#social studies
0 notes
Text
"I already said I wouldn't!"
There was anger within Link at that moment, the very idea of him running sent rage down his spine. He never ran, not from anyone. He did have to avoid the guardians but other than that Link was honorable. He would never turn his back upon a foe. But, this person wasn't a foe and no matter what Link didn't want to hurt someone who he had loved. Someone who had been so close to him once.
"Revali please...I loved you...I loved all of you...please remember."
Ironic considering how little Link remembered himself. He was barely a fragment of who he was. Yet, those fragments were screaming out in agony to save this dumb bird more than anything else.
silentswordxman:”
“Don’t call me that, you know I hated being called that.”
Link would never give up it wasn’t in him to do so. He simply needed to find some way around this. He believed that he had that way. Or at least the start of it. Perhaps he could lure Revali away from the console? Link was sure he could break whatever was happening to Revali by using the slate upon it. But, getting to it was the main problem. And knowing he couldn’t hurt Revali Link needed to be more cunning.
“You were always a better shot than me…”
Play to Revali’s ego it had always been one of his strongest aspects of him. Perhaps reminding him of things that gave him pride once might help.
There’s a moment of brief rustling of his feathers, that prideful streak was still within him. Still there and could be taken advantage of in the moment if one had the courage to try something. A smirk if one could call it that spread across the Rito’s beak as he stood a little taller, grip still on the drawn bow but a mistake was his eyes left the HERO for a moment. Just a single moment as he began to chuckle. “Took you long enough to notice that, I am the best shot in the village, maybe even Hyrule~” That last word he spoke his eyes locked back to the Hylian suddenly, but what was the little one planning on doing, was he scared to try and hit him or distract him enough to slip away. “I hope you don’t plan on just running away again, Link.”
25 notes
·
View notes
Photo

PORTO ROCHA
1K notes
·
View notes
Photo

(vía Another America 50 by Phillip Toledano)
79 notes
·
View notes
Text
don’t call me whiny baby if you didn’t care about my whiny baby feelings already, which you didn’t care about!!! shocker!!!
54 notes
·
View notes
Quote
もともとは10年ほど前にTumblrにすごくハマっていて。いろんな人をフォローしたらかっこいい写真や色が洪水のように出てきて、もう自分で絵を描かなくて良いじゃん、ってなったんです。それで何年も画像を集めていって、そこで集まった色のイメージやモチーフ、レンズの距離感など画面構成を抽象化して、いまの感覚にアウトプットしています。画像の持つ情報量というものが作品の影響になっていますね。
映画『きみの色』山田尚子監督×はくいきしろい対談。嫉妬し合うふたりが語る、色と光の表現|Tokyo Art Beat
155 notes
·
View notes
Photo



No one wants to be here and no one wants to leave, Dave Smith (because)
111 notes
·
View notes
Photo

PORTO ROCHA
776 notes
·
View notes
Photo

--
#catherine elizabeth#princess catherine#princess of wales#princess catherine of wales#catherine the princess of wales#kensington palace
60 notes
·
View notes
Text
GENERAL MEMES: Vampire/Immortal Themed 🩸🦇🌹
↳ Please feel free to tweak them.
Themes: violence, death, blood, murder, depression/negative thoughts
SYMBOLS: ↳ Use “↪”to reverse the characters where applicable!
🦇 - To catch my muse transforming into a bat 🌞 - To warn my muse about/see my muse in the sunlight. 🩸 - To witness my muse drinking blood from a bag. 🐇 - To witness To catch my muse drinking blood from an animal. 🧔🏽 - To witness To catch my muse drinking blood from a human. 🦌 - For our muses hunt together for the first time. 🏃🏿♀️ - To see my muse using super speed. 🏋🏼♂️ - To see my muse using their super strength. 🧛🏻♂️ - To confront my muse about being a vampire. 🌕 - For my muse to lament missing the sun. ⏰ - For my muse to tell yours about a story from their long, immortal life. 🤛🏽 - To offer my muse your wrist to drink from. 👩🏿 - For my muse to reminisce about a long lost love. 👩🏽🤝👩🏽 - For your muse to look exactly like my muse's lost love. 👄 - For my muse to bite yours. 👀 - For my muse to glamour/compel yours. 🧄 - To try and sneakily feed my muse garlic to test if they're a vampire. 🔗 - To try and apprehend my muse with silver chains. 🔪 - To try and attack my muse with a wooden stake. 👤 - To notice that my muse doesn't have a reflection. 🌹 - For my muse to turn yours into a vampire. 🌚 - For my muse and yours to spend time together during the night. 🧛🏼♀️ - For my muse to tell yours about their maker/sire.
SENTENCES:
"I've been alive for a long time [ name ], I can handle myself." "I'm over a thousand years old, you can't stop me!" "Lots of windows in this place, not exactly the greatest place for a vampire." "Do you really drink human blood? Don't you feel guilty?" "Vampires are predators, [ name ] hunting is just part of our nature, you can't change that." "You just killed that person! You're a monster!" "Tomorrow at dawn, you'll meet the sun [ name ]." "Can you make me like you?" "Do you really want to live forever?" "You say you want to live forever, [ name ], but forever is a long time, longer than you can imagine." "What was it like to live through [ historic event / time period ]?" "Did people really dress like that when you were young?" "What were you like when you were human?" "We’re vampires, [ name ], we have no soul to save, and I don’t care." "How many people have you killed? You can tell me, I can handle it." "Did you meet [ historic figure ]?" "Everyone dies in the end, what does it matter if I... speed it along." "Every time we feed that person is someone's mother, brother, sister, husband. You better start getting used to that if you want to survive this life." "[ she is / he is / they are ] the strongest vampire anyone has heard of, no one knows how to stop them, and if you try you're going to get yourselves killed." "Vampire hunters are everywhere in this city, you need to watch your back." "Humans will never understand the bond a vampire has with [ his / her / their ] maker, it's a bond like no other." "Here, have this ring, it will protect you from the sunlight." "I get you're an immortal creature of the night and all that, but do you have to be such a downer about it?" "In my [ centuries / decades / millennia ] of living, do you really think no one has tried to kill me before?" "Vampires aren't weakened by garlic, that's a myth." "I used to be a lot worse than I was now, [ name ], I've had time to mellow, to become used to what I am. I'm ashamed of the monster I was." "The worst part of living forever is watching everyone you love die, while you stay frozen, still, constant." "I've lived so long I don't feel anything any more." "Are there more people like you? How many?" "Life has never been fair, [ name ], why would start being fair now you're immortal?" "You want to be young forever? Knock yourself out, I just hope you understand what you're giving up." "You never told me who turned you into a vampire. Who were they? Why did they do it?" "I could spend an eternity with you and never get bored." "Do you really sleep in coffins?" "There are worse things for a vampire than death, of that I can assure you [ name ]." "You need to feed, it's been days. You can drink from me, I can tell you're hungry." "The process of becoming a vampire is risky, [ name ], you could die, and I don't know if I could forgive myself for killing you." "I'm a vampire, I can hold a grudge for a long time, so believe me when I say I will never forgive this. Never." "You were human once! How can you have no empathy?" "You don't have to kill to be a vampire, but what would be the fun in that." "You can spend your first years of immortality doing whatever you want to whoever you want, but when you come back to your senses, it'll hit you harder than anything you've felt before." "One day, [ name ], everything you've done is going to catch up to you, and you're never going to forgive yourself." "Stop kidding yourself, [ name ], you're a vampire, a killer, a predator. You might as well embrace it now because you can't keep this up forever." "You can't [ compel / glamour ] me, I have something to protect me." "When you've lived as long as me, there's not much more in life you can do." "You want me to turn you? You don't know what you're asking me to do." "You really have to stop hissing like that, it's getting on my nerves." "I'm going to drive this stake through your heart, [ name ], and I'm going to enjoy it."
#ask meme#symbol meme#roleplay sentence meme#sentence starter meme#rp sentence prompts#vampire ask meme#ask box#ask memes#vampires#tw : blood#tw: violence#tw: death#tw: depression#tw: vampires#tw: murder
179 notes
·
View notes
Quote
よく「発明は1人でできる。製品化には10人かかる。量産化には100人かかる」とも言われますが、実際に、私はネオジム磁石を1人で発明しました。製品化、量産化については住友特殊金属の仲間たちと一緒に、短期間のうちに成功させました。82年に発明し、83年から生産が始まったのですから、非常に早いです。そしてネオジム磁石は、ハードディスクのVCM(ボイスコイルモーター)の部品などの電子機器を主な用途として大歓迎を受け、生産量も年々倍増して、2000年には世界で1万トンを超えました。
世界最強「ネオジム磁石はこうして見つけた」(佐川眞人 氏 / インターメタリックス株式会社 代表取締役社長) | Science Portal - 科学技術の最新情報サイト「サイエンスポータル」
81 notes
·
View notes
Photo
The Delian League, Part 2: From Eurymedon to the Thirty Years Peace (465/4-445/4 BCE)
This text is part of an article series on the Delian League.
The second phase of the Delian League's operations begins with the Hellenic victory over Mede forces at Eurymedon and ends with the Thirty Years Peace between Athens and Sparta (roughly 465/4 – 445/4 BCE).The Greek triumph at Eurymedon resulted in a cessation of hostilities against the Persians, which lasted almost six years. Whether or not this peace or truce followed from some formal treaty negotiated by Cimon, son of Miltiades, remains unknown.
Nevertheless, the Greek success at Eurymedon proved so decisive, the damage inflicted on Persia so great, and the wealth confiscated so considerable that an increasing number of League members soon began to wonder if the alliance still remained necessary. The Persians, however, had not altogether withdrawn from the Aegean. They still had, for example, a sizeable presence in both Cyprus and Doriscus. They also set about to build a great number of new triremes.
REDUCTION OF THASOS & THE BATTLE OF DRABESCUS
A quarrel soon erupted between the Athenians and Thasians over several trading ports and a wealth-producing mine (465 BCE). Competing economic interests compelled the rich and powerful Thasos to revolt from the Delian League. The Thasians resisted for almost three years. When the polis finally capitulated, the Athenians forced Thasos to surrender its naval fleet and the mine, dismantle defensive walls, pay retributions, and converted the future League contributions to monetary payments: 30 talents annum. Some League members became disaffected with the Athenian reduction of Thasos. Several poleis observed the Athenians had now developed a penchant for using "compulsion." They started to see Athens acting with both "arrogance and violence." On expeditions, furthermore, the other members felt they "no longer served as equals" (Thuc. 1.99.2).
The Athenians, meanwhile, attempted to establish a colony on the Strymon river to secure timber from Macedon, which shared its borders with the west bank. The location also proved a critical strategic point from which to protect the Hellespont. The Thracians, however, repelled the League forces at Drabescus. The Athenians soon realized the threats from both Thrace and Macedon made permanent settlements in the region difficult as they were essentially continental powers, and the League fleet could not reach them easily. Designs for the region, however, would not change, and the Athenians would return there again.
The Delian League had by this time demonstrated an inherent conflict from its beginnings: on the one hand, it engaged in heroic struggles against the Mede and extended its influence, reaping enormous benefits (especially for its poorer members). On the other hand, it also suppressed its members and soon demanded obedience from them.
The League engaged from the outset in a form of soft imperialism, collecting and commanding voluntary naval contributions and tribute while Athens used those resources and led all expeditions, enforcing continued membership but also showing little or no interest to interfere with the internal mechanisms of any member polis (unless it openly rebelled).
Continue reading...
35 notes
·
View notes