Skip to content

Commit

Permalink
Merge branch 'dev' into v2-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Telroshan committed May 23, 2024
2 parents 2b95d79 + 601d16c commit 51ef0e2
Show file tree
Hide file tree
Showing 22 changed files with 398 additions and 8 deletions.
3 changes: 3 additions & 0 deletions dist/htmx.amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3324,6 +3324,9 @@ var htmx = (function() {
}
})
new FormData(elt).forEach(function(value, name) {
if (value instanceof File && value.name === '') {
return // ignore no-name files
}
if (!namesWithBooleanCheckboxes[name]) {
addValueToFormData(name, value, formData)
}
Expand Down
3 changes: 3 additions & 0 deletions dist/htmx.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3323,6 +3323,9 @@ var htmx = (function() {
}
})
new FormData(elt).forEach(function(value, name) {
if (value instanceof File && value.name === '') {
return // ignore no-name files
}
if (!namesWithBooleanCheckboxes[name]) {
addValueToFormData(name, value, formData)
}
Expand Down
3 changes: 3 additions & 0 deletions dist/htmx.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3323,6 +3323,9 @@ var htmx = (function() {
}
})
new FormData(elt).forEach(function(value, name) {
if (value instanceof File && value.name === '') {
return // ignore no-name files
}
if (!namesWithBooleanCheckboxes[name]) {
addValueToFormData(name, value, formData)
}
Expand Down
3 changes: 3 additions & 0 deletions dist/htmx.js
Original file line number Diff line number Diff line change
Expand Up @@ -3323,6 +3323,9 @@ var htmx = (function() {
}
})
new FormData(elt).forEach(function(value, name) {
if (value instanceof File && value.name === '') {
return // ignore no-name files
}
if (!namesWithBooleanCheckboxes[name]) {
addValueToFormData(name, value, formData)
}
Expand Down
2 changes: 1 addition & 1 deletion dist/htmx.min.js

Large diffs are not rendered by default.

Binary file modified dist/htmx.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"AJAX",
"HTML"
],
"version": "2.0.0-beta3",
"version": "2.0.0-beta4",
"homepage": "https://htmx.org/",
"bugs": {
"url": "https://github.com/bigskysoftware/htmx/issues"
Expand Down
3 changes: 3 additions & 0 deletions src/htmx.js
Original file line number Diff line number Diff line change
Expand Up @@ -3323,6 +3323,9 @@ var htmx = (function() {
}
})
new FormData(elt).forEach(function(value, name) {
if (value instanceof File && value.name === '') {
return // ignore no-name files
}
if (!namesWithBooleanCheckboxes[name]) {
addValueToFormData(name, value, formData)
}
Expand Down
14 changes: 14 additions & 0 deletions test/manual/file-input-test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Scratch file to test file upload</title>
<script src="../../src/htmx.js"></script>
</head>
<body>
<form hx-post="/">
<input type="hidden" name="foo" value="bar">
<input type="file" name="file">
<button>Submit</button>
</form>
</body>
</html>
2 changes: 1 addition & 1 deletion www/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
base_url = "https://htmx.org"
base_url = "https://dev.htmx.org"
title = "</> htmx - high power tools for html"
theme = "htmx-theme"

Expand Down
66 changes: 63 additions & 3 deletions www/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,92 @@ insert_anchor_links = "left"
+++

<style type="text/css">
.wuw {
display:none;
}
.uwu {
display:none;
}
body.lmao .dark-hero .main {
display:none;
}
body.lmao .dark-hero .wuw {
display:block;
padding-top: 24px;
}
body .dark-hero .wuw {
body.lmao .dark-hero .uwu {
display:none;
}
body.kawaii .dark-hero .main {
display:none;
}
body.kawaii .dark-hero .wuw {
display:none;
}
body.kawaii .dark-hero .uwu {
display:block;
padding-top: 24px;
}

body.ads .ad {
display: block;
text-align: center;
margin-left: calc(50% - 50vw);
margin-right: calc(50% - 50vw);
}

body.ads .ad a:hover {
opacity: 100%;
}

body .ad {
display: none;
}

body.ads .ad img {
max-width: 90vw;
}

</style>
<script type="application/javascript">
if(window.location.search=="?wuw=true") {
if(window.location.search=="?wuw=true" || window.location.search=="?suw=true") {
document.body.classList.add('lmao');
}
if(window.location.search=="?uwu=true") {
document.body.classList.add('kawaii');
}
if(window.location.search=="?ads=true") {
document.body.classList.add('ads');
}
</script>

<div class="ad" style="margin-bottom: 30px">
<a href="https://swag.htmx.org">
<img src="/img/ads_top.png"/>
</a>
</div>

<div class="dark-hero full-width" classes="add appear">
<div class="main">
<span class="logo dark">&lt;<span class="blue">/</span>&gt; <span class="no-mobile">htm<span class="blue">x</span></span></span>
<sub class="no-mobile"><i>high power tools for HTML</i></sub>
</div>
<div class="wuw">
<img src="/img/wuw.png">
<a href="https://swag.htmx.org/products/shut-up-warren-tee">
<img src="/img/wuw.png">
</a>
</div>
<div class="uwu">
<a href="https://swag.htmx.org/products/htmx-katakana-shirt">
<img src="/img/kawaii.png">
</a>
</div>
</div>
<div class="ad">
<a href="https://swag.htmx.org">
<img src="/img/ads_bottom.png"/>
</a>
</div>

<div style="border: 1px solid lightgrey; margin:24px;padding:12px;border-radius: 8px; background-color: whitesmoke; filter: drop-shadow(3px 3px darkgray)">
<b>NEWS:</b> htmx finished 2nd in the <a href="https://risingstars.js.org/2023/en#section-framework">2023
Expand Down
4 changes: 2 additions & 2 deletions www/content/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ The fastest way to get going with htmx is to load it via a CDN. You can simply a
and get going:

```html
<script src="https://unpkg.com/htmx.org@2.0.0-beta4" integrity="sha384-dyhvbZOkY/iX5LpSP52hCAEhdXOWGTihIhopb2JLOkmikMvCSrS5YdMWckqsqeS+" crossorigin="anonymous"></script>
<script src="https://unpkg.com/htmx.org@2.0.0-beta4" integrity="sha384-QprZjU1JKuXu/TnlURCTYppToUjigoOZCrzQtRXAjHttxoV9gkqiizVeAwjeGy1f" crossorigin="anonymous"></script>
```

Unminified version is also available

```html
<script src="https://unpkg.com/htmx.org@2.0.0-beta4/dist/htmx.js" integrity="sha384-5N77nsQeMeg7iHYch5J40eakz39IlEyDhUJ3gn1NKdnjL5mlflCTK3DXnDlDCsSa" crossorigin="anonymous"></script>
<script src="https://unpkg.com/htmx.org@2.0.0-beta4/dist/htmx.js" integrity="sha384-n/53Us+nZur0snldc6yl7W3paw5/sbtpXhImQJk9JZf0KQjzCP6lbBWmAtFsCSb9" crossorigin="anonymous"></script>
```

While the CDN approach is extremely simple, you may want to consider [not using CDNs in production](https://blog.wesleyac.com/posts/why-not-javascript-cdn).
Expand Down
1 change: 1 addition & 0 deletions www/content/essays/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ page_template = "essay.html"
* [The API Churn/Security Trade-off](https://intercoolerjs.org/2016/02/17/api-churn-vs-security.html)
* [Does Hypermedia Scale?](@/essays/does-hypermedia-scale.md)
* [SPA Alternative](@/essays/spa-alternative.md)
* [htmx sucks](@/essays/htmx-sucks.md)

### Building Hypermedia Applications
* [A Real World React to htmx Port](@/essays/a-real-world-react-to-htmx-port.md)
Expand Down
Loading

0 comments on commit 51ef0e2

Please sign in to comment.