bloggie 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +4 -0
- package/README.md +5 -0
- package/astro.config.js +2 -1
- package/components/Embed.astro +35 -0
- package/components/YouTube.astro +15 -0
- package/components/slides/Slide.astro +14 -4
- package/e2e/editor.js +41 -6
- package/e2e/run.js +29 -7
- package/editor/client.js +56 -24
- package/layouts/Post.astro +17 -11
- package/lib/math-punctuation.js +44 -0
- package/lib/pages.js +29 -0
- package/lib/slides.js +10 -0
- package/package.json +1 -1
- package/pages/index.astro +90 -38
- package/scripts/export/agent.js +2 -2
- package/scripts/export/common.js +10 -4
- package/scripts/export/dev.js +7 -5
- package/scripts/export/index.js +14 -10
- package/scripts/export/page.js +4 -3
- package/scripts/export-posts.js +26 -11
- package/skills/bloggie-slides/SKILL.md +14 -3
- package/styles/site.css +164 -11
- package/styles/slides.css +37 -0
- package/template/package.json +1 -1
package/styles/site.css
CHANGED
|
@@ -757,6 +757,12 @@ blockquote {
|
|
|
757
757
|
overflow-y: hidden;
|
|
758
758
|
}
|
|
759
759
|
|
|
760
|
+
/* Inline math with the punctuation that touches it (lib/math-punctuation.js), as one box, so that a line never breaks
|
|
761
|
+
between them. As an inline-block, math wider than the line still wraps inside the box. */
|
|
762
|
+
.math-nowrap {
|
|
763
|
+
display: inline-block;
|
|
764
|
+
}
|
|
765
|
+
|
|
760
766
|
/* --- post index ---------------------------------------------------------- */
|
|
761
767
|
|
|
762
768
|
.post-list {
|
|
@@ -782,6 +788,43 @@ blockquote {
|
|
|
782
788
|
font-size: 0.97rem;
|
|
783
789
|
}
|
|
784
790
|
|
|
791
|
+
/* Left of a post's title, the slides icon, a link to its deck (index.astro). It hangs in the margin, so every title
|
|
792
|
+
starts on the same line; on a phone it sits before the title. */
|
|
793
|
+
.post-list h2 {
|
|
794
|
+
position: relative;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.post-deck {
|
|
798
|
+
position: absolute;
|
|
799
|
+
left: -1.45rem;
|
|
800
|
+
top: 0.15em;
|
|
801
|
+
display: inline-flex;
|
|
802
|
+
color: var(--text-muted);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.post-deck:hover,
|
|
806
|
+
.post-deck:focus-visible {
|
|
807
|
+
color: var(--series-1);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
.post-deck svg {
|
|
811
|
+
width: 1.05rem;
|
|
812
|
+
height: 1.05rem;
|
|
813
|
+
fill: none;
|
|
814
|
+
stroke: currentColor;
|
|
815
|
+
stroke-width: 1.3;
|
|
816
|
+
stroke-linecap: round;
|
|
817
|
+
stroke-linejoin: round;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
@media (max-width: 520px) {
|
|
821
|
+
.post-deck {
|
|
822
|
+
position: static;
|
|
823
|
+
margin-right: 0.4rem;
|
|
824
|
+
vertical-align: -0.12em;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
|
|
785
828
|
/* After a post's title, each of its tags (index.astro): an icon, else its name in small capitals. */
|
|
786
829
|
.post-icon {
|
|
787
830
|
margin-left: 0.4rem;
|
|
@@ -802,33 +845,102 @@ blockquote {
|
|
|
802
845
|
vertical-align: 0.15em;
|
|
803
846
|
}
|
|
804
847
|
|
|
805
|
-
/* Above the list
|
|
806
|
-
.post-
|
|
848
|
+
/* Above the list (index.astro): a chip per tag, one chosen at a time, and the sort menu at the end of the row. */
|
|
849
|
+
.post-controls {
|
|
850
|
+
display: flex;
|
|
851
|
+
flex-wrap: wrap;
|
|
852
|
+
align-items: center;
|
|
853
|
+
gap: 0.6rem 1.2rem;
|
|
807
854
|
margin: 1.5rem 0 0;
|
|
808
|
-
|
|
809
|
-
border: 0;
|
|
855
|
+
max-width: var(--content-width);
|
|
810
856
|
font-family: var(--sans);
|
|
811
857
|
font-size: 0.82rem;
|
|
812
858
|
color: var(--text-secondary);
|
|
813
859
|
}
|
|
814
860
|
|
|
815
|
-
.post-filter
|
|
816
|
-
|
|
861
|
+
.post-filter {
|
|
862
|
+
display: flex;
|
|
863
|
+
flex-wrap: wrap;
|
|
864
|
+
gap: 0.4rem;
|
|
865
|
+
margin: 0;
|
|
817
866
|
padding: 0;
|
|
818
|
-
|
|
819
|
-
|
|
867
|
+
border: 0;
|
|
868
|
+
min-width: 0;
|
|
820
869
|
}
|
|
821
870
|
|
|
822
|
-
.post-filter
|
|
871
|
+
.post-filter legend {
|
|
872
|
+
position: absolute;
|
|
873
|
+
width: 1px;
|
|
874
|
+
height: 1px;
|
|
875
|
+
overflow: hidden;
|
|
876
|
+
clip-path: inset(50%);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.post-filter .chip {
|
|
880
|
+
position: relative;
|
|
823
881
|
display: inline-flex;
|
|
824
882
|
align-items: center;
|
|
825
|
-
gap: 0.
|
|
826
|
-
|
|
883
|
+
gap: 0.35rem;
|
|
884
|
+
padding: 0.22rem 0.65rem;
|
|
885
|
+
border: 1px solid var(--rule);
|
|
886
|
+
border-radius: 999px;
|
|
827
887
|
cursor: pointer;
|
|
888
|
+
user-select: none;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
.post-filter .chip:hover {
|
|
892
|
+
border-color: var(--axis);
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.post-filter .chip input {
|
|
896
|
+
position: absolute;
|
|
897
|
+
inset: 0;
|
|
898
|
+
margin: 0;
|
|
899
|
+
opacity: 0;
|
|
900
|
+
cursor: pointer;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.post-filter .chip:has(input:checked) {
|
|
904
|
+
border-color: var(--series-1);
|
|
905
|
+
background: color-mix(in srgb, var(--series-1) 12%, transparent);
|
|
906
|
+
color: var(--text-primary);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.post-filter .chip:has(input:focus-visible) {
|
|
910
|
+
outline: 2px solid var(--series-1);
|
|
911
|
+
outline-offset: 2px;
|
|
828
912
|
}
|
|
829
913
|
|
|
830
914
|
.post-filter .count {
|
|
831
915
|
color: var(--text-muted);
|
|
916
|
+
font-variant-numeric: tabular-nums;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
.post-filter .slides-icon {
|
|
920
|
+
width: 1rem;
|
|
921
|
+
height: 1rem;
|
|
922
|
+
fill: none;
|
|
923
|
+
stroke: currentColor;
|
|
924
|
+
stroke-width: 1.3;
|
|
925
|
+
stroke-linecap: round;
|
|
926
|
+
stroke-linejoin: round;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
.post-sort {
|
|
930
|
+
display: inline-flex;
|
|
931
|
+
align-items: center;
|
|
932
|
+
gap: 0.4rem;
|
|
933
|
+
margin-left: auto;
|
|
934
|
+
color: var(--text-muted);
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.post-sort select {
|
|
938
|
+
padding: 0.2rem 0.4rem;
|
|
939
|
+
border: 1px solid var(--rule);
|
|
940
|
+
border-radius: 5px;
|
|
941
|
+
background: var(--page);
|
|
942
|
+
color: var(--text-primary);
|
|
943
|
+
font: inherit;
|
|
832
944
|
}
|
|
833
945
|
|
|
834
946
|
/* --- figures ------------------------------------------------------------- */
|
|
@@ -892,6 +1004,47 @@ figure video {
|
|
|
892
1004
|
border-radius: 4px;
|
|
893
1005
|
}
|
|
894
1006
|
|
|
1007
|
+
/* A YouTube player in a post (components/YouTube.astro), the width of the text column at 16:9. */
|
|
1008
|
+
iframe.youtube {
|
|
1009
|
+
display: block;
|
|
1010
|
+
width: 100%;
|
|
1011
|
+
aspect-ratio: 16 / 9;
|
|
1012
|
+
border: 0;
|
|
1013
|
+
border-radius: 4px;
|
|
1014
|
+
background: #000;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
/* A live web page in a post (components/Embed.astro), the width of the figure at 16:9. */
|
|
1018
|
+
iframe.embed {
|
|
1019
|
+
display: block;
|
|
1020
|
+
width: 100%;
|
|
1021
|
+
aspect-ratio: 16 / 9;
|
|
1022
|
+
border: 1px solid var(--rule);
|
|
1023
|
+
border-radius: 4px;
|
|
1024
|
+
background: #fff;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
/* A cropped page (Embed crop="…"): only its rectangle shows, scaled to the frame's width by the component's script. */
|
|
1028
|
+
.embed-crop {
|
|
1029
|
+
position: relative;
|
|
1030
|
+
width: 100%;
|
|
1031
|
+
overflow: hidden;
|
|
1032
|
+
border: 1px solid var(--rule);
|
|
1033
|
+
border-radius: 4px;
|
|
1034
|
+
background: #fff;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.embed-crop iframe.embed {
|
|
1038
|
+
position: absolute;
|
|
1039
|
+
top: 0;
|
|
1040
|
+
left: 0;
|
|
1041
|
+
max-width: none;
|
|
1042
|
+
aspect-ratio: auto;
|
|
1043
|
+
border: 0;
|
|
1044
|
+
border-radius: 0;
|
|
1045
|
+
transform-origin: 0 0;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
895
1048
|
/* A picture in a post, such as a screenshot (How this blog works), framed so it stands off the page. */
|
|
896
1049
|
figure img {
|
|
897
1050
|
display: block;
|
package/styles/slides.css
CHANGED
|
@@ -496,6 +496,43 @@
|
|
|
496
496
|
background: var(--video-bg, #101826);
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
+
/* An embed slide is a live web page (components/Embed.astro) the full width of the stage. A 24px band at the bottom
|
|
500
|
+
stays the deck's: the page takes every pointer and key event over it, so the pointer in the band shows the nav in
|
|
501
|
+
full screen, and a click in the band gives the keys back to the deck. */
|
|
502
|
+
.slide.embed-slide {
|
|
503
|
+
padding: 0 0 24px;
|
|
504
|
+
gap: 0;
|
|
505
|
+
background: var(--video-bg, #fff);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.slide.embed-slide > iframe.embed {
|
|
509
|
+
display: block;
|
|
510
|
+
flex: 1;
|
|
511
|
+
width: 100%;
|
|
512
|
+
min-height: 0;
|
|
513
|
+
border: 0;
|
|
514
|
+
border-radius: 0;
|
|
515
|
+
background: #fff;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/* A cropped page fills the stage's height at its own aspect ratio, centered. */
|
|
519
|
+
.slide.embed-slide .embed-crop {
|
|
520
|
+
height: 100%;
|
|
521
|
+
width: auto;
|
|
522
|
+
max-width: 100%;
|
|
523
|
+
align-self: center;
|
|
524
|
+
border: 0;
|
|
525
|
+
border-radius: 0;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/* A YouTube player (components/YouTube.astro) fills the 16:9 stage; the slide's background is black, as is YouTube's. */
|
|
529
|
+
.slide.video-slide iframe.youtube {
|
|
530
|
+
width: 100%;
|
|
531
|
+
height: 100%;
|
|
532
|
+
border: 0;
|
|
533
|
+
border-radius: 0;
|
|
534
|
+
}
|
|
535
|
+
|
|
499
536
|
.slide.video-slide video {
|
|
500
537
|
display: block;
|
|
501
538
|
height: 100%;
|