Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .licensure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ excludes:
- Jenkinsfile
- .*Dockerfile
# ThawUI utilities / mixed copyright.
- overview\/src\/ical_property.rs
- src\/util\/signals\/component_ref\.rs
- src\/util\/signals\/mod\.rs
- src\/util\/callback\.rs
Expand All @@ -24,6 +23,7 @@ excludes:
- src\/util\/optional_prop\.rs
- overview\/src\/gen_icons\.rs
- demo\/src\/generated_demolist\.rs
- overview\/src\/ical_property\.rs
# Definition of the licenses used on this project and to what files
# they should apply.
licenses:
Expand Down
29 changes: 13 additions & 16 deletions JenkinsfileGH-new
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ pipeline {
}
stage('Attic login & watch') {
steps {
sh 'echo "34.254.122.57 nix-cache.dev.openanalytics.eu" >> /etc/hosts'
withCredentials([usernamePassword(credentialsId: 'attic-leptodon', passwordVariable: 'ATTIC_PASSWORD', usernameVariable: 'ATTIC_USERNAME')]) {
sh "attic login $ATTIC_USERNAME https://nix-cache.dev.openanalytics.eu $ATTIC_PASSWORD"
sh "attic login $ATTIC_USERNAME https://nix-cache.openanalytics.eu $ATTIC_PASSWORD"
}
sh "attic use oa-leptodon"
sh "attic watch-store oa-leptodon &"
Expand All @@ -55,14 +54,10 @@ pipeline {
steps {
parallel(
cargoArtifacts: {
sh "nix build ./flake-modules/crates#cargoArtifacts -o cargo-result"
sh "zstd -d cargo-result/target.tar.zst -o cargo-target.tar"
sh "tar xf cargo-target.tar"
sh "nix build ./flake-modules/crates#cargoArtifacts"
},
cargoWasmArtifacts: {
sh "nix build ./flake-modules/crates#cargoWasmArtifacts -o wasm-result"
sh "zstd -d wasm-result/target.tar.zst -o wasm-target.tar"
sh "tar xf wasm-target.tar"
sh "nix build ./flake-modules/crates#cargoWasmArtifacts"
}
)
}
Expand Down Expand Up @@ -101,23 +96,25 @@ pipeline {
}
}
}
stage('Build Demo') {
steps {
sh """
nix build ./flake-modules/crates#demo-site-image
cp result demo-image.tar.gz
gunzip demo-image.tar.gz
"""
}
}
}
}
stage('Build & Publish Demo') {
stage('Publish Demo') {
steps {
// Skopeo policy
sh """
mkdir -p /etc/containers
echo '{"default":[{"type":"insecureAcceptAnything"}],"transports":{"docker-daemon":{"":[{"type":"insecureAcceptAnything"}]}}}' > /etc/containers/policy.json
"""

sh """
nix build ./flake-modules/crates#demo-site-image
cp result demo-image.tar.gz
gunzip demo-image.tar.gz
du -sh /nix/store
"""

sh "nix develop ./nix --command skopeo login --authfile /root/.docker/config.json registry.openanalytics.eu "

sh """
Expand Down
27 changes: 25 additions & 2 deletions demo/src/demos/calendar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ use chrono::Local;
use chrono::NaiveDate;
use chrono::NaiveTime;
use chrono::Weekday;
use chrono::WeekdaySet;
use leptodon::calendar::Calendar;
use leptodon::calendar::CalendarEvent;
use leptodon::calendar::YearCalendar;
use leptodon::calendar::YearCalendarLayout;
use leptodon::heading::Heading4;
use leptodon::layout::FixedCenterColumn;
use leptodon::paragraph::Paragraph;
use leptodon::select::Select;
use leptodon_proc_macros::generate_codeblock;
use leptos::prelude::ClassAttribute;
use leptos::prelude::ElementChild;
Expand Down Expand Up @@ -59,11 +63,28 @@ pub fn CalendarDemo() -> impl IntoView {
<Calendar
children
presented_month_writer
show_days=RwSignal::new(Box::new([Weekday::Mon, Weekday::Tue, Weekday::Wed, Weekday::Thu, Weekday::Fri].as_ref()))
/>
show_days=RwSignal::new(WeekdaySet::from_array(
[Weekday::Mon, Weekday::Tue, Weekday::Thu, Weekday::Fri]
))
/>
}
}

#[generate_codeblock(YearCalendarExample)]
#[component]
pub fn YearCalendarDemo() -> impl IntoView {
let local_date_time = Local::now();
let current_year = RwSignal::new(2025);
let layout = RwSignal::new(YearCalendarLayout::default());
let layout_options = RwSignal::new(vec![
YearCalendarLayout::Year,
YearCalendarLayout::TwelveMonths,
]);
view! {
<YearCalendar local_date_time current_year layout />
<Select required=true selected=layout options=layout_options />
}
}
#[component]
pub fn CalendarDemoPage() -> impl IntoView {
view! {
Expand All @@ -72,7 +93,9 @@ pub fn CalendarDemoPage() -> impl IntoView {
<FixedCenterColumn>
<Heading4 anchor="calendar">"Calendar"</Heading4>
<CalendarExample />
<YearCalendarExample />

<leptodon::calendar::YearCalendarDocs />
<leptodon::calendar::CalendarDocs />
<leptodon::calendar::CalendarEventDocs />
</FixedCenterColumn>
Expand Down
20 changes: 20 additions & 0 deletions demo/style/output.css
Original file line number Diff line number Diff line change
Expand Up @@ -2667,6 +2667,10 @@ input:checked + .toggle-bg {
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.vertical-lr {
writing-mode: vertical-lr;
}

[type="text"]:focus, [type="email"]:focus, [type="url"]:focus, [type="password"]:focus, [type="number"]:focus, [type="date"]:focus, [type="datetime-local"]:focus, [type="month"]:focus, [type="search"]:focus, [type="tel"]:focus, [type="time"]:focus, [type="week"]:focus, [multiple]:focus, textarea:focus, select:focus {
outline-offset: 2px;
--tw-ring-inset: var(--tw-empty, /*!*/ /*!*/);
Expand Down Expand Up @@ -3132,6 +3136,14 @@ html.dark {
.md\:max-lg\:text-center {
text-align: center;
}

.md\:max-lg\:horizontal-tb {
writing-mode: horizontal-tb;
}

.md\:max-lg\:text-upright {
text-orientation: upright;
}
}
}

Expand Down Expand Up @@ -3197,6 +3209,14 @@ html.dark {
--tw-rotate: 0deg;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.xl\:horizontal-tb {
writing-mode: horizontal-tb;
}

.xl\:text-upright {
text-orientation: upright;
}
}

@media (min-width: 1536px) {
Expand Down
26 changes: 25 additions & 1 deletion demo/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @type {import('tailwindcss').Config} */
const plugin = require('tailwindcss/plugin')

module.exports = {
content: {
files: [
Expand All @@ -10,7 +12,29 @@ module.exports = {
],
},
darkMode: "selector",
plugins: [require("flowbite/plugin")],
plugins: [
require("flowbite/plugin"),
plugin(function({ addUtilities, addComponents, e, prefix, config }) {
const newUtilities = {
'.horizontal-tb': {
writingMode: 'horizontal-tb',
},
'.vertical-rl': {
writingMode: 'vertical-rl'
},
'.vertical-lr': {
writingMode: 'vertical-lr'
},
'.text-mixed': {
textOrientation: 'mixed'
},
'.text-upright': {
textOrientation: 'upright'
}
}
addUtilities(newUtilities)
})
],
theme: {
colors: {
"oa-blue-lighter": "#5bb8dc",
Expand Down
Loading