Swiftlighter
Swiftlighter is the Open Source project that distributes under the Apache 2.0 license. This app helps to translate swift text into a highlighted HTML/CSS listing for a web page, especially for web-sites running on Blogger engine. This app has been created for developers who aren't used to apply web markup languages or somehow can’t get a web engine access to set their code up. You can also use Swiftlighter if you don’t want to put substantial investments in time and energy for additional web settings.
Available for macOS Catalina and supports Swift 5.1
Enjoy free installation! (no subscription, no purchases)
Still don’t have Swiftlighter? Download now!
What is inside? Check on GitHub!
Current version: 2.8
Default example of its work:
Set up by CSS field, used CSS code: font-family:sans-serif; border-radius:0px;
Quick Start:
What is inside? Check on GitHub!
Current version: 2.8
Default example of its work:
class ExampleViewController: UIViewController { @IBOutlet var mainLabel: UILabel! @IBOutlet var neededTextField: UITextField! var currentText: String? override func viewDidLoad() { super.viewDidLoad() updateMainLabel() } @IBAction func sendButtonTapped(_ sender: UIButton){ currentText = neededTextField.text updateMainLabel() } private func updateMainLabel(){ guard let unwrappedCurrentText = currentText else { mainLabel.text = "Type any text" return } mainLabel.text = unwrappedCurrentText } /* // MARK: - New Functions 1) Add animation 2) Update backgrounds */ } |
Set up by CSS field, used CSS code: font-family:sans-serif; border-radius:0px;
var someNum: Int? = nil if let num = someNum{ print("Hello \(num)") } |
Quick Start:
You don’t need any web knowledges to start. There are three steps for making swift code highlighted.
Colour Customisation:
Swiftlighter supports users colour customisation. All you need is to choose between editing existing or adding a new colour style. If you want to add a new colour style that is based on existing one, you can choose any style you have on your colour panel and click “Add New” button. A new style will be based on an existing style and saved as new.
For changing colour you need to type its hex value (as #123456, or 123456) in a text field, also you may click a colour button and choose a colour in the popover menu.
Palettes:
Using a web safe palette is recommended for identical display on different devices. However you can use any colour from RGB and Grayscale spaces. CMYK colour space is not recommended for using. Colours from “Developer” popover menu are not supported.
Fonts and CSS:
For getting font customisation and adding your own CSS code click on the Font Profile button, choose any custom variant then click the “Edit Profile Button” when it’s enabled.
If you can't find your favourite font in the popup menu, you can add a font setting “font-family: “My Favourite Font” into the CSS field:
Note: Executes only the code that is located in the CSS field including font settings. Popup buttons and “Font Size” field only manipulate main CSS field!
You can change some installed parts of CSS code by adding into the CSS field your own code, new settings will automatically replace old.
Parts that can be changed in <div style=“”> block:
text-shadow; font-size; border-radius; border-width; padding; overflow; overflow-x; overflow-y; width; height;
Other CSS parts of code will be added into the <pre style = “”> block.
By clicking “Save” button you will relaunch the engine and get a new result. If you want to clean up all the settings, click “Default Web Page Settings”.
Comments