Skip to content

Commit

Permalink
Add v1 beta link
Browse files Browse the repository at this point in the history
  • Loading branch information
jgthms committed Jan 11, 2024
1 parent f1d23c1 commit 363f29b
Show file tree
Hide file tree
Showing 7 changed files with 317 additions and 92 deletions.
26 changes: 10 additions & 16 deletions docs/_includes/index/sponsors.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,28 @@
<div class="bd-sponsors-body">
<div class="bd-sponsors-content bd-index-content">
<h1 class="title has-text-black">
<strong>Bulma</strong> is thankful to its <a class="has-text-sponsor" href="{{ site.data.meta.patreon_url }}" target="_blank">Patreon</a> and <a class="has-text-sponsor" href="{{ site.data.meta.sponsorship_url }}" target="_blank">GitHub sponsors</a>
<strong>Bulma</strong> is thankful to its
<a class="has-text-sponsor" href="{{ site.data.meta.patreon_url }}" target="_blank">Patreon</a> and
<a class="has-text-sponsor" href="{{ site.data.meta.sponsorship_url }}" target="_blank">GitHub sponsors</a>
<span class="icon has-text-sponsor">
<i class="fas fa-thumbs-up"></i>
</span>
</h1>

<div class="content">
<p>
Their support contributes to the continuous development of Bulma and other open source software.
</p>
<p>Their support contributes to the continuous development of Bulma and other open source software.</p>
</div>

<a class="button bd-fat-button is-sponsor" href="{{ site.url }}{{ site.data.links.by_id.['become-sponsor'].path }}">
<span>
Become a sponsor
</span>
<a
class="button bd-fat-button is-sponsor"
href="{{ site.url }}{{ site.data.links.by_id.['become-sponsor'].path }}"
>
<span> Become a sponsor </span>
</a>
</div>

<div class="bd-sponsors-list">
<div class="bd-partner-sponsors">
{% for sponsor_id in site.data.sponsors.home %}
{% include elements/sponsor-item.html
sponsor_id=sponsor_id
classname="bd-partner-sponsor"
%}
{% endfor %}
</div>
<div id="amis" class="bd-partner-sponsors"></div>
</div>
</div>

Expand Down
124 changes: 84 additions & 40 deletions docs/_javascript/index.js
Original file line number Diff line number Diff line change
@@ -1,84 +1,128 @@
document.addEventListener('DOMContentLoaded', () => {

document.addEventListener("DOMContentLoaded", () => {
// Intro

const introVideo = document.getElementById('introVideo');
const introIframe = document.getElementById('introIframe');
const npmClipboard = new Clipboard('#npmCopy');
const introVideo = document.getElementById("introVideo");
const introIframe = document.getElementById("introIframe");
const npmClipboard = new Clipboard("#npmCopy");

if (window.Vimeo) {
const introPlayer = new Vimeo.Player(introIframe);
introPlayer.ready().then(function() {
introVideo.classList.add('has-loaded');
introPlayer.ready().then(function () {
introVideo.classList.add("has-loaded");
});
}

npmClipboard.on('success', function(e) {
e.trigger.innerText = 'copied!';
e.trigger.classList.add('is-success');
npmClipboard.on("success", function (e) {
e.trigger.innerText = "copied!";
e.trigger.classList.add("is-success");
setTimeout(() => {
e.trigger.innerText = 'copy';
e.trigger.classList.remove('is-success');
e.trigger.innerText = "copy";
e.trigger.classList.remove("is-success");
}, 500);
e.clearSelection();
});

npmClipboard.on('error', function(e) {
e.trigger.innerText = 'error!';
e.trigger.classList.add('is-error');
npmClipboard.on("error", function (e) {
e.trigger.innerText = "error!";
e.trigger.classList.add("is-error");
setTimeout(() => {
e.trigger.innerText = 'copy';
e.trigger.classList.remove('is-error');
e.trigger.innerText = "copy";
e.trigger.classList.remove("is-error");
}, 500);
});

// Grid

const $grid = document.getElementById('grid');
const $columns = Array.prototype.slice.call(document.querySelectorAll('#grid > .column'), 0);
const $markup = document.querySelector('#markup code');
const $message = document.getElementById('message');
const $add = document.getElementById('add');
const $remove = document.getElementById('remove');
const $grid = document.getElementById("grid");
const $columns = Array.prototype.slice.call(
document.querySelectorAll("#grid > .column"),
0
);
const $markup = document.querySelector("#markup code");
const $message = document.getElementById("message");
const $add = document.getElementById("add");
const $remove = document.getElementById("remove");
let showing = 5;

function showColumns() {
if (showing === 13) {
$message.style.display = 'block';
$message.style.display = "block";
} else {
$message.style.display = 'none';
$message.style.display = "none";
}

showing = Math.min(Math.max(parseInt(showing), 1), 12);

$columns.forEach($el => {
$el.style.display = 'none';
$columns.forEach(($el) => {
$el.style.display = "none";
});
$columns.slice(0, showing).forEach($el => {
$el.style.display = 'block';
$columns.slice(0, showing).forEach(($el) => {
$el.style.display = "block";
});

$markup.innerHTML = '<span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">&quot;columns&quot;</span><span class="nt">&gt;</span>';
$markup.insertAdjacentHTML('beforeend', '\n');

for(let i = 0; i < showing; i++) {
$markup.insertAdjacentHTML('beforeend', ' <span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">&quot;column&quot;</span><span class="nt">&gt;</span>');
$markup.insertAdjacentHTML('beforeend', i + 1);
$markup.insertAdjacentHTML('beforeend', '<span class="nt">&lt;/div&gt;</span>');
$markup.insertAdjacentHTML('beforeend', '\n');
$markup.innerHTML =
'<span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">&quot;columns&quot;</span><span class="nt">&gt;</span>';
$markup.insertAdjacentHTML("beforeend", "\n");

for (let i = 0; i < showing; i++) {
$markup.insertAdjacentHTML(
"beforeend",
' <span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">&quot;column&quot;</span><span class="nt">&gt;</span>'
);
$markup.insertAdjacentHTML("beforeend", i + 1);
$markup.insertAdjacentHTML(
"beforeend",
'<span class="nt">&lt;/div&gt;</span>'
);
$markup.insertAdjacentHTML("beforeend", "\n");
}

$markup.insertAdjacentHTML('beforeend', '<span class="nt">&lt;/div&gt;</span>');
$markup.insertAdjacentHTML(
"beforeend",
'<span class="nt">&lt;/div&gt;</span>'
);
}

$add.addEventListener('click', () => {
$add.addEventListener("click", () => {
showing++;
showColumns();
});

$remove.addEventListener('click', () => {
$remove.addEventListener("click", () => {
showing--;
showColumns();
});

// Amis

const $amis = document.getElementById("amis");

fetch("https://jgthms.com/amis.json")
.then((response) => {
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}

return response.json();
})
.then((response) => {
const { by_id, home } = response;

home.forEach((id) => {
const ami = by_id[id];
const { url, alt = "", width, height } = ami;
const el = document.createElement("a");
el.className = "bd-sponsor-item bd-partner-sponsor";
el.href = "url";
el.target = "_blank";
el.title = alt;
const extension = ami.svg ? ".svg" : ".png";
const img = document.createElement("img");
img.src = `/images/amis/${id}${extension}`;
img.height = height;
img.width = width;
el.appendChild(img);
$amis.appendChild(el);
});
});
});
57 changes: 57 additions & 0 deletions docs/_sass/components/v1.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
z-index: 100;
}

.v1-main,
.v1-banner,
.v1-modal {
background: conic-gradient(
Expand Down Expand Up @@ -93,4 +94,60 @@
.v1-banner {
flex-wrap: nowrap;
}

.v1-title {
font-size: 2em;
}
}

.v1-main {
padding: 1.5em;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;

> div {
display: flex;
flex-direction: column;
gap: 2em;
justify-content: center;
align-items: center;
flex-grow: 1;
max-width: 24em;
width: 100%;
}

form {
background-color: #fff;
padding: 1.5em;
border-radius: 0.5em;
width: 100%;
}

.button {
background: radial-gradient(
219.67% 183.43% at 13.27% 123.96%,
#050637 0%,
#0033c6 16.24%,
#00368b 34.3%,
#5e07bf 53.58%,
#c428ac 71.9%,
#fe6567 86.15%,
#fd8644 100%
);

box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1),
0px 2px 4px 0px rgba(0, 0, 0, 0.1), 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
border: none;
font-weight: 500;
display: flex;
width: 100%;
}
}

.v1-tsp {
margin-top: 1em;
font-size: 0.75em;
opacity: 0.5;
}
42 changes: 42 additions & 0 deletions docs/css/bulma-docs.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/css/bulma-docs.min.css

Large diffs are not rendered by default.

0 comments on commit 363f29b

Please sign in to comment.