Skip to content

Instantly share code, notes, and snippets.

View CleysonPH's full-sized avatar
Studying Java

Cleyson Lima CleysonPH

Studying Java
View GitHub Profile
@CleysonPH
CleysonPH / csharp.json
Created July 25, 2022 12:22
VS Code C# Snippets
{
"class": {
"prefix": "class",
"body": [
"namespace $WORKSPACE_NAME.${1:NamespaceName};",
"",
"public class $TM_FILENAME_BASE",
"{ }",
],
"description": "Create a new class"
[
{
"key": "alt+delete",
"command": "editor.action.sourceAction",
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
}
]
<html th:replace="~{base :: layout (~{:: main})}">
<body>
<main>
<ul>
<li th:each="cliente : ${clientes}" th:text="${cliente}"></li>
</ul>
</main>
</body>
</html>
<!DOCTYPE html>
<html lang="pt-br" th:fragment="layout (conteudo)">
<head>
<meta charset="UTF-8">
<title>Herança de Templates</title>
</head>
<body>
<header>
<h1>Listagem</h1>
</header>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Thymeleaf - Fragments Parametrizados</title>
</head>
<body>
<header>
<h1>Texto a ser inserido no cabeçalho</h1>
</header>
<header th:fragment="cabecalho (texto)">
<h1 th:text="${texto}"></h1>
</header>
public enum UF {
AC("AC", "Acre"),
AL("AL", "Alagoas"),
AM("AM", "Amazonas"),
BA("BA", "Bahia"),
CE("CE", "Ceará"),
DF("DF", "Distrito Federal"),
ES("ES", "Espírito Santo"),
GO("GO", "Goiás"),
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Thymeleaf - Fragments</title>
</head>
<body>
<header>
<h1>Cabeçalho vindo do Fragment</h1>
</header>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Thymeleaf - Fragments</title>
</head>
<body>
<!-- Com th:insert -->
<div>
<header>
<h1>Cabeçalho vindo do Fragment</h1>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<title>Thymeleaf - Fragments</title>
</head>
<body>
<!-- Com th:insert -->
<div th:insert="~{cabecalho :: cabecalho}"></div>
<!-- Com th:replace -->