mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-28 10:04:20 -05:00
refactor
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
_site/
|
||||
result
|
||||
|
||||
.certificates
|
||||
.sass-cache/
|
||||
.jekyll-cache/
|
||||
.jekyll-metadata
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
include: [".well-known"]
|
||||
|
||||
name: "Gabriel Fontes"
|
||||
description: "My personal website and projects"
|
||||
url: "https://misterio.me"
|
||||
|
||||
sass:
|
||||
style: compact
|
||||
|
||||
# Permalink dos posts
|
||||
permalink: /:year/:month/:day/:title:output_ext
|
||||
|
||||
collections:
|
||||
notes:
|
||||
pages:
|
||||
output: true
|
||||
permalink: /notes/:categories/:name:output_ext
|
||||
posts:
|
||||
output: true
|
||||
permalink: /blog/:name:output_ext
|
||||
permalink: /:path
|
||||
|
||||
defaults:
|
||||
# Set default layout and gemini false
|
||||
# Set pages layout
|
||||
-
|
||||
scope:
|
||||
path: ""
|
||||
type: "pages"
|
||||
values:
|
||||
layout: "default"
|
||||
gemini: false
|
||||
@@ -25,10 +31,12 @@ defaults:
|
||||
type: "posts"
|
||||
values:
|
||||
layout: "post"
|
||||
gemini: false
|
||||
# Set gemini layouts
|
||||
-
|
||||
scope:
|
||||
path: "**/*.gmi"
|
||||
type: "pages"
|
||||
values:
|
||||
layout: "default-gemini"
|
||||
gemini: true
|
||||
@@ -38,3 +46,4 @@ defaults:
|
||||
type: "posts"
|
||||
values:
|
||||
layout: "post-gemini"
|
||||
gemini: true
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
- name: about
|
||||
- name: About
|
||||
link: /
|
||||
- name: blog
|
||||
- name: Blog
|
||||
link: /blog/
|
||||
- name: notes
|
||||
link: /notes/
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<div class="grade">
|
||||
<label>
|
||||
{{ include.name }}
|
||||
<select
|
||||
class="{{ include.name | slugify: "latin" }}"
|
||||
name="{{ include.name | slugify: "latin" }}"
|
||||
>
|
||||
<option value="0.0">0.0</option>
|
||||
<option value="5.0" selected>5.0</option>
|
||||
<option value="7.5">7.5</option>
|
||||
<option value="10.0">10.0</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
@@ -1,16 +0,0 @@
|
||||
<div class="grade">
|
||||
<label>
|
||||
{{ include.name }}
|
||||
<input
|
||||
class="{{ include.name | slugify: "latin" }}"
|
||||
{% if include.disabled %} disabled {% endif %}
|
||||
type="number"
|
||||
step="0.1"
|
||||
value="5.0"
|
||||
maxlength="4"
|
||||
placeholder="0.0"
|
||||
max="10.0"
|
||||
min="0.0"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
Gabriel Fontes
|
||||
{% for item in site.data.navigation %}
|
||||
=> {{ item.link }} {{ item.name }}
|
||||
{%- endfor %}
|
||||
@@ -1,20 +1,17 @@
|
||||
<nav>
|
||||
<div class="row extremes">
|
||||
<span class="title">{ <a href="/">Gabriel Fontes</a> }</span>
|
||||
<button type="button" aria-label="Change color scheme" id="scheme-button">
|
||||
{% include icons/mdi/palette.svg class="icon medium" %}
|
||||
</button>
|
||||
</div>
|
||||
<ul>
|
||||
{% for item in site.data.navigation %}
|
||||
<li>
|
||||
<a {% if page.url == item.link %} aria-current="page" {% endif %} href="{{ item.link }}">
|
||||
{{ item.name }}
|
||||
{{ item.name | downcase }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
<nav>
|
||||
<small>Also available <a href="gemini://misterio.me{{ page.url | replace: ".html", ".gmi" }}">on gemini</a> (<a href="https://www.youtube.com/watch?v=Iq1k_FCWPXk">what is gemini</a>?)</small>
|
||||
<small>Also available <a href="gemini://misterio.me{{ page.url | replace: ".html", ".gmi" }}">on gemini</a></small>
|
||||
</nav>
|
||||
|
||||
-223
@@ -1,223 +0,0 @@
|
||||
<datalist id="scheme-list">
|
||||
<option>3024</option>
|
||||
<option>apathy</option>
|
||||
<option>apprentice</option>
|
||||
<option>ashes</option>
|
||||
<option>atelier-cave</option>
|
||||
<option>atelier-cave-light</option>
|
||||
<option>atelier-dune</option>
|
||||
<option>atelier-dune-light</option>
|
||||
<option>atelier-estuary</option>
|
||||
<option>atelier-estuary-light</option>
|
||||
<option>atelier-forest</option>
|
||||
<option>atelier-forest-light</option>
|
||||
<option>atelier-heath</option>
|
||||
<option>atelier-heath-light</option>
|
||||
<option>atelier-lakeside</option>
|
||||
<option>atelier-lakeside-light</option>
|
||||
<option>atelier-plateau</option>
|
||||
<option>atelier-plateau-light</option>
|
||||
<option>atelier-savanna</option>
|
||||
<option>atelier-savanna-light</option>
|
||||
<option>atelier-seaside</option>
|
||||
<option>atelier-seaside-light</option>
|
||||
<option>atelier-sulphurpool</option>
|
||||
<option>atelier-sulphurpool-light</option>
|
||||
<option>atlas</option>
|
||||
<option>ayu-dark</option>
|
||||
<option>ayu-light</option>
|
||||
<option>ayu-mirage</option>
|
||||
<option>base16-vice-scheme</option>
|
||||
<option>bespin</option>
|
||||
<option>black-metal</option>
|
||||
<option>black-metal-bathory</option>
|
||||
<option>black-metal-burzum</option>
|
||||
<option>black-metal-dark-funeral</option>
|
||||
<option>black-metal-gorgoroth</option>
|
||||
<option>black-metal-immortal</option>
|
||||
<option>black-metal-khold</option>
|
||||
<option>black-metal-marduk</option>
|
||||
<option>black-metal-mayhem</option>
|
||||
<option>black-metal-nile</option>
|
||||
<option>black-metal-venom</option>
|
||||
<option>blueish</option>
|
||||
<option>brewer</option>
|
||||
<option>bright</option>
|
||||
<option>brushtrees</option>
|
||||
<option>brushtrees-dark</option>
|
||||
<option>chalk</option>
|
||||
<option>circus</option>
|
||||
<option>classic-dark</option>
|
||||
<option>classic-light</option>
|
||||
<option>codeschool</option>
|
||||
<option>colors</option>
|
||||
<option>cupcake</option>
|
||||
<option>cupertino</option>
|
||||
<option>da-one-black</option>
|
||||
<option>da-one-gray</option>
|
||||
<option>da-one-ocean</option>
|
||||
<option>da-one-paper</option>
|
||||
<option>da-one-white</option>
|
||||
<option>danqing</option>
|
||||
<option>darcula</option>
|
||||
<option>darkmoss</option>
|
||||
<option>darktooth</option>
|
||||
<option>darkviolet</option>
|
||||
<option>decaf</option>
|
||||
<option>default-dark</option>
|
||||
<option>default-light</option>
|
||||
<option>dirtysea</option>
|
||||
<option>dracula</option>
|
||||
<option>eighties</option>
|
||||
<option>embers</option>
|
||||
<option>emil</option>
|
||||
<option>equilibrium-dark</option>
|
||||
<option>equilibrium-gray-dark</option>
|
||||
<option>equilibrium-gray-light</option>
|
||||
<option>equilibrium-light</option>
|
||||
<option>espresso</option>
|
||||
<option>eva</option>
|
||||
<option>eva-dim</option>
|
||||
<option>flat</option>
|
||||
<option>framer</option>
|
||||
<option>fruit-soda</option>
|
||||
<option>gigavolt</option>
|
||||
<option>github</option>
|
||||
<option>google-dark</option>
|
||||
<option>google-light</option>
|
||||
<option>gotham</option>
|
||||
<option>grayscale-dark</option>
|
||||
<option>grayscale-light</option>
|
||||
<option>greenscreen</option>
|
||||
<option>gruvbox-dark-hard</option>
|
||||
<option>gruvbox-dark-medium</option>
|
||||
<option>gruvbox-dark-pale</option>
|
||||
<option>gruvbox-dark-soft</option>
|
||||
<option>gruvbox-light-hard</option>
|
||||
<option>gruvbox-light-medium</option>
|
||||
<option>gruvbox-light-soft</option>
|
||||
<option>gruvbox-material-dark-hard</option>
|
||||
<option>gruvbox-material-dark-medium</option>
|
||||
<option>gruvbox-material-dark-soft</option>
|
||||
<option>gruvbox-material-light-hard</option>
|
||||
<option>gruvbox-material-light-medium</option>
|
||||
<option>gruvbox-material-light-soft</option>
|
||||
<option>hardcore</option>
|
||||
<option>harmonic-dark</option>
|
||||
<option>harmonic-light</option>
|
||||
<option>heetch</option>
|
||||
<option>heetch-light</option>
|
||||
<option>helios</option>
|
||||
<option>hopscotch</option>
|
||||
<option>horizon-dark</option>
|
||||
<option>horizon-light</option>
|
||||
<option>horizon-terminal-dark</option>
|
||||
<option>horizon-terminal-light</option>
|
||||
<option>humanoid-dark</option>
|
||||
<option>humanoid-light</option>
|
||||
<option>ia-dark</option>
|
||||
<option>ia-light</option>
|
||||
<option>icy</option>
|
||||
<option>irblack</option>
|
||||
<option>isotope</option>
|
||||
<option>katy</option>
|
||||
<option>kimber</option>
|
||||
<option>lime</option>
|
||||
<option>macintosh</option>
|
||||
<option>marrakesh</option>
|
||||
<option>materia</option>
|
||||
<option>material</option>
|
||||
<option>material-darker</option>
|
||||
<option>material-lighter</option>
|
||||
<option>material-palenight</option>
|
||||
<option>material-vivid</option>
|
||||
<option>mellow-purple</option>
|
||||
<option>mexico-light</option>
|
||||
<option>mocha</option>
|
||||
<option>monokai</option>
|
||||
<option>nebula</option>
|
||||
<option>nord</option>
|
||||
<option>nova</option>
|
||||
<option>ocean</option>
|
||||
<option>oceanicnext</option>
|
||||
<option>one-light</option>
|
||||
<option>onedark</option>
|
||||
<option>outrun-dark</option>
|
||||
<option>pandora</option>
|
||||
<option>paraiso</option>
|
||||
<option>pasque</option>
|
||||
<option>phd</option>
|
||||
<option>pico</option>
|
||||
<option>pinky</option>
|
||||
<option>pop</option>
|
||||
<option>porple</option>
|
||||
<option>primer-dark</option>
|
||||
<option>primer-dark-colorblind</option>
|
||||
<option>primer-dark-dimmed</option>
|
||||
<option>primer-dark-high-contrast</option>
|
||||
<option>primer-light</option>
|
||||
<option>primer-light-colorblind</option>
|
||||
<option>purpledream</option>
|
||||
<option>qualia</option>
|
||||
<option>railscasts</option>
|
||||
<option>rebecca</option>
|
||||
<option>rose-pine</option>
|
||||
<option>rose-pine-dawn</option>
|
||||
<option>rose-pine-moon</option>
|
||||
<option>sagelight</option>
|
||||
<option>sakura</option>
|
||||
<option>sandcastle</option>
|
||||
<option>seti</option>
|
||||
<option>shadesmear-dark</option>
|
||||
<option>shadesmear-light</option>
|
||||
<option>shapeshifter</option>
|
||||
<option>silk-dark</option>
|
||||
<option>silk-light</option>
|
||||
<option>snazzy</option>
|
||||
<option>solarflare</option>
|
||||
<option>solarflare-light</option>
|
||||
<option>solarized-dark</option>
|
||||
<option>solarized-light</option>
|
||||
<option>spaceduck</option>
|
||||
<option>spacemacs</option>
|
||||
<option>stella</option>
|
||||
<option>still-alive</option>
|
||||
<option>summercamp</option>
|
||||
<option>summerfruit-dark</option>
|
||||
<option>summerfruit-light</option>
|
||||
<option>synth-midnight-dark</option>
|
||||
<option>synth-midnight-light</option>
|
||||
<option>tender</option>
|
||||
<option>tokyo-city-dark</option>
|
||||
<option>tokyo-city-light</option>
|
||||
<option>tokyo-city-terminal-dark</option>
|
||||
<option>tokyo-city-terminal-light</option>
|
||||
<option>tokyo-night-dark</option>
|
||||
<option>tokyo-night-light</option>
|
||||
<option>tokyo-night-storm</option>
|
||||
<option>tokyo-night-terminal-dark</option>
|
||||
<option>tokyo-night-terminal-light</option>
|
||||
<option>tokyo-night-terminal-storm</option>
|
||||
<option>tokyonight</option>
|
||||
<option>tomorrow</option>
|
||||
<option>tomorrow-night</option>
|
||||
<option>tomorrow-night-eighties</option>
|
||||
<option>tube</option>
|
||||
<option>twilight</option>
|
||||
<option>unikitty-dark</option>
|
||||
<option>unikitty-light</option>
|
||||
<option>unikitty-reversible</option>
|
||||
<option>uwunicorn</option>
|
||||
<option>vulcan</option>
|
||||
<option>windows-10</option>
|
||||
<option>windows-10-light</option>
|
||||
<option>windows-95</option>
|
||||
<option>windows-95-light</option>
|
||||
<option>windows-highcontrast</option>
|
||||
<option>windows-highcontrast-light</option>
|
||||
<option>windows-nt</option>
|
||||
<option>windows-nt-light</option>
|
||||
<option>woodland</option>
|
||||
<option>xcode-dusk</option>
|
||||
<option>zenburn</option>
|
||||
</datalist>
|
||||
@@ -1,54 +0,0 @@
|
||||
<dialog id="scheme-dialog" aria-label="Color Scheme">
|
||||
<header>
|
||||
<button aria-label="Close dialog" class="close-button" id="scheme-close">
|
||||
{% include icons/mdi/close.svg %}
|
||||
</button>
|
||||
<h2>Color scheme</h2>
|
||||
</header>
|
||||
<form autocomplete="off" method="dialog" name="scheme" id="scheme-form">
|
||||
<div class="row">
|
||||
<label
|
||||
>Scheme name:
|
||||
<input id="scheme-input" list="scheme-list" size="18" placeholder="" />
|
||||
</label>
|
||||
<button
|
||||
aria-label="Random Scheme"
|
||||
id="scheme-random"
|
||||
type="button"
|
||||
class="small-button"
|
||||
style="margin-top: 1.8em"
|
||||
>
|
||||
{% include icons/mdi/shuffle.svg class="icon medium" %}
|
||||
</button>
|
||||
<button
|
||||
aria-label="Default Scheme"
|
||||
id="scheme-default"
|
||||
type="button"
|
||||
class="small-button hidden"
|
||||
style="margin-top: 1.8em"
|
||||
>
|
||||
{% include icons/mdi/restore.svg class="icon medium" %}
|
||||
</button>
|
||||
{% include scheme-datalist.html %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<p style="color: var(--base00)">█</p>
|
||||
<p style="color: var(--base01)">█</p>
|
||||
<p style="color: var(--base02)">█</p>
|
||||
<p style="color: var(--base03)">█</p>
|
||||
<p style="color: var(--base04)">█</p>
|
||||
<p style="color: var(--base05)">█</p>
|
||||
<p style="color: var(--base06)">█</p>
|
||||
<p style="color: var(--base07)">█</p>
|
||||
<p style="color: var(--base08)">█</p>
|
||||
<p style="color: var(--base09)">█</p>
|
||||
<p style="color: var(--base0A)">█</p>
|
||||
<p style="color: var(--base0B)">█</p>
|
||||
<p style="color: var(--base0C)">█</p>
|
||||
<p style="color: var(--base0D)">█</p>
|
||||
<p style="color: var(--base0E)">█</p>
|
||||
<p style="color: var(--base0F)">█</p>
|
||||
</div>
|
||||
<button type="submit" id="scheme-ok">Ok</button>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -1,7 +1,3 @@
|
||||
Gabriel Fontes
|
||||
=> / About
|
||||
=> /blog Blog
|
||||
=> /notes Notes
|
||||
|
||||
{% include nav.gmi %}
|
||||
# {{ page.title }}
|
||||
{{ content }}
|
||||
|
||||
@@ -1,97 +1,24 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Cache-control" content="public">
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Gabriel Fontes | {{ page.title }}</title>
|
||||
<link rel="canonical" href="https://misterio.me{{ page.url }}" />
|
||||
<meta
|
||||
name="description"
|
||||
content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}"
|
||||
/>
|
||||
<meta name="description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}" />
|
||||
{% if page.noindex == true %} <meta name="robots" content="noindex"> {% endif %}
|
||||
<link rel="stylesheet" href="/assets/imports/polyfills/dialog.css" />
|
||||
<link rel="stylesheet" href="/assets/imports/water.css" />
|
||||
<link rel="stylesheet" href="/assets/style.css" />
|
||||
<link rel="stylesheet" id="chosen-scheme" />
|
||||
<script>
|
||||
let chosen_scheme_css = document.getElementById("chosen-scheme");
|
||||
|
||||
// Set a given scheme
|
||||
function setTheme(scheme) {
|
||||
chosen_scheme_css.setAttribute(
|
||||
"href",
|
||||
"/assets/schemes/" + scheme + ".css"
|
||||
);
|
||||
localStorage.setItem("current-scheme", scheme);
|
||||
}
|
||||
// Reset scheme to defaults (rose-pine moon or dawn, depending on preference)
|
||||
function resetTheme() {
|
||||
chosen_scheme_css.removeAttribute("href");
|
||||
localStorage.removeItem("current-scheme");
|
||||
}
|
||||
|
||||
// Get stored scheme from localStorage and reapply it
|
||||
let stored_scheme = localStorage.getItem("current-scheme");
|
||||
if (stored_scheme) {
|
||||
setTheme(stored_scheme);
|
||||
}
|
||||
</script>
|
||||
<link rel="preload" href="/assets/FiraSans/Regular.woff2" as="font" type="font/woff2" crossorigin>
|
||||
<link rel="preload" href="/assets/FiraSans/Italic.woff2" as="font" type="font/woff2" crossorigin>
|
||||
<link rel="preload" href="/assets/FiraSans/Bold.woff2" as="font" type="font/woff2" crossorigin>
|
||||
<link rel="preload" href="/assets/FiraSans/BoldItalic.woff2" as="font" type="font/woff2" crossorigin>
|
||||
<link rel="preload" href="/assets/FiraCode/Regular.woff2" as="font" type="font/woff2" crossorigin>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'Fira Sans';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: url('/assets/FiraSans/Regular.woff2') format('woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Fira Sans';
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
src: url('/assets/FiraSans/Italic.woff2') format('woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Fira Sans';
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
src: url('/assets/FiraSans/Bold.woff2') format('woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Fira Sans';
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
src: url('/assets/FiraSans/BoldItalic.woff2') format('woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Fira Code';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: url('/assets/FiraCode/Regular.woff2') format('woff2');
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
{% include nav.html %}
|
||||
{% include scheme-dialog.html %}
|
||||
</header>
|
||||
<main>
|
||||
<h1>{{ page.title }}</h1>
|
||||
{{ content }}
|
||||
</main>
|
||||
{% include footer.html %}
|
||||
<script defer src="/assets/main.js"></script>
|
||||
<script defer src="/assets/imports/polyfills/dialog.js"></script>
|
||||
<script defer src="/assets/imports/prism.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,494 +0,0 @@
|
||||
---
|
||||
title: "Calculadora BSI 020 - 2021/2"
|
||||
category: bsi
|
||||
language: pt-br
|
||||
noindex: true
|
||||
date: 2021-08-18
|
||||
---
|
||||
|
||||
|
||||
<script>
|
||||
function importData() {
|
||||
// Create temporary input element
|
||||
const uploadInput = document.createElement("input");
|
||||
uploadInput.setAttribute("type", "file");
|
||||
uploadInput.setAttribute("accept", "application/json");
|
||||
document.body.appendChild(uploadInput);
|
||||
// Trigger it
|
||||
uploadInput.click();
|
||||
// When the user selects a file
|
||||
uploadInput.addEventListener('change', event => {
|
||||
// Create a file reader
|
||||
const reader = new FileReader();
|
||||
// When the reader loads
|
||||
reader.onload = event => {
|
||||
// Parse file json contents
|
||||
const data = JSON.parse(event.target.result);
|
||||
// Load it into localStorage
|
||||
Object.entries(data).forEach(([key, value]) => {
|
||||
localStorage.setItem(`data-${key}`, JSON.stringify(value));
|
||||
});
|
||||
}
|
||||
// Trigger file loading
|
||||
reader.readAsText(event.target.files[0]);
|
||||
// Remove temporary input element
|
||||
event.target.remove();
|
||||
// Reload page
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
function exportData() {
|
||||
const data = {};
|
||||
// Iterate over values in local storage
|
||||
Object.keys(localStorage).forEach(key => {
|
||||
// If it's about some course
|
||||
if (key.startsWith("data-")) {
|
||||
data[key.replace(/^data-/, "")] = JSON.parse(localStorage.getItem(key));
|
||||
}
|
||||
});
|
||||
// Encode as JSON
|
||||
const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(data));
|
||||
// Create a temporary anchor element to download it
|
||||
const downloadAnchor = document.createElement("a");
|
||||
downloadAnchor.setAttribute("href", dataStr);
|
||||
downloadAnchor.setAttribute("download", "notas.json");
|
||||
document.body.appendChild(downloadAnchor);
|
||||
// Trigger the download
|
||||
downloadAnchor.click();
|
||||
// Remove the anchor
|
||||
downloadAnchor.remove();
|
||||
}
|
||||
function resetData() {
|
||||
// Remove all grade keys on localstorage
|
||||
Object.keys(localStorage).forEach(key => {
|
||||
if (key.startsWith("data-")) {
|
||||
localStorage.removeItem(key);
|
||||
}
|
||||
});
|
||||
// Reload page
|
||||
location.reload();
|
||||
}
|
||||
|
||||
// Retira o menor elemento de um array
|
||||
function removeSmallest(arr) {
|
||||
arr = arr.slice();
|
||||
arr.splice(arr.indexOf(Math.min.apply(null, arr)), 1);
|
||||
return arr;
|
||||
}
|
||||
|
||||
// Tira média dos valores de um array de números
|
||||
// Opcionalmente você pode passar quantos serão eliminados
|
||||
function mean(values, remove) {
|
||||
if (remove) {
|
||||
for (var i = 0; i < remove; i++) {
|
||||
values = removeSmallest(values);
|
||||
}
|
||||
} else {
|
||||
remove = 0;
|
||||
}
|
||||
|
||||
var sum = 0.0;
|
||||
values.forEach(value => {
|
||||
sum += value;
|
||||
});
|
||||
|
||||
return sum / values.length;
|
||||
}
|
||||
|
||||
// Inicializa o form de uma disciplina, dado sua info (subject) e seu criterio (subjectCriteria)
|
||||
function init_form(name, subjectCriteria) {
|
||||
// Seleciona o form da disciplina
|
||||
const form = document.querySelector(`form#${name}`);
|
||||
|
||||
// Carregar notas da disciplina da localstorage, caso exista
|
||||
const loadedData = JSON.parse(localStorage.getItem(`data-${name}`));
|
||||
|
||||
var data;
|
||||
if (loadedData) {
|
||||
data = loadedData;
|
||||
pushSubjectData(data, form, true);
|
||||
} else {
|
||||
data = {};
|
||||
}
|
||||
|
||||
// Para cada elemento de input ou select nesse form
|
||||
form.querySelectorAll("select, input").forEach((element) => {
|
||||
// Adicionar um evento quando o input for alterado
|
||||
element.addEventListener("input", () => {
|
||||
// Pegar os dados inseridos no form
|
||||
data = getSubjectData(data, form);
|
||||
// Processar eles usando o criterio
|
||||
data = subjectCriteria(data);
|
||||
// Atualizar o que aparece no form
|
||||
pushSubjectData(data, form, false);
|
||||
// Salvar no localstorage
|
||||
localStorage.setItem(`data-${name}`, JSON.stringify(data));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Atualiza informações de média e de aprovação no form
|
||||
function pushSubjectData(data, form, updateFields) {
|
||||
// Para cada grupo de nota
|
||||
form.querySelectorAll("fieldset").forEach(group => {
|
||||
// Caso seja um grupo de nota final, ignorar (atualizaremos mais pra frente)
|
||||
if (group.className == "final") return;
|
||||
group.querySelectorAll("input, select").forEach(grade => {
|
||||
// Caso seja o campo de nota final, ignorar
|
||||
if (grade.className == "final") return;
|
||||
if (updateFields) grade.value = data[group.className][grade.className].toFixed(1);
|
||||
});
|
||||
|
||||
// Atualizar subtotal daquele grupo
|
||||
group.querySelector(".total strong").innerText = data[group.className]["final"].toFixed(1);
|
||||
});
|
||||
// Nota final da disciplina
|
||||
const total = form.querySelector("fieldset.final");
|
||||
// Alterar valor da nota total
|
||||
total.querySelector(".total strong").innerText = data["final"].toFixed(1);
|
||||
|
||||
// Status de aprovado/reprovado
|
||||
const situation = total.querySelector(".total em");
|
||||
|
||||
// Caso > 5.0
|
||||
if (parseFloat(data["final"].toFixed(1)) < 5.0) {
|
||||
situation.innerText = "Não passou ✗";
|
||||
situation.classList.add("failed");
|
||||
situation.classList.remove("succeeded");
|
||||
// Caso < 5.0
|
||||
} else {
|
||||
situation.innerText = "Passou ✓";
|
||||
situation.classList.add("succeeded");
|
||||
situation.classList.remove("failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Puxa os dados do form
|
||||
function getSubjectData(data, form) {
|
||||
// Para cada grupo de nota
|
||||
form.querySelectorAll("fieldset").forEach(group => {
|
||||
// Inicializar subobjeto
|
||||
data[group.className] = {};
|
||||
// Se for um grupo de nota final, ignorar
|
||||
if (group.className == "final") return;
|
||||
// Para cada nota do grupo
|
||||
group.querySelectorAll("input, select").forEach(grade => {
|
||||
// Caso seja o campo final, ignorar
|
||||
if (grade.className == "final") return;
|
||||
// Puxar nota do input ou select
|
||||
data[group.className][grade.className] = parseFloat(grade.value) || 0.0;
|
||||
});
|
||||
});
|
||||
return data;
|
||||
}
|
||||
</script>
|
||||
<button onClick="importData()">Importar</button><button onClick="exportData()">Exportar</button><button onClick="resetData()">Resetar</button>
|
||||
<nav>
|
||||
<a href="/notes/bsi/disciplinas-2021-2.html">Informações das disciplinas</a>
|
||||
</nav>
|
||||
|
||||
<h2 id="SME0510">
|
||||
SME0510 - Introdução à Pesquisa Operacional
|
||||
</h2>
|
||||
<a
|
||||
href="/notes/bsi/disciplinas-2021-2.html#SME0510"
|
||||
>Informações</a
|
||||
>
|
||||
<form id="SME0510">
|
||||
<fieldset class="provas">
|
||||
<legend>Provas</legend>
|
||||
{% include grade.html name="Prova 1" %}
|
||||
{% include grade.html name="Prova 2" %}
|
||||
{% include grade.html name="Prova 3" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="atividades">
|
||||
<legend>Atividades</legend>
|
||||
{% include grade.html name="Média" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="final">
|
||||
<legend>Total</legend>
|
||||
<hr />
|
||||
<div class="total">
|
||||
Média Final: <strong>5.0</strong>
|
||||
<hr />
|
||||
<em class="succeeded">Passou ✓</em>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<script>
|
||||
init_form("SME0510", (subject) => {
|
||||
subject["provas"]["final"] = mean(Object.values(subject["provas"]));
|
||||
subject["atividades"]["final"] = subject["atividades"]["media"];
|
||||
subject["final"] =
|
||||
0.8 * subject["provas"]["final"] + 0.2 * subject["atividades"]["final"];
|
||||
return subject;
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2 id="SSC0541">
|
||||
SSC0541 - Sistemas Operacionais I
|
||||
</h2>
|
||||
<a href="/notes/bsi/disciplinas-2021-2.html#SSC0541"
|
||||
>Informações</a
|
||||
>
|
||||
<form id="SSC0541">
|
||||
<fieldset class="provinhas">
|
||||
<legend>Provinhas e Trabalhos</legend>
|
||||
{% include grade.html name="Provinha 1" %}
|
||||
{% include grade.html name="Provinha 2" %}
|
||||
{% include grade.html name="Provinha 3" %}
|
||||
{% include grade.html name="Provinha 4" %}
|
||||
{% include grade.html name="Trabalho 1" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="prova">
|
||||
<legend>Prova Teórica</legend>
|
||||
{% include grade.html name="Prova" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="final">
|
||||
<legend>Total</legend>
|
||||
<hr />
|
||||
<div class="total">
|
||||
Média Final: <strong>5.0</strong>
|
||||
<hr />
|
||||
<em class="succeeded">Passou ✓</em>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<script>
|
||||
init_form("SSC0541", (subject) => {
|
||||
subject["provinhas"]["final"] = mean(Object.values(subject["provinhas"]));
|
||||
subject["prova"]["final"] = subject["prova"]["prova"];
|
||||
subject["final"] =
|
||||
0.4 * subject["prova"]["final"] + 0.6 * subject["provinhas"]["final"];
|
||||
return subject;
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2 id="SSC0510">
|
||||
SSC0510 - Arquitetura de Computadores
|
||||
</h2>
|
||||
<a href="/notes/bsi/disciplinas-2021-2.html#SSC0510"
|
||||
>Informações</a
|
||||
>
|
||||
<form id="SSC0510">
|
||||
<fieldset class="prova">
|
||||
<legend>Prova</legend>
|
||||
{% include grade.html name="Prova" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="trabalho">
|
||||
<legend>Trabalho em Grupo</legend>
|
||||
{% include grade.html name="Trabalho" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="final">
|
||||
<legend>Total</legend>
|
||||
<hr />
|
||||
<div class="total">
|
||||
Média Final: <strong>5.0</strong>
|
||||
<hr />
|
||||
<em class="succeeded">Passou ✓</em>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<script>
|
||||
init_form("SSC0510", (subject) => {
|
||||
subject["prova"]["final"] = subject["prova"]["prova"];
|
||||
subject["trabalho"]["final"] = subject["trabalho"]["trabalho"];
|
||||
subject["final"] =
|
||||
0.7 * subject["prova"]["final"] + 0.3 * subject["trabalho"]["final"];
|
||||
return subject;
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2 id="SSC0526">
|
||||
SSC0526 - Análise e Projeto Orientados à Objetos
|
||||
</h2>
|
||||
<a
|
||||
href="/notes/bsi/disciplinas-2021-2.html#SSC0526"
|
||||
>Informações</a
|
||||
>
|
||||
<form id="SSC0526">
|
||||
<fieldset class="provas">
|
||||
<legend>Provas</legend>
|
||||
{% include grade.html name="Prova 1" %}
|
||||
{% include grade.html name="Prova 2" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="trabalhos">
|
||||
<legend>Trabalhos</legend>
|
||||
{% include grade.html name="Trabalho 1" %}
|
||||
{% include grade.html name="Trabalho 2" %}
|
||||
{% include grade.html name="Bonus" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="exercicios">
|
||||
<legend>Exercícios em Sala</legend>
|
||||
{% include grade.html name="Exercicio 1" %}
|
||||
{% include grade.html name="Exercicio 2" %}
|
||||
{% include grade.html name="Exercicio 3" %}
|
||||
{% include grade.html name="Exercicio 4" %}
|
||||
{% include grade.html name="Exercicio 5" %}
|
||||
{% include grade.html name="Exercicio 6" %}
|
||||
{% include grade.html name="Exercicio 7" %}
|
||||
{% include grade.html name="Exercicio 8" %}
|
||||
{% include grade.html name="Exercicio 9" %}
|
||||
{% include grade.html name="Exercicio 10" %}
|
||||
{% include grade.html name="Exercicio 11" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="final">
|
||||
<legend>Total</legend>
|
||||
<hr />
|
||||
<div class="total">
|
||||
Média Final: <strong>5.0</strong>
|
||||
<hr />
|
||||
<em class="succeeded">Passou ✓</em>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<script>
|
||||
init_form("SSC0526", (subject) => {
|
||||
subject["exercicios"]["final"] = mean(Object.values(subject["exercicios"]), 3);
|
||||
|
||||
subject["provas"]["final"] =
|
||||
0.4 * subject["provas"]["prova-1"] + 0.6 * subject["provas"]["prova-2"];
|
||||
|
||||
subject["trabalhos"]["final"] =
|
||||
0.5 * subject["trabalhos"]["trabalho-1"] +
|
||||
0.5 * subject["trabalhos"]["trabalho-2"] +
|
||||
0.1 * subject["trabalhos"]["bonus"];
|
||||
|
||||
const m1 = subject["provas"]["final"];
|
||||
const m2 =
|
||||
0.7 * subject["trabalhos"]["final"] +
|
||||
0.3 * subject["exercicios"]["final"];
|
||||
|
||||
// TODO: Tirar se a Rosana fizer a boa
|
||||
if (m1 >= 5.0 && m2 >= 5.0) {
|
||||
subject["final"] = 0.6 * m1 + 0.4 * m2;
|
||||
} else {
|
||||
subject["final"] = Math.min(m1, m2);
|
||||
}
|
||||
return subject;
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2 id="SSC0577">
|
||||
SSC0577 - Seminários em Computação II
|
||||
</h2>
|
||||
<a href="/notes/bsi/disciplinas-2021-2.html#SSC0577"
|
||||
>Informações</a
|
||||
>
|
||||
<form id="SSC0577">
|
||||
<fieldset class="resumos">
|
||||
<legend>Resumos</legend>
|
||||
{% include grade-seminarios.html name="Resumo 1" %}
|
||||
{% include grade-seminarios.html name="Resumo 2" %}
|
||||
{% include grade-seminarios.html name="Resumo 3" %}
|
||||
{% include grade-seminarios.html name="Resumo 4" %}
|
||||
{% include grade-seminarios.html name="Resumo 5" %}
|
||||
{% include grade-seminarios.html name="Resumo 6" %}
|
||||
{% include grade-seminarios.html name="Resumo 7" %}
|
||||
{% include grade-seminarios.html name="Resumo 8" %}
|
||||
{% include grade-seminarios.html name="Resumo 9" %}
|
||||
{% include grade-seminarios.html name="Resumo 10" %}
|
||||
{% include grade-seminarios.html name="Resumo 11" %}
|
||||
{% include grade-seminarios.html name="Resumo 12" %}
|
||||
{% include grade-seminarios.html name="Resumo 13" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="final">
|
||||
<legend>Total</legend>
|
||||
<hr />
|
||||
<div class="total">
|
||||
Média Final: <strong>5.0</strong>
|
||||
<hr />
|
||||
<em class="succeeded">Passou ✓</em>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<script>
|
||||
init_form("SSC0577", (subject) => {
|
||||
subject["resumos"]["final"] = mean(Object.values(subject["resumos"]), 3);
|
||||
subject["final"] = subject["resumos"]["final"];
|
||||
return subject;
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2 id="SCC0540">
|
||||
SCC0540 - Bases de Dados
|
||||
</h2>
|
||||
<a href="/notes/bsi/disciplinas-2021-2.html#SCC0540"
|
||||
>Informações</a
|
||||
>
|
||||
<form id="SCC0540">
|
||||
<fieldset class="projetos">
|
||||
<legend>Projeto</legend>
|
||||
{% include grade.html name="Projeto" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="atividades">
|
||||
<legend>Ativiaddes</legend>
|
||||
{% include grade.html name="Atividade 1" %}
|
||||
{% include grade.html name="Atividade 2" %}
|
||||
{% include grade.html name="Atividade 3" %}
|
||||
{% include grade.html name="Atividade 4" %}
|
||||
{% include grade.html name="Atividade 5" %}
|
||||
<hr />
|
||||
<div class="total">Média: <strong>5.0</strong></div>
|
||||
</fieldset>
|
||||
<fieldset class="final">
|
||||
<legend>Total</legend>
|
||||
<hr />
|
||||
<div class="total">
|
||||
Média Final: <strong>5.0</strong>
|
||||
<hr />
|
||||
<em class="succeeded">Passou ✓</em>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<script>
|
||||
init_form("SCC0540", (subject) => {
|
||||
subject["atividades"]["final"] = mean(Object.values(subject["atividades"]));
|
||||
subject["projetos"]["final"] = mean(Object.values(subject["projetos"]));
|
||||
|
||||
if (subject["projetos"]["final"] >= 5.0 && subject["atividades"]["final"] >= 5.0) {
|
||||
subject["final"] = mean([subject["atividades"]["final"], subject["projetos"]["final"]]);
|
||||
} else {
|
||||
subject["final"] = Math.min(subject["projetos"]["final"], subject["atividades"]["final"]);
|
||||
}
|
||||
return subject;
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
@@ -1,172 +0,0 @@
|
||||
---
|
||||
title: "Disciplinas BSI 020 - 2021/2"
|
||||
category: bsi
|
||||
language: pt-br
|
||||
noindex: true
|
||||
date: 2021-08-16
|
||||
---
|
||||
|
||||
=> /notes/bsi/calculadora-2021-2.html Calculadora de notas
|
||||
|
||||
## Horários
|
||||
=> https://misterio.me/files/2021/classes.ics Arquivo de calendário
|
||||
|
||||
### Segunda
|
||||
* 19:00 - 20:40: Introdução à Pesquisa Operacional
|
||||
* 21:00 - 22:40: Sistemas Operacionais I
|
||||
|
||||
### Terça
|
||||
* 19:00 - 20:40: Arquitetura de Computadores
|
||||
* 21:00 - 22:40: Análise e Projeto Orientados à Objetos
|
||||
|
||||
### Quarta
|
||||
* 18:00 - 19:00: Seminários em Computação II
|
||||
* 19:00 - 20:40: Bases de Dados
|
||||
* 21:00 - 22:40: Introdução à Pesquisa Operacional
|
||||
|
||||
### Quinta
|
||||
* 19:00 - 20:40: Sistemas Operacionais I
|
||||
* 21:00 - 22:40: Contabilidade para Computação
|
||||
|
||||
### Sexta
|
||||
* 19:00 - 20:40: Análise e Projeto Orientados à Objetos
|
||||
* 21:00 - 22:40: Bases de Dados
|
||||
|
||||
## SME0510 - Introdução à Pesquisa Operacional
|
||||
### Sobre
|
||||
=> mailto:mari@icmc.usp.br Professora: Maristela Oliveira dos Santos (mari@icmc.usp.br)
|
||||
=> https://edisciplinas.usp.br/course/view.php?id=91809 Plataforma: E-Disciplinas
|
||||
=> https://meet.google.com/ Aula: Google Meet (Agendado, muda a cada aula)
|
||||
Cobra presença? Não
|
||||
|
||||
### Avaliações
|
||||
Provas:
|
||||
* Prova 1: 22/09 - Modelagem e solução gráfica
|
||||
* Prova 2: 27/10 - Teoria básica e método simplex
|
||||
* Prova 3: 08/12 - Método de programação inteira e heurísticas
|
||||
|
||||
Atividades:
|
||||
* Atividade semanal com correção automática
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2021-2.html#SME0510 Calculadora
|
||||
* Notas das provas (NP): média aritmética entre as 3 provas
|
||||
* Notas das atividades (NA): média aritmética de todas as atividades
|
||||
* Nota Final: média ponderada entre NP (peso 80%) e NA (peso 20%)
|
||||
|
||||
## SSC0541 - Sistemas Operacionais I
|
||||
### Sobre
|
||||
=> mailto:vbonato@icmc.usp.br Professor: Vanderlei Bonato (vbonato@icmc.usp.br)
|
||||
=> https://edisciplinas.usp.br/course/view.php?id=92707 Plataforma: E-Disciplinas
|
||||
=> https://edisciplinas.usp.br/mod/url/view.php?id=3778926 Aula: Google Meet
|
||||
=> https://edisciplinas.usp.br/mod/url/view.php?id=3778925 Cobra presença? Sim, lista
|
||||
|
||||
|
||||
### Avaliações
|
||||
Trabalhos práticos:
|
||||
* Trabalho 1: 17/10 - Jantar dos filósofos
|
||||
|
||||
Provinhas:
|
||||
* Provinha 1: 26/08 - Gerenciamento de Processos
|
||||
* Provinha 2: 16/09 - Sincronização de Processos
|
||||
* Provinha 3: 14/10 - Gerenciamento de Memória
|
||||
* Provinha 4: 08/11 - Restante (armazenamento, I/O, e arquivos)
|
||||
|
||||
Prova teórica única: 13/12
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2021-2.html#SSC0541 Calculadora
|
||||
* Nota da prova teórica (PT)
|
||||
* Nota das provinhas + trabalhos práticos (PV): média aritmética entre eles
|
||||
* Nota Final: média ponderada entre PT (40%) e PV (60%)
|
||||
|
||||
|
||||
## SSC0510 - Arquitetura de Computadores
|
||||
### Sobre
|
||||
=> mailto:simoes@icmc.usp.br Professor: Eduardo Simões (simoes@icmc.usp.br)
|
||||
=> https://gitlab.com/simoesusp/disciplinas/-/tree/master/SSC0510-Arquitetura-de-Computadores Plataforma: Gitlab
|
||||
=> https://meet.google.com/nwn-osys-cgu Aula: Google Meet
|
||||
=> https://docs.google.com/spreadsheets/d/1xinFOyZHZA7YXygnpgPlY14TlVbwzIto6mpL_naHPNQ/edit?usp=sharing Cobra presença? Sim, lista
|
||||
|
||||
|
||||
### Avaliações
|
||||
Prova (data?)
|
||||
=> https://docs.google.com/spreadsheets/d/18pFcYwvV9XkGrhZkdOhIoINsWKuKjthUsu5GGkf1xwM/edit?usp=sharing Trabalho em grupo
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2021-2.html#SSC0510 Calculadora
|
||||
* Nota da prova (NP)
|
||||
* Nota do trabalho (NT)
|
||||
* Nota Final: média ponderada entre NP (70%) e NT (30%)
|
||||
|
||||
## SSC0526 - Análise e Projeto Orientados à Objetos
|
||||
### Sobre
|
||||
=> mailto:rtvb@icmc.usp.br Professora: Rosana Braga (rtvb@icmc.usp.br)
|
||||
=> mailto:fabiolamf@usp.br PAE: Fabíola Malta (fabiolamf@usp.br)
|
||||
=> https://edisciplinas.usp.br/course/view.php?id=91587 Plataforma: E-Disciplinas
|
||||
=> https://meet.google.com/fug-ccrg-jii Aula: Google Meet
|
||||
Cobra presença? Sim, relatório do meets
|
||||
|
||||
### Avaliações
|
||||
Provas:
|
||||
* Prova 1: 15/10
|
||||
* Prova 2: 10/12
|
||||
* Sub (possivelmente): 17/12
|
||||
|
||||
Trabalhos: grupo de 3-5
|
||||
* Trabalho 1: 01/10
|
||||
* Trabalho 2: 24/11
|
||||
|
||||
Exercícios: em grupo, feito em horário de aula (10-11 ao longo do semestre)
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2021-2.html#SSC0526 Calculadora
|
||||
* Média de trabalhos (MT): média simples entre Trabalho 1 e 2
|
||||
* Média 1 (M1): ponderada entre Prova 1 (40%) e Prova 2 (60%)
|
||||
* Média 2 (M2): ponderada entre MT (70%) e Exercícios (8 melhores) (30%)
|
||||
* Média final: ponderada entre M1 (60%) e M2 (40%) - Os dois ≥ 5, se não o menor deles
|
||||
|
||||
## SSC0577 - Seminários em Computação II
|
||||
### Sobre
|
||||
=> mailto:srocio@icmc.usp.br Professora: Simone de Souza (srocio@icmc.usp.br)
|
||||
=> https://edisciplinas.usp.br/course/view.php?id=91734 Plataforma: E-Disciplinas
|
||||
=> https://meet.google.com/igq-jcam-mhd Aula: Google Meet
|
||||
=> https://edisciplinas.usp.br/mod/url/view.php?id=3817317 Cobra presença? Sim, formulário
|
||||
|
||||
### Avaliações
|
||||
* Resumo semanal do seminário: nota 0, 5, 7.5 ou 10.
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2021-2.html#SSC0577 Calculadora
|
||||
* Média dos resumos: média das 70% melhores notas
|
||||
|
||||
## SCC0540 - Bases de Dados
|
||||
### Sobre
|
||||
=> mailto:junio@icmc.usp.br Professor: Jose Rodrigues Júnior (junio@icmc.usp.br)
|
||||
=> https://ae4.tidia-ae.usp.br/portal/site/b82c61bd-1e05-4877-9366-f6ffc2babce7/ Plataforma: Tidia
|
||||
=> https://meet.google.com/bhr-zuoa-zvz Aula: Google Meet
|
||||
Cobra presença? Sim, exercícios
|
||||
|
||||
### Avaliações
|
||||
* Atividades quinzenais
|
||||
* Projeto: 24/11
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2021-2.html#SCC0540 Calculadora
|
||||
* Média de atividades (MA)
|
||||
* Média do projeto (MP)
|
||||
* Média final: Média simples entre MA e MP - Os dois ≥ 5, se não o menor deles
|
||||
|
||||
## SEP0584 - Contabilidade para Computação
|
||||
### Sobre
|
||||
=> mailto:humberto@sc.usp.br Professor: Humberto Bettini (humberto@sc.usp.br)
|
||||
=> https://meet.google.com/rku-xnuu-kjr Aula: Google Meet do Diógenes
|
||||
=> https://drive.google.com/folderview?id=1JckHfflmn7fx-PPAYQmuKDIpGg2KGEiB Gravações
|
||||
Cobra presença? Sim, chamada em aulas aleatórias
|
||||
|
||||
### Avaliações
|
||||
* Prova 1: 11/11, objetiva, aberta das 21h até 21h do dia seguinte
|
||||
* Prova 2: a definir
|
||||
|
||||
### Critérios
|
||||
* Média simples entre as duas provas (provavelmente)
|
||||
@@ -1,190 +0,0 @@
|
||||
---
|
||||
title: "Disciplinas BSI 020 - 2021/2"
|
||||
category: bsi
|
||||
language: pt-br
|
||||
noindex: true
|
||||
date: 2021-08-16
|
||||
---
|
||||
|
||||
[Calculadora de notas](/notes/bsi/calculadora-2021-2.html)
|
||||
|
||||
## Horários
|
||||
[Arquivo de calendário](https://misterio.me/files/2021/classes.ics)
|
||||
|
||||
- Segunda
|
||||
- 19:00 - 20:40: [Introdução à Pesquisa Operacional](#SME0510)
|
||||
- 21:00 - 22:40: [Sistemas Operacionais I](#SSC0541)
|
||||
- Terça
|
||||
- 19:00 - 20:40: [Arquitetura de Computadores](#SSC0510)
|
||||
- 21:00 - 22:40: [Análise e Projeto Orientados à Objetos](#SSC0526)
|
||||
- Quarta
|
||||
- 18:00 - 19:00: [Seminários em Computação II](#SSC0577)
|
||||
- 19:00 - 20:40: [Bases de Dados](#SCC0540)
|
||||
- 21:00 - 22:40: [Introdução à Pesquisa Operacional](#SME0510)
|
||||
- Quinta
|
||||
- 19:00 - 20:40: [Sistemas Operacionais I](#SSC0541)
|
||||
- 21:00 - 22:40: [Contabilidade para Computação](#SEP0584)
|
||||
- Sexta
|
||||
- 19:00 - 20:40: [Análise e Projeto Orientados à Objetos](#SSC0526)
|
||||
- 21:00 - 22:40: [Bases de Dados](#SCC0540)
|
||||
|
||||
---
|
||||
## SME0510 - Introdução à Pesquisa Operacional
|
||||
{: #SME0510 .ipo}
|
||||
|
||||
### Sobre
|
||||
- Professora: Maristela Oliveira dos Santos ([mari@icmc.usp.br](mailto:mari@icmc.usp.br))
|
||||
- Plataforma: [E-Disciplinas](https://edisciplinas.usp.br/course/view.php?id=91809)
|
||||
- Aula: [Google Meet (Agendado, muda a cada aula)](https://meet.google.com/)
|
||||
|
||||
- Cobra presença? Não
|
||||
|
||||
### Avaliações
|
||||
- Provas:
|
||||
- Prova 1: 22/09 - Modelagem e solução gráfica
|
||||
- Prova 2: 27/10 - Teoria básica e método simplex
|
||||
- Prova 3: 08/12 - Método de programação inteira e heurísticas
|
||||
- Atividades:
|
||||
- Atividade semanal com correção automática
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2021-2.html#SME0510)
|
||||
- Notas das provas (NP): média aritmética entre as 3 provas
|
||||
- Notas das atividades (NA): média aritmética de todas as atividades
|
||||
- **Nota Final**: média ponderada entre NP (peso 80%) e NA (peso 20%)
|
||||
|
||||
---
|
||||
## SSC0541 - Sistemas Operacionais I
|
||||
{: #SSC0541 .so}
|
||||
|
||||
### Sobre
|
||||
- Professor: Vanderlei Bonato ([vbonato@icmc.usp.br](mailto:vbonato@icmc.usp.br))
|
||||
- Plataforma: [E-Disciplinas](https://edisciplinas.usp.br/course/view.php?id=92707)
|
||||
- Aula: [Google Meet](https://edisciplinas.usp.br/mod/url/view.php?id=3778926)
|
||||
|
||||
- Cobra presença? [Sim, lista](https://edisciplinas.usp.br/mod/url/view.php?id=3778925)
|
||||
|
||||
### Avaliações
|
||||
- Trabalhos práticos:
|
||||
- Trabalho 1: 17/10 - [Jantar dos filósofos](https://edisciplinas.usp.br/mod/assign/view.php?id=3778946)
|
||||
- Provinhas:
|
||||
- Provinha 1: 26/08 - Gerenciamento de Processos
|
||||
- Provinha 2: 16/09 - Sincronização de Processos
|
||||
- Provinha 3: 14/10 - Gerenciamento de Memória
|
||||
- Provinha 4: 08/11 - Restante (armazenamento, I/O, e arquivos)
|
||||
- Prova teórica única: 13/12
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2021-2.html#SSC0541)
|
||||
- Nota da prova teórica (PT)
|
||||
- Nota das provinhas + trabalhos práticos (PV): média aritmética entre eles
|
||||
- **Nota Final**: média ponderada entre PT (40%) e PV (60%)
|
||||
|
||||
|
||||
---
|
||||
## SSC0510 - Arquitetura de Computadores
|
||||
{: #SSC0510}
|
||||
|
||||
### Sobre
|
||||
- Professor: Eduardo Simões ([simoes@icmc.usp.br](mailto:simoes@icmc.usp.br))
|
||||
- Plataforma: [Gitlab](https://gitlab.com/simoesusp/disciplinas/-/tree/master/SSC0510-Arquitetura-de-Computadores)
|
||||
- Aula: [Google Meet](https://meet.google.com/nwn-osys-cgu)
|
||||
|
||||
- Cobra presença? [Sim, lista](https://docs.google.com/spreadsheets/d/1xinFOyZHZA7YXygnpgPlY14TlVbwzIto6mpL_naHPNQ/edit?usp=sharing)
|
||||
|
||||
### Avaliações
|
||||
- Prova (data?)
|
||||
- Trabalho: em grupo, [planilha](https://docs.google.com/spreadsheets/d/18pFcYwvV9XkGrhZkdOhIoINsWKuKjthUsu5GGkf1xwM/edit?usp=sharing)
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2021-2.html#SSC0510)
|
||||
- Nota da prova (NP)
|
||||
- Nota do trabalho (NT)
|
||||
- **Nota Final**: média ponderada entre NP (70%) e NT (30%)
|
||||
|
||||
---
|
||||
## SSC0526 - Análise e Projeto Orientados à Objetos
|
||||
{: #SSC0526 .apoo}
|
||||
|
||||
### Sobre
|
||||
- Professora: Rosana Braga ([rtvb@icmc.usp.br](mailto:rtvb@icmc.usp.br))
|
||||
- PAE: Fabíola Malta ([fabiolamf@usp.br](mailto:fabiolamf@usp.br)), [grupo no whatsapp](https://chat.whatsapp.com/Dj7GkYUBPM04mcqbofK6HY)
|
||||
- Plataforma: [E-Disciplinas](https://edisciplinas.usp.br/course/view.php?id=91587)
|
||||
- Aula: [Google Meet](https://meet.google.com/fug-ccrg-jii)
|
||||
|
||||
- Cobra presença? Sim, relatório do meets
|
||||
|
||||
### Avaliações
|
||||
- Provas:
|
||||
- Prova 1: 15/10
|
||||
- Prova 2: 10/12
|
||||
- Sub (possivelmente): 17/12
|
||||
- Trabalhos: grupo de 3-5
|
||||
- Trabalho 1: 01/10
|
||||
- Trabalho 2: 24/11
|
||||
- Exercícios: em grupo, feito em horário de aula (10-11 ao longo do semestre)
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2021-2.html#SSC0526)
|
||||
- Média de trabalhos (MT): média simples entre Trabalho 1 e 2
|
||||
- Média 1 (M1): ponderada entre Prova 1 (40%) e Prova 2 (60%)
|
||||
- Média 2 (M2): ponderada entre MT (70%) e Exercícios (8 melhores) (30%)
|
||||
- **Média final**: ponderada entre M1 (60%) e M2 (40%) - **Os dois ≥ 5**, se não o menor deles
|
||||
|
||||
---
|
||||
## SSC0577 - Seminários em Computação II
|
||||
{: #SSC0577}
|
||||
|
||||
### Sobre
|
||||
- Professora: Simone de Souza ([srocio@icmc.usp.br](mailto:srocio@icmc.usp.br))
|
||||
- Plataforma: [E-Disciplinas](https://edisciplinas.usp.br/course/view.php?id=91734)
|
||||
- Aula: [Google Meet](https://meet.google.com/igq-jcam-mhd)
|
||||
|
||||
- Cobra presença? [Sim, formulário](https://edisciplinas.usp.br/mod/url/view.php?id=3817317)
|
||||
### Avaliações
|
||||
- Resumo semanal do seminário: nota 0, 5, 7.5 ou 10.
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2021-2.html#SSC0577)
|
||||
- **Média dos resumos**: média das 70% melhores notas
|
||||
|
||||
---
|
||||
## SCC0540 - Bases de Dados
|
||||
{: #SCC0540 .bd}
|
||||
|
||||
### Sobre
|
||||
- Professor: Jose Rodrigues Júnior ([junio@icmc.usp.br](mailto:junio@icmc.usp.br))
|
||||
- Plataforma: [Tidia](https://ae4.tidia-ae.usp.br/portal/site/b82c61bd-1e05-4877-9366-f6ffc2babce7/)
|
||||
- Aula: [Google Meet](https://meet.google.com/bhr-zuoa-zvz)
|
||||
|
||||
- Cobra presença? Sim, exercícios
|
||||
|
||||
### Avaliações
|
||||
- Atividades quinzenais
|
||||
- Projeto: 24/11
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2021-2.html#SCC0540)
|
||||
- Média de atividades (MA)
|
||||
- Média do projeto (MP)
|
||||
- **Média final**: Média simples entre MA e MP - **Os dois ≥ 5**, se não o menor deles
|
||||
|
||||
---
|
||||
## SEP0584 - Contabilidade para Computação
|
||||
{: #SEP0584 .acessorio}
|
||||
|
||||
### Sobre
|
||||
- Professor: Humberto Bettini ([humberto@sc.usp.br](mailto:humberto@sc.usp.br)/[humberto.bettini.acessorio@gmail.com](mailto:humberto.bettini.acessorio@gmail.com))
|
||||
- Plataforma: Não há, pra economizar dados do ciber espaço [_sic_]
|
||||
- Aula: [Google Meet do Diógenes](https://meet.google.com/rku-xnuu-kjr) ([gravações](https://drive.google.com/folderview?id=1JckHfflmn7fx-PPAYQmuKDIpGg2KGEiB))
|
||||
|
||||
- Cobra presença? Sim, chamada em aulas aleatórias
|
||||
|
||||
### Avaliações
|
||||
- Prova 1: 11/11, objetiva, aberta das 21h até 21h do dia seguinte
|
||||
- Prova 2: a definir
|
||||
|
||||
### Critérios
|
||||
- Média simples entre as duas provas (provavelmente)
|
||||
|
||||
---
|
||||
@@ -1,99 +0,0 @@
|
||||
---
|
||||
title: "Disciplinas BSI 020 - 2022/1"
|
||||
category: bsi
|
||||
language: pt-br
|
||||
noindex: true
|
||||
date: 2021-11-29
|
||||
draft: true
|
||||
---
|
||||
|
||||
=> /notes/bsi/calculadora-2022-1.html Calculadora de notas
|
||||
|
||||
## Horários
|
||||
=> https://misterio.me/files/2022/classes.ics Arquivo de calendário
|
||||
|
||||
### Segunda
|
||||
* 19:00 - 20:40: Engenharia de Software
|
||||
* 21:00 - 22:40: Modelagem da Produção
|
||||
### Terça
|
||||
* 19:00 - 20:40: Inteligência Artificial
|
||||
* 21:00 - 22:40: Redes de Computadores
|
||||
### Quarta
|
||||
* 19:00 - 20:40: Laboratório de Bases de Dados
|
||||
* 21:00 - 22:40: Laboratório de Bases de Dados
|
||||
### Quinta
|
||||
* 19:00 - 20:40: Modelagem da Produção
|
||||
* 21:00 - 22:40: Engenharia de Software
|
||||
### Sexta
|
||||
* 19:00 - 20:40: Redes de Computadores
|
||||
* 21:00 - 22:40: Inteligência Artificial
|
||||
|
||||
## SSC0527 - Engenharia de Software
|
||||
### Sobre
|
||||
=> mailto:elisa@icmc.usp.br Professora: Elisa Nakagawa (elisa@icmc.usp.br)
|
||||
Plataforma: TBD
|
||||
Aula: TBD
|
||||
Cobra presença? TBD
|
||||
|
||||
### Avaliações
|
||||
TBD
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2022-1.html#SSC0527 Calculadora
|
||||
TBD
|
||||
|
||||
## SEP0301 - Modelagem da Produção
|
||||
### Sobre
|
||||
Professor: TBD
|
||||
Plataforma: TBD
|
||||
Aula: TBD
|
||||
Cobra presença? TBD
|
||||
|
||||
### Avaliações
|
||||
TBD
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2022-1.html#SEP0301 Calculadora
|
||||
TBD
|
||||
|
||||
## SCC0530 - Inteligência Artificial
|
||||
### Sobre
|
||||
=> mailto:alneu@icmc.usp.br Professor: Alneu de Andrade Lopes (alneu@icmc.usp.br)
|
||||
Plataforma: TBD
|
||||
Aula: TBD
|
||||
Cobra presença? TBD
|
||||
|
||||
### Avaliações
|
||||
TBD
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2022-1.html#SCC0530 Calculadora
|
||||
TBD
|
||||
|
||||
## SSC0540 - Redes de Computadores
|
||||
### Sobre
|
||||
=> mailto:joueyama@icmc.usp.br Professor: Jó Ueyama (joueyama@icmc.usp.br)
|
||||
Plataforma: TBD
|
||||
Aula: TBD
|
||||
Cobra presença? TBD
|
||||
|
||||
### Avaliações
|
||||
TBD
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2022-1.html#SSC0540 Calculadora
|
||||
TBD
|
||||
|
||||
## SCC0541 - Laboratório de Bases de Dados
|
||||
### Sobre
|
||||
=> mailto:caetano@icmc.usp.br Professor: Caetano Traina Junior (caetano@icmc.usp.br)
|
||||
Plataforma: TBD
|
||||
Aula: TBD
|
||||
Cobra presença? TBD
|
||||
|
||||
### Avaliações
|
||||
TBD
|
||||
|
||||
### Critérios
|
||||
=> /notes/bsi/calculadora-2022-1.html#SCC0541 Calculadora
|
||||
TBD
|
||||
@@ -1,122 +0,0 @@
|
||||
---
|
||||
title: "Disciplinas BSI 020 - 2022/1"
|
||||
category: bsi
|
||||
language: pt-br
|
||||
noindex: true
|
||||
date: 2021-11-29
|
||||
draft: true
|
||||
---
|
||||
|
||||
[Calculadora de notas](/notes/bsi/calculadora-2022-1.html)
|
||||
|
||||
## Horários
|
||||
[Arquivo de calendário](https://misterio.me/files/2022/classes.ics)
|
||||
|
||||
- Segunda
|
||||
- 19:00 - 20:40: [Engenharia de Software](#SSC0527)
|
||||
- 21:00 - 22:40: [Modelagem da Produção](#SEP0301)
|
||||
- Terça
|
||||
- 19:00 - 20:40: [Inteligência Artificial](#SCC0530)
|
||||
- 21:00 - 22:40: [Redes de Computadores](#SSC0540)
|
||||
- Quarta
|
||||
- 19:00 - 20:40: [Laboratório de Bases de Dados](#SCC0541)
|
||||
- 21:00 - 22:40: [Laboratório de Bases de Dados](#SCC0541)
|
||||
- Quinta
|
||||
- 19:00 - 20:40: [Modelagem da Produção](#SEP0301)
|
||||
- 21:00 - 22:40: [Engenharia de Software](#SSC0527)
|
||||
- Sexta
|
||||
- 19:00 - 20:40: [Redes de Computadores](#SSC0540)
|
||||
- 21:00 - 22:40: [Inteligência Artificial](#SCC0530)
|
||||
|
||||
---
|
||||
## SSC0527 - Engenharia de Software
|
||||
{: #SSC0527 .engsoft}
|
||||
|
||||
### Sobre
|
||||
- Professora: Elisa Nakagawa ([elisa@icmc.usp.br](mailto:elisa@icmc.usp.br))
|
||||
- Plataforma: TBD
|
||||
- Aula: TBD
|
||||
|
||||
- Cobra presença? TBD
|
||||
|
||||
### Avaliações
|
||||
TBD
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2022-1.html#SSC0527)
|
||||
TBD
|
||||
|
||||
---
|
||||
## SEP0301 - Modelagem da Produção
|
||||
{: #SEP0301 .modprod}
|
||||
|
||||
### Sobre
|
||||
- Professor: TBD
|
||||
- Plataforma: TBD
|
||||
- Aula: TBD
|
||||
|
||||
- Cobra presença? TBD
|
||||
|
||||
### Avaliações
|
||||
TBD
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2022-1.html#SEP0301)
|
||||
TBD
|
||||
|
||||
|
||||
---
|
||||
## SCC0530 - Inteligência Artificial
|
||||
{: #SCC0530 .ia}
|
||||
|
||||
### Sobre
|
||||
- Professor: Alneu de Andrade Lopes ([alneu@icmc.usp.br](mailto:alneu@icmc.usp.br))
|
||||
- Plataforma: TBD
|
||||
- Aula: TBD
|
||||
|
||||
- Cobra presença? TBD
|
||||
|
||||
### Avaliações
|
||||
TBD
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2022-1.html#SCC0530)
|
||||
TBD
|
||||
|
||||
---
|
||||
## SSC0540 - Redes de Computadores
|
||||
{: #SSC0540 .redes}
|
||||
|
||||
### Sobre
|
||||
- Professor: Jó Ueyama ([joueyama@icmc.usp.br](mailto:joueyama@icmc.usp.br))
|
||||
- Plataforma: TBD
|
||||
- Aula: TBD
|
||||
|
||||
- Cobra presença? TBD
|
||||
|
||||
### Avaliações
|
||||
TBD
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2022-1.html#SSC0540)
|
||||
TODO
|
||||
|
||||
---
|
||||
## SCC0541 - Laboratório de Bases de Dados
|
||||
{: #SCC0541 .lab .bd .labbd}
|
||||
|
||||
### Sobre
|
||||
- Professor: Caetano Traina Junior ([caetano@icmc.usp.br](mailto:caetano@icmc.usp.br))
|
||||
- Plataforma: TBD
|
||||
- Aula: TBD
|
||||
|
||||
- Cobra presença? TBD
|
||||
|
||||
### Avaliações
|
||||
TBD
|
||||
|
||||
### Critérios
|
||||
[Calculadora](/notes/bsi/calculadora-2022-1.html#SCC0541)
|
||||
TBD
|
||||
|
||||
---
|
||||
@@ -1,15 +1,14 @@
|
||||
---
|
||||
title: Latest Posts
|
||||
description: My personal thoughts, rants, and occasional guide
|
||||
permalink: /blog/index.gmi
|
||||
---
|
||||
|
||||
{%- assign gmi_posts = site.posts | where: "gemini", true -%}
|
||||
|
||||
{%- for post in gmi_posts -%}
|
||||
{% for post in gmi_posts %}
|
||||
=> {{ post.url }} {{ post.title }}
|
||||
{{ post.date | date: "%d/%m/%y" }}
|
||||
{% if post.category.size > 0 %}({{ post.category }}){% endif %}
|
||||
{% for tag in post.tags %}#{{ tag }} {% endfor %}
|
||||
{% if post.category.size > 0 %}({{ post.category }}){% endif -%}
|
||||
tags: {% for tag in post.tags %}{{ tag }} {% endfor %}
|
||||
{{ post.excerpt }}
|
||||
|
||||
{%- endfor -%}
|
||||
{% endfor %}
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
title: Latest Posts
|
||||
description: My personal thoughts, rants, and occasional guide
|
||||
permalink: /blog/
|
||||
---
|
||||
{% assign html_posts = site.posts | where: "gemini", false %}
|
||||
<ul class="posts">
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
layout: none
|
||||
---
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
||||
>
|
||||
<channel>
|
||||
<title>{{ site.name | xml_escape }}</title>
|
||||
<description>{% if site.description %}{{ site.description | xml_escape }}{% endif %}</description>
|
||||
<sy:updatePeriod>{{ site.feed_update_period | default: "daily" | xml_escape }}</sy:updatePeriod>
|
||||
<sy:updateFrequency>{{ site.feed_update_frequency | default: 1 | xml_escape }}</sy:updateFrequency>
|
||||
<link>{{ site.url }}</link>
|
||||
<atom:link href="{{ site.url }}/{{ page.path }}" rel="self" type="application/rss+xml" />
|
||||
<lastBuildDate>{% for post in site.posts limit:1 %}{{ post.date | date_to_rfc822 }}{% endfor %}</lastBuildDate>
|
||||
{% assign feed_items = site.feed_items | default: 10 %}
|
||||
{% for post in site.posts limit:feed_items %}
|
||||
<item>
|
||||
<title>{{ post.title | xml_escape }}</title>
|
||||
{% if post.author.name %}
|
||||
<dc:creator>{{ post.author.name | xml_escape }}</dc:creator>
|
||||
{% endif %}
|
||||
{% if post.excerpt %}
|
||||
<description>{{ post.excerpt | xml_escape }}</description>
|
||||
{% else %}
|
||||
<description>{{ post.content | xml_escape }}</description>
|
||||
{% endif %}
|
||||
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
||||
<link>{{ site.url }}{{ post.url }}</link>
|
||||
<guid isPermaLink="true">{{ site.url }}{{ post.url }}</guid>
|
||||
</item>
|
||||
{% endfor %}
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -46,6 +46,10 @@ You'll probably see me avoiding proprietary software and walled gardens at all c
|
||||
=> mailto:g.fontes@usp.br g.fontes@usp.br
|
||||
=> 7088C7421873E0DB97FF17C2245CAB70B4C225E9.asc PGP: 245C AB70 B4C2 25E9
|
||||
|
||||
### Social
|
||||
=> https://twitter.com/misterio7x7 twitter: @misterio7x7
|
||||
=> https://linkedin.com/in/misterio7 linkedin: misterio7
|
||||
|
||||
### Chat
|
||||
=> tg://resolve?domain=misterio7x telegram: @misterio7x
|
||||
=> https://matrix.to/#/@misterio:matrix.org matrix: @misterio:matrix.org
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
title: About me
|
||||
permalink: /
|
||||
---
|
||||
|
||||
Hey 👋, my name is Gabriel. I'm a brazillian programmer, designer, and activist.
|
||||
@@ -5,8 +5,11 @@ language: en
|
||||
tags: web
|
||||
---
|
||||
|
||||
|
||||
Here's a writeup on how i made this website
|
||||
|
||||
**Notice: this website has evolved quite a lot since this post, this might not be up to date**
|
||||
|
||||
I've been wanting to get into blogging random tech rants, maybe something useful too. Guides, maybe?
|
||||
|
||||
Well, i kept putting this off for quite a while, as i just couldn't decide which way to build it. I've considered the big frameworks, server side rendering, handwritting static assets, all the stuff.
|
||||
|
||||
@@ -7,6 +7,8 @@ tags: web
|
||||
|
||||
Here's a writeup on how i made this website
|
||||
|
||||
**Notice: this website has evolved quite a lot since this post, this might not be up to date**
|
||||
|
||||
I've been wanting to get into blogging random tech rants, maybe something useful too. Guides, maybe?
|
||||
|
||||
Well, i kept putting this off for quite a while, as i just couldn't decide which way to build it. I've considered the big frameworks, server side rendering, handwritting static assets, all the stuff.
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
---
|
||||
author: Gabriel Fontes
|
||||
title: "Use build.sr.ht with nix flakes"
|
||||
language: en
|
||||
tags: nix srht
|
||||
---
|
||||
|
||||
I've recently started migrating from github to sourcehut, and i've been having a blast.
|
||||
|
||||
Here's a quick write up on how to use the awesome build.sr.ht CI with your shiny nix flake-based project.
|
||||
|
||||
## flake.nix
|
||||
First of all, of course, your project needs a `flake.nix`. More specifically, your flake needs a `outputs.packages.xxx` to be built with `nix build xxx` (as a plus, set your preferred packaged to `outputs.defaultPackage`, so you can build with `nix build`). Here's how this website's looks like:
|
||||
```nix
|
||||
{
|
||||
description = "My personal website, blog, and digital garden";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
package = "misterio-me";
|
||||
in {
|
||||
# Package, specifies what nix builds with 'nix build', in this case builds the website with jekyll
|
||||
packages.${package} = pkgs.stdenv.mkDerivation {
|
||||
pname = package;
|
||||
version = "1.0";
|
||||
src = ./.;
|
||||
buildPhase = ''
|
||||
JEKYLL_ENV=production ${pkgs.jekyll}/bin/jekyll build --destination $out
|
||||
'';
|
||||
installPhase = "true";
|
||||
};
|
||||
defaultPackage = self.packages.${system}."${package}";
|
||||
|
||||
# App, specifies what nix does with 'nix run', in this case serves up the website
|
||||
apps.${package} = let
|
||||
serve = pkgs.writeShellScriptBin "serve" ''
|
||||
echo "Serving on: http://127.0.0.1:4000"
|
||||
${pkgs.webfs}/bin/webfsd -f index.html -F -p 4000 -r ${self.packages.${system}.${package}}
|
||||
'';
|
||||
in {
|
||||
type = "app";
|
||||
program = "${serve}/bin/serve";
|
||||
};
|
||||
defaultApp = self.apps.${system}.${package};
|
||||
|
||||
# Development shell, specifies what nix provides with 'nix develop'
|
||||
devShell =
|
||||
pkgs.mkShell { buildInputs = with pkgs; [ jekyll nodePackages.prettier sass scss-lint ]; };
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
I've included it all as a reference, but you can safely ignore `apps` and `devShell`, if you don't need them.
|
||||
|
||||
## Build manifest
|
||||
|
||||
### Minimal example
|
||||
Here's what you're probably looking for. This is a minimal `.build.yml` manifest is how you can easily get some sweet nix flakes support on your `build.sr.ht` runner:
|
||||
```yml
|
||||
image: nixos/unstable
|
||||
packages:
|
||||
- nixos.nixUnstable
|
||||
environment:
|
||||
NIX_CONFIG: "experimental-features = nix-command flakes"
|
||||
```
|
||||
This baby will install `nixUnstable` using `nix-env`, and add the required experimental features to your environment (so you don't have to edit a file or use cli arguments for that).
|
||||
|
||||
### How i use it
|
||||
|
||||
Just add your `tasks` and `environment` entries as needed. I build and deploy this website to SourceHut pages with this manifest:
|
||||
```yml
|
||||
image: nixos/unstable
|
||||
packages:
|
||||
- nixos.nixUnstable
|
||||
environment:
|
||||
NIX_CONFIG: "experimental-features = nix-command flakes"
|
||||
|
||||
oauth: pages.sr.ht/PAGES:RW
|
||||
|
||||
tasks:
|
||||
- build: |
|
||||
cd misterio.me
|
||||
nix --quiet build
|
||||
- package: |
|
||||
tar -C misterio.me/result -cvz . > site.tar.gz
|
||||
- upload: |
|
||||
acurl -f https://pages.sr.ht/publish/misterio.me -Fcontent=@site.tar.gz
|
||||
```
|
||||
|
||||
Pretty sweet!
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
---
|
||||
author: Gabriel Fontes
|
||||
title: "Use build.sr.ht with nix flakes"
|
||||
category: nix
|
||||
language: en
|
||||
date: 2021-09-13
|
||||
tags: nix srht
|
||||
---
|
||||
|
||||
I've recently started migrating from github to sourcehut, and i've been having a blast.
|
||||
@@ -0,0 +1,123 @@
|
||||
---
|
||||
author: Gabriel Fontes
|
||||
title: "C Nix boilerplate"
|
||||
language: en
|
||||
tags: nix
|
||||
---
|
||||
|
||||
Looking to start out a C (or C++) project and wanna some cool and nifty commands to manage it through both `make` and `nix`? As a plus, you'll also get nice out of tree builds.
|
||||
|
||||
Then look no further, here's all the boilerplate you need.
|
||||
|
||||
**If you just want it fast without an explanation, it's all available on my repository.**
|
||||
|
||||
=> Repository https://github.com/Misterio77/nix-config/tree/6be94519831d2723a09e03352bad5c21adced399/templates/c
|
||||
|
||||
You can just run `nix flake init -t github:misterio77/nix-config#templates.c`, to quickly init a flake with this template.
|
||||
|
||||
We're gonna start by building a flexible (yet simple) Makefile:
|
||||
```Makefile
|
||||
# Set default prefix and bin dirs, for non-nixos
|
||||
PREFIX ?= /usr/local
|
||||
BIN_DIR ?= $(PREFIX)/bin
|
||||
|
||||
# Executable name
|
||||
TARGET_EXEC ?= foo-bar
|
||||
# Build directory
|
||||
BUILD_DIR ?= ./build
|
||||
# Source directory(ies)
|
||||
SRC_DIRS ?= ./src
|
||||
|
||||
# Use find to get all .c and .cpp files
|
||||
SRCS := $(shell find $(SRC_DIRS) -name *.cpp -or -name *.c)
|
||||
# Map those to their respective .o files
|
||||
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
|
||||
# Dependency files generated by gcc
|
||||
DEPS := $(OBJS:.o=.d)
|
||||
|
||||
# Directories with includes
|
||||
INC_DIRS := $(shell find $(SRC_DIRS) -type d)
|
||||
# Flags for including those
|
||||
INC_FLAGS := $(addprefix -I,$(INC_DIRS))
|
||||
|
||||
# Flags for both C and C++
|
||||
CPPFLAGS ?= $(INC_FLAGS) -MMD -MP
|
||||
|
||||
# Link executable
|
||||
$(BUILD_DIR)/$(TARGET_EXEC): $(OBJS)
|
||||
$(CXX) $(OBJS) -o $@ $(LDFLAGS)
|
||||
|
||||
# C source files
|
||||
$(BUILD_DIR)/%.c.o: %.c
|
||||
$(MKDIR_P) $(dir $@)
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# C++ source files
|
||||
$(BUILD_DIR)/%.cpp.o: %.cpp
|
||||
$(MKDIR_P) $(dir $@)
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
# Clean built artifacts
|
||||
clean:
|
||||
$(RM) -r $(BUILD_DIR)
|
||||
|
||||
# Install to prefix/bin path
|
||||
install: $(BUILD_DIR)/$(TARGET_EXEC)
|
||||
install -d $(BIN_DIR)
|
||||
install -t $(BIN_DIR) $<
|
||||
|
||||
# Include generated dependencies
|
||||
-include $(DEPS)
|
||||
|
||||
MKDIR_P ?= mkdir -p
|
||||
```
|
||||
|
||||
This is heavily based on this post, with the main change being the install directive.
|
||||
|
||||
=> https://spin.atomicobject.com/2016/08/26/makefile-c-projects/
|
||||
|
||||
Okay, now we just need a flake for building with nix:
|
||||
```nix
|
||||
{
|
||||
description = "Foo Bar C/C++ Project";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
# For each system
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
# Derivation and executable name
|
||||
name = "foo-bar";
|
||||
pkgs = (import nixpkgs { inherit system; });
|
||||
in
|
||||
rec {
|
||||
# nix build
|
||||
packages.${name} = pkgs.stdenv.mkDerivation rec {
|
||||
inherit name;
|
||||
src = ./.;
|
||||
# Set prefix, so stuff is installed to $out
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
};
|
||||
defaultPackage = packages.${name};
|
||||
|
||||
# nix run
|
||||
apps.${name} = {
|
||||
type = "app";
|
||||
program = "${packages.${name}}/bin/${name}";
|
||||
};
|
||||
defaultApp = apps.${name};
|
||||
|
||||
# nix develop
|
||||
devShell = pkgs.mkShell {
|
||||
# Add clang and clang-tools for LSP support while editing
|
||||
buildInputs = with pkgs; [ gnumake clang clang-tools ];
|
||||
};
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
And there you go!
|
||||
+2
-7
@@ -1,8 +1,8 @@
|
||||
---
|
||||
author: Gabriel Fontes
|
||||
title: "C Nix boilerplate"
|
||||
category: nix
|
||||
language: en
|
||||
date: 2021-09-14
|
||||
tags: nix
|
||||
---
|
||||
|
||||
Looking to start out a C (or C++) project and wanna some cool and nifty commands to manage it through both `make` and `nix`? As a plus, you'll also get nice out of tree builds.
|
||||
@@ -117,8 +117,3 @@ Okay, now we just need a flake for building with nix:
|
||||
```
|
||||
|
||||
And there you go!
|
||||
|
||||
You might also want to use [direnv](https://direnv.net/) and [nix-direnv](https://github.com/nix-community/nix-direnv) for a quick and easy dev shell. Just install them and add a `.envrc` file with:
|
||||
```bash
|
||||
use flake
|
||||
```
|
||||
@@ -1,701 +0,0 @@
|
||||
/*
|
||||
* Datalist polyfill - https://github.com/mfranzke/datalist-polyfill
|
||||
* @license Copyright(c) 2017 by Maximilian Franzke
|
||||
* Supported by Christian, Johannes, @mitchhentges, @mertenhanisch, @ailintom, @Kravimir, @mischah, @hryamzik, @ottoville, @IceCreamYou, @wlekin, @eddr, @beebee1987, @mricherzhagen, @acespace90, @damien-git, @nexces, @Sora2455, @jscho13, @alexirion and @vinyfc93 - many thanks for that !
|
||||
*/
|
||||
/*
|
||||
* A minimal and dependency-free vanilla JavaScript datalist polyfill.
|
||||
* Supports all standard's functionality as well as mimics other browsers behavior.
|
||||
* Tests for native support of an inputs elements datalist functionality.
|
||||
* Elsewhere the functionality gets emulated by a select element.
|
||||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
// Performance: Set local variables
|
||||
var dcmnt = window.document,
|
||||
ua = window.navigator.userAgent,
|
||||
// Feature detection
|
||||
datalistSupported =
|
||||
'list' in dcmnt.createElement('input') &&
|
||||
Boolean(dcmnt.createElement('datalist') && window.HTMLDataListElement),
|
||||
// IE & EDGE browser detection via UserAgent
|
||||
// TODO: obviously ugly. But sadly necessary until Microsoft enhances the UX within EDGE (compare to https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/9573654/)
|
||||
// Tested against the following UA strings: http://useragentstring.com/pages/useragentstring.php?name=Internet+Explorer
|
||||
// And adapted out of https://gist.github.com/gaboratorium/25f08b76eb82b1e7b91b01a0448f8b1d :
|
||||
isGteIE10 = Boolean(ua.match(/MSIE\s1[01]./) || ua.match(/rv:11./)),
|
||||
isEDGE = Boolean(ua.indexOf('Edge/') !== -1);
|
||||
|
||||
// Let's break here, if it's even already supported ... and not IE10+ or EDGE
|
||||
if (datalistSupported && !isGteIE10 && !isEDGE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// .matches polyfill
|
||||
// TODO: probably needs enhancement on the expected to be supported browsers
|
||||
if (!Element.prototype.matches) {
|
||||
Element.prototype.matches = Element.prototype.msMatchesSelector;
|
||||
}
|
||||
|
||||
// Define some global settings and configurations
|
||||
var touched = false,
|
||||
// Speaking variables for the different keycodes
|
||||
keyENTER = 13,
|
||||
keyESC = 27,
|
||||
keyUP = 38,
|
||||
keyDOWN = 40,
|
||||
// Defining the text / value seperator for displaying the value and text values ...
|
||||
textValueSeperator = ' / ',
|
||||
// ... and defining the different input types that are supported by this polyfill
|
||||
supportedTypes = ['text', 'email', 'number', 'search', 'tel', 'url'],
|
||||
// Classes for elements
|
||||
classNameInput = 'polyfilled',
|
||||
classNamePolyfillingSelect = 'polyfilling',
|
||||
// Defining a most likely unique polyfill string
|
||||
uniquePolyfillString = '###[P0LYFlLLed]###';
|
||||
|
||||
// Differentiate for touch interactions, adapted by https://medium.com/@david.gilbertson/the-only-way-to-detect-touch-with-javascript-7791a3346685
|
||||
window.addEventListener('touchstart', function onFirstTouch() {
|
||||
touched = true;
|
||||
|
||||
window.removeEventListener('touchstart', onFirstTouch);
|
||||
});
|
||||
|
||||
// For observing any changes to the option elements within the datalist elements, define MutationObserver initially
|
||||
var MutationObserver =
|
||||
window.MutationObserver || window.WebKitMutationObserver,
|
||||
obs;
|
||||
|
||||
// Define a new observer
|
||||
if (typeof MutationObserver !== 'undefined') {
|
||||
obs = new MutationObserver(function (mutations) {
|
||||
var datalistNeedsAnUpdate = false;
|
||||
|
||||
// Look through all mutations that just occured
|
||||
mutations.forEach(function (mutation) {
|
||||
// Check if any of the mutated nodes was a datalist
|
||||
if (
|
||||
mutation.target instanceof HTMLElement &&
|
||||
mutation.target.tagName.toLowerCase() === 'datalist' &&
|
||||
mutation.addedNodes.length > 1
|
||||
) {
|
||||
datalistNeedsAnUpdate = mutation.target;
|
||||
}
|
||||
});
|
||||
|
||||
if (datalistNeedsAnUpdate) {
|
||||
var input = dcmnt.querySelector(
|
||||
'input[list="' + datalistNeedsAnUpdate.id + '"]'
|
||||
);
|
||||
|
||||
if (getInputValue(input) !== '') {
|
||||
// Prepare the options and toggle the visiblity afterwards
|
||||
toggleVisibility(
|
||||
prepOptions(datalistNeedsAnUpdate, input).length,
|
||||
datalistNeedsAnUpdate.getElementsByClassName(
|
||||
classNamePolyfillingSelect
|
||||
)[0]
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Function regarding the inputs interactions on keyup event
|
||||
var inputInputList = function (event) {
|
||||
var input = event.target,
|
||||
datalist = input.list,
|
||||
keyOpen = event.keyCode === keyUP || event.keyCode === keyDOWN;
|
||||
|
||||
// Check for whether the events target was an input and still check for an existing instance of the datalist and polyfilling select
|
||||
if (input.tagName.toLowerCase() !== 'input' || datalist === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Handling IE10+ & EDGE
|
||||
if (isGteIE10 || isEDGE) {
|
||||
// On keypress check for value
|
||||
if (
|
||||
getInputValue(input) !== '' &&
|
||||
!keyOpen &&
|
||||
event.keyCode !== keyENTER &&
|
||||
event.keyCode !== keyESC &&
|
||||
// As only EDGE doesn't trigger the input event after selecting an item via mouse, we need to differentiate here
|
||||
(isGteIE10 || input.type === 'text')
|
||||
) {
|
||||
updateIEOptions(input, datalist);
|
||||
|
||||
// TODO: Check whether this update is necessary depending on the options values
|
||||
input.focus();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var visible = false,
|
||||
// Creating the select if there's no instance so far (e.g. because of that it hasn't been handled or it has been dynamically inserted)
|
||||
datalistSelect =
|
||||
datalist.getElementsByClassName(classNamePolyfillingSelect)[0] ||
|
||||
setUpPolyfillingSelect(input, datalist);
|
||||
|
||||
// On an ESC or ENTER key press within the input, let's break here and afterwards hide the datalist select, but if the input contains a value or one of the opening keys have been pressed ...
|
||||
if (
|
||||
event.keyCode !== keyESC &&
|
||||
event.keyCode !== keyENTER &&
|
||||
(getInputValue(input) !== '' || keyOpen) &&
|
||||
datalistSelect !== undefined
|
||||
) {
|
||||
// ... prepare the options
|
||||
if (prepOptions(datalist, input).length > 0) {
|
||||
visible = true;
|
||||
}
|
||||
|
||||
var firstEntry = 0,
|
||||
lastEntry = datalistSelect.options.length - 1;
|
||||
|
||||
// ... preselect best fitting index
|
||||
if (touched) {
|
||||
datalistSelect.selectedIndex = firstEntry;
|
||||
} else if (keyOpen && input.getAttribute('type') !== 'number') {
|
||||
datalistSelect.selectedIndex =
|
||||
event.keyCode === keyUP ? lastEntry : firstEntry;
|
||||
|
||||
// ... and on arrow up or down keys, focus the select
|
||||
datalistSelect.focus();
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle the visibility of the datalist select according to previous checks
|
||||
toggleVisibility(visible, datalistSelect);
|
||||
};
|
||||
|
||||
// On keypress check all options for that as a substring, save the original value as a data-attribute and preset that inputs value (for sorting) for all option values (probably as well enhanced by a token)
|
||||
var updateIEOptions = function (input, datalist) {
|
||||
var inputValue = getInputValue(input);
|
||||
|
||||
// Loop through the options
|
||||
Array.prototype.slice.call(datalist.options, 0).forEach(function (option) {
|
||||
// We're using .getAttribute instead of .dataset here for IE10-
|
||||
var dataOriginalvalue = option.getAttribute('data-originalvalue'),
|
||||
originalValue = dataOriginalvalue || option.value;
|
||||
|
||||
// In case of that the original value hasn't been saved as data so far, do that now
|
||||
if (!dataOriginalvalue) {
|
||||
// We're using .setAttribute instead of .dataset here for IE10-
|
||||
option.setAttribute('data-originalvalue', originalValue);
|
||||
}
|
||||
|
||||
// As we'd manipulate the value in the next step, we'd like to put in that value as either a label or text if none of those exist
|
||||
if (!option.label && !option.text) {
|
||||
option.label = originalValue;
|
||||
}
|
||||
|
||||
/* As mentioned in the discussion within #GH-63:
|
||||
Check for whether the current option is a valid suggestion and replace its value by
|
||||
- the current input string, as IE10+ and EDGE don't do substring, but only prefix matching (#GH-36, #GH-39)
|
||||
- followed by a unique string that should prevent any interferance
|
||||
- and the original string, that is still necessary e.g. for sorting within the suggestions list
|
||||
As the value is being inserted on users selection, we'll replace that one within the upfollowing inputInputListIE function
|
||||
*/
|
||||
option.value = isValidSuggestion(option, inputValue)
|
||||
? inputValue + uniquePolyfillString + originalValue.toLowerCase()
|
||||
: originalValue;
|
||||
});
|
||||
};
|
||||
|
||||
// Check for the input and probably replace by correct options elements value
|
||||
var inputInputListIE = function (event) {
|
||||
var input = event.target,
|
||||
datalist = input.list;
|
||||
|
||||
if (
|
||||
!input.matches('input[list]') ||
|
||||
!input.matches('.' + classNameInput) ||
|
||||
!datalist
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Query for related option - and escaping the value as doublequotes wouldn't work
|
||||
var option = datalist.querySelector(
|
||||
'option[value="' +
|
||||
getInputValue(input).replace(/\\([\s\S])|(")/g, '\\$1$2') +
|
||||
'"]'
|
||||
);
|
||||
|
||||
// We're using .getAttribute instead of .dataset here for IE10-
|
||||
if (option && option.getAttribute('data-originalvalue')) {
|
||||
setInputValue(input, option.getAttribute('data-originalvalue'));
|
||||
}
|
||||
};
|
||||
|
||||
// Check for whether this is a valid suggestion
|
||||
var isValidSuggestion = function (option, inputValue) {
|
||||
var optValue = option.value.toLowerCase(),
|
||||
inptValue = inputValue.toLowerCase(),
|
||||
label = option.getAttribute('label'),
|
||||
text = option.text.toLowerCase();
|
||||
|
||||
/*
|
||||
"Each option element that is a descendant of the datalist element, that is not disabled, and whose value is a string that isn't the empty string, represents a suggestion. Each suggestion has a value and a label."
|
||||
"If appropriate, the user agent should use the suggestion's label and value to identify the suggestion to the user."
|
||||
*/
|
||||
return Boolean(
|
||||
option.disabled === false &&
|
||||
((optValue !== '' && optValue.indexOf(inptValue) !== -1) ||
|
||||
(label && label.toLowerCase().indexOf(inptValue) !== -1) ||
|
||||
(text !== '' && text.indexOf(inptValue) !== -1))
|
||||
);
|
||||
};
|
||||
|
||||
// Focusin and -out events
|
||||
var changesInputList = function (event) {
|
||||
// Check for correct element on this event delegation
|
||||
if (!event.target.matches('input[list]')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var input = event.target,
|
||||
datalist = input.list;
|
||||
|
||||
// Check for whether the events target was an input and still check for an existing instance of the datalist
|
||||
if (input.tagName.toLowerCase() !== 'input' || datalist === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Test for whether this input has already been enhanced by the polyfill
|
||||
if (!input.matches('.' + classNameInput)) {
|
||||
prepareInput(input, event.type);
|
||||
}
|
||||
|
||||
// #GH-49: Microsoft EDGE / datalist popups get "emptied" when receiving focus via tabbing
|
||||
if (isEDGE && event.type === 'focusin') {
|
||||
// Set the value of the first option to it's value - this actually triggers a redraw of the complete list
|
||||
var firstOption = input.list.options[0];
|
||||
|
||||
firstOption.value = firstOption.value;
|
||||
}
|
||||
|
||||
// Break here for IE10+ & EDGE
|
||||
if (isGteIE10 || isEDGE) {
|
||||
return;
|
||||
}
|
||||
|
||||
var // Creating the select if there's no instance so far (e.g. because of that it hasn't been handled or it has been dynamically inserted)
|
||||
datalistSelect =
|
||||
datalist.getElementsByClassName(classNamePolyfillingSelect)[0] ||
|
||||
setUpPolyfillingSelect(input, datalist),
|
||||
// Either have the select set to the state to get displayed in case of that it would have been focused or because it's the target on the inputs blur - and check for general existance of any option as suggestions
|
||||
visible =
|
||||
datalistSelect &&
|
||||
datalistSelect.querySelector('option:not(:disabled)') &&
|
||||
((event.type === 'focusin' && getInputValue(input) !== '') ||
|
||||
(event.relatedTarget && event.relatedTarget === datalistSelect));
|
||||
|
||||
// Toggle the visibility of the datalist select according to previous checks
|
||||
toggleVisibility(visible, datalistSelect);
|
||||
};
|
||||
|
||||
// Prepare the input
|
||||
var prepareInput = function (input, eventType) {
|
||||
// We'd like to prevent autocomplete on the input datalist field
|
||||
input.setAttribute('autocomplete', 'off');
|
||||
|
||||
// WAI ARIA attributes
|
||||
input.setAttribute('role', 'textbox');
|
||||
input.setAttribute('aria-haspopup', 'true');
|
||||
input.setAttribute('aria-autocomplete', 'list');
|
||||
input.setAttribute('aria-owns', input.getAttribute('list'));
|
||||
|
||||
// Bind the keyup event on the related datalists input
|
||||
if (eventType === 'focusin') {
|
||||
input.addEventListener('keyup', inputInputList);
|
||||
|
||||
input.addEventListener('focusout', changesInputList, true);
|
||||
|
||||
// As only EDGE doesn't trigger the input event after selecting an item via mouse, we need to differentiate here
|
||||
if (isGteIE10 || (isEDGE && input.type === 'text')) {
|
||||
input.addEventListener('input', inputInputListIE);
|
||||
}
|
||||
} else if (eventType === 'blur') {
|
||||
input.removeEventListener('keyup', inputInputList);
|
||||
|
||||
input.removeEventListener('focusout', changesInputList, true);
|
||||
|
||||
// As only EDGE doesn't trigger the input event after selecting an item via mouse, we need to differentiate here
|
||||
if (isGteIE10 || (isEDGE && input.type === 'text')) {
|
||||
input.removeEventListener('input', inputInputListIE);
|
||||
}
|
||||
}
|
||||
|
||||
// Add class for identifying that this input is even already being polyfilled
|
||||
input.className += ' ' + classNameInput;
|
||||
};
|
||||
|
||||
// Get the input value for dividing regular and mail types
|
||||
var getInputValue = function (input) {
|
||||
// In case of type=email and multiple attribute, we would need to grab the last piece
|
||||
// Using .getAttribute here for IE9 purpose - elsewhere it wouldn't return the newer HTML5 values correctly
|
||||
return input.getAttribute('type') === 'email' &&
|
||||
input.getAttribute('multiple') !== null
|
||||
? input.value.slice(Math.max(0, input.value.lastIndexOf(',') + 1))
|
||||
: input.value;
|
||||
};
|
||||
|
||||
// Set the input value for dividing regular and mail types
|
||||
var setInputValue = function (input, datalistSelectValue) {
|
||||
var lastSeperator;
|
||||
|
||||
// In case of type=email and multiple attribute, we need to set up the resulting inputs value differently
|
||||
input.value =
|
||||
// Using .getAttribute here for IE9 purpose - elsewhere it wouldn't return the newer HTML5 values correctly
|
||||
input.getAttribute('type') === 'email' &&
|
||||
input.getAttribute('multiple') !== null &&
|
||||
(lastSeperator = input.value.lastIndexOf(',')) > -1
|
||||
? input.value.slice(0, lastSeperator) + ',' + datalistSelectValue
|
||||
: datalistSelectValue;
|
||||
};
|
||||
|
||||
// Binding the focus event - matching the input[list]s happens in the function afterwards
|
||||
dcmnt.addEventListener('focusin', changesInputList, true);
|
||||
|
||||
// Break here for IE10+ & EDGE
|
||||
if (isGteIE10 || isEDGE) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Function for preparing and sorting the options/suggestions
|
||||
var prepOptions = function (datalist, input) {
|
||||
if (typeof obs !== 'undefined') {
|
||||
obs.disconnect();
|
||||
}
|
||||
|
||||
var // Creating the select if there's no instance so far (e.g. because of that it hasn't been handled or it has been dynamically inserted)
|
||||
datalistSelect =
|
||||
datalist.getElementsByClassName(classNamePolyfillingSelect)[0] ||
|
||||
setUpPolyfillingSelect(input, datalist),
|
||||
inputValue = getInputValue(input),
|
||||
newSelectValues = dcmnt.createDocumentFragment(),
|
||||
disabledValues = dcmnt.createDocumentFragment();
|
||||
|
||||
// Create an array out of the options list
|
||||
Array.prototype.slice
|
||||
.call(datalist.querySelectorAll('option:not(:disabled)'))
|
||||
// ... sort all entries and
|
||||
.sort(function (a, b) {
|
||||
var aValue = a.value,
|
||||
bValue = b.value;
|
||||
|
||||
// Using the knowledge that the values are URLs to allow the user to omit the scheme part and perform intelligent matching on the domain name
|
||||
if (input.getAttribute('type') === 'url') {
|
||||
aValue = aValue.replace(/(^\w+:|^)\/\//, '');
|
||||
bValue = bValue.replace(/(^\w+:|^)\/\//, '');
|
||||
}
|
||||
|
||||
return aValue.localeCompare(bValue);
|
||||
})
|
||||
.forEach(function (opt) {
|
||||
var optionValue = opt.value,
|
||||
label = opt.getAttribute('label'),
|
||||
text = opt.text;
|
||||
|
||||
// Put this option into the fragment that is meant to get inserted into the select. Additionally according to the specs ...
|
||||
// TODO: This might get slightly changed/optimized in a future release
|
||||
if (isValidSuggestion(opt, inputValue)) {
|
||||
var textOptionPart = text.slice(
|
||||
0,
|
||||
optionValue.length + textValueSeperator.length
|
||||
),
|
||||
optionPart = optionValue + textValueSeperator;
|
||||
|
||||
// The innertext should be 'value seperator text' in case they are different
|
||||
if (
|
||||
text &&
|
||||
!label &&
|
||||
text !== optionValue &&
|
||||
textOptionPart !== optionPart
|
||||
) {
|
||||
opt.textContent = optionValue + textValueSeperator + text;
|
||||
} else if (!opt.text) {
|
||||
// Manipulating the option inner text, that would get displayed
|
||||
opt.textContent = label || optionValue;
|
||||
}
|
||||
|
||||
newSelectValues.appendChild(opt);
|
||||
} else {
|
||||
// ... or put this option that isn't relevant to the users into the fragment that is supposed to get inserted outside of the select
|
||||
disabledValues.appendChild(opt);
|
||||
}
|
||||
});
|
||||
|
||||
// Input the options fragment into the datalists select
|
||||
datalistSelect.appendChild(newSelectValues);
|
||||
|
||||
var datalistSelectOptionsLength = datalistSelect.options.length;
|
||||
|
||||
datalistSelect.size =
|
||||
datalistSelectOptionsLength > 10 ? 10 : datalistSelectOptionsLength;
|
||||
datalistSelect.multiple = !touched && datalistSelectOptionsLength < 2;
|
||||
|
||||
// Input the unused options as siblings next to the select - and differentiate in between the regular, and the IE9 fix syntax upfront
|
||||
(datalist.getElementsByClassName('ie9_fix')[0] || datalist).appendChild(
|
||||
disabledValues
|
||||
);
|
||||
|
||||
if (typeof obs !== 'undefined') {
|
||||
obs.observe(datalist, {
|
||||
childList: true,
|
||||
});
|
||||
}
|
||||
|
||||
return datalistSelect.options;
|
||||
};
|
||||
|
||||
// Define function for setting up the polyfilling select
|
||||
var setUpPolyfillingSelect = function (input, datalist) {
|
||||
// Check for whether it's of one of the supported input types defined at the beginning
|
||||
// Using .getAttribute here for IE9 purpose - elsewhere it wouldn't return the newer HTML5 values correctly
|
||||
// and still check for an existing instance
|
||||
if (
|
||||
(input.getAttribute('type') &&
|
||||
supportedTypes.indexOf(input.getAttribute('type')) === -1) ||
|
||||
datalist === null
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
var rects = input.getClientRects(),
|
||||
// Measurements
|
||||
inputStyles = window.getComputedStyle(input),
|
||||
datalistSelect = dcmnt.createElement('select');
|
||||
|
||||
// Setting a class for easier identifying that select afterwards
|
||||
datalistSelect.setAttribute('class', classNamePolyfillingSelect);
|
||||
|
||||
// Set general styling related definitions
|
||||
datalistSelect.style.position = 'absolute';
|
||||
|
||||
// Initially hiding the datalist select
|
||||
toggleVisibility(false, datalistSelect);
|
||||
|
||||
// The select itself shouldn't be a possible target for tabbing
|
||||
datalistSelect.setAttribute('tabindex', '-1');
|
||||
|
||||
// WAI ARIA attributes
|
||||
datalistSelect.setAttribute('aria-live', 'polite');
|
||||
datalistSelect.setAttribute('role', 'listbox');
|
||||
if (!touched) {
|
||||
datalistSelect.setAttribute('aria-multiselectable', 'false');
|
||||
}
|
||||
|
||||
// The select should get positioned underneath the input field ...
|
||||
if (inputStyles.getPropertyValue('display') === 'block') {
|
||||
datalistSelect.style.marginTop =
|
||||
'-' + inputStyles.getPropertyValue('margin-bottom');
|
||||
} else {
|
||||
var direction =
|
||||
inputStyles.getPropertyValue('direction') === 'rtl' ? 'right' : 'left';
|
||||
|
||||
datalistSelect.style.setProperty(
|
||||
'margin-' + direction,
|
||||
'-' +
|
||||
(rects[0].width +
|
||||
parseFloat(inputStyles.getPropertyValue('margin-' + direction))) +
|
||||
'px'
|
||||
);
|
||||
datalistSelect.style.marginTop =
|
||||
parseInt(rects[0].height + (input.offsetTop - datalist.offsetTop), 10) +
|
||||
'px';
|
||||
}
|
||||
|
||||
// Set the polyfilling selects border-radius equally to the one by the polyfilled input
|
||||
datalistSelect.style.borderRadius = inputStyles.getPropertyValue(
|
||||
'border-radius'
|
||||
);
|
||||
datalistSelect.style.minWidth = rects[0].width + 'px';
|
||||
|
||||
if (touched) {
|
||||
var messageElement = dcmnt.createElement('option');
|
||||
|
||||
// ... and it's first entry should contain the localized message to select an entry
|
||||
messageElement.textContent = datalist.title;
|
||||
// ... and disable this option, as it shouldn't get selected by the user
|
||||
messageElement.disabled = true;
|
||||
// ... and assign a dividable class to it
|
||||
messageElement.setAttribute('class', 'message');
|
||||
// ... and finally insert it into the select
|
||||
datalistSelect.appendChild(messageElement);
|
||||
}
|
||||
|
||||
// Add select to datalist element ...
|
||||
datalist.appendChild(datalistSelect);
|
||||
|
||||
// ... and our upfollowing functions to the related event
|
||||
if (touched) {
|
||||
datalistSelect.addEventListener('change', changeDataListSelect);
|
||||
} else {
|
||||
datalistSelect.addEventListener('click', changeDataListSelect);
|
||||
}
|
||||
|
||||
datalistSelect.addEventListener('blur', changeDataListSelect);
|
||||
datalistSelect.addEventListener('keydown', changeDataListSelect);
|
||||
datalistSelect.addEventListener('keypress', datalistSelectKeyPress);
|
||||
|
||||
return datalistSelect;
|
||||
};
|
||||
|
||||
// Functions regarding changes to the datalist polyfilling created selects keypress
|
||||
var datalistSelectKeyPress = function (event) {
|
||||
var datalistSelect = event.target,
|
||||
datalist = datalistSelect.parentNode,
|
||||
input = dcmnt.querySelector('input[list="' + datalist.id + '"]');
|
||||
|
||||
// Check for whether the events target was a select or whether the input doesn't exist
|
||||
if (datalistSelect.tagName.toLowerCase() !== 'select' || input === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine a relevant key - either printable characters (that would have a length of 1) or controlling like Backspace
|
||||
if (event.key && (event.key === 'Backspace' || event.key.length === 1)) {
|
||||
input.focus();
|
||||
|
||||
if (event.key === 'Backspace') {
|
||||
input.value = input.value.slice(0, -1);
|
||||
|
||||
// Dispatch the input event on the related input[list]
|
||||
dispatchInputEvent(input);
|
||||
} else {
|
||||
input.value += event.key;
|
||||
}
|
||||
|
||||
prepOptions(datalist, input);
|
||||
}
|
||||
};
|
||||
|
||||
// Change, Click, Blur, Keydown
|
||||
var changeDataListSelect = function (event) {
|
||||
var datalistSelect = event.currentTarget,
|
||||
datalist = datalistSelect.parentNode,
|
||||
input = dcmnt.querySelector('input[list="' + datalist.id + '"]');
|
||||
|
||||
// Check for whether the events target was a select or whether the input doesn't exist
|
||||
if (datalistSelect.tagName.toLowerCase() !== 'select' || input === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
var eventType = event.type,
|
||||
// ENTER and ESC
|
||||
visible =
|
||||
eventType === 'keydown' &&
|
||||
event.keyCode !== keyENTER &&
|
||||
event.keyCode !== keyESC;
|
||||
|
||||
// On change, click or after pressing ENTER or TAB key, input the selects value into the input on a change within the list
|
||||
if (
|
||||
(eventType === 'change' ||
|
||||
eventType === 'click' ||
|
||||
(eventType === 'keydown' &&
|
||||
(event.keyCode === keyENTER || event.key === 'Tab'))) &&
|
||||
datalistSelect.value.length > 0 &&
|
||||
datalistSelect.value !== datalist.title
|
||||
) {
|
||||
setInputValue(input, datalistSelect.value);
|
||||
|
||||
// Dispatch the input event on the related input[list]
|
||||
dispatchInputEvent(input);
|
||||
|
||||
// Finally focusing the input, as other browser do this as well
|
||||
if (event.key !== 'Tab') {
|
||||
input.focus();
|
||||
}
|
||||
|
||||
// #GH-51 / Prevent the form to be submitted on selecting a value via ENTER key within the select
|
||||
if (event.keyCode === keyENTER) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
// Set the visibility to false afterwards, as we're done here
|
||||
visible = false;
|
||||
} else if (eventType === 'keydown' && event.keyCode === keyESC) {
|
||||
// In case of the ESC key being pressed, we still want to focus the input[list]
|
||||
input.focus();
|
||||
}
|
||||
|
||||
// Toggle the visibility of the datalist select according to previous checks
|
||||
toggleVisibility(visible, datalistSelect);
|
||||
};
|
||||
|
||||
// Create and dispatch the input event; divided for IE9 usage
|
||||
var dispatchInputEvent = function (input) {
|
||||
var evt;
|
||||
|
||||
if (typeof Event === 'function') {
|
||||
evt = new Event('input', {
|
||||
bubbles: true,
|
||||
});
|
||||
} else {
|
||||
evt = dcmnt.createEvent('Event');
|
||||
evt.initEvent('input', true, false);
|
||||
}
|
||||
|
||||
input.dispatchEvent(evt);
|
||||
};
|
||||
|
||||
// Toggle the visibility of the datalist select
|
||||
var toggleVisibility = function (visible, datalistSelect) {
|
||||
if (visible) {
|
||||
datalistSelect.removeAttribute('hidden');
|
||||
} else {
|
||||
datalistSelect.setAttributeNode(dcmnt.createAttribute('hidden'));
|
||||
}
|
||||
|
||||
datalistSelect.setAttribute('aria-hidden', (!visible).toString());
|
||||
};
|
||||
|
||||
// Emulate the two properties regarding the datalist and input elements
|
||||
// list property / https://developer.mozilla.org/en/docs/Web/API/HTMLInputElement
|
||||
(function (constructor) {
|
||||
if (
|
||||
constructor &&
|
||||
constructor.prototype &&
|
||||
constructor.prototype.list === undefined
|
||||
) {
|
||||
Object.defineProperty(constructor.prototype, 'list', {
|
||||
get: function () {
|
||||
/*
|
||||
According to the specs ...
|
||||
"The list IDL attribute must return the current suggestions source element, if any, or null otherwise."
|
||||
"If there is no list attribute, or if there is no element with that ID, or if the first element with that ID is not a datalist element, then there is no suggestions source element."
|
||||
*/
|
||||
var element = dcmnt.getElementById(this.getAttribute('list'));
|
||||
|
||||
return typeof this === 'object' &&
|
||||
this instanceof constructor &&
|
||||
element &&
|
||||
element.matches('datalist')
|
||||
? element
|
||||
: null;
|
||||
},
|
||||
});
|
||||
}
|
||||
})(window.HTMLInputElement);
|
||||
|
||||
// Options property / https://developer.mozilla.org/en/docs/Web/API/HTMLDataListElement
|
||||
(function (constructor) {
|
||||
if (
|
||||
constructor &&
|
||||
constructor.prototype &&
|
||||
constructor.prototype.options === undefined
|
||||
) {
|
||||
Object.defineProperty(constructor.prototype, 'options', {
|
||||
get: function () {
|
||||
return typeof this === 'object' && this instanceof constructor
|
||||
? this.getElementsByTagName('option')
|
||||
: null;
|
||||
},
|
||||
});
|
||||
}
|
||||
})(window.HTMLElement);
|
||||
})();
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/* Dialog Polyfill (https://github.com/GoogleChrome/dialog-polyfill/blob/master/dist/dialog-polyfill.css) */
|
||||
dialog {
|
||||
position: absolute;
|
||||
left: 0; right: 0;
|
||||
width: -moz-fit-content;
|
||||
width: -webkit-fit-content;
|
||||
width: fit-content;
|
||||
height: -moz-fit-content;
|
||||
height: -webkit-fit-content;
|
||||
height: fit-content;
|
||||
margin: auto;
|
||||
border: solid;
|
||||
padding: 1em;
|
||||
background: white;
|
||||
color: black;
|
||||
display: block;
|
||||
}
|
||||
|
||||
dialog:not([open]) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
dialog + .backdrop {
|
||||
position: fixed;
|
||||
top: 0; right: 0; bottom: 0; left: 0;
|
||||
background: rgba(0,0,0,0.6);
|
||||
}
|
||||
|
||||
._dialog_overlay {
|
||||
position: fixed;
|
||||
top: 0; right: 0; bottom: 0; left: 0;
|
||||
}
|
||||
|
||||
dialog.fixed {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
|
||||
@@ -1,866 +0,0 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = global || self, global.dialogPolyfill = factory());
|
||||
}(this, function () { 'use strict';
|
||||
|
||||
// nb. This is for IE10 and lower _only_.
|
||||
var supportCustomEvent = window.CustomEvent;
|
||||
if (!supportCustomEvent || typeof supportCustomEvent === 'object') {
|
||||
supportCustomEvent = function CustomEvent(event, x) {
|
||||
x = x || {};
|
||||
var ev = document.createEvent('CustomEvent');
|
||||
ev.initCustomEvent(event, !!x.bubbles, !!x.cancelable, x.detail || null);
|
||||
return ev;
|
||||
};
|
||||
supportCustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dispatches the passed event to both an "on<type>" handler as well as via the
|
||||
* normal dispatch operation. Does not bubble.
|
||||
*
|
||||
* @param {!EventTarget} target
|
||||
* @param {!Event} event
|
||||
* @return {boolean}
|
||||
*/
|
||||
function safeDispatchEvent(target, event) {
|
||||
var check = 'on' + event.type.toLowerCase();
|
||||
if (typeof target[check] === 'function') {
|
||||
target[check](event);
|
||||
}
|
||||
return target.dispatchEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} el to check for stacking context
|
||||
* @return {boolean} whether this el or its parents creates a stacking context
|
||||
*/
|
||||
function createsStackingContext(el) {
|
||||
while (el && el !== document.body) {
|
||||
var s = window.getComputedStyle(el);
|
||||
var invalid = function(k, ok) {
|
||||
return !(s[k] === undefined || s[k] === ok);
|
||||
};
|
||||
|
||||
if (s.opacity < 1 ||
|
||||
invalid('zIndex', 'auto') ||
|
||||
invalid('transform', 'none') ||
|
||||
invalid('mixBlendMode', 'normal') ||
|
||||
invalid('filter', 'none') ||
|
||||
invalid('perspective', 'none') ||
|
||||
s['isolation'] === 'isolate' ||
|
||||
s.position === 'fixed' ||
|
||||
s.webkitOverflowScrolling === 'touch') {
|
||||
return true;
|
||||
}
|
||||
el = el.parentElement;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the nearest <dialog> from the passed element.
|
||||
*
|
||||
* @param {Element} el to search from
|
||||
* @return {HTMLDialogElement} dialog found
|
||||
*/
|
||||
function findNearestDialog(el) {
|
||||
while (el) {
|
||||
if (el.localName === 'dialog') {
|
||||
return /** @type {HTMLDialogElement} */ (el);
|
||||
}
|
||||
if (el.parentElement) {
|
||||
el = el.parentElement;
|
||||
} else if (el.parentNode) {
|
||||
el = el.parentNode.host;
|
||||
} else {
|
||||
el = null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Blur the specified element, as long as it's not the HTML body element.
|
||||
* This works around an IE9/10 bug - blurring the body causes Windows to
|
||||
* blur the whole application.
|
||||
*
|
||||
* @param {Element} el to blur
|
||||
*/
|
||||
function safeBlur(el) {
|
||||
// Find the actual focused element when the active element is inside a shadow root
|
||||
while (el && el.shadowRoot && el.shadowRoot.activeElement) {
|
||||
el = el.shadowRoot.activeElement;
|
||||
}
|
||||
|
||||
if (el && el.blur && el !== document.body) {
|
||||
el.blur();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {!NodeList} nodeList to search
|
||||
* @param {Node} node to find
|
||||
* @return {boolean} whether node is inside nodeList
|
||||
*/
|
||||
function inNodeList(nodeList, node) {
|
||||
for (var i = 0; i < nodeList.length; ++i) {
|
||||
if (nodeList[i] === node) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {HTMLFormElement} el to check
|
||||
* @return {boolean} whether this form has method="dialog"
|
||||
*/
|
||||
function isFormMethodDialog(el) {
|
||||
if (!el || !el.hasAttribute('method')) {
|
||||
return false;
|
||||
}
|
||||
return el.getAttribute('method').toLowerCase() === 'dialog';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {!DocumentFragment|!Element} hostElement
|
||||
* @return {?Element}
|
||||
*/
|
||||
function findFocusableElementWithin(hostElement) {
|
||||
// Note that this is 'any focusable area'. This list is probably not exhaustive, but the
|
||||
// alternative involves stepping through and trying to focus everything.
|
||||
var opts = ['button', 'input', 'keygen', 'select', 'textarea'];
|
||||
var query = opts.map(function(el) {
|
||||
return el + ':not([disabled])';
|
||||
});
|
||||
// TODO(samthor): tabindex values that are not numeric are not focusable.
|
||||
query.push('[tabindex]:not([disabled]):not([tabindex=""])'); // tabindex != "", not disabled
|
||||
var target = hostElement.querySelector(query.join(', '));
|
||||
|
||||
if (!target && 'attachShadow' in Element.prototype) {
|
||||
// If we haven't found a focusable target, see if the host element contains an element
|
||||
// which has a shadowRoot.
|
||||
// Recursively search for the first focusable item in shadow roots.
|
||||
var elems = hostElement.querySelectorAll('*');
|
||||
for (var i = 0; i < elems.length; i++) {
|
||||
if (elems[i].tagName && elems[i].shadowRoot) {
|
||||
target = findFocusableElementWithin(elems[i].shadowRoot);
|
||||
if (target) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if an element is attached to the DOM.
|
||||
* @param {Element} element to check
|
||||
* @return {boolean} whether the element is in DOM
|
||||
*/
|
||||
function isConnected(element) {
|
||||
return element.isConnected || document.body.contains(element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {!Event} event
|
||||
* @return {?Element}
|
||||
*/
|
||||
function findFormSubmitter(event) {
|
||||
if (event.submitter) {
|
||||
return event.submitter;
|
||||
}
|
||||
|
||||
var form = event.target;
|
||||
if (!(form instanceof HTMLFormElement)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var submitter = dialogPolyfill.formSubmitter;
|
||||
if (!submitter) {
|
||||
var target = event.target;
|
||||
var root = ('getRootNode' in target && target.getRootNode() || document);
|
||||
submitter = root.activeElement;
|
||||
}
|
||||
|
||||
if (!submitter || submitter.form !== form) {
|
||||
return null;
|
||||
}
|
||||
return submitter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {!Event} event
|
||||
*/
|
||||
function maybeHandleSubmit(event) {
|
||||
if (event.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
var form = /** @type {!HTMLFormElement} */ (event.target);
|
||||
|
||||
// We'd have a value if we clicked on an imagemap.
|
||||
var value = dialogPolyfill.imagemapUseValue;
|
||||
var submitter = findFormSubmitter(event);
|
||||
if (value === null && submitter) {
|
||||
value = submitter.value;
|
||||
}
|
||||
|
||||
// There should always be a dialog as this handler is added specifically on them, but check just
|
||||
// in case.
|
||||
var dialog = findNearestDialog(form);
|
||||
if (!dialog) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Prefer formmethod on the button.
|
||||
var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');
|
||||
if (formmethod !== 'dialog') {
|
||||
return;
|
||||
}
|
||||
event.preventDefault();
|
||||
|
||||
if (value != null) {
|
||||
// nb. we explicitly check against null/undefined
|
||||
dialog.close(value);
|
||||
} else {
|
||||
dialog.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {!HTMLDialogElement} dialog to upgrade
|
||||
* @constructor
|
||||
*/
|
||||
function dialogPolyfillInfo(dialog) {
|
||||
this.dialog_ = dialog;
|
||||
this.replacedStyleTop_ = false;
|
||||
this.openAsModal_ = false;
|
||||
|
||||
// Set a11y role. Browsers that support dialog implicitly know this already.
|
||||
if (!dialog.hasAttribute('role')) {
|
||||
dialog.setAttribute('role', 'dialog');
|
||||
}
|
||||
|
||||
dialog.show = this.show.bind(this);
|
||||
dialog.showModal = this.showModal.bind(this);
|
||||
dialog.close = this.close.bind(this);
|
||||
|
||||
dialog.addEventListener('submit', maybeHandleSubmit, false);
|
||||
|
||||
if (!('returnValue' in dialog)) {
|
||||
dialog.returnValue = '';
|
||||
}
|
||||
|
||||
if ('MutationObserver' in window) {
|
||||
var mo = new MutationObserver(this.maybeHideModal.bind(this));
|
||||
mo.observe(dialog, {attributes: true, attributeFilter: ['open']});
|
||||
} else {
|
||||
// IE10 and below support. Note that DOMNodeRemoved etc fire _before_ removal. They also
|
||||
// seem to fire even if the element was removed as part of a parent removal. Use the removed
|
||||
// events to force downgrade (useful if removed/immediately added).
|
||||
var removed = false;
|
||||
var cb = function() {
|
||||
removed ? this.downgradeModal() : this.maybeHideModal();
|
||||
removed = false;
|
||||
}.bind(this);
|
||||
var timeout;
|
||||
var delayModel = function(ev) {
|
||||
if (ev.target !== dialog) { return; } // not for a child element
|
||||
var cand = 'DOMNodeRemoved';
|
||||
removed |= (ev.type.substr(0, cand.length) === cand);
|
||||
window.clearTimeout(timeout);
|
||||
timeout = window.setTimeout(cb, 0);
|
||||
};
|
||||
['DOMAttrModified', 'DOMNodeRemoved', 'DOMNodeRemovedFromDocument'].forEach(function(name) {
|
||||
dialog.addEventListener(name, delayModel);
|
||||
});
|
||||
}
|
||||
// Note that the DOM is observed inside DialogManager while any dialog
|
||||
// is being displayed as a modal, to catch modal removal from the DOM.
|
||||
|
||||
Object.defineProperty(dialog, 'open', {
|
||||
set: this.setOpen.bind(this),
|
||||
get: dialog.hasAttribute.bind(dialog, 'open')
|
||||
});
|
||||
|
||||
this.backdrop_ = document.createElement('div');
|
||||
this.backdrop_.className = 'backdrop';
|
||||
this.backdrop_.addEventListener('mouseup' , this.backdropMouseEvent_.bind(this));
|
||||
this.backdrop_.addEventListener('mousedown', this.backdropMouseEvent_.bind(this));
|
||||
this.backdrop_.addEventListener('click' , this.backdropMouseEvent_.bind(this));
|
||||
}
|
||||
|
||||
dialogPolyfillInfo.prototype = /** @type {HTMLDialogElement.prototype} */ ({
|
||||
|
||||
get dialog() {
|
||||
return this.dialog_;
|
||||
},
|
||||
|
||||
/**
|
||||
* Maybe remove this dialog from the modal top layer. This is called when
|
||||
* a modal dialog may no longer be tenable, e.g., when the dialog is no
|
||||
* longer open or is no longer part of the DOM.
|
||||
*/
|
||||
maybeHideModal: function() {
|
||||
if (this.dialog_.hasAttribute('open') && isConnected(this.dialog_)) { return; }
|
||||
this.downgradeModal();
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove this dialog from the modal top layer, leaving it as a non-modal.
|
||||
*/
|
||||
downgradeModal: function() {
|
||||
if (!this.openAsModal_) { return; }
|
||||
this.openAsModal_ = false;
|
||||
this.dialog_.style.zIndex = '';
|
||||
|
||||
// This won't match the native <dialog> exactly because if the user set top on a centered
|
||||
// polyfill dialog, that top gets thrown away when the dialog is closed. Not sure it's
|
||||
// possible to polyfill this perfectly.
|
||||
if (this.replacedStyleTop_) {
|
||||
this.dialog_.style.top = '';
|
||||
this.replacedStyleTop_ = false;
|
||||
}
|
||||
|
||||
// Clear the backdrop and remove from the manager.
|
||||
this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_);
|
||||
dialogPolyfill.dm.removeDialog(this);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {boolean} value whether to open or close this dialog
|
||||
*/
|
||||
setOpen: function(value) {
|
||||
if (value) {
|
||||
this.dialog_.hasAttribute('open') || this.dialog_.setAttribute('open', '');
|
||||
} else {
|
||||
this.dialog_.removeAttribute('open');
|
||||
this.maybeHideModal(); // nb. redundant with MutationObserver
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles mouse events ('mouseup', 'mousedown', 'click') on the fake .backdrop element, redirecting them as if
|
||||
* they were on the dialog itself.
|
||||
*
|
||||
* @param {!Event} e to redirect
|
||||
*/
|
||||
backdropMouseEvent_: function(e) {
|
||||
if (!this.dialog_.hasAttribute('tabindex')) {
|
||||
// Clicking on the backdrop should move the implicit cursor, even if dialog cannot be
|
||||
// focused. Create a fake thing to focus on. If the backdrop was _before_ the dialog, this
|
||||
// would not be needed - clicks would move the implicit cursor there.
|
||||
var fake = document.createElement('div');
|
||||
this.dialog_.insertBefore(fake, this.dialog_.firstChild);
|
||||
fake.tabIndex = -1;
|
||||
fake.focus();
|
||||
this.dialog_.removeChild(fake);
|
||||
} else {
|
||||
this.dialog_.focus();
|
||||
}
|
||||
|
||||
var redirectedEvent = document.createEvent('MouseEvents');
|
||||
redirectedEvent.initMouseEvent(e.type, e.bubbles, e.cancelable, window,
|
||||
e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey,
|
||||
e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
|
||||
this.dialog_.dispatchEvent(redirectedEvent);
|
||||
e.stopPropagation();
|
||||
},
|
||||
|
||||
/**
|
||||
* Focuses on the first focusable element within the dialog. This will always blur the current
|
||||
* focus, even if nothing within the dialog is found.
|
||||
*/
|
||||
focus_: function() {
|
||||
// Find element with `autofocus` attribute, or fall back to the first form/tabindex control.
|
||||
var target = this.dialog_.querySelector('[autofocus]:not([disabled])');
|
||||
if (!target && this.dialog_.tabIndex >= 0) {
|
||||
target = this.dialog_;
|
||||
}
|
||||
if (!target) {
|
||||
target = findFocusableElementWithin(this.dialog_);
|
||||
}
|
||||
safeBlur(document.activeElement);
|
||||
target && target.focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the zIndex for the backdrop and dialog.
|
||||
*
|
||||
* @param {number} dialogZ
|
||||
* @param {number} backdropZ
|
||||
*/
|
||||
updateZIndex: function(dialogZ, backdropZ) {
|
||||
if (dialogZ < backdropZ) {
|
||||
throw new Error('dialogZ should never be < backdropZ');
|
||||
}
|
||||
this.dialog_.style.zIndex = dialogZ;
|
||||
this.backdrop_.style.zIndex = backdropZ;
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the dialog. If the dialog is already open, this does nothing.
|
||||
*/
|
||||
show: function() {
|
||||
if (!this.dialog_.open) {
|
||||
this.setOpen(true);
|
||||
this.focus_();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Show this dialog modally.
|
||||
*/
|
||||
showModal: function() {
|
||||
if (this.dialog_.hasAttribute('open')) {
|
||||
throw new Error('Failed to execute \'showModal\' on dialog: The element is already open, and therefore cannot be opened modally.');
|
||||
}
|
||||
if (!isConnected(this.dialog_)) {
|
||||
throw new Error('Failed to execute \'showModal\' on dialog: The element is not in a Document.');
|
||||
}
|
||||
if (!dialogPolyfill.dm.pushDialog(this)) {
|
||||
throw new Error('Failed to execute \'showModal\' on dialog: There are too many open modal dialogs.');
|
||||
}
|
||||
|
||||
if (createsStackingContext(this.dialog_.parentElement)) {
|
||||
console.warn('A dialog is being shown inside a stacking context. ' +
|
||||
'This may cause it to be unusable. For more information, see this link: ' +
|
||||
'https://github.com/GoogleChrome/dialog-polyfill/#stacking-context');
|
||||
}
|
||||
|
||||
this.setOpen(true);
|
||||
this.openAsModal_ = true;
|
||||
|
||||
// Optionally center vertically, relative to the current viewport.
|
||||
if (dialogPolyfill.needsCentering(this.dialog_)) {
|
||||
dialogPolyfill.reposition(this.dialog_);
|
||||
this.replacedStyleTop_ = true;
|
||||
} else {
|
||||
this.replacedStyleTop_ = false;
|
||||
}
|
||||
|
||||
// Insert backdrop.
|
||||
this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling);
|
||||
|
||||
// Focus on whatever inside the dialog.
|
||||
this.focus_();
|
||||
},
|
||||
|
||||
/**
|
||||
* Closes this HTMLDialogElement. This is optional vs clearing the open
|
||||
* attribute, however this fires a 'close' event.
|
||||
*
|
||||
* @param {string=} opt_returnValue to use as the returnValue
|
||||
*/
|
||||
close: function(opt_returnValue) {
|
||||
if (!this.dialog_.hasAttribute('open')) {
|
||||
throw new Error('Failed to execute \'close\' on dialog: The element does not have an \'open\' attribute, and therefore cannot be closed.');
|
||||
}
|
||||
this.setOpen(false);
|
||||
|
||||
// Leave returnValue untouched in case it was set directly on the element
|
||||
if (opt_returnValue !== undefined) {
|
||||
this.dialog_.returnValue = opt_returnValue;
|
||||
}
|
||||
|
||||
// Triggering "close" event for any attached listeners on the <dialog>.
|
||||
var closeEvent = new supportCustomEvent('close', {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
});
|
||||
safeDispatchEvent(this.dialog_, closeEvent);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var dialogPolyfill = {};
|
||||
|
||||
dialogPolyfill.reposition = function(element) {
|
||||
var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
|
||||
var topValue = scrollTop + (window.innerHeight - element.offsetHeight) / 2;
|
||||
element.style.top = Math.max(scrollTop, topValue) + 'px';
|
||||
};
|
||||
|
||||
dialogPolyfill.isInlinePositionSetByStylesheet = function(element) {
|
||||
for (var i = 0; i < document.styleSheets.length; ++i) {
|
||||
var styleSheet = document.styleSheets[i];
|
||||
var cssRules = null;
|
||||
// Some browsers throw on cssRules.
|
||||
try {
|
||||
cssRules = styleSheet.cssRules;
|
||||
} catch (e) {}
|
||||
if (!cssRules) { continue; }
|
||||
for (var j = 0; j < cssRules.length; ++j) {
|
||||
var rule = cssRules[j];
|
||||
var selectedNodes = null;
|
||||
// Ignore errors on invalid selector texts.
|
||||
try {
|
||||
selectedNodes = document.querySelectorAll(rule.selectorText);
|
||||
} catch(e) {}
|
||||
if (!selectedNodes || !inNodeList(selectedNodes, element)) {
|
||||
continue;
|
||||
}
|
||||
var cssTop = rule.style.getPropertyValue('top');
|
||||
var cssBottom = rule.style.getPropertyValue('bottom');
|
||||
if ((cssTop && cssTop !== 'auto') || (cssBottom && cssBottom !== 'auto')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
dialogPolyfill.needsCentering = function(dialog) {
|
||||
var computedStyle = window.getComputedStyle(dialog);
|
||||
if (computedStyle.position !== 'absolute') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We must determine whether the top/bottom specified value is non-auto. In
|
||||
// WebKit/Blink, checking computedStyle.top == 'auto' is sufficient, but
|
||||
// Firefox returns the used value. So we do this crazy thing instead: check
|
||||
// the inline style and then go through CSS rules.
|
||||
if ((dialog.style.top !== 'auto' && dialog.style.top !== '') ||
|
||||
(dialog.style.bottom !== 'auto' && dialog.style.bottom !== '')) {
|
||||
return false;
|
||||
}
|
||||
return !dialogPolyfill.isInlinePositionSetByStylesheet(dialog);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {!Element} element to force upgrade
|
||||
*/
|
||||
dialogPolyfill.forceRegisterDialog = function(element) {
|
||||
if (window.HTMLDialogElement || element.showModal) {
|
||||
console.warn('This browser already supports <dialog>, the polyfill ' +
|
||||
'may not work correctly', element);
|
||||
}
|
||||
if (element.localName !== 'dialog') {
|
||||
throw new Error('Failed to register dialog: The element is not a dialog.');
|
||||
}
|
||||
new dialogPolyfillInfo(/** @type {!HTMLDialogElement} */ (element));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {!Element} element to upgrade, if necessary
|
||||
*/
|
||||
dialogPolyfill.registerDialog = function(element) {
|
||||
if (!element.showModal) {
|
||||
dialogPolyfill.forceRegisterDialog(element);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
dialogPolyfill.DialogManager = function() {
|
||||
/** @type {!Array<!dialogPolyfillInfo>} */
|
||||
this.pendingDialogStack = [];
|
||||
|
||||
var checkDOM = this.checkDOM_.bind(this);
|
||||
|
||||
// The overlay is used to simulate how a modal dialog blocks the document.
|
||||
// The blocking dialog is positioned on top of the overlay, and the rest of
|
||||
// the dialogs on the pending dialog stack are positioned below it. In the
|
||||
// actual implementation, the modal dialog stacking is controlled by the
|
||||
// top layer, where z-index has no effect.
|
||||
this.overlay = document.createElement('div');
|
||||
this.overlay.className = '_dialog_overlay';
|
||||
this.overlay.addEventListener('click', function(e) {
|
||||
this.forwardTab_ = undefined;
|
||||
e.stopPropagation();
|
||||
checkDOM([]); // sanity-check DOM
|
||||
}.bind(this));
|
||||
|
||||
this.handleKey_ = this.handleKey_.bind(this);
|
||||
this.handleFocus_ = this.handleFocus_.bind(this);
|
||||
|
||||
this.zIndexLow_ = 100000;
|
||||
this.zIndexHigh_ = 100000 + 150;
|
||||
|
||||
this.forwardTab_ = undefined;
|
||||
|
||||
if ('MutationObserver' in window) {
|
||||
this.mo_ = new MutationObserver(function(records) {
|
||||
var removed = [];
|
||||
records.forEach(function(rec) {
|
||||
for (var i = 0, c; c = rec.removedNodes[i]; ++i) {
|
||||
if (!(c instanceof Element)) {
|
||||
continue;
|
||||
} else if (c.localName === 'dialog') {
|
||||
removed.push(c);
|
||||
}
|
||||
removed = removed.concat(c.querySelectorAll('dialog'));
|
||||
}
|
||||
});
|
||||
removed.length && checkDOM(removed);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Called on the first modal dialog being shown. Adds the overlay and related
|
||||
* handlers.
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.blockDocument = function() {
|
||||
document.documentElement.addEventListener('focus', this.handleFocus_, true);
|
||||
document.addEventListener('keydown', this.handleKey_);
|
||||
this.mo_ && this.mo_.observe(document, {childList: true, subtree: true});
|
||||
};
|
||||
|
||||
/**
|
||||
* Called on the first modal dialog being removed, i.e., when no more modal
|
||||
* dialogs are visible.
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.unblockDocument = function() {
|
||||
document.documentElement.removeEventListener('focus', this.handleFocus_, true);
|
||||
document.removeEventListener('keydown', this.handleKey_);
|
||||
this.mo_ && this.mo_.disconnect();
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the stacking of all known dialogs.
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.updateStacking = function() {
|
||||
var zIndex = this.zIndexHigh_;
|
||||
|
||||
for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {
|
||||
dpi.updateZIndex(--zIndex, --zIndex);
|
||||
if (i === 0) {
|
||||
this.overlay.style.zIndex = --zIndex;
|
||||
}
|
||||
}
|
||||
|
||||
// Make the overlay a sibling of the dialog itself.
|
||||
var last = this.pendingDialogStack[0];
|
||||
if (last) {
|
||||
var p = last.dialog.parentNode || document.body;
|
||||
p.appendChild(this.overlay);
|
||||
} else if (this.overlay.parentNode) {
|
||||
this.overlay.parentNode.removeChild(this.overlay);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Element} candidate to check if contained or is the top-most modal dialog
|
||||
* @return {boolean} whether candidate is contained in top dialog
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.containedByTopDialog_ = function(candidate) {
|
||||
while (candidate = findNearestDialog(candidate)) {
|
||||
for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {
|
||||
if (dpi.dialog === candidate) {
|
||||
return i === 0; // only valid if top-most
|
||||
}
|
||||
}
|
||||
candidate = candidate.parentElement;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
dialogPolyfill.DialogManager.prototype.handleFocus_ = function(event) {
|
||||
var target = event.composedPath ? event.composedPath()[0] : event.target;
|
||||
|
||||
if (this.containedByTopDialog_(target)) { return; }
|
||||
|
||||
if (document.activeElement === document.documentElement) { return; }
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
safeBlur(/** @type {Element} */ (target));
|
||||
|
||||
if (this.forwardTab_ === undefined) { return; } // move focus only from a tab key
|
||||
|
||||
var dpi = this.pendingDialogStack[0];
|
||||
var dialog = dpi.dialog;
|
||||
var position = dialog.compareDocumentPosition(target);
|
||||
if (position & Node.DOCUMENT_POSITION_PRECEDING) {
|
||||
if (this.forwardTab_) {
|
||||
// forward
|
||||
dpi.focus_();
|
||||
} else if (target !== document.documentElement) {
|
||||
// backwards if we're not already focused on <html>
|
||||
document.documentElement.focus();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
dialogPolyfill.DialogManager.prototype.handleKey_ = function(event) {
|
||||
this.forwardTab_ = undefined;
|
||||
if (event.keyCode === 27) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var cancelEvent = new supportCustomEvent('cancel', {
|
||||
bubbles: false,
|
||||
cancelable: true
|
||||
});
|
||||
var dpi = this.pendingDialogStack[0];
|
||||
if (dpi && safeDispatchEvent(dpi.dialog, cancelEvent)) {
|
||||
dpi.dialog.close();
|
||||
}
|
||||
} else if (event.keyCode === 9) {
|
||||
this.forwardTab_ = !event.shiftKey;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Finds and downgrades any known modal dialogs that are no longer displayed. Dialogs that are
|
||||
* removed and immediately readded don't stay modal, they become normal.
|
||||
*
|
||||
* @param {!Array<!HTMLDialogElement>} removed that have definitely been removed
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.checkDOM_ = function(removed) {
|
||||
// This operates on a clone because it may cause it to change. Each change also calls
|
||||
// updateStacking, which only actually needs to happen once. But who removes many modal dialogs
|
||||
// at a time?!
|
||||
var clone = this.pendingDialogStack.slice();
|
||||
clone.forEach(function(dpi) {
|
||||
if (removed.indexOf(dpi.dialog) !== -1) {
|
||||
dpi.downgradeModal();
|
||||
} else {
|
||||
dpi.maybeHideModal();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {!dialogPolyfillInfo} dpi
|
||||
* @return {boolean} whether the dialog was allowed
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.pushDialog = function(dpi) {
|
||||
var allowed = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;
|
||||
if (this.pendingDialogStack.length >= allowed) {
|
||||
return false;
|
||||
}
|
||||
if (this.pendingDialogStack.unshift(dpi) === 1) {
|
||||
this.blockDocument();
|
||||
}
|
||||
this.updateStacking();
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {!dialogPolyfillInfo} dpi
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.removeDialog = function(dpi) {
|
||||
var index = this.pendingDialogStack.indexOf(dpi);
|
||||
if (index === -1) { return; }
|
||||
|
||||
this.pendingDialogStack.splice(index, 1);
|
||||
if (this.pendingDialogStack.length === 0) {
|
||||
this.unblockDocument();
|
||||
}
|
||||
this.updateStacking();
|
||||
};
|
||||
|
||||
dialogPolyfill.dm = new dialogPolyfill.DialogManager();
|
||||
dialogPolyfill.formSubmitter = null;
|
||||
dialogPolyfill.imagemapUseValue = null;
|
||||
|
||||
/**
|
||||
* Installs global handlers, such as click listers and native method overrides. These are needed
|
||||
* even if a no dialog is registered, as they deal with <form method="dialog">.
|
||||
*/
|
||||
if (window.HTMLDialogElement === undefined) {
|
||||
|
||||
/**
|
||||
* If HTMLFormElement translates method="DIALOG" into 'get', then replace the descriptor with
|
||||
* one that returns the correct value.
|
||||
*/
|
||||
var testForm = document.createElement('form');
|
||||
testForm.setAttribute('method', 'dialog');
|
||||
if (testForm.method !== 'dialog') {
|
||||
var methodDescriptor = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, 'method');
|
||||
if (methodDescriptor) {
|
||||
// nb. Some older iOS and older PhantomJS fail to return the descriptor. Don't do anything
|
||||
// and don't bother to update the element.
|
||||
var realGet = methodDescriptor.get;
|
||||
methodDescriptor.get = function() {
|
||||
if (isFormMethodDialog(this)) {
|
||||
return 'dialog';
|
||||
}
|
||||
return realGet.call(this);
|
||||
};
|
||||
var realSet = methodDescriptor.set;
|
||||
/** @this {HTMLElement} */
|
||||
methodDescriptor.set = function(v) {
|
||||
if (typeof v === 'string' && v.toLowerCase() === 'dialog') {
|
||||
return this.setAttribute('method', v);
|
||||
}
|
||||
return realSet.call(this, v);
|
||||
};
|
||||
Object.defineProperty(HTMLFormElement.prototype, 'method', methodDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Global 'click' handler, to capture the <input type="submit"> or <button> element which has
|
||||
* submitted a <form method="dialog">. Needed as Safari and others don't report this inside
|
||||
* document.activeElement.
|
||||
*/
|
||||
document.addEventListener('click', function(ev) {
|
||||
dialogPolyfill.formSubmitter = null;
|
||||
dialogPolyfill.imagemapUseValue = null;
|
||||
if (ev.defaultPrevented) { return; } // e.g. a submit which prevents default submission
|
||||
|
||||
var target = /** @type {Element} */ (ev.target);
|
||||
if ('composedPath' in ev) {
|
||||
var path = ev.composedPath();
|
||||
target = path.shift() || target;
|
||||
}
|
||||
if (!target || !isFormMethodDialog(target.form)) { return; }
|
||||
|
||||
var valid = (target.type === 'submit' && ['button', 'input'].indexOf(target.localName) > -1);
|
||||
if (!valid) {
|
||||
if (!(target.localName === 'input' && target.type === 'image')) { return; }
|
||||
// this is a <input type="image">, which can submit forms
|
||||
dialogPolyfill.imagemapUseValue = ev.offsetX + ',' + ev.offsetY;
|
||||
}
|
||||
|
||||
var dialog = findNearestDialog(target);
|
||||
if (!dialog) { return; }
|
||||
|
||||
dialogPolyfill.formSubmitter = target;
|
||||
|
||||
}, false);
|
||||
|
||||
/**
|
||||
* Global 'submit' handler. This handles submits of `method="dialog"` which are invalid, i.e.,
|
||||
* outside a dialog. They get prevented.
|
||||
*/
|
||||
document.addEventListener('submit', function(ev) {
|
||||
var form = ev.target;
|
||||
var dialog = findNearestDialog(form);
|
||||
if (dialog) {
|
||||
return; // ignore, handle there
|
||||
}
|
||||
|
||||
var submitter = findFormSubmitter(ev);
|
||||
var formmethod = submitter && submitter.getAttribute('formmethod') || form.getAttribute('method');
|
||||
if (formmethod === 'dialog') {
|
||||
ev.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Replace the native HTMLFormElement.submit() method, as it won't fire the
|
||||
* submit event and give us a chance to respond.
|
||||
*/
|
||||
var nativeFormSubmit = HTMLFormElement.prototype.submit;
|
||||
var replacementFormSubmit = function () {
|
||||
if (!isFormMethodDialog(this)) {
|
||||
return nativeFormSubmit.call(this);
|
||||
}
|
||||
var dialog = findNearestDialog(this);
|
||||
dialog && dialog.close();
|
||||
};
|
||||
HTMLFormElement.prototype.submit = replacementFormSubmit;
|
||||
}
|
||||
|
||||
return dialogPolyfill;
|
||||
|
||||
}));
|
||||
File diff suppressed because one or more lines are too long
@@ -1,80 +0,0 @@
|
||||
// ==== Handles ====
|
||||
let scheme_options = document.getElementById("scheme-list").getElementsByTagName("option");
|
||||
let scheme_button = document.getElementById("scheme-button");
|
||||
let scheme_dialog = document.getElementById("scheme-dialog");
|
||||
let scheme_dialog_close = document.getElementById("scheme-close");
|
||||
let scheme_input = document.getElementById("scheme-input");
|
||||
let scheme_default_button = document.getElementById("scheme-default");
|
||||
let scheme_random_button = document.getElementById("scheme-random");
|
||||
|
||||
// ==== Restore scheme ====
|
||||
// Get stored scheme from localStorage
|
||||
if (stored_scheme) {
|
||||
scheme_input.value = stored_scheme;
|
||||
scheme_default_button.classList.remove("hidden");
|
||||
}
|
||||
|
||||
// ==== Register listeners ====
|
||||
// Register showModal to scheme-button
|
||||
scheme_button.addEventListener("click", function () {
|
||||
// Additionaly, add placeholder depending on browser preference
|
||||
if (
|
||||
window.matchMedia &&
|
||||
window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
) {
|
||||
scheme_input.setAttribute("placeholder", "rose-pine-moon");
|
||||
} else {
|
||||
scheme_input.setAttribute("placeholder", "rose-pine-dawn");
|
||||
}
|
||||
// Add polyfill if showModal is not supported
|
||||
if (typeof scheme_dialog.showModal !== "function") {
|
||||
dialogPolyfill.registerDialog(scheme_dialog);
|
||||
}
|
||||
scheme_dialog.showModal();
|
||||
scheme_input.focus();
|
||||
});
|
||||
|
||||
// Register click event for close button
|
||||
scheme_dialog_close.addEventListener("click", function () {
|
||||
// Close dialog
|
||||
scheme_dialog.close();
|
||||
});
|
||||
|
||||
// Add click event for clear button
|
||||
scheme_default_button.addEventListener("click", function () {
|
||||
// Hide it
|
||||
scheme_default_button.classList.add("hidden");
|
||||
// Reset default scheme
|
||||
resetTheme();
|
||||
// Clear input
|
||||
scheme_input.value = "";
|
||||
});
|
||||
|
||||
// Add click event to random button
|
||||
scheme_random_button.addEventListener("click", function () {
|
||||
// Unhide clear button
|
||||
scheme_default_button.classList.remove("hidden");
|
||||
// Get random scheme
|
||||
let scheme = scheme_options.item(Math.floor(Math.random() * scheme_options.length)).textContent;
|
||||
// Apply it
|
||||
setTheme(scheme);
|
||||
// Set input
|
||||
scheme_input.value = scheme;
|
||||
});
|
||||
|
||||
// Save scheme when input is changed
|
||||
scheme_input.addEventListener("input", function () {
|
||||
let input = scheme_input.value;
|
||||
// If there's something on input
|
||||
if (input) {
|
||||
// Unhide clear button
|
||||
scheme_default_button.classList.remove("hidden");
|
||||
// Set scheme
|
||||
setTheme(input);
|
||||
} else {
|
||||
// Hide clear button
|
||||
scheme_default_button.classList.add("hidden");
|
||||
// Reset scheme
|
||||
resetTheme();
|
||||
}
|
||||
});
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {3024} by {Jan T. Sott (http://github.com/idleberg)} */
|
||||
|
||||
:root {
|
||||
--base00: #090300;
|
||||
--base01: #3a3432;
|
||||
--base02: #4a4543;
|
||||
--base03: #5c5855;
|
||||
--base04: #807d7c;
|
||||
--base05: #a5a2a2;
|
||||
--base06: #d6d5d4;
|
||||
--base07: #f7f7f7;
|
||||
--base08: #db2d20;
|
||||
--base09: #e8bbd0;
|
||||
--base0A: #fded02;
|
||||
--base0B: #01a252;
|
||||
--base0C: #b5e4f4;
|
||||
--base0D: #01a0e4;
|
||||
--base0E: #a16a94;
|
||||
--base0F: #cdab53;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Apathy} by {Jannik Siebert (https://github.com/janniks)} */
|
||||
|
||||
:root {
|
||||
--base00: #031A16;
|
||||
--base01: #0B342D;
|
||||
--base02: #184E45;
|
||||
--base03: #2B685E;
|
||||
--base04: #5F9C92;
|
||||
--base05: #81B5AC;
|
||||
--base06: #A7CEC8;
|
||||
--base07: #D2E7E4;
|
||||
--base08: #3E9688;
|
||||
--base09: #3E7996;
|
||||
--base0A: #3E4C96;
|
||||
--base0B: #883E96;
|
||||
--base0C: #963E4C;
|
||||
--base0D: #96883E;
|
||||
--base0E: #4C963E;
|
||||
--base0F: #3E965B;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Apprentice} by {romainl} */
|
||||
|
||||
:root {
|
||||
--base00: #262626;
|
||||
--base01: #303030;
|
||||
--base02: #333333;
|
||||
--base03: #6C6C6C;
|
||||
--base04: #787878;
|
||||
--base05: #BCBCBC;
|
||||
--base06: #C9C9C9;
|
||||
--base07: #FFFFFF;
|
||||
--base08: #5F8787;
|
||||
--base09: #FF8700;
|
||||
--base0A: #5F8787;
|
||||
--base0B: #87AF87;
|
||||
--base0C: #5F875F;
|
||||
--base0D: #FFFFAF;
|
||||
--base0E: #87AFD7;
|
||||
--base0F: #5F87AF;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Ashes} by {Jannik Siebert (https://github.com/janniks)} */
|
||||
|
||||
:root {
|
||||
--base00: #1C2023;
|
||||
--base01: #393F45;
|
||||
--base02: #565E65;
|
||||
--base03: #747C84;
|
||||
--base04: #ADB3BA;
|
||||
--base05: #C7CCD1;
|
||||
--base06: #DFE2E5;
|
||||
--base07: #F3F4F5;
|
||||
--base08: #C7AE95;
|
||||
--base09: #C7C795;
|
||||
--base0A: #AEC795;
|
||||
--base0B: #95C7AE;
|
||||
--base0C: #95AEC7;
|
||||
--base0D: #AE95C7;
|
||||
--base0E: #C795AE;
|
||||
--base0F: #C79595;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Cave Light} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #efecf4;
|
||||
--base01: #e2dfe7;
|
||||
--base02: #8b8792;
|
||||
--base03: #7e7887;
|
||||
--base04: #655f6d;
|
||||
--base05: #585260;
|
||||
--base06: #26232a;
|
||||
--base07: #19171c;
|
||||
--base08: #be4678;
|
||||
--base09: #aa573c;
|
||||
--base0A: #a06e3b;
|
||||
--base0B: #2a9292;
|
||||
--base0C: #398bc6;
|
||||
--base0D: #576ddb;
|
||||
--base0E: #955ae7;
|
||||
--base0F: #bf40bf;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Cave} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #19171c;
|
||||
--base01: #26232a;
|
||||
--base02: #585260;
|
||||
--base03: #655f6d;
|
||||
--base04: #7e7887;
|
||||
--base05: #8b8792;
|
||||
--base06: #e2dfe7;
|
||||
--base07: #efecf4;
|
||||
--base08: #be4678;
|
||||
--base09: #aa573c;
|
||||
--base0A: #a06e3b;
|
||||
--base0B: #2a9292;
|
||||
--base0C: #398bc6;
|
||||
--base0D: #576ddb;
|
||||
--base0E: #955ae7;
|
||||
--base0F: #bf40bf;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Dune Light} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #fefbec;
|
||||
--base01: #e8e4cf;
|
||||
--base02: #a6a28c;
|
||||
--base03: #999580;
|
||||
--base04: #7d7a68;
|
||||
--base05: #6e6b5e;
|
||||
--base06: #292824;
|
||||
--base07: #20201d;
|
||||
--base08: #d73737;
|
||||
--base09: #b65611;
|
||||
--base0A: #ae9513;
|
||||
--base0B: #60ac39;
|
||||
--base0C: #1fad83;
|
||||
--base0D: #6684e1;
|
||||
--base0E: #b854d4;
|
||||
--base0F: #d43552;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Dune} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #20201d;
|
||||
--base01: #292824;
|
||||
--base02: #6e6b5e;
|
||||
--base03: #7d7a68;
|
||||
--base04: #999580;
|
||||
--base05: #a6a28c;
|
||||
--base06: #e8e4cf;
|
||||
--base07: #fefbec;
|
||||
--base08: #d73737;
|
||||
--base09: #b65611;
|
||||
--base0A: #ae9513;
|
||||
--base0B: #60ac39;
|
||||
--base0C: #1fad83;
|
||||
--base0D: #6684e1;
|
||||
--base0E: #b854d4;
|
||||
--base0F: #d43552;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Estuary Light} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #f4f3ec;
|
||||
--base01: #e7e6df;
|
||||
--base02: #929181;
|
||||
--base03: #878573;
|
||||
--base04: #6c6b5a;
|
||||
--base05: #5f5e4e;
|
||||
--base06: #302f27;
|
||||
--base07: #22221b;
|
||||
--base08: #ba6236;
|
||||
--base09: #ae7313;
|
||||
--base0A: #a5980d;
|
||||
--base0B: #7d9726;
|
||||
--base0C: #5b9d48;
|
||||
--base0D: #36a166;
|
||||
--base0E: #5f9182;
|
||||
--base0F: #9d6c7c;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Estuary} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #22221b;
|
||||
--base01: #302f27;
|
||||
--base02: #5f5e4e;
|
||||
--base03: #6c6b5a;
|
||||
--base04: #878573;
|
||||
--base05: #929181;
|
||||
--base06: #e7e6df;
|
||||
--base07: #f4f3ec;
|
||||
--base08: #ba6236;
|
||||
--base09: #ae7313;
|
||||
--base0A: #a5980d;
|
||||
--base0B: #7d9726;
|
||||
--base0C: #5b9d48;
|
||||
--base0D: #36a166;
|
||||
--base0E: #5f9182;
|
||||
--base0F: #9d6c7c;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Forest Light} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #f1efee;
|
||||
--base01: #e6e2e0;
|
||||
--base02: #a8a19f;
|
||||
--base03: #9c9491;
|
||||
--base04: #766e6b;
|
||||
--base05: #68615e;
|
||||
--base06: #2c2421;
|
||||
--base07: #1b1918;
|
||||
--base08: #f22c40;
|
||||
--base09: #df5320;
|
||||
--base0A: #c38418;
|
||||
--base0B: #7b9726;
|
||||
--base0C: #3d97b8;
|
||||
--base0D: #407ee7;
|
||||
--base0E: #6666ea;
|
||||
--base0F: #c33ff3;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Forest} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #1b1918;
|
||||
--base01: #2c2421;
|
||||
--base02: #68615e;
|
||||
--base03: #766e6b;
|
||||
--base04: #9c9491;
|
||||
--base05: #a8a19f;
|
||||
--base06: #e6e2e0;
|
||||
--base07: #f1efee;
|
||||
--base08: #f22c40;
|
||||
--base09: #df5320;
|
||||
--base0A: #c38418;
|
||||
--base0B: #7b9726;
|
||||
--base0C: #3d97b8;
|
||||
--base0D: #407ee7;
|
||||
--base0E: #6666ea;
|
||||
--base0F: #c33ff3;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Heath Light} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #f7f3f7;
|
||||
--base01: #d8cad8;
|
||||
--base02: #ab9bab;
|
||||
--base03: #9e8f9e;
|
||||
--base04: #776977;
|
||||
--base05: #695d69;
|
||||
--base06: #292329;
|
||||
--base07: #1b181b;
|
||||
--base08: #ca402b;
|
||||
--base09: #a65926;
|
||||
--base0A: #bb8a35;
|
||||
--base0B: #918b3b;
|
||||
--base0C: #159393;
|
||||
--base0D: #516aec;
|
||||
--base0E: #7b59c0;
|
||||
--base0F: #cc33cc;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Heath} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #1b181b;
|
||||
--base01: #292329;
|
||||
--base02: #695d69;
|
||||
--base03: #776977;
|
||||
--base04: #9e8f9e;
|
||||
--base05: #ab9bab;
|
||||
--base06: #d8cad8;
|
||||
--base07: #f7f3f7;
|
||||
--base08: #ca402b;
|
||||
--base09: #a65926;
|
||||
--base0A: #bb8a35;
|
||||
--base0B: #918b3b;
|
||||
--base0C: #159393;
|
||||
--base0D: #516aec;
|
||||
--base0E: #7b59c0;
|
||||
--base0F: #cc33cc;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Lakeside Light} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #ebf8ff;
|
||||
--base01: #c1e4f6;
|
||||
--base02: #7ea2b4;
|
||||
--base03: #7195a8;
|
||||
--base04: #5a7b8c;
|
||||
--base05: #516d7b;
|
||||
--base06: #1f292e;
|
||||
--base07: #161b1d;
|
||||
--base08: #d22d72;
|
||||
--base09: #935c25;
|
||||
--base0A: #8a8a0f;
|
||||
--base0B: #568c3b;
|
||||
--base0C: #2d8f6f;
|
||||
--base0D: #257fad;
|
||||
--base0E: #6b6bb8;
|
||||
--base0F: #b72dd2;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Lakeside} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #161b1d;
|
||||
--base01: #1f292e;
|
||||
--base02: #516d7b;
|
||||
--base03: #5a7b8c;
|
||||
--base04: #7195a8;
|
||||
--base05: #7ea2b4;
|
||||
--base06: #c1e4f6;
|
||||
--base07: #ebf8ff;
|
||||
--base08: #d22d72;
|
||||
--base09: #935c25;
|
||||
--base0A: #8a8a0f;
|
||||
--base0B: #568c3b;
|
||||
--base0C: #2d8f6f;
|
||||
--base0D: #257fad;
|
||||
--base0E: #6b6bb8;
|
||||
--base0F: #b72dd2;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Plateau Light} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #f4ecec;
|
||||
--base01: #e7dfdf;
|
||||
--base02: #8a8585;
|
||||
--base03: #7e7777;
|
||||
--base04: #655d5d;
|
||||
--base05: #585050;
|
||||
--base06: #292424;
|
||||
--base07: #1b1818;
|
||||
--base08: #ca4949;
|
||||
--base09: #b45a3c;
|
||||
--base0A: #a06e3b;
|
||||
--base0B: #4b8b8b;
|
||||
--base0C: #5485b6;
|
||||
--base0D: #7272ca;
|
||||
--base0E: #8464c4;
|
||||
--base0F: #bd5187;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Plateau} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #1b1818;
|
||||
--base01: #292424;
|
||||
--base02: #585050;
|
||||
--base03: #655d5d;
|
||||
--base04: #7e7777;
|
||||
--base05: #8a8585;
|
||||
--base06: #e7dfdf;
|
||||
--base07: #f4ecec;
|
||||
--base08: #ca4949;
|
||||
--base09: #b45a3c;
|
||||
--base0A: #a06e3b;
|
||||
--base0B: #4b8b8b;
|
||||
--base0C: #5485b6;
|
||||
--base0D: #7272ca;
|
||||
--base0E: #8464c4;
|
||||
--base0F: #bd5187;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Savanna Light} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #ecf4ee;
|
||||
--base01: #dfe7e2;
|
||||
--base02: #87928a;
|
||||
--base03: #78877d;
|
||||
--base04: #5f6d64;
|
||||
--base05: #526057;
|
||||
--base06: #232a25;
|
||||
--base07: #171c19;
|
||||
--base08: #b16139;
|
||||
--base09: #9f713c;
|
||||
--base0A: #a07e3b;
|
||||
--base0B: #489963;
|
||||
--base0C: #1c9aa0;
|
||||
--base0D: #478c90;
|
||||
--base0E: #55859b;
|
||||
--base0F: #867469;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Savanna} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #171c19;
|
||||
--base01: #232a25;
|
||||
--base02: #526057;
|
||||
--base03: #5f6d64;
|
||||
--base04: #78877d;
|
||||
--base05: #87928a;
|
||||
--base06: #dfe7e2;
|
||||
--base07: #ecf4ee;
|
||||
--base08: #b16139;
|
||||
--base09: #9f713c;
|
||||
--base0A: #a07e3b;
|
||||
--base0B: #489963;
|
||||
--base0C: #1c9aa0;
|
||||
--base0D: #478c90;
|
||||
--base0E: #55859b;
|
||||
--base0F: #867469;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Seaside Light} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #f4fbf4;
|
||||
--base01: #cfe8cf;
|
||||
--base02: #8ca68c;
|
||||
--base03: #809980;
|
||||
--base04: #687d68;
|
||||
--base05: #5e6e5e;
|
||||
--base06: #242924;
|
||||
--base07: #131513;
|
||||
--base08: #e6193c;
|
||||
--base09: #87711d;
|
||||
--base0A: #98981b;
|
||||
--base0B: #29a329;
|
||||
--base0C: #1999b3;
|
||||
--base0D: #3d62f5;
|
||||
--base0E: #ad2bee;
|
||||
--base0F: #e619c3;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Seaside} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #131513;
|
||||
--base01: #242924;
|
||||
--base02: #5e6e5e;
|
||||
--base03: #687d68;
|
||||
--base04: #809980;
|
||||
--base05: #8ca68c;
|
||||
--base06: #cfe8cf;
|
||||
--base07: #f4fbf4;
|
||||
--base08: #e6193c;
|
||||
--base09: #87711d;
|
||||
--base0A: #98981b;
|
||||
--base0B: #29a329;
|
||||
--base0C: #1999b3;
|
||||
--base0D: #3d62f5;
|
||||
--base0E: #ad2bee;
|
||||
--base0F: #e619c3;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Sulphurpool Light} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #f5f7ff;
|
||||
--base01: #dfe2f1;
|
||||
--base02: #979db4;
|
||||
--base03: #898ea4;
|
||||
--base04: #6b7394;
|
||||
--base05: #5e6687;
|
||||
--base06: #293256;
|
||||
--base07: #202746;
|
||||
--base08: #c94922;
|
||||
--base09: #c76b29;
|
||||
--base0A: #c08b30;
|
||||
--base0B: #ac9739;
|
||||
--base0C: #22a2c9;
|
||||
--base0D: #3d8fd1;
|
||||
--base0E: #6679cc;
|
||||
--base0F: #9c637a;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atelier Sulphurpool} by {Bram de Haan (http://atelierbramdehaan.nl)} */
|
||||
|
||||
:root {
|
||||
--base00: #202746;
|
||||
--base01: #293256;
|
||||
--base02: #5e6687;
|
||||
--base03: #6b7394;
|
||||
--base04: #898ea4;
|
||||
--base05: #979db4;
|
||||
--base06: #dfe2f1;
|
||||
--base07: #f5f7ff;
|
||||
--base08: #c94922;
|
||||
--base09: #c76b29;
|
||||
--base0A: #c08b30;
|
||||
--base0B: #ac9739;
|
||||
--base0C: #22a2c9;
|
||||
--base0D: #3d8fd1;
|
||||
--base0E: #6679cc;
|
||||
--base0F: #9c637a;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Atlas} by {Alex Lende (https://ajlende.com)} */
|
||||
|
||||
:root {
|
||||
--base00: #002635;
|
||||
--base01: #00384d;
|
||||
--base02: #517F8D;
|
||||
--base03: #6C8B91;
|
||||
--base04: #869696;
|
||||
--base05: #a1a19a;
|
||||
--base06: #e6e6dc;
|
||||
--base07: #fafaf8;
|
||||
--base08: #ff5a67;
|
||||
--base09: #f08e48;
|
||||
--base0A: #ffcc1b;
|
||||
--base0B: #7fc06e;
|
||||
--base0C: #14747e;
|
||||
--base0D: #5dd7b9;
|
||||
--base0E: #9a70a4;
|
||||
--base0F: #c43060;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Ayu Dark} by {Khue Nguyen <Z5483Y@gmail.com>} */
|
||||
|
||||
:root {
|
||||
--base00: #0F1419;
|
||||
--base01: #131721;
|
||||
--base02: #272D38;
|
||||
--base03: #3E4B59;
|
||||
--base04: #BFBDB6;
|
||||
--base05: #E6E1CF;
|
||||
--base06: #E6E1CF;
|
||||
--base07: #F3F4F5;
|
||||
--base08: #F07178;
|
||||
--base09: #FF8F40;
|
||||
--base0A: #FFB454;
|
||||
--base0B: #B8CC52;
|
||||
--base0C: #95E6CB;
|
||||
--base0D: #59C2FF;
|
||||
--base0E: #D2A6FF;
|
||||
--base0F: #E6B673;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Ayu Light} by {Khue Nguyen <Z5483Y@gmail.com>} */
|
||||
|
||||
:root {
|
||||
--base00: #FAFAFA;
|
||||
--base01: #F3F4F5;
|
||||
--base02: #F8F9FA;
|
||||
--base03: #ABB0B6;
|
||||
--base04: #828C99;
|
||||
--base05: #5C6773;
|
||||
--base06: #242936;
|
||||
--base07: #1A1F29;
|
||||
--base08: #F07178;
|
||||
--base09: #FA8D3E;
|
||||
--base0A: #F2AE49;
|
||||
--base0B: #86B300;
|
||||
--base0C: #4CBF99;
|
||||
--base0D: #36A3D9;
|
||||
--base0E: #A37ACC;
|
||||
--base0F: #E6BA7E;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Ayu Mirage} by {Khue Nguyen <Z5483Y@gmail.com>} */
|
||||
|
||||
:root {
|
||||
--base00: #171B24;
|
||||
--base01: #1F2430;
|
||||
--base02: #242936;
|
||||
--base03: #707A8C;
|
||||
--base04: #8A9199;
|
||||
--base05: #CCCAC2;
|
||||
--base06: #D9D7CE;
|
||||
--base07: #F3F4F5;
|
||||
--base08: #F28779;
|
||||
--base09: #FFAD66;
|
||||
--base0A: #FFD173;
|
||||
--base0B: #D5FF80;
|
||||
--base0C: #95E6CB;
|
||||
--base0D: #5CCFE6;
|
||||
--base0E: #D4BFFF;
|
||||
--base0F: #F29E74;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {vice} by {Thomas Leon Highbaugh thighbaugh@zoho.com} */
|
||||
|
||||
:root {
|
||||
--base00: #17191E;
|
||||
--base01: #22262d;
|
||||
--base02: #3c3f4c;
|
||||
--base03: #383a47;
|
||||
--base04: #555e70;
|
||||
--base05: #8b9cbe;
|
||||
--base06: #B2BFD9;
|
||||
--base07: #f4f4f7;
|
||||
--base08: #ff29a8;
|
||||
--base09: #85ffe0;
|
||||
--base0A: #f0ffaa;
|
||||
--base0B: #0badff;
|
||||
--base0C: #8265ff;
|
||||
--base0D: #00eaff;
|
||||
--base0E: #00f6d9;
|
||||
--base0F: #ff3d81;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Bespin} by {Jan T. Sott} */
|
||||
|
||||
:root {
|
||||
--base00: #28211c;
|
||||
--base01: #36312e;
|
||||
--base02: #5e5d5c;
|
||||
--base03: #666666;
|
||||
--base04: #797977;
|
||||
--base05: #8a8986;
|
||||
--base06: #9d9b97;
|
||||
--base07: #baae9e;
|
||||
--base08: #cf6a4c;
|
||||
--base09: #cf7d34;
|
||||
--base0A: #f9ee98;
|
||||
--base0B: #54be0d;
|
||||
--base0C: #afc4db;
|
||||
--base0D: #5ea6ea;
|
||||
--base0E: #9b859d;
|
||||
--base0F: #937121;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal (Bathory)} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #e78a53;
|
||||
--base0B: #fbcb97;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal (Burzum)} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #99bbaa;
|
||||
--base0B: #ddeecc;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal (Dark Funeral)} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #5f81a5;
|
||||
--base0B: #d0dfee;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal (Gorgoroth)} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #8c7f70;
|
||||
--base0B: #9b8d7f;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal (Immortal)} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #556677;
|
||||
--base0B: #7799bb;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal (Khold)} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #974b46;
|
||||
--base0B: #eceee3;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal (Marduk)} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #626b67;
|
||||
--base0B: #a5aaa7;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal (Mayhem)} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #eecc6c;
|
||||
--base0B: #f3ecd4;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal (Nile)} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #777755;
|
||||
--base0B: #aa9988;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal (Venom)} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #79241f;
|
||||
--base0B: #f8f7f2;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Black Metal} by {metalelf0 (https://github.com/metalelf0)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #121212;
|
||||
--base02: #222222;
|
||||
--base03: #333333;
|
||||
--base04: #999999;
|
||||
--base05: #c1c1c1;
|
||||
--base06: #999999;
|
||||
--base07: #c1c1c1;
|
||||
--base08: #5f8787;
|
||||
--base09: #aaaaaa;
|
||||
--base0A: #a06666;
|
||||
--base0B: #dd9999;
|
||||
--base0C: #aaaaaa;
|
||||
--base0D: #888888;
|
||||
--base0E: #999999;
|
||||
--base0F: #444444;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {better-contrast} by {Ben Mayoras} */
|
||||
|
||||
:root {
|
||||
--base00: #182430;
|
||||
--base01: #243C54;
|
||||
--base02: #46290A;
|
||||
--base03: #616D78;
|
||||
--base04: #74AFE7;
|
||||
--base05: #C8E1F8;
|
||||
--base06: #DDEAF6;
|
||||
--base07: #8F98A0;
|
||||
--base08: #4CE587;
|
||||
--base09: #F6A85C;
|
||||
--base0A: #82AAFF;
|
||||
--base0B: #C3E88D;
|
||||
--base0C: #5FD1FF;
|
||||
--base0D: #82AAFF;
|
||||
--base0E: #FF84DD;
|
||||
--base0F: #BBD2E8;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Brewer} by {Timothée Poisot (http://github.com/tpoisot)} */
|
||||
|
||||
:root {
|
||||
--base00: #0c0d0e;
|
||||
--base01: #2e2f30;
|
||||
--base02: #515253;
|
||||
--base03: #737475;
|
||||
--base04: #959697;
|
||||
--base05: #b7b8b9;
|
||||
--base06: #dadbdc;
|
||||
--base07: #fcfdfe;
|
||||
--base08: #e31a1c;
|
||||
--base09: #e6550d;
|
||||
--base0A: #dca060;
|
||||
--base0B: #31a354;
|
||||
--base0C: #80b1d3;
|
||||
--base0D: #3182bd;
|
||||
--base0E: #756bb1;
|
||||
--base0F: #b15928;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Bright} by {Chris Kempson (http://chriskempson.com)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #303030;
|
||||
--base02: #505050;
|
||||
--base03: #b0b0b0;
|
||||
--base04: #d0d0d0;
|
||||
--base05: #e0e0e0;
|
||||
--base06: #f5f5f5;
|
||||
--base07: #ffffff;
|
||||
--base08: #fb0120;
|
||||
--base09: #fc6d24;
|
||||
--base0A: #fda331;
|
||||
--base0B: #a1c659;
|
||||
--base0C: #76c7b7;
|
||||
--base0D: #6fb3d2;
|
||||
--base0E: #d381c3;
|
||||
--base0F: #be643c;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Brush Trees Dark} by {Abraham White <abelincoln.white@gmail.com>} */
|
||||
|
||||
:root {
|
||||
--base00: #485867;
|
||||
--base01: #5A6D7A;
|
||||
--base02: #6D828E;
|
||||
--base03: #8299A1;
|
||||
--base04: #98AFB5;
|
||||
--base05: #B0C5C8;
|
||||
--base06: #C9DBDC;
|
||||
--base07: #E3EFEF;
|
||||
--base08: #b38686;
|
||||
--base09: #d8bba2;
|
||||
--base0A: #aab386;
|
||||
--base0B: #87b386;
|
||||
--base0C: #86b3b3;
|
||||
--base0D: #868cb3;
|
||||
--base0E: #b386b2;
|
||||
--base0F: #b39f9f;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Brush Trees} by {Abraham White <abelincoln.white@gmail.com>} */
|
||||
|
||||
:root {
|
||||
--base00: #E3EFEF;
|
||||
--base01: #C9DBDC;
|
||||
--base02: #B0C5C8;
|
||||
--base03: #98AFB5;
|
||||
--base04: #8299A1;
|
||||
--base05: #6D828E;
|
||||
--base06: #5A6D7A;
|
||||
--base07: #485867;
|
||||
--base08: #b38686;
|
||||
--base09: #d8bba2;
|
||||
--base0A: #aab386;
|
||||
--base0B: #87b386;
|
||||
--base0C: #86b3b3;
|
||||
--base0D: #868cb3;
|
||||
--base0E: #b386b2;
|
||||
--base0F: #b39f9f;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Chalk} by {Chris Kempson (http://chriskempson.com)} */
|
||||
|
||||
:root {
|
||||
--base00: #151515;
|
||||
--base01: #202020;
|
||||
--base02: #303030;
|
||||
--base03: #505050;
|
||||
--base04: #b0b0b0;
|
||||
--base05: #d0d0d0;
|
||||
--base06: #e0e0e0;
|
||||
--base07: #f5f5f5;
|
||||
--base08: #fb9fb1;
|
||||
--base09: #eda987;
|
||||
--base0A: #ddb26f;
|
||||
--base0B: #acc267;
|
||||
--base0C: #12cfc0;
|
||||
--base0D: #6fc2ef;
|
||||
--base0E: #e1a3ee;
|
||||
--base0F: #deaf8f;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Circus} by {Stephan Boyer (https://github.com/stepchowfun) and Esther Wang (https://github.com/ewang12)} */
|
||||
|
||||
:root {
|
||||
--base00: #191919;
|
||||
--base01: #202020;
|
||||
--base02: #303030;
|
||||
--base03: #5f5a60;
|
||||
--base04: #505050;
|
||||
--base05: #a7a7a7;
|
||||
--base06: #808080;
|
||||
--base07: #ffffff;
|
||||
--base08: #dc657d;
|
||||
--base09: #4bb1a7;
|
||||
--base0A: #c3ba63;
|
||||
--base0B: #84b97c;
|
||||
--base0C: #4bb1a7;
|
||||
--base0D: #639ee4;
|
||||
--base0E: #b888e2;
|
||||
--base0F: #b888e2;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Classic Dark} by {Jason Heeris (http://heeris.id.au)} */
|
||||
|
||||
:root {
|
||||
--base00: #151515;
|
||||
--base01: #202020;
|
||||
--base02: #303030;
|
||||
--base03: #505050;
|
||||
--base04: #B0B0B0;
|
||||
--base05: #D0D0D0;
|
||||
--base06: #E0E0E0;
|
||||
--base07: #F5F5F5;
|
||||
--base08: #AC4142;
|
||||
--base09: #D28445;
|
||||
--base0A: #F4BF75;
|
||||
--base0B: #90A959;
|
||||
--base0C: #75B5AA;
|
||||
--base0D: #6A9FB5;
|
||||
--base0E: #AA759F;
|
||||
--base0F: #8F5536;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Classic Light} by {Jason Heeris (http://heeris.id.au)} */
|
||||
|
||||
:root {
|
||||
--base00: #F5F5F5;
|
||||
--base01: #E0E0E0;
|
||||
--base02: #D0D0D0;
|
||||
--base03: #B0B0B0;
|
||||
--base04: #505050;
|
||||
--base05: #303030;
|
||||
--base06: #202020;
|
||||
--base07: #151515;
|
||||
--base08: #AC4142;
|
||||
--base09: #D28445;
|
||||
--base0A: #F4BF75;
|
||||
--base0B: #90A959;
|
||||
--base0C: #75B5AA;
|
||||
--base0D: #6A9FB5;
|
||||
--base0E: #AA759F;
|
||||
--base0F: #8F5536;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Codeschool} by {blockloop} */
|
||||
|
||||
:root {
|
||||
--base00: #232c31;
|
||||
--base01: #1c3657;
|
||||
--base02: #2a343a;
|
||||
--base03: #3f4944;
|
||||
--base04: #84898c;
|
||||
--base05: #9ea7a6;
|
||||
--base06: #a7cfa3;
|
||||
--base07: #b5d8f6;
|
||||
--base08: #2a5491;
|
||||
--base09: #43820d;
|
||||
--base0A: #a03b1e;
|
||||
--base0B: #237986;
|
||||
--base0C: #b02f30;
|
||||
--base0D: #484d79;
|
||||
--base0E: #c59820;
|
||||
--base0F: #c98344;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Colors} by {mrmrs (http://clrs.cc)} */
|
||||
|
||||
:root {
|
||||
--base00: #111111;
|
||||
--base01: #333333;
|
||||
--base02: #555555;
|
||||
--base03: #777777;
|
||||
--base04: #999999;
|
||||
--base05: #bbbbbb;
|
||||
--base06: #dddddd;
|
||||
--base07: #ffffff;
|
||||
--base08: #ff4136;
|
||||
--base09: #ff851b;
|
||||
--base0A: #ffdc00;
|
||||
--base0B: #2ecc40;
|
||||
--base0C: #7fdbff;
|
||||
--base0D: #0074d9;
|
||||
--base0E: #b10dc9;
|
||||
--base0F: #85144b;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Cupcake} by {Chris Kempson (http://chriskempson.com)} */
|
||||
|
||||
:root {
|
||||
--base00: #fbf1f2;
|
||||
--base01: #f2f1f4;
|
||||
--base02: #d8d5dd;
|
||||
--base03: #bfb9c6;
|
||||
--base04: #a59daf;
|
||||
--base05: #8b8198;
|
||||
--base06: #72677E;
|
||||
--base07: #585062;
|
||||
--base08: #D57E85;
|
||||
--base09: #EBB790;
|
||||
--base0A: #DCB16C;
|
||||
--base0B: #A3B367;
|
||||
--base0C: #69A9A7;
|
||||
--base0D: #7297B9;
|
||||
--base0E: #BB99B4;
|
||||
--base0F: #BAA58C;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Cupertino} by {Defman21} */
|
||||
|
||||
:root {
|
||||
--base00: #ffffff;
|
||||
--base01: #c0c0c0;
|
||||
--base02: #c0c0c0;
|
||||
--base03: #808080;
|
||||
--base04: #808080;
|
||||
--base05: #404040;
|
||||
--base06: #404040;
|
||||
--base07: #5e5e5e;
|
||||
--base08: #c41a15;
|
||||
--base09: #eb8500;
|
||||
--base0A: #826b28;
|
||||
--base0B: #007400;
|
||||
--base0C: #318495;
|
||||
--base0D: #0000ff;
|
||||
--base0E: #a90d91;
|
||||
--base0F: #826b28;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Da One Black} by {NNB (https://github.com/NNBnh)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #282828;
|
||||
--base02: #585858;
|
||||
--base03: #888888;
|
||||
--base04: #c8c8c8;
|
||||
--base05: #ffffff;
|
||||
--base06: #ffffff;
|
||||
--base07: #ffffff;
|
||||
--base08: #fa7883;
|
||||
--base09: #ffc387;
|
||||
--base0A: #ff9470;
|
||||
--base0B: #98c379;
|
||||
--base0C: #8af5ff;
|
||||
--base0D: #6bb8ff;
|
||||
--base0E: #e799ff;
|
||||
--base0F: #b3684f;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Da One Gray} by {NNB (https://github.com/NNBnh)} */
|
||||
|
||||
:root {
|
||||
--base00: #181818;
|
||||
--base01: #282828;
|
||||
--base02: #585858;
|
||||
--base03: #888888;
|
||||
--base04: #c8c8c8;
|
||||
--base05: #ffffff;
|
||||
--base06: #ffffff;
|
||||
--base07: #ffffff;
|
||||
--base08: #fa7883;
|
||||
--base09: #ffc387;
|
||||
--base0A: #ff9470;
|
||||
--base0B: #98c379;
|
||||
--base0C: #8af5ff;
|
||||
--base0D: #6bb8ff;
|
||||
--base0E: #e799ff;
|
||||
--base0F: #b3684f;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Da One Ocean} by {NNB (https://github.com/NNBnh)} */
|
||||
|
||||
:root {
|
||||
--base00: #171726;
|
||||
--base01: #22273d;
|
||||
--base02: #525866;
|
||||
--base03: #878d96;
|
||||
--base04: #c8c8c8;
|
||||
--base05: #ffffff;
|
||||
--base06: #ffffff;
|
||||
--base07: #ffffff;
|
||||
--base08: #fa7883;
|
||||
--base09: #ffc387;
|
||||
--base0A: #ff9470;
|
||||
--base0B: #98c379;
|
||||
--base0C: #8af5ff;
|
||||
--base0D: #6bb8ff;
|
||||
--base0E: #e799ff;
|
||||
--base0F: #b3684f;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Da One Paper} by {NNB (https://github.com/NNBnh)} */
|
||||
|
||||
:root {
|
||||
--base00: #faf0dc;
|
||||
--base01: #c8c8c8;
|
||||
--base02: #888888;
|
||||
--base03: #585858;
|
||||
--base04: #282828;
|
||||
--base05: #181818;
|
||||
--base06: #000000;
|
||||
--base07: #000000;
|
||||
--base08: #de5d6e;
|
||||
--base09: #ff9470;
|
||||
--base0A: #b3684f;
|
||||
--base0B: #76a85d;
|
||||
--base0C: #64b5a7;
|
||||
--base0D: #5890f8;
|
||||
--base0E: #c173d1;
|
||||
--base0F: #b3684f;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Da One White} by {NNB (https://github.com/NNBnh)} */
|
||||
|
||||
:root {
|
||||
--base00: #ffffff;
|
||||
--base01: #c8c8c8;
|
||||
--base02: #888888;
|
||||
--base03: #585858;
|
||||
--base04: #282828;
|
||||
--base05: #181818;
|
||||
--base06: #000000;
|
||||
--base07: #000000;
|
||||
--base08: #de5d6e;
|
||||
--base09: #ff9470;
|
||||
--base0A: #b3684f;
|
||||
--base0B: #76a85d;
|
||||
--base0C: #64b5a7;
|
||||
--base0D: #5890f8;
|
||||
--base0E: #c173d1;
|
||||
--base0F: #b3684f;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {DanQing} by {Wenhan Zhu (Cosmos) (zhuwenhan950913@gmail.com)} */
|
||||
|
||||
:root {
|
||||
--base00: #2d302f;
|
||||
--base01: #434846;
|
||||
--base02: #5a605d;
|
||||
--base03: #9da8a3;
|
||||
--base04: #cad8d2;
|
||||
--base05: #e0f0eF;
|
||||
--base06: #ecf6f2;
|
||||
--base07: #fcfefd;
|
||||
--base08: #F9906F;
|
||||
--base09: #B38A61;
|
||||
--base0A: #F0C239;
|
||||
--base0B: #8AB361;
|
||||
--base0C: #30DFF3;
|
||||
--base0D: #B0A4E3;
|
||||
--base0E: #CCA4E3;
|
||||
--base0F: #CA6924;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Darcula} by {jetbrains} */
|
||||
|
||||
:root {
|
||||
--base00: #2b2b2b;
|
||||
--base01: #323232;
|
||||
--base02: #323232;
|
||||
--base03: #606366;
|
||||
--base04: #a4a3a3;
|
||||
--base05: #a9b7c6;
|
||||
--base06: #ffc66d;
|
||||
--base07: #ffffff;
|
||||
--base08: #4eade5;
|
||||
--base09: #689757;
|
||||
--base0A: #bbb529;
|
||||
--base0B: #6a8759;
|
||||
--base0C: #629755;
|
||||
--base0D: #9876aa;
|
||||
--base0E: #cc7832;
|
||||
--base0F: #808080;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {darkmoss} by {Gabriel Avanzi (https://github.com/avanzzzi)} */
|
||||
|
||||
:root {
|
||||
--base00: #171e1f;
|
||||
--base01: #252c2d;
|
||||
--base02: #373c3d;
|
||||
--base03: #555e5f;
|
||||
--base04: #818f80;
|
||||
--base05: #c7c7a5;
|
||||
--base06: #e3e3c8;
|
||||
--base07: #e1eaef;
|
||||
--base08: #ff4658;
|
||||
--base09: #e6db74;
|
||||
--base0A: #fdb11f;
|
||||
--base0B: #499180;
|
||||
--base0C: #66d9ef;
|
||||
--base0D: #498091;
|
||||
--base0E: #9bc0c8;
|
||||
--base0F: #d27b53;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Darktooth} by {Jason Milkins (https://github.com/jasonm23)} */
|
||||
|
||||
:root {
|
||||
--base00: #1D2021;
|
||||
--base01: #32302F;
|
||||
--base02: #504945;
|
||||
--base03: #665C54;
|
||||
--base04: #928374;
|
||||
--base05: #A89984;
|
||||
--base06: #D5C4A1;
|
||||
--base07: #FDF4C1;
|
||||
--base08: #FB543F;
|
||||
--base09: #FE8625;
|
||||
--base0A: #FAC03B;
|
||||
--base0B: #95C085;
|
||||
--base0C: #8BA59B;
|
||||
--base0D: #0D6678;
|
||||
--base0E: #8F4673;
|
||||
--base0F: #A87322;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Dark Violet} by {ruler501 (https://github.com/ruler501/base16-darkviolet)} */
|
||||
|
||||
:root {
|
||||
--base00: #000000;
|
||||
--base01: #231a40;
|
||||
--base02: #432d59;
|
||||
--base03: #593380;
|
||||
--base04: #00ff00;
|
||||
--base05: #b08ae6;
|
||||
--base06: #9045e6;
|
||||
--base07: #a366ff;
|
||||
--base08: #a82ee6;
|
||||
--base09: #bb66cc;
|
||||
--base0A: #f29df2;
|
||||
--base0B: #4595e6;
|
||||
--base0C: #40dfff;
|
||||
--base0D: #4136d9;
|
||||
--base0E: #7e5ce6;
|
||||
--base0F: #a886bf;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Decaf} by {Alex Mirrington (https://github.com/alexmirrington)} */
|
||||
|
||||
:root {
|
||||
--base00: #2d2d2d;
|
||||
--base01: #393939;
|
||||
--base02: #515151;
|
||||
--base03: #777777;
|
||||
--base04: #b4b7b4;
|
||||
--base05: #cccccc;
|
||||
--base06: #e0e0e0;
|
||||
--base07: #ffffff;
|
||||
--base08: #ff7f7b;
|
||||
--base09: #ffbf70;
|
||||
--base0A: #ffd67c;
|
||||
--base0B: #beda78;
|
||||
--base0C: #bed6ff;
|
||||
--base0D: #90bee1;
|
||||
--base0E: #efb3f7;
|
||||
--base0F: #ff93b3;
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/* {Default Dark} by {Chris Kempson (http://chriskempson.com)} */
|
||||
|
||||
:root {
|
||||
--base00: #181818;
|
||||
--base01: #282828;
|
||||
--base02: #383838;
|
||||
--base03: #585858;
|
||||
--base04: #b8b8b8;
|
||||
--base05: #d8d8d8;
|
||||
--base06: #e8e8e8;
|
||||
--base07: #f8f8f8;
|
||||
--base08: #ab4642;
|
||||
--base09: #dc9656;
|
||||
--base0A: #f7ca88;
|
||||
--base0B: #a1b56c;
|
||||
--base0C: #86c1b9;
|
||||
--base0D: #7cafc2;
|
||||
--base0E: #ba8baf;
|
||||
--base0F: #a16946;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user