File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11- url : /
22 label : Home
33 ico : " 🏠"
4+ desc : Project overview & installation
45- url : /docs.html
56 label : Guide
67 ico : " 📖"
8+ desc : A tour through the libraries
79- url : /fixi.html
810 label : fixi
911 ico : " 🚲"
12+ desc : Supercharged HTML
1013- url : /moxi.html
1114 label : moxi
1215 ico : " 🥊"
16+ desc : Inline scripting & reactivity
1317- url : /paxi.html
1418 label : paxi
1519 ico : " ♻️"
20+ desc : DOM morphing / patching
1621- url : /ssexi.html
1722 label : ssexi
1823 ico : " 📡"
24+ desc : Streaming HTML & events
1925- url : /rexi.html
2026 label : rexi
2127 ico : " 🐕"
28+ desc : Ergonomic fetch wrappers
2229- url : /demo.html
2330 label : Demo
2431 ico : " 📼"
32+ desc : How to see working examples
Original file line number Diff line number Diff line change 2525< details class ="mobilenav ">
2626 < summary > Menu</ summary >
2727 < nav >
28- {% for item in site.data.nav %}< a href ="{{ item.url | relative_url }} "{% if u == item.url %} class ="active "{% endif %} > {% if item.ico %}< span class ="ico "> {{ item.ico }}</ span > {% endif %}{{ item.label }}</ a > {% endfor %}
28+ {% for item in site.data.nav %}< a href ="{{ item.url | relative_url }} "{% if u == item.url %} class ="active "{% endif %} > {% if item.ico %}< span class ="ico "> {{ item.ico }}</ span > {% endif %}< span class =" lbl " > {{ item.label }} </ span > {% if item.desc %} < span class =" desc " > {{ item.desc }} </ span > {% endif % }</ a > {% endfor %}
2929 </ nav >
3030</ details >
3131
3232< main >
3333 < h1 > {{ page.heading | default: page.title | default: "The Fixi Project" }}</ h1 >
3434 < nav class ="topnav ">
35- {% for item in site.data.nav %}< a href ="{{ item.url | relative_url }} "{% if u == item.url %} class ="active "{% endif %} > {% if item.ico %}< span class ="ico "> {{ item.ico }}</ span > {% endif %}{{ item.label }}</ a > {% endfor %}
35+ {% for item in site.data.nav %}< a href ="{{ item.url | relative_url }} "{% if u == item.url %} class ="active "{% endif %} > {% if item.ico %}< span class ="ico "> {{ item.ico }}</ span > {% endif %}< span class =" lbl " > {{ item.label }}</ span > </ a > {% endfor %}
3636 </ nav >
3737{{ content }}
3838 < nav class ="pagination ">
Original file line number Diff line number Diff line change @@ -12,6 +12,23 @@ in response to any event, and place the response HTML anywhere in the document.
1212
1313Like htmx, fixi uses attributes to add behaviors to HTML elements.
1414
15+ ### A Simple Demo
16+
17+ Here is a fixi-powered button that loads a fragment into a panel:
18+
19+ ``` html
20+ <button fx-action =" /profile"
21+ fx-target =" #panel"
22+ fx-swap =" innerHTML" >
23+ Load profile
24+ </button >
25+ <output id =" panel" ></output >
26+ ```
27+
28+ Clicking this button issues a ` GET /profile ` request & whatever HTML comes back is placed inside ` #panel ` .
29+
30+ This demonstrates the core idea of fixi: an element issues a request, gets some HTML back & places it somewhere in the DOM.
31+
1532## Attributes
1633
1734The five core fixi attributes are:
@@ -110,25 +127,6 @@ Per-element listeners always win over these defaults.
110127
111128Below are some fixi-only examples to show what you can do with it.
112129
113- ### A Simple Button
114-
115- Here is a fixi-powered button that loads a fragment into a panel:
116-
117- ``` html
118- <button fx-action =" /profile"
119- fx-target =" #panel"
120- fx-swap =" innerHTML" >
121- Load profile
122- </button >
123- <output id =" panel" ></output >
124- ```
125-
126- Clicking this button issues a ` GET /profile ` request & whatever HTML comes back is placed inside ` #panel ` .
127-
128- This demonstrates the core idea of fixi: an element issues a request, gets some HTML back & places it somewhere in the DOM.
129-
130- Note that ` fx-trigger ` was not used because the default for a button is the natural event: ` click ` .
131-
132130### Inline Editing
133131
134132A common fixi pattern is to click a row (or div) and to swap in an edit form, then submit to swap back to a
Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ main {
1616 background : # fff ;
1717 border-top : 1px solid # e0e0e0 ;
1818 border-bottom : 1px solid # e0e0e0 ;
19- padding : 0.6 em 0 ;
19+ padding : 0.7 em 0 ;
2020 margin : 1em 0 2em ;
2121 display : flex;
2222 flex-wrap : nowrap;
23- gap : 0.6 em ;
23+ gap : 1.1 em ;
2424 justify-content : center;
2525 align-items : center;
2626}
@@ -32,9 +32,10 @@ main {
3232 color : # 2563eb ;
3333 text-decoration : none;
3434 white-space : nowrap;
35+ font-size : 1.1em ;
3536}
3637
37- .topnav a : hover { text-decoration : underline; }
38+ .topnav a : hover . lbl { text-decoration : underline; }
3839
3940.topnav a .active {
4041 color : # 1a1a1a ;
@@ -85,21 +86,29 @@ main {
8586 color : # 2563eb ;
8687 text-decoration : none;
8788 display : flex;
88- justify-content : center;
8989 align-items : center;
90+ gap : 0.6em ;
9091 padding : 0.5em 0 ;
9192 border-bottom : 1px solid # e0e0e0 ;
9293 }
9394 .mobilenav nav a : last-child { border-bottom : none; }
94- .mobilenav nav a : hover { text-decoration : underline; }
95- .mobilenav nav a .active {
95+ .mobilenav nav a : hover . lbl { text-decoration : underline; }
96+ .mobilenav nav a .active . lbl {
9697 color : # 1a1a1a ;
9798 font-weight : 600 ;
9899 }
99100 .mobilenav nav a .ico {
100101 font-size : 2em ;
101- margin-right : 0.05em ;
102- vertical-align : -0.2em ;
102+ flex-shrink : 0 ;
103+ }
104+ .mobilenav nav a .lbl {
105+ font-weight : 600 ;
106+ min-width : 4.5em ;
107+ }
108+ .mobilenav nav a .desc {
109+ color : # 666 ;
110+ font-size : 0.9em ;
111+ flex : 1 ;
103112 }
104113}
105114
You can’t perform that action at this time.
0 commit comments