Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 658069408
  • Loading branch information
tensorflower-gardener committed Jul 31, 2024
1 parent c3bea9e commit d63ce08
Show file tree
Hide file tree
Showing 78 changed files with 39,456 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
lastmod: {{ .Date }}
publishdate: {{ .Date }}
description: ""
weight: 10
---

Lorem Ipsum.
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
'use strict';

const gulp = require('gulp');
const $ = require('gulp-load-plugins')();

require('es6-promise').polyfill();

const webpack = require('webpack');
const webpackStream = require('webpack-stream');
const webpackConfig = require('./webpack.config');

const src_paths = {
sass: ['src/scss/*.scss'],
script: ['src/js/*.js'],
};

const dest_paths = {
style: 'static/css/',
script: 'static/js/',
};

/**
* Lint Sass files.
* @returns {!Stream} Gulp stream.
*/
function lint_sass() {
return gulp.src(src_paths.sass)
.pipe($.plumber({
errorHandler: function(err) {
console.log(err.messageFormatted);
this.emit('end');
}
}))
.pipe($.stylelint({
config: {
extends: [
'stylelint-config-recommended',
'stylelint-scss',
'stylelint-config-recommended-scss'
],
rules: {
'block-no-empty': null,
'no-descending-specificity': null
}
},
reporters: [{
formatter: 'string',
console: true
}]
}));
}

/**
* Compile Sass files to CSS, autoprefix, and minify.
* @returns {!Stream} Gulp stream.
*/
function style_sass() {
return gulp.src(src_paths.sass)
.pipe($.plumber({
errorHandler: function(err) {
console.log(err.messageFormatted);
this.emit('end');
}
}))
.pipe($.sass({outputStyle: 'expanded'}).on('error', $.sass.logError))
.pipe($.autoprefixer({cascade: false}))
.pipe(gulp.dest(dest_paths.style))
.pipe($.cssnano())
.pipe($.rename({suffix: '.min'}))
.pipe(gulp.dest(dest_paths.style));
}

/**
* Lint JavaScript files with ESLint.
* @returns {!Stream} Gulp stream.
*/
function lint_eslint() {
return gulp.src(src_paths.script)
.pipe($.eslint.format())
.pipe($.eslint.failAfterError());
}

/**
* Bundle JavaScript files using Webpack.
* @returns {!Stream} Gulp stream.
*/
function script() {
return webpackStream(webpackConfig, webpack)
.on('error',
function(e) {
this.emit('end');
})
.pipe(gulp.dest('dist'));
}

/**
* Watch files for changes and run appropriate tasks.
* @param {function()} done - Callback function.
*/
function watch_files(done) {
gulp.watch(src_paths.sass).on('change', gulp.series(lint_sass, style_sass));
gulp.watch(src_paths.script).on('change', gulp.series(lint_eslint, script));
}

exports.lint = gulp.parallel(lint_sass, lint_eslint);
exports.style = style_sass;
exports.script = script;
exports.watch = watch_files;
exports.default = gulp.series(
gulp.parallel(lint_sass, lint_eslint), gulp.parallel(style_sass, script));
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- define "main" -}}
<h1>404 Not Found</h1>
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
{{ with .Site.LanguageCode }}<html lang="{{ . }}">{{ else }}<html>{{ end }}
<head>
{{- partial "head.html" . -}}
{{- partial "custom-head.html" . -}}
</head>
<body>
{{- partial "prepend-body.html" . -}}
<div class="container">
{{- partial "notification.html" . -}}
{{- partial "site-header.html" . -}}
{{- partial "global-menu.html" . -}}
<div class="content-container">
<main>
{{- block "main" . -}}{{- end -}}
<footer>
{{- partial "content-footer.html" . -}}
{{- partial "powered.html" . -}}
</footer>
</main>

{{- partial "sidebar.html" . -}}
</div>
{{- partial "footer.html" . -}}
</div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{- define "main" -}}
<h1>{{ .Title }}</h1>
{{- .Content -}}
{{- partial "edit-meta.html" . -}}
{{- partial "pagination.html" . -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{- define "main" -}}
<h1>{{ .Title }}</h1>
{{- partial "table-of-contents.html" . -}}
{{- .Content -}}
{{- partial "edit-meta.html" . -}}
{{- partial "pagination.html" . -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<li>
<a href="{{ .Permalink }}">{{ .Title }}</a>
<div class="meta">{{ .Date.Format "Mon, Jan 2, 2006" }}</div>
</li>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{- define "main" -}}
<h1>{{ .Title }}</h1>
{{- .Content -}}
{{ range (.Paginate ( first 50 .Data.Pages )).Pages }}
{{ .Render "summary"}}
{{ end }}
{{ template "_internal/pagination.html" . }}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- define "main" -}}
<h1>{{ .Title }}</h1>
{{- .Content -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<article>
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<time>{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
{{ .Summary }}
</article>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{ define "main" }}
{{- if .Site.Home.Content -}}
{{- .Site.Home.Content -}}
{{- partial "pagination.html" . -}}
{{- partial "edit-meta.html" . -}}
{{- else -}}
<h1>Customize your own home page</h1>
<p>The site is working. Don't forget to customize this homepage with your own. You typically have 2 choices :</p>
<ol>
<li>Create an _index.md document in <b>content</b> folder and fill it with Markdown content</li>
<li>Create an <b>index.html</b> file in the <b>static</b> folder and fill the file with HTML content</li>
<li>Configure your server to automatically redirect home page to one your documentation page</li>
</ol>
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<style>
:root {
{{- with .Site.Params.custom_font_color }}--custom-font-color: {{ . | safeCSS }};{{ end -}}
{{- with .Site.Params.custom_background_color }}--custom-background-color: {{ . | safeCSS }};{{ end -}}
}
</style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="edit-meta">
{{- partial "last-updated.html" . -}}
<br>
{{- partial "edit-page.html" . -}}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- if and .Site.Params.github_doc_repository .File -}}
<a href="{{ .Site.Params.github_doc_repository }}/edit/{{ .Site.Params.github_doc_repository_branch | default "master" }}/{{ .Site.Params.github_doc_repository_path }}{{ .File.Path }}" class="edit-page"><i class="fas fa-pen-square"></i>&nbsp;Edit on GitHub</a>
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<a href="#" id="backtothetop-fixed" class="backtothetop"
data-backtothetop-duration="600"
data-backtothetop-easing="easeOutQuart"
data-backtothetop-fixed-fadeIn="1000"
data-backtothetop-fixed-fadeOut="1000"
data-backtothetop-fixed-bottom="10"
data-backtothetop-fixed-right="20">
<span class="fa-layers fa-fw">
<i class="fas fa-circle"></i>
<i class="fas fa-arrow-circle-up"></i>
</span></a>
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{ $currentPage := . }}
{{- if .Site.Menus.main -}}
<div class="global-menu">
<nav>
<ul>
{{- range .Site.Menus.main.ByWeight -}}
{{ if .HasChildren -}}
<li{{ with .Identifier }} id="{{ . }}"{{ end }} class="parent{{ if $currentPage.HasMenuCurrent "main" . }} active{{ end }} {{ with .Params.class }}{{ . }}{{ end }}">{{template "menu-item" dict "item" .}}
<ul class="sub-menu">
{{ range .Children -}}
<li{{ with .Identifier }} id="{{ . }}"{{ end }} class="child{{ if $currentPage.HasMenuCurrent "main" . }} active{{ end }} {{ with .Params.class }}{{ . }}{{ end }}">{{template "menu-item" dict "item" .}}</li>
{{ end -}}
</ul>
</li>
{{- else }}
<li{{ with .Identifier }} id="{{ . }}"{{ end }}{{ if $currentPage.HasMenuCurrent "main" . }} class="active {{with .Params.class}}{{ . }}{{ end }}"{{ else }} class="{{ with .Params.class }}{{ . }}{{ end }}"{{ end }}>{{template "menu-item" dict "item" .}}</li>
{{- end -}}
{{- end -}}
</ul>
</nav>
</div>
{{- end }}

{{define "menu-item"}}
{{- with .item -}}
<a href="{{ .URL }}">
{{- with .Pre -}}{{- . -}}{{- end -}}
{{- .Name -}}
{{- with .Post -}}{{- . -}}{{- end -}}
{{- if .HasChildren -}}
<i class="fas fa-angle-right"></i>
{{- end -}}
</a>
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
{{- if eq .Title "" }}
<title>{{ .Site.Title }}</title>
{{- else }}
<title>{{ .Title }} - {{ .Site.Title }}</title>
{{- end }}
{{- if ne .Description "" }}
<meta name="description" content="{{ .Description }}">
{{- else if isset .Site.Params "description" }}
<meta name="description" content="{{ .Site.Params.description }}">
{{- end }}
{{ hugo.Generator }}
<link href="{{ .Site.BaseURL }}/index.xml" rel="alternate" type="application/rss+xml">
<link rel="canonical" href="{{ .Permalink }}">
<link rel="stylesheet" href="{{"css/theme.min.css" | absURL}}">
{{ partial "meta/chroma.html" . -}}
<script defer src="{{ .Site.BaseURL }}/js/fontawesome6/all.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/jquery.easing.min.js" integrity="sha256-H3cjtrm/ztDeuhCN9I4yh4iN2Ybx/y1RM7rMmAesA0k=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard.min.js" integrity="sha256-4XodgW4TwIJuDtf+v6vDJ39FVxI0veC/kSCCmnFp7ck=" crossorigin="anonymous"></script>
<script src="{{ "js/bundle.js" | absURL }}"></script>
{{- partial "meta/google-analytics-async.html" . -}}
{{- partial "meta/tag-manager.html" . -}}
{{- partial "meta/google-site-verification.html" . -}}
{{- partial "custom-css.html" . -}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{- template "_internal/schema.html" . -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{ if ne ( .Lastmod.Format "2006-01-02" ) "0001-01-01" }}
Last updated on {{ .Lastmod.Format ( $.Site.Params.dateformat | default "2 Jan 2006") }}
{{ end }}
{{ if ne ( .PublishDate.Format "2006-01-02" ) "0001-01-01" }}
<br>
Published on {{ .PublishDate.Format ( $.Site.Params.dateformat | default "2 Jan 2006") -}}
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{{$currentNode := .}}
<nav class="open-menu">
<ul>
<li class="{{ if .IsHome }}active{{ end }}"><a href="{{ .Site.BaseURL }}">Home</a></li>
{{- if eq .Site.Params.ordersectionsby "title" -}}
{{- range .Site.Home.Sections.ByTitle -}}
{{template "open-menu" dict "sect" . "currentnode" $currentNode}}
{{- end -}}
{{- else -}}
{{- range .Site.Home.Sections.ByWeight -}}
{{template "open-menu" dict "sect" . "currentnode" $currentNode}}
{{- end -}}
{{- end}}
</ul>
</nav>

{{define "open-menu"}}
{{- $currentNode := .currentnode -}}
{{ with .sect }}
{{ if .IsSection }}
{{ if in .Site.Params.menu_exclusion .Section }}
{{- else -}}
{{- safeHTML .Params.head -}}
{{- $numberOfPages := (add (len .Pages) (len .Sections)) -}}
<li class="{{ if .IsAncestor $currentNode }}parent{{ end }}{{ if and .File $currentNode.File }}{{ if eq .File.UniqueID $currentNode.File.UniqueID }} active{{ end }}{{ end }}{{ if .Params.alwaysopen }} parent{{ end }}"><a href="{{ .Permalink }}">{{ safeHTML .Params.Pre }}{{ .Title }}{{ safeHTML .Params.Post }}</a>
{{ if ne $numberOfPages 0 }}
<ul class="sub-menu">
{{- .Scratch.Set "pages" .Pages -}}
{{- if .Sections -}}
{{- .Scratch.Set "pages" (.Pages | union .Sections) -}}
{{- end -}}
{{- $pages := (.Scratch.Get "pages") -}}
{{- if eq .Site.Params.ordersectionsby "title" -}}
{{- range $pages.ByTitle -}}
{{- if and .Params.hidden (not $.showhidden) -}}
{{- else -}}
{{template "open-menu" dict "sect" . "currentnode" $currentNode}}
{{- end -}}
{{- end -}}
{{- else -}}
{{- range $pages.ByWeight -}}
{{- if and .Params.hidden (not $.showhidden) -}}
{{- else -}}
{{template "open-menu" dict "sect" . "currentnode" $currentNode}}
{{- end -}}
{{- end -}}
{{- end}}
</ul>
{{end}}
</li>
{{- end -}}
{{- else -}}
{{- if not .Params.Hidden -}}
<li class="{{ if and .File $currentNode.File }}{{ if eq .File.UniqueID $currentNode.File.UniqueID }}active{{ end }}{{ end }}"><a href="{{ .Permalink }}">{{ safeHTML .Params.Pre }}{{ .Title }}{{ safeHTML .Params.Post }}</a></li>
{{- end -}}
{{ end -}}
{{ end -}}
{{ end }}
Loading

0 comments on commit d63ce08

Please sign in to comment.