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
<!-- slightly modified code originally by talves, can be extended to create responsive images etc. as well --> | |
{{ $nombre := .Get "name" }} | |
{{ $page := . }} | |
{{ with .Site.GetPage "section" "images" }} | |
{{ with .Resources.GetMatch $nombre }} | |
{{ $image1080x := (.Resize "1080x") }} | |
<img src="{{ $image1080x.RelPermalink }}"> | |
{{ end }} | |
{{ end }} |
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
<!-- Bottom Part of the index.html inside amdmin directory. The UI element is in spanish because of the prject I'm working on right now. Also If you use the id "image"you apparently overwrite the default image widget which you can or cannot want --> | |
<script> | |
CMS.registerEditorComponent({ | |
// Internal id of the component | |
id: "imagen", | |
// Visible label | |
label: "Añadir Imagen", | |
// Fields the user need to fill out when adding an instance of the component | |
fields: [{name: 'id', label: 'Lugar del Imagen', widget: 'image'}], |
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
<script> | |
CMS.registerEditorComponent({ | |
// Internal id of the component | |
id: "Gallery", | |
// Visible label | |
label: "Añadir Galleria", | |
// Fields the user need to fill out when adding an instance of the component | |
fields: [{ | |
name: 'images', | |
label: 'Images', |
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 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
void main() async { | |
return runApp(MaterialApp( | |
theme: ThemeData(brightness: Brightness.light, primaryColor: Colors.red), | |
home: const MyEditor() | |
// debugShowCheckedModeBanner: false, theme: themeData, home: Document() | |
)); | |
} |