This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //! elevato theme - warm paper, ink text, one lamp-green accent, all mono. | |
| //! | |
| //! The theme behind <https://elevato.rs>, lifted out as a single file you | |
| //! can drop into an iced project. Copy to `src/theme.rs`, add `mod theme;`, | |
| //! then: | |
| //! | |
| //! ```ignore | |
| //! // in your application setup | |
| //! .theme(|state| state.mode.to_theme()) | |
| //! .default_font(theme::MONO) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* elevato theme - warm paper, ink text, one lamp-green accent, all mono. | |
| * | |
| * Ported from the iced theme behind https://elevato.rs (theme.rs, same | |
| * tokens, same names). Dark by default when the system asks for it; | |
| * set data-theme="light" or "dark" on <html> to force one. | |
| * | |
| * Drop in, then use the tokens. The element rules at the bottom are a | |
| * starter kit - a body, a pane, a panel, three button tiers, a link - | |
| * delete what you don't need. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //! A common API for returning [`Task`](iced::Task)s and/or generic | |
| //! `Instruction`s from views. | |
| //! | |
| //! The `Action` type provides a unified way to tell an ancestor component how | |
| //! to modify its state per some `Instruction` and/or provide a [`Task`] which | |
| //! should be returned to the [`iced`] runtime so it can be executed. | |
| //! | |
| //! Examples of instructions include navigating to a different screen, saving | |
| //! changes, or starting an edit. These instructions work directly in the | |
| //! context of some ancestor component, so they do not need to be sent to the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // iced.version = "0.13" # iirc | |
| use std::collections::BTreeMap; | |
| use std::time::Duration; | |
| use iced::theme::Palette; | |
| use iced::widget::{button, center, container, horizontal_space, row, text}; | |
| use iced::{time, window, Center, Element, Fill, Subscription, Task, Theme}; | |
| struct App { | |
| windows: BTreeMap<window::Id, Window>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use rand::Rng; | |
| use iced::time::{Duration, Instant}; | |
| use iced::widget::canvas::{Frame, Geometry, Path, Program}; | |
| use iced::widget::{button, canvas, center, column, text}; | |
| use iced::{Element, Point, Rectangle, Renderer, Size, Theme}; | |
| use iced::{Fill, Subscription, Task}; | |
| const NUM_BARS: usize = 20; | |
| const MAX_BAR_HEIGHT: f32 = 0.7; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " VIM user interface | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " Set 7 lines to the curors - when moving vertical.. | |
| set so=4 | |
| set ruler "Always show current position | |
| set cmdheight=1 "The commandbar height | |
| " Set backspace config | |
| set backspace=eol,start,indent | |
| set whichwrap+=<,>,h,l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::collections::BTreeMap; | |
| use iced::advanced::graphics::image::image_rs::ImageFormat; | |
| use iced::{window, Size, Subscription, Task, Element}; | |
| use crate::theme::constants::WINDOW_ICON; | |
| use crate::theme::Theme; | |
| use crate::{app, assistant}; | |
| #[derive(Debug)] | |
| pub enum Message { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use iced::Alignment::Center; | |
| use iced::Length::Fill; | |
| use iced::font::{self, Font}; | |
| use iced::widget::{column, horizontal_rule, pick_list, row, scrollable, text, text_input}; | |
| use iced::{Element, Size, Task}; | |
| use std::collections::HashMap; | |
| // Font candidates with their names and possible paths | |
| const FONT_CANDIDATES: &[(&str, &[&str])] = &[ | |
| ("Menlo", &[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react'; | |
| import { Clock, ArrowUp, MessageSquare, ChevronLeft, ChevronRight, Search, ExternalLink } from 'lucide-react'; | |
| const LaunchPlatform = () => { | |
| const [currentSlide, setCurrentSlide] = useState(0); | |
| const todaysLaunches = [ | |
| { | |
| id: 1, | |
| name: "CodePilot Pro", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use iced::widget::{button, column, container, hover, rich_text, row, scrollable, text, Button}; | |
| use iced::widget::{horizontal_space, markdown}; | |
| use iced::{padding, Element, Font, Length, Pixels}; | |
| pub use iced::widget::markdown::{HeadingLevel, Item, Settings, Style, Url}; | |
| /// Display a bunch of Markdown items with copy functionality for code blocks. | |
| pub fn view<'a, Message, Theme, Renderer>( | |
| items: impl IntoIterator<Item = &'a Item>, | |
| settings: Settings, |
NewerOlder