Google Site Hover Card - hover

On a Google Site I want to be able to show a hover card with additional information (picture, etc) if the user moves his mouse over a name.
I've found ways to achieve this through Java Script and CSS, but I can't get either method to work for Google Sites.
How can I achieve this aim?

You can integrate you script ( javascript , css ) on the Google Sites with app engine. https://developers.google.com/appengine/?csw=1
You can download this Application , put your script in the cloub and communicate with your Google Sites. You need to install python for you Computer
http://obtiva.com/blog/50-deploying-a-javascript-application-to-google-appengine-in-30-minutes
If you need just to integrate only CSS on your Google sites
you need to add Css code on the Html Box on your Google Sites.
Example :
<object>
<style type="text/css">
.roll
{
font-family: arial, helvetica, sans-serif;
margin: 0;
padding: 10;
}
.roll a
{
padding: 10;
display: block;
color: #000000;
font-size: 18px;
width: 150px;
height: 18px;
display: block;
text-decoration: none;
}
a:hover
{
background-color: #ccc;
color: #eee;
}
.roll
{
cursor: pointer;
}
</style>
<div class="roll"><br>
Rollover Texte 01<br>
Rollover Texte 02
</div>
</object>

Related

CallComposite azure style does't work when deploying my application

i create a css file with styled-components for my callcomposite, but when i deployed my application, some os these css properties, dont work.
how can i add a property css to my callcomposite inside components, like controlbar, video, buttons, etc... without losing it?
and the second, question, how can i customize background from this callcomposite root?
<Container>
<CallComposite adapter={callAdapter} />
</Container>
in my container, i have some css using styled components.
export const Container = styled.div`
height: 100vh;
.ms-Dropdown-title {
background: #ffffff;
border-radius: 5px;
border: none;
font-family: "Poppins", sans-serif !important;
font-size: 11px;
}
.ms-Stack .css-131 .ui-icon {
color: black;
}
.ui-icon {
color: black;
}
.ms-Button--primary {
width: 364px;
height: 54px;
border: none;
background: #28dc8e;
border-radius: 8px;
filter: drop-shadow(5px 4px 10px rgba(0, 0, 0, 0.25)) !important;
}
.ms-Dropdown-label {
font-family: "Poppins", sans-serif !important;
color: white;
}
`;
At this time we only expose styles at the component layer through fluent-style styling. Currently in design we are exploring the use of design tokens, css-like variables oriented towards user facing naming conventions than css terms that a web developer would better understand.
Please come and share your issue on our github issues at
https://github.com/Azure/communication-ui-library/issues and we can see if we can help you out.

prefers-color-scheme sample doesn't work but other pages work well with darkmode on chrome

I am using Google Chrome 92.0.4515.131 on Windows 10.
I installed the Dark Mode extension for Chrome in order to quickly toggle between day/night mode.
Almost all web pages including StackOverflow work perfectly with Dark mode except samples copied from Internet!
I copied the sample below from https://developer.mozilla.org/en-US/docs/Web/CSS/#media/prefers-color-scheme
Just save it into an HTML file and open it in Chrome. Clicking on the DarkMode button the Chrome shows no change at all.
<html>
<head>
<style>
.day {
background: #eee;
color: black;
}
.night {
background: #333;
color: white;
}
#media (prefers-color-scheme: dark) {
.day.dark-scheme {
background: #333;
color: white;
}
.night.dark-scheme {
background: black;
color: #ddd;
}
}
#media (prefers-color-scheme: light) {
.day.light-scheme {
background: white;
color: #555;
}
.night.light-scheme {
background: #eee;
color: black;
}
}
.day, .night {
display: inline-block;
padding: 1em;
width: 7em;
height: 2em;
vertical-align: middle;
}
</style>
</head>
<body>
<div class="day">Day (initial)</div>
<div class="day light-scheme">Day (changes in light scheme)</div>
<div class="day dark-scheme">Day (changes in dark scheme)</div> <br>
<div class="night">Night (initial)</div>
<div class="night light-scheme">Night (changes in light scheme)</div>
<div class="night dark-scheme">Night (changes in dark scheme)</div>
</body>
</html>
I also tried other not-working sample codes although I cannot find a full and simple html sample to understand how to use prefers-color-scheme.
The code looks good. But since the preferred color scheme is taken from your OS settings, the browser won't detect it unless it's set there. Most extensions just add their own background-color but obviously don't overwrite any of your OS settings.
Light mode activated in OS:
Dark mode activated in OS
If you would want to individually activate dark or light mode on your page, you could do that with a separate button. There's a good example: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_toggle_dark_mode
Hope I could help you a bit further.

Is there a way to customize html5 type=date UI using plain css? [duplicate]

I am really stoked about the HTML5 date picker.
The caveat is that I don't see or foresee much in the way of applying colors to the picker itself which is going to make the use of the datepicker kind of a deal-breaker on most sites. The <select> suffers from widespread JavaScript-replacement hacks for the simple reason that people can't make it pretty.
So are there any known styling options for the HTML input of type='date'?
The following eight pseudo-elements are made available by WebKit for customizing a date input’s textbox:
::-webkit-datetime-edit
::-webkit-datetime-edit-fields-wrapper
::-webkit-datetime-edit-text
::-webkit-datetime-edit-month-field
::-webkit-datetime-edit-day-field
::-webkit-datetime-edit-year-field
::-webkit-inner-spin-button
::-webkit-calendar-picker-indicator
So if you thought the date input could use more spacing and a ridiculous color scheme you could add the following:
::-webkit-datetime-edit { padding: 1em; }
::-webkit-datetime-edit-fields-wrapper { background: silver; }
::-webkit-datetime-edit-text { color: red; padding: 0 0.3em; }
::-webkit-datetime-edit-month-field { color: blue; }
::-webkit-datetime-edit-day-field { color: green; }
::-webkit-datetime-edit-year-field { color: purple; }
::-webkit-inner-spin-button { display: none; }
::-webkit-calendar-picker-indicator { background: orange; }
<input type="date">
Currently, there is no cross browser, script-free way of styling a native date picker.
As for what's going on inside WHATWG/W3C...
If this functionality does emerge, it will likely be under the CSS-UI standard or some Shadow DOM-related standard. The CSS4-UI wiki page lists a few appearance-related things that were dropped from CSS3-UI, but to be honest, there doesn't seem to be a great deal of interest in the CSS-UI module.
I think your best bet for cross browser development right now, is to implement pretty controls with JavaScript based interface, and then disable the HTML5 native UI and replace it. I think in the future, maybe there will be better native control styling, but perhaps more likely will be the ability to swap out a native control for your own Shadow DOM "widget".
It is annoying that this isn't available, and petitioning for standard support is always worthwhile. Though it does seem like jQuery UI's lead has tried and was unsuccessful.
While this is all very discouraging, it's also worth considering the advantages of the HTML5 date picker, and also why custom styles are difficult and perhaps should be avoided. On some platforms, the datepicker looks extremely different and I personally can't think of any generic way of styling the native datepicker.
FYI, I needed to update the color of the calendar icon which didn't seem possible with properties like color, fill, etc.
I did eventually figure out that some filter properties will adjust the icon so while i did not end up figuring out how to make it any color, luckily all I needed was to make it so the icon was visible on a dark background so I was able to do the following:
body { background: black; }
input[type="date"] {
background: transparent;
color: white;
}
input[type="date"]::-webkit-calendar-picker-indicator {
filter: invert(100%);
}
<body>
<input type="date" />
</body>
Hopefully this helps some people as for the most part chrome even directly says this is impossible.
found this on Zurb Foundation's GitHub
In case you want to do some more custom styling. Here's all the
default CSS for webkit rendering of the date components.
input[type="date"] {
-webkit-align-items: center;
display: -webkit-inline-flex;
font-family: monospace;
overflow: hidden;
padding: 0;
-webkit-padding-start: 1px;
}
input::-webkit-datetime-edit {
-webkit-flex: 1;
-webkit-user-modify: read-only !important;
display: inline-block;
min-width: 0;
overflow: hidden;
}
input::-webkit-datetime-edit-fields-wrapper {
-webkit-user-modify: read-only !important;
display: inline-block;
padding: 1px 0;
white-space: pre;
}
I used a combination of the above solutions and some trial and error to come to this solution.
I am using styled-components to render a transparent date picker input as shown in the image below:
const StyledInput = styled.input`
appearance: none;
box-sizing: border-box;
border: 1px solid black;
background: transparent;
font-size: 1.5rem;
padding: 8px;
::-webkit-datetime-edit-text { padding: 0 2rem; }
::-webkit-datetime-edit-month-field { text-transform: uppercase; }
::-webkit-datetime-edit-day-field { text-transform: uppercase; }
::-webkit-datetime-edit-year-field { text-transform: uppercase; }
::-webkit-inner-spin-button { display: none; }
::-webkit-calendar-picker-indicator { background: transparent;}
`
You can use the following CSS to style the input element.
input[type="date"] {
background-color: red;
outline: none;
}
input[type="date"]::-webkit-clear-button {
font-size: 18px;
height: 30px;
position: relative;
}
input[type="date"]::-webkit-inner-spin-button {
height: 28px;
}
input[type="date"]::-webkit-calendar-picker-indicator {
font-size: 15px;
}
<input type="date" value="From" name="from" placeholder="From" required="" />

Consistent navigation box for every page? (HTML)

I've been working on making a personal site with a navigation bar. I read w3schools' article and used the code there to make my nav. There are some problems with this, however:
The same code needs to be copied and pasted on each page.
If I decide to add a new page, I have to add the navigation bar to the new page and add the new page's link to the navigation bar on every page.
If I find an error in the nav code, I have to fix it on each individual page.
Here's the code:
html {
color: blue;
font-family: sans-serif;
}
.resource-dropdown {
position: sticky;
display: inline-block;
}
.resource-dropdown-content {
display: none;
position: absolute;
background-color: #b51d1d;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
padding: 12px 16px;
z-index: 1;
}
.resource-dropdown:hover .resource-dropdown-content {
display: block;
}
.resource-dropdown-content:hover {
color: greenyellow;
}
.topnav {
background-color: black;
}
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: white;
color: black;
}
<div class="topnav">
Home
<div class="resource-dropdown">
<span><a>Resources</a></span>
<div class="resource-dropdown-content">
<p>Sites</p>
<p>Books</p>
<p>Videos</p>
<p>Other</p>
</div>
</div>
About
</div>
Is there a way to make a shortcut? (Something like the alias command in the C languages)
There is no shortcut in HTML only. If you avec a local server such as MAMP / XAMP for exemple, and that you're ready to make a bit of PHP, you'll be able to create one file for the menu, and include it in all other files. This way, each time you change the menu in the menu file, it'll change on every pages.
here is the official documentation on php include function : http://php.net/manual/en/function.include.php
here is the documentation of MAMP : https://www.mamp.info/en/#controlcenter

external style sheet with chrome

alright, first time asker, i have an issue when using an external style sheet with the chrome browser, which doesn't occur when using Edge and Firefox. it also works correctly in Jsfiddle.
the issue is that it doesn't display background or text colour in my body, but for the header, it works perfectly.
this is my first time using an external style sheet, but i assume since its working in other browsers, this is an issue with compatibility with chrome.
i link the CSS file like so:
<link rel="stylesheet" type="text/css" href="styles.css" />
here is my CSS code itself:
body {
background-color: Black;
color: Green;
font-family: verdana;
}
h1 {
text-align: center;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: Green;
}
li {
float: left;
border-right:1px solid #bbb;
}
li:last-child {
border-right: none;
}
li a {
display: block;
color: Black;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: #111;
}
.active {
background-color: green;
}
thanks in advance for any help you can offer, its for a school esque project with strict criteria, which is why it needs to be external and in chrome.
goto settings
search for cache
clear browsing data
check cached images and files (the past hour / day)
clear browsing data
and goto your webpage and press "Ctrl + r"
Hope this helps !