diff --git a/.gitignore b/.gitignore index 4e4992e66..9acb0edbc 100644 --- a/.gitignore +++ b/.gitignore @@ -325,4 +325,7 @@ pip-selfcheck.json .DS_Store /*.dbc /*.bck -/templates \ No newline at end of file +/templates +website/**/*.tar.gz +website/**/*.zip +website/public/** \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index 268521b8c..82d11df62 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -3,7 +3,6 @@ before: hooks: # You may remove this if you don't use go modules. - - make docs - go mod download builds: - env: @@ -23,6 +22,7 @@ archives: windows: Windows amd64: 64-bit 386: 32-bit + name_template: "databricks-terraform-{{ .Os }}-{{ .Arch }}-{{ .Tag }}-SNAPSHOT-{{ .ShortCommit }}" format_overrides: - goos: windows format: zip @@ -30,11 +30,10 @@ archives: - LICENSE* - CHANGELOG* - NOTICE* - - docs/build/html/**/* checksum: name_template: 'checksums.txt' snapshot: - name_template: "{{ .Tag }}-SNAPSHOT-{{ .ShortCommit }}" + name_template: "{{ .Tag }}" changelog: sort: asc filters: diff --git a/Makefile b/Makefile index e24842ee5..2be7f78f1 100644 --- a/Makefile +++ b/Makefile @@ -66,4 +66,21 @@ terraform-apply: terraform-setup @echo "==> Initializing Terraform plan..." @TF_LOG_PATH=log.out TF_LOG=debug terraform apply +snapshot: + @echo "==> Making Snapshot..." + @goreleaser release --rm-dist --snapshot + @cp dist/*.gz website/content/_index.files/ + @cp dist/*.zip website/content/_index.files/ + +hugo: snapshot + @echo "==> Making Docs..." + @rm -rf terraform-provider-databricks website/content/_index.files/* + @cp dist/*.gz website/content/_index.files/ + @cp dist/*.zip website/content/_index.files/ + @cd website && hugo + +internal-docs-sync: + @echo "==> Uploading Website..." + @azcopy login --service-principal --application-id $(AZCOPY_SPA_CLIENT_ID) --tenant-id=$(AZCOPY_SPA_TENANT_ID) && azcopy sync './website/public' '$(AZCOPY_STORAGE_ACCT)' --recursive + .PHONY: build fmt python-setup docs vendor terraform-local build fmt coverage test \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d0c3cbf10..000000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 9534b0181..000000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index b967b0b3e..000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,29 +0,0 @@ -alabaster==0.7.12 -Babel==2.8.0 -certifi==2019.11.28 -chardet==3.0.4 -commonmark==0.9.1 -docutils==0.16 -idna==2.8 -imagesize==1.2.0 -Jinja2==2.11.1 -m2r==0.2.1 -MarkupSafe==1.1.1 -mistune==0.8.4 -packaging==20.1 -Pygments==2.5.2 -pyparsing==2.4.6 -pytz==2019.3 -recommonmark==0.6.0 -requests==2.22.0 -six==1.14.0 -snowballstemmer==2.0.0 -Sphinx==2.3.1 -sphinx-rtd-theme==0.4.3 -sphinxcontrib-applehelp==1.0.1 -sphinxcontrib-devhelp==1.0.1 -sphinxcontrib-htmlhelp==1.0.2 -sphinxcontrib-jsmath==1.0.1 -sphinxcontrib-qthelp==1.0.2 -sphinxcontrib-serializinghtml==1.1.3 -urllib3==1.25.8 diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index f99bd63ab..000000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,57 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - - -# -- Project information ----------------------------------------------------- - -project = 'Databricks Terraform Provider' -copyright = '2020, databricks' -author = 'databricks' - -# The full version, including alpha/beta/rc tags -release = '0.1.0' - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ -# "recommonmark", - "m2r" -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = [] - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = 'sphinx_rtd_theme' - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst deleted file mode 100644 index 501027b4b..000000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. databricks-terraform-provider documentation master file, created by - sphinx-quickstart on Wed Jan 29 15:36:15 2020. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to databricks-terraform-provider's documentation! -========================================================= - -Click on the installation section to get started with installing the provider. - -.. toctree:: - :maxdepth: 2 - :caption: Contents: - - Databricks Provider Overview - Installation - Databricks Provider - Resources \ No newline at end of file diff --git a/docs/source/provider/provider.md b/docs/source/provider/provider.md deleted file mode 100644 index fe0f0c6a1..000000000 --- a/docs/source/provider/provider.md +++ /dev/null @@ -1,128 +0,0 @@ -# Databricks Provider - -The Databricks provider is what is used to interact with the Databricks resources. This needs to be configured so that -terraform can provision resources in your Databricks workspace on your behalf. - -## Example Usage - -.. code-block:: tf - - provider "databricks" { - host = "http://databricks.domain.com" - token = "dapitokenhere" - } - - resource "databricks_scim_user" "my-user" { - user_name = "test-user@databricks.com" - display_name = "Test User" - } - -.. WARNING:: Please be aware that hard coding credentials is not something that is recommended. - It may be best if you store the credentials environment variables or use tfvars file. - -## Authentication - -There are currently two supported methods to authenticate into the Databricks platform to create resources. - -* **API Token** -* **Azure Service Principal Authentication** - -.. Note:: **Azure Service Principal Authentication** will only work on Azure Databricks where as the API Token - authentication will work on both **Azure** and **AWS** - -### API Token - -Databricks hostname for the workspace and api token can be provided here. This configuration is very similar to the -Databricks CLI - -.. code-block:: tf - - provider "databricks" { - host = "http://databricks.domain.com" - token = "dapitokenhere" - } - -.. WARNING:: Please be aware that hard coding credentials is not something that is recommended. - It may be best if you store the credentials environment variables or use tfvars file. - - -### Azure Service Principal Auth - -.. code-block:: tf - - provider "databricks" { - azure_auth = { - managed_resource_group = "${azurerm_databricks_workspace.sri_test_workspace.managed_resource_group_name}" - azure_region = "${azurerm_databricks_workspace.sri_test_workspace.location}" - workspace_name = "${azurerm_databricks_workspace.sri_test_workspace.name}" - resource_group = "${azurerm_databricks_workspace.sri_test_workspace.resource_group_name}" - client_id = "${var.client_id}" - client_secret = "${var.client_secret}" - tenant_id = "${var.tenant_id}" - subscription_id = "${var.subscription_id}" - } - } - -### Environment variables - -The following variables can be passed via environment variables: - -* `host` → `HOST` -* `token` → `TOKEN` -* `subscription_id` → `ARM_SUBSCRIPTION_ID` -* `client_secret` → `ARM_CLIENT_SECRET` -* `client_id` → `ARM_CLIENT_ID` -* `tenant_id` → `ARM_TENANT_ID` - -For example you can have the following provider definition: - -.. code-block:: tf - - provider "databricks" {} - -Then run the following code and the following environment variables will be injected into the provider. - -.. code-block:: sh - - $ export HOST="http://databricks.domain.com" - $ export TOKEN="dapitokenhere" - $ terraform plan - -## Provider Argument Reference - -The following arguments are supported by the db provider block: - -.. _provider-host: -* :ref:`host ` - This is the host of the Databricks workspace. This is will be a url that you use to login to your workspace. -Alternatively you can provide this value as an environment variable `HOST`. - -.. _provider-token: -* :ref:`token ` - This is the api token to authenticate into the workspace. Alternatively you can provide this value as an -environment variable `TOKEN`. - -.. _provider-azure-auth: -* :ref:`azure_auth ` - This is the authentication required to authenticate to the Databricks via an azure service principal -that has access to the workspace. This is optional as you can use the api token based auth. The `azure_auth` block -contains the following arguments: - - * `managed_resource_group` - This is the managed workgroup id when the Databricks workspace is provisioned - - * `azure_region` - This is the azure region in which your workspace is deployed. - - * `workspace_name` - This is the name of your Azure Databricks Workspace. - - * `resource_group` - This is the resource group in which your Azure Databricks Workspace resides in. - - * `subscription_id` - This is the Azure Subscription id in which your Azure Databricks Workspace resides in. - Alternatively you can provide this value as an environment variable `ARM_SUBSCRIPTION_ID`. - - * `client_secret` - This is the Azure Enterprise Application (Service principal) client secret. This service - principal requires contributor access to your Azure Databricks deployment. Alternatively you can provide this - value as an environment variable `ARM_CLIENT_SECRET`. - - * `client_id` - This is the Azure Enterprise Application (Service principal) client id. This service principal - requires contributor access to your Azure Databricks deployment. Alternatively you can provide this value as an - environment variable `ARM_CLIENT_ID`. - - * `tenant_id` - This is the Azure Active Directory Tenant id in which the Enterprise Application (Service Principal) - resides in. Alternatively you can provide this value as an environment variable `ARM_TENANT_ID`. diff --git a/docs/source/provider/resources/db_aws_s3_mount.md b/docs/source/provider/resources/db_aws_s3_mount.md deleted file mode 100644 index 2d6d0c590..000000000 --- a/docs/source/provider/resources/db_aws_s3_mount.md +++ /dev/null @@ -1,49 +0,0 @@ -# Resource: databricks_aws_s3_mount - -This resource given a cluster id will help you create, get and delete a aws s3 mount. - -.. Warning:: It is important to understand that this will start up the cluster if the cluster is terminated. - The read and refresh terraform command will require a cluster and make take some time to validate mount. - -.. Important:: You can locate the mount in dbfs at `dbfs:/mnt/` - -.. Important:: Currently only supports the use of IAM roles and not S3 keys and secrets. - -## Example Usage - -.. code-block:: tf - - resource "databricks_aws_s3_mount" "my_custom_mount4" { - cluster_id = "####-######-hello###" - s3_bucket_name = "my-s3-bucket-123" - mount_name = "my_s3_bucket_mount" - } - -## Argument Reference - -The following arguments are supported: - -.. _r_aws_s3_mount_cluster_id: -* :ref:`cluster_id ` - **(Required)** This is the cluster id in which the mount will be initalized -from. If the cluster is in a terminated state it will be started. - -.. _r_aws_s3_mount_s3_bucket_name: -* :ref:`s3_bucket_name ` - **(Required)** This is the S3 bucket that you are trying to -mount. - -.. _r_aws_s3_mount_mount_name: -* :ref:`mount_name ` - **(Required)** This is the name of the mount that will represent -where the data will be landed. - - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_aws_s3_mount_id: -* :ref:`id ` - Identifier for the mount. - - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_azure_adls_gen1_mount.md b/docs/source/provider/resources/db_azure_adls_gen1_mount.md deleted file mode 100644 index 762d2e2ce..000000000 --- a/docs/source/provider/resources/db_azure_adls_gen1_mount.md +++ /dev/null @@ -1,77 +0,0 @@ -# Resource: databricks_azure_adls_gen1_mount - -This resource given a cluster id will help you create, get and delete a azure data lake gen 1(ADLS gen 1) mount using a service -principal/enterprise ad application which will provide you a client id and client secret to authenticate. - -.. Warning:: It is important to understand that this will start up the cluster if the cluster is terminated. - The read and refresh terraform command will require a cluster and make take some time to validate mount. - -.. Important:: You can locate the mount in dbfs at `dbfs:/mnt/` - -## Example Usage - -.. code-block:: tf - - resource "databricks_azure_adls_gen1_mount" "my_custom_mount3" { - cluster_id = "####-######-pear###" - storage_resource_name = "my_storage_resource_name" - mount_name = "my_adls_gen1_mount" - tenant_id = "????????-????-????-????-????????????" - client_id = "????????-????-????-????-????????????" - client_secret_scope = "my_adls_client_secret_scope" - client_secret_key= "my_adls_client_secret_key" - } - -## Argument Reference - -The following arguments are supported: - -.. _r_azure_adls_gen1_mount_cluster_id: -* :ref:`cluster_id ` - **(Required)** This is the cluster id in which the mount will be initalized -from. If the cluster is in a terminated state it will be started. - -.. _r_azure_adls_gen1_mount_storage_resource_name: -* :ref:`storage_resource_name ` - **(Required)** The name of the storage resource -in which the data is for ADLS gen 1. This is what you are trying to mount. - -.. _r_azure_adls_gen1_mount_spark_conf_prefix: -* :ref:`spark_conf_prefix ` - **(Required)** This is the spark configuration prefix -for adls gen 1 mount. The options are `"fs.adl", "dfs.adls"`. Use `"fs.adl"` for runtime 6.0 and above for the clusters. -Otherwise use `"dfs.adls"`. The default value is: `"fs.adl"`. - -.. _r_azure_adls_gen1_mount_directory: -* :ref:`directory ` - **(Optional)** This is optional if you want to add an additional -directory that you wish to mount. This must start with a "/" - -.. _r_azure_adls_gen1_mount_mount_name: -* :ref:`mount_name ` - **(Required)** The name of the folder that you want to mount to -in dbfs. You can access the data from `/mnt/` - -.. _r_azure_adls_gen1_mount_tenant_id: -* :ref:`tenant_id ` - **(Required)** This is your azure directory tenant id. This is -required for creating the mount. - -.. _r_azure_adls_gen1_mount_client_id: -* :ref:`client_id ` - **(Required)** This is the client_id for the enterprise application -for the service principal. - -.. _r_azure_adls_gen1_mount_token_secret_scope: -* :ref:`token_secret_scope ` - **(Required)** This is the secret scope in which -your service principal/enterprise app client secret will be stored. - -.. _r_azure_adls_gen1_mount_token_secret_key: -* :ref:`token_secret_key ` - **(Required)** This is the secret key in which -your service principal/enterprise app client secret will be stored. - - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_azure_adls_gen1_mount_id: -* :ref:`id ` - Identifier for a adls gen 1 mount. - - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_azure_adls_gen2_mount.md b/docs/source/provider/resources/db_azure_adls_gen2_mount.md deleted file mode 100644 index c01f38ebe..000000000 --- a/docs/source/provider/resources/db_azure_adls_gen2_mount.md +++ /dev/null @@ -1,76 +0,0 @@ -# Resource: databricks_azure_adls_gen2_mount - -This resource given a cluster id will help you create, get and delete a azure data lake gen 2 (ADLS gen 2) mount using a service -principal/enterprise ad application which will provide you a client id and client secret to authenticate. - -.. Warning:: It is important to understand that this will start up the cluster if the cluster is terminated. - The read and refresh terraform command will require a cluster and make take some time to validate mount. - -.. Important:: You can locate the mount in dbfs at `dbfs:/mnt/` - -## Example Usage - -.. code-block:: tf - - resource "databricks_azure_adls_gen2_mount" "my_custom_mount2" { - cluster_id = "####-######-pear###" - container_name = "my_storage_container" - storage_account_name = "mystorageaccountname" - mount_name = "my_cool_adls_gen2_mount" - tenant_id = "????????-????-????-????-????????????" - client_id = "????????-????-????-????-????????????" - client_secret_scope = "my_adls_client_secret_scope" - client_secret_key= "my_adls_client_secret_key" - } - -## Argument Reference - -The following arguments are supported: - -.. _r_azure_adls_gen2_mount_cluster_id: -* :ref:`cluster_id ` - **(Required)** This is the cluster id in which the mount will be initalized -from. If the cluster is in a terminated state it will be started. - -.. _r_azure_adls_gen2_mount_container_name: -* :ref:`container_name ` - **(Required)** The container in which the data is. This -is what you are trying to mount. - -.. _r_azure_adls_gen2_mount_storage_account_name: -* :ref:`storage_account_name ` - **(Required)** The name of the storage account -in which the data is. This is what you are trying to mount. - -.. _r_azure_adls_gen2_mount_directory: -* :ref:`directory ` - **(Optional)** This is optional if you want to add an additional -directory that you wish to mount. This must start with a "/" - -.. _r_azure_adls_gen2_mount_mount_name: -* :ref:`mount_name ` - **(Required)** The name of the folder that you want to mount to -in dbfs. You can access the data from `/mnt/` - -.. _r_azure_adls_gen2_mount_tenant_id: -* :ref:`tenant_id ` - **(Required)** This is your azure directory tenant id. This is -required for creating the mount. - -.. _r_azure_adls_gen2_mount_client_id: -* :ref:`client_id ` - **(Required)** This is the client_id for the enterprise application -for the service principal. - -.. _r_azure_adls_gen2_mount_token_secret_scope: -* :ref:`token_secret_scope ` - **(Required)** This is the secret scope in which -your service principal/enterprise app client secret will be stored. - -.. _r_azure_adls_gen2_mount_token_secret_key: -* :ref:`token_secret_key ` - **(Required)** This is the secret key in which -your service principal/enterprise app client secret will be stored. - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_azure_adls_gen2_mount_id: -* :ref:`id ` - Identifier for a adls gen 2 mount. - - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_azure_blob_mount.md b/docs/source/provider/resources/db_azure_blob_mount.md deleted file mode 100644 index e8cf6efc0..000000000 --- a/docs/source/provider/resources/db_azure_blob_mount.md +++ /dev/null @@ -1,77 +0,0 @@ -# Resource: databricks_azure_blob_mount - -This resource given a cluster id will help you create, get and delete a azure blob storage mount using SAS token or -storage account access keys. - -.. Warning:: It is important to understand that this will start up the cluster if the cluster is terminated. - The read and refresh terraform command will require a cluster and make take some time to validate mount. - -.. Important:: You can locate the mount in dbfs at `dbfs:/mnt/` - - -## Example Usage - -With the below resource the data gets mounted to `/mnt/my_cool_dbfs_mount` - -.. code-block:: tf - - resource "databricks_azure_blob_mount" "my_custom_mount" { - cluster_id = "####-######-pear###" - container_name = "my_storage_container" - directory = "/my_custom_folder" - storage_account_name = "mystorageaccountname" - mount_name = "my_cool_blob_storage_mount" - auth_type = "SAS" - token_secret_scope = "my_secret_scope" - token_secret_key = "my_secret_key" - } - - -## Argument Reference - -The following arguments are supported: - -.. _r_azure_blob_mount_cluster_id: -* :ref:`cluster_id ` - **(Required)** This is the cluster id in which the mount will be initalized -from. If the cluster is in a terminated state it will be started. - -.. _r_azure_blob_mount_container_name: -* :ref:`container_name ` - **(Required)** The container in which the data is. This -is what you are trying to mount. - -.. _r_azure_blob_mount_storage_account_name: -* :ref:`storage_account_name ` - **(Required)** The name of the storage account -in which the data is. This is what you are trying to mount. - -.. _r_azure_blob_mount_directory: -* :ref:`directory ` - **(Optional)** This is optional if you want to add an additional -directory that you wish to mount. This must start with a "/" - -.. _r_azure_blob_mount_mount_name: -* :ref:`mount_name ` - **(Required)** The name of the folder that you want to mount to -in dbfs. You can access the data from `/mnt/` - -.. _r_azure_blob_mount_auth_type: -* :ref:`auth_type ` - **(Required)** This is the auth type for blob storage. This can either -be SAS tokens or account access keys. - -.. _r_azure_blob_mount_token_secret_scope: -* :ref:`token_secret_scope ` - **(Required)** This is the secret scope in which -your auth type token exists in. - -.. _r_azure_blob_mount_token_secret_key: -* :ref:`token_secret_key ` - **(Required)** This is the secret key in which -your auth type token exists in. - - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_azure_blob_mount_id: -* :ref:`id ` - The id of the azure blob storage mount. - - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_cluster.md b/docs/source/provider/resources/db_cluster.md deleted file mode 100644 index cc54a2bb1..000000000 --- a/docs/source/provider/resources/db_cluster.md +++ /dev/null @@ -1,322 +0,0 @@ -# Resource: databricks_cluster - -This resource allows you to create, update, and delete clusters. - -## Example Usage - -.. code-block:: tf - - resource "databricks_cluster" "my-cluster" { - num_workers = "2" - cluster_name = "sri-test" - spark_version = "6.4.x-scala2.11" - node_type_id = "i3.2xlarge" - autotermination_minutes = 30 - aws_attributes { - availability = "ON_DEMAND" - zone_id = "us-east-1" - instance_profile_arn = "arn:aws:iam::999999999999:instance-profile/s3-access" - } - } - -## Argument Reference - -The following arguments are supported: - -.. _r_cluster_num_workers: -* :ref:`num_workers ` - **(Optional)** Number of worker nodes that this cluster should have. -A cluster has one Spark Driver and num_workers Executors for a total of num_workers + 1 Spark node - -.. _r_cluster_autoscale: -* :ref:`autoscale ` - **(Optional)** Parameters needed in order to automatically scale clusters up -and down based on load. - - * `min_workers` - **(Optional)** The minimum number of workers to which the cluster can scale down when - underutilized. It is also the initial number of workers the cluster will have after creation. - - * `max_workers` - **(Optional)** The maximum number of workers to which the cluster can scale up when - overloaded. max_workers must be strictly greater than min_workers. - -.. _r_cluster_cluster_name: -* :ref:`cluster_name ` - **(Optional)** Cluster name. This doesn’t have to be unique. -If not specified at creation, the cluster name will be an empty string. - -.. _r_cluster_spark_version: -* :ref:`spark_version ` - **(Optional)** The Spark version of the cluster. A list of available -Spark versions can be retrieved by using the Runtime Versions API call. This field is required. - -.. _r_cluster_spark_conf: -* :ref:`spark_conf ` - **(Optional)** An object containing a set of optional, user-specified Spark -configuration key-value pairs. You can also pass in a string of extra JVM options to the driver and the executors via -spark.driver.extraJavaOptions and spark.executor.extraJavaOptions respectively. - -.. _r_cluster_aws_attributes: -* :ref:`aws_attributes ` - **(Optional)** Attributes related to clusters running on -Amazon Web Services. If not specified at cluster creation, a set of default values will be used. - - * `zone_id` - **(Required)** Identifier for the availability zone/datacenter in which the cluster resides. - This string will be of a form like “us-west-2a”. The provided availability zone must be in the same region as the - Databricks deployment. For example, “us-west-2a” is not a valid zone ID if the Databricks deployment resides in the - “us-east-1” region. - - * `availability` - **(Optional)** Availability type used for all subsequent nodes past the first_on_demand - ones. Note: If first_on_demand is zero, this availability type will be used for the entire cluster. - - * `spot_bid_price_percent` - **(Optional)** The max price for AWS spot instances, as a percentage of the - corresponding instance type’s on-demand price. For example, if this field is set to 50, and the cluster needs a new - i3.xlarge spot instance, then the max price is half of the price of on-demand i3.xlarge instances. Similarly, if - this field is set to 200, the max price is twice the price of on-demand i3.xlarge instances. If not specified, the - default value is 100. When spot instances are requested for this cluster, only spot instances whose max price - percentage matches this field will be considered. For safety, we enforce this field to be no more than 10000. - - * `instance_profile_arn` - **(Optional)** Nodes for this cluster will only be placed on AWS instances with - this instance profile. If omitted, nodes will be placed on instances without an instance profile. The instance - profile must have previously been added to the Databricks environment by an account administrator. - - * `first_on_demand` - **(Optional)** The first first_on_demand nodes of the cluster will be placed on on-demand - instances. If this value is greater than 0, the cluster driver node will be placed on an on-demand instance. If this - value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this - value is less than the current cluster size, first_on_demand nodes will be placed on on-demand instances and the - remainder will be placed on availability instances. This value does not affect cluster size and cannot be mutated - over the lifetime of a cluster. - - * `ebs_volume_type` - **(Optional)** The type of EBS volumes that will be launched with this cluster. - GENERAL_PURPOSE_SSD or THROUGHPUT_OPTIMIZED_HDD - - * `ebs_volume_count` - **(Optional)** The number of volumes launched for each instance. You can choose up to - 10 volumes. This feature is only enabled for supported node types. Legacy node types cannot specify custom EBS - volumes. For node types with no instance store, at least one EBS volume needs to be specified; otherwise, cluster - creation will fail. These EBS volumes will be mounted at /ebs0, /ebs1, and etc. Instance store volumes will - be mounted at /local_disk0, /local_disk1, and etc. If EBS volumes are attached, Databricks will configure Spark - to use only the EBS volumes for scratch storage because heterogeneously sized scratch devices can lead to - inefficient disk utilization. If no EBS volumes are attached, Databricks will configure Spark to use instance - store volumes. If EBS volumes are specified, then the Spark configuration spark.local.dir will be overridden. - - * `ebs_volume_size` - **(Optional)** The size of each EBS volume (in GiB) launched for each instance. - For general purpose SSD, this value must be within the range 100 - 4096. For throughput optimized HDD, this - value must be within the range 500 - 4096. Custom EBS volumes cannot be specified for the legacy node types - (memory-optimized and compute-optimized). - -.. _r_cluster_driver_node_type_id: -* :ref:`driver_node_type_id ` - **(Optional)** The node type of the Spark driver. This field -is optional; if unset, the driver node type will be set as the same value as node_type_id defined above. - -.. _r_cluster_node_type_id: -* :ref:`node_type_id ` - **(Optional)** This field encodes, through a single value, the resources -available to each of the Spark nodes in this cluster. For example, the Spark nodes can be provisioned and optimized for -memory or compute intensive workloads A list of available node types can be retrieved by using the List Node Types API -call. This field is required. - -.. _r_cluster_ssh_public_keys: -* :ref:`ssh_public_keys ` - **(Optional)** SSH public key contents that will be added to each -Spark node in this cluster. The corresponding private keys can be used to login with the user name ubuntu on port 2200. -Up to 10 keys can be specified. - -.. _r_cluster_custom_tags: -* :ref:`custom_tags ` - **(Optional)** Additional tags for cluster resources. Databricks will tag all -cluster resources (e.g., AWS instances and EBS volumes) with these tags in addition to default_tags. - -.. _r_cluster_cluster_log_conf: -* :ref:`cluster_log_conf ` - **(Optional)** The configuration for delivering Spark logs to a -long-term storage destination. Only one destination can be specified for one cluster. If the conf is given, the logs -will be delivered to the destination every 5 mins. The destination of driver logs is //driver, -while the destination of executor logs is //executor. - - * `dbfs_destination` - **(Optional)** DBFS location of cluster log. destination must be provided. For example, - "dbfs:/home/cluster_log" - - * `s3_destination` - **(Optional)** S3 destination, e.g. s3://my-bucket/some-prefix You must configure the - cluster with an instance profile and the instance profile must have write access to the destination. You cannot use - AWS keys. - - * `s3_region` - **(Optional)** S3 region, e.g. us-west-2. Either region or endpoint must be set. If both are - set, endpoint is used. - - * `s3_endpoint` - **(Optional)** S3 endpoint, e.g. https://s3-us-west-2.amazonaws.com. Either region or endpoint - needs to be set. If both are set, endpoint is used. - - * `s3_enable_encryption` - **(Optional)** Enable server side encryption, false by default. - - * `s3_encryption_type` - **(Optional)** The encryption type, it could be sse-s3 or sse-kms. - It is used only when encryption is enabled and the default type is sse-s3. - - * `s3_kms_key` - **(Optional)** KMS key used if encryption is enabled and encryption type is set to sse-kms. - - * `s3_canned_acl` - **(Optional)** Set canned access control list, e.g. bucket-owner-full-control. - If canned_cal is set, the cluster instance profile must have s3:PutObjectAcl permission on the destination bucket - and prefix. The full list of possible canned ACL can be found [here](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl). - By default only the object owner gets full control. If you are using cross account role for writing data, you may - want to set bucket-owner-full-control to make bucket owner able to read the logs. - -.. _r_cluster_init_scripts: -* :ref:`init_scripts ` - **(Optional)** The configuration for storing init scripts. Any number of -scripts can be specified. The scripts are executed sequentially in the order provided. If cluster_log_conf is specified, -init script logs are sent to //init_scripts. - - * `dbfs_destination` - **(Optional)** DBFS location of init script. Destination must be provided. For example, - "dbfs:/home/cluster_log" - - * `s3_destination` - **(Optional)** S3 destination, e.g. s3://my-bucket/some-prefix You must configure the - cluster with an instance profile and the instance profile must have write access to the destination. You cannot use - AWS keys. - - * `s3_region` - **(Optional)** S3 region, e.g. us-west-2. Either region or endpoint must be set. If both are - set, endpoint is used. - - * `s3_endpoint` - **(Optional)** S3 endpoint, e.g. https://s3-us-west-2.amazonaws.com. Either region or endpoint - needs to be set. If both are set, endpoint is used. - -.. _r_cluster_docker_image: -* :ref:`docker_image ` - **(Optional)** Docker image for a custom container. - - * `url` - **(Required)** URL for the Docker image. - - * `username` - **(Required)** User name for the Docker repository. - - * `password` - **(Required)** Password for the Docker repository. (Sensitive field) - -.. _r_cluster_spark_env_vars: -* :ref:`spark_env_vars ` - **(Optional)** An object containing a set of optional, user-specified -environment variable key-value pairs. Key-value pair of the form (X,Y) are exported as is (i.e., export X='Y') while -launching the driver and workers. To specify an additional set of SPARK_DAEMON_JAVA_OPTS, we recommend appending them -to $SPARK_DAEMON_JAVA_OPTS as shown in the example below. This ensures that all default databricks managed environmental -variables are included as well. - -.. _r_cluster_autotermination_minutes: -* :ref:`autotermination_minutes ` - **(Optional)** Automatically terminates the -cluster after it is inactive for this time in minutes. If not set, this cluster will not be automatically terminated. -If specified, the threshold must be between 10 and 10000 minutes. You can also set this value to 0 to explicitly -disable automatic termination. - -.. _r_cluster_enable_elastic_disk: -* :ref:`enable_elastic_disk ` - **(Optional)** Autoscaling Local Storage: when enabled, -this cluster dynamically acquires additional disk space when its Spark workers are running low on disk space. This -feature requires specific AWS permissions to function correctly - refer to Autoscaling local storage for details. - -.. _r_cluster_instance_pool_id: -* :ref:`instance_pool_id ` - **(Optional)** The optional ID of the instance pool to which the -cluster belongs. Refer to Instance Pools API for details. - -.. _r_cluster_idempotency_token: -* :ref:`idempotency_token ` - **(Optional)** An optional token that can be -used to guarantee the idempotency of cluster creation requests. If an active cluster with the provided token already -exists, the request will not create a new cluster, but it will return the ID of the existing cluster instead. The -existence of a cluster with the same token is not checked against terminated clusters. If you specify the idempotency -token, upon failure you can retry until the request succeeds. Databricks will guarantee that exactly one cluster will -be launched with that idempotency token. This token should have at most 64 characters. - -.. _r_job_library_jar: -* :ref:`library_jar ` - **(Optional)** URI of the JAR to be installed. -DBFS and S3 URIs are supported. For example: "dbfs:/mnt/databricks/library.jar", "s3://my-bucket/library.jar". -If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster with an -instance profile to access the S3 URI. - - * `path` - **(Required)** Path of the jar in dbfs or in S3. For example: "dbfs:/mnt/databricks/library.jar", - "s3://my-bucket/library.jar". - - * `messages` - **(Required)** Messages of the results of the library installation - - * `status` - **(Required)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, - INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. - - -.. _r_job_library_egg: -* :ref:`existing_cluster_id ` - **(Optional)** URI of the egg to be installed. -DBFS and S3 URIs are supported. For example: "dbfs:/my/egg", "s3://my-bucket/egg" }. -If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster -with an instance profile to access the S3 URI. - - * `path` - **(Required)** Path of the egg in dbfs or in S3. For example: "dbfs:/mnt/databricks/library.egg", - "s3://my-bucket/library.egg". - - * `messages` - **(Required)** Messages of the results of the library installation - - * `status` - **(Required)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, - INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. - -.. _r_job_library_whl: -* :ref:`library_whl ` - **(Optional)** If whl, URI of the wheel or zipped wheels to be installed. -DBFS and S3 URIs are supported. For example: "dbfs:/my/whl", "s3://my-bucket/whl". If S3 is used, make sure the cluster -has read access on the library. You may need to launch the cluster with an instance profile to access the S3 URI. -Also the wheel file name needs to use the correct convention. If zipped wheels are to be installed, the file name -suffix should be .wheelhouse.zip. - - * `path` - **(Required)** Path of the whl in dbfs or in S3. For example: "dbfs:/mnt/databricks/library.whl", - "s3://my-bucket/library.whl". - - * `messages` - **(Required)** Messages of the results of the library installation - - * `status` - **(Required)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, - INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. - -.. _r_job_library_pypi: -* :ref:`library_pypi ` - **(Optional)** Specification of a PyPI library to be installed. - - * `package` - **(Required)** The name of the PyPI package to install. An optional exact version specification - is also supported. Examples: simplejson and simplejson==3.8.0. This field is required. - - * `repo` - **(Optional)** The repository where the package can be found. If not specified, - the default pip index is used. - - * `messages` - **(Required)** Messages of the results of the library installation - - * `status` - **(Required)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, - INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. - -.. _r_job_library_maven: -* :ref:`library_maven ` - **(Optional)** Specification of a Maven library to be installed. - - * `coordinates` - **(Required)** Gradle-style Maven coordinates. For example: org.jsoup:jsoup:1.7.2. - This field is required. - - * `repo` - **(Optional)** Maven repo to install the Maven package from. If omitted, both Maven Central - Repository and Spark Packages are searched. - - * `exclusions` - **(Optional)** List of dependences to exclude. For example: - ("slf4j:slf4j", "*:hadoop-client"). - - * `messages` - **(Required)** Messages of the results of the library installation - - * `status` - **(Required)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, - INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. - -.. _r_job_library_cran: -* :ref:`library_cran ` - **(Optional)** Specification of a CRAN library to be installed. - - * `package` - **(Required)** The name of the CRAN package to install. This field is required. - - * `repo` - **(Optional)** The repository where the package can be found. If not specified, - the default CRAN repo is used. - - * `messages` - **(Required)** Messages of the results of the library installation - - * `status` - **(Required)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, - INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_cluster_id: -* :ref:`id ` - The id for the cluster object. - -.. _r_cluster_cluster_id: -* :ref:`cluster_id ` - Canonical identifier for the cluster. - -.. _r_cluster_default_tags: -* :ref:`default_tags ` - Tags that are added by Databricks by default, regardless of any -custom_tags that may have been added. These include: Vendor: Databricks, Creator: , ClusterName: -, ClusterId: , Name: - -.. _r_cluster_state: -* :ref:`state ` - State of the cluster. - -.. _r_cluster_state_message: -* :ref:`state_message ` - A message associated with the most recent state transition -(e.g., the reason why the cluster entered a TERMINATED state). This field is unstructured, and its exact format -is subject to change. - - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_dbfs_file.md b/docs/source/provider/resources/db_dbfs_file.md deleted file mode 100644 index 1a17d2fd5..000000000 --- a/docs/source/provider/resources/db_dbfs_file.md +++ /dev/null @@ -1,54 +0,0 @@ -# Resource: databricks_dbfs_file - -This is a resource that lets you create, get and delete files in DBFS (Databricks File System). - -## Example Usage - -.. code-block:: tf - - resource "databricks_dbfs_file" "my_dbfs_file" { - content = filebase64("README.md") - path = "/sri/terraformdbfs/example/README.md" - overwrite = true - mkdirs = true - validate_remote_file = true - } - -## Argument Reference - -The following arguments are supported: - -.. _r_dbfs_file_content: -* :ref:`content ` - **(Required)** The content of the file as a base64 encoded string. - -.. _r_dbfs_file_path: -* :ref:`path ` - **(Optional)** The path of the file in which you wish to save. - -.. _r_dbfs_file_overwrite: -* :ref:`overwrite ` - **(Optional)** This is used to determine whether it should delete the -existing file when with the same name when it writes. The default is set to false. - -.. _r_dbfs_file_mkdirs: -* :ref:`mkdirs ` - **(Optional)** When the resource is created, this field is used to determine -if it needs to make the parent directories. The default value is set to true. - -.. _r_dbfs_file_validate_remote_file: -* :ref:`validate_remote_file ` - **(Optional)** This is used to compare the -actual contents of the file to determine if the remote file is valid or not. If the base64 content is different -it will attempt to do a delete, create. - - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_dbfs_file_id: -* :ref:`id ` - The id for the dbfs file object. - -.. _r_dbfs_file_file_size: -* :ref:`file_size ` - The file size of the file that is being tracked by this resource in bytes. - - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_dbfs_file_sync.md b/docs/source/provider/resources/db_dbfs_file_sync.md deleted file mode 100644 index 06bcc7fe5..000000000 --- a/docs/source/provider/resources/db_dbfs_file_sync.md +++ /dev/null @@ -1,71 +0,0 @@ -# Resource: databricks_dbfs_file_sync - -This resource will let you create a dbfs file sync which will synchronize files between systems depending on file size -changes. - -.. Warning This dbfs file sync resource only determines differences via file size so if data changes but file size does not -it will provide a false negative in terms of determining difference. - -## Example Usage - -.. code-block:: tf - - - data "databricks_dbfs_file" "my_dbfs_file_data" { - path = "/install_wheels_sri.sh" - limit_file_size = true - } - - resource "databricks_dbfs_file_sync" "my-file1-sync" { - src_path = data.databricks_dbfs_file.my_dbfs_file_data.path - tgt_path = "/terraformdbfs/example/wheels.sh" - file_size = data.databricks_dbfs_file.my-dbfs-file-data.file_size - mkdirs = true - - host = "https://.com/" - token = "dapiherehereherehere" - } - - - -## Argument Reference - -The following arguments are supported: - -.. _r_dbfs_file_sync_src_path: -* :ref:`src_path ` - **(Required)** The source path in dbfs where to fetch the file from. -It should look like "dbfs:/path/to/my/file". - -.. _r_dbfs_file_sync_tgt_path: -* :ref:`tgt_path ` - **(Required)** The target path in dbfs where to sync the file to. -It should look like "dbfs:/path/to/my/file". - -.. _r_dbfs_file_sync_file_size: -* :ref:`file_size ` - **(Required)** This is the value that is used to determine file change. -Unfortunately at this point in time there are no file checksums provided by the dbfs api. To download the file everytime -terraform provides a Read operation during state refresh is not efficient. - -.. _r_dbfs_file_sync_mkdirs: -* :ref:`mkdirs ` - **(Optional)** This is whether the resource should create the required, -parent directories to sync the file. The default value is true. - -.. _r_dbfs_file_sync_host: -* :ref:`host ` - **(Optional)** This is an optional api host for the databricks api if the source -file resides on another workspace/dbfs system. - -.. _r_dbfs_file_sync_token: -* :ref:`token ` - **(Optional)** This is an optional api token for the databricks api if the source -file resides on another workspace/dbfs system. - - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_dbfs_file_sync_id: -* :ref:`id ` - Id for the file sync object. - - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_instance_pool.md b/docs/source/provider/resources/db_instance_pool.md deleted file mode 100644 index 0cb41be75..000000000 --- a/docs/source/provider/resources/db_instance_pool.md +++ /dev/null @@ -1,248 +0,0 @@ -# Resource: databricks_instance_pool - -This resource allows you to manage instance pools on Databricks. - -An instance pool reduces cluster start and auto-scaling times by maintaining a set of idle, ready-to-use cloud instances. -When a cluster attached to a pool needs an instance, it first attempts to allocate one of the pool’s idle instances. -If the pool has no idle instances, it expands by allocating a new instance from the instance provider in order to -accommodate the cluster’s request. When a cluster releases an instance, it returns to the pool and is free for another -cluster to use. Only clusters attached to a pool can use that pool’s idle instances. - - -## Example Usage - -.. Note:: It is important to know what that different cloud service providers have different `node_type_id`, - `disk_specs` and potentially other configurations. - -### Databricks Example (AWS) - -.. code-block:: tf - - resource "databricks_instance_pool" "my-pool" { - instance_pool_name = "demo-terraform-pool" - min_idle_instances = 0 - max_capacity = 5 - node_type_id = "i3.xlarge" - aws_attributes { - availability = "ON_DEMAND" - zone_id = "us-east-1a" - spot_bid_price_percent = "100" - } - idle_instance_autotermination_minutes = 10 - disk_spec = { - ebs_volume_type = "GENERAL_PURPOSE_SSD" - disk_size = 80 - disk_count = 1 - } - custom_tags = { - "creator": "Sriharsha Tikkireddy" - "testChange": "Sri Tikkireddy" - } - } - -### Databricks Example (Azure) - -.. code-block:: tf - - resource "databricks_instance_pool" "my-pool" { - instance_pool_name = "demo-terraform-pool" - min_idle_instances = 0 - max_capacity = 5 - node_type_id = "Standard_DS3_v2" - idle_instance_autotermination_minutes = 10 - disk_spec = { - azure_disk_volume_type = "PREMIUM_LRS" - disk_size = 80 - disk_count = 1 - } - custom_tags = { - "creator": "demo user" - "testChange": "demo user" - } - } - - -## Argument Reference - -The following arguments are supported: - -.. _r_instance_pool_instance_pool_name: -* :ref:`instance_pool_name ` - **(Required)** The name of the instance pool. This -is required for create and edit operations. It must be unique, non-empty, and less than 100 characters. - -.. _r_instance_pool_min_idle_instances: -* :ref:`min_idle_instances ` - **(Required)** The minimum number of idle -instances maintained by the pool. This is in addition to any instances in use by active clusters. - -.. _r_instance_pool_max_capacity: -* :ref:`max_capacity ` - **(Required)** The maximum number of instances the pool can -contain, including both idle instances and ones in use by clusters. Once the maximum capacity is reached, you cannot -create new clusters from the pool and existing clusters cannot autoscale up until some instances are made idle in the -pool via cluster termination or down-scaling. - -.. _r_instance_pool_idle_instance_autotermination_minutes: -* :ref:`idle_instance_autotermination_minutes ` - **(Required)** -The number of minutes that idle instances in excess of the min_idle_instances are maintained by the pool before being -terminated. If not specified, excess idle instances are terminated automatically after a default timeout period. If -specified, the time must be between 0 and 10000 minutes. If you specify 0, excess idle instances are removed as soon -as possible. - -.. _r_instance_pool_aws_attributes: -* :ref:`aws_attributes ` - **(Optional)** Attributes related to instance pools running -on Amazon Web Services. If not specified at creation time, a set of default values is used. This block contains the -following attributes of `availability`, `zone_id`, `spot_bid_price_percent`: - - * `availability` - **(Optional)** Availability type used for all instances in the pool. Only `"ON_DEMAND"` and - `"SPOT"` are supported. - * `zone_id` - **(Optional)** Identifier for the availability zone/datacenter in which the instance pool resides. - This string is of a form like `"us-west-2a"`. The provided availability zone must be in the same region as the - Databricks deployment. For example, `"us-west-2a"` is not a valid zone ID if the Databricks deployment resides - in the `"us-east-1"` region. This is an optional field. If not specified, a default zone is used. - You can find the list of available zones as well as the default value by using the - [List Zones API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistavailablezones). - * `spot_bid_price_percent` - **(Optional)** The max price for AWS spot instances, as a percentage of the corresponding - instance type’s on-demand price. For example, if this field is set to 50, and the instance pool needs a new i3.xlarge - spot instance, then the max price is half of the price of on-demand i3.xlarge instances. Similarly, if this field - is set to 200, the max price is twice the price of on-demand i3.xlarge instances. If not specified, the **default - value is 100**. When spot instances are requested for this instance pool, only spot instances whose max price - percentage matches this field are considered. *For safety, this field cannot be greater than 10000.* - -.. Important:: **aws_attributes** will only work for instance pools in an AWS deployment of Databricks. They will **not** work - on Azure Databricks! - -.. _r_instance_pool_node_type_id: -* :ref:`node_type_id ` - **(Required)** The node type for the instances in the pool. All -clusters attached to the pool inherit this node type and the pool’s idle instances are allocated based on this type. -You can retrieve a list of available node types by using the -[List Node Types API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistnodetypes) call. - -.. _r_instance_pool_custom_tags: -* :ref:`custom_tags ` - **(Optional)** Additional tags for instance pool resources. Databricks -tags all pool resources (e.g. AWS & Azure instances and Disk volumes) with these tags in addition to default_tags. -**Databricks allows at most 43 custom tags.** - -.. _r_instance_pool_enable_elastic_disk: -* :ref:`enable_elastic_disk ` - **(Optional)** Autoscaling Local Storage: when -enabled, the instances in the pool dynamically acquire additional disk space when they are running low on disk space. - -.. _r_instance_pool_disk_spec: -* :ref:`disk_spec ` - **(Optional)** Defines the amount of initial remote storage attached -to each instance in the pool. This block contains the following attributes of `ebs_volume_type`, -`azure_disk_volume_type`, `disk_count`, `disk_size`: - - * `ebs_volume_type` - **(Optional)** The EBS volume type to use. - Options are: `"GENERAL_PURPOSE_SSD"` (Provision extra storage using AWS gp2 EBS volumes) or - `"THROUGHPUT_OPTIMIZED_HDD"` (Provision extra storage using AWS st1 volumes.) - - * `azure_disk_volume_type` - **(Optional)** The type of Azure disk to use. - Options are: `"PREMIUM_LRS"` (Premium storage tier, backed by SSDs) - or `"STANDARD_LRS"` (Standard storage tier, backed by HDDs.) - - * `disk_count` - **(Optional)** The number of disks to attach to each instance: - * This feature is only enabled for supported node types. - * Users can choose up to the limit of the disks supported by the node type. - * For node types with no local disk, at least one disk needs to be specified. - - * `disk_size` - **(Optional)** The size of each disk (in GiB) to attach. Values must fall into the supported range - for a particular instance type: - * **AWS (ebs)**: - * General Purpose SSD: `100 - 4096` GiB - * Throughput Optimized HDD: `500 - 4096` GiB - * **Azure (disk volume)**: - * Premium LRS (SSD): `1 - 1023` GiB - * Standard LRS (HDD): `1- 1023` GiB - -.. Important:: For disk_spec make sure to use **ebs_volume_type** only on AWS deployment of Databricks and - **azure_disk_volume_type** only on a Azure deployment of Databricks. - -.. _r_instance_pool_preloaded_spark_versions: -* :ref:`preloaded_spark_versions ` - **(Optional)** A list with the -runtime version the pool installs on each instance. Pool clusters that use a preloaded runtime version start faster -as they do have to wait for the image to download. You can retrieve a list of available runtime versions by using the -[Runtime Versions API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistsparkversions) -call. - - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_instance_pool_id: -* :ref:`id ` - The id for the instance pool object. - -.. _r_instance_pool_instance_pool_name1: -* :ref:`instance_pool_name ` - The name of the instance pool. - -.. _r_instance_pool_min_idle_instances1: -* :ref:`min_idle_instances ` - The minimum number of idle -instances maintained by the pool. This is in addition to any instances in use by active clusters. - -.. _r_instance_pool_max_capacity1: -* :ref:`max_capacity ` - The maximum number of instances the pool can -contain, including both idle instances and ones in use by clusters. Once the maximum capacity is reached, you cannot -create new clusters from the pool and existing clusters cannot autoscale up until some instances are made idle in the -pool via cluster termination or down-scaling. - -.. _r_instance_pool_idle_instance_autotermination_minutes1: -* :ref:`idle_instance_autotermination_minutes ` - The -number of minutes that idle instances in excess of the min_idle_instances are maintained by the pool before being -terminated. - -.. _r_instance_pool_aws_attributes1: -* :ref:`aws_attributes ` - Attributes related to instance pools running -on Amazon Web Services. If not specified at creation time, a set of default values is used. This block contains the -following attributes of `availability`, `zone_id`, `spot_bid_price_percent`: - - * `availability` - Availability type used for all instances in the pool. - * `zone_id` - Identifier for the availability zone/datacenter in which the instance pool resides. - * `spot_bid_price_percent` - The max price for AWS spot instances, as a percentage of the corresponding - instance type’s on-demand price. - -.. _r_instance_pool_node_type_id1: -* :ref:`node_type_id ` - The node type for the instances in the pool. All -clusters attached to the pool inherit this node type and the pool’s idle instances are allocated based on this type. - -.. _r_instance_pool_default_tags: -* :ref:`instance_pool_name ` - Tags that are added by Databricks regardless of any -custom_tags, including: - * **Vendor**: Databricks - * **DatabricksInstancePoolCreatorId**: - * **DatabricksInstancePoolId**: - -.. _r_instance_pool_custom_tags1: -* :ref:`custom_tags ` - Additional tags for instance pool resources. Databricks -tags all pool resources (e.g. AWS & Azure instances and Disk volumes) with these tags in addition to default_tags. - -.. _r_instance_pool_enable_elastic_disk1: -* :ref:`enable_elastic_disk ` - Autoscaling Local Storage: when -enabled, the instances in the pool dynamically acquire additional disk space when they are running low on disk space. - -.. _r_instance_pool_disk_spec1: -* :ref:`disk_spec ` - Defines the amount of initial remote storage attached -to each instance in the pool. This block contains the following attributes of `ebs_volume_type`, -`azure_disk_volume_type`, `disk_count`, `disk_size`: - - * `ebs_volume_type` - The EBS volume type to use. - Options are: `"GENERAL_PURPOSE_SSD"` (Provision extra storage using AWS gp2 EBS volumes) or - `"THROUGHPUT_OPTIMIZED_HDD"` (Provision extra storage using AWS st1 volumes.) - - * `azure_disk_volume_type` - The type of Azure disk to use. - Options are: `"PREMIUM_LRS"` (Premium storage tier, backed by SSDs) - or `"STANDARD_LRS"` (Standard storage tier, backed by HDDs.) - - * `disk_count` - The number of disks to attach to each instance. - - * `disk_size` - The size of each disk (in GiB) to attach. - -.. _r_instance_pool_preloaded_spark_versions1: -* :ref:`preloaded_spark_versions ` - A list with the -runtime version the pool installs on each instance. Pool clusters that use a preloaded runtime version start faster -as they do have to wait for the image to download. - -.. _r_instance_pool_state: -* :ref:`state ` - Current state of the instance pool. - -## Import - -.. Note:: Importing this resource is not currently supported. - diff --git a/docs/source/provider/resources/db_instance_profile.md b/docs/source/provider/resources/db_instance_profile.md deleted file mode 100644 index d789bd49d..000000000 --- a/docs/source/provider/resources/db_instance_profile.md +++ /dev/null @@ -1,35 +0,0 @@ -# Resource: databricks_instance_profile - -This resource allows you to create, get, and delete instance profiles that users can launch clusters with. - -## Example Usage - -.. code-block:: tf - - resource "databricks_instance_profile" "db-instance-profile" { - instance_profile_arn = "arn:aws:iam::999999999999:instance-profile/custom-s3-access-instance-profile" - skip_validation = true - } - -## Argument Reference - -The following arguments are supported: - -.. _r_instance_profile_instance_profile_arn: -* :ref:`instance_profile_arn ` - **(Required)** - -.. _r_instance_profile_skip_validation: -* :ref:`skip_validation ` - **(Required)** - - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_instance_profile_id: -* :ref:`id ` - The id for the instance profile object. - - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_job.md b/docs/source/provider/resources/db_job.md deleted file mode 100644 index 091c2871a..000000000 --- a/docs/source/provider/resources/db_job.md +++ /dev/null @@ -1,390 +0,0 @@ -# Resource: databricks_job - -The databricks_job resource allows you to create, edit, and delete jobs. - - -## Example Usage - -### Databricks Example (New Job Cluster) - -.. code-block:: tf - - resource "databricks_job" "my_job3" { - new_cluster { - autoscale { - min_workers = 2 - max_workers = 3 - } - spark_version = "6.4.x-scala2.11" - aws_attributes { - zone_id = data.databricks_zones.my_wspace_zones.default_zone - spot_bid_price_percent = "100" - } - node_type_id = "r3.xlarge" - } - notebook_path = "/Users/jane.doe@databricks.com/my-demo-notebook" - name = "my-demo-notebook" - timeout_seconds = 3600 - max_retries = 1 - max_concurrent_runs = 1 - } - -### Databricks Example (Existing Cluster) - -.. code-block:: tf - - resource "databricks_job" "my_job3" { - existing_cluster_id = "" - notebook_path = "/Users/jane.doe@databricks.com/my-demo-notebook" - name = "my-demo-notebook" - timeout_seconds = 3600 - max_retries = 1 - max_concurrent_runs = 1 - } - - -## Argument Reference - -The following arguments are supported: - -.. _r_job_existing_cluster_id: -* :ref:`existing_cluster_id ` - **(Optional)** If existing_cluster_id, the ID of an existing -cluster that will be used for all runs of this job. When running jobs on an existing cluster, you may need to manually -restart the cluster if it stops responding. We suggest running jobs on new clusters for greater reliability. - -.. _r_job_new_cluster: -* :ref:`new_cluster ` - **(Optional)** A description of a cluster that will be created for each run. -Please look [below](#cluster-block-reference). - -.. _r_job_name: -* :ref:`name ` - **(Optional)** An optional name for the job. The default value is Untitled. - -.. _r_job_library_jar: -* :ref:`library_jar ` - **(Optional)** URI of the JAR to be installed. -DBFS and S3 URIs are supported. For example: "dbfs:/mnt/databricks/library.jar", "s3://my-bucket/library.jar". -If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster with an -instance profile to access the S3 URI. - -.. _r_job_library_egg: -* :ref:`existing_cluster_id ` - **(Optional)** URI of the egg to be installed. -DBFS and S3 URIs are supported. For example: "dbfs:/my/egg", "s3://my-bucket/egg" }. -If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster -with an instance profile to access the S3 URI. - -.. _r_job_library_whl: -* :ref:`library_whl ` - **(Optional)** If whl, URI of the wheel or zipped wheels to be installed. -DBFS and S3 URIs are supported. For example: "dbfs:/my/whl", "s3://my-bucket/whl". If S3 is used, make sure the cluster -has read access on the library. You may need to launch the cluster with an instance profile to access the S3 URI. -Also the wheel file name needs to use the correct convention. If zipped wheels are to be installed, the file name -suffix should be .wheelhouse.zip. - -.. _r_job_library_pypi: -* :ref:`library_pypi ` - **(Optional)** Specification of a PyPI library to be installed. - - * `package` - **(Required)** The name of the PyPI package to install. An optional exact version specification - is also supported. Examples: simplejson and simplejson==3.8.0. This field is required. - - * `repo` - **(Optional)** The repository where the package can be found. If not specified, - the default pip index is used. - -.. _r_job_library_maven: -* :ref:`library_maven ` - **(Optional)** Specification of a Maven library to be installed. - - * `coordinates` - **(Required)** Gradle-style Maven coordinates. For example: org.jsoup:jsoup:1.7.2. - This field is required. - - * `repo` - **(Optional)** Maven repo to install the Maven package from. If omitted, both Maven Central - Repository and Spark Packages are searched. - - * `exclusions` - **(Optional)** List of dependences to exclude. For example: - ("slf4j:slf4j", "*:hadoop-client"). - -.. _r_job_library_cran: -* :ref:`library_cran ` - **(Optional)** Specification of a CRAN library to be installed. - - * `package` - **(Required)** The name of the CRAN package to install. This field is required. - - * `repo` - **(Optional)** The repository where the package can be found. If not specified, - the default CRAN repo is used. - - -.. _r_job_notebook_path: -* :ref:`notebook_path ` - **(Optional)** The absolute path of the notebook to be run in the -Databricks Workspace. This path must begin with a slash. This field is required. - -.. _r_job_notebook_base_parameters: -* :ref:`r_job_notebook_base_parameters ` - **(Optional)** Base parameters to be used -for each run of this job. If the run is initiated by a call to run-now with parameters specified, the two parameters -maps will be merged. If the same key is specified in base_parameters and in run-now, the value from run-now will be used. - -.. _r_job_jar_uri: -* :ref:`jar_uri ` - **(Optional)** Deprecated since 04/2016. Provide a jar through the libraries -field instead. - -.. _r_job_jar_main_class_name: -* :ref:`jar_main_class_name ` - **(Optional)** The full name of the class containing the -main method to be executed. This class must be contained in a JAR provided as a library. The code should use -SparkContext.getOrCreate to obtain a Spark context; otherwise, runs of the job will fail. - -.. _r_job_jar_parameters: -* :ref:`library_maven ` - **(Optional)** Parameters that will be passed to the main method. - -.. _r_job_python_file: -* :ref:`python_file ` - **(Optional)** The URI of the Python file to be executed. DBFS and S3 paths -are supported. This field is required. - -.. _r_job_python_parameters: -* :ref:`python_parameters ` - **(Optional)** Command line parameters that will be passed to -the Python file. - -.. _r_job_spark_submit_parameters: -* :ref:`spark_submit_parameters ` - **(Optional)** Command-line parameters passed -to spark submit. - -.. _r_job_email_notifications: -* :ref:`email_notifications ` - **(Optional)** An optional set of email addresses notified -when runs of this job begin and complete and when this job is deleted. The default behavior is to not send any emails. - - * `on_start` - **(Optional)** A list of email addresses to be notified when a run begins. - If not specified upon job creation or reset, the list will be empty, i.e., no address will be notified. - - * :`on_success` - **(Optional)** A list of email addresses to be notified when a run successfully completes. - A run is considered to have completed successfully if it ends with a TERMINATED life_cycle_state and a SUCCESSFUL - result_state. If not specified upon job creation or reset, the list will be empty, i.e., no address will be notified. - - * `on_failure` - **(Optional)** A list of email addresses to be notified when a run unsuccessfully completes. - A run is considered to have completed unsuccessfully if it ends with an INTERNAL_ERROR life_cycle_state or a - SKIPPED, FAILED, or TIMED_OUT result_state. If not specified upon job creation or reset, the list will be empty, - i.e., no address will be notified. - - * `no_alert_for_skipped_runs` - **(Optional)** If true, do not send email to recipients specified in - on_failure if the run is skipped. - -.. _r_job_timeout_seconds: -* :ref:`timeout_seconds ` - **(Optional)** An optional timeout applied to each run of this job. -The default behavior is to have no timeout. - -.. _r_job_max_retries: -* :ref:`max_retries ` - **(Optional)** An optional maximum number of times to retry an unsuccessful -run. A run is considered to be unsuccessful if it completes with a FAILED result_state or INTERNAL_ERROR -life_cycle_state. The value -1 means to retry indefinitely and the value 0 means to never retry. The default behavior -is to never retry. - -.. _r_job_min_retry_interval_millis: -* :ref:`min_retry_interval_millis ` - **(Optional)** An optional minimal interval in -milliseconds between the start of the failed run and the subsequent retry run. The default behavior is that -unsuccessful runs are immediately retried. - -.. _r_job_retry_on_timeout: -* :ref:`retry_on_timeout ` - **(Optional)** An optional policy to specify whether to retry -a job when it times out. The default behavior is to not retry on timeout. - -.. _r_job_schedule: -* :ref:`schedule ` - **(Optional)** An optional periodic schedule for this job. -The default behavior is that the job runs when triggered by clicking Run Now in the Jobs UI or sending an API -request to runNow. - - * `quartz_cron_expression` - **(Optional)** A Cron expression using Quartz syntax that describes - the schedule for a job. See [Cron Trigger](http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html) - for details. This field is required. - - * `timezone_id` - **(Optional)** A Java timezone ID. The schedule for a job will be resolved with respect - to this timezone. See [Java TimeZone](https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html) for - details. This field is required. - -.. _r_job_max_concurrent_runs: -* :ref:`max_concurrent_runs ` - **(Optional)** An optional maximum allowed number of -concurrent runs of the job. Set this value if you want to be able to execute multiple runs of the same job concurrently. -This is useful for example if you trigger your job on a frequent schedule and want to allow consecutive runs to overlap -with each other, or if you want to trigger multiple runs which differ by their input parameters. This setting affects -only new runs. For example, suppose the job’s concurrency is 4 and there are 4 concurrent active runs. Then setting -the concurrency to 3 won’t kill any of the active runs. However, from then on, new runs are skipped unless there are -fewer than 3 active runs. This value cannot exceed 150. Setting this value to 0 causes all new runs to be skipped. -The default behavior is to allow only 1 concurrent run. - - -### Cluster Block Reference - - -.. _r_job_num_workers: -* :ref:`num_workers ` - **(Optional)** Number of worker nodes that this cluster should have. -A cluster has one Spark Driver and num_workers Executors for a total of num_workers + 1 Spark node - -.. _r_job_autoscale: -* :ref:`autoscale ` - **(Optional)** Parameters needed in order to automatically scale clusters up -and down based on load. - - * `min_workers` - **(Optional)** The minimum number of workers to which the cluster can scale down when - underutilized. It is also the initial number of workers the cluster will have after creation. - - * `max_workers` - **(Optional)** The maximum number of workers to which the cluster can scale up when - overloaded. max_workers must be strictly greater than min_workers. - -.. _r_job_cluster_name: -* :ref:`cluster_name ` - **(Optional)** Cluster name. This doesn’t have to be unique. -If not specified at creation, the cluster name will be an empty string. - -.. _r_job_spark_version: -* :ref:`spark_version ` - **(Optional)** The Spark version of the cluster. A list of available -Spark versions can be retrieved by using the Runtime Versions API call. This field is required. - -.. _r_job_spark_conf: -* :ref:`spark_conf ` - **(Optional)** An object containing a set of optional, user-specified Spark -configuration key-value pairs. You can also pass in a string of extra JVM options to the driver and the executors via -spark.driver.extraJavaOptions and spark.executor.extraJavaOptions respectively. - -.. _r_job_aws_attributes: -* :ref:`aws_attributes ` - **(Optional)** Attributes related to clusters running on -Amazon Web Services. If not specified at cluster creation, a set of default values will be used. - - * `zone_id` - **(Required)** Identifier for the availability zone/datacenter in which the cluster resides. - This string will be of a form like “us-west-2a”. The provided availability zone must be in the same region as the - Databricks deployment. For example, “us-west-2a” is not a valid zone ID if the Databricks deployment resides in the - “us-east-1” region. - - * `availability` - **(Optional)** Availability type used for all subsequent nodes past the first_on_demand - ones. Note: If first_on_demand is zero, this availability type will be used for the entire cluster. - - * `spot_bid_price_percent` - **(Optional)** The max price for AWS spot instances, as a percentage of the - corresponding instance type’s on-demand price. For example, if this field is set to 50, and the cluster needs a new - i3.xlarge spot instance, then the max price is half of the price of on-demand i3.xlarge instances. Similarly, if - this field is set to 200, the max price is twice the price of on-demand i3.xlarge instances. If not specified, the - default value is 100. When spot instances are requested for this cluster, only spot instances whose max price - percentage matches this field will be considered. For safety, we enforce this field to be no more than 10000. - - * `instance_profile_arn` - **(Optional)** Nodes for this cluster will only be placed on AWS instances with - this instance profile. If omitted, nodes will be placed on instances without an instance profile. The instance - profile must have previously been added to the Databricks environment by an account administrator. - - * `first_on_demand` - **(Optional)** The first first_on_demand nodes of the cluster will be placed on on-demand - instances. If this value is greater than 0, the cluster driver node will be placed on an on-demand instance. If this - value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this - value is less than the current cluster size, first_on_demand nodes will be placed on on-demand instances and the - remainder will be placed on availability instances. This value does not affect cluster size and cannot be mutated - over the lifetime of a cluster. - - * `ebs_volume_type` - **(Optional)** The type of EBS volumes that will be launched with this cluster. - GENERAL_PURPOSE_SSD or THROUGHPUT_OPTIMIZED_HDD - - * `ebs_volume_count` - **(Optional)** The number of volumes launched for each instance. You can choose up to - 10 volumes. This feature is only enabled for supported node types. Legacy node types cannot specify custom EBS - volumes. For node types with no instance store, at least one EBS volume needs to be specified; otherwise, cluster - creation will fail. These EBS volumes will be mounted at /ebs0, /ebs1, and etc. Instance store volumes will - be mounted at /local_disk0, /local_disk1, and etc. If EBS volumes are attached, Databricks will configure Spark - to use only the EBS volumes for scratch storage because heterogeneously sized scratch devices can lead to - inefficient disk utilization. If no EBS volumes are attached, Databricks will configure Spark to use instance - store volumes. If EBS volumes are specified, then the Spark configuration spark.local.dir will be overridden. - - * `ebs_volume_size` - **(Optional)** The size of each EBS volume (in GiB) launched for each instance. - For general purpose SSD, this value must be within the range 100 - 4096. For throughput optimized HDD, this - value must be within the range 500 - 4096. Custom EBS volumes cannot be specified for the legacy node types - (memory-optimized and compute-optimized). - -.. _r_job_driver_node_type_id: -* :ref:`driver_node_type_id ` - **(Optional)** The node type of the Spark driver. This field -is optional; if unset, the driver node type will be set as the same value as node_type_id defined above. - -.. _r_job_node_type_id: -* :ref:`node_type_id ` - **(Optional)** This field encodes, through a single value, the resources -available to each of the Spark nodes in this cluster. For example, the Spark nodes can be provisioned and optimized for -memory or compute intensive workloads A list of available node types can be retrieved by using the List Node Types API -call. This field is required. - -.. _r_job_ssh_public_keys: -* :ref:`ssh_public_keys ` - **(Optional)** SSH public key contents that will be added to each -Spark node in this cluster. The corresponding private keys can be used to login with the user name ubuntu on port 2200. -Up to 10 keys can be specified. - -.. _r_job_custom_tags: -* :ref:`custom_tags ` - **(Optional)** Additional tags for cluster resources. Databricks will tag all -cluster resources (e.g., AWS instances and EBS volumes) with these tags in addition to default_tags. - -.. _r_job_cluster_log_conf: -* :ref:`cluster_log_conf ` - **(Optional)** The configuration for delivering Spark logs to a -long-term storage destination. Only one destination can be specified for one cluster. If the conf is given, the logs -will be delivered to the destination every 5 mins. The destination of driver logs is //driver, -while the destination of executor logs is //executor. - - * `dbfs_destination` - **(Optional)** DBFS location of cluster log. destination must be provided. For example, - "dbfs:/home/cluster_log" - - * `s3_destination` - **(Optional)** S3 destination, e.g. s3://my-bucket/some-prefix You must configure the - cluster with an instance profile and the instance profile must have write access to the destination. You cannot use - AWS keys. - - * `s3_region` - **(Optional)** S3 region, e.g. us-west-2. Either region or endpoint must be set. If both are - set, endpoint is used. - - * `s3_endpoint` - **(Optional)** S3 endpoint, e.g. https://s3-us-west-2.amazonaws.com. Either region or endpoint - needs to be set. If both are set, endpoint is used. - - * `s3_enable_encryption` - **(Optional)** Enable server side encryption, false by default. - - * `s3_encryption_type` - **(Optional)** The encryption type, it could be sse-s3 or sse-kms. - It is used only when encryption is enabled and the default type is sse-s3. - - * `s3_kms_key` - **(Optional)** KMS key used if encryption is enabled and encryption type is set to sse-kms. - - * `s3_canned_acl` - **(Optional)** Set canned access control list, e.g. bucket-owner-full-control. - If canned_cal is set, the cluster instance profile must have s3:PutObjectAcl permission on the destination bucket - and prefix. The full list of possible canned ACL can be found [here](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl). - By default only the object owner gets full control. If you are using cross account role for writing data, you may - want to set bucket-owner-full-control to make bucket owner able to read the logs. - -.. _r_job_init_scripts: -* :ref:`init_scripts ` - **(Optional)** The configuration for storing init scripts. Any number of -scripts can be specified. The scripts are executed sequentially in the order provided. If cluster_log_conf is specified, -init script logs are sent to //init_scripts. - - * `dbfs_destination` - **(Optional)** DBFS location of init script. Destination must be provided. For example, - "dbfs:/home/cluster_log" - - * `s3_destination` - **(Optional)** S3 destination, e.g. s3://my-bucket/some-prefix You must configure the - cluster with an instance profile and the instance profile must have write access to the destination. You cannot use - AWS keys. - - * `s3_region` - **(Optional)** S3 region, e.g. us-west-2. Either region or endpoint must be set. If both are - set, endpoint is used. - - * `s3_endpoint` - **(Optional)** S3 endpoint, e.g. https://s3-us-west-2.amazonaws.com. Either region or endpoint - needs to be set. If both are set, endpoint is used. - -.. _r_job_spark_env_vars: -* :ref:`spark_env_vars ` - **(Optional)** An object containing a set of optional, user-specified -environment variable key-value pairs. Key-value pair of the form (X,Y) are exported as is (i.e., export X='Y') while -launching the driver and workers. To specify an additional set of SPARK_DAEMON_JAVA_OPTS, we recommend appending them -to $SPARK_DAEMON_JAVA_OPTS as shown in the example below. This ensures that all default databricks managed environmental -variables are included as well. - -.. _r_job_enable_elastic_disk: -* :ref:`enable_elastic_disk ` - **(Optional)** Autoscaling Local Storage: when enabled, -this cluster dynamically acquires additional disk space when its Spark workers are running low on disk space. This -feature requires specific AWS permissions to function correctly - refer to Autoscaling local storage for details. - -.. _r_job_instance_pool_id: -* :ref:`instance_pool_id ` - **(Optional)** The optional ID of the instance pool to which the -cluster belongs. Refer to Instance Pools API for details. - - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_job_id: -* :ref:`id ` - The id for the job object. - -.. _r_job_job_id: -* :ref:`job_id ` - The canonical identifier for the newly created job. - -.. _r_job_creator_user_name: -* :ref:`creator_user_name ` - The creator user name. This field won’t be included in -the response if the user has already been deleted. - -.. _r_job_created_time: -* :ref:`created_time ` - The time at which this job was created in epoch milliseconds -(milliseconds since 1/1/1970 UTC). - - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_notebook.md b/docs/source/provider/resources/db_notebook.md deleted file mode 100644 index 90d6a5523..000000000 --- a/docs/source/provider/resources/db_notebook.md +++ /dev/null @@ -1,63 +0,0 @@ -# Resource: databricks_notebook - -This resource allows you to manage the import, export, and delete notebooks. The maximum allowed size of a -request to resource is 10MB. - - -## Example Usage - -.. code-block:: tf - - resource "databricks_notebook" "my_databricks_notebook" { - content = filebase64("${path.module}/demo-terraform.dbc") - path = "/workspace/terraform-test-folder/" - overwrite = false - mkdirs = true - format = "DBC" - } - -## Argument Reference - -The following arguments are supported: - -.. _r_notebook_content: -* :ref:`content ` - **(Required)** The base64-encoded content. If the limit (10MB) is exceeded, -exception with error code MAX_NOTEBOOK_SIZE_EXCEEDED will be thrown. - -.. _r_notebook_path: -* :ref:`path ` - **(Required)** The absolute path of the notebook or directory. -Exporting a directory is supported only for DBC. This field is **required**. - -.. _r_notebook_language: -* :ref:`language ` - **(Required)** The language. If format is set to SOURCE, -this field is required; otherwise, it will be ignored. Possible choices are SCALA, PYTHON, SQL, R. - -.. _r_notebook_overwrite: -* :ref:`overwrite ` - **(Required)** The flag that specifies whether to overwrite existing object. -It is false by default. For DBC format, overwrite is not supported since it may contain a directory. - -.. _r_notebook_mkdirs: -* :ref:`mkdirs ` - **(Required)** Create the given directory and necessary parent directories -if they do not exists. If there exists an object (not a directory) at any prefix of the input path, this call -returns an error RESOURCE_ALREADY_EXISTS. If this operation fails it may have succeeded in creating some of the necessary parent directories. - -.. _r_notebook_format: -* :ref:`format ` - **(Required)** This specifies the format of the file to be imported. -By default, this is SOURCE. However it may be one of: SOURCE, HTML, JUPYTER, DBC. The value is case sensitive. - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_notebook_id: -* :ref:`id ` - The id for the notebook object. - -.. _r_notebook_object_id: -* :ref:`object_id ` - Unique identifier for a NOTEBOOK or DIRECTORY. - -.. _r_notebook_object_type: -* :ref:`object_type ` - The type of the object. It could be NOTEBOOK, DIRECTORY or LIBRARY. - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_scim_group.md b/docs/source/provider/resources/db_scim_group.md deleted file mode 100644 index 01838e3ac..000000000 --- a/docs/source/provider/resources/db_scim_group.md +++ /dev/null @@ -1,49 +0,0 @@ -# Resource: databricks_scim_group - -This resource allows you to create groups in Databricks. You can also associate Databricks users to the following groups. - -.. Important:: You must be a Databricks administrator API token to use SCIM resources. - -## Example Usage - -.. code-block:: tf - - resource "databricks_scim_user" "my-user" { - user_name = "testuser@databricks.com" - display_name = "Test User" - entitlements = [ - "allow-cluster-create", - ] - } - - resource "databricks_scim_group" "my-group" { - display_name = "Sri Test Group" - members = ["${databricks_scim_user.my-user.id}"] - } - -## Argument Reference - -The following arguments are supported: - -.. _r_scim_group_display_name: -* :ref:`display_name `- **(Required)** This is the display name for the given group. - -.. _r_scim_group_members: -* :ref:`members ` - **(Optional)** This is a list of users associated to the given group. - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_scim_group_id: -* :ref:`id ` - The id for the scim group object. - -.. _r_scim_group_display_name1: -* :ref:`display_name `- This is the display name for the given group. - -.. _r_scim_group_members1: -* :ref:`members ` - This is a list of users associated to the given group. - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_scim_user.md b/docs/source/provider/resources/db_scim_user.md deleted file mode 100644 index 0e95d4ee2..000000000 --- a/docs/source/provider/resources/db_scim_user.md +++ /dev/null @@ -1,63 +0,0 @@ -# Resource: databricks_scim_user - -This resource allows you to create users in Databricks and give them the proper level of access, as well as -remove access for users (deprovision them) when they leave your organization or no longer need access to Databricks. - -.. Important:: You must be a Databricks administrator API token to use SCIM resources. - -## Example Usage - -.. code-block:: tf - - resource "databricks_scim_user" "my-user" { - user_name = "testuser@databricks.com" - display_name = "Test User" - entitlements = [ - "allow-cluster-create", - ] - } - -## Argument Reference - -The following arguments are supported: - -.. _r_scim_user_user_name: -* :ref:`user_name `- **(Required)** This is the username of the given user and will be their form of access -and identity. - -.. _r_scim_user_display_name: -* :ref:`display_name ` - **(Optional)** This is an alias for the username can be the full name of the user. - -.. _r_scim_user_roles: -* :ref:`roles ` - **(Optional)** This is a list of roles assigned to the user, specific to the AWS environment for -user to assume roles on clusters. - -.. _r_scim_user_entitlements: -* :ref:`entitlements ` - **(Optional)** Entitlements for the user to be able to have the ability to create -clusters and pools. Current options are: `"allow-cluster-create", "allow-instance-pool-create"`. - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_scim_user_id: -* :ref:`id ` - The id for the scim user object. - -.. _r_scim_user_user_name1: -* :ref:`user_name `- This is the username of the given user and will be their form of access -and identity. - -.. _r_scim_user_display_name1: -* :ref:`display_name ` - This is an alias for the username can be the full name of the user. - -.. _r_scim_user_roles1: -* :ref:`roles ` - This is a list of role arns assigned to the user, specific to the AWS environment for -user to assume roles on clusters. - -.. _r_scim_user_entitlements1: -* :ref:`entitlements ` - This is a list of entitlements for the user to be able to have the ability to create -clusters and pools. - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_secret.md b/docs/source/provider/resources/db_secret.md deleted file mode 100644 index 2c5083204..000000000 --- a/docs/source/provider/resources/db_secret.md +++ /dev/null @@ -1,64 +0,0 @@ -# Resource: databricks_secret - -With this resource you can insert a secret under the provided scope with the given name. If a secret already exists -with the same name, this command overwrites the existing secret’s value. The server encrypts the secret using the -secret scope’s encryption settings before storing it. You must have WRITE or MANAGE permission on the secret scope. - -The secret key must consist of alphanumeric characters, dashes, underscores, and periods, and cannot exceed -128 characters. The maximum allowed secret value size is 128 KB. The maximum number of secrets in a given scope is 1000. - -You can read a secret value only from within a command on a cluster (for example, through a notebook); there is no API -to read a secret value outside of a cluster. The permission applied is based on who is invoking the command and you must -have at least READ permission. - -## Example Usage - -.. code-block:: tf - - resource "databricks_secret_scope" "my-scope" { - name = "terraform-demo-scope" - initial_manage_principal = "users" - } - - resource "databricks_secret" "my_secret" { - key = "test-secret-1" - string_value = "hello world 123" - scope = "${databricks_secret_scope.my-scope.name}" - } - -## Argument Reference - -The following arguments are supported: - -.. _r_secret_string_value: -* :ref:`string_value `- **(Required)** If string_value, if specified, the value will be stored in UTF-8 -(MB4) form. - -.. _r_secret_scope: -* :ref:`scope ` - **(Required)** The name of the scope to which the secret will be associated with. -This field is required. - -.. _r_secret_key: -* :ref:`key ` - **(Required)** A unique name to identify the secret. This field is required. - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_secret_id: -* :ref:`id ` - The id for the secret object. - -.. _r_secret_string_value-1: -* :ref:`string_value `- If string_value, if specified, the value will be stored in UTF-8 -(MB4) form. - -.. _r_secret_scope-1: -* :ref:`scope ` - The name of the scope to which the secret will be associated with. -This field is required. - -.. _r_secret_key-1: -* :ref:`key ` - A unique name to identify the secret. - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_secret_acl.md b/docs/source/provider/resources/db_secret_acl.md deleted file mode 100644 index 982652208..000000000 --- a/docs/source/provider/resources/db_secret_acl.md +++ /dev/null @@ -1,61 +0,0 @@ -# Resource: databricks_secret_acl - -Create or overwrite the ACL associated with the given principal (user or group) on the specified scope point. -In general, a user or group will use the most powerful permission available to them, and -permissions are ordered as follows: - -* **MANAGE** - Allowed to change ACLs, and read and write to this secret scope. -* **WRITE** - Allowed to read and write to this secret scope. -* **READ** - Allowed to read this secret scope and list what secrets are available. - -## Example Usage - -.. code-block:: tf - - resource "databricks_secret_scope" "my-scope" { - name = "terraform-demo-scope" - } - - resource "databricks_secret_acl" "my-acl" { - principal = "USERS" - permission = "READ" - scope = "${databricks_secret_scope.my-scope.name}" - } - -## Argument Reference - -The following arguments are supported: - -.. _r_secret_acl_scope: -* :ref:`scope `- **(Required)** The name of the scope to remove permissions from. This field is required. -(MB4) form. - -.. _r_secret_acl_principal: -* :ref:`principal ` - **(Required)** The principal to remove an existing ACL from. The principal is a user -or group name corresponding to an existing Databricks principal to be granted or revoked access. This field is required. - -.. _r_secret_acl_permission: -* :ref:`permission ` - **(Required)** The permission level applied to the principal. -Options are: `"READ", "WRITE", "MANAGE"`. This field is required. - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_secret_acl_id: -* :ref:`id ` - The id for the secret scope acl object. - -.. _r_secret_acl_scope-1: -* :ref:`scope ` - The name of the scope to remove permissions from. -(MB4) form. - -.. _r_secret_acl_principal-1: -* :ref:`principal ` - The principal to remove an existing ACL from. The principal is a user -or group name corresponding to an existing Databricks principal to be granted or revoked access. - -.. _r_secret_acl_permission-1: -* :ref:`permission ` - The permission level applied to the principal. - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_secret_scope.md b/docs/source/provider/resources/db_secret_scope.md deleted file mode 100644 index f629d3749..000000000 --- a/docs/source/provider/resources/db_secret_scope.md +++ /dev/null @@ -1,50 +0,0 @@ -# Resource: databricks_secret_scope - -This resource creates a Databricks-backed secret scope in which secrets are stored in Databricks-managed storage and -encrypted with a cloud-based specific encryption key. - -The scope name: - -* Must be unique within a workspace. -* Must consist of alphanumeric characters, dashes, underscores, and periods, and may not exceed 128 characters. - -## Example Usage - -.. code-block:: tf - - resource "databricks_secret_scope" "my-scope" { - name = "terraform-demo-scope" - initial_manage_principal = "users" - } - -## Argument Reference - -The following arguments are supported: - -.. _r_secret_scope_name: -* :ref:`name `- **(Required)** Scope name requested by the user. Scope names are unique. This field is required. - -.. _r_secret_scope_initial_manage_principal: -* :ref:`initial_manage_principal ` - **(Optional)** The principal that is initially granted -MANAGE permission to the created scope. - -## Attribute Reference - -In addition to all arguments above, the following attributes are exported: - -.. _r_secret_scope_id: -* :ref:`id ` - The id for the secret scope object. - -.. _r_secret_scope_name-1: -* :ref:`name `- Scope name requested by the user. Scope names are unique. This field is required. - -.. _r_secret_scope_initial_manage_principal-1: -* :ref:`initial_manage_principal ` - The principal that is initially granted -MANAGE permission to the created scope. - -.. _r_secret_scope_backend_type: -* :ref:`backend_type ` - The type of secret scope backend. - -## Import - -.. Note:: Importing this resource is not currently supported. \ No newline at end of file diff --git a/docs/source/provider/resources/db_token.md b/docs/source/provider/resources/db_token.md deleted file mode 100644 index e6052874b..000000000 --- a/docs/source/provider/resources/db_token.md +++ /dev/null @@ -1,54 +0,0 @@ -# Resource: databricks_token - -This resource creates an api token that can be used to create Databricks resources. - -.. WARNING:: This will create an API token for the user that has authenticated on the provider. So if you have used an - admin user to setup the provider then you will be making API tokens for that admin user. - -## Example Usage - -.. code-block:: tf - - resource "databricks_token" "my-token" { - lifetime_seconds = 6000 - comment = "Testing terraform v2" - } - -## Argument Reference - -The following arguments are supported: - -.. _r_token_lifetime_seconds: -* :ref:`lifetime_seconds `- **(Optional) (Numeric)** The lifetime of the token, in seconds. -If no lifetime is specified, the token remains valid indefinitely. - -.. _r_token_comment: -* :ref:`comment ` - **(Optional)** Optional description to attach to the token. - - -## Attribute Reference -In addition to all arguments above, the following attributes are exported: - -.. _r_token_id: -* :ref:`id ` - The id for the token object. - -.. _r_token_lifetime_seconds-1: -* :ref:`lifetime_seconds ` - The lifetime of the token, in seconds. If no lifetime is specified, -the token remains valid indefinitely. - -.. _r_token_comment-1: -* :ref:`comment ` - Optional description to attach to the token. - -.. _r_token_creation_time: -* :ref:`creation_time ` - Server time (in epoch milliseconds) when the token was created. - -.. _r_token_token_value: -* :ref:`token_value ` - The value of the newly-created token. - -.. _r_token_expiry_time: -* :ref:`expiry_time ` - Server time (in epoch milliseconds) when the token will expire, or -1 if not applicable. - -## Import - -.. Note:: Importing this resource is not currently supported. - \ No newline at end of file diff --git a/docs/source/provider/resources_index.rst b/docs/source/provider/resources_index.rst deleted file mode 100644 index e690ea85c..000000000 --- a/docs/source/provider/resources_index.rst +++ /dev/null @@ -1,31 +0,0 @@ -.. databricks-terraform-provider documentation master file, created by - sphinx-quickstart on Wed Jan 29 15:36:15 2020. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Resources -============================== - -This section contains all the resources that can be managed by the Databricks Terraform provider - -.. toctree:: - :maxdepth: 3 - :caption: Contents: - - databricks_aws_s3_mount - databricks_azure_blob_mount - databricks_azure_adls_gen1_mount - databricks_azure_adls_gen2_mount.md - databricks_cluster - databricks_dbfs_file - databricks_dbfs_file_sync - databricks_job - databricks_instance_pool - databricks_instance_profile - databricks_notebook - databricks_scim_group - databricks_scim_user - databricks_secret - databricks_secret_acl - databricks_secret_scope - databricks_token \ No newline at end of file diff --git a/docs/source/readme_link.rst b/docs/source/readme_link.rst deleted file mode 100644 index 8962b509a..000000000 --- a/docs/source/readme_link.rst +++ /dev/null @@ -1,3 +0,0 @@ - -.. mdinclude:: ../../README.md - diff --git a/main.go b/main.go index 3ba451dd3..1d327a215 100644 --- a/main.go +++ b/main.go @@ -4,13 +4,17 @@ import ( "github.com/databrickslabs/databricks-terraform/databricks" "github.com/hashicorp/terraform-plugin-sdk/plugin" "github.com/hashicorp/terraform-plugin-sdk/terraform" + "log" ) var ( version = "dev" + commit = "" + date = "unknown" ) func main() { + log.Printf("%v, commit %v, built at %v\n", version, commit, date) plugin.Serve(&plugin.ServeOpts{ ProviderFunc: func() terraform.ResourceProvider { return databricks.Provider(version) diff --git a/website/archetypes/default.md b/website/archetypes/default.md new file mode 100644 index 000000000..00e77bd79 --- /dev/null +++ b/website/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/website/config.toml b/website/config.toml new file mode 100644 index 000000000..b361b7fb8 --- /dev/null +++ b/website/config.toml @@ -0,0 +1,54 @@ +baseURL = "/" +languageCode = "en-US" +defaultContentLanguage = "en" + +title = "Databricks Terraform Provider" +theme = ["hugo-theme-learn"] + +enableEmoji = true + +# For search functionality +[outputs] +home = [ "HTML", "RSS", "JSON"] + +[[Languages.en.menu.shortcuts]] +name = " GitHub repo" +identifier = "ds" +url = "https://github.com/databrickslabs/databricks-terraform" +weight = 10 + +linenos = true + +[params] + # Prefix URL to edit current page. Will display an "Edit this page" button on top right hand corner of every page. + # Useful to give opportunity to people to create merge request for your doc. + # See the config.toml file from this documentation site to have an example. + # editURL = "" + display = true + # Author of the site, will be used in meta information + author = "Sriharsha Tikkireddy" + # Description of the site, will be used in meta information + description = "" + # Shows a checkmark for visited pages on the menu + showVisitedLinks = false + # Disable search function. It will hide search bar + disableSearch = false + # Javascript and CSS cache are automatically busted when new version of site is generated. + # Set this to true to disable this behavior (some proxies don't handle well this optimization) + disableAssetsBusting = false + # Set this to true to disable copy-to-clipboard button for inline code. + disableInlineCopyToClipBoard = false + # A title for shortcuts in menu is set by default. Set this to true to disable it. + disableShortcutsTitle = false + # When using mulitlingual website, disable the switch language button. + disableLanguageSwitchingButton = true + # Hide breadcrumbs in the header and only show the current page title + disableBreadcrumb = false + # Hide Next and Previous page buttons normally displayed full height beside content + disableNextPrev = true + # Order sections in menu by "weight" or "title". Default to "weight" + ordersectionsby = "weight" + # Change default color scheme with a variant one. Can be "red", "blue", "green". + themeVariant = "blue" + # Provide a list of custom css files to load relative from the `static/` folder in the site root. + custom_css = ["css/tabs.css"] \ No newline at end of file diff --git a/website/content/Provider/_index.md b/website/content/Provider/_index.md new file mode 100644 index 000000000..b1b13fab7 --- /dev/null +++ b/website/content/Provider/_index.md @@ -0,0 +1,210 @@ ++++ +title = "Provider" +date = 2020-04-20T23:34:03-04:00 +weight = 10 +chapter = false +pre = "" ++++ + +## Databricks Provider + +The Databricks provider is what is used to interact with the Databricks resources. This needs to be configured so that +terraform can provision resources in your Databricks workspace on your behalf. + +## Example Usages + +{{< tabs groupId="providerConfigs" >}} + {{% tab name="Token" %}} +``` hcl +provider "databricks" { + host = "http://databricks.domain.com" + token = "dapitokenhere" +} + +resource "databricks_scim_user" "my-user" { + user_name = "test-user@databricks.com" + display_name = "Test User" +} +``` + {{% /tab %}} + {{% tab name="Basic Auth" %}} +``` hcl +provider "databricks" { + host = "http://databricks.domain.com" + token = base64encode("${var.user}:${var.password}") + auth_type = "BASIC" +} + +resource "databricks_scim_user" "my-user" { + user_name = "test-user@databricks.com" + display_name = "Test User" +} +``` +{{% /tab %}} + {{% tab name="Azure SP Auth" %}} +``` hcl +provider "azurerm" { + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + subscription_id = var.subscription_id +} + +resource "azurerm_databricks_workspace" "demo_test_workspace" { + location = "centralus" + name = "my-workspace-name" + resource_group_name = var.resource_group + managed_resource_group_name = var.managed_resource_group_name + sku = "premium" +} + +provider "databricks" { + azure_auth = { + managed_resource_group = azurerm_databricks_workspace.demo_test_workspace.managed_resource_group_name + azure_region = azurerm_databricks_workspace.demo_test_workspace.location + workspace_name = azurerm_databricks_workspace.demo_test_workspace.name + resource_group = azurerm_databricks_workspace.demo_test_workspace.resource_group_name + client_id = var.client_id + client_secret = var.client_secret + tenant_id = var.tenant_id + subscription_id = var.subscription_id + } +} + +resource "databricks_scim_user" "my-user" { + user_name = "test-user@databricks.com" + display_name = "Test User" +} +``` +{{% /tab %}} +{{< /tabs >}} + + +{{% notice warning %}} +Please be aware that hard coding credentials is not something that is recommended. +It may be best if you store the credentials environment variables or use tfvars file. +{{% /notice %}} + +## Authentication + +There are currently two supported methods to authenticate into the Databricks platform to create resources. + +* **API Token** +* **Azure Service Principal Authentication** + +{{% notice note %}} +**Azure Service Principal Authentication** will only work on Azure Databricks where as the API Token +authentication will work on both **Azure** and **AWS** +{{% /notice %}} + +### API Token + +Databricks hostname for the workspace and api token can be provided here. This configuration is very similar to the +Databricks CLI + +``` hcl +provider "databricks" { + host = "http://databricks.domain.com" + token = "dapitokenhere" +} +``` +{{% notice warning %}} +Please be aware that hard coding credentials is not something that is recommended. +It may be best if you store the credentials environment variables or use tfvars file. +{{% /notice %}} + + +### Azure Service Principal Auth + +``` hcl +provider "databricks" { + azure_auth = { + managed_resource_group = "${azurerm_databricks_workspace.sri_test_workspace.managed_resource_group_name}" + azure_region = "${azurerm_databricks_workspace.sri_test_workspace.location}" + workspace_name = "${azurerm_databricks_workspace.sri_test_workspace.name}" + resource_group = "${azurerm_databricks_workspace.sri_test_workspace.resource_group_name}" + client_id = "${var.client_id}" + client_secret = "${var.client_secret}" + tenant_id = "${var.tenant_id}" + subscription_id = "${var.subscription_id}" + } +} +``` + +### Environment variables + +The following variables can be passed via environment variables: + +* `host` → `HOST` +* `token` → `TOKEN` +* `subscription_id` → `ARM_SUBSCRIPTION_ID` +* `client_secret` → `ARM_CLIENT_SECRET` +* `client_id` → `ARM_CLIENT_ID` +* `tenant_id` → `ARM_TENANT_ID` + +For example you can have the following provider definition: + +``` hcl +provider "databricks" {} +``` + +Then run the following code and the following environment variables will be injected into the provider. + +``` bash +$ export HOST="http://databricks.domain.com" +$ export TOKEN="dapitokenhere" +$ terraform plan +``` + +## Provider Argument Reference + +The following arguments are supported by the db provider block: + +#### `host` +> This is the host of the Databricks workspace. This is will be a url that you use to login to your workspace. +Alternatively you can provide this value as an environment variable `HOST`. + +#### `token`: +> This is the api token to authenticate into the workspace. Alternatively you can provide this value as an +environment variable `TOKEN`. + +#### `azure-auth`: +> #### **Usage** +>```hcl +>azure_auth = { +> azure_region = "centralus" +> managed_resource_group = "my-databricks-managed-rg" +> workspace_name = "test-managed-workspace" +> resource_group = "1-test-rg" +> client_id = var.client_id +> client_secret = var.client_secret +> tenant_id = var.tenant_id +> subscription_id = var.subscription_id +>} +>``` +> {{%chevron default=`This is the authentication required to authenticate to the Databricks via an azure service +principal that has access to the workspace. This is optional as you can use the api token based auth. +The azure_auth block contains the following arguments:` display="true" %}} + +* `managed_resource_group` - This is the managed workgroup id when the Databricks workspace is provisioned + +* `azure_region` - This is the azure region in which your workspace is deployed. + +* `workspace_name` - This is the name of your Azure Databricks Workspace. + +* `resource_group` - This is the resource group in which your Azure Databricks Workspace resides in. + +* `subscription_id` - This is the Azure Subscription id in which your Azure Databricks Workspace resides in. +Alternatively you can provide this value as an environment variable `ARM_SUBSCRIPTION_ID`. + +* `client_secret` - This is the Azure Enterprise Application (Service principal) client secret. This service +principal requires contributor access to your Azure Databricks deployment. Alternatively you can provide this +value as an environment variable `ARM_CLIENT_SECRET`. + +* `client_id` - This is the Azure Enterprise Application (Service principal) client id. This service principal +requires contributor access to your Azure Databricks deployment. Alternatively you can provide this value as an +environment variable `ARM_CLIENT_ID`. + +* `tenant_id` - This is the Azure Active Directory Tenant id in which the Enterprise Application (Service Principal) +resides in. Alternatively you can provide this value as an environment variable `ARM_TENANT_ID`. +{{% /chevron %}} \ No newline at end of file diff --git a/website/content/Quickstart/_index.md b/website/content/Quickstart/_index.md new file mode 100644 index 000000000..ac99320ae --- /dev/null +++ b/website/content/Quickstart/_index.md @@ -0,0 +1,12 @@ ++++ +title = "Databricks Terraform Provider" +date = 2020-04-20T23:34:03-04:00 +weight = 5 +chapter = false +pre = "" ++++ + +# Under Construction + +![Example image](https://media.giphy.com/media/l0HlHJGHe3yAMhdQY/giphy.gif) + diff --git a/docs/source/provider/installation.md b/website/content/Quickstart/installation.md similarity index 87% rename from docs/source/provider/installation.md rename to website/content/Quickstart/installation.md index bc41b2726..86e70fdf1 100644 --- a/docs/source/provider/installation.md +++ b/website/content/Quickstart/installation.md @@ -1,8 +1,13 @@ -# Databricks Terraform Provider Installation ++++ +title = "Installation" +date = 2020-04-20T23:34:03-04:00 +weight = 6 +chapter = false ++++ A Terraform provider for Databricks workspace components -## Installing `databricks-terraform` with Go +## Installing databricks-terraform with Go * Install Go 1.13. For previous versions, you may have to set your `$GOPATH` manually, if you haven't done it yet visit [here](https://golang.org/doc/install). * Install Terraform 0.12.x [from here](https://www.terraform.io/downloads.html) and save it into `/usr/local/bin/terraform` folder (create it if it doesn't exists). This provider DOES NOT SUPPORT Terraform 0.12 or above. @@ -30,7 +35,7 @@ If you wish to uninstall the binary simply remove the file from the directory. $ rm /usr/local/bin/terraform-provider-db ``` -## Using `databricks-terraform` with Docker (TBD!) +## Using databricks-terraform with Docker (TBD!) diff --git a/website/content/Quickstart/overview.md b/website/content/Quickstart/overview.md new file mode 100644 index 000000000..da10248e8 --- /dev/null +++ b/website/content/Quickstart/overview.md @@ -0,0 +1,184 @@ ++++ +title = "Overview" +date = 2020-04-20T23:34:03-04:00 +weight = 5 +chapter = false ++++ + + +## Quickstart: Building and Using the Provider + +### Setup + +Please note that there is a Makefile which contains all the commands you would need to run this project. + +This code base to contribute to requires the following software: + +* [golang 1.13.X](https://golang.org/dl/) +* [terraform v0.12.x](https://www.terraform.io/downloads.html) +* make command + +To make sure everything is installed correctly please run the following commands: + +Testing go installation: +```bash +$ go version +go version go1.13.3 darwin/amd64 +``` + +Testing terraform installation: +```bash +$ terraform --version +Terraform v0.12.19 + +Your version of Terraform is out of date! The latest version +is 0.12.24. You can update by downloading from https://www.terraform.io/downloads.html +``` + +Testing make installation: +```bash +$ make --version +GNU Make 3.81 +Copyright (C) 2006 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. +There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. + +This program built for i386-apple-darwin11.3.0 +``` + +### Downloading the source code and installing the artifact + +* After installing `golang`, `terraform`, and `make` you will now build the artifact. + +```bash +$ go get -v -u github.com/databrickslabs/databricks-terraform && cd $GOPATH/src/github.com/databrickslabs/databricks-terraform +``` + +:warning: If you are fetching from a private repository please use the following command: + +```bash +$ GOSUMDB=off GOPROXY=direct go get -v -u github.com/databrickslabs/databricks-terraform && cd $GOPATH/src/github.com/databrickslabs/databricks-terraform +``` + +* When you are in the root directory of the repository please run: + +```bash +$ make build +``` + +* Locate your [terraform plugins directory](https://www.terraform.io/docs/extend/how-terraform-works.html#plugin-locations) + or the root folder of your terraform code + +* Copy the `terraform-provider-databricks` artifact to that terraform plugins locations + +```bash +$ mkdir -p ~/.terraform.d/plugins/ && cp terraform-provider-databricks ~/.terraform.d/plugins/terraform-provider-databricks +``` + +Now your plugin for the Databricks Terraform provider is installed correctly. You can actually use the provider. + +### Basic Terraform example + +Sample terraform code + +```terraform +provider "databricks" { + host = "http://databrickshost.com" + token = "dapitokenhere" +} + +resource "databricks_scim_user" "my-user" { + user_name = join("", ["test-user", "+",count.index,"@databricks.com"]) + display_name = "Test User" +} +``` + +Then run `terraform init` then `terraform apply` to apply the hcl code to your databricks workspace. + +Please refer to the detailed documentation provided in the html documentation for detailed use of the providers. + +Also refer to these [examples](examples/) for more scenarios. + +### Provider Documentation + +Provider documentation can be located in the releases tab and documentation is packaged up along with +the binary of choice. + +### Docker commands + +To install and build the code if you dont want to install golang, terraform, etc. All you need is docker and git. + +First make sure you clone the repository and you are in the directory. + +Then build the docker image with this command: + +```bash +$ docker build -t databricks-terraform . +``` + +Then run the execute the terraform binary via the following command and volume mount. Make sure that you are in the directory + with the terraform code. The following command you can execute the following commands and additional ones as part of + the terraform binary. + +```bash +$ docker run -it -v $(pwd):/workpace -w /workpace databricks-terraform init +$ docker run -it -v $(pwd):/workpace -w /workpace databricks-terraform plan +$ docker run -it -v $(pwd):/workpace -w /workpace databricks-terraform apply +``` + +## Project Components + +### Databricks Terraform Provider Resources State + +| Resource | Implemented | Import Support | Acceptance Tests | Documentation | Reviewed | Finalize Schema | +|----------------------------------|--------------------|----------------------|----------------------|----------------------|----------------------|----------------------| +| databricks_token | :white_check_mark: | :white_large_square: | :white_check_mark: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_secret_scope | :white_check_mark: | :white_large_square: | :white_check_mark: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_secret | :white_check_mark: | :white_large_square: | :white_check_mark: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_secret_acl | :white_check_mark: | :white_large_square: | :white_check_mark: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_instance_pool | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_scim_user | :white_check_mark: | :white_large_square: | :white_check_mark: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_scim_group | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_notebook | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_cluster | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_job | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_dbfs_file | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_dbfs_file_sync | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_instance_profile | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_aws_s3_mount | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_azure_blob_mount | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_azure_adls_gen1_mount | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | +| databricks_azure_adls_gen2_mount | :white_check_mark: | :white_large_square: | :white_large_square: | :white_check_mark: | :white_large_square: | :white_large_square: | + +### Databricks Terraform Data Sources State + +| Data Source | Implemented | Acceptance Tests | Documentation | Reviewed | +|-----------------------------|----------------------|----------------------|----------------------|----------------------| +| databricks_notebook | :white_check_mark: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_notebook_paths | :white_check_mark: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_dbfs_file | :white_check_mark: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_dbfs_file_paths | :white_check_mark: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_zones | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_runtimes | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_instance_pool | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_scim_user | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_scim_group | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_cluster | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_job | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_mount | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_instance_profile | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_database | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | +| databricks_table | :white_large_square: | :white_large_square: | :white_large_square: | :white_large_square: | + + +## Testing + +:white_large_square: Integration tests should be run at a client level against both azure and aws to maintain sdk parity against both apis **(currently only on one cloud)** + +:white_large_square: Terraform acceptance tests should be run against both aws and azure to maintain parity of provider between both cloud services **(currently only on one cloud)** + +## Project Support +Please note that all projects in the /databrickslabs github account are provided for your exploration only, and are not formally supported by Databricks with Service Level Agreements (SLAs). They are provided AS-IS and we do not make any guarantees of any kind. Please do not submit a support ticket relating to any issues arising from the use of these projects. + +Any issues discovered through the use of this project should be filed as GitHub Issues on the Repo. They will be reviewed as time permits, but there are no formal SLAs for support. diff --git a/website/content/Resources/_index.md b/website/content/Resources/_index.md new file mode 100644 index 000000000..af1149faa --- /dev/null +++ b/website/content/Resources/_index.md @@ -0,0 +1,9 @@ ++++ +title = "Resources" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Databricks Provider Resources diff --git a/website/content/Resources/db_aws_s3_mount.md b/website/content/Resources/db_aws_s3_mount.md new file mode 100644 index 000000000..3c8b8b0b8 --- /dev/null +++ b/website/content/Resources/db_aws_s3_mount.md @@ -0,0 +1,67 @@ ++++ +title = "aws_s3_mount" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + + +## Resource: `databricks_aws_s3_mount` + +This resource given a cluster id will help you create, get and delete a aws s3 mount. + +{{% notice warning %}} +It is important to understand that this will start up the cluster if the cluster is terminated. +The read and refresh terraform command will require a cluster and make take some time to validate mount. +{{% /notice %}} + +{{% notice note %}} +You can locate the mount in dbfs at `dbfs:/mnt/` +{{% /notice %}} + + +{{% notice note %}} +Currently only supports the use of IAM roles and not S3 keys and secrets. +{{% /notice %}} + + +## Example Usage + +````hcl +resource "databricks_aws_s3_mount" "my_custom_mount4" { + cluster_id = "####-######-hello###" + s3_bucket_name = "my-s3-bucket-123" + mount_name = "my_s3_bucket_mount" +} +```` +## Argument Reference + +The following arguments are supported: + +#### - `cluster_id`: +> **(Required)** This is the cluster id in which the mount will be initalized from. +>If the cluster is in a terminated state it will be started. + +#### - `s3_bucket_name`: +> **(Required)** This is the S3 bucket that you are trying to +mount. + +#### - `mount_name`: +> **(Required)** This is the name of the mount that will represent +where the data will be landed. + + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> Identifier for the mount. + + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_azure_adls_gen1_mount.md b/website/content/Resources/db_azure_adls_gen1_mount.md new file mode 100644 index 000000000..cd4d990cc --- /dev/null +++ b/website/content/Resources/db_azure_adls_gen1_mount.md @@ -0,0 +1,91 @@ ++++ +title = "azure_adls_gen1_mount" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_azure_adls_gen1_mount` + +This resource given a cluster id will help you create, get and delete a azure data lake gen 1(ADLS gen 1) mount using a service +principal/enterprise ad application which will provide you a client id and client secret to authenticate. + +{{% notice warning %}} +It is important to understand that this will start up the cluster if the cluster is terminated. +The read and refresh terraform command will require a cluster and make take some time to validate mount. +{{% /notice %}} + +{{% notice note %}} +You can locate the mount in dbfs at `dbfs:/mnt/` +{{% /notice %}} + +## Example Usage + +```hcl +resource "databricks_azure_adls_gen1_mount" "my_custom_mount3" { + cluster_id = "####-######-pear###" + storage_resource_name = "my_storage_resource_name" + mount_name = "my_adls_gen1_mount" + tenant_id = "????????-????-????-????-????????????" + client_id = "????????-????-????-????-????????????" + client_secret_scope = "my_adls_client_secret_scope" + client_secret_key= "my_adls_client_secret_key" +} +``` + +## Argument Reference + +The following arguments are supported: + +#### - `cluster_id`: +> **(Required)** This is the cluster id in which the mount will be initalized +from. If the cluster is in a terminated state it will be started. + +#### - `storage_resource_name`: +> **(Required)** The name of the storage resource +in which the data is for ADLS gen 1. This is what you are trying to mount. + +#### - `spark_conf_prefix`: +> **(Required)** This is the spark configuration prefix +for adls gen 1 mount. The options are `fs.adl`, `dfs.adls`. Use `fs.adl` for runtime 6.0 and above for the clusters. +Otherwise use `dfs.adls`. The default value is: `fs.adl`. + +#### - `mount_directory`: +> **(Optional)** This is optional if you want to add an additional +directory that you wish to mount. This must start with a "/" + +#### - `mount_name`: +> **(Required)** The name of the folder that you want to mount to +in dbfs. You can access the data from `/mnt/` + +#### - `tenant_id`: +> **(Required)** This is your azure directory tenant id. This is +required for creating the mount. + +#### - `client_id`: +> **(Required)** This is the client_id for the enterprise application +for the service principal. + +#### - `token_secret_scope`: +> **(Required)** This is the secret scope in which +your service principal/enterprise app client secret will be stored. + +#### - `token_secret_key`: +> **(Required)** This is the secret key in which +your service principal/enterprise app client secret will be stored. + + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> Identifier for a adls gen 1 mount. + + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_azure_adls_gen2_mount.md b/website/content/Resources/db_azure_adls_gen2_mount.md new file mode 100644 index 000000000..532c6228c --- /dev/null +++ b/website/content/Resources/db_azure_adls_gen2_mount.md @@ -0,0 +1,90 @@ ++++ +title = "azure_adls_gen2_mount" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_azure_adls_gen2_mount` + +This resource given a cluster id will help you create, get and delete a azure data lake gen 2 (ADLS gen 2) mount using a service +principal/enterprise ad application which will provide you a client id and client secret to authenticate. + +{{% notice warning %}} +It is important to understand that this will start up the cluster if the cluster is terminated. +The read and refresh terraform command will require a cluster and make take some time to validate mount. +{{% /notice %}} + +{{% notice note %}} +You can locate the mount in dbfs at `dbfs:/mnt/` +{{% /notice %}} + +## Example Usage + +```hcl +resource "databricks_azure_adls_gen2_mount" "my_custom_mount2" { + cluster_id = "####-######-pear###" + container_name = "my_storage_container" + storage_account_name = "mystorageaccountname" + mount_name = "my_cool_adls_gen2_mount" + tenant_id = "????????-????-????-????-????????????" + client_id = "????????-????-????-????-????????????" + client_secret_scope = "my_adls_client_secret_scope" + client_secret_key= "my_adls_client_secret_key" +} +``` + +## Argument Reference + +The following arguments are supported: + +#### - `cluster_id`: +> **(Required)** This is the cluster id in which the mount will be initalized +from. If the cluster is in a terminated state it will be started. + +#### - `container_name`: +> **(Required)** The container in which the data is. This +is what you are trying to mount. + +#### - `storage_account_name`: +> **(Required)** The name of the storage account +in which the data is. This is what you are trying to mount. + +#### - `directory`: +> **(Optional)** This is optional if you want to add an additional +directory that you wish to mount. This must start with a "/" + +#### - `mount_name`: +> **(Required)** The name of the folder that you want to mount to +in dbfs. You can access the data from `/mnt/` + +#### - `tenant_id`: +> **(Required)** This is your azure directory tenant id. This is +required for creating the mount. + +#### - `client_id`: +> **(Required)** This is the client_id for the enterprise application +for the service principal. + +#### - `secret_scope`: +> **(Required)** This is the secret scope in which +your service principal/enterprise app client secret will be stored. + +#### - `secret_key`: +> **(Required)** This is the secret key in which +your service principal/enterprise app client secret will be stored. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> Identifier for a adls gen 2 mount. + + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_azure_blob_mount.md b/website/content/Resources/db_azure_blob_mount.md new file mode 100644 index 000000000..0197de8ad --- /dev/null +++ b/website/content/Resources/db_azure_blob_mount.md @@ -0,0 +1,90 @@ ++++ +title = "azure_blob_mount" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_azure_blob_mount` + +This resource given a cluster id will help you create, get and delete a azure blob storage mount using SAS token or +storage account access keys. + +{{% notice warning %}} +It is important to understand that this will start up the cluster if the cluster is terminated. +The read and refresh terraform command will require a cluster and make take some time to validate mount. +{{% /notice %}} + +{{% notice note %}} +You can locate the mount in dbfs at `dbfs:/mnt/` +{{% /notice %}} + + +## Example Usage + +With the below resource the data gets mounted to `/mnt/my_cool_dbfs_mount` + +```hcl +resource "databricks_azure_blob_mount" "my_custom_mount" { + cluster_id = "####-######-pear###" + container_name = "my_storage_container" + directory = "/my_custom_folder" + storage_account_name = "mystorageaccountname" + mount_name = "my_cool_blob_storage_mount" + auth_type = "SAS" + token_secret_scope = "my_secret_scope" + token_secret_key = "my_secret_key" +} +``` + +## Argument Reference + +The following arguments are supported: + +#### - `cluster_id`: +> **(Required)** This is the cluster id in which the mount will be initalized +from. If the cluster is in a terminated state it will be started. + +#### - `container_name`: +> **(Required)** The container in which the data is. This +is what you are trying to mount. + +#### - `storage_account_name`: +> **(Required)** The name of the storage account +in which the data is. This is what you are trying to mount. + +#### - `directory`: +> **(Optional)** This is optional if you want to add an additional +directory that you wish to mount. This must start with a "/" + +#### - `mount_name`: +> **(Required)** The name of the folder that you want to mount to +in dbfs. You can access the data from `/mnt/` + +#### - `auth_type`: +> **(Required)** This is the auth type for blob storage. This can either +be SAS tokens or account access keys. + +#### - `token_secret_scope`: +> **(Required)** This is the secret scope in which +your auth type token exists in. + +#### - `token_secret_key`: +> **(Required)** This is the secret key in which +your auth type token exists in. + + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id of the azure blob storage mount. + + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_cluster.md b/website/content/Resources/db_cluster.md new file mode 100644 index 000000000..b327961f8 --- /dev/null +++ b/website/content/Resources/db_cluster.md @@ -0,0 +1,480 @@ ++++ +title = "cluster" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_cluster` + +This resource allows you to create, update, and delete clusters. + +## Example Usage + +```hcl +resource "databricks_cluster" "my-cluster" { + num_workers = "2" + cluster_name = "sri-test" + spark_version = "6.4.x-scala2.11" + node_type_id = "i3.2xlarge" + autotermination_minutes = 30 + aws_attributes { + availability = "ON_DEMAND" + zone_id = "us-east-1" + instance_profile_arn = "arn:aws:iam::999999999999:instance-profile/s3-access" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +#### - `num_workers` **(Optional)** : +> **(Optional)** Number of worker nodes that this cluster should have. +A cluster has one Spark Driver and num_workers Executors for a total of num_workers + 1 Spark node + +#### - `autoscale` **(Optional)** : +> {{%chevron default="Parameters needed in order to automatically scale clusters up and down based on load." display="true" %}} + +#### **Usage** + +```hcl +resource "databricks_cluster" "my-cluster" { +... + autoscale { + min_workers = 2 + max_workers = 3 + } +... +} +``` + +* `min_workers` - **(Optional)** The minimum number of workers to which the cluster can scale down when +underutilized. It is also the initial number of workers the cluster will have after creation. + +* `max_workers` - **(Optional)** The maximum number of workers to which the cluster can scale up when +overloaded. max_workers must be strictly greater than min_workers. + +{{% /chevron %}} + +#### - `cluster_name`: +> **(Optional)** Cluster name. This doesn’t have to be unique. +If not specified at creation, the cluster name will be an empty string. + +#### - `spark_version`: +> **(Optional)** The Spark version of the cluster. A list of available +Spark versions can be retrieved by using the Runtime Versions API call. This field is required. + +#### - `spark_conf`: +> **(Optional)** An object containing a set of optional, user-specified Spark +configuration key-value pairs. You can also pass in a string of extra JVM options to the driver and the executors via +spark.driver.extraJavaOptions and spark.executor.extraJavaOptions respectively. + +#### - `aws_attributes` **(Optional)** : +> {{%chevron default="Attributes related to clusters running on Amazon Web Services. If not specified at cluster creation, a set of default values will be used." display="true" %}} + +#### **Usage** + + ```hcl +resource "databricks_cluster" "my-cluster" { +... + aws_attributes { + zone_id = "us-east-1" + availability = "SPOT" + spot_bid_price_percent = 100 + instance_profile_arn = "arn:aws:iam::999999999999:instance-profile/custom-s3-access-instance-profile" + first_on_demand = 1 + ebs_volume_type = "GENERAL_PURPOSE_SSD" + ebs_volume_count = 1 + ebs_volume_size = 32 + } +... +} +``` + +* `zone_id` - **(Required)** Identifier for the availability zone/datacenter in which the cluster resides. +This string will be of a form like “us-west-2a”. The provided availability zone must be in the same region as the +Databricks deployment. For example, “us-west-2a” is not a valid zone ID if the Databricks deployment resides in the +“us-east-1” region. + +* `availability` - **(Optional)** Availability type used for all subsequent nodes past the first_on_demand +ones. Note: If first_on_demand is zero, this availability type will be used for the entire cluster. + +* `spot_bid_price_percent` - **(Optional)** The max price for AWS spot instances, as a percentage of the +corresponding instance type’s on-demand price. For example, if this field is set to 50, and the cluster needs a new +i3.xlarge spot instance, then the max price is half of the price of on-demand i3.xlarge instances. Similarly, if +this field is set to 200, the max price is twice the price of on-demand i3.xlarge instances. If not specified, the +default value is 100. When spot instances are requested for this cluster, only spot instances whose max price +percentage matches this field will be considered. For safety, we enforce this field to be no more than 10000. + +* `instance_profile_arn` - **(Optional)** Nodes for this cluster will only be placed on AWS instances with +this instance profile. If omitted, nodes will be placed on instances without an instance profile. The instance +profile must have previously been added to the Databricks environment by an account administrator. + +* `first_on_demand` - **(Optional)** The first first_on_demand nodes of the cluster will be placed on on-demand +instances. If this value is greater than 0, the cluster driver node will be placed on an on-demand instance. If this +value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this +value is less than the current cluster size, first_on_demand nodes will be placed on on-demand instances and the +remainder will be placed on availability instances. This value does not affect cluster size and cannot be mutated +over the lifetime of a cluster. + +* `ebs_volume_type` - **(Optional)** The type of EBS volumes that will be launched with this cluster. +GENERAL_PURPOSE_SSD or THROUGHPUT_OPTIMIZED_HDD + +* `ebs_volume_count` - **(Optional)** The number of volumes launched for each instance. You can choose up to +10 volumes. This feature is only enabled for supported node types. Legacy node types cannot specify custom EBS +volumes. For node types with no instance store, at least one EBS volume needs to be specified; otherwise, cluster +creation will fail. These EBS volumes will be mounted at /ebs0, /ebs1, and etc. Instance store volumes will +be mounted at /local_disk0, /local_disk1, and etc. If EBS volumes are attached, Databricks will configure Spark +to use only the EBS volumes for scratch storage because heterogeneously sized scratch devices can lead to +inefficient disk utilization. If no EBS volumes are attached, Databricks will configure Spark to use instance +store volumes. If EBS volumes are specified, then the Spark configuration spark.local.dir will be overridden. + +* `ebs_volume_size` - **(Optional)** The size of each EBS volume (in GiB) launched for each instance. +For general purpose SSD, this value must be within the range 100 - 4096. For throughput optimized HDD, this +value must be within the range 500 - 4096. Custom EBS volumes cannot be specified for the legacy node types +(memory-optimized and compute-optimized). + +{{% /chevron %}} + +#### - `driver_node_type_id`: +> **(Optional)** The node type of the Spark driver. This field +is optional; if unset, the driver node type will be set as the same value as node_type_id defined above. + +#### - `node_type_id`: +> **(Optional)** This field encodes, through a single value, the resources +available to each of the Spark nodes in this cluster. For example, the Spark nodes can be provisioned and optimized for +memory or compute intensive workloads A list of available node types can be retrieved by using the List Node Types API +call. This field is required. + +#### - `ssh_public_keys`: +> **(Optional)** SSH public key contents that will be added to each +Spark node in this cluster. The corresponding private keys can be used to login with the user name ubuntu on port 2200. +Up to 10 keys can be specified. + +#### - `custom_tags`: +> **(Optional)** Additional tags for cluster resources. Databricks will tag all +cluster resources (e.g., AWS instances and EBS volumes) with these tags in addition to default_tags. + + +#### - `cluster_log_conf` **(Optional)** : +> #### **Usage** +> {{< tabs groupId="storageConfig" >}} + {{% tab name="DBFS" %}} + ```hcl +cluster_log_conf { + dbfs_destination = "dbfs:/my/path/in/dbfs" +} + ``` + {{% /tab %}} + {{% tab name="S3" %}} +```hcl +cluster_log_conf { + s3_destination = "dbfs:/my/path/in/dbfs" + s3_region = "us-east-1" + s3_endpoint = "https://s3-us-east-1.amazonaws.com." + enable_encryption = true + encryption_type = "sse-kms" + kms_key = "my-kms-key-here" + canned_acl = "bucket-owner-full-control" +} +``` +{{% /tab %}} +{{< /tabs >}} +> +> {{% chevron default="The configuration for delivering Spark logs to a long-term storage destination. Only one destination can be specified for one cluster. If the conf is given, the logs will be delivered to the destination every 5 mins. The destination of driver logs is //driver, while the destination of executor logs is //executor." display="true" %}} + + +* `dbfs_destination` - **(Optional)** DBFS location of cluster log. destination must be provided. For example, +"dbfs:/home/cluster_log" + +* `s3_destination` - **(Optional)** S3 destination, e.g. s3://my-bucket/some-prefix You must configure the +cluster with an instance profile and the instance profile must have write access to the destination. You cannot use +AWS keys. + +* `s3_region` - **(Optional)** S3 region, e.g. us-west-2. Either region or endpoint must be set. If both are +set, endpoint is used. + +* `s3_endpoint` - **(Optional)** S3 endpoint, e.g. https://s3-us-west-2.amazonaws.com. Either region or endpoint +needs to be set. If both are set, endpoint is used. + +* `s3_enable_encryption` - **(Optional)** Enable server side encryption, false by default. + +* `s3_encryption_type` - **(Optional)** The encryption type, it could be sse-s3 or sse-kms. +It is used only when encryption is enabled and the default type is sse-s3. + +* `s3_kms_key` - **(Optional)** KMS key used if encryption is enabled and encryption type is set to sse-kms. + +* `s3_canned_acl` - **(Optional)** Set canned access control list, e.g. bucket-owner-full-control. +If canned_cal is set, the cluster instance profile must have s3:PutObjectAcl permission on the destination bucket +and prefix. The full list of possible canned ACL can be found [here](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl). +By default only the object owner gets full control. If you are using cross account role for writing data, you may +want to set bucket-owner-full-control to make bucket owner able to read the logs. + +{{% /chevron %}} + +#### - `init_scripts` **(Optional)** : +> #### **Usage** +> {{< tabs groupId="storageConfig" >}} + {{% tab name="DBFS" %}} + ```hcl +cluster_log_conf { + dbfs_destination = "dbfs:/my/path/in/dbfs" +} + ``` + {{% /tab %}} + {{% tab name="S3" %}} +```hcl +init_scripts { + s3_destination = "dbfs:/my/path/in/dbfs" + s3_region = "us-east-1" + s3_endpoint = "https://s3-us-east-1.amazonaws.com." +} +``` +{{% /tab %}} +{{< /tabs >}} +> +> {{%chevron default="The configuration for storing init scripts. Any number of scripts can be specified. The scripts are executed sequentially in the order provided. If cluster_log_conf is specified, init script logs are sent to //init_scripts." display="true" %}} + +* `dbfs_destination` - **(Optional)** DBFS location of init script. Destination must be provided. For example, +"dbfs:/home/cluster_log" + +* `s3_destination` - **(Optional)** S3 destination, e.g. s3://my-bucket/some-prefix You must configure the +cluster with an instance profile and the instance profile must have write access to the destination. You cannot use +AWS keys. + +* `s3_region` - **(Optional)** S3 region, e.g. us-west-2. Either region or endpoint must be set. If both are +set, endpoint is used. + +* `s3_endpoint` - **(Optional)** S3 endpoint, e.g. https://s3-us-west-2.amazonaws.com. Either region or endpoint +needs to be set. If both are set, endpoint is used. + +{{% /chevron %}} + +#### - `docker_image` **(Optional)** : +> #### **Usage** +> +>```hcl +>docker_image { +> url = "https://hub.docker.com/_/alpine" +> username = "my-user-name" +> password = "password" +>} +>``` +> +> {{%chevron default="Docker image for a custom container." display="true" %}} + +* `url` - **(Required)** URL for the Docker image. + +* `username` - **(Required)** User name for the Docker repository. + +* `password` - **(Required)** Password for the Docker repository. (Sensitive field) + +{{% /chevron %}} + +#### - `spark_env_vars`: +> **(Optional)** An object containing a set of optional, user-specified +environment variable key-value pairs. Key-value pair of the form (X,Y) are exported as is (i.e., export X='Y') while +launching the driver and workers. To specify an additional set of SPARK_DAEMON_JAVA_OPTS, we recommend appending them +to $SPARK_DAEMON_JAVA_OPTS as shown in the example below. This ensures that all default databricks managed environmental +variables are included as well. + +#### - `autotermination_minutes`: +> **(Optional)** Automatically terminates the +cluster after it is inactive for this time in minutes. If not set, this cluster will not be automatically terminated. +If specified, the threshold must be between 10 and 10000 minutes. You can also set this value to 0 to explicitly +disable automatic termination. + +#### - `enable_elastic_disk`: +> **(Optional)** Autoscaling Local Storage: when enabled, +this cluster dynamically acquires additional disk space when its Spark workers are running low on disk space. This +feature requires specific AWS permissions to function correctly - refer to Autoscaling local storage for details. + +#### - `instance_pool_id`: +> **(Optional)** The optional ID of the instance pool to which the +cluster belongs. Refer to Instance Pools API for details. + +#### - `idempotency_token`: +> **(Optional)** An optional token that can be +used to guarantee the idempotency of cluster creation requests. If an active cluster with the provided token already +exists, the request will not create a new cluster, but it will return the ID of the existing cluster instead. The +existence of a cluster with the same token is not checked against terminated clusters. If you specify the idempotency +token, upon failure you can retry until the request succeeds. Databricks will guarantee that exactly one cluster will +be launched with that idempotency token. This token should have at most 64 characters. + +### Libraries + +Libraries are set objects within the Cluster resources, examples below. + +{{< tabs groupId="libraries" >}} +{{% tab name="Jar" %}} + ```hcl +library_jar { + path = "dbfs:/my/path/in/dbfs/jar" +} + ``` +{{% /tab %}} +{{% tab name="Egg" %}} +```hcl +library_egg { + path = "dbfs:/my/path/in/dbfs/egg" +} +``` +{{% /tab %}} +{{% tab name="Whl" %}} +```hcl +library_whl { + path = "dbfs:/my/path/in/dbfs/whl" +} +``` +{{% /tab %}} +{{% tab name="PyPi" %}} +```hcl +library_pypi { + package = "networkx" + repo = "https://pypi.org" +} +``` +{{% /tab %}} +{{% tab name="Maven" %}} +```hcl +library_maven { + coordinates = "org.jsoup:jsoup:1.7.2" + repo = "https://mavencentral.org" + exclusions = ["slf4j:slf4j"] +} +``` +{{% /tab %}} +{{% tab name="Cran" %}} +```hcl +library_cran { + package = "ada" + repo = "https://cran.us.r-project.org" +} +``` +{{% /tab %}} +{{< /tabs >}} + +#### - `library_jar` **(Optional)** : +> {{%chevron default="URI of the JAR to be installed. DBFS and S3 URIs are supported. For example: 'dbfs:/mnt/databricks/library.jar', 's3://my-bucket/library.jar'. If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster with an instance profile to access the S3 URI." display="true" %}} + +* `path` - **(Required)** Path of the jar in dbfs or in S3. For example: "dbfs:/mnt/databricks/library.jar", "s3://my-bucket/library.jar". + +* `messages` - **(Required)** Messages of the results of the library installation + +* `status` - **(Computed)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, +INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. + +{{% /chevron %}} + +#### - `library_egg` **(Optional)** : +> {{%chevron default="URI of the egg to be installed. DBFS and S3 URIs are supported. For example: 'dbfs:/my/egg', 's3://my-bucket/egg' }. If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster with an instance profile to access the S3 URI." display="true" %}} + +* `path` - **(Required)** Path of the egg in dbfs or in S3. For example: "dbfs:/mnt/databricks/library.egg", +"s3://my-bucket/library.egg". + +* `messages` - **(Required)** Messages of the results of the library installation + +* `status` - **(Computed)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, +INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. + +{{% /chevron %}} + +#### - `library_whl` **(Optional)** : + +> {{%chevron default="If whl, URI of the wheel or zipped wheels to be installed. DBFS and S3 URIs are supported. For example: 'dbfs:/my/whl', 's3://my-bucket/whl'. If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster with an instance profile to access the S3 URI. Also the wheel file name needs to use the correct convention. If zipped wheels are to be installed, the file name suffix should be .wheelhouse.zip." display="true" %}} + +* `path` - **(Required)** Path of the whl in dbfs or in S3. For example: "dbfs:/mnt/databricks/library.whl", +"s3://my-bucket/library.whl". + +* `messages` - **(Required)** Messages of the results of the library installation + +* `status` - **(Computed)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, +INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. + +{{% /chevron %}} + +#### - `library_pypi` **(Optional)** : + +> {{%chevron default="Specification of a PyPI library to be installed." display="true" %}} + +* `package` - **(Required)** The name of the PyPI package to install. An optional exact version specification +is also supported. Examples: simplejson and simplejson==3.8.0. This field is required. + +* `repo` - **(Optional)** The repository where the package can be found. If not specified, +the default pip index is used. + +* `messages` - **(Computed)** Messages of the results of the library installation + +* `status` - **(Computed)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, +INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. + +{{% /chevron %}} + +#### - `library_maven` **(Optional)** : + +> {{%chevron default="Specification of a Maven library to be installed." display="true" %}} + +* `coordinates` - **(Required)** Gradle-style Maven coordinates. For example: org.jsoup:jsoup:1.7.2. +This field is required. + +* `repo` - **(Optional)** Maven repo to install the Maven package from. If omitted, both Maven Central +Repository and Spark Packages are searched. + +* `exclusions` - **(Optional)** List of dependences to exclude. For example: +("slf4j:slf4j", "*:hadoop-client"). + +* `messages` - **(Computed)** Messages of the results of the library installation + +* `status` - **(Computed)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, +INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. + +{{% /chevron %}} + +#### - `library_cran` **(Optional)** : + +> {{%chevron default="Specification of a CRAN library to be installed." display="true" %}} + +* `package` - **(Required)** The name of the CRAN package to install. This field is required. + +* `repo` - **(Optional)** The repository where the package can be found. If not specified, +the default CRAN repo is used. + +* `messages` - **(Computed)** Messages of the results of the library installation + +* `status` - **(Computed)** The status of the library installation. Possible statuses are: PENDING, RESOLVING, +INSTALLING, INSTALLED, FAILED, and UNINSTALL_ON_RESTART. + +{{% /chevron %}} + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the cluster object. + +#### - `cluster_id`: +> Canonical identifier for the cluster. + +#### - `default_tags`: +> Tags that are added by Databricks by default, regardless of any +custom_tags that may have been added. These include: Vendor: Databricks, Creator: , ClusterName: +, ClusterId: , Name: + +#### - `state`: +> State of the cluster. + +#### - `state_message`: +> A message associated with the most recent state transition +(e.g., the reason why the cluster entered a TERMINATED state). This field is unstructured, and its exact format +is subject to change. + + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_dbfs_file.md b/website/content/Resources/db_dbfs_file.md new file mode 100644 index 000000000..23b239def --- /dev/null +++ b/website/content/Resources/db_dbfs_file.md @@ -0,0 +1,64 @@ ++++ +title = "dbfs_file" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_dbfs_file` + +This is a resource that lets you create, get and delete files in DBFS (Databricks File System). + +## Example Usage + +```hcl +resource "databricks_dbfs_file" "my_dbfs_file" { + content = filebase64("README.md") + path = "/sri/terraformdbfs/example/README.md" + overwrite = true + mkdirs = true + validate_remote_file = true +} +``` + +## Argument Reference + +The following arguments are supported: + +#### - `content`: +> **(Required)** The content of the file as a base64 encoded string. + +#### - `path`: +> **(Optional)** The path of the file in which you wish to save. + +#### - `overwrite`: +> **(Optional)** This is used to determine whether it should delete the +existing file when with the same name when it writes. The default is set to false. + +#### - `mkdirs`: +> **(Optional)** When the resource is created, this field is used to determine +if it needs to make the parent directories. The default value is set to true. + +#### - `validate_remote_file`: +> **(Optional)** This is used to compare the +actual contents of the file to determine if the remote file is valid or not. If the base64 content is different +it will attempt to do a delete, create. + + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the dbfs file object. + +#### - `file_size`: +> The file size of the file that is being tracked by this resource in bytes. + + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_dbfs_file_sync.md b/website/content/Resources/db_dbfs_file_sync.md new file mode 100644 index 000000000..1e4b9b7f4 --- /dev/null +++ b/website/content/Resources/db_dbfs_file_sync.md @@ -0,0 +1,81 @@ ++++ +title = "dbfs_file_sync" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_dbfs_file_sync` + +This resource will let you create a dbfs file sync which will synchronize files between systems depending on file size +changes. + +{{% notice warning %}} +This dbfs file sync resource only determines differences via file size so if data changes but file size does not +it will provide a false negative in terms of determining difference. +{{% /notice %}} + +## Example Usage + +```hcl +data "databricks_dbfs_file" "my_dbfs_file_data" { + path = "/install_wheels_sri.sh" + limit_file_size = true +} + +resource "databricks_dbfs_file_sync" "my-file1-sync" { + src_path = data.databricks_dbfs_file.my_dbfs_file_data.path + tgt_path = "/terraformdbfs/example/wheels.sh" + file_size = data.databricks_dbfs_file.my-dbfs-file-data.file_size + mkdirs = true + + host = "https://.com/" + token = "dapiherehereherehere" +} +``` + + +## Argument Reference + +The following arguments are supported: + +#### - `src_path`: +> **(Required)** The source path in dbfs where to fetch the file from. +It should look like "dbfs:/path/to/my/file". + +#### - `tgt_path`: +> **(Required)** The target path in dbfs where to sync the file to. +It should look like "dbfs:/path/to/my/file". + +#### - `file_size`: +> **(Required)** This is the value that is used to determine file change. +Unfortunately at this point in time there are no file checksums provided by the dbfs api. To download the file everytime +terraform provides a Read operation during state refresh is not efficient. + +#### - `mkdirs`: +> **(Optional)** This is whether the resource should create the required, +parent directories to sync the file. The default value is true. + +#### - `host`: +> **(Optional)** This is an optional api host for the databricks api if the source +file resides on another workspace/dbfs system. + +#### - `token`: +> **(Optional)** This is an optional api token for the databricks api if the source +file resides on another workspace/dbfs system. + + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> Id for the file sync object. + + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_instance_pool.md b/website/content/Resources/db_instance_pool.md new file mode 100644 index 000000000..b13e68d05 --- /dev/null +++ b/website/content/Resources/db_instance_pool.md @@ -0,0 +1,201 @@ ++++ +title = "instance_pool" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_instance_pool` + +This resource allows you to manage instance pools on Databricks. + +An instance pool reduces cluster start and auto-scaling times by maintaining a set of idle, ready-to-use cloud instances. +When a cluster attached to a pool needs an instance, it first attempts to allocate one of the pool’s idle instances. +If the pool has no idle instances, it expands by allocating a new instance from the instance provider in order to +accommodate the cluster’s request. When a cluster releases an instance, it returns to the pool and is free for another +cluster to use. Only clusters attached to a pool can use that pool’s idle instances. + + +## Example Usage + +.. Note:: It is important to know what that different cloud service providers have different `node_type_id`, + `disk_specs` and potentially other configurations. + +### Instance Pool Example + +{{< tabs groupId="instancePoolCloud" >}} + {{% tab name="AWS" %}} +```hcl +resource "databricks_instance_pool" "my-pool" { + instance_pool_name = "demo-terraform-pool" + min_idle_instances = 0 + max_capacity = 5 + node_type_id = "i3.xlarge" + aws_attributes { + availability = "ON_DEMAND" + zone_id = "us-east-1a" + spot_bid_price_percent = "100" + } + idle_instance_autotermination_minutes = 10 + disk_spec = { + ebs_volume_type = "GENERAL_PURPOSE_SSD" + disk_size = 80 + disk_count = 1 + } + custom_tags = { + "creator": "Sriharsha Tikkireddy" + "testChange": "Sri Tikkireddy" + } +} +``` + {{% /tab %}} + {{% tab name="Azure" %}} +```hcl +resource "databricks_instance_pool" "my-pool" { + instance_pool_name = "demo-terraform-pool" + min_idle_instances = 0 + max_capacity = 5 + node_type_id = "Standard_DS3_v2" + idle_instance_autotermination_minutes = 10 + disk_spec = { + azure_disk_volume_type = "PREMIUM_LRS" + disk_size = 80 + disk_count = 1 + } + custom_tags = { + "creator": "demo user" + "testChange": "demo user" + } +} +``` +{{% /tab %}} +{{< /tabs >}} + +## Argument Reference + +The following arguments are supported: + +#### - `instance_pool_name`: +> **(Required)** The name of the instance pool. This +is required for create and edit operations. It must be unique, non-empty, and less than 100 characters. + +#### - `min_idle_instances`: +> **(Required)** The minimum number of idle +instances maintained by the pool. This is in addition to any instances in use by active clusters. + +#### - `max_capacity`: +> **(Required)** The maximum number of instances the pool can +contain, including both idle instances and ones in use by clusters. Once the maximum capacity is reached, you cannot +create new clusters from the pool and existing clusters cannot autoscale up until some instances are made idle in the +pool via cluster termination or down-scaling. + +#### - `idle_instance_autotermination_minutes`: +> **(Required)** +The number of minutes that idle instances in excess of the min_idle_instances are maintained by the pool before being +terminated. If not specified, excess idle instances are terminated automatically after a default timeout period. If +specified, the time must be between 0 and 10000 minutes. If you specify 0, excess idle instances are removed as soon +as possible. + +#### - `aws_attributes` **(Optional)** : +> {{% chevron default=` Attributes related to instance pools running +on Amazon Web Services. If not specified at creation time, a set of default values is used. This block contains the +following attributes of availability, zone_id, spot_bid_price_percent:` display="true" %}} + +* `availability` - **(Optional)** Availability type used for all instances in the pool. Only `"ON_DEMAND"` and +`"SPOT"` are supported. +* `zone_id` - **(Optional)** Identifier for the availability zone/datacenter in which the instance pool resides. +This string is of a form like `"us-west-2a"`. The provided availability zone must be in the same region as the +Databricks deployment. For example, `"us-west-2a"` is not a valid zone ID if the Databricks deployment resides +in the `"us-east-1"` region. This is an optional field. If not specified, a default zone is used. +You can find the list of available zones as well as the default value by using the +[List Zones API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistavailablezones). +* `spot_bid_price_percent` - **(Optional)** The max price for AWS spot instances, as a percentage of the corresponding +instance type’s on-demand price. For example, if this field is set to 50, and the instance pool needs a new i3.xlarge +spot instance, then the max price is half of the price of on-demand i3.xlarge instances. Similarly, if this field +is set to 200, the max price is twice the price of on-demand i3.xlarge instances. If not specified, the **default +value is 100**. When spot instances are requested for this instance pool, only spot instances whose max price +percentage matches this field are considered. *For safety, this field cannot be greater than 10000.* + +.. Important:: **aws_attributes** will only work for instance pools in an AWS deployment of Databricks. They will **not** work + on Azure Databricks! +{{% /chevron %}} + +#### - `node_type_id`: +> **(Required)** The node type for the instances in the pool. All +clusters attached to the pool inherit this node type and the pool’s idle instances are allocated based on this type. +You can retrieve a list of available node types by using the +[List Node Types API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistnodetypes) call. + +#### - `custom_tags`: +> **(Optional)** Additional tags for instance pool resources. Databricks +tags all pool resources (e.g. AWS & Azure instances and Disk volumes) with these tags in addition to default_tags. +**Databricks allows at most 43 custom tags.** + +#### - `enable_elastic_disk`: +> **(Optional)** Autoscaling Local Storage: when +enabled, the instances in the pool dynamically acquire additional disk space when they are running low on disk space. + +#### - `disk_spec` **(Optional)** : +> {{% notice note %}} + For disk_spec make sure to use **ebs_volume_type** only on AWS deployment of Databricks and + **azure_disk_volume_type** only on a Azure deployment of Databricks. + {{% /notice %}} +> {{% chevron default=`Defines the amount of initial remote storage attached +to each instance in the pool. This block contains the following attributes of ebs_volume_type, +azure_disk_volume_type, disk_count, disk_size:` display="true" %}} + +* `ebs_volume_type` - **(Optional)** The EBS volume type to use. +Options are: `"GENERAL_PURPOSE_SSD"` (Provision extra storage using AWS gp2 EBS volumes) or +`"THROUGHPUT_OPTIMIZED_HDD"` (Provision extra storage using AWS st1 volumes.) + +* `azure_disk_volume_type` - **(Optional)** The type of Azure disk to use. +Options are: `"PREMIUM_LRS"` (Premium storage tier, backed by SSDs) +or `"STANDARD_LRS"` (Standard storage tier, backed by HDDs.) + +* `disk_count` - **(Optional)** The number of disks to attach to each instance: + * This feature is only enabled for supported node types. + * Users can choose up to the limit of the disks supported by the node type. + * For node types with no local disk, at least one disk needs to be specified. + +* `disk_size` - **(Optional)** The size of each disk (in GiB) to attach. Values must fall into the supported range +for a particular instance type: + * **AWS (ebs)**: + * General Purpose SSD: `100 - 4096` GiB + * Throughput Optimized HDD: `500 - 4096` GiB + * **Azure (disk volume)**: + * Premium LRS (SSD): `1 - 1023` GiB + * Standard LRS (HDD): `1- 1023` GiB + +{{% /chevron %}} + +#### - `preloaded_spark_versions`: +> **(Optional)** A list with the +runtime version the pool installs on each instance. Pool clusters that use a preloaded runtime version start faster +as they do have to wait for the image to download. You can retrieve a list of available runtime versions by using the +[Runtime Versions API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistsparkversions) +call. + + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +* :ref:`id ` - The id for the instance pool object. + +#### - `default_tags`: +> Tags that are added by Databricks regardless of any +custom_tags, including: +>* **Vendor**: Databricks +>* **DatabricksInstancePoolCreatorId**: +>* **DatabricksInstancePoolId**: + +#### - `state`: +> Current state of the instance pool. + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_instance_profile.md b/website/content/Resources/db_instance_profile.md new file mode 100644 index 000000000..cc9166e7b --- /dev/null +++ b/website/content/Resources/db_instance_profile.md @@ -0,0 +1,46 @@ ++++ +title = "instance_profile" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + + +## Resource: `databricks_instance_profile` + +This resource allows you to create, get, and delete instance profiles that users can launch clusters with. + +## Example Usage + +```hcl +resource "databricks_instance_profile" "db-instance-profile" { + instance_profile_arn = "arn:aws:iam::999999999999:instance-profile/custom-s3-access-instance-profile" + skip_validation = true +} +``` + +## Argument Reference + +The following arguments are supported: + +#### - `instance_profile_arn`: +> **(Required)** + +#### - `skip_validation`: +> **(Required)** + + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the instance profile object. + + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_job.md b/website/content/Resources/db_job.md new file mode 100644 index 000000000..2beecb6f1 --- /dev/null +++ b/website/content/Resources/db_job.md @@ -0,0 +1,491 @@ ++++ +title = "job" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_job` + +The databricks_job resource allows you to create, edit, and delete jobs. + + +## Example Usage + +### Databricks Example + +{{< tabs groupId="jobClusterTypes" >}} +{{% tab name="New Automated Cluster" %}} +```hcl +resource "databricks_job" "my_job3" { + new_cluster { + autoscale { + min_workers = 2 + max_workers = 3 + } + spark_version = "6.4.x-scala2.11" + aws_attributes { + zone_id = data.databricks_zones.my_wspace_zones.default_zone + spot_bid_price_percent = "100" + } + node_type_id = "r3.xlarge" + } + notebook_path = "/Users/jane.doe@databricks.com/my-demo-notebook" + name = "my-demo-notebook" + timeout_seconds = 3600 + max_retries = 1 + max_concurrent_runs = 1 +} +``` +{{% /tab %}} +{{% tab name="Existing Cluster" %}} +```hcl +resource "databricks_job" "my_job3" { + existing_cluster_id = "" + notebook_path = "/Users/jane.doe@databricks.com/my-demo-notebook" + name = "my-demo-notebook" + timeout_seconds = 3600 + max_retries = 1 + max_concurrent_runs = 1 +} +``` +{{% /tab %}} +{{< /tabs >}} + +## Argument Reference + +The following arguments are supported: + +#### - `existing_cluster_id`: +> **(Optional)** If existing_cluster_id, the ID of an existing +cluster that will be used for all runs of this job. When running jobs on an existing cluster, you may need to manually +restart the cluster if it stops responding. We suggest running jobs on new clusters for greater reliability. + +#### - `new_cluster`: +> **(Optional)** A description of a cluster that will be created for each run. +Please look [below](#new-cluster). + +#### - `name`: +> **(Optional)** An optional name for the job. The default value is Untitled. + +#### - `library_jar`: +> **(Optional)** URI of the JAR to be installed. +DBFS and S3 URIs are supported. For example: "dbfs:/mnt/databricks/library.jar", "s3://my-bucket/library.jar". +If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster with an +instance profile to access the S3 URI. + +#### - `library_egg`: +> **(Optional)** URI of the egg to be installed. +DBFS and S3 URIs are supported. For example: "dbfs:/my/egg", "s3://my-bucket/egg" }. +If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster +with an instance profile to access the S3 URI. + +#### - `library_whl`: +> **(Optional)** If whl, URI of the wheel or zipped wheels to be installed. +DBFS and S3 URIs are supported. For example: "dbfs:/my/whl", "s3://my-bucket/whl". If S3 is used, make sure the cluster +has read access on the library. You may need to launch the cluster with an instance profile to access the S3 URI. +Also the wheel file name needs to use the correct convention. If zipped wheels are to be installed, the file name +suffix should be .wheelhouse.zip. + +#### - `library_pypi` **(Optional)** : +> {{%chevron default="Specification of a PyPI library to be installed." display="true" %}} + +* `package` - **(Required)** The name of the PyPI package to install. An optional exact version specification +is also supported. Examples: simplejson and simplejson==3.8.0. This field is required. + +* `repo` - **(Optional)** The repository where the package can be found. If not specified, +the default pip index is used. + +{{% /chevron %}} + +#### - `library_maven` **(Optional)** : +> {{%chevron default="Specification of a Maven library to be installed." display="true" %}} + +* `coordinates` - **(Required)** Gradle-style Maven coordinates. For example: org.jsoup:jsoup:1.7.2. +This field is required. + +* `repo` - **(Optional)** Maven repo to install the Maven package from. If omitted, both Maven Central +Repository and Spark Packages are searched. + +* `exclusions` - **(Optional)** List of dependences to exclude. For example: +("slf4j:slf4j", "*:hadoop-client"). + +{{% /chevron %}} + +#### - `library_cran` **(Optional)** : +> {{%chevron default="Specification of a CRAN library to be installed." display="true" %}} + +* `package` - **(Required)** The name of the CRAN package to install. This field is required. + +* `repo` - **(Optional)** The repository where the package can be found. If not specified, +the default CRAN repo is used. + +{{% /chevron %}} + +#### - `notebook_path`: +> **(Optional)** The absolute path of the notebook to be run in the +Databricks Workspace. This path must begin with a slash. This field is required. + +#### - `notebook_base_parameters`: +> **(Optional)** Base parameters to be used +for each run of this job. If the run is initiated by a call to run-now with parameters specified, the two parameters +maps will be merged. If the same key is specified in base_parameters and in run-now, the value from run-now will be used. + +#### - `jar_uri`: +> **(Optional)** Deprecated since 04/2016. Provide a jar through the libraries +field instead. + +#### - `jar_main_class_name`: +> **(Optional)** The full name of the class containing the +main method to be executed. This class must be contained in a JAR provided as a library. The code should use +SparkContext.getOrCreate to obtain a Spark context; otherwise, runs of the job will fail. + +#### - `jar_parameters`: +> **(Optional)** Parameters that will be passed to the main method. + +#### - `python_file`: +> **(Optional)** The URI of the Python file to be executed. DBFS and S3 paths +are supported. This field is required. + +#### - `python_parameters`: +> **(Optional)** Command line parameters that will be passed to +the Python file. + +#### - `spark_submit_parameters`: +> **(Optional)** Command-line parameters passed +to spark submit. + +#### - `email_notifications` **(Optional)** : +> {{%chevron default=`An optional set of email addresses notified +when runs of this job begin and complete and when this job is deleted. The default behavior is to not send any emails.` +display="true" %}} + +* `on_start` - **(Optional)** A list of email addresses to be notified when a run begins. +If not specified upon job creation or reset, the list will be empty, i.e., no address will be notified. + +* :`on_success` - **(Optional)** A list of email addresses to be notified when a run successfully completes. +A run is considered to have completed successfully if it ends with a TERMINATED life_cycle_state and a SUCCESSFUL +result_state. If not specified upon job creation or reset, the list will be empty, i.e., no address will be notified. + +* `on_failure` - **(Optional)** A list of email addresses to be notified when a run unsuccessfully completes. +A run is considered to have completed unsuccessfully if it ends with an INTERNAL_ERROR life_cycle_state or a +SKIPPED, FAILED, or TIMED_OUT result_state. If not specified upon job creation or reset, the list will be empty, +i.e., no address will be notified. + +* `no_alert_for_skipped_runs` - **(Optional)** If true, do not send email to recipients specified in +on_failure if the run is skipped. + +{{% /chevron %}} + +#### - `timeout_seconds`: +> **(Optional)** An optional timeout applied to each run of this job. +The default behavior is to have no timeout. + +#### - `max_retries`: +> **(Optional)** An optional maximum number of times to retry an unsuccessful +run. A run is considered to be unsuccessful if it completes with a FAILED result_state or INTERNAL_ERROR +life_cycle_state. The value -1 means to retry indefinitely and the value 0 means to never retry. The default behavior +is to never retry. + +#### - `min_retry_interval_millis`: +> **(Optional)** An optional minimal interval in +milliseconds between the start of the failed run and the subsequent retry run. The default behavior is that +unsuccessful runs are immediately retried. + +#### - `retry_on_timeout`: +> **(Optional)** An optional policy to specify whether to retry +a job when it times out. The default behavior is to not retry on timeout. + +#### - `job_schedule` **(Optional)** : +> {{%chevron default=`An optional periodic schedule for this job. +The default behavior is that the job runs when triggered by clicking Run Now in the Jobs UI or sending an API +request to runNow.` display="true" %}} + +* `quartz_cron_expression` - **(Optional)** A Cron expression using Quartz syntax that describes +the schedule for a job. See [Cron Trigger](http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html) +for details. This field is required. + +* `timezone_id` - **(Optional)** A Java timezone ID. The schedule for a job will be resolved with respect +to this timezone. See [Java TimeZone](https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html) for +details. This field is required. + +{{% /chevron %}} + +#### - `max_concurrent_runs`: +> **(Optional)** An optional maximum allowed number of +concurrent runs of the job. Set this value if you want to be able to execute multiple runs of the same job concurrently. +This is useful for example if you trigger your job on a frequent schedule and want to allow consecutive runs to overlap +with each other, or if you want to trigger multiple runs which differ by their input parameters. This setting affects +only new runs. For example, suppose the job’s concurrency is 4 and there are 4 concurrent active runs. Then setting +the concurrency to 3 won’t kill any of the active runs. However, from then on, new runs are skipped unless there are +fewer than 3 active runs. This value cannot exceed 150. Setting this value to 0 causes all new runs to be skipped. +The default behavior is to allow only 1 concurrent run. + + +### New Cluster + + +#### - `num_workers` **(Optional)** : +> **(Optional)** Number of worker nodes that this cluster should have. +A cluster has one Spark Driver and num_workers Executors for a total of num_workers + 1 Spark node + +#### - `autoscale` **(Optional)** : +> {{%chevron default="Parameters needed in order to automatically scale clusters up and down based on load." display="true" %}} + +#### **Usage** + +```hcl +resource "databricks_cluster" "my-cluster" { +... + autoscale { + min_workers = 2 + max_workers = 3 + } +... +} +``` + +* `min_workers` - **(Optional)** The minimum number of workers to which the cluster can scale down when +underutilized. It is also the initial number of workers the cluster will have after creation. + +* `max_workers` - **(Optional)** The maximum number of workers to which the cluster can scale up when +overloaded. max_workers must be strictly greater than min_workers. + +{{% /chevron %}} + +#### - `cluster_name`: +> **(Optional)** Cluster name. This doesn’t have to be unique. +If not specified at creation, the cluster name will be an empty string. + +#### - `spark_version`: +> **(Optional)** The Spark version of the cluster. A list of available +Spark versions can be retrieved by using the Runtime Versions API call. This field is required. + +#### - `spark_conf`: +> **(Optional)** An object containing a set of optional, user-specified Spark +configuration key-value pairs. You can also pass in a string of extra JVM options to the driver and the executors via +spark.driver.extraJavaOptions and spark.executor.extraJavaOptions respectively. + +#### - `aws_attributes` **(Optional)** : +> {{%chevron default="Attributes related to clusters running on Amazon Web Services. If not specified at cluster creation, a set of default values will be used." display="true" %}} + +#### **Usage** + + ```hcl +resource "databricks_cluster" "my-cluster" { +... + aws_attributes { + zone_id = "us-east-1" + availability = "SPOT" + spot_bid_price_percent = 100 + instance_profile_arn = "arn:aws:iam::999999999999:instance-profile/custom-s3-access-instance-profile" + first_on_demand = 1 + ebs_volume_type = "GENERAL_PURPOSE_SSD" + ebs_volume_count = 1 + ebs_volume_size = 32 + } +... +} +``` + +* `zone_id` - **(Required)** Identifier for the availability zone/datacenter in which the cluster resides. +This string will be of a form like “us-west-2a”. The provided availability zone must be in the same region as the +Databricks deployment. For example, “us-west-2a” is not a valid zone ID if the Databricks deployment resides in the +“us-east-1” region. + +* `availability` - **(Optional)** Availability type used for all subsequent nodes past the first_on_demand +ones. Note: If first_on_demand is zero, this availability type will be used for the entire cluster. + +* `spot_bid_price_percent` - **(Optional)** The max price for AWS spot instances, as a percentage of the +corresponding instance type’s on-demand price. For example, if this field is set to 50, and the cluster needs a new +i3.xlarge spot instance, then the max price is half of the price of on-demand i3.xlarge instances. Similarly, if +this field is set to 200, the max price is twice the price of on-demand i3.xlarge instances. If not specified, the +default value is 100. When spot instances are requested for this cluster, only spot instances whose max price +percentage matches this field will be considered. For safety, we enforce this field to be no more than 10000. + +* `instance_profile_arn` - **(Optional)** Nodes for this cluster will only be placed on AWS instances with +this instance profile. If omitted, nodes will be placed on instances without an instance profile. The instance +profile must have previously been added to the Databricks environment by an account administrator. + +* `first_on_demand` - **(Optional)** The first first_on_demand nodes of the cluster will be placed on on-demand +instances. If this value is greater than 0, the cluster driver node will be placed on an on-demand instance. If this +value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this +value is less than the current cluster size, first_on_demand nodes will be placed on on-demand instances and the +remainder will be placed on availability instances. This value does not affect cluster size and cannot be mutated +over the lifetime of a cluster. + +* `ebs_volume_type` - **(Optional)** The type of EBS volumes that will be launched with this cluster. +GENERAL_PURPOSE_SSD or THROUGHPUT_OPTIMIZED_HDD + +* `ebs_volume_count` - **(Optional)** The number of volumes launched for each instance. You can choose up to +10 volumes. This feature is only enabled for supported node types. Legacy node types cannot specify custom EBS +volumes. For node types with no instance store, at least one EBS volume needs to be specified; otherwise, cluster +creation will fail. These EBS volumes will be mounted at /ebs0, /ebs1, and etc. Instance store volumes will +be mounted at /local_disk0, /local_disk1, and etc. If EBS volumes are attached, Databricks will configure Spark +to use only the EBS volumes for scratch storage because heterogeneously sized scratch devices can lead to +inefficient disk utilization. If no EBS volumes are attached, Databricks will configure Spark to use instance +store volumes. If EBS volumes are specified, then the Spark configuration spark.local.dir will be overridden. + +* `ebs_volume_size` - **(Optional)** The size of each EBS volume (in GiB) launched for each instance. +For general purpose SSD, this value must be within the range 100 - 4096. For throughput optimized HDD, this +value must be within the range 500 - 4096. Custom EBS volumes cannot be specified for the legacy node types +(memory-optimized and compute-optimized). + +{{% /chevron %}} + +#### - `driver_node_type_id`: +> **(Optional)** The node type of the Spark driver. This field +is optional; if unset, the driver node type will be set as the same value as node_type_id defined above. + +#### - `node_type_id`: +> **(Optional)** This field encodes, through a single value, the resources +available to each of the Spark nodes in this cluster. For example, the Spark nodes can be provisioned and optimized for +memory or compute intensive workloads A list of available node types can be retrieved by using the List Node Types API +call. This field is required. + +#### - `ssh_public_keys`: +> **(Optional)** SSH public key contents that will be added to each +Spark node in this cluster. The corresponding private keys can be used to login with the user name ubuntu on port 2200. +Up to 10 keys can be specified. + +#### - `custom_tags`: +> **(Optional)** Additional tags for cluster resources. Databricks will tag all +cluster resources (e.g., AWS instances and EBS volumes) with these tags in addition to default_tags. + + +#### - `cluster_log_conf` **(Optional)** : +> #### **Usage** +> {{< tabs groupId="jobStorageConfig" >}} + {{% tab name="DBFS" %}} + ```hcl +cluster_log_conf { + dbfs_destination = "dbfs:/my/path/in/dbfs" +} + ``` + {{% /tab %}} + {{% tab name="S3" %}} +```hcl +cluster_log_conf { + s3_destination = "dbfs:/my/path/in/dbfs" + s3_region = "us-east-1" + s3_endpoint = "https://s3-us-east-1.amazonaws.com." + enable_encryption = true + encryption_type = "sse-kms" + kms_key = "my-kms-key-here" + canned_acl = "bucket-owner-full-control" +} +``` +{{% /tab %}} +{{< /tabs >}} +> +> {{% chevron default="The configuration for delivering Spark logs to a long-term storage destination. Only one destination can be specified for one cluster. If the conf is given, the logs will be delivered to the destination every 5 mins. The destination of driver logs is //driver, while the destination of executor logs is //executor." display="true" %}} + + +* `dbfs_destination` - **(Optional)** DBFS location of cluster log. destination must be provided. For example, +"dbfs:/home/cluster_log" + +* `s3_destination` - **(Optional)** S3 destination, e.g. s3://my-bucket/some-prefix You must configure the +cluster with an instance profile and the instance profile must have write access to the destination. You cannot use +AWS keys. + +* `s3_region` - **(Optional)** S3 region, e.g. us-west-2. Either region or endpoint must be set. If both are +set, endpoint is used. + +* `s3_endpoint` - **(Optional)** S3 endpoint, e.g. https://s3-us-west-2.amazonaws.com. Either region or endpoint +needs to be set. If both are set, endpoint is used. + +* `s3_enable_encryption` - **(Optional)** Enable server side encryption, false by default. + +* `s3_encryption_type` - **(Optional)** The encryption type, it could be sse-s3 or sse-kms. +It is used only when encryption is enabled and the default type is sse-s3. + +* `s3_kms_key` - **(Optional)** KMS key used if encryption is enabled and encryption type is set to sse-kms. + +* `s3_canned_acl` - **(Optional)** Set canned access control list, e.g. bucket-owner-full-control. +If canned_cal is set, the cluster instance profile must have s3:PutObjectAcl permission on the destination bucket +and prefix. The full list of possible canned ACL can be found [here](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl). +By default only the object owner gets full control. If you are using cross account role for writing data, you may +want to set bucket-owner-full-control to make bucket owner able to read the logs. + +{{% /chevron %}} + +#### - `init_scripts` **(Optional)** : +> #### **Usage** +> {{< tabs groupId="jobStorageConfig" >}} + {{% tab name="DBFS" %}} + ```hcl +cluster_log_conf { + dbfs_destination = "dbfs:/my/path/in/dbfs" +} + ``` + {{% /tab %}} + {{% tab name="S3" %}} +```hcl +init_scripts { + s3_destination = "dbfs:/my/path/in/dbfs" + s3_region = "us-east-1" + s3_endpoint = "https://s3-us-east-1.amazonaws.com." +} +``` +{{% /tab %}} +{{< /tabs >}} +> +> {{%chevron default="The configuration for storing init scripts. Any number of scripts can be specified. The scripts are executed sequentially in the order provided. If cluster_log_conf is specified, init script logs are sent to //init_scripts." display="true" %}} + +* `dbfs_destination` - **(Optional)** DBFS location of init script. Destination must be provided. For example, +"dbfs:/home/cluster_log" + +* `s3_destination` - **(Optional)** S3 destination, e.g. s3://my-bucket/some-prefix You must configure the +cluster with an instance profile and the instance profile must have write access to the destination. You cannot use +AWS keys. + +* `s3_region` - **(Optional)** S3 region, e.g. us-west-2. Either region or endpoint must be set. If both are +set, endpoint is used. + +* `s3_endpoint` - **(Optional)** S3 endpoint, e.g. https://s3-us-west-2.amazonaws.com. Either region or endpoint +needs to be set. If both are set, endpoint is used. + +{{% /chevron %}} + +#### - `spark_env_vars`: +> **(Optional)** An object containing a set of optional, user-specified +environment variable key-value pairs. Key-value pair of the form (X,Y) are exported as is (i.e., export X='Y') while +launching the driver and workers. To specify an additional set of SPARK_DAEMON_JAVA_OPTS, we recommend appending them +to $SPARK_DAEMON_JAVA_OPTS as shown in the example below. This ensures that all default databricks managed environmental +variables are included as well. + +#### - `enable_elastic_disk`: +> **(Optional)** Autoscaling Local Storage: when enabled, +this cluster dynamically acquires additional disk space when its Spark workers are running low on disk space. This +feature requires specific AWS permissions to function correctly - refer to Autoscaling local storage for details. + +#### - `instance_pool_id`: +> **(Optional)** The optional ID of the instance pool to which the +cluster belongs. Refer to Instance Pools API for details. + + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the job object. + +#### - `job_id`: +> The canonical identifier for the newly created job. + +#### - `creator_user_name`: +> The creator user name. This field won’t be included in +the response if the user has already been deleted. + +#### - `created_time`: +> The time at which this job was created in epoch milliseconds +(milliseconds since 1/1/1970 UTC). + + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_notebook.md b/website/content/Resources/db_notebook.md new file mode 100644 index 000000000..73039fb2a --- /dev/null +++ b/website/content/Resources/db_notebook.md @@ -0,0 +1,73 @@ ++++ +title = "notebook" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_notebook` + +This resource allows you to manage the import, export, and delete notebooks. The maximum allowed size of a +request to resource is 10MB. + + +## Example Usage + +```hcl +resource "databricks_notebook" "my_databricks_notebook" { + content = filebase64("${path.module}/demo-terraform.dbc") + path = "/workspace/terraform-test-folder/" + overwrite = false + mkdirs = true + format = "DBC" +} +``` + +## Argument Reference + +The following arguments are supported: + +#### - `content`: +> **(Required)** The base64-encoded content. If the limit (10MB) is exceeded, +exception with error code MAX_NOTEBOOK_SIZE_EXCEEDED will be thrown. + +#### - `path`: +> **(Required)** The absolute path of the notebook or directory. +Exporting a directory is supported only for DBC. This field is **required**. + +#### - `language`: +> **(Required)** The language. If format is set to SOURCE, +this field is required; otherwise, it will be ignored. Possible choices are SCALA, PYTHON, SQL, R. + +#### - `overwrite`: +> **(Required)** The flag that specifies whether to overwrite existing object. +It is false by default. For DBC format, overwrite is not supported since it may contain a directory. + +#### - `mkdirs`: +> **(Required)** Create the given directory and necessary parent directories +if they do not exists. If there exists an object (not a directory) at any prefix of the input path, this call +returns an error RESOURCE_ALREADY_EXISTS. If this operation fails it may have succeeded in creating some of the necessary parent directories. + +#### - `format`: +> **(Required)** This specifies the format of the file to be imported. +By default, this is SOURCE. However it may be one of: SOURCE, HTML, JUPYTER, DBC. The value is case sensitive. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the notebook object. + +#### - `object_id`: +> Unique identifier for a NOTEBOOK or DIRECTORY. + +#### - `object_type`: +> The type of the object. It could be NOTEBOOK, DIRECTORY or LIBRARY. + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_scim_group.md b/website/content/Resources/db_scim_group.md new file mode 100644 index 000000000..8ea48cfe8 --- /dev/null +++ b/website/content/Resources/db_scim_group.md @@ -0,0 +1,52 @@ ++++ +title = "scim_group" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_scim_group` + +This resource allows you to create groups in Databricks. You can also associate Databricks users to the following groups. + +.. Important:: You must be a Databricks administrator API token to use SCIM resources. + +## Example Usage + +```hcl +resource "databricks_scim_user" "my-user" { + user_name = "testuser@databricks.com" + display_name = "Test User" + entitlements = [ + "allow-cluster-create", + ] +} + +resource "databricks_scim_group" "my-group" { + display_name = "Sri Test Group" + members = ["${databricks_scim_user.my-user.id}"] +} +``` +## Argument Reference + +The following arguments are supported: + +#### - `display_name`: +> **(Required)** This is the display name for the given group. + +#### - `group_members`: +> **(Optional)** This is a list of users associated to the given group. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the scim group object. + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_scim_user.md b/website/content/Resources/db_scim_user.md new file mode 100644 index 000000000..cbb852665 --- /dev/null +++ b/website/content/Resources/db_scim_user.md @@ -0,0 +1,60 @@ ++++ +title = "scim_user" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_scim_user` + +This resource allows you to create users in Databricks and give them the proper level of access, as well as +remove access for users (deprovision them) when they leave your organization or no longer need access to Databricks. + +{{% notice note %}} +You must be a Databricks administrator API token to use SCIM resources. +{{% /notice %}} + +## Example Usage + +```hcl +resource "databricks_scim_user" "my-user" { + user_name = "testuser@databricks.com" + display_name = "Test User" + entitlements = [ + "allow-cluster-create", + ] +} +``` + +## Argument Reference + +The following arguments are supported: + +#### - `user_name`: +> **(Required)** This is the username of the given user and will be their form of access +and identity. + +#### - `display_name`: +> **(Optional)** This is an alias for the username can be the full name of the user. + +#### - `user_roles`: +> **(Optional)** This is a list of roles assigned to the user, specific to the AWS environment for +user to assume roles on clusters. + +#### - `entitlements`: +> **(Optional)** Entitlements for the user to be able to have the ability to create +clusters and pools. Current options are: `"allow-cluster-create", "allow-instance-pool-create"`. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the scim user object. + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_secret.md b/website/content/Resources/db_secret.md new file mode 100644 index 000000000..73a6f25c8 --- /dev/null +++ b/website/content/Resources/db_secret.md @@ -0,0 +1,62 @@ ++++ +title = "secret" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_secret` + +With this resource you can insert a secret under the provided scope with the given name. If a secret already exists +with the same name, this command overwrites the existing secret’s value. The server encrypts the secret using the +secret scope’s encryption settings before storing it. You must have WRITE or MANAGE permission on the secret scope. + +The secret key must consist of alphanumeric characters, dashes, underscores, and periods, and cannot exceed +128 characters. The maximum allowed secret value size is 128 KB. The maximum number of secrets in a given scope is 1000. + +You can read a secret value only from within a command on a cluster (for example, through a notebook); there is no API +to read a secret value outside of a cluster. The permission applied is based on who is invoking the command and you must +have at least READ permission. + +## Example Usage + +```hcl +resource "databricks_secret_scope" "my-scope" { + name = "terraform-demo-scope" + initial_manage_principal = "users" +} + +resource "databricks_secret" "my_secret" { + key = "test-secret-1" + string_value = "hello world 123" + scope = "${databricks_secret_scope.my-scope.name}" +} +``` +## Argument Reference + +The following arguments are supported: + +#### - `string_value`: +> **(Required)** If string_value, if specified, the value will be stored in UTF-8 +(MB4) form. + +#### - `scope`: +> **(Required)** The name of the scope to which the secret will be associated with. +This field is required. + +#### - `key`: +> **(Required)** A unique name to identify the secret. This field is required. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the secret object. + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_secret_acl.md b/website/content/Resources/db_secret_acl.md new file mode 100644 index 000000000..2945da2d0 --- /dev/null +++ b/website/content/Resources/db_secret_acl.md @@ -0,0 +1,59 @@ ++++ +title = "secret_acl" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_secret_acl` + +Create or overwrite the ACL associated with the given principal (user or group) on the specified scope point. +In general, a user or group will use the most powerful permission available to them, and +permissions are ordered as follows: + +* **MANAGE** - Allowed to change ACLs, and read and write to this secret scope. +* **WRITE** - Allowed to read and write to this secret scope. +* **READ** - Allowed to read this secret scope and list what secrets are available. + +## Example Usage + +```hcl +resource "databricks_secret_scope" "my-scope" { + name = "terraform-demo-scope" +} + +resource "databricks_secret_acl" "my-acl" { + principal = "USERS" + permission = "READ" + scope = "${databricks_secret_scope.my-scope.name}" +} +``` +## Argument Reference + +The following arguments are supported: + +#### - `scope`: +> **(Required)** The name of the scope to remove permissions from. This field is required. +(MB4) form. + +#### - `principal`: +> **(Required)** The principal to remove an existing ACL from. The principal is a user +or group name corresponding to an existing Databricks principal to be granted or revoked access. This field is required. + +#### - `permission`: +> **(Required)** The permission level applied to the principal. +Options are: `"READ", "WRITE", "MANAGE"`. This field is required. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the secret scope acl object. + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_secret_scope.md b/website/content/Resources/db_secret_scope.md new file mode 100644 index 000000000..9c9ad8ed0 --- /dev/null +++ b/website/content/Resources/db_secret_scope.md @@ -0,0 +1,50 @@ ++++ +title = "secret_scope" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_secret_scope` + +This resource creates a Databricks-backed secret scope in which secrets are stored in Databricks-managed storage and +encrypted with a cloud-based specific encryption key. + +The scope name: + +* Must be unique within a workspace. +* Must consist of alphanumeric characters, dashes, underscores, and periods, and may not exceed 128 characters. + +## Example Usage + +```hcl +resource "databricks_secret_scope" "my-scope" { + name = "terraform-demo-scope" + initial_manage_principal = "users" +} +``` + +## Argument Reference + +The following arguments are supported: + +#### - `name`: +> **(Required)** Scope name requested by the user. Scope names are unique. This field is required. + +#### - `initial_manage_principal`: +> **(Optional)** The principal that is initially granted +MANAGE permission to the created scope. + +## Attribute Reference + +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the secret scope object. + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/Resources/db_token.md b/website/content/Resources/db_token.md new file mode 100644 index 000000000..1e42c9ed0 --- /dev/null +++ b/website/content/Resources/db_token.md @@ -0,0 +1,57 @@ ++++ +title = "token" +date = 2020-04-20T23:34:03-04:00 +weight = 15 +chapter = false +pre = "" ++++ + +## Resource: `databricks_token` + +This resource creates an api token that can be used to create Databricks resources. + +{{% notice warning %}} +This will create an API token for the user that has authenticated on the provider. So if you have used an +admin user to setup the provider then you will be making API tokens for that admin user. +{{% /notice %}} + +## Example Usage + +```hcl +resource "databricks_token" "my-token" { + lifetime_seconds = 6000 + comment = "Testing terraform v2" +} +``` +## Argument Reference + +The following arguments are supported: + +#### - `lifetime_seconds`: +> **(Optional) (Numeric)** The lifetime of the token, in seconds. +If no lifetime is specified, the token remains valid indefinitely. + +#### - `comment`: +> **(Optional)** Optional description to attach to the token. + + +## Attribute Reference +In addition to all arguments above, the following attributes are exported: + +#### - `id`: +> The id for the token object. + +#### - `creation_time`: +> Server time (in epoch milliseconds) when the token was created. + +#### - `token_value`: +> **Sensitive** The value of the newly-created token. + +#### - `expiry_time`: +> Server time (in epoch milliseconds) when the token will expire, or -1 if not applicable. + +## Import + +{{% notice note %}} +Importing this resource is not currently supported. +{{% /notice %}} diff --git a/website/content/_index.md b/website/content/_index.md new file mode 100644 index 000000000..43687d683 --- /dev/null +++ b/website/content/_index.md @@ -0,0 +1,27 @@ ++++ +title = "Databricks Terraform Provider" +date = 2020-04-20T23:34:03-04:00 +weight = 1 +chapter = false +pre = "" ++++ + +# Lets lay some bricks! + +## Provider Download + +Hey Databricks Team this static site section is only for internal only which will contain a build of the artifact. + +These artifacts do not contain E2 please let me know if you need those specifically! :) + +After downloading and untaring/unzipping the artifact make sure you move it to `~/.terraform.d/plugins/`: + +``` bash +mkdir -p ~/.terraform.d/plugins/ && cp terraform-provider-databricks ~/.terraform.d/plugins/terraform-provider-databricks +``` + +{{%attachments title="Provider Download" style="orange" pattern=".*" /%}} + +## Feedback + +{{% button href="https://docs.google.com/spreadsheets/d/1MzGpLQ7A2T5sxxbv88t0d0F88ZDO-HjCxp-YAn3ENuc/edit?pli=1#gid=0" icon="fas fa-comment-dots" %}}Please provide feedback!{{% /button %}} diff --git a/website/layouts/partials/custom-footer.html b/website/layouts/partials/custom-footer.html new file mode 100644 index 000000000..4eaa4ea0f --- /dev/null +++ b/website/layouts/partials/custom-footer.html @@ -0,0 +1,55 @@ + \ No newline at end of file diff --git a/website/layouts/partials/custom-header.html b/website/layouts/partials/custom-header.html new file mode 100644 index 000000000..e69de29bb diff --git a/website/layouts/partials/favicon.html b/website/layouts/partials/favicon.html new file mode 100644 index 000000000..62c233e8b --- /dev/null +++ b/website/layouts/partials/favicon.html @@ -0,0 +1 @@ + diff --git a/website/layouts/partials/logo.html b/website/layouts/partials/logo.html new file mode 100644 index 000000000..248d2f8e2 --- /dev/null +++ b/website/layouts/partials/logo.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/website/layouts/partials/menu-footer.html b/website/layouts/partials/menu-footer.html new file mode 100644 index 000000000..b351fa07c --- /dev/null +++ b/website/layouts/partials/menu-footer.html @@ -0,0 +1,15 @@ +
+ + v0.1.0 + + + Star + + + Fork + + + Issue +
+ + diff --git a/website/layouts/shortcodes/chevron.html b/website/layouts/shortcodes/chevron.html new file mode 100644 index 000000000..d9359aac7 --- /dev/null +++ b/website/layouts/shortcodes/chevron.html @@ -0,0 +1,17 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +
+
+ + + {{$expandMessage := T "Expand-title"}} + {{ if .IsNamedParams }} + {{.Get "default" | default $expandMessage}} + {{else}} + {{.Get 0 | default $expandMessage}} + {{end}} + +
+
+ {{.Inner | safeHTML}} +
+
\ No newline at end of file diff --git a/website/layouts/shortcodes/tab.html b/website/layouts/shortcodes/tab.html new file mode 100644 index 000000000..661af3615 --- /dev/null +++ b/website/layouts/shortcodes/tab.html @@ -0,0 +1,11 @@ +{{ if .Parent }} + {{ $name := trim (.Get "name") " " }} + {{ if not (.Parent.Scratch.Get "tabs") }} + {{ .Parent.Scratch.Set "tabs" slice }} + {{ end }} + {{ with .Inner }} + {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }} + {{ end }} +{{ else }} + {{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}} +{{ end}} diff --git a/website/layouts/shortcodes/tabs.html b/website/layouts/shortcodes/tabs.html new file mode 100644 index 000000000..7b6446bb0 --- /dev/null +++ b/website/layouts/shortcodes/tabs.html @@ -0,0 +1,21 @@ +{{ with .Inner }}{{/* don't do anything, just call it */}}{{ end }} +{{ $groupId := default "default" (.Get "groupId") }} +
+
+ {{ range $idx, $tab := .Scratch.Get "tabs" }} + + {{ end }} +
+
+ {{ range $idx, $tab := .Scratch.Get "tabs" }} +
+ {{ .content }} +
+ {{ end }} +
+
\ No newline at end of file diff --git a/website/static/css/tabs.css b/website/static/css/tabs.css new file mode 100644 index 000000000..7a56e81b2 --- /dev/null +++ b/website/static/css/tabs.css @@ -0,0 +1,43 @@ +#body .tab-nav-button { + border-width: 1px 1px 1px 1px !important; + border-color: #ccc !important; + border-radius: 4px 4px 0 0 !important; + background-color: #ddd !important; + float: left; + display: block; + position: relative; + margin-left: 4px; + bottom: -1px; +} +#body .tab-nav-button:first-child { + margin-left: 0px; +} +#body .tab-nav-button.active { + background-color: #fff !important; + border-bottom-color: #fff !important; +} + +#body .tab-panel { + margin-top: 32px; + margin-bottom: 32px; +} +#body .tab-content { + display: block; + clear: both; + padding: 8px; + border-width: 1px; + border-style: solid; + border-color: #ccc; +} +#body .tab-content .tab-item{ + display: none; +} + +#body .tab-content .tab-item.active{ + display: block; +} + +#body .tab-item pre{ + margin-bottom: 0; + margin-top: 0; +} \ No newline at end of file diff --git a/website/static/databricks2.png b/website/static/databricks2.png new file mode 100644 index 000000000..8b0127e90 Binary files /dev/null and b/website/static/databricks2.png differ diff --git a/website/static/favicon.png b/website/static/favicon.png new file mode 100644 index 000000000..265896d7b Binary files /dev/null and b/website/static/favicon.png differ diff --git a/website/themes/hugo-theme-learn/.editorconfig b/website/themes/hugo-theme-learn/.editorconfig new file mode 100644 index 000000000..12f0ef580 --- /dev/null +++ b/website/themes/hugo-theme-learn/.editorconfig @@ -0,0 +1,16 @@ +# https://editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +trim_trailing_whitespace = true + +[*.js] +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/website/themes/hugo-theme-learn/.gitignore b/website/themes/hugo-theme-learn/.gitignore new file mode 100644 index 000000000..64297518e --- /dev/null +++ b/website/themes/hugo-theme-learn/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +public/ +exampleSite/public diff --git a/website/themes/hugo-theme-learn/.grenrc.yml b/website/themes/hugo-theme-learn/.grenrc.yml new file mode 100644 index 000000000..ad31ac817 --- /dev/null +++ b/website/themes/hugo-theme-learn/.grenrc.yml @@ -0,0 +1,25 @@ +--- + dataSource: "prs" + prefix: "v" + onlyMilestones: false + changelogFilename: "CHANGELOG.md" + includeMessages: "all" + ignoreIssuesWith: + - "support" + ignoreLabels: + - "duplicate" + - "invalid" + - "wontfix" + groupBy: + New features: + - "feature" + Bug Fixes: + - "bug" + Enhancements: + - "enhancement" + Internationalisation: + - "i18n" + Theme Meta: + - "meta" + Uncategorised: + - "closed" diff --git a/website/themes/hugo-theme-learn/CHANGELOG.md b/website/themes/hugo-theme-learn/CHANGELOG.md new file mode 100644 index 000000000..caeaa9b26 --- /dev/null +++ b/website/themes/hugo-theme-learn/CHANGELOG.md @@ -0,0 +1,182 @@ +# Changelog + +## v2.4.0 (04/09/2019) + +#### Bug Fixes + +- [**bug**] correct GitHub capitalization [#293](https://github.com/matcornic/hugo-theme-learn/pull/293) +- [**bug**] Remove reference to the unused horsey CSS [#284](https://github.com/matcornic/hugo-theme-learn/pull/284) +- [**bug**] Fix invalid HTML in 404 template. [#271](https://github.com/matcornic/hugo-theme-learn/pull/271) +- [**bug**] fix 'locate' typo [#285](https://github.com/matcornic/hugo-theme-learn/pull/285) + +#### Enhancements + +- [**enhancement**] Delete html5shiv-printshiv.min.js [#319](https://github.com/matcornic/hugo-theme-learn/pull/319) +- [**enhancement**] remove html5shiv [#315](https://github.com/matcornic/hugo-theme-learn/pull/315) +- [**enhancement**] Fix deprecated .Hugo, .UniqueID and .URL references [#303](https://github.com/matcornic/hugo-theme-learn/pull/303) +- [**enhancement**] remove unneeded type="text/css" [#297](https://github.com/matcornic/hugo-theme-learn/pull/297) +- [**enhancement**] Fix type lines 364 and 369 [#304](https://github.com/matcornic/hugo-theme-learn/pull/304) +- [**enhancement**] remove unneeded type="text/css" [#298](https://github.com/matcornic/hugo-theme-learn/pull/298) +- [**enhancement**] HTTPS links in footer [#295](https://github.com/matcornic/hugo-theme-learn/pull/295) +- [**enhancement**] remove unneeded type="text/css" [#292](https://github.com/matcornic/hugo-theme-learn/pull/292) +- [**enhancement**] Make shortcodes & example site compatible with Hugo v0.55 [#281](https://github.com/matcornic/hugo-theme-learn/pull/281) + +#### Internationalisation + +- [**i18n**] Added German and Arabic translation [#312](https://github.com/matcornic/hugo-theme-learn/pull/312) + +--- + +## v2.3.0 (16/04/2019) + +#### New features + +- [**feature**] Added support for tags [#196](https://github.com/matcornic/hugo-theme-learn/pull/196) + +#### Bug Fixes + +- [**bug**] Fix issue where "children" shortcode only shows top level. [#252](https://github.com/matcornic/hugo-theme-learn/pull/252) +- [**bug**] Fix translation when using a custom baseURL [#234](https://github.com/matcornic/hugo-theme-learn/pull/234) +- [**bug**] Preventing left/right arrow key navigation in textareas [#241](https://github.com/matcornic/hugo-theme-learn/pull/241) +- [**bug**] Update menu.html to include the check icon [#229](https://github.com/matcornic/hugo-theme-learn/pull/229) + +#### Enhancements + +- [**enhancement**] Render the ```mermaid blocks into graphs [#226](https://github.com/matcornic/hugo-theme-learn/pull/226) +- [**enhancement**] Remove oudated versions of jquery & modernizr libraries [#259](https://github.com/matcornic/hugo-theme-learn/pull/259) +- [**enhancement**] Various Updates [#237](https://github.com/matcornic/hugo-theme-learn/pull/237) +- [**enhancement**] Use style instead of width and height in logo [#250](https://github.com/matcornic/hugo-theme-learn/pull/250) +- [**enhancement**] [ImgBot] Optimize images [#222](https://github.com/matcornic/hugo-theme-learn/pull/222) +- [**enhancement**] remove duplicate icon and fix incorrect favicon type [#227](https://github.com/matcornic/hugo-theme-learn/pull/227) +- [**enhancement**] HTTPS links in exampleSite menu-footer [#223](https://github.com/matcornic/hugo-theme-learn/pull/223) + +#### Internationalisation + +- [**i18n**] Dutch i18n [#239](https://github.com/matcornic/hugo-theme-learn/pull/239) + +#### Theme Meta + +- [**meta**] Add .editorconfig [#224](https://github.com/matcornic/hugo-theme-learn/pull/224) + +--- + +## v2.2.0 (28/01/2019) + +#### New features + +- [**feature**] Sitewide param to enable or disable next/previous page buttons and breadcrumbs [#184](https://github.com/matcornic/hugo-theme-learn/pull/184) + +#### Bug Fixes + +- [**bug**] Fix baseurl used by search to load json data [#177](https://github.com/matcornic/hugo-theme-learn/pull/177) +- [**bug**] Updated CSS link to fontawesome library [#186](https://github.com/matcornic/hugo-theme-learn/pull/186) +- [**bug**] Close / Cancel search icon not showing in input box [#215](https://github.com/matcornic/hugo-theme-learn/pull/215) +- [**bug**] Prevent left and right keydown events while in input fields [#219](https://github.com/matcornic/hugo-theme-learn/pull/219) +- [**bug**] xss fix [#182](https://github.com/matcornic/hugo-theme-learn/pull/182) +- [**bug**] Fix error in blockquote documentation fixes #165 [#190](https://github.com/matcornic/hugo-theme-learn/pull/190) + +#### Enhancements + +- [**enhancement**] Update mermaid.js to a499296 [#199](https://github.com/matcornic/hugo-theme-learn/pull/199) +- [**enhancement**] Update Font Awesome to 5.0.6 [#129](https://github.com/matcornic/hugo-theme-learn/pull/129) +- [**enhancement**] Update 404.html alttext [#161](https://github.com/matcornic/hugo-theme-learn/pull/161) +- [**enhancement**] Remove CSS source map metadata [#167](https://github.com/matcornic/hugo-theme-learn/pull/167) +- [**enhancement**] Load github images in examplesite via https instead of http [#180](https://github.com/matcornic/hugo-theme-learn/pull/180) +- [**enhancement**] Load main site logo via BaseUrl [#185](https://github.com/matcornic/hugo-theme-learn/pull/185) +- [**enhancement**] HTTPS links in examplesite sidebar [#200](https://github.com/matcornic/hugo-theme-learn/pull/200) +- [**enhancement**] Use correct input type for search [#205](https://github.com/matcornic/hugo-theme-learn/pull/205) +- [**enhancement**] HTTPS link to learn.getgrav.org [#207](https://github.com/matcornic/hugo-theme-learn/pull/207) +- [**enhancement**] Update html5shiv-printshiv.min.js [#208](https://github.com/matcornic/hugo-theme-learn/pull/208) +- [**enhancement**] Remove whitespace from clippy.svg [#211](https://github.com/matcornic/hugo-theme-learn/pull/211) +- [**enhancement**] Upgrade fontawesome to 5.6.3 [#218](https://github.com/matcornic/hugo-theme-learn/pull/218) +- [**enhancement**] fix clickable nodes style in mermaid [#169](https://github.com/matcornic/hugo-theme-learn/pull/169) + +#### Internationalisation + +- [**i18n**] French language correction [#157](https://github.com/matcornic/hugo-theme-learn/pull/157) +- [**i18n**] French language correction [#158](https://github.com/matcornic/hugo-theme-learn/pull/158) +- [**i18n**] Add indonesian translation [#159](https://github.com/matcornic/hugo-theme-learn/pull/159) +- [**i18n**] Add Turkish i18n config file [#175](https://github.com/matcornic/hugo-theme-learn/pull/175) + +#### Theme Meta + +- [**meta**] Fix wercker builds [#178](https://github.com/matcornic/hugo-theme-learn/pull/178) +- [**meta**] Declare netlify buildsteps in repo file rather than in webui [#217](https://github.com/matcornic/hugo-theme-learn/pull/217) + +--- + +## v2.1.0 (10/08/2018) + +#### Internationalisation + +- [**i18n**] Clean up the English language phrasing [#146](https://github.com/matcornic/hugo-theme-learn/pull/146) +- [**i18n**] Updated _index.en.md for typo "names" [#150](https://github.com/matcornic/hugo-theme-learn/pull/150) + +#### Theme Meta + +- [**meta**] Add license scan report and status [#151](https://github.com/matcornic/hugo-theme-learn/pull/151) + +#### Uncategorised + +- [**closed**] Different viewport [#122](https://github.com/matcornic/hugo-theme-learn/pull/122) +- [**closed**] TranslationBaseName replaced for Name on archetypes template [#145](https://github.com/matcornic/hugo-theme-learn/pull/145) +- [**closed**] Improved variant of #119, as per request [#124](https://github.com/matcornic/hugo-theme-learn/pull/124) +- [**closed**] role="" is invalid [#121](https://github.com/matcornic/hugo-theme-learn/pull/121) +- [**closed**] Related to previous PR [#120](https://github.com/matcornic/hugo-theme-learn/pull/120) +- [**closed**] Issue #111 for _index.fr.md [#117](https://github.com/matcornic/hugo-theme-learn/pull/117) +- [**closed**] Issue #111 for _index.en.md [#116](https://github.com/matcornic/hugo-theme-learn/pull/116) +- [**closed**] Issue #111 for theme-green.css [#114](https://github.com/matcornic/hugo-theme-learn/pull/114) +- [**closed**] Issue #111 for theme-red.css [#113](https://github.com/matcornic/hugo-theme-learn/pull/113) +- [**closed**] Issue #111 for theme-blue.css [#112](https://github.com/matcornic/hugo-theme-learn/pull/112) +- [**closed**] Issue #111 for theme-mine.css [#115](https://github.com/matcornic/hugo-theme-learn/pull/115) +- [**closed**] fix #77 : no wrap images that already wrapped [#118](https://github.com/matcornic/hugo-theme-learn/pull/118) +- [**closed**] doc: Keep icons aligned [#110](https://github.com/matcornic/hugo-theme-learn/pull/110) +- [**closed**] Add Portuguese translation [#109](https://github.com/matcornic/hugo-theme-learn/pull/109) +- [**closed**] Use `relURL` where possible [#102](https://github.com/matcornic/hugo-theme-learn/pull/102) +- [**closed**] Bug fix in sidebar menu and children description generation [#105](https://github.com/matcornic/hugo-theme-learn/pull/105) +- [**closed**] fix some typo [#104](https://github.com/matcornic/hugo-theme-learn/pull/104) +- [**closed**] Added a `menuTitle` attribute to partials/menu.html [#90](https://github.com/matcornic/hugo-theme-learn/pull/90) +- [**closed**] allowing comments system [#86](https://github.com/matcornic/hugo-theme-learn/pull/86) +- [**closed**] Add spanish translation [#85](https://github.com/matcornic/hugo-theme-learn/pull/85) +- [**closed**] Replace horsey with Pixabay's autocomplete [#75](https://github.com/matcornic/hugo-theme-learn/pull/75) +- [**closed**] Added info about 'draft:true' [#74](https://github.com/matcornic/hugo-theme-learn/pull/74) +- [**closed**] Remove white space from `align` parameter [#63](https://github.com/matcornic/hugo-theme-learn/pull/63) + +--- + +## v2.0.0 (20/08/2017) + +#### Uncategorised + +- [**closed**] V2 [#56](https://github.com/matcornic/hugo-theme-learn/pull/56) + +--- + +## v1.1.0 (22/07/2017) + +#### Bug Fixes + +- [**bug**] Fix sticky header jumpiness [#45](https://github.com/matcornic/hugo-theme-learn/pull/45) + +#### Uncategorised + +- [**closed**] feat: Change the default code color [#43](https://github.com/matcornic/hugo-theme-learn/pull/43) +- [**closed**] Use index pages + automatic navigation arrows [#36](https://github.com/matcornic/hugo-theme-learn/pull/36) +- [**closed**] Fix anchor scrolling that hides behind top nav bar [#46](https://github.com/matcornic/hugo-theme-learn/pull/46) + +--- + +## v1.0.0 (25/03/2017) + +#### Uncategorised + +- [**closed**] Extracted menu footer content to separate partial file [#35](https://github.com/matcornic/hugo-theme-learn/pull/35) +- [**closed**] feat: style Hugo figure shortcode [#33](https://github.com/matcornic/hugo-theme-learn/pull/33) +- [**closed**] Fix URL for 'Edit this page' on Windows [#27](https://github.com/matcornic/hugo-theme-learn/pull/27) +- [**closed**] Revert "Menu generation using Content file instead directories" [#10](https://github.com/matcornic/hugo-theme-learn/pull/10) +- [**closed**] (#25) use .Site.BaseURL to lcoate static assets [#26](https://github.com/matcornic/hugo-theme-learn/pull/26) +- [**closed**] Menu ordering and definition in config.toml [#8](https://github.com/matcornic/hugo-theme-learn/pull/8) +- [**closed**] Menu generation using Content file instead directories [#5](https://github.com/matcornic/hugo-theme-learn/pull/5) +- [**closed**] Add Checkmark On visited Links [#4](https://github.com/matcornic/hugo-theme-learn/pull/4) +- [**closed**] doc: Add theme installation instructions [#1](https://github.com/matcornic/hugo-theme-learn/pull/1) +- [**closed**] Search [#18](https://github.com/matcornic/hugo-theme-learn/pull/18) diff --git a/website/themes/hugo-theme-learn/LICENSE.md b/website/themes/hugo-theme-learn/LICENSE.md new file mode 100644 index 000000000..0cf9fcb49 --- /dev/null +++ b/website/themes/hugo-theme-learn/LICENSE.md @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 Grav +Copyright (c) 2016 MATHIEU CORNIC +Copyright (c) 2017 Valere JEANTET + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/website/themes/hugo-theme-learn/README.md b/website/themes/hugo-theme-learn/README.md new file mode 100644 index 000000000..3e0801e9c --- /dev/null +++ b/website/themes/hugo-theme-learn/README.md @@ -0,0 +1,97 @@ +# Hugo Learn Theme + +This repository contains a theme for [Hugo](https://gohugo.io/), based on great [Grav Learn Theme](https://learn.getgrav.org/). + +Visit the [theme documentation](https://learn.netlify.com/en/) to see what is going on. It is actually built with this theme. + +[![wercker status](https://app.wercker.com/status/233466a2be73fcea400e7dc02ef6adf9/s/master "wercker status")](https://app.wercker.com/project/byKey/233466a2be73fcea400e7dc02ef6adf9) +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmatcornic%2Fhugo-theme-learn.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmatcornic%2Fhugo-theme-learn?ref=badge_shield) + +## Main features + +- Automatic Search +- Multilingual mode +- Unlimited menu levels +- Automatic next/prev buttons to navigate through menu entries +- Image resizing, shadow… +- Attachments files +- List child pages +- Mermaid diagram (flowchart, sequence, gantt) +- Customizable look and feel and themes variants +- Buttons, Tip/Note/Info/Warning boxes, Expand + +## Installation + +Navigate to your themes folder in your Hugo site and use the following commands: + +```shell +cd themes/ +git clone https://github.com/matcornic/hugo-theme-learn.git +``` + +Check that your Hugo version is minimum `0.25` with `hugo version`. + +![Overview](https://github.com/matcornic/hugo-theme-learn/raw/master/images/tn.png) + +## Usage + +- [Visit the documentation](https://learn.netlify.com/en/) + +## Download old versions (prior to 2.0.0) + +If you need old version for compatibility purpose, either download [theme source code from releases](https://github.com/matcornic/hugo-theme-learn/releases) or use the right git tag. For example, with `1.1.0` + +- Direct download way: https://github.com/matcornic/hugo-theme-learn/archive/1.1.0.zip +- Git way: + +```shell +cd themes/hugo-theme-learn +git checkout tags/1.1.0 +``` + +For both solutions, the documentation is available at https://github.com/matcornic/hugo-theme-learn/releases/download/1.1.0/hugo-learn-doc-1.1.0.zip + +## Credits + +Many thanks to [@vjeantet](https://github.com/vjeantet/) for the fork [docdock](https://github.com/vjeantet/hugo-theme-docdock). The v2 of this theme is mainly based on his work ! + +## License + +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmatcornic%2Fhugo-theme-learn.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmatcornic%2Fhugo-theme-learn?ref=badge_large) + +## Releasing + +Somewhat work-in-progress steps to release with [gren](https://github.com/github-tools/github-release-notes) + +- Check all MRs assigned to the milestone are closed or pushed back to another release +- Close the milestone +- Check merged MRs on the milestone have a tag (Bug, Enhancement, etc.) +- Tag and push the repo + + ```shell + git tag + git push origin + ``` + +- Generate CHANGELOG.md with _gren_ + + ```shell + gren changelog --override --generate --tags=all + ``` + +- Fix the date for the current release in CHANGELOG.md +- Add the changelog to git and update the tag + + ```shell + git add CHANGELOG.md + git commit -m "Ship tag " + git push origin master + git tag -f + git push --force origin + ``` + +- Generate release with _gren_ + + ```shell + gren release -t + ``` diff --git a/website/themes/hugo-theme-learn/archetypes/chapter.md b/website/themes/hugo-theme-learn/archetypes/chapter.md new file mode 100644 index 000000000..a29ba1bd4 --- /dev/null +++ b/website/themes/hugo-theme-learn/archetypes/chapter.md @@ -0,0 +1,13 @@ ++++ +title = "{{ replace .Name "-" " " | title }}" +date = {{ .Date }} +weight = 5 +chapter = true +pre = "X. " ++++ + +### Chapter X + +# Some Chapter title + +Lorem Ipsum. \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/archetypes/default.md b/website/themes/hugo-theme-learn/archetypes/default.md new file mode 100644 index 000000000..5124e2a77 --- /dev/null +++ b/website/themes/hugo-theme-learn/archetypes/default.md @@ -0,0 +1,7 @@ ++++ +title = "{{ replace .Name "-" " " | title }}" +date = {{ .Date }} +weight = 5 ++++ + +Lorem Ipsum. \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/LICENSE.md b/website/themes/hugo-theme-learn/exampleSite/LICENSE.md new file mode 100644 index 000000000..973626de8 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2016 MATHIEU CORNIC + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/website/themes/hugo-theme-learn/exampleSite/config.toml b/website/themes/hugo-theme-learn/exampleSite/config.toml new file mode 100644 index 000000000..9fa84e128 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/config.toml @@ -0,0 +1,102 @@ +baseURL = "/" +languageCode = "en-US" +defaultContentLanguage = "en" + +title = "Hugo Learn Documentation" +theme = "hugo-theme-learn" +themesdir = "../.." +metaDataFormat = "yaml" +defaultContentLanguageInSubdir= true + +[params] + editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/" + description = "Documentation for Hugo Learn Theme" + author = "Mathieu Cornic" + showVisitedLinks = true + disableBreadcrumb = false + disableNextPrev = false + +[outputs] +home = [ "HTML", "RSS", "JSON"] + +[Languages] +[Languages.en] +title = "Documentation for Hugo Learn Theme" +weight = 1 +languageName = "English" + +[[Languages.en.menu.shortcuts]] +name = " GitHub repo" +identifier = "ds" +url = "https://github.com/matcornic/hugo-theme-learn" +weight = 10 + +[[Languages.en.menu.shortcuts]] +name = " Showcases" +url = "showcase" +weight = 11 + +[[Languages.en.menu.shortcuts]] +name = " Hugo Documentation" +identifier = "hugodoc" +url = "https://gohugo.io/" +weight = 20 + +[[Languages.en.menu.shortcuts]] +name = " Credits" +url = "/credits" +weight = 30 + +[Languages.fr] +title = "Documentation du thème Hugo Learn" +weight = 2 +languageName = "Français" + +[[Languages.fr.menu.shortcuts]] +name = " Repo GitHub" +identifier = "ds" +url = "https://github.com/matcornic/hugo-theme-learn" +weight = 10 + +[[Languages.fr.menu.shortcuts]] +name = " Vitrine" +url = "/showcase" +weight = 11 + +[[Languages.fr.menu.shortcuts]] +name = " Documentation Hugo" +identifier = "hugodoc" +url = "https://gohugo.io/" +weight = 20 + +[[Languages.fr.menu.shortcuts]] +name = " Crédits" +url = "/credits" +weight = 30 + +[Languages.zh] +title = "Hugo 主题的 Learn 文档" +weight = 3 +languageName = "简体中文" + +[[Languages.zh.menu.shortcuts]] +name = " GitHub 仓库" +identifier = "ds" +url = "https://github.com/matcornic/hugo-theme-learn" +weight = 10 + +[[Languages.zh.menu.shortcuts]] +name = " 展示区" +url = "/showcase" +weight = 11 + +[[Languages.zh.menu.shortcuts]] +name = " Hugo 文档" +identifier = "hugodoc" +url = "https://gohugo.io/" +weight = 20 + +[[Languages.zh.menu.shortcuts]] +name = " 鸣谢" +url = "/credits" +weight = 30 diff --git a/website/themes/hugo-theme-learn/exampleSite/content/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/_index.en.md new file mode 100644 index 000000000..a36357957 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/_index.en.md @@ -0,0 +1,41 @@ +--- +title: "Learn Theme for Hugo" +--- + +# Hugo learn theme + +[Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) is a theme for [Hugo](https://gohugo.io/), a fast and modern static website engine written in Go. Where Hugo is often used for blogs, this multilingual-ready theme is **fully designed for documentation**. + +This theme is a partial porting of the [Learn theme](http://learn.getgrav.org/) of [Grav](https://getgrav.org/), a modern flat-file CMS written in PHP. + +{{% notice tip %}}Learn theme works with a _page tree structure_ to organize content : All contents are pages, which belong to other pages. [read more about this]({{%relref "cont/pages/_index.md"%}}) +{{% /notice %}} + +## Main features + +* [Automatic Search]({{%relref "basics/configuration/_index.md#activate-search" %}}) +* [Multilingual mode]({{%relref "cont/i18n/_index.md" %}}) +* **Unlimited menu levels** +* **Automatic next/prev buttons to navigate through menu entries** +* [Image resizing, shadow...]({{%relref "cont/markdown.en.md#images" %}}) +* [Attachments files]({{%relref "shortcodes/attachments.en.md" %}}) +* [List child pages]({{%relref "shortcodes/children/_index.md" %}}) +* [Mermaid diagram]({{%relref "shortcodes/mermaid.en.md" %}}) (flowchart, sequence, gantt) +* [Customizable look and feel and themes variants]({{%relref "basics/style-customization/_index.md"%}}) +* [Buttons]({{%relref "shortcodes/button.en.md" %}}), [Tip/Note/Info/Warning boxes]({{%relref "shortcodes/notice.en.md" %}}), [Expand]({{%relref "shortcodes/expand.en.md" %}}) + +![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow) + +## Contribute to this documentation +Feel free to update this content, just click the **Edit this page** link displayed on top right of each page, and pullrequest it + +{{% notice info %}} +Your modification will be deployed automatically when merged. +{{% /notice %}} + +## Documentation website +This current documentation has been statically generated with Hugo with a simple command : `hugo -t hugo-theme-learn` -- source code is [available here at GitHub](https://github.com/matcornic/hugo-theme-learn) + +{{% notice note %}} +Automatically published and hosted thanks to [Netlify](https://www.netlify.com/). Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/) +{{% /notice %}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/_index.fr.md new file mode 100644 index 000000000..40b2dc352 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/_index.fr.md @@ -0,0 +1,43 @@ +--- +title: "Learn Theme for Hugo" +--- + +# Thème Hugo learn + +[Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) est un thème pour [Hugo](https://gohugo.io/), un générateur de site statique, rapide et modern, écrit en Go. Tandis que Hugo est souvent utilisé pour des blogs, ce thème multi-langue est **entièrement conçu pour la documentation**. + +Ce thème est un portage partiel du [thème Learn](http://learn.getgrav.org/) de [Grav](https://getgrav.org/), un CMS modern écrit en PHP. + +{{% notice tip %}}Le thème Learn fonctionne grâce à la structure de page aborescentes pour organiser le contenu: tous les contenus sont des pages qui appartiennent à d'autres pages. [Plus d'infos]({{%relref "cont/pages/_index.md"%}}) +{{% /notice %}} + +## Fonctionnalités principales + +* [Recherche automatique]({{%relref "basics/configuration/_index.md#activer-recherche" %}}) +* [Mode multi-langue]({{%relref "cont/i18n/_index.md" %}}) +* **Nombre de niveau infini dans le menu** +* **Boutons suivant/précédent automatiquement générés pour naviguer entre les items du menu** +* [Taille d'image, ombres...]({{%relref "cont/markdown.fr.md#images" %}}) +* [Fichiers joints]({{%relref "shortcodes/attachments.fr.md" %}}) +* [Lister les pages filles]({{%relref "shortcodes/children/_index.md" %}}) +* [Diagrammes Mermaid]({{%relref "shortcodes/mermaid.fr.md" %}}) (flowchart, sequence, gantt) +* [Style configurable and variantes de couleurs]({{%relref "basics/style-customization/_index.md"%}}) +* [Boutons]({{%relref "shortcodes/button.fr.md" %}}), [Messages Astuce/Note/Info/Attention]({{%relref "shortcodes/notice.fr.md" %}}), [Expand]({{%relref "shortcodes/expand.fr.md" %}}) + +![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow) + +## Contribuer à cette documentation + +N'hésitez pas à mettre à jour ce contenu en cliquant sur le lien **Modifier cette page** en haut de chaque page, et créer la Pull Request associée. + +{{% notice info %}} +Votre modification sera déployée automatiquement quand elle sera mergée. +{{% /notice %}} + +## Site de documentation + +Cette documentation statique a été générée avec Hugo avec une simple commande : `hugo -t hugo-theme-learn` -- le code source est [disponible sur Github](https://github.com/matcornic/hugo-theme-learn) + +{{% notice note %}} +Le site est auomatiquement publié et hébergé par [Netlify](https://www.netlify.com/). Plus d'infos sur le [déploiement de site Hugo avec Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)(En anglais) +{{% /notice %}} diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/_index.en.md new file mode 100755 index 000000000..56e2968e2 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/_index.en.md @@ -0,0 +1,12 @@ +--- +title: Basics +weight: 5 +pre: "1. " +chapter: true +--- + +### Chapter 1 + +# Basics + +Discover what this Hugo theme is all about and the core-concepts behind it. diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/_index.fr.md new file mode 100644 index 000000000..1b800c905 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/_index.fr.md @@ -0,0 +1,12 @@ +--- +title: Démarrage +weight: 5 +pre: "1. " +chapter: true +--- + +### Chapitre 1 + +# Démarrage + +Découvrez comment utiliser ce thème Hugo et apprenez-en les concepts diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/_index.zh.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/_index.zh.md new file mode 100755 index 000000000..6c5d5dacc --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/_index.zh.md @@ -0,0 +1,12 @@ +--- +title: 基础 +weight: 5 +pre: "1. " +chapter: true +--- + +### 章节 1 + +# 基础 + +了解该 Hugo 主题的特点以及背后的核心概念。 diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.en.md new file mode 100644 index 000000000..cdf6075a7 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.en.md @@ -0,0 +1,60 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Configuration +weight: 20 +--- + +## Global site parameters + +On top of [Hugo global configuration](https://gohugo.io/overview/configuration/), **Hugo-theme-learn** lets you define the following parameters in your `config.toml` (here, values are default). + +Note that some of these parameters are explained in details in other sections of this documentation. + +```toml +[params] + # Prefix URL to edit current page. Will display an "Edit this page" button on top right hand corner of every page. + # Useful to give opportunity to people to create merge request for your doc. + # See the config.toml file from this documentation site to have an example. + editURL = "" + # Author of the site, will be used in meta information + author = "" + # Description of the site, will be used in meta information + description = "" + # Shows a checkmark for visited pages on the menu + showVisitedLinks = false + # Disable search function. It will hide search bar + disableSearch = false + # Javascript and CSS cache are automatically busted when new version of site is generated. + # Set this to true to disable this behavior (some proxies don't handle well this optimization) + disableAssetsBusting = false + # Set this to true to disable copy-to-clipboard button for inline code. + disableInlineCopyToClipBoard = false + # A title for shortcuts in menu is set by default. Set this to true to disable it. + disableShortcutsTitle = false + # When using mulitlingual website, disable the switch language button. + disableLanguageSwitchingButton = false + # Hide breadcrumbs in the header and only show the current page title + disableBreadcrumb = true + # Hide Next and Previous page buttons normally displayed full height beside content + disableNextPrev = true + # Order sections in menu by "weight" or "title". Default to "weight" + ordersectionsby = "weight" + # Change default color scheme with a variant one. Can be "red", "blue", "green". + themeVariant = "" + # Provide a list of custom css files to load relative from the `static/` folder in the site root. + custom_css = ["css/foo.css", "css/bar.css"] +``` + +## Activate search + +If not already present, add the follow lines in the same `config.toml` file. + +```toml +[outputs] +home = [ "HTML", "RSS", "JSON"] +``` + +Learn theme uses the last improvement available in hugo version 20+ to generate a json index file ready to be consumed by lunr.js javascript search engine. + +> Hugo generate lunrjs index.json at the root of public folder. +> When you build the site with `hugo server`, hugo generates it internally and of course it doesn’t show up in the filesystem diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.fr.md new file mode 100644 index 000000000..fb1a4e837 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.fr.md @@ -0,0 +1,56 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Configuration +weight: 20 +--- + +## Paramètres globaux du site + +En plus de la [configuration globale d'Hugo](https://gohugo.io/overview/configuration/), **Hugo-theme-learn** vous permet de définir les paramètres suivant dans votre fichier `config.toml` (ci-dessous sont affichées les valeurs par défaut). + +Notez que certains de ces paramètres sont expliqués en détails dans d'autres sections de cette documentation. + +```toml +[params] + # L'URL préfixe pour éditer la page courante. Ce paramètre affichera un bouton "Modifier cette page" on haut de de chacune des pages. + # Pratique pour donner les possibilité à vos utilisateurs de créer une merge request pour votre doc. + # Allez voir le fichier config.toml de cette documentation pour avoir un exemple. + editURL = "" + # Autheur du site, est utilisé dans les informations meta + author = "" + # Description du site, est utilisé dans les informations meta + description = "" + # Affiche une icône lorsque la page a été visitée + showVisitedLinks = false + # Désactive la fonction de recherche. Une valeur à true cache la barre de recherche. + disableSearch = false + # Par défaut, le cache Javascript et CSS est automatiquement vidé lorsqu'une nouvelle version du site est générée. + # Utilisez ce paramètre lorsque vous voulez désactiver ce comportement (c'est parfois incompatible avec certains proxys) + disableAssetsBusting = false + # Utilisez ce paramètre pour désactiver le bouton copy-to-clipboard pour le code formatté sur une ligne. + disableInlineCopyToClipBoard = false + # Un titre est défini par défaut lorsque vous utilisez un raccourci dans le menu. Utilisez ce paramètre pour le cacher. + disableShortcutsTitle = false + # Quand vous utilisez un site multi-langue, utilisez ce paramètre pour désactiver le bouton de changement de langue. + disableLanguageSwitchingButton = false + # Ordonne les sections dans menu par poids ("weight") ou titre ("title"). Défaut à "weight" + ordersectionsby = "weight" + # Utilisez ce paramètre pour modifier le schéma de couleur du site. Les valeurs par défaut sont "red", "blue", "green". + themeVariant = "" + # Fournissez une liste de fichiers css personnalisés à charger par rapport depuis le dossier `static/` à la racine du site. + custom_css = ["css/foo.css", "css/bar.css"] +``` + +## Activer la recherche {#activer-recherche} + +Si ce n'est pas déjà présent, ajoutez les lignes suivantes dans le fichier `config.toml`. + +```toml +[outputs] +home = [ "HTML", "RSS", "JSON"] +``` + +Le thème *Learn* utilise les dernières améliorations d'Hugo pour générer un fichier d'index JSON, prêt à être consommé par le moteur de recherche lunr.js. + +> Hugo génère lunrjs index.json à la racine du dossier `public`. +> Quand vous générez le site avec `hugo server`, Hugo génère le fichier en mémoire, il n'est donc pas disponible sur le disque. diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.en.md new file mode 100644 index 000000000..e53d006c7 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.en.md @@ -0,0 +1,102 @@ +--- +title: Installation +weight: 15 +--- + +The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you learn more about it by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/). + +## Create your project + +Hugo provides a `new` command to create a new website. + +``` +hugo new site +``` + +## Install the theme + +Install the **Hugo-theme-learn** theme by following [this documentation](https://gohugo.io/getting-started/quick-start/#step-3-add-a-theme) + +This theme's repository is: https://github.com/matcornic/hugo-theme-learn.git + +Alternatively, you can [download the theme as .zip](https://github.com/matcornic/hugo-theme-learn/archive/master.zip) file and extract it in the `themes` directory + +## Basic configuration + +When building the website, you can set a theme by using `--theme` option. However, we suggest you modify the configuration file (`config.toml`) and set the theme as the default. You can also add the `[outputs]` section to enable the search functionality. + +```toml +# Change the default theme to be use when building the site with Hugo +theme = "hugo-theme-learn" + +# For search functionality +[outputs] +home = [ "HTML", "RSS", "JSON"] +``` + +## Create your first chapter page + +Chapters are pages that contain other child pages. It has a special layout style and usually just contains a _chapter name_, the _title_ and a _brief abstract_ of the section. + +``` +### Chapter 1 + +# Basics + +Discover what this Hugo theme is all about and the core concepts behind it. +``` + +renders as + +![A Chapter](/en/basics/installation/images/chapter.png?classes=shadow&width=60pc) + +**Hugo-theme-learn** provides archetypes to create skeletons for your website. Begin by creating your first chapter page with the following command + +``` +hugo new --kind chapter basics/_index.md +``` + +By opening the given file, you should see the property `chapter=true` on top, meaning this page is a _chapter_. + +By default all chapters and pages are created as a draft. If you want to render these pages, remove the property `draft: true` from the metadata. + +## Create your first content pages + +Then, create content pages inside the previously created chapter. Here are two ways to create content in the chapter: + +``` +hugo new basics/first-content.md +hugo new basics/second-content/_index.md +``` + +Feel free to edit thoses files by adding some sample content and replacing the `title` value in the beginning of the files. + +## Launching the website locally + +Launch by using the following command: + +``` +hugo serve +``` + +Go to `http://localhost:1313` + +You should notice three things: + +1. You have a left-side **Basics** menu, containing two submenus with names equal to the `title` properties in the previously created files. +2. The home page explains how to customize it by following the instructions. +3. When you run `hugo serve`, when the contents of the files change, the page automatically refreshes with the changes. Neat! + +## Build the website + +When your site is ready to deploy, run the following command: + +``` +hugo +``` + +A `public` folder will be generated, containing all static content and assets for your website. It can now be deployed on any web server. + +{{% notice note %}} +This website can be automatically published and hosted with [Netlify](https://www.netlify.com/) (Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)). Alternatively, you can use [Github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/) +{{% /notice %}} diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.fr.md new file mode 100644 index 000000000..268d0c3ce --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.fr.md @@ -0,0 +1,100 @@ +--- +title: Installation +weight: 15 +--- + +Les étapes suivantes sont là pour vous aider à initialiser votre site. Si vous ne connaissez pas du tout Hugo, il est fortement conseillé de vous entrainer en suivant ce [super tuto pour débutants](https://gohugo.io/overview/quickstart/). + +## Créer votre projet + +Hugo fournit une commande `new` pour créer un nouveau site. + +``` +hugo new site +``` + +## Installer le thème + +Installer le thème **Hugo-theme-learn** en suivant [cette documentation](https://gohugo.io/themes/installing/) + +Le repo du thème est : https://github.com/matcornic/hugo-theme-learn.git + +Sinon, vous pouvez [télécharger le thème sous forme d'un fichier .zip](https://github.com/matcornic/hugo-theme-learn/archive/master.zip) et extrayez le dans votre dossier de thèmes. + +## Configuration simple + +Lorsque vous générez votre site, vous pouvez définir un thème en utilisant l'option `--theme`. Il est conseillé de modifier votre fichier de configuration `config.toml` and définir votre thème par défaut. En passant, ajoutez les prérequis à l'utilisation de la fonctionnalité de recherche. + +```toml +# Modifiez le thème pour qu'il soit utilisé par défaut à chaque génération de site. +theme = "hugo-theme-learn" + +# Pour la fonctionnalité de recherche +[outputs] +home = [ "HTML", "RSS", "JSON"] +``` + +## Créer votre première page chapitre + +Les *chapitres* sont des pages contenant d'autre pages filles. Elles ont un affichage spécial et contiennent habituellement juste un _nom_ de chapitre, le _titre_ et un _résumé_ de la section. + +``` +### Chapitre 1 + +# Démarrage + +Découvrez comment utiliser ce thème Hugo et apprenez en les concepts +``` + +s'affiche comme + +![Un chapitre](/en/basics/installation/images/chapter.png?classes=shadow&width=60pc) + +**Hugo-theme-learn** fournit des archétypes pour créer des squelettes pour votre site. Commencez par créer votre premier chapitre avec la commande suivante: + +``` +hugo new --kind chapter basics/_index.md +``` + +En ouvrant le fichier généré, vous devriez voir la propriété `chapter=true` en haut, paramètre quit définit que le page est un _chapitre_. + +## Créer votre première page + +Puis, créez votre premier page dans le chapitre précédent. Pour ce faire, il existe deux possibilités : + +``` +hugo new basics/first-content.md +hugo new basics/second-content/_index.md +``` + +N'hésitez pas à éditer ces fichiers en ajoutant des exemple de contenu et en remplaçant le paramètre `title` au début du fichier. + +## Lancer le site localement + +Lancez la commande suivante : + +``` +hugo serve +``` + +Se rendre sur `http://localhost:1313` + +Vous devriez voir trois choses: + +1. Vous avez un menu **Basics** à gauche, qui contient deux sous-menu avec des noms égal au paramètre `title` des fichiers précédemment générés. +2. La page d'accueil vous explique comment la modifier. Suivez les instructions. +3. Avec la commande `hugo serve`, la page se rafraichit automatiquement à chaque fois que vous sauvegardez. Super ! + +## Générez le site + +Quand votre site est prêt à être déployé, lancez la commande suivante: + +``` +hugo +``` + +Un dossier `public` a été généré. Il contient tout le contenu statique et les ressources nécessaires pour votre site. Votre site peut maintenant être déployé en utilisant n'importe quel serveur ! + +{{% notice note %}} +Ce site peut être automatiquement publié et hébergé avec [Netlify](https://www.netlify.com/) ([Plus d'infos](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)). Sinon, vous pouvez utiliser les [Github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/) +{{% /notice %}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/installation/images/chapter.png b/website/themes/hugo-theme-learn/exampleSite/content/basics/installation/images/chapter.png new file mode 100644 index 000000000..80da0c6d6 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/basics/installation/images/chapter.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/requirements/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/requirements/_index.en.md new file mode 100755 index 000000000..2b3f51d93 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/requirements/_index.en.md @@ -0,0 +1,11 @@ +--- +title: Requirements +weight: 10 +disableToc: true +--- + +Thanks to the simplicity of Hugo, this page is as empty as this theme needs requirements. + +Just download latest version of [Hugo binary (> 0.25)](https://gohugo.io/getting-started/installing/) for your OS (Windows, Linux, Mac) : it's that simple. + +![Magic](/en/basics/requirements/images/magic.gif?classes=shadow) diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/requirements/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/requirements/_index.fr.md new file mode 100755 index 000000000..ae70caea5 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/requirements/_index.fr.md @@ -0,0 +1,11 @@ +--- +title: Prérequis +weight: 10 +disableToc: true +--- + +Grâce à la simplicité d'Hugo, cette page est vide car il n'y a quasi pas de prérequis pour utiliser le thème. + +Téléchargez la dernière version du [binaire Hugo (> 0.25)](https://gohugo.io/getting-started/installing/) pour votre Système d'exploitation (Windows, Linux, Mac) : et c'est tout ! + +![Magic](/en/basics/requirements/images/magic.gif?classes=shadow) diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/requirements/images/magic.gif b/website/themes/hugo-theme-learn/exampleSite/content/basics/requirements/images/magic.gif new file mode 100644 index 000000000..235c4edb3 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/basics/requirements/images/magic.gif differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/_index.en.md new file mode 100644 index 000000000..c6920c5d4 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/_index.en.md @@ -0,0 +1,194 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Style customization +weight: 25 +--- + +**Hugo-theme-learn** has been built to be as configurable as possible by defining multiple [partials](https://gohugo.io/templates/partials/) + +In `themes/hugo-theme-learn/layouts/partials/`, you will find all the partials defined for this theme. If you need to overwrite something, don't change the code directly. Instead [follow this page](https://gohugo.io/themes/customizing/). You'd create a new partial in the `layouts/partials` folder of your local project. This partial will have the priority. + +This theme defines the following partials : + +- *header*: the header of the content page (contains the breadcrumbs). _Not meant to be overwritten_ +- *custom-header*: custom headers in page. Meant to be overwritten when adding CSS imports. Don't forget to include `style` HTML tag directive in your file +- *footer*: the footer of the content page (contains the arrows). _Not meant to be overwritten_ +- *custom-footer*: custom footer in page. Meant to be overwritten when adding Javacript. Don't forget to include `javascript` HTML tag directive in your file +- *favicon*: the favicon +- *logo*: the logo, on top left hand corner. +- *meta*: HTML meta tags, if you want to change default behavior +- *menu*: left menu. _Not meant to be overwritten_ +- *menu-footer*: footer of the the left menu +- *search*: search box +- *toc*: table of contents + +## Change the logo + +Create a new file in `layouts/partials/` named `logo.html`. Then write any HTML you want. +You could use an `img` HTML tag and reference an image created under the *static* folder, or you could paste a SVG definition ! + +{{% notice note %}} +The size of the logo will adapt automatically +{{% /notice %}} + +## Change the favicon + +If your favicon is a png, just drop off your image in your local `static/images/` folder and name it `favicon.png` + +If you need to change this default behavior, create a new file in `layouts/partials/` named `favicon.html`. Then write something like this: + +```html + +``` + +## Change default colors {#theme-variant} + +**Hugo Learn theme** let you choose between 3 native color scheme variants, but feel free to add one yourself ! Default color scheme is based on [Grav Learn Theme](https://learn.getgrav.org/). + +### Red variant + +```toml +[params] + # Change default color scheme with a variant one. Can be "red", "blue", "green". + themeVariant = "red" +``` + +![Red variant](/en/basics/style-customization/images/red-variant.png?width=60pc) + +### Blue variant + +```toml +[params] + # Change default color scheme with a variant one. Can be "red", "blue", "green". + themeVariant = "blue" +``` + +![Blue variant](/en/basics/style-customization/images/blue-variant.png?width=60pc) + +### Green variant + +```toml +[params] + # Change default color scheme with a variant one. Can be "red", "blue", "green". + themeVariant = "green" +``` + +![Green variant](/en/basics/style-customization/images/green-variant.png?width=60pc) + +### 'Yours‘ variant + +First, create a new CSS file in your local `static/css` folder prefixed by `theme` (e.g. with _mine_ theme `static/css/theme-mine.css`). Copy the following content and modify colors in CSS variables. + +```css + +:root{ + + --MAIN-TEXT-color:#323232; /* Color of text by default */ + --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ + --MAIN-LINK-color:#1C90F3; /* Color of links */ + --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */ + --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */ + + --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */ + --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */ + + --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */ + --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */ + --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */ + + --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */ + --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */ + --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ + --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ + --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ + --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ + + --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */ + --MENU-SECTION-HR-color: #20272b; /* Color of
separator in menu */ + +} + +body { + color: var(--MAIN-TEXT-color) !important; +} + +textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { + border-color: none; + box-shadow: none; +} + +h2, h3, h4, h5 { + color: var(--MAIN-TITLES-TEXT-color) !important; +} + +a { + color: var(--MAIN-LINK-color); +} + +.anchor { + color: var(--MAIN-ANCHOR-color); +} + +a:hover { + color: var(--MAIN-LINK-HOVER-color); +} + +#sidebar ul li.visited > a .read-icon { + color: var(--MENU-VISITED-color); +} + +#body a.highlight:after { + display: block; + content: ""; + height: 1px; + width: 0%; + -webkit-transition: width 0.5s ease; + -moz-transition: width 0.5s ease; + -ms-transition: width 0.5s ease; + transition: width 0.5s ease; + background-color: var(--MAIN-LINK-HOVER-color); +} +#sidebar { + background-color: var(--MENU-SECTIONS-BG-color); +} +#sidebar #header-wrapper { + background: var(--MENU-HEADER-BG-color); + color: var(--MENU-SEARCH-BOX-color); + border-color: var(--MENU-HEADER-BORDER-color); +} +#sidebar .searchbox { + border-color: var(--MENU-SEARCH-BOX-color); + background: var(--MENU-SEARCH-BG-color); +} +#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { + background: var(--MENU-SECTIONS-ACTIVE-BG-color); +} +#sidebar .searchbox * { + color: var(--MENU-SEARCH-BOX-ICONS-color); +} + +#sidebar a { + color: var(--MENU-SECTIONS-LINK-color); +} + +#sidebar a:hover { + color: var(--MENU-SECTIONS-LINK-HOVER-color); +} + +#sidebar ul li.active > a { + background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); + color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; +} + +#sidebar hr { + border-color: var(--MENU-SECTION-HR-color); +} +``` + +Then, set the `themeVariant` value with the name of your custom theme file. That's it ! + +```toml +[params] + # Change default color scheme with a variant one. Can be "red", "blue", "green". + themeVariant = "mine" +``` diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/_index.fr.md new file mode 100644 index 000000000..6daab9e84 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/_index.fr.md @@ -0,0 +1,194 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Personnalisation du style +weight: 25 +--- + +**Hugo-theme-learn** a été conçu pour être aussi configurable que possible en définissant plusieurs [partials](https://gohugo.io/templates/partials/) + +Dans `themes/hugo-theme-learn/layouts/partials/`, vous pourrez trouver tous les *partials* définis pour ce thème. Si vous avez besoin d'écraser quelque chose, ne modifiez pas le code directement. A la place, [suivez cette page](https://gohugo.io/themes/customizing/). Vous créerez alors un nouveau *partial* dans le dossier `layouts/partials` de votre site local. Ce *partial* aura la priorité. + +Ce thème définit les *partials* suivant : + +- *header*: l'en-tête de la page page (contient le fil d'Ariane). _Pas voué à être écrasé_ +- *custom-header*: En-tête personnalisé. Voué à être écrasé quand vous ajoutez des imports CSS. N'oubliez pas d'inclure la balise HTML `style` dans votre fichier +- *footer*: le pied-de-page de la page (contains les flèches). _Pas voué à être écrasé_ +- *custom-footer*: Pied-de-page personnalisé. Voué à être écrasé quand vous ajoutez du Javascript. N'oubliez pas d'inclure la balise HTML `javascript` dans votre fichier +- *favicon*: le favicon +- *logo*: le logo, affiché un haut à gauche. +- *meta*: les balises HTML meta, que vous pouvez écraser sans problème. +- *menu*: Le menu à gauche. _Pas voué à être écrasé_ +- *menu-footer*: Le pied-de-page du menu +- *search*: le champ de recherche +- *toc*: le sommaire + +## Changer le logo + +Créez un nouveau fichier dans `layouts/partials/`, nommé `logo.html`. Puis, écrivez le code HTML voulu. +Vous pourriez utiliser une balise HTML `img` et référencer une image créée dans le dossier *static*, voire même y coller un code SVG ! + +{{% notice note %}} +La taille du logo va s'adapter automatiquement +{{% /notice %}} + +## Changer le favicon + +Si votre favicon est un png, déposez votre image dans votre dossier local `static/images/` et nommez le `favicon.png` + +Si vous avez besoin de changer ce comportement par défaut, créer un nouveau fichier dans `layouts/partials/` et nommez le `favicon.html`. Puis ajoutez quelque chose comme: + +```html + +``` + +## Changer les couleurs par défaut {#theme-variant} + +**Hugo Learn theme** vous permet de choisir nativement entre 3 schéma de couleurs, mais n'hésitez pas à en ajouter d'autres ! Les couleurs par défaut sont celles de [Grav Learn Theme](https://learn.getgrav.org/). + +### Variante rouge + +```toml +[params] + # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green". + themeVariant = "red" +``` + +![Variante rouge](/en/basics/style-customization/images/red-variant.png?width=60pc) + +### Variante bleue + +```toml +[params] + # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green". + themeVariant = "blue" +``` + +![Variante bleue](/en/basics/style-customization/images/blue-variant.png?width=60pc) + +### Variante verte + +```toml +[params] + # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green". + themeVariant = "green" +``` + +![Variante verte](/en/basics/style-customization/images/green-variant.png?width=60pc) + +### Votre variante + +Premièrement, créez un nouveau fichier CSS dans votre dossier `static/css`, préfixé par `theme` (ex: avec le theme_lemien_ `static/css/theme-lemien.css`). Copiez le contenu suivant et modifiez les couleurs dans les variables CSS. + +```css + +:root{ + + --MAIN-TEXT-color:#323232; /* Color of text by default */ + --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ + --MAIN-LINK-color:#1C90F3; /* Color of links */ + --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */ + --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */ + + --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */ + --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */ + + --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */ + --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */ + --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */ + + --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */ + --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */ + --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ + --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ + --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ + --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ + + --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */ + --MENU-SECTION-HR-color: #20272b; /* Color of
separator in menu */ + +} + +body { + color: var(--MAIN-TEXT-color) !important; +} + +textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { + border-color: none; + box-shadow: none; +} + +h2, h3, h4, h5 { + color: var(--MAIN-TITLES-TEXT-color) !important; +} + +a { + color: var(--MAIN-LINK-color); +} + +.anchor { + color: var(--MAIN-ANCHOR-color); +} + +a:hover { + color: var(--MAIN-LINK-HOVER-color); +} + +#sidebar ul li.visited > a .read-icon { + color: var(--MENU-VISITED-color); +} + +#body a.highlight:after { + display: block; + content: ""; + height: 1px; + width: 0%; + -webkit-transition: width 0.5s ease; + -moz-transition: width 0.5s ease; + -ms-transition: width 0.5s ease; + transition: width 0.5s ease; + background-color: var(--MAIN-LINK-HOVER-color); +} +#sidebar { + background-color: var(--MENU-SECTIONS-BG-color); +} +#sidebar #header-wrapper { + background: var(--MENU-HEADER-BG-color); + color: var(--MENU-SEARCH-BOX-color); + border-color: var(--MENU-HEADER-BORDER-color); +} +#sidebar .searchbox { + border-color: var(--MENU-SEARCH-BOX-color); + background: var(--MENU-SEARCH-BG-color); +} +#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { + background: var(--MENU-SECTIONS-ACTIVE-BG-color); +} +#sidebar .searchbox * { + color: var(--MENU-SEARCH-BOX-ICONS-color); +} + +#sidebar a { + color: var(--MENU-SECTIONS-LINK-color); +} + +#sidebar a:hover { + color: var(--MENU-SECTIONS-LINK-HOVER-color); +} + +#sidebar ul li.active > a { + background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); + color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; +} + +#sidebar hr { + border-color: var(--MENU-SECTION-HR-color); +} +``` + +Puis, configurez le paramètre `themeVariant` avec le nom de votre variante. C'est tout ! + +```toml +[params] + # Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green". + themeVariant = "lemien" +``` diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/blue-variant.png b/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/blue-variant.png new file mode 100644 index 000000000..4f79d58b1 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/blue-variant.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/green-variant.png b/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/green-variant.png new file mode 100644 index 000000000..a4b73b58e Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/green-variant.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/red-variant.png b/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/red-variant.png new file mode 100644 index 000000000..6af77497d Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/basics/style-customization/images/red-variant.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/_index.en.md new file mode 100755 index 000000000..cbdc696a1 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/_index.en.md @@ -0,0 +1,12 @@ +--- +title: Content +weight: 10 +chapter: true +pre: "2. " +--- + +### Chapter 2 + +# Content + +Find out how to create and organize your content quickly and intuitively. diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/_index.fr.md new file mode 100755 index 000000000..dae5873c8 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/_index.fr.md @@ -0,0 +1,12 @@ +--- +title: Contenu +weight: 10 +chapter: true +pre: "2. " +--- + +### Chapitre 2 + +# Contenu + +Découvrez comment créer et organiser votre contenu facilement et intuitivement. diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/archetypes.en.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/archetypes.en.md new file mode 100644 index 000000000..689ff9b01 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/archetypes.en.md @@ -0,0 +1,57 @@ +--- +title: Archetypes +weight: 10 +--- + +Using the command: `hugo new [relative new content path]`, you can start a content file with the date and title automatically set. While this is a welcome feature, active writers need more : [archetypes](https://gohugo.io/content/archetypes/). + +It is pre-configured skeleton pages with default front matter. Please refer to the documentation for types of page to understand the differences. + +## Chapter {#archetypes-chapter} + +To create a Chapter page, run the following commands + +``` +hugo new --kind chapter /_index.md +``` + +It will create a page with predefined Front-Matter: + +```markdown ++++ +title = "{{ replace .Name "-" " " | title }}" +date = {{ .Date }} +weight = 5 +chapter = true +pre = "X. " ++++ + +### Chapter X + +# Some Chapter title + +Lorem Ipsum. +``` + +## Default + +To create a default page, run either one of the following commands + +``` +# Either +hugo new //_index.md +# Or +hugo new /.md +``` + +It will create a page with predefined Front-Matter: + +```markdown ++++ +title = "{{ replace .Name "-" " " | title }}" +date = {{ .Date }} +weight = 5 ++++ + +Lorem Ipsum. +``` \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/archetypes.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/archetypes.fr.md new file mode 100644 index 000000000..883c41865 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/archetypes.fr.md @@ -0,0 +1,57 @@ +--- +title: Archétypes +weight: 10 +--- + +En utilisant la commande: `hugo new [chemin vers nouveau contenu]`, vous pouvez créer un nouveau fichier avec la date et le title automatiquement initialisé. Même si c'est une fonctionnalité intéressante, elle reste limitée pour les auteurs actifs qui ont besoin de mieux : les [archetypes](https://gohugo.io/content/archetypes/). + +Les archétypes sont des squelettes de pages préconfigurées avec un Front Matter par défaut. Merci de vous référer à la documentation pour connaitre les différents types de page. + +## Chapitre {#archetypes-chapter} + +Pour créer un chapitre, lancez les commandes suivantes + +``` +hugo new --kind chapter /_index.md +``` + +Cela crééra une page avec le Front Matter suivant: + +```markdown ++++ +title = "{{ replace .Name "-" " " | title }}" +date = {{ .Date }} +weight = 5 +chapter = true +pre = "X. " ++++ + +### Chapter X + +# Some Chapter title + +Lorem Ipsum. +``` + +## Défaut + +Pour créer une page classique, lancer l'une des deux commandes suivantes + +``` +# Soit +hugo new //_index.md +# Ou +hugo new /.md +``` + +Cela crééra une page avec le Front Matter suivant: + +```markdown ++++ +title = "{{ replace .Name "-" " " | title }}" +date = {{ .Date }} +weight = 5 ++++ + +Lorem Ipsum. +``` \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/i18n/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/i18n/_index.en.md new file mode 100644 index 000000000..c35327582 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/i18n/_index.en.md @@ -0,0 +1,78 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Multilingual and i18n +weight: 30 +--- + +**Learn theme** is fully compatible with Hugo multilingual mode. + +It provides: + +- Translation strings for default values (English and French). Feel free to contribute ! +- Automatic menu generation from multilingual content +- In-browser language switching + +![I18n menu](/en/cont/i18n/images/i18n-menu.gif) + +## Basic configuration + +After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your `config.toml` file. + +For example with current French and English website. + +```toml +# English is the default language +defaultContentLanguage = "en" +# Force to have /en/my-page and /fr/my-page routes, even for default language. +defaultContentLanguageInSubdir= true + +[Languages] +[Languages.en] +title = "Documentation for Hugo Learn Theme" +weight = 1 +languageName = "English" + +[Languages.fr] +title = "Documentation du thème Hugo Learn" +weight = 2 +languageName = "Français" +``` + +Then, for each new page, append the *id* of the language to the file. + +- Single file `my-page.md` is split in two files: + - in English: `my-page.en.md` + - in French: `my-page.fr.md` +- Single file `_index.md` is split in two files: + - in English: `_index.en.md` + - in French: `_index.fr.md` + +{{% notice info %}} +Be aware that only translated pages are displayed in menu. It's not replaced with default language content. +{{% /notice %}} + +{{% notice tip %}} +Use [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) Front Matter parameter to translate urls too. +{{% /notice %}} + +## Overwrite translation strings + +Translations strings are used for common default values used in the theme (*Edit this page* button, *Search placeholder* and so on). Translations are available in french and english but you may use another language or want to override default values. + +To override these values, create a new file in your local i18n folder `i18n/.toml` and inspire yourself from the theme `themes/hugo-theme-learn/i18n/en.toml` + +By the way, as these translations could be used by other people, please take the time to propose a translation by [making a PR](https://github.com/matcornic/hugo-theme-learn/pulls) to the theme ! + +## Disable language switching + +Switching the language in the browser is a great feature, but for some reasons you may want to disable it. + +Just set `disableLanguageSwitchingButton=true` in your `config.toml` + +```toml +[params] + # When using mulitlingual website, disable the switch language button. + disableLanguageSwitchingButton = true +``` + +![I18n menu](/en/cont/i18n/images/i18n-menu.gif) \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/i18n/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/i18n/_index.fr.md new file mode 100644 index 000000000..6503abf4c --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/i18n/_index.fr.md @@ -0,0 +1,78 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Multi-langue et i18n +weight: 30 +--- + +**Learn** est complètement compatible avec le mode multi-langue d'Hugo. + +Il fournit : + +- Des *translation strings* pour les valeurs par défaut utilisées par le thème (Anglais et Français). N'hésitez pas à contribuer ! +- Génération automatique du menu avec le contenu multi-langue +- Modification de la langue dans le navigateur + +![I18n menu](/en/cont/i18n/images/i18n-menu.gif) + +## Configuration simple + +Après avoir appris [comment Hugo gère les sites multi-langue](https://gohugo.io/content-management/multilingual), définissez vos langues dans votre fichier `config.toml`. + +Par exemple, pour ce site, avec du contenu en français et en anglais. + +```toml +# Anglais est la langue par défaut +defaultContentLanguage = "en" +# Force d'avoir /en/ma-page et /fr/ma-page routes, même avec la langue par défaut. +defaultContentLanguageInSubdir= true + +[Languages] +[Languages.en] +title = "Documentation for Hugo Learn Theme" +weight = 1 +languageName = "English" + +[Languages.fr] +title = "Documentation du thème Hugo Learn" +weight = 2 +languageName = "Français" +``` + +Puis, pour chaque nouvelle page, ajoutez *l'id* de la langue du fichier. + +- Le fichier `my-page.md` est découpé en deux fichiers : + - en anglais : `my-page.en.md` + - en français : `my-page.fr.md` +- Le fichier `_index.md` est découpé en deux fichiers : + - en anglais: `_index.en.md` + - en français: `_index.fr.md` + +{{% notice info %}} +Attention, seulement les pages traduites sont affichées dans le menu. Le contenu n'est pas remplacé par les pages de la langue par défaut. +{{% /notice %}} + +{{% notice tip %}} +Utilisez le paramètre du Front Matter [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) pour traduire également les URLs. +{{% /notice %}} + +## Surcharger les *translation strings* + +Les *Translations strings* sont utilisées comme valeurs par défaut dans le thème (Bouton *Modifier la page*, Element de subsitution *Recherche*, etc.). Les traductions sont disponibles en français et en anglais mais vous pouvez utiliser n'importe quelle autre langue et surcharger avec vos propres valeurs. + +Pour surcharger ces valeurs, créer un nouveau fichier dans votre dossier i18n local `i18n/.toml` et inspirez vous du thème `themes/hugo-theme-learn/i18n/en.toml` + +D'ailleurs, ces traductions pour servir à tout le monde, donc svp prenez le temps de [proposer une Pull Request](https://github.com/matcornic/hugo-theme-learn/pulls) ! + +## Désactiver le changement de langue + +Vous pouvez changer de langue directement dans le navigateur. C'est une super fonctionnalité, mais vous avez peut-être besoin de la désactiver. + +Pour ce faire, ajouter le paramètre `disableLanguageSwitchingButton=true` dans votre `config.toml` + +```toml +[params] + # Quand vous utilisez un site en multi-langue, désactive le bouton de changment de langue. + disableLanguageSwitchingButton = true +``` + +![I18n menu](/en/cont/i18n/images/i18n-menu.gif) \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/i18n/images/i18n-menu.gif b/website/themes/hugo-theme-learn/exampleSite/content/cont/i18n/images/i18n-menu.gif new file mode 100644 index 000000000..99ee22267 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/cont/i18n/images/i18n-menu.gif differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/icons.en.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/icons.en.md new file mode 100644 index 000000000..ad769c6c1 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/icons.en.md @@ -0,0 +1,41 @@ +--- +title: Icons and logos +weight: 27 +--- + +The Learn theme for Hugo loads the [**Font Awesome**](https://fontawesome.com) library, allowing you to easily display any icon or logo available in the Font Awesome free collection. + +## Finding an icon + +Browse through the available icons in the [Font Awesome Gallery](https://fontawesome.com/icons?d=gallery&m=free). Notice that the **free** filter is enabled, as only the free icons are available by default. + +Once on the Font Awesome page for a specific icon, for example the page for the [heart](https://fontawesome.com/icons/heart?style=solid), copy the HTML reference and paste into the markdown content. + +The HTML to include the heart icon is: + +``` + +``` + +## Including in markdown + +Paste the `` HTML into markup and Font Awesome will load the relevant icon. + +``` +Built with from Grav and Hugo +``` + +Which appears as + +Built with from Grav and Hugo + +## Customising icons + +Font Awesome provides many ways to modify the icon + +* Change colour (by default the icon will inherit the parent colour) +* Increase or decrease size +* Rotate +* Combine with other icons + +Check the full documentation on [web fonts with CSS](https://fontawesome.com/how-to-use/web-fonts-with-css) for more. diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/markdown.en.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/markdown.en.md new file mode 100644 index 000000000..c4ff55f97 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/markdown.en.md @@ -0,0 +1,673 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Markdown syntax +weight: 15 +--- + +{{% notice note %}} +This page is a shameful copy of the great [Grav original page](http://learn.getgrav.org/content/markdown). +Only difference is information about image customization ([resizing]({{< relref "#resizing-image" >}}), [add CSS classes]({{< relref "#add-css-classes" >}})...) +{{% /notice%}} + +Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages. + +**Markdown** is a better way to write **HTML**, without all the complexities and ugliness that usually accompanies it. + +Some of the key benefits are: + +1. Markdown is simple to learn, with minimal extra characters so it's also quicker to write content. +2. Less chance of errors when writing in markdown. +3. Produces valid XHTML output. +4. Keeps the content and the visual display separate, so you cannot mess up the look of your site. +5. Write in any text editor or Markdown application you like. +6. Markdown is a joy to use! + +John Gruber, the author of Markdown, puts it like this: + +> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email. +> -- John Gruber + + +Grav ships with built-in support for [Markdown](http://daringfireball.net/projects/markdown/) and [Markdown Extra](https://michelf.ca/projects/php-markdown/extra/). You must enable **Markdown Extra** in your `system.yaml` configuration file + +Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like: + +{{% notice info %}} + Bookmark this page for easy future reference! +{{% /notice %}} + +## Headings + +Headings from `h1` through `h6` are constructed with a `#` for each level: + +```markdown +# h1 Heading +## h2 Heading +### h3 Heading +#### h4 Heading +##### h5 Heading +###### h6 Heading +``` + +Renders to: + +# h1 Heading +## h2 Heading +### h3 Heading +#### h4 Heading +##### h5 Heading +###### h6 Heading + +HTML: + +```html +

h1 Heading

+

h2 Heading

+

h3 Heading

+

h4 Heading

+
h5 Heading
+
h6 Heading
+``` + +## Comments + +Comments should be HTML compatible + +```html + +``` +Comment below should **NOT** be seen: + + + + +## Horizontal Rules + +The HTML `
` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a `
` with any of the following: + +* `___`: three consecutive underscores +* `---`: three consecutive dashes +* `***`: three consecutive asterisks + +renders to: + +___ + +--- + +*** + + +## Body Copy + +Body copy written as normal, plain text will be wrapped with `

` tags in the rendered HTML. + +So this body copy: + +```markdown +Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad. +``` +renders to this HTML: + +```html +

Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.

+``` + +## Emphasis + +### Bold +For emphasizing a snippet of text with a heavier font-weight. + +The following snippet of text is **rendered as bold text**. + +```markdown +**rendered as bold text** +``` +renders to: + +**rendered as bold text** + +and this HTML + +```html +rendered as bold text +``` + +### Italics +For emphasizing a snippet of text with italics. + +The following snippet of text is _rendered as italicized text_. + +```markdown +_rendered as italicized text_ +``` + +renders to: + +_rendered as italicized text_ + +and this HTML: + +```html +rendered as italicized text +``` + + +### strikethrough +In GFM (GitHub flavored Markdown) you can do strikethroughs. + +```markdown +~~Strike through this text.~~ +``` +Which renders to: + +~~Strike through this text.~~ + +HTML: + +```html +Strike through this text. +``` + +## Blockquotes + +For quoting blocks of content from another source within your document. + +Add `>` before any text you want to quote. + +```markdown +> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. +``` + +Renders to: + +> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. + +and this HTML: + +```html +
+

Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.

+
+``` + +Blockquotes can also be nested: + +```markdown +> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. +> +> > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. +> +> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus. +``` + +Renders to: + +> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. +> +> > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. +> +> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus. + +## Notices + +{{% notice note %}} +The old mechanism for notices overriding the block quote syntax (`>>>`) has been deprecated. Notices are now handled via a dedicated plugin called [Markdown Notices](https://github.com/getgrav/grav-plugin-markdown-notices) +{{% /notice %}} + + +## Lists + +### Unordered +A list of items in which the order of the items does not explicitly matter. + +You may use any of the following symbols to denote bullets for each list item: + +```markdown +* valid bullet +- valid bullet ++ valid bullet +``` + +For example + +```markdown ++ Lorem ipsum dolor sit amet ++ Consectetur adipiscing elit ++ Integer molestie lorem at massa ++ Facilisis in pretium nisl aliquet ++ Nulla volutpat aliquam velit + - Phasellus iaculis neque + - Purus sodales ultricies + - Vestibulum laoreet porttitor sem + - Ac tristique libero volutpat at ++ Faucibus porta lacus fringilla vel ++ Aenean sit amet erat nunc ++ Eget porttitor lorem +``` +Renders to: + ++ Lorem ipsum dolor sit amet ++ Consectetur adipiscing elit ++ Integer molestie lorem at massa ++ Facilisis in pretium nisl aliquet ++ Nulla volutpat aliquam velit + - Phasellus iaculis neque + - Purus sodales ultricies + - Vestibulum laoreet porttitor sem + - Ac tristique libero volutpat at ++ Faucibus porta lacus fringilla vel ++ Aenean sit amet erat nunc ++ Eget porttitor lorem + +And this HTML + +```html +
    +
  • Lorem ipsum dolor sit amet
  • +
  • Consectetur adipiscing elit
  • +
  • Integer molestie lorem at massa
  • +
  • Facilisis in pretium nisl aliquet
  • +
  • Nulla volutpat aliquam velit +
      +
    • Phasellus iaculis neque
    • +
    • Purus sodales ultricies
    • +
    • Vestibulum laoreet porttitor sem
    • +
    • Ac tristique libero volutpat at
    • +
    +
  • +
  • Faucibus porta lacus fringilla vel
  • +
  • Aenean sit amet erat nunc
  • +
  • Eget porttitor lorem
  • +
+``` + +### Ordered + +A list of items in which the order of items does explicitly matter. + +```markdown +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa +4. Facilisis in pretium nisl aliquet +5. Nulla volutpat aliquam velit +6. Faucibus porta lacus fringilla vel +7. Aenean sit amet erat nunc +8. Eget porttitor lorem +``` +Renders to: + +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa +4. Facilisis in pretium nisl aliquet +5. Nulla volutpat aliquam velit +6. Faucibus porta lacus fringilla vel +7. Aenean sit amet erat nunc +8. Eget porttitor lorem + +And this HTML: + +```html +
    +
  1. Lorem ipsum dolor sit amet
  2. +
  3. Consectetur adipiscing elit
  4. +
  5. Integer molestie lorem at massa
  6. +
  7. Facilisis in pretium nisl aliquet
  8. +
  9. Nulla volutpat aliquam velit
  10. +
  11. Faucibus porta lacus fringilla vel
  12. +
  13. Aenean sit amet erat nunc
  14. +
  15. Eget porttitor lorem
  16. +
+``` + +**TIP**: If you just use `1.` for each number, Markdown will automatically number each item. For example: + +```markdown +1. Lorem ipsum dolor sit amet +1. Consectetur adipiscing elit +1. Integer molestie lorem at massa +1. Facilisis in pretium nisl aliquet +1. Nulla volutpat aliquam velit +1. Faucibus porta lacus fringilla vel +1. Aenean sit amet erat nunc +1. Eget porttitor lorem +``` + +Renders to: + +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa +4. Facilisis in pretium nisl aliquet +5. Nulla volutpat aliquam velit +6. Faucibus porta lacus fringilla vel +7. Aenean sit amet erat nunc +8. Eget porttitor lorem + +## Code + +### Inline code +Wrap inline snippets of code with `` ` ``. + +```markdown +In this example, `
` should be wrapped as **code**. +``` + +Renders to: + +In this example, `
` should be wrapped as **code**. + +HTML: + +```html +

In this example, <section></section> should be wrapped as code.

+``` + +### Indented code + +Or indent several lines of code by at least four spaces, as in: + +
+  // Some comments
+  line 1 of code
+  line 2 of code
+  line 3 of code
+
+ +Renders to: + + // Some comments + line 1 of code + line 2 of code + line 3 of code + +HTML: + +```html +
+  
+    // Some comments
+    line 1 of code
+    line 2 of code
+    line 3 of code
+  
+
+``` + + +### Block code "fences" + +Use "fences" ```` ``` ```` to block in multiple lines of code. + +
+``` markup
+Sample text here...
+```
+
+ + +``` +Sample text here... +``` + +HTML: + +```html +
+  Sample text here...
+
+``` + +### Syntax highlighting + +GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code: + +
+```js
+grunt.initConfig({
+  assemble: {
+    options: {
+      assets: 'docs/assets',
+      data: 'src/data/*.{json,yml}',
+      helpers: 'src/custom-helpers.js',
+      partials: ['src/partials/**/*.{hbs,md}']
+    },
+    pages: {
+      options: {
+        layout: 'default.hbs'
+      },
+      files: {
+        './': ['src/templates/pages/index.hbs']
+      }
+    }
+  }
+};
+```
+
+ +Renders to: + +```js +grunt.initConfig({ + assemble: { + options: { + assets: 'docs/assets', + data: 'src/data/*.{json,yml}', + helpers: 'src/custom-helpers.js', + partials: ['src/partials/**/*.{hbs,md}'] + }, + pages: { + options: { + layout: 'default.hbs' + }, + files: { + './': ['src/templates/pages/index.hbs'] + } + } + } +}; +``` + +## Tables +Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned. + + +```markdown +| Option | Description | +| ------ | ----------- | +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | +``` + +Renders to: + +| Option | Description | +| ------ | ----------- | +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | + +And this HTML: + +```html + + + + + + + + + + + + + + + + + +
OptionDescription
datapath to data files to supply the data that will be passed into templates.
engineengine to be used for processing templates. Handlebars is the default.
extextension to be used for dest files.
+``` + +### Right aligned text + +Adding a colon on the right side of the dashes below any heading will right align text for that column. + +```markdown +| Option | Description | +| ------:| -----------:| +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | +``` + +| Option | Description | +| ------:| -----------:| +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | + +## Links + +### Basic link + +```markdown +[Assemble](http://assemble.io) +``` + +Renders to (hover over the link, there is no tooltip): + +[Assemble](http://assemble.io) + +HTML: + +```html +Assemble +``` + + +### Add a title + +```markdown +[Upstage](https://github.com/upstage/ "Visit Upstage!") +``` + +Renders to (hover over the link, there should be a tooltip): + +[Upstage](https://github.com/upstage/ "Visit Upstage!") + +HTML: + +```html +Upstage +``` + +### Named Anchors + +Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters: + +```markdown +# Table of Contents + * [Chapter 1](#chapter-1) + * [Chapter 2](#chapter-2) + * [Chapter 3](#chapter-3) +``` +will jump to these sections: + +```markdown +## Chapter 1 +Content for chapter one. + +## Chapter 2 +Content for chapter one. + +## Chapter 3 +Content for chapter one. +``` +**NOTE** that specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works. + +## Images {#images} +Images have a similar syntax to links but include a preceding exclamation point. + +```markdown +![Minion](https://octodex.github.com/images/minion.png) +``` +![Minion](https://octodex.github.com/images/minion.png) + +or +```markdown +![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") +``` +![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") + +Like links, Images also have a footnote style syntax + +### Alternative usage : note images + +```markdown +![Alt text][id] +``` +![Alt text][id] + +With a reference later in the document defining the URL location: + +[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" + + [id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" + +### Resizing image + +Add HTTP parameters `width` and/or `height` to the link image to resize the image. Values are CSS values (default is `auto`). + +```markdown +![Minion](https://octodex.github.com/images/minion.png?width=20pc) +``` + +![Minion](https://octodex.github.com/images/minion.png?width=20pc) + +```markdown +![Minion](https://octodex.github.com/images/minion.png?height=50px) +``` + +![Minion](https://octodex.github.com/images/minion.png?height=50px) + +```markdown +![Minion](https://octodex.github.com/images/minion.png?height=50px&width=300px) +``` + +![Minion](https://octodex.github.com/images/minion.png?height=50px&width=300px) + +### Add CSS classes + +Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow`and `border` are available but you could define other ones. + +```markdown +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=shadow) +``` +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=shadow) + +```markdown +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=border) +``` +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=border) + +```markdown +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=border,shadow) +``` +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=border,shadow) + +### Lightbox + +Add a HTTP `featherlight` parameter to the link image to disable lightbox. By default lightbox is enabled using the featherlight.js plugin. You can disable this by defining `featherlight` to `false`. + +```markdown +![Minion](https://octodex.github.com/images/minion.png?featherlight=false) +``` diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/markdown.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/markdown.fr.md new file mode 100644 index 000000000..e734b31cd --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/markdown.fr.md @@ -0,0 +1,666 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Syntaxe Markdown +weight: 15 +--- + +{{% notice note %}} +Cette page est une copie de la [doc de Grav](http://learn.getgrav.org/content/markdown). +La seule différence porte sur la personalisation des images ([taille]({{< relref "#resizing-image" >}}), [ajout de classes CSS]({{< relref "#add-css-classes" >}})...) +Pour des raisons évidentes, cette page n'a pas été traduites en français 😁 +{{% /notice%}} + +Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages. + +**Markdown** is a better way to write **HTML**, without all the complexities and ugliness that usually accompanies it. + +Some of the key benefits are: + +1. Markdown is simple to learn, with minimal extra characters so it's also quicker to write content. +2. Less chance of errors when writing in markdown. +3. Produces valid XHTML output. +4. Keeps the content and the visual display separate, so you cannot mess up the look of your site. +5. Write in any text editor or Markdown application you like. +6. Markdown is a joy to use! + +John Gruber, the author of Markdown, puts it like this: + +> The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email. +> -- John Gruber + + +Grav ships with built-in support for [Markdown](http://daringfireball.net/projects/markdown/) and [Markdown Extra](https://michelf.ca/projects/php-markdown/extra/). You must enable **Markdown Extra** in your `system.yaml` configuration file + +Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like: + +{{% notice info %}} + Bookmark this page for easy future reference! +{{% /notice %}} + +## Headings + +Headings from `h1` through `h6` are constructed with a `#` for each level: + +```markdown +# h1 Heading +## h2 Heading +### h3 Heading +#### h4 Heading +##### h5 Heading +###### h6 Heading +``` + +Renders to: + +# h1 Heading +## h2 Heading +### h3 Heading +#### h4 Heading +##### h5 Heading +###### h6 Heading + +HTML: + +```html +

h1 Heading

+

h2 Heading

+

h3 Heading

+

h4 Heading

+
h5 Heading
+
h6 Heading
+``` + +## Comments + +Comments should be HTML compatible + +```html + +``` +Comment below should **NOT** be seen: + + + + +## Horizontal Rules + +The HTML `
` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a `
` with any of the following: + +* `___`: three consecutive underscores +* `---`: three consecutive dashes +* `***`: three consecutive asterisks + +renders to: + +___ + +--- + +*** + + +## Body Copy + +Body copy written as normal, plain text will be wrapped with `

` tags in the rendered HTML. + +So this body copy: + +```markdown +Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad. +``` +renders to this HTML: + +```html +

Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.

+``` + +## Emphasis + +### Bold +For emphasizing a snippet of text with a heavier font-weight. + +The following snippet of text is **rendered as bold text**. + +```markdown +**rendered as bold text** +``` +renders to: + +**rendered as bold text** + +and this HTML + +```html +rendered as bold text +``` + +### Italics +For emphasizing a snippet of text with italics. + +The following snippet of text is _rendered as italicized text_. + +```markdown +_rendered as italicized text_ +``` + +renders to: + +_rendered as italicized text_ + +and this HTML: + +```html +rendered as italicized text +``` + + +### strikethrough +In GFM (GitHub flavored Markdown) you can do strikethroughs. + +```markdown +~~Strike through this text.~~ +``` +Which renders to: + +~~Strike through this text.~~ + +HTML: + +```html +Strike through this text. +``` + +## Blockquotes + +For quoting blocks of content from another source within your document. + +Add `>` before any text you want to quote. + +```markdown +> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. +``` + +Renders to: + +> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined. + +and this HTML: + +```html +
+

Fusion Drive combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.

+
+``` + +Blockquotes can also be nested: + +```markdown +> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. +> +> > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. +> +> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus. +``` + +Renders to: + +> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi. +> +> > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam. +> +> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus. + +## Notices + +{{% notice note %}} +The old mechanism for notices overriding the block quote syntax (`>>>`) has been deprecated. Notices are now handled via a dedicated plugin called [Markdown Notices](https://github.com/getgrav/grav-plugin-markdown-notices) +{{% /notice %}} + +## Lists + +### Unordered +A list of items in which the order of the items does not explicitly matter. + +You may use any of the following symbols to denote bullets for each list item: + +```markdown +* valid bullet +- valid bullet ++ valid bullet +``` + +For example + +```markdown ++ Lorem ipsum dolor sit amet ++ Consectetur adipiscing elit ++ Integer molestie lorem at massa ++ Facilisis in pretium nisl aliquet ++ Nulla volutpat aliquam velit + - Phasellus iaculis neque + - Purus sodales ultricies + - Vestibulum laoreet porttitor sem + - Ac tristique libero volutpat at ++ Faucibus porta lacus fringilla vel ++ Aenean sit amet erat nunc ++ Eget porttitor lorem +``` +Renders to: + ++ Lorem ipsum dolor sit amet ++ Consectetur adipiscing elit ++ Integer molestie lorem at massa ++ Facilisis in pretium nisl aliquet ++ Nulla volutpat aliquam velit + - Phasellus iaculis neque + - Purus sodales ultricies + - Vestibulum laoreet porttitor sem + - Ac tristique libero volutpat at ++ Faucibus porta lacus fringilla vel ++ Aenean sit amet erat nunc ++ Eget porttitor lorem + +And this HTML + +```html +
    +
  • Lorem ipsum dolor sit amet
  • +
  • Consectetur adipiscing elit
  • +
  • Integer molestie lorem at massa
  • +
  • Facilisis in pretium nisl aliquet
  • +
  • Nulla volutpat aliquam velit +
      +
    • Phasellus iaculis neque
    • +
    • Purus sodales ultricies
    • +
    • Vestibulum laoreet porttitor sem
    • +
    • Ac tristique libero volutpat at
    • +
    +
  • +
  • Faucibus porta lacus fringilla vel
  • +
  • Aenean sit amet erat nunc
  • +
  • Eget porttitor lorem
  • +
+``` + +### Ordered + +A list of items in which the order of items does explicitly matter. + +```markdown +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa +4. Facilisis in pretium nisl aliquet +5. Nulla volutpat aliquam velit +6. Faucibus porta lacus fringilla vel +7. Aenean sit amet erat nunc +8. Eget porttitor lorem +``` +Renders to: + +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa +4. Facilisis in pretium nisl aliquet +5. Nulla volutpat aliquam velit +6. Faucibus porta lacus fringilla vel +7. Aenean sit amet erat nunc +8. Eget porttitor lorem + +And this HTML: + +```html +
    +
  1. Lorem ipsum dolor sit amet
  2. +
  3. Consectetur adipiscing elit
  4. +
  5. Integer molestie lorem at massa
  6. +
  7. Facilisis in pretium nisl aliquet
  8. +
  9. Nulla volutpat aliquam velit
  10. +
  11. Faucibus porta lacus fringilla vel
  12. +
  13. Aenean sit amet erat nunc
  14. +
  15. Eget porttitor lorem
  16. +
+``` + +**TIP**: If you just use `1.` for each number, Markdown will automatically number each item. For example: + +```markdown +1. Lorem ipsum dolor sit amet +1. Consectetur adipiscing elit +1. Integer molestie lorem at massa +1. Facilisis in pretium nisl aliquet +1. Nulla volutpat aliquam velit +1. Faucibus porta lacus fringilla vel +1. Aenean sit amet erat nunc +1. Eget porttitor lorem +``` + +Renders to: + +1. Lorem ipsum dolor sit amet +2. Consectetur adipiscing elit +3. Integer molestie lorem at massa +4. Facilisis in pretium nisl aliquet +5. Nulla volutpat aliquam velit +6. Faucibus porta lacus fringilla vel +7. Aenean sit amet erat nunc +8. Eget porttitor lorem + +## Code + +### Inline code +Wrap inline snippets of code with `` ` ``. + +```markdown +In this example, `
` should be wrapped as **code**. +``` + +Renders to: + +In this example, `
` should be wrapped with **code**. + +HTML: + +```html +

In this example, <section></section> should be wrapped with code.

+``` + +### Indented code + +Or indent several lines of code by at least four spaces, as in: + +
+  // Some comments
+  line 1 of code
+  line 2 of code
+  line 3 of code
+
+ +Renders to: + + // Some comments + line 1 of code + line 2 of code + line 3 of code + +HTML: + +```html +
+  
+    // Some comments
+    line 1 of code
+    line 2 of code
+    line 3 of code
+  
+
+``` + + +### Block code "fences" + +Use "fences" ```` ``` ```` to block in multiple lines of code. + +
+``` markup
+Sample text here...
+```
+
+ + +``` +Sample text here... +``` + +HTML: + +```html +
+  Sample text here...
+
+``` + +### Syntax highlighting + +GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code: + +
+```js
+grunt.initConfig({
+  assemble: {
+    options: {
+      assets: 'docs/assets',
+      data: 'src/data/*.{json,yml}',
+      helpers: 'src/custom-helpers.js',
+      partials: ['src/partials/**/*.{hbs,md}']
+    },
+    pages: {
+      options: {
+        layout: 'default.hbs'
+      },
+      files: {
+        './': ['src/templates/pages/index.hbs']
+      }
+    }
+  }
+};
+```
+
+ +Renders to: + +```js +grunt.initConfig({ + assemble: { + options: { + assets: 'docs/assets', + data: 'src/data/*.{json,yml}', + helpers: 'src/custom-helpers.js', + partials: ['src/partials/**/*.{hbs,md}'] + }, + pages: { + options: { + layout: 'default.hbs' + }, + files: { + './': ['src/templates/pages/index.hbs'] + } + } + } +}; +``` + +## Tables +Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned. + + +```markdown +| Option | Description | +| ------ | ----------- | +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | +``` + +Renders to: + +| Option | Description | +| ------ | ----------- | +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | + +And this HTML: + +```html + + + + + + + + + + + + + + + + + +
OptionDescription
datapath to data files to supply the data that will be passed into templates.
engineengine to be used for processing templates. Handlebars is the default.
extextension to be used for dest files.
+``` + +### Right aligned text + +Adding a colon on the right side of the dashes below any heading will right align text for that column. + +```markdown +| Option | Description | +| ------:| -----------:| +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | +``` + +| Option | Description | +| ------:| -----------:| +| data | path to data files to supply the data that will be passed into templates. | +| engine | engine to be used for processing templates. Handlebars is the default. | +| ext | extension to be used for dest files. | + +## Links + +### Basic link + +```markdown +[Assemble](http://assemble.io) +``` + +Renders to (hover over the link, there is no tooltip): + +[Assemble](http://assemble.io) + +HTML: + +```html +Assemble +``` + + +### Add a title + +```markdown +[Upstage](https://github.com/upstage/ "Visit Upstage!") +``` + +Renders to (hover over the link, there should be a tooltip): + +[Upstage](https://github.com/upstage/ "Visit Upstage!") + +HTML: + +```html +Upstage +``` + +### Named Anchors + +Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters: + +```markdown +# Table of Contents + * [Chapter 1](#chapter-1) + * [Chapter 2](#chapter-2) + * [Chapter 3](#chapter-3) +``` +will jump to these sections: + +```markdown +## Chapter 1 +Content for chapter one. + +## Chapter 2 +Content for chapter one. + +## Chapter 3 +Content for chapter one. +``` +**NOTE** that specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works. + + +## Images {#images} +Images have a similar syntax to links but include a preceding exclamation point. + +```markdown +![Minion](https://octodex.github.com/images/minion.png) +``` +![Minion](https://octodex.github.com/images/minion.png) + +or +```markdown +![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") +``` +![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") + +Like links, Images also have a footnote style syntax + +### Alternative usage : note images + +```markdown +![Alt text][id] +``` +![Alt text][id] + +With a reference later in the document defining the URL location: + +[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" + + [id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" + +### Resizing image + +Add HTTP parameters `width` and/or `height` to the link image to resize the image. Values are CSS values (default is `auto`). + +```markdown +![Minion](https://octodex.github.com/images/minion.png?width=20pc) +``` + +![Minion](https://octodex.github.com/images/minion.png?width=20pc) + +```markdown +![Minion](https://octodex.github.com/images/minion.png?height=50px) +``` + +![Minion](https://octodex.github.com/images/minion.png?height=50px) + +```markdown +![Minion](https://octodex.github.com/images/minion.png?height=50px&width=300px) +``` + +![Minion](https://octodex.github.com/images/minion.png?height=50px&width=300px) + +### Add CSS classes + +Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow`and `border` are available but you could define other ones. + +```markdown +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=shadow) +``` +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=shadow) + +```markdown +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=border) +``` +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=border) + +```markdown +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=border,shadow) +``` +![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=border,shadow) diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/menushortcuts.en.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/menushortcuts.en.md new file mode 100644 index 000000000..e59d6fdb6 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/menushortcuts.en.md @@ -0,0 +1,109 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Menu extra shortcuts +weight: 25 +--- + +You can define additional menu entries or shortcuts in the navigation menu without any link to content. + +## Basic configuration + +Edit the website configuration `config.toml` and add a `[[menu.shortcuts]]` entry for each link your want to add. + +Example from the current website: + + [[menu.shortcuts]] + name = " Github repo" + identifier = "ds" + url = "https://github.com/matcornic/hugo-theme-learn" + weight = 10 + + [[menu.shortcuts]] + name = " Showcases" + url = "/showcase" + weight = 11 + + [[menu.shortcuts]] + name = " Hugo Documentation" + identifier = "hugodoc" + url = "https://gohugo.io/" + weight = 20 + + [[menu.shortcuts]] + name = " Credits" + url = "/credits" + weight = 30 + +By default, shortcuts are preceded by a title. This title can be disabled by setting `disableShortcutsTitle=true`. +However, if you want to keep the title but change its value, it can be overriden by changing your local i18n translation string configuration. + +For example, in your local `i18n/en.toml` file, add the following content + + [Shortcuts-Title] + other = "" + +Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo i18n translation strings](https://gohugo.io/content-management/multilingual/#translation-of-strings) + +## Configuration for Multilingual mode {#i18n} + +When using a multilingual website, you can set different menus for each language. In the `config.toml` file, prefix your menu configuration by `Languages.`. + + +Example from the current website: + + [Languages] + [Languages.en] + title = "Documentation for Hugo Learn Theme" + weight = 1 + languageName = "English" + + [[Languages.en.menu.shortcuts]] + name = " Github repo" + identifier = "ds" + url = "https://github.com/matcornic/hugo-theme-learn" + weight = 10 + + [[Languages.en.menu.shortcuts]] + name = " Showcases" + url = "/showcase" + weight = 11 + + [[Languages.en.menu.shortcuts]] + name = " Hugo Documentation" + identifier = "hugodoc" + url = "https://gohugo.io/" + weight = 20 + + [[Languages.en.menu.shortcuts]] + name = " Credits" + url = "/credits" + weight = 30 + + [Languages.fr] + title = "Documentation du thème Hugo Learn" + weight = 2 + languageName = "Français" + + [[Languages.fr.menu.shortcuts]] + name = " Repo Github" + identifier = "ds" + url = "https://github.com/matcornic/hugo-theme-learn" + weight = 10 + + [[Languages.fr.menu.shortcuts]] + name = " Vitrine" + url = "/showcase" + weight = 11 + + [[Languages.fr.menu.shortcuts]] + name = " Documentation Hugo" + identifier = "hugodoc" + url = "https://gohugo.io/" + weight = 20 + + [[Languages.fr.menu.shortcuts]] + name = " Crédits" + url = "/credits" + weight = 30 + +Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo multilingual menus](https://gohugo.io/content-management/multilingual/#menus) \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/menushortcuts.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/menushortcuts.fr.md new file mode 100644 index 000000000..886067906 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/menushortcuts.fr.md @@ -0,0 +1,109 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Raccourcis du menu +weight: 25 +--- + +Vous pouvez définir des entrées ou raccourcis supplémentaires dans le menu sans avoir besoin d'être lié à un contenu du site. + +## Configuration simple + +Editez le fichier de configuration `config.toml` et ajoutez une entrée `[[menu.shortcuts]]` pour chaque lien que vous voulez ajouter. + +Exemple pour ce site: + + [[menu.shortcuts]] + name = " Github repo" + identifier = "ds" + url = "https://github.com/matcornic/hugo-theme-learn" + weight = 10 + + [[menu.shortcuts]] + name = " Showcases" + url = "/showcase" + weight = 11 + + [[menu.shortcuts]] + name = " Hugo Documentation" + identifier = "hugodoc" + url = "https://gohugo.io/" + weight = 20 + + [[menu.shortcuts]] + name = " Credits" + url = "/credits" + weight = 30 + +Par défaut, les raccourcis sont précédés par un titre. Ce titre peut être désactivé en ajouter le paramètre `disableShortcutsTitle=true` dans la section `params` de votre `config.toml`. +Cependant, si vous voulez garder le titre mais changer sa valeur, vous pouvez modifier votre configuration multilangue locale en changeant les *translation string*. + +Par exemple, dans votre fichier local `i18n/en.toml`, ajouter le contenu + + [Shortcuts-Title] + other = "" + +Plus d'infos sur [les menus Hugo](https://gohugo.io/extras/menus/) et sur [les translations strings](https://gohugo.io/content-management/multilingual/#translation-of-strings) + +## Configuration pour le mode multi-langue {#i18n} + +Quand vous utilisez un site multi-langue, vous pouvez avoir des menus différents pour chaque langage. Dans le fichier de configuration `config.toml`, préfixez votre configuration par `Languages.`. + + +Par exemple, avec ce site : + + [Languages] + [Languages.en] + title = "Documentation for Hugo Learn Theme" + weight = 1 + languageName = "English" + + [[Languages.en.menu.shortcuts]] + name = " Github repo" + identifier = "ds" + url = "https://github.com/matcornic/hugo-theme-learn" + weight = 10 + + [[Languages.en.menu.shortcuts]] + name = " Showcases" + url = "/showcase" + weight = 11 + + [[Languages.en.menu.shortcuts]] + name = " Hugo Documentation" + identifier = "hugodoc" + url = "https://gohugo.io/" + weight = 20 + + [[Languages.en.menu.shortcuts]] + name = " Credits" + url = "/credits" + weight = 30 + + [Languages.fr] + title = "Documentation du thème Hugo Learn" + weight = 2 + languageName = "Français" + + [[Languages.fr.menu.shortcuts]] + name = " Repo Github" + identifier = "ds" + url = "https://github.com/matcornic/hugo-theme-learn" + weight = 10 + + [[Languages.fr.menu.shortcuts]] + name = " Vitrine" + url = "/showcase" + weight = 11 + + [[Languages.fr.menu.shortcuts]] + name = " Documentation Hugo" + identifier = "hugodoc" + url = "https://gohugo.io/" + weight = 20 + + [[Languages.fr.menu.shortcuts]] + name = " Crédits" + url = "/credits" + weight = 30 + +Plus d'infos sur [les menus Hugo](https://gohugo.io/extras/menus/) et les [menus multi-langue Hugo](https://gohugo.io/content-management/multilingual/#menus) \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.en.md new file mode 100644 index 000000000..ad6a1b5a8 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.en.md @@ -0,0 +1,166 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Pages organization +weight: 5 +--- + +In **Hugo**, pages are the core of your site. Once it is configured, pages are definitely the added value to your documentation site. + +## Folders + +Organize your site like [any other Hugo project](https://gohugo.io/content/organization/). Typically, you will have a *content* folder with all your pages. + + content + ├── level-one + │ ├── level-two + │ │ ├── level-three + │ │ │ ├── level-four + │ │ │ │ ├── _index.md <-- /level-one/level-two/level-three/level-four + │ │ │ │ ├── page-4-a.md <-- /level-one/level-two/level-three/level-four/page-4-a + │ │ │ │ ├── page-4-b.md <-- /level-one/level-two/level-three/level-four/page-4-b + │ │ │ │ └── page-4-c.md <-- /level-one/level-two/level-three/level-four/page-4-c + │ │ │ ├── _index.md <-- /level-one/level-two/level-three + │ │ │ ├── page-3-a.md <-- /level-one/level-two/level-three/page-3-a + │ │ │ ├── page-3-b.md <-- /level-one/level-two/level-three/page-3-b + │ │ │ └── page-3-c.md <-- /level-one/level-two/level-three/page-3-c + │ │ ├── _index.md <-- /level-one/level-two + │ │ ├── page-2-a.md <-- /level-one/level-two/page-2-a + │ │ ├── page-2-b.md <-- /level-one/level-two/page-2-b + │ │ └── page-2-c.md <-- /level-one/level-two/page-2-c + │ ├── _index.md <-- /level-one + │ ├── page-1-a.md <-- /level-one/page-1-a + │ ├── page-1-b.md <-- /level-one/page-1-b + │ └── page-1-c.md <-- /level-one/page-1-c + ├── _index.md <-- / + └── page-top.md <-- /page-top + +{{% notice note %}} +`_index.md` is required in each folder, it’s your “folder home page” +{{% /notice %}} + +## Types + +**Hugo-theme-learn** defines two types of pages. *Default* and *Chapter*. Both can be used at any level of the documentation, the only difference being layout display. + +A **Chapter** displays a page meant to be used as introduction for a set of child pages. Commonly, it contains a simple title and a catch line to define content that can be found under it. +You can define any HTML as prefix for the menu. In the example below, it's just a number but that could be an [icon](https://fortawesome.github.io/Font-Awesome/). + +![Chapter page](/en/cont/pages/images/pages-chapter.png?width=50pc) + +```markdown ++++ +title = "Basics" +chapter = true +weight = 5 +pre = "1. " ++++ + +### Chapter 1 + +# Basics + +Discover what this Hugo theme is all about and the core-concepts behind it. +``` + +To tell **Hugo-theme-learn** to consider a page as a chapter, set `chapter=true` in the Front Matter of the page. + +A **Default** page is any other content page. + +![Default page](/en/cont/pages/images/pages-default.png?width=50pc) + +```toml ++++ +title = "Installation" +weight = 15 ++++ +``` + +The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/). + +## Create your project + +Hugo provides a `new` command to create a new website. + +``` +hugo new site +``` + +**Hugo-theme-learn** provides [archetypes]({{< relref "cont/archetypes.en.md" >}}) to help you create this kind of pages. + +## Front Matter configuration + +Each Hugo page has to define a [Front Matter](https://gohugo.io/content/front-matter/) in *yaml*, *toml* or *json*. + +**Hugo-theme-learn** uses the following parameters on top of Hugo ones : + +```toml ++++ +# Table of content (toc) is enabled by default. Set this parameter to true to disable it. +# Note: Toc is always disabled for chapter pages +disableToc = "false" +# If set, this will be used for the page's menu entry (instead of the `title` attribute) +menuTitle = "" +# The title of the page in menu will be prefixed by this HTML content +pre = "" +# The title of the page in menu will be postfixed by this HTML content +post = "" +# Set the page as a chapter, changing the way it's displayed +chapter = false +# Hide a menu entry by setting this to true +hidden = false +# Display name of this page modifier. If set, it will be displayed in the footer. +LastModifierDisplayName = "" +# Email of this page modifier. If set with LastModifierDisplayName, it will be displayed in the footer +LastModifierEmail = "" ++++ +``` + +### Add icon to a menu entry + +In the page frontmatter, add a `pre` param to insert any HTML code before the menu label. The example below uses the Github icon. + +```toml ++++ +title = "Github repo" +pre = " " ++++ +``` + +![Title with icon](/en/cont/pages/images/frontmatter-icon.png) + +### Ordering sibling menu/page entries + +Hugo provides a [flexible way](https://gohugo.io/content/ordering/) to handle order for your pages. + +The simplest way is to set `weight` parameter to a number. + +```toml ++++ +title = "My page" +weight = 5 ++++ +``` + +### Using a custom title for menu entries + +By default, **Hugo-theme-learn** will use a page's `title` attribute for the menu item (or `linkTitle` if defined). + +But a page's title has to be descriptive on its own while the menu is a hierarchy. +We've added the `menuTitle` parameter for that purpose: + +For example (for a page named `content/install/linux.md`): + +```toml ++++ +title = "Install on Linux" +menuTitle = "Linux" ++++ +``` + +## Homepage + +To configure your home page, you basically have three choices: + +1. Create an `_index.md` document in `content` folder and fill the file with *Markdown content* +2. Create an `index.html` file in the `static` folder and fill the file with *HTML content* +3. Configure your server to automatically redirect home page to one your documentation page diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.fr.md new file mode 100644 index 000000000..50c6f256b --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.fr.md @@ -0,0 +1,146 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Organisation des pages +weight: 5 +--- + +Dans **Hugo**, les pages sont le cœur de votre site. Une fois configurées, les pages sont la valeur ajoutée de votre site de documentation. + +## Dossiers + +Organisez votre site comme n'importe quel autre [projet Hugo](https://gohugo.io/content/organization/). Typiquement, vous allez avoir un dossier *content* avec vos pages. + + content + ├── niveau-un + │ ├── niveau-deux + │ │ ├── niveau-trois + │ │ │ ├── niveau-quatre + │ │ │ │ ├── _index.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre + │ │ │ │ ├── page-4-a.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-a + │ │ │ │ ├── page-4-b.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-b + │ │ │ │ └── page-4-c.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-c + │ │ │ ├── _index.md <-- /niveau-un/niveau-deux/niveau-trois + │ │ │ ├── page-3-a.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-a + │ │ │ ├── page-3-b.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-b + │ │ │ └── page-3-c.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-c + │ │ ├── _index.md <-- /niveau-un/niveau-deux + │ │ ├── page-2-a.md <-- /niveau-un/niveau-deux/page-2-a + │ │ ├── page-2-b.md <-- /niveau-un/niveau-deux/page-2-b + │ │ └── page-2-c.md <-- /niveau-un/niveau-deux/page-2-c + │ ├── _index.md <-- /niveau-un + │ ├── page-1-a.md <-- /niveau-un/page-1-a + │ ├── page-1-b.md <-- /niveau-un/page-1-b + │ └── page-1-c.md <-- /niveau-un/page-1-c + ├── _index.md <-- / + └── premiere-page.md <-- /premiere-page + +{{% notice note %}} +Le fichier `_index.md` est obligatoire dans chaque dossier, c'est en quelque sorte votre page d'accueil pour le dossier. +{{% /notice %}} + +## Types + +**Hugo-theme-learn** définit deux types de pages. *Défaut* et *Chapitre*. Les deux sont utilisables à n'importe quel niveau du site, la seule différence est dans l'affichage. + +Un **Chapitre** affiche une page vouée à être une introduction pour un ensemble de pages filles. Habituellement, il va seulement contenir un titre et un résumé de la section. +Vous pouvez définir n'importe quel contenu HTML comme préfixe de l'entrée du menu. Dans l'exemple ci-dessous, c'est juste un nombre mais vous pourriez utiliser une [icône](https://fortawesome.github.io/Font-Awesome/). + +![Page Chapitre](/en/cont/pages/images/pages-chapter.png?width=50pc) + +```markdown ++++ +title = "Démarrage" +weight = 5 +pre = "1. " +chapter = true ++++ + +### Chapitre 1 + +# Démarrage + +Découvrez comment utiliser ce thème Hugo et apprenez en les concepts +``` + +Pour dire à **Hugo-theme-learn** de considérer la page comme un chapitre, configure `chapter=true` dans le Front Matter de la page. + +Une page **Défaut** est n'importe quelle autre page. + +![Page défaut](/en/cont/pages/images/pages-default.png?width=50pc) + + +++ + title = "Installation" + weight = 15 + +++ + + The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/). + + ## Create your project + + Hugo provides a `new` command to create a new website. + + ``` + hugo new site + ``` + +**Hugo-theme-learn** fournit des [archétypes]({{< relref "cont/archetypes.fr.md" >}}) pour vous aider à créer ce type de pages. + +## Configuration des Front Matter + +Chaque page Hugo doit définir un [Front Matter](https://gohugo.io/content/front-matter/) dans le format *yaml*, *toml* ou *json*. + +**Hugo-theme-learn** utilise les paramètres suivant en plus de ceux définis par Hugo: + +```toml ++++ +# Le Sommaire (table of content = toc) est activé par défaut. Modifier ce paramètre à true pour le désactiver. +# Note: Le sommaire est toujours désactivé pour les chapitres +disableToc = "false" +# Le titre de la page dans le menu sera préfixé par ce contentu HTML +pre = "" +# Le titre de la page dans le menu sera suffixé par ce contentu HTML +post = "" +# Modifier le type de la page pour changer l'affichage +chapter = false +# Cache la page du menu +hidden = false +# Nom de la personne qui a modifié la page. Quand configuré, sera affiché dans le pied de page. +LastModifierDisplayName = "" +# Email de la personne qui a modifié la page. Quand configuré, sera affiché dans le pied de page. +LastModifierEmail = "" ++++ +``` + +### Ajouter une icône à une entrée du menu + +Dans le Front Matter, ajouter un paramètre `pre` pour insérer du code HTML qui s'affichera avant le label du menu. L'exemple ci-dessous utilise l'icône de Github. + +```toml ++++ +title = "Repo Github" +pre = " " ++++ +``` + +![Titre avec icône](/en/cont/pages/images/frontmatter-icon.png) + +### Ordonner les entrées dans le menu + +Hugo permet de modifier facilement [l'ordre des menu](https://gohugo.io/content/ordering/). + +La manière la plus simple est de configurer le paramètre `weight` avec un nombre. + +```toml ++++ +title = "Ma page" +weight = 5 ++++ +``` + +## Page d'accueil + +Pour configurer votre page d'accueil, vous avez trois choix: + +1. Créer une page `_index.md` dans le dossier `content` et remplissez le fichier avec du *contenu Markdown* +2. Créer une page `index.html` dans le dossier `static` et remplissez le fichier avec du *contenu HTML* +3. Configurez votre serveur pour automatiquement rediriger la page d'accueil vers l'une de vos pages. diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/frontmatter-icon.png b/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/frontmatter-icon.png new file mode 100644 index 000000000..a8dd653ab Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/frontmatter-icon.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-chapter.png b/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-chapter.png new file mode 100644 index 000000000..593d7e229 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-chapter.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-default.png b/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-default.png new file mode 100644 index 000000000..396e788ec Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/cont/pages/images/pages-default.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/tags.en.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/tags.en.md new file mode 100644 index 000000000..02972bb6b --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/tags.en.md @@ -0,0 +1,39 @@ +--- +date: 2018-11-29T08:41:44+01:00 +title: Tags +weight: 40 +tags: ["documentation", "tutorial"] +--- + +*Learn theme* support one default taxonomy of gohugo: the *tag* feature. + +## Configuration + +Just add tags to any page: + +```markdown +--- +date: 2018-11-29T08:41:44+01:00 +title: Theme tutorial +weight: 15 +tags: ["tutorial", "theme"] +--- +``` + +## Behavior + + +The tags are displayed at the top of the page, in their insertion order. + +Each tag is a link to a *Taxonomy* page displaying all the articles with the given tag. + +## List all the tags + +In the `config.toml` file you can add a shortcut to display all the tags + +```toml +[[menu.shortcuts]] +name = " Tags" +url = "/tags" +weight = 30 +``` \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/cont/tags.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/cont/tags.fr.md new file mode 100644 index 000000000..d19b396c6 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/cont/tags.fr.md @@ -0,0 +1,40 @@ +--- +date: 2018-11-29T08:41:44+01:00 +title: Tags +weight: 40 +tags: ["documentation", "tutorial"] +--- + + +Le *thème Learn* supporte une des taxonomy par défaut de GoHugo : les tags. + +## Configuration + +Il suffit d'ajouter un tableau de tags sur la page : + +```markdown +--- +date: 2018-11-29T08:41:44+01:00 +title: Tutoriel pour le thème +weight: 15 +tags: ["tutoriel", "theme"] +--- +``` + +## Comportement + +Les tags sont affichés en haut de la page, dans l'ordre dans lequel ils ont été saisis. + +Chaque tag est un lien vers une page *Taxonomy*, qui affiche tous les article avec ce tag. + + +## Liste des tags + +Il est possible de rajouter un raccourci dans le fichier `config.toml` afin d'afficher une page listant tous les tags + +```toml +[[menu.shortcuts]] +name = " Tags" +url = "/tags" +weight = 30 +``` \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/credits.en.md b/website/themes/hugo-theme-learn/exampleSite/content/credits.en.md new file mode 100644 index 000000000..1a489fcfc --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/credits.en.md @@ -0,0 +1,28 @@ +--- +title: Credits +disableToc: true +--- + +## Contributors + +Thanks to them for making Open Source Software a better place ! + +{{% ghcontributors "https://api.github.com/repos/matcornic/hugo-theme-learn/contributors?per_page=100" %}} + +And a special thanks to [@vjeantet](https://github.com/vjeantet) for his work on [docdock](https://github.com/vjeantet/hugo-theme-docdock), a fork of hugo-theme-learn. v2.0.0 of this theme is inspired by his work. + +## Packages and libraries +* [mermaid](https://knsv.github.io/mermaid) - generation of diagram and flowchart from text in a similar manner as markdown +* [font awesome](http://fontawesome.io/) - the iconic font and CSS framework +* [jQuery](https://jquery.com) - The Write Less, Do More, JavaScript Library +* [lunr](https://lunrjs.com) - Lunr enables you to provide a great search experience without the need for external, server-side, search services... +* [horsey](https://bevacqua.github.io/horsey/) - Progressive and customizable autocomplete component +* [clipboard.js](https://zenorocha.github.io/clipboard.js) - copy text to clipboard +* [highlight.js](https://highlightjs.org) - Javascript syntax highlighter +* [modernizr](https://modernizr.com) - A JavaScript toolkit that allows web developers to use new CSS3 and HTML5 features while maintaining a fine level of control over browsers that don't support + +## Tooling + +* [Netlify](https://www.netlify.com) - Continuous deployement and hosting of this documentation +* [Hugo](https://gohugo.io/) + diff --git a/website/themes/hugo-theme-learn/exampleSite/content/credits.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/credits.fr.md new file mode 100644 index 000000000..536f09381 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/credits.fr.md @@ -0,0 +1,28 @@ +--- +title: Crédits +disableToc: true +--- + +## Contributeurs + +Merci à eux de rendre le monde Open Source meilleur ! + +{{% ghcontributors "https://api.github.com/repos/matcornic/hugo-theme-learn/contributors?per_page=100" %}} + +Et un grand merci à [@vjeantet](https://github.com/vjeantet) pour son travail sur [docdock](https://github.com/vjeantet/hugo-theme-docdock), un fork de _hugo-theme-learn_. La v2.0.0 du thème est en grande partie inspirée de son travail. + +## Packages et librairies +* [mermaid](https://knsv.github.io/mermaid) - géneration de diagrames et graphiques à partir de texte similaire à Markdown +* [font awesome](http://fontawesome.io/) - Le framework de polices iconiques +* [jQuery](https://jquery.com) - La plus connue des librairies Javascript +* [lunr](https://lunrjs.com) - Lunr fournit des fonctions de recherche sans service externe +* [horsey](https://bevacqua.github.io/horsey/) - Autocomplétion de composants (utiliser pour les suggestions de recherche) +* [clipboard.js](https://zenorocha.github.io/clipboard.js) - Copier le texte dans le presse-papier +* [highlight.js](https://highlightjs.org) - Mise en valeur de syntaxes +* [modernizr](https://modernizr.com) - Une boite à outil Javascript qui permet aux développeurs d'utiliser les dernières fonctionnalités de CSS et HTML5, même sur de vieux navigateurs. + +## Outils + +* [Netlify](https://www.netlify.com) - Déploiement continue et hébergement de cette documentation +* [Hugo](https://gohugo.io/) + diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/_index.en.md new file mode 100644 index 000000000..754bb0f0c --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/_index.en.md @@ -0,0 +1,16 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Shortcodes +pre: "3. " +weight: 15 +--- + +Hugo uses Markdown for its simple content format. However, there are a lot of things that Markdown doesn’t support well. You could use pure HTML to expand possibilities. + +But this happens to be a bad idea. Everyone uses Markdown because it's pure and simple to read even non-rendered. You should avoid HTML to keep it as simple as possible. + +To avoid this limitations, Hugo created [shortcodes](https://gohugo.io/extras/shortcodes/). A shortcode is a simple snippet inside a page. + +**Hugo-theme-learn** provides multiple shortcodes on top of existing ones. + +{{%children style="h2" description="true" %}} diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/_index.fr.md new file mode 100644 index 000000000..b084d9bfd --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/_index.fr.md @@ -0,0 +1,16 @@ +--- +date: 2016-04-09T16:50:16+02:00 +title: Shortcodes +pre: "3. " +weight: 15 +--- + +Hugo utilise Markdown pour son format simple. Cependant, il y a beaucoup de chose que Markdown ne supporte pas bien. On pourrait utiliser du HTML pur pour améliorer les capacité du Markdown. + +Mais c'est probablement une mauvaise idée. Tout le monde utilise le Markdown parce que c'est pur et simple à lire même lorsqu'il est affiché en texte brut. Vous devez éviter le HTML autant que possible pour garder le contenu simple. + +Cependant, pour éviter les limitations, Hugo a créé les [shortcodes](https://gohugo.io/extras/shortcodes/). Un shortcode est un bout de code (*snippet*) dans une page. + +**Hugo-theme-learn** fournit de multiple shortcodes en plus de ceux existant. + +{{%children style="h2" description="true" %}} diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 new file mode 100644 index 000000000..94e3d0e53 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf new file mode 100644 index 000000000..97377e99b Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf new file mode 100644 index 000000000..e589c73e9 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png new file mode 100644 index 000000000..48acf346c Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/hugo.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 new file mode 100644 index 000000000..9f1fe5645 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.md new file mode 100644 index 000000000..81886b013 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.en.md @@ -0,0 +1,85 @@ +--- +title: Attachments +description : "The Attachments shortcode displays a list of files attached to a page." +--- + +The Attachments shortcode displays a list of files attached to a page. + +{{% attachments /%}} + +## Usage + +The shortcurt lists files found in a **specific folder**. +Currently, it support two implementations for pages + +1. If your page is a markdown file, attachements must be place in a **folder** named like your page and ending with **.files**. + + > * content + > * _index.md + > * page.files + > * attachment.pdf + > * page.md + +2. If your page is a **folder**, attachements must be place in a nested **'files'** folder. + + > * content + > * _index.md + > * page + > * index.md + > * files + > * attachment.pdf + +Be aware that if you use a multilingual website, you will need to have as many folders as languages. + +That's all ! + +### Parameters + +| Parameter | Default | Description | +|:--|:--|:--| +| title | "Attachments" | List's title | +| style | "" | Choose between "orange", "grey", "blue" and "green" for nice style | +| pattern | ".*" | A regular expressions, used to filter the attachments by file name.

The **pattern** parameter value must be [regular expressions](https://en.wikipedia.org/wiki/Regular_expression). + +For example: + +* To match a file suffix of 'jpg', use **.*jpg** (not *.jpg). +* To match file names ending in 'jpg' or 'png', use **.*(jpg|png)** + +### Examples + +#### List of attachments ending in pdf or mp4 + + + {{%/*attachments title="Related files" pattern=".*(pdf|mp4)"/*/%}} + +renders as + +{{%attachments title="Related files" pattern=".*(pdf|mp4)"/%}} + +#### Colored styled box + + {{%/*attachments style="orange" /*/%}} + +renders as + +{{% attachments style="orange" /%}} + + + {{%/*attachments style="grey" /*/%}} + +renders as + +{{% attachments style="grey" /%}} + + {{%/*attachments style="blue" /*/%}} + +renders as + +{{% attachments style="blue" /%}} + + {{%/*attachments style="green" /*/%}} + +renders as + +{{% attachments style="green" /%}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 new file mode 100644 index 000000000..94e3d0e53 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf new file mode 100644 index 000000000..97377e99b Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf new file mode 100644 index 000000000..e589c73e9 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png new file mode 100644 index 000000000..48acf346c Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/hugo.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 new file mode 100644 index 000000000..9f1fe5645 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 differ diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.md new file mode 100644 index 000000000..c24093915 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/attachments.fr.md @@ -0,0 +1,85 @@ +--- +title: Attachments (Pièces jointes) +description : "The Attachments shortcode displays a list of files attached to a page." +--- + +Le shortcode *Attachments* affiche une liste de pièces jointes d'une page. + +{{% attachments /%}} + +## Utilisation + +Le shortcode affiche la liste de fichiers trouvés dans un **dossier spécifique** +A l'heure actuelle, il supporte deux implémentations + +1. Si votre page est un fichier Markdown, les pièces jointes doivent être placée dans un **dossier** nommé comme le nom de la page et suffixé par **.files**. + + > * content + > * _index.md + > * page.files + > * attachment.pdf + > * page.md + +2. Si votre page est un **dossier**, les pièces jointes doivent être placées dans un dossier fils **'files'**. + + > * content + > * _index.md + > * page + > * index.md + > * files + > * attachment.pdf + +Attention, si votre site est multi-langue, vous devrez avec autant de dossier qu'il y a de langues. + +C'est tout ! + +### Paramètres + +| Paramètre | Défaut | Description | +|:--|:--|:--| +| title | "Pièces jointes" | Titre de la liste | +| style | "" | Choisir entre "orange", "grey", "blue" et "green" pour un style plus sympa | +| pattern | ".*" | Une expression régulière, utilisée pour filtrer les pièces jointes par leur nom de fichier.

Le paramètre **pattern** doit être une [expression régulière](https://en.wikipedia.org/wiki/Regular_expression). + +Par exemple: + +* Pour trouver les fichiers avec le suffixe 'jpg', utilisez **.*jpg** (pas *.jpg). +* Pour trouver les fichiers avec les suffixe 'jpg' ou 'png', utilisez **.*(jpg|png)** + +### Exemples + +#### Lister les pièces jointes de type pdf ou mp4 + + + {{%/*attachments title="Fichiers associés" pattern=".*(pdf|mp4)"/*/%}} + +s'affiche comme + +{{%attachments title="Fichiers associés" pattern=".*(pdf|mp4)"/%}} + +#### Modifier le style + + {{%/*attachments style="orange" /*/%}} + +s'affiche comme + +{{% attachments style="orange" /%}} + + + {{%/*attachments style="grey" /*/%}} + +s'affiche comme + +{{% attachments style="grey" /%}} + + {{%/*attachments style="blue" /*/%}} + +s'affiche comme + +{{% attachments style="blue" /%}} + + {{%/*attachments style="green" /*/%}} + +s'affiche comme + +{{% attachments style="green" /%}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/button.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/button.en.md new file mode 100644 index 000000000..9fb92bd98 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/button.en.md @@ -0,0 +1,16 @@ +--- +title: Button +description : "Nice buttons on your page." +--- + +A button is a just a clickable button with optional icon. + +``` +{{%/* button href="https://getgrav.org/" */%}}Get Grav{{%/* /button */%}} +{{%/* button href="https://getgrav.org/" icon="fas fa-download" */%}}Get Grav with icon{{%/* /button */%}} +{{%/* button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" */%}}Get Grav with icon right{{%/* /button */%}} +``` + +{{% button href="https://getgrav.org/" %}}Get Grav{{% /button %}} +{{% button href="https://getgrav.org/" icon="fas fa-download" %}}Get Grav with icon{{% /button %}} +{{% button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" %}}Get Grav with icon right{{% /button %}} diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/button.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/button.fr.md new file mode 100644 index 000000000..66e55af75 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/button.fr.md @@ -0,0 +1,16 @@ +--- +title: Button (Bouton) +description : "De beaux boutons sur votre page." +--- + +Le shortcode *button* est simplement un bouton cliquable avec une icône optionnelle. + +``` +{{%/* button href="https://getgrav.org/" */%}}Téléchargez Grav{{%/* /button */%}} +{{%/* button href="https://getgrav.org/" icon="fas fa-download" */%}}Téléchargez Grav avec icône{{%/* /button */%}} +{{%/* button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" */%}}Téléchargez Grav avec icône à droite{{%/* /button */%}} +``` + +{{% button href="https://getgrav.org/" %}}Téléchargez Grav{{% /button %}} +{{% button href="https://getgrav.org/" icon="fas fa-download" %}}Téléchargez Grav avec icône{{% /button %}} +{{% button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" %}}Téléchargez Grav avec icône à droite{{% /button %}} diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.en.md new file mode 100644 index 000000000..0178536fa --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.en.md @@ -0,0 +1,45 @@ +--- +title : Children +description : List the child pages of a page +--- + +Use the children shortcode to list the child pages of a page and the further descendants (children's children). By default, the shortcode displays links to the child pages. + +## Usage + +| Parameter | Default | Description | +|:--|:--|:--| +| page | _current_ | Specify the page name (section name) to display children for | +| style | "li" | Choose the style used to display descendants. It could be any HTML tag name | +| showhidden | "false" | When true, child pages hidden from the menu will be displayed | +| description | "false" | Allows you to include a short text under each page in the list.
when no description exists for the page, children shortcode takes the first 70 words of your content. [read more info about summaries on gohugo.io](https://gohugo.io/content/summaries/) | +| depth | 1 | Enter a number to specify the depth of descendants to display. For example, if the value is 2, the shortcode will display 2 levels of child pages.
**Tips:** set 999 to get all descendants| +| sort | none | Sort Children By
  • Weight - to sort on menu order
  • Name - to sort alphabetically on menu label
  • Identifier - to sort alphabetically on identifier set in frontmatter
  • URL - URL
  • | + +## Demo + + {{%/* children */%}} + +{{% children %}} + + {{%/* children description="true" */%}} + +{{%children description="true" %}} + + {{%/* children depth="3" showhidden="true" */%}} + +{{% children depth="3" showhidden="true" %}} + + {{%/* children style="h2" depth="3" description="true" */%}} + +{{% children style="h2" depth="3" description="true" %}} + + {{%/* children style="div" depth="999" */%}} + +{{% children style="div" depth="999" %}} + + + + + + diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.fr.md new file mode 100644 index 000000000..672c5ad61 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.fr.md @@ -0,0 +1,45 @@ +--- +title : Children (Pages filles) +description : Liste les pages filles de la page +--- + +Utilisez le shortcode *children* pour lister les pages filles de la page et tous ses déscendants (pages filles de pages filles). Par défaut, le shortcode affiche des liens vers les pages filles. + +## Utilisation + +| Paramètre | Défaut | Description | +|:--|:--|:--| +| page | _current_ | Spécifie le nom de la page (nom de la section) à afficher | +| style | "li" | Choisi le style à utiliser pour afficher les descendants. Cela peut être n'importe quel balise HTML | +| showhidden | "false" | Quand *true*, pages filles cachées dans le menu seront affichées quand même | +| description | "false" | Permet d'inclure le texte de la description de la page sous chaque entré de la liste.
    quand aucune description existe pour la page, le shortcode prend les 70 premiers mots du contenu. [plus d'infos sur gohugo.io](https://gohugo.io/content/summaries/) | +| depth | 1 | Nombre de descendants à afficher. Par exemple, si la valeur est 2, le shortcode va afficher 2 niveaux de pages filels.
    **Astuce:** Utilisez 999 pour avoir tous les descendants| +| sort | | Tri les pages filles par
  • Weight - Poids
  • Name - Nom
  • Identifier - Trier alphabétiquement par identifiant configuré dans le front matter
  • URL - URL
  • | + +## Démo + + {{%/* children */%}} + +{{% children %}} + + {{%/* children description="true" */%}} + +{{%children description="true" %}} + + {{%/* children depth="3" showhidden="true" */%}} + +{{% children depth="3" showhidden="true" %}} + + {{%/* children style="h2" depth="3" description="true" */%}} + +{{% children style="h2" depth="3" description="true" %}} + + {{%/* children style="div" depth="999" */%}} + +{{% children style="div" depth="999" %}} + + + + + + diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/_index.en.md new file mode 100644 index 000000000..d0c5179db --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/_index.en.md @@ -0,0 +1,6 @@ ++++ +title = "page 1" +description = "This is a demo child page" ++++ + +This is a demo child page \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md new file mode 100644 index 000000000..7737f5034 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/_index.fr.md @@ -0,0 +1,6 @@ ++++ +title = "page 1" +description = "Ceci est une page test" ++++ + +Ceci est une page de demo \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md new file mode 100644 index 000000000..a4982f96e --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md @@ -0,0 +1,6 @@ ++++ +title = "page 1-1" +description = "This is a demo child page" ++++ + +This is a demo child page \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md new file mode 100644 index 000000000..e39cb5828 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md @@ -0,0 +1,6 @@ ++++ +title = "page 1-1" +description = "Ceci est une page test" ++++ + +Ceci est une page de demo \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md new file mode 100644 index 000000000..5ce56f4da --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md @@ -0,0 +1,6 @@ ++++ +title = "page 1-1-1" +description = "This is a demo child page" ++++ + +This is a demo child page \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md new file mode 100644 index 000000000..31d2cd118 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md @@ -0,0 +1,6 @@ ++++ +title = "page 1-1-1" +description = "Ceci est une page test" ++++ + +Ceci est une page de demo \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md new file mode 100644 index 000000000..d5d9ab277 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md @@ -0,0 +1,6 @@ ++++ +title = "page 1-1-1-1" +description = "This is a demo child page" ++++ + +This is a demo child page \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md new file mode 100644 index 000000000..3b0f7f096 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md @@ -0,0 +1,6 @@ ++++ +title = "page 1-1-1-1" +description = "Ceci est une page test" ++++ + +Ceci est une page de demo \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md new file mode 100644 index 000000000..883b5b218 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md @@ -0,0 +1,6 @@ ++++ +title = "page 1-1-1-1-1" +description = "This is a demo child page" ++++ + +This is a demo child page \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md new file mode 100644 index 000000000..5a1961725 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md @@ -0,0 +1,6 @@ ++++ +title = "page 1-1-1-1-1" +description = "Ceci est une page test" ++++ + +Ceci est une page de demo \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/_index.en.md new file mode 100644 index 000000000..a96140c25 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/_index.en.md @@ -0,0 +1,11 @@ ++++ +title = "page 2" +description = "" ++++ + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md new file mode 100644 index 000000000..a96140c25 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/_index.fr.md @@ -0,0 +1,11 @@ ++++ +title = "page 2" +description = "" ++++ + +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/test3.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/test3.en.md new file mode 100644 index 000000000..f603d4c0c --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/test3.en.md @@ -0,0 +1,6 @@ ++++ +title = "page test 3" +description = "This is a page test" ++++ + +This is a test 3 demo child page \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md new file mode 100644 index 000000000..6d649e807 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-2/test3.fr.md @@ -0,0 +1,6 @@ ++++ +title = "page test 3" +description = "Ceci est une page test" ++++ + +Ceci est une page de demo test 3 \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-3/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-3/_index.en.md new file mode 100644 index 000000000..f36f8616e --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-3/_index.en.md @@ -0,0 +1,6 @@ ++++ +title = "page 3" +description = "This is a demo child page" ++++ + +This is a demo child page, not displayed in the menu \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md new file mode 100644 index 000000000..1501cc82b --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-3/_index.fr.md @@ -0,0 +1,6 @@ ++++ +title = "page 3" +description = "Ceci est une page test" ++++ + +Ceci est une page de demo \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-4/_index.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-4/_index.en.md new file mode 100644 index 000000000..b9f042d81 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-4/_index.en.md @@ -0,0 +1,7 @@ ++++ +title = "page 4" +description = "This is a demo child page" +hidden = true ++++ + +This is a demo child page, not displayed in the menu \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md new file mode 100644 index 000000000..6735e5041 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/children-4/_index.fr.md @@ -0,0 +1,7 @@ ++++ +title = "page 4" +description = "Ceci est une page test" +hidden = true ++++ + +Ceci est une page de demo \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/test.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/test.en.md new file mode 100644 index 000000000..045f0a1e2 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/test.en.md @@ -0,0 +1,6 @@ ++++ +title = "page test" +description = "This is a page test" ++++ + +This is a test demo child page \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/test.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/test.fr.md new file mode 100644 index 000000000..dd6cc3c3e --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/test.fr.md @@ -0,0 +1,6 @@ ++++ +title = "page test" +description = "Ceci est une page test" ++++ + +Ceci est une page de demo \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/expand.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/expand.en.md new file mode 100644 index 000000000..dff19061c --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/expand.en.md @@ -0,0 +1,45 @@ +--- +title : Expand +description : "Displays an expandable/collapsible section of text on your page" +--- + +The Expand shortcode displays an expandable/collapsible section of text on your page. +Here is an example + +{{%expand%}} +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, +quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo +consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse +cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non +proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +{{%/expand%}} + + +## Usage + + +this shortcode takes exactly one optional parameter to define the text that appears next to the expand/collapse icon. (default is "Expand me...") + + {{%/*expand "Is this learn theme rocks ?" */%}}Yes !.{{%/* /expand*/%}} + +{{%expand "Is this learn theme rocks ?" %}}Yes !{{% /expand%}} + +# Demo + + {{%/*expand*/%}} + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + {{%/* /expand*/%}} + + +{{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, +quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo +consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse +cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non +proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/expand.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/expand.fr.md new file mode 100644 index 000000000..efb86a3c9 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/expand.fr.md @@ -0,0 +1,45 @@ +--- +title : Expand +description : "Affiche une section de texte qui se plie et se déplie" +--- + +Le shortcode *Expand* affiche une section de texte qui se plie et se déplie. +Ci-dessous un exemple. + +{{%expand%}} +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, +quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo +consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse +cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non +proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +{{%/expand%}} + + +## Utilisation + + +Ce shortcode prends exactement un paramètre optionel pour définir le texte à côté de l'icone. (valeur par défaut est "Déroulez-moi...") + + {{%/*expand "Est-ce que ce thème envoie du pâté ?" */%}}Oui !.{{%/* /expand*/%}} + +{{%expand "Est-ce que ce thème envoie du pâté ?" %}}Oui !{{% /expand%}} + +# Demo + + {{%/*expand*/%}} + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + {{%/* /expand*/%}} + + +{{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod +tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, +quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo +consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse +cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non +proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/mermaid.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/mermaid.en.md new file mode 100644 index 000000000..e5b740053 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/mermaid.en.md @@ -0,0 +1,283 @@ +--- +title : "Mermaid" +description : "Generation of diagram and flowchart from text in a similar manner as markdown" +--- + +[Mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown. + +Just insert your mermaid code in the `mermaid` shortcode and that's it. + +## Flowchart example + + {{}} + graph LR; + A[Hard edge] -->|Link text| B(Round edge) + B --> C{Decision} + C -->|One| D[Result one] + C -->|Two| E[Result two] + {{}} + +renders as + +{{}} +graph LR; + A[Hard edge] -->|Link text| B(Round edge) + B --> C{Decision} + C -->|One| D[Result one] + C -->|Two| E[Result two] +{{< /mermaid >}} + +or you can use this alternative syntax: + +
    +```mermaid
    +graph LR;
    +  A[Hard edge] -->|Link text| B(Round edge)
    +    B --> C{Decision}
    +    C -->|One| D[Result one]
    +    C -->|Two| E[Result two]
    +```
    +
    + +renders as + +```mermaid +graph LR; + A[Hard edge] -->|Link text| B(Round edge) + B --> C{Decision} + C -->|One| D[Result one] + C -->|Two| E[Result two] +``` + +## Sequence example + + {{}} + sequenceDiagram + participant Alice + participant Bob + Alice->>John: Hello John, how are you? + loop Healthcheck + John->John: Fight against hypochondria + end + Note right of John: Rational thoughts
    prevail... + John-->Alice: Great! + John->Bob: How about you? + Bob-->John: Jolly good! + {{}} + +renders as + +{{}} +sequenceDiagram + participant Alice + participant Bob + Alice->>John: Hello John, how are you? + loop Healthcheck + John->John: Fight against hypochondria + end + Note right of John: Rational thoughts
    prevail... + John-->Alice: Great! + John->Bob: How about you? + Bob-->John: Jolly good! +{{< /mermaid >}} + +or you can use this alternative syntax: + +
    +```mermaid
    +sequenceDiagram
    +    participant Alice
    +    participant Bob
    +    Alice->>John: Hello John, how are you?
    +    loop Healthcheck
    +        John->John: Fight against hypochondria
    +    end
    +    Note right of John: Rational thoughts 
    prevail... + John-->Alice: Great! + John->Bob: How about you? + Bob-->John: Jolly good! +``` +
    + +renders as + +```mermaid +sequenceDiagram + participant Alice + participant Bob + Alice->>John: Hello John, how are you? + loop Healthcheck + John->John: Fight against hypochondria + end + Note right of John: Rational thoughts
    prevail... + John-->Alice: Great! + John->Bob: How about you? + Bob-->John: Jolly good! +``` + +## GANTT Example + + {{}} + gantt + dateFormat YYYY-MM-DD + title Adding GANTT diagram functionality to mermaid + section A section + Completed task :done, des1, 2014-01-06,2014-01-08 + Active task :active, des2, 2014-01-09, 3d + Future task : des3, after des2, 5d + Future task2 : des4, after des3, 5d + section Critical tasks + Completed task in the critical line :crit, done, 2014-01-06,24h + Implement parser and jison :crit, done, after des1, 2d + Create tests for parser :crit, active, 3d + Future task in critical line :crit, 5d + Create tests for renderer :2d + Add to mermaid :1d + {{}} + + +renders as + +{{}} +gantt + dateFormat YYYY-MM-DD + title Adding GANTT diagram functionality to mermaid + section A section + Completed task :done, des1, 2014-01-06,2014-01-08 + Active task :active, des2, 2014-01-09, 3d + Future task : des3, after des2, 5d + Future task2 : des4, after des3, 5d + section Critical tasks + Completed task in the critical line :crit, done, 2014-01-06,24h + Implement parser and jison :crit, done, after des1, 2d + Create tests for parser :crit, active, 3d + Future task in critical line :crit, 5d + Create tests for renderer :2d + Add to mermaid :1d +{{}} + +or you can use this alternative syntax: + +
    +```mermaid
    +gantt
    +        dateFormat  YYYY-MM-DD
    +        title Adding GANTT diagram functionality to mermaid
    +        section A section
    +        Completed task            :done,    des1, 2014-01-06,2014-01-08
    +        Active task               :active,  des2, 2014-01-09, 3d
    +        Future task               :         des3, after des2, 5d
    +        Future task2               :         des4, after des3, 5d
    +        section Critical tasks
    +        Completed task in the critical line :crit, done, 2014-01-06,24h
    +        Implement parser and jison          :crit, done, after des1, 2d
    +        Create tests for parser             :crit, active, 3d
    +        Future task in critical line        :crit, 5d
    +        Create tests for renderer           :2d
    +        Add to mermaid                      :1d
    +```
    +
    + +renders as + +```mermaid +gantt + dateFormat YYYY-MM-DD + title Adding GANTT diagram functionality to mermaid + section A section + Completed task :done, des1, 2014-01-06,2014-01-08 + Active task :active, des2, 2014-01-09, 3d + Future task : des3, after des2, 5d + Future task2 : des4, after des3, 5d + section Critical tasks + Completed task in the critical line :crit, done, 2014-01-06,24h + Implement parser and jison :crit, done, after des1, 2d + Create tests for parser :crit, active, 3d + Future task in critical line :crit, 5d + Create tests for renderer :2d + Add to mermaid :1d +``` + +### Class example + +
    +```mermaid
    +classDiagram
    +  Class01 <|-- AveryLongClass : Cool
    +  Class03 *-- Class04
    +  Class05 o-- Class06
    +  Class07 .. Class08
    +  Class09 --> C2 : Where am i?
    +  Class09 --* C3
    +  Class09 --|> Class07
    +  Class07 : equals()
    +  Class07 : Object[] elementData
    +  Class01 : size()
    +  Class01 : int chimp
    +  Class01 : int gorilla
    +  Class08 <--> C2: Cool label
    +```
    +
    + +renders as + +```mermaid +classDiagram + Class01 <|-- AveryLongClass : Cool + Class03 *-- Class04 + Class05 o-- Class06 + Class07 .. Class08 + Class09 --> C2 : Where am i? + Class09 --* C3 + Class09 --|> Class07 + Class07 : equals() + Class07 : Object[] elementData + Class01 : size() + Class01 : int chimp + Class01 : int gorilla + Class08 <--> C2: Cool label +``` + +### Git example + +
    +```mermaid
    +gitGraph:
    +options
    +{
    +  "nodeSpacing": 150,
    +  "nodeRadius": 10
    +}
    +end
    +  commit
    +  branch newbranch
    +  checkout newbranch
    +  commit
    +  commit
    +  checkout master
    +  commit
    +  commit
    +  merge newbranch
    +```
    +
    + +renders as + +```mermaid +gitGraph: +options +{ + "nodeSpacing": 150, + "nodeRadius": 10 +} +end + commit + branch newbranch + checkout newbranch + commit + commit + checkout master + commit + commit + merge newbranch +``` \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/mermaid.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/mermaid.fr.md new file mode 100644 index 000000000..e59e17848 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/mermaid.fr.md @@ -0,0 +1,283 @@ +--- +title : "Mermaid" +description : "Génération de diagrammes à partir de texte, dans le même style que Markdown" +--- + +[Mermaid](https://mermaidjs.github.io/) est une bibliothèque Javascript qui permet de générer des diagrammes (séquence, état, gantt, etc.) à partir de texte, dans le même style que Markdown. + +Insérer votre code Mermaid dans un shortcode `mermaid` et c'est tout. + +## Flowchart example + {{}} + graph LR; + A[Bords droits] -->|Lien texte| B(Bords arondis) + B --> C{Décision} + C -->|Un| D[Résultat un] + C -->|Deux| E[Résultat deux] + {{}} + +renders as + +{{}} +graph LR; + A[Bords droits] -->|Lien texte| B(Bords arondis) + B --> C{Décision} + C -->|Un| D[Résultat un] + C -->|Deux| E[Résultat deux] +{{< /mermaid >}} + +or you can use this alternative syntax: + +
    +```mermaid
    +graph LR;
    +	A[Bords droits] -->|Lien texte| B(Bords arondis)
    +	B --> C{Décision}
    +	C -->|Un| D[Résultat un]
    +	C -->|Deux| E[Résultat deux]
    +```
    +
    + +renders as + +```mermaid +graph LR; + A[Bords droits] -->|Lien texte| B(Bords arondis) + B --> C{Décision} + C -->|Un| D[Résultat un] + C -->|Deux| E[Résultat deux] +``` + +## Sequence example + + {{}} + sequenceDiagram + participant Alice + participant Bob + Alice->>John: Salut John, comment vas-tu? + loop Vérification + John->John: Se bat contre l'hyponcodrie. + end + Note right of John: Les pensées rationnelles
    prédominent... + John-->Alice: Super! + John->Bob: Et toi? + Bob-->John: Au top! + {{}} + +renders as + +{{}} +sequenceDiagram + participant Alice + participant Bob + Alice->>John: Salut John, comment vas-tu? + loop Vérification + John->John: Se bat contre l'hyponcodrie. + end + Note right of John: Les pensées rationnelles
    prédominent... + John-->Alice: Super! + John->Bob: Et toi? + Bob-->John: Au top! +{{< /mermaid >}} + +or you can use this alternative syntax: + +
    +```mermaid
    +sequenceDiagram
    +	participant Alice
    +	participant Bob
    +	Alice->>John: Salut John, comment vas-tu?
    +	loop Vérification
    +		John->John: Se bat contre l'hyponcodrie.
    +	end
    +	Note right of John: Les pensées rationnelles
    prédominent... + John-->Alice: Super! + John->Bob: Et toi? + Bob-->John: Au top! +``` +
    + +renders as + +```mermaid +sequenceDiagram + participant Alice + participant Bob + Alice->>John: Salut John, comment vas-tu? + loop Vérification + John->John: Se bat contre l'hyponcodrie. + end + Note right of John: Les pensées rationnelles
    prédominent... + John-->Alice: Super! + John->Bob: Et toi? + Bob-->John: Au top! +``` + +## GANTT Example + + {{}} + gantt + dateFormat YYYY-MM-DD + title Ajout de la fonctionnalité de GANTT à Mermaid + section Une section + Tâche complétée :done, des1, 2014-01-06,2014-01-08 + Tâche en cours :active, des2, 2014-01-09, 3d + Future tâche : des3, after des2, 5d + Future tâche 2 : des4, after des3, 5d + section Tâches critiques + Tâche complétée dans le chemin critique :crit, done, 2014-01-06,24h + Implémenter le parser et jison :crit, done, after des1, 2d + Créer des tests pour le parser :crit, active, 3d + Future tâche dans le chemin critique :crit, 5d + Créer des tests pour le renderer :2d + Ajout à Mermaid :1d + {{}} + + +renders as + +{{}} +gantt + dateFormat YYYY-MM-DD + title Ajout de la fonctionnalité de GANTT à Mermaid + section Une section + Tâche complétée :done, des1, 2014-01-06,2014-01-08 + Tâche en cours :active, des2, 2014-01-09, 3d + Future tâche : des3, after des2, 5d + Future tâche 2 : des4, after des3, 5d + section Tâches critiques + Tâche complétée dans le chemin critique :crit, done, 2014-01-06,24h + Implémenter le parser et jison :crit, done, after des1, 2d + Créer des tests pour le parser :crit, active, 3d + Future tâche dans le chemin critique :crit, 5d + Créer des tests pour le renderer :2d + Ajout à Mermaid :1d +{{}} + + +or you can use this alternative syntax: + +
    +```mermaid
    +gantt
    +		dateFormat  YYYY-MM-DD
    +		title Ajout de la fonctionnalité de GANTT à Mermaid
    +		section Une section
    +		Tâche complétée            :done,    des1, 2014-01-06,2014-01-08
    +		Tâche en cours             :active,  des2, 2014-01-09, 3d
    +		Future tâche               :         des3, after des2, 5d
    +		Future tâche 2             :         des4, after des3, 5d
    +		section Tâches critiques
    +		Tâche complétée dans le chemin critique :crit, done, 2014-01-06,24h
    +		Implémenter le parser et jison          :crit, done, after des1, 2d
    +		Créer des tests pour le parser             :crit, active, 3d
    +		Future tâche dans le chemin critique        :crit, 5d
    +		Créer des tests pour le renderer           :2d
    +		Ajout à Mermaid                      :1d
    +```
    +
    + +renders as + +```mermaid +gantt + dateFormat YYYY-MM-DD + title Ajout de la fonctionnalité de GANTT à Mermaid + section Une section + Tâche complétée :done, des1, 2014-01-06,2014-01-08 + Tâche en cours :active, des2, 2014-01-09, 3d + Future tâche : des3, after des2, 5d + Future tâche 2 : des4, after des3, 5d + section Tâches critiques + Tâche complétée dans le chemin critique :crit, done, 2014-01-06,24h + Implémenter le parser et jison :crit, done, after des1, 2d + Créer des tests pour le parser :crit, active, 3d + Future tâche dans le chemin critique :crit, 5d + Créer des tests pour le renderer :2d + Ajout à Mermaid :1d +``` + +### Class example + +
    +```mermaid
    +classDiagram
    +  Class01 <|-- AveryLongClass : Cool
    +  Class03 *-- Class04
    +  Class05 o-- Class06
    +  Class07 .. Class08
    +  Class09 --> C2 : Where am i?
    +  Class09 --* C3
    +  Class09 --|> Class07
    +  Class07 : equals()
    +  Class07 : Object[] elementData
    +  Class01 : size()
    +  Class01 : int chimp
    +  Class01 : int gorilla
    +  Class08 <--> C2: Cool label
    +```
    +
    + +renders as + +```mermaid +classDiagram + Class01 <|-- AveryLongClass : Cool + Class03 *-- Class04 + Class05 o-- Class06 + Class07 .. Class08 + Class09 --> C2 : Where am i? + Class09 --* C3 + Class09 --|> Class07 + Class07 : equals() + Class07 : Object[] elementData + Class01 : size() + Class01 : int chimp + Class01 : int gorilla + Class08 <--> C2: Cool label +``` + +### Git example + +
    +```mermaid
    +gitGraph:
    +options
    +{
    +  "nodeSpacing": 150,
    +  "nodeRadius": 10
    +}
    +end
    +  commit
    +  branch newbranch
    +  checkout newbranch
    +  commit
    +  commit
    +  checkout master
    +  commit
    +  commit
    +  merge newbranch
    +```
    +
    + +renders as + +```mermaid +gitGraph: +options +{ + "nodeSpacing": 150, + "nodeRadius": 10 +} +end + commit + branch newbranch + checkout newbranch + commit + commit + checkout master + commit + commit + merge newbranch +``` diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.en.md new file mode 100644 index 000000000..c82a6e9f5 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.en.md @@ -0,0 +1,62 @@ +--- +title: Notice +description : "Disclaimers to help you structure your page" +--- + +The notice shortcode shows 4 types of disclaimers to help you structure your page. + +### Note + +``` +{{%/* notice note */%}} +A notice disclaimer +{{%/* /notice */%}} +``` + +renders as + +{{% notice note %}} +A notice disclaimer +{{% /notice %}} + +### Info + +``` +{{%/* notice info */%}} +An information disclaimer +{{%/* /notice */%}} +``` + +renders as + +{{% notice info %}} +An information disclaimer +{{% /notice %}} + +### Tip + +``` +{{%/* notice tip */%}} +A tip disclaimer +{{%/* /notice */%}} +``` + +renders as + +{{% notice tip %}} +A tip disclaimer +{{% /notice %}} + +### Warning + +``` +{{%/* notice warning */%}} +A warning disclaimer +{{%/* /notice */%}} +``` + +renders as + +{{% notice warning %}} +A warning disclaimer +{{% /notice %}} diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.fr.md new file mode 100644 index 000000000..91e4d7052 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.fr.md @@ -0,0 +1,62 @@ +--- +title: Notice +description : "Message pour vous aider à structurer votre contenu" +--- + +Le shortcode *Notice* permet d'afficher 4 types de message pour vous aider à structurer votre contenu. + +### Note + +``` +{{%/* notice note */%}} +Une notice de type *note* +{{%/* /notice */%}} +``` + +s'affiche comme + +{{% notice note %}} +Une notice de type *note* +{{% /notice %}} + +### Info + +``` +{{%/* notice info */%}} +Une notice de type *info* +{{%/* /notice */%}} +``` + +s'affiche comme + +{{% notice info %}} +Une notice de type *info* +{{% /notice %}} + +### Tip + +``` +{{%/* notice tip */%}} +Une notice de type *tip* +{{%/* /notice */%}} +``` + +s'affiche comme + +{{% notice tip %}} +Une notice de type *tip* +{{% /notice %}} + +### Warning + +``` +{{%/* notice warning */%}} +Une notice de type *warning* +{{%/* /notice */%}} +``` + +s'affiche comme + +{{% notice warning %}} +Une notice de type *warning* +{{% /notice %}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/siteparam.en.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/siteparam.en.md new file mode 100644 index 000000000..f431ffb90 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/siteparam.en.md @@ -0,0 +1,23 @@ +--- +title: Site param +description : "Get value of site params variables in your page." +--- + +`siteparam` shortcode is used to help you print values of site params. + +For instance, in this current site, the `editURL` variable is used in `config.toml` + +```toml +[params] + editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/" +``` + +Use the `siteparam` shortcode to display its value. + +``` +`editURL` Value : {{%/* siteparam "editURL" */%}} +``` + +is displayed as + +`editURL` Value : {{% siteparam "editURL" %}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/siteparam.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/siteparam.fr.md new file mode 100644 index 000000000..508100b94 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/shortcodes/siteparam.fr.md @@ -0,0 +1,23 @@ +--- +title: Site param +description : "Afficher la valeur d'un paramètre global du site dans votre page" +--- + +Les shortcode `siteparam` est utilisé pour vous aider à afficher des valeurs provenant des paramètres globaux du site. + +Par exemple, dans ce site, le paramètre `editURL` est utilisé dans le fichier `config.toml` + +```toml +[params] + editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/" +``` + +Utilisez le shortcode `siteparam` pour affichier sa valeur. + +``` +Valeur de `editURL` : {{%/* siteparam "editURL" */%}} +``` + +s'affiche comme + +Valeur de `editURL` : {{% siteparam "editURL" %}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/showcase.en.md b/website/themes/hugo-theme-learn/exampleSite/content/showcase.en.md new file mode 100644 index 000000000..4d06d8b41 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/showcase.en.md @@ -0,0 +1,13 @@ +--- +title: Showcase +disableToc: true +--- + +#### [TAT](https://ovh.github.io/tat/overview/) by OVH +![TAT image](/images/showcase/tat.png?width=50pc) + +#### [Tshark.dev](https://tshark.dev) by Ross Jacobs +![Tshark.dev image](/images/showcase/tshark_dev.png?width=50pc) + +#### [inteliver](https://docs.inteliver.com) by Amir Lavasani +![docs.inteliver.com image](/images/showcase/inteliver_docs.png?width=50pc) \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/content/showcase.fr.md b/website/themes/hugo-theme-learn/exampleSite/content/showcase.fr.md new file mode 100644 index 000000000..fcb9d7f02 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/content/showcase.fr.md @@ -0,0 +1,14 @@ +--- +title: Vitrine +disableToc: true +slug: vitrine +--- + +#### [TAT](https://ovh.github.io/tat/overview/) par OVH +![TAT image](/images/showcase/tat.png?width=50pc) + +#### [Tshark.dev](https://tshark.dev) par Ross Jacobs +![Tshark.dev image](/images/showcase/tshark_dev.png?width=50pc) + +#### [inteliver](https://docs.inteliver.com) by Amir Lavasani +![docs.inteliver.com image](/images/showcase/inteliver_docs.png?width=50pc) \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/layouts/partials/custom-footer.html b/website/themes/hugo-theme-learn/exampleSite/layouts/partials/custom-footer.html new file mode 100644 index 000000000..50e11eb39 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/layouts/partials/custom-footer.html @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/layouts/partials/logo.html b/website/themes/hugo-theme-learn/exampleSite/layouts/partials/logo.html new file mode 100644 index 000000000..a004a9ae5 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/layouts/partials/logo.html @@ -0,0 +1,39 @@ + diff --git a/website/themes/hugo-theme-learn/exampleSite/layouts/partials/menu-footer.html b/website/themes/hugo-theme-learn/exampleSite/layouts/partials/menu-footer.html new file mode 100644 index 000000000..5a35bd00f --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/layouts/partials/menu-footer.html @@ -0,0 +1,14 @@ +
    + + Download + + + Star + + + Fork + +

    Built with from Grav and Hugo

    +
    + + diff --git a/website/themes/hugo-theme-learn/exampleSite/layouts/shortcodes/ghcontributors.html b/website/themes/hugo-theme-learn/exampleSite/layouts/shortcodes/ghcontributors.html new file mode 100644 index 000000000..3e8a92872 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/layouts/shortcodes/ghcontributors.html @@ -0,0 +1,31 @@ + +
    + {{ $url := .Get 0 }} + {{ range getJSON $url }} +
    + + + {{.contributions}} commits +
    + {{ end }} +
    \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/static/css/theme-mine.css b/website/themes/hugo-theme-learn/exampleSite/static/css/theme-mine.css new file mode 100644 index 000000000..2bbc86814 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/static/css/theme-mine.css @@ -0,0 +1,104 @@ + +:root{ + + --MAIN-TEXT-color:#323232; /* Color of text by default */ + --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ + --MAIN-LINK-color:#599a3e; /* Color of links */ + --MAIN-LINK-HOVER-color:#3f6d2c; /* Color of hovered links */ + --MAIN-ANCHOR-color: #599a3e; /* color of anchors on titles */ + + --MENU-HEADER-BG-color:#74b559; /* Background color of menu header */ + --MENU-HEADER-BORDER-color:#9cd484; /*Color of menu header border */ + + --MENU-SEARCH-BG-color:#599a3e; /* Search field background color (by default borders + icons) */ + --MENU-SEARCH-BOX-color: #84c767; /* Override search field border color */ + --MENU-SEARCH-BOX-ICONS-color: #c7f7c4; /* Override search field icons color */ + + --MENU-SECTIONS-ACTIVE-BG-color:#1b211c; /* Background color of the active section and its childs */ + --MENU-SECTIONS-BG-color:#222723; /* Background color of other sections */ + --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ + --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ + --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ + --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ + + --MENU-VISITED-color: #599a3e; /* Color of 'page visited' icons in menu */ + --MENU-SECTION-HR-color: #18211c; /* Color of
    separator in menu */ + +} + +body { + color: var(--MAIN-TEXT-color) !important; +} + +textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { + border-color: none; + box-shadow: none; +} + +h2, h3, h4, h5 { + color: var(--MAIN-TITLES-TEXT-color) !important; +} + +a { + color: var(--MAIN-LINK-color); +} + +.anchor { + color: var(--MAIN-ANCHOR-color); +} + +a:hover { + color: var(--MAIN-LINK-HOVER-color); +} + +#sidebar ul li.visited > a .read-icon { + color: var(--MENU-VISITED-color); +} + +#body a.highlight:after { + display: block; + content: ""; + height: 1px; + width: 0%; + -webkit-transition: width 0.5s ease; + -moz-transition: width 0.5s ease; + -ms-transition: width 0.5s ease; + transition: width 0.5s ease; + background-color: var(--MAIN-LINK-HOVER-color); +} +#sidebar { + background-color: var(--MENU-SECTIONS-BG-color); +} +#sidebar #header-wrapper { + background: var(--MENU-HEADER-BG-color); + color: var(--MENU-SEARCH-BOX-color); + border-color: var(--MENU-HEADER-BORDER-color); +} +#sidebar .searchbox { + border-color: var(--MENU-SEARCH-BOX-color); + background: var(--MENU-SEARCH-BG-color); +} +#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { + background: var(--MENU-SECTIONS-ACTIVE-BG-color); +} +#sidebar .searchbox * { + color: var(--MENU-SEARCH-BOX-ICONS-color); +} + +#sidebar a { + color: var(--MENU-SECTIONS-LINK-color); +} + +#sidebar a:hover { + color: var(--MENU-SECTIONS-LINK-HOVER-color); +} + +#sidebar ul li.active > a { + background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); + color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; +} + +#sidebar hr { + border-color: var(--MENU-SECTION-HR-color); +} + diff --git a/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.eot b/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.eot new file mode 100755 index 000000000..702d2ccdb Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.eot differ diff --git a/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.svg b/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.svg new file mode 100755 index 000000000..811d3aa45 --- /dev/null +++ b/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.ttf b/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.ttf new file mode 100755 index 000000000..4c4637b2a Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.ttf differ diff --git a/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff b/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff new file mode 100755 index 000000000..d95d5ca0d Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff differ diff --git a/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff2 b/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff2 new file mode 100755 index 000000000..39074b234 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.woff2 differ diff --git a/website/themes/hugo-theme-learn/exampleSite/static/images/showcase/inteliver_docs.png b/website/themes/hugo-theme-learn/exampleSite/static/images/showcase/inteliver_docs.png new file mode 100644 index 000000000..9d9bf3248 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/static/images/showcase/inteliver_docs.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/static/images/showcase/tat.png b/website/themes/hugo-theme-learn/exampleSite/static/images/showcase/tat.png new file mode 100644 index 000000000..35a5e6323 Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/static/images/showcase/tat.png differ diff --git a/website/themes/hugo-theme-learn/exampleSite/static/images/showcase/tshark_dev.png b/website/themes/hugo-theme-learn/exampleSite/static/images/showcase/tshark_dev.png new file mode 100644 index 000000000..08f81f97f Binary files /dev/null and b/website/themes/hugo-theme-learn/exampleSite/static/images/showcase/tshark_dev.png differ diff --git a/website/themes/hugo-theme-learn/i18n/ar.toml b/website/themes/hugo-theme-learn/i18n/ar.toml new file mode 100644 index 000000000..66e90e148 --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/ar.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "...البحث" + +[Clear-History] +other = "مسح السجل" + +[Attachments-label] +other = "مرفقات" + +[title-404] +other = "خطأ" + +[message-404] +other = ".¯\\_(ツ)_/¯أوبس. يبدو أن هذه الصفحة غير موجودة" + +[Go-to-homepage] +other = "الذهاب إلى الصفحة الرئيسية" + +[Edit-this-page] +other = "تعديل هذه الصفحة" + +[Shortcuts-Title] +other = "المزيد" + +[Expand-title] +other = "...قم بتوسيع" \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/i18n/de.toml b/website/themes/hugo-theme-learn/i18n/de.toml new file mode 100644 index 000000000..55ced7a59 --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/de.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "Suchen..." + +[Clear-History] +other = "Verlauf löschen" + +[Attachments-label] +other = "Anhänge" + +[title-404] +other = "Fehler" + +[message-404] +other = "Huch. Diese Seite scheint nicht zu existieren ¯\\_(ツ)_/¯." + +[Go-to-homepage] +other = "Gehe zur Homepage" + +[Edit-this-page] +other = "Bearbeite diese Seite" + +[Shortcuts-Title] +other = "Mehr" + +[Expand-title] +other = "Erweitere mich..." \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/i18n/en.toml b/website/themes/hugo-theme-learn/i18n/en.toml new file mode 100644 index 000000000..118345fae --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/en.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "Search..." + +[Clear-History] +other = "Clear History" + +[Attachments-label] +other = "Attachments" + +[title-404] +other = "Error" + +[message-404] +other = "Woops. Looks like this page doesn't exist ¯\\_(ツ)_/¯." + +[Go-to-homepage] +other = "Go to homepage" + +[Edit-this-page] +other = "Edit this page" + +[Shortcuts-Title] +other = "More" + +[Expand-title] +other = "Expand me..." \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/i18n/es.toml b/website/themes/hugo-theme-learn/i18n/es.toml new file mode 100644 index 000000000..57b7a332e --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/es.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "Buscar..." + +[Clear-History] +other = "Borrar Historial" + +[Attachments-label] +other = "Adjuntos" + +[title-404] +other = "Error" + +[message-404] +other = "Ups. Parece que la página no existe ¯\\_(ツ)_/¯." + +[Go-to-homepage] +other = "Ir al inicio" + +[Edit-this-page] +other = "Editar esta página" + +[Shortcuts-Title] +other = "Más" + +[Expand-title] +other = "Expandir..." diff --git a/website/themes/hugo-theme-learn/i18n/fr.toml b/website/themes/hugo-theme-learn/i18n/fr.toml new file mode 100644 index 000000000..106f20d5b --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/fr.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "Rechercher..." + +[Clear-History] +other = "Supprimer l'historique" + +[Attachments-label] +other = "Pièces jointes" + +[title-404] +other = "Erreur" + +[message-404] +other = "Oups. On dirait que cette page n'existe pas ¯\\_(ツ)_/¯" + +[Go-to-homepage] +other = "Vers la page d'accueil" + +[Edit-this-page] +other = "Modifier la page" + +[Shortcuts-Title] +other = "Aller plus loin" + +[Expand-title] +other = "Déroulez-moi..." \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/i18n/hi.toml b/website/themes/hugo-theme-learn/i18n/hi.toml new file mode 100644 index 000000000..b0f251572 --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/hi.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "खोजे..." + +[Clear-History] +other = "इतिहास मिटाएँ" + +[Attachments-label] +other = "संलग्नंक (अटैचमेंट)" + +[title-404] +other = "त्रुटि" + +[message-404] +other = "यह पृष्ठ अभि अनुपलब्ध है!" + +[Go-to-homepage] +other = "मुख्य पृष्ठ पर जाऐ" + +[Edit-this-page] +other = "यह पृष्ठ संपादित करें" + +[Shortcuts-Title] +other = "अधिक सामग्री दिखाएं" + +[Expand-title] +other = "विस्तार करे..." diff --git a/website/themes/hugo-theme-learn/i18n/id.toml b/website/themes/hugo-theme-learn/i18n/id.toml new file mode 100644 index 000000000..e0aa5ae79 --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/id.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "Telusuri..." + +[Clear-History] +other = "Bersihkan Riwayat" + +[Attachments-label] +other = "Lampiran" + +[title-404] +other = "Kesalahan" + +[message-404] +other = "Oops. Sepertinya halaman ini tidak ada ¯\\_(ツ)_/¯." + +[Go-to-homepage] +other = "Ke halaman depan" + +[Edit-this-page] +other = "Edit halaman ini" + +[Shortcuts-Title] +other = "Lainnya" + +[Expand-title] +other = "Bentangkan..." diff --git a/website/themes/hugo-theme-learn/i18n/ja.toml b/website/themes/hugo-theme-learn/i18n/ja.toml new file mode 100644 index 000000000..e7510c307 --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/ja.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "検索..." + +[Clear-History] +other = "履歴削除" + +[Attachments-label] +other = "添付" + +[title-404] +other = "エラー" + +[message-404] +other = "おっと。ページが見当たりません。 ¯\\_(ツ)_/¯." + +[Go-to-homepage] +other = "ホームページへ行く" + +[Edit-this-page] +other = "このページを編集" + +[Shortcuts-Title] +other = "更に" + +[Expand-title] +other = "開く..." diff --git a/website/themes/hugo-theme-learn/i18n/nl.toml b/website/themes/hugo-theme-learn/i18n/nl.toml new file mode 100644 index 000000000..cca84b411 --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/nl.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "Zoeken..." + +[Clear-History] +other = "Wis geschiedenis" + +[Attachments-label] +other = "Bijlagen" + +[title-404] +other = "Error" + +[message-404] +other = "Blijkbaar bestaat deze pagina niet ¯\\_(ツ)_/¯." + +[Go-to-homepage] +other = "Naar startpagina" + +[Edit-this-page] +other = "Deze pagina bewerken" + +[Shortcuts-Title] +other = "Snelkoppelingen" + +[Expand-title] +other = "Lees meer..." diff --git a/website/themes/hugo-theme-learn/i18n/pt.toml b/website/themes/hugo-theme-learn/i18n/pt.toml new file mode 100644 index 000000000..b110533ed --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/pt.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "Procurar..." + +[Clear-History] +other = "Limpar Histórico" + +[Attachments-label] +other = "Anexos" + +[title-404] +other = "Erro" + +[message-404] +other = "Ops. Parece que a página não existe ¯\\_(ツ)_/¯." + +[Go-to-homepage] +other = "Ir para o início" + +[Edit-this-page] +other = "Editar esta página" + +[Shortcuts-Title] +other = "Mais" + +[Expand-title] +other = "Expandir..." diff --git a/website/themes/hugo-theme-learn/i18n/ru.toml b/website/themes/hugo-theme-learn/i18n/ru.toml new file mode 100644 index 000000000..36ad07940 --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/ru.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "Поиск..." + +[Clear-History] +other = "Очистить историю" + +[Attachments-label] +other = "Присоединенные файлы" + +[title-404] +other = "Ошибка" + +[message-404] +other = "Упс. Выглядит будто такой страницы нет ¯\\_(ツ)_/¯." + +[Go-to-homepage] +other = "Перейти на главную" + +[Edit-this-page] +other = "Редактировать" + +[Shortcuts-Title] +other = "Еще" + +[Expand-title] +other = "Развернуть..." \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/i18n/tr.toml b/website/themes/hugo-theme-learn/i18n/tr.toml new file mode 100644 index 000000000..17249ede5 --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/tr.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "Ara..." + +[Clear-History] +other = "Geçmişi Temizle" + +[Attachments-label] +other = "Ekler" + +[title-404] +other = "Hata" + +[message-404] +other = "Uups. Görünüşe göre böyle bir sayfa yok ¯\\_(ツ)_/¯" + +[Go-to-homepage] +other = "Anasayfaya dön" + +[Edit-this-page] +other = "Sayfayı düzenle" + +[Shortcuts-Title] +other = "Dahası Var" + +[Expand-title] +other = "Genişlet..." diff --git a/website/themes/hugo-theme-learn/i18n/zh-cn.toml b/website/themes/hugo-theme-learn/i18n/zh-cn.toml new file mode 100644 index 000000000..e887d3e63 --- /dev/null +++ b/website/themes/hugo-theme-learn/i18n/zh-cn.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "搜索..." + +[Clear-History] +other = "清理历史记录" + +[Attachments-label] +other = "附件" + +[title-404] +other = "错误" + +[message-404] +other = "哎哟。 看起来这个页面不存在 ¯\\_(ツ)_/¯。" + +[Go-to-homepage] +other = "转到主页" + +[Edit-this-page] +other = "编辑当前页" + +[Shortcuts-Title] +other = "更多" + +[Expand-title] +other = "展开" diff --git a/website/themes/hugo-theme-learn/images/screenshot.png b/website/themes/hugo-theme-learn/images/screenshot.png new file mode 100644 index 000000000..85966a2c0 Binary files /dev/null and b/website/themes/hugo-theme-learn/images/screenshot.png differ diff --git a/website/themes/hugo-theme-learn/images/tn.png b/website/themes/hugo-theme-learn/images/tn.png new file mode 100644 index 000000000..b1d64bdbc Binary files /dev/null and b/website/themes/hugo-theme-learn/images/tn.png differ diff --git a/website/themes/hugo-theme-learn/layouts/404.html b/website/themes/hugo-theme-learn/layouts/404.html new file mode 100644 index 000000000..a5bb8fce0 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/404.html @@ -0,0 +1,56 @@ + + + + + {{ partial "meta.html" . }} {{ partial "favicon.html" . }} {{ .Scratch.Add "title" "" }}{{ if eq .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}} + {{ .Scratch.Get "title" }} + + {{ $assetBusting := not .Site.Params.disableAssetsBusting }} + + + + + + + + {{with .Site.Params.themeVariant}} + + {{end}} + +{{ partial "custom-header.html" . }} + + + + +
    +
    +
    +
    +

    {{T "title-404"}}

    +

    +

    +

    {{T "message-404"}}

    +

    +

    {{T "Go-to-homepage"}}

    +

    Page not found!

    +
    +
    + +
    + + + diff --git a/website/themes/hugo-theme-learn/layouts/_default/list.html b/website/themes/hugo-theme-learn/layouts/_default/list.html new file mode 100644 index 000000000..b56e8d48f --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/_default/list.html @@ -0,0 +1,22 @@ +{{ partial "header.html" . }} + +{{ if eq .Kind "section" }} + {{ .Content }} +{{end}} + +{{ if or (eq .Kind "taxonomy") (eq .Kind "taxonomyTerm") }} + +{{end}} + +
    + {{with .Params.LastModifierDisplayName}} + {{ . }} {{with $.Date}} {{ .Format "02/01/2006" }}{{end}} + + {{end}} +
    + +{{ partial "footer.html" . }} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/layouts/_default/single.html b/website/themes/hugo-theme-learn/layouts/_default/single.html new file mode 100644 index 000000000..d3d9f2536 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/_default/single.html @@ -0,0 +1,12 @@ +{{ partial "header.html" . }} + +{{ .Content }} + +
    + {{with .Params.LastModifierDisplayName}} + {{ . }} {{with $.Date}} {{ .Format "02/01/2006" }}{{end}} + + {{end}} +
    + +{{ partial "footer.html" . }} diff --git a/website/themes/hugo-theme-learn/layouts/index.html b/website/themes/hugo-theme-learn/layouts/index.html new file mode 100644 index 000000000..cdf25d915 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/index.html @@ -0,0 +1,31 @@ +{{ partial "header.html" . }} + + navigation + + +{{if .Site.Home.Content }} +{{.Site.Home.Content}} +{{else}} + {{if eq .Site.Language.Lang "fr"}} +

    Personaliser la page d'accueil

    +

    + Le site fonctionne. Ne pas oublier de personaliser cette page avec votre propre contenu. 3 manières de faire : +

    +
      +
    • 1. Créer un fichier _index.md dans le dossier content et le remplir de Markdown
    • +
    • 2. Créer un fichier index.html dans le dossier static et le remplir de code HTML
    • +
    • 3. Configurer le serveur http pour rediriger automatiquement la homepage vers la page de votre choix dans le site
    • +
    + {{else}} +

    Customize your own home page

    +

    + The site is working. Don't forget to customize this homepage with your own. You typically have 3 choices : +

    +
      +
    • 1. Create an _index.md document in content folder and fill it with Markdown content
    • +
    • 2. Create an index.html file in the static folder and fill the file with HTML content
    • +
    • 3. Configure your server to automatically redirect home page to one your documentation page
    • +
    + {{end}} +{{ end }} +{{ partial "footer.html" . }} diff --git a/website/themes/hugo-theme-learn/layouts/index.json b/website/themes/hugo-theme-learn/layouts/index.json new file mode 100644 index 000000000..367f3b318 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/index.json @@ -0,0 +1,12 @@ +[{{ range $index, $page := .Site.Pages }} +{{- if ne $page.Type "json" -}} +{{- if and $index (gt $index 0) -}},{{- end }} +{ + "uri": "{{ $page.Permalink }}", + "title": "{{ htmlEscape $page.Title}}", + "tags": [{{ range $tindex, $tag := $page.Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}], + "description": "{{ htmlEscape .Description}}", + "content": {{$page.Plain | jsonify}} +} +{{- end -}} +{{- end -}}] \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/layouts/partials/custom-comments.html b/website/themes/hugo-theme-learn/layouts/partials/custom-comments.html new file mode 100644 index 000000000..6f5a034d1 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/custom-comments.html @@ -0,0 +1,3 @@ + diff --git a/website/themes/hugo-theme-learn/layouts/partials/custom-footer.html b/website/themes/hugo-theme-learn/layouts/partials/custom-footer.html new file mode 100644 index 000000000..9bb0f4850 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/custom-footer.html @@ -0,0 +1,5 @@ + diff --git a/website/themes/hugo-theme-learn/layouts/partials/custom-header.html b/website/themes/hugo-theme-learn/layouts/partials/custom-header.html new file mode 100644 index 000000000..294af2914 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/custom-header.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/layouts/partials/favicon.html b/website/themes/hugo-theme-learn/layouts/partials/favicon.html new file mode 100644 index 000000000..1a45be0fc --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/favicon.html @@ -0,0 +1 @@ + diff --git a/website/themes/hugo-theme-learn/layouts/partials/footer.html b/website/themes/hugo-theme-learn/layouts/partials/footer.html new file mode 100644 index 000000000..0ae30f7ce --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/footer.html @@ -0,0 +1,77 @@ + {{ if .Params.chapter }} + + {{ end }} + + {{ partial "custom-comments.html" . }} + + + + + + +
    +
    +
    + + + + + + + + + + + + + + + {{ partial "custom-footer.html" . }} + + diff --git a/website/themes/hugo-theme-learn/layouts/partials/header.html b/website/themes/hugo-theme-learn/layouts/partials/header.html new file mode 100644 index 000000000..114f3620e --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/header.html @@ -0,0 +1,111 @@ + + + + + + {{ hugo.Generator }} + {{ partial "meta.html" . }} + {{ partial "favicon.html" . }} + {{ .Title }} :: {{ .Site.Title }} + + {{ $assetBusting := not .Site.Params.disableAssetsBusting }} + + + + + + + + + + {{with .Site.Params.themeVariant}} + + {{end}} + {{ range .Site.Params.custom_css -}} + + {{- end }} + + + + + {{ partial "custom-header.html" . }} + + + {{ partial "menu.html" . }} +
    +
    +
    + {{if not .IsHome}} +
    +
    + {{ if and (or .IsPage .IsSection) .Site.Params.editURL }} + {{ $File := .File }} + {{ $Site := .Site }} + {{with $File.Path }} + + {{ end }} + {{ end }} + {{$toc := (and (not .Params.disableToc) (not .Params.chapter))}} + + {{ if $toc }} + {{ partial "toc.html" . }} + {{ end }} +
    +
    + {{ end }} +
    + {{ partial "tags.html" . }} +
    + {{ if .Params.chapter }} +
    + {{ end }} +
    + {{if and (not .IsHome) (not .Params.chapter) }} +

    + {{ if eq .Kind "taxonomy" }} + {{.Kind}} :: + {{ end }} + {{.Title}} +

    + {{end}} + + {{define "breadcrumb"}} + {{$parent := .page.Parent }} + {{ if $parent }} + {{ $value := (printf "%s > %s" $parent.RelPermalink $parent.Title .value) }} + {{ template "breadcrumb" dict "page" $parent "value" $value }} + {{else}} + {{.value|safeHTML}} + {{end}} + {{end}} diff --git a/website/themes/hugo-theme-learn/layouts/partials/logo.html b/website/themes/hugo-theme-learn/layouts/partials/logo.html new file mode 100644 index 000000000..ef5c45cb5 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/logo.html @@ -0,0 +1,19 @@ + diff --git a/website/themes/hugo-theme-learn/layouts/partials/menu-footer.html b/website/themes/hugo-theme-learn/layouts/partials/menu-footer.html new file mode 100644 index 000000000..4fdf046b6 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/menu-footer.html @@ -0,0 +1 @@ +

    Built with from Grav and Hugo

    diff --git a/website/themes/hugo-theme-learn/layouts/partials/menu.html b/website/themes/hugo-theme-learn/layouts/partials/menu.html new file mode 100644 index 000000000..0f9c8f8a5 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/menu.html @@ -0,0 +1,151 @@ + + + +{{ define "section-tree-nav" }} +{{ $showvisitedlinks := .showvisitedlinks }} +{{ $currentNode := .currentnode }} +{{ $currentFileUniqueID := "" }} +{{ with $currentNode.File }}{{ $currentFileUniqueID = .UniqueID }}{{ end }} + {{with .sect}} + {{if and .IsSection ((not .Params.hidden) or $.showhidden)}} + {{safeHTML .Params.head}} +
  • + + {{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}} + {{ if $showvisitedlinks}} + + {{ end }} + + {{ $numberOfPages := (add (len .Pages) (len .Sections)) }} + {{ if ne $numberOfPages 0 }} +
      + {{ $currentNode.Scratch.Set "pages" .Pages }} + {{ if .Sections}} + {{ $currentNode.Scratch.Set "pages" (.Pages | union .Sections) }} + {{end}} + {{ $pages := ($currentNode.Scratch.Get "pages") }} + + {{if eq .Site.Params.ordersectionsby "title"}} + {{ range $pages.ByTitle }} + {{ if and .Params.hidden (not $.showhidden) }} + {{else}} + {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }} + {{end}} + {{ end }} + {{else}} + {{ range $pages.ByWeight }} + {{ if and .Params.hidden (not $.showhidden) }} + {{else}} + {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }} + {{end}} + {{ end }} + {{end}} +
    + {{ end }} +
  • + {{else}} + {{ if not .Params.Hidden }} +
  • + + {{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}} + {{ if $showvisitedlinks}}{{end}} + +
  • + {{ end }} + {{end}} + {{ end }} +{{ end }} diff --git a/website/themes/hugo-theme-learn/layouts/partials/meta.html b/website/themes/hugo-theme-learn/layouts/partials/meta.html new file mode 100644 index 000000000..71d9634ef --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/meta.html @@ -0,0 +1,2 @@ + +{{ with .Site.Params.author }}{{ end }} diff --git a/website/themes/hugo-theme-learn/layouts/partials/search.html b/website/themes/hugo-theme-learn/layouts/partials/search.html new file mode 100644 index 000000000..41daf84b9 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/search.html @@ -0,0 +1,16 @@ + +{{ $assetBusting := not .Site.Params.disableAssetsBusting }} + + + + diff --git a/website/themes/hugo-theme-learn/layouts/partials/tags.html b/website/themes/hugo-theme-learn/layouts/partials/tags.html new file mode 100644 index 000000000..48790d87c --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/tags.html @@ -0,0 +1,7 @@ +{{ if .Params.tags }} +
    +{{range .Params.tags}} + {{ . }} +{{end}} +
    +{{end}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/layouts/partials/toc.html b/website/themes/hugo-theme-learn/layouts/partials/toc.html new file mode 100644 index 000000000..6b69051f9 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/partials/toc.html @@ -0,0 +1,5 @@ +
    +
    +{{ .TableOfContents }} +
    +
    diff --git a/website/themes/hugo-theme-learn/layouts/shortcodes/attachments.html b/website/themes/hugo-theme-learn/layouts/shortcodes/attachments.html new file mode 100644 index 000000000..c926c0f14 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/shortcodes/attachments.html @@ -0,0 +1,36 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +
    + + {{if eq .Page.File.BaseFileName "index"}} + {{$.Scratch.Add "filesName" "files"}} + {{else}} + {{$.Scratch.Add "filesName" (printf "%s.files" .Page.File.BaseFileName)}} + {{end}} +
    + {{ range (readDir (printf "./content/%s%s" .Page.File.Dir ($.Scratch.Get "filesName")) ) }} + {{ $fileDir := replace $.Page.File.Dir "\\" "/" }} + {{if ($.Get "pattern")}} + {{if (findRE ($.Get "pattern") .Name)}} +
  • + + {{.Name}} + + ({{div .Size 1024 }} ko) +
  • + {{end}} + {{else}} +
  • + + {{.Name}} + + ({{div .Size 1024 }} ko) +
  • + {{end}} + {{end}} +
    + {{.Inner}} +
    + diff --git a/website/themes/hugo-theme-learn/layouts/shortcodes/button.html b/website/themes/hugo-theme-learn/layouts/shortcodes/button.html new file mode 100644 index 000000000..7cfc38948 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/shortcodes/button.html @@ -0,0 +1,14 @@ +{{ $_hugo_config := `{ "version": 1 }` }} + + {{ $icon := .Get "icon" }} + {{ $iconposition := .Get "icon-position" }} + {{ if ($icon) }} + {{ if or (not ($iconposition)) (eq $iconposition "left") }} + + {{ end }} + {{ end }} + {{ .Inner }} + {{ if and ($icon) (eq $iconposition "right")}} + + {{ end }} + diff --git a/website/themes/hugo-theme-learn/layouts/shortcodes/children.html b/website/themes/hugo-theme-learn/layouts/shortcodes/children.html new file mode 100644 index 000000000..6432791be --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/shortcodes/children.html @@ -0,0 +1,101 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +{{ $showhidden := .Get "showhidden"}} +{{ $style := .Get "style" | default "li" }} +{{ $depth := .Get "depth" | default 1 }} +{{ $withDescription := .Get "description" | default false }} +{{ $sortTerm := .Get "sort" | default "Weight" }} + +
      + {{ .Scratch.Set "pages" .Page.Pages }} + + {{if .Page.IsHome}} + + {{ $rootPage := where .Page.Pages "Dir" "" }} + {{ .Scratch.Set "pages" (.Page.Sections | union $rootPage)}} + {{else}} + {{ if .Page.Sections}} + {{ .Scratch.Set "pages" (.Page.Pages | union .Page.Sections) }} + {{end}} + {{end}} + + {{ $pages := (.Scratch.Get "pages") }} + + {{if eq $sortTerm "Weight"}} + {{template "childs" dict "menu" $pages.ByWeight "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} + {{else if eq $sortTerm "Name"}} + {{template "childs" dict "menu" $pages.ByTitle "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} + {{else if eq $sortTerm "PublishDate"}} + {{template "childs" dict "menu" $pages.ByPublishDate "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} + {{else if eq $sortTerm "Date"}} + {{template "childs" dict "menu" $pages.ByDate "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} + {{else if eq $sortTerm "Length"}} + {{template "childs" dict "menu" $pages.ByLength "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} + {{else}} + {{template "childs" dict "menu" $pages "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} + {{end}} +
    + +{{.Inner|safeHTML}} + +{{ define "childs" }} + {{ range .menu }} + {{ if and .Params.hidden (not $.showhidden) }} + {{else}} + {{if not .IsHome}} + {{if hasPrefix $.style "h"}} + {{$num := sub ( int (trim $.style "h") ) 1 }} + {{$numn := add $num $.count }} + +{{(printf "" $numn)|safeHTML}} +{{ .Title }} +{{(printf "" $numn)|safeHTML}} + + {{else}} +{{(printf "<%s>" $.style)|safeHTML}} +{{ .Title }} +{{(printf "" $.style)|safeHTML}} + {{end}} + + {{if $.description}} + {{if .Description}} +

    {{.Description}}

    + {{else}} +

    {{.Summary}}

    + {{end}} + {{end}} + {{end}} + {{ if lt $.count $.depth}} + + {{if eq $.style "li"}} +
      + {{end}} + + {{ if .Sections}} + {{ .Scratch.Set "pages" (.Pages | union .Sections) }} + {{else}} + {{ .Scratch.Set "pages" .Pages }} + {{end}} + + {{ $pages := (.Scratch.Get "pages") }} + + {{if eq $.sortTerm "Weight"}} + {{template "childs" dict "menu" $pages.ByWeight "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} + {{else if eq $.sortTerm "Name"}} + {{template "childs" dict "menu" $pages.ByTitle "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} + {{else if eq $.sortTerm "PublishDate"}} + {{template "childs" dict "menu" $pages.ByPublishDate "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} + {{else if eq $.sortTerm "Date"}} + {{template "childs" dict "menu" $pages.ByDate "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} + {{else if eq $.sortTerm "Length"}} + {{template "childs" dict "menu" $pages.ByLength "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} + {{else}} + {{template "childs" dict "menu" $pages "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} + {{end}} + + {{if eq $.style "li"}} +
    + {{end}} + {{end}} + {{end}} + {{end}} +{{end}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/layouts/shortcodes/expand.html b/website/themes/hugo-theme-learn/layouts/shortcodes/expand.html new file mode 100644 index 000000000..0e7ddb186 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/shortcodes/expand.html @@ -0,0 +1,17 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +
    +
    + + + {{$expandMessage := T "Expand-title"}} + {{ if .IsNamedParams }} + {{.Get "default" | default $expandMessage}} + {{else}} + {{.Get 0 | default $expandMessage}} + {{end}} + +
    + +
    \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/layouts/shortcodes/mermaid.html b/website/themes/hugo-theme-learn/layouts/shortcodes/mermaid.html new file mode 100644 index 000000000..287bc380c --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/shortcodes/mermaid.html @@ -0,0 +1,2 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +
    {{ safeHTML .Inner }}
    diff --git a/website/themes/hugo-theme-learn/layouts/shortcodes/notice.html b/website/themes/hugo-theme-learn/layouts/shortcodes/notice.html new file mode 100644 index 000000000..0e3324719 --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/shortcodes/notice.html @@ -0,0 +1,2 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +
    {{ .Inner }}
    diff --git a/website/themes/hugo-theme-learn/layouts/shortcodes/ref.html b/website/themes/hugo-theme-learn/layouts/shortcodes/ref.html new file mode 100644 index 000000000..7b7eb426b --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/shortcodes/ref.html @@ -0,0 +1,14 @@ +{{- if in (.Get 0) "/_index.md" -}} + {{- $paths := (split (.Get 0) "_index.md") -}} + {{- $pagepath := index $paths 0 -}} + {{- $anchor := index $paths 1 -}} + {{- with .Site.GetPage "section" (trim $pagepath "/") -}} + {{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}} + {{- end -}} +{{- else -}} + {{- with .Site.GetPage "section" (.Get 0) }} + {{- .RelPermalink -}} + {{- else -}} + {{- .Get 0 | relref .Page -}} + {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/layouts/shortcodes/relref.html b/website/themes/hugo-theme-learn/layouts/shortcodes/relref.html new file mode 100644 index 000000000..7b7eb426b --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/shortcodes/relref.html @@ -0,0 +1,14 @@ +{{- if in (.Get 0) "/_index.md" -}} + {{- $paths := (split (.Get 0) "_index.md") -}} + {{- $pagepath := index $paths 0 -}} + {{- $anchor := index $paths 1 -}} + {{- with .Site.GetPage "section" (trim $pagepath "/") -}} + {{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}} + {{- end -}} +{{- else -}} + {{- with .Site.GetPage "section" (.Get 0) }} + {{- .RelPermalink -}} + {{- else -}} + {{- .Get 0 | relref .Page -}} + {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/layouts/shortcodes/siteparam.html b/website/themes/hugo-theme-learn/layouts/shortcodes/siteparam.html new file mode 100644 index 000000000..20cd2ca3b --- /dev/null +++ b/website/themes/hugo-theme-learn/layouts/shortcodes/siteparam.html @@ -0,0 +1,7 @@ +{{- $paramName := (.Get 0) -}} +{{- $siteParams := .Site.Params -}} +{{- with $paramName -}} + {{- with $siteParams -}} + {{- index . (lower $paramName) -}} + {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/netlify.toml b/website/themes/hugo-theme-learn/netlify.toml new file mode 100644 index 000000000..3b536c873 --- /dev/null +++ b/website/themes/hugo-theme-learn/netlify.toml @@ -0,0 +1,23 @@ +[build] + publish = "exampleSite/public" + command = "hugo -s exampleSite" + +[build.environment] + HUGO_THEME = "repo" + HUGO_THEMESDIR = "/opt/build" + HUGO_VERSION = "0.66.0" + +[context.production.environment] + HUGO_BASEURL = "https://learn.netlify.com/" + +[context.deploy-preview] + command = "hugo -s exampleSite -b $DEPLOY_PRIME_URL" + +[context.deploy-preview.environment] + HUGO_ENABLEGITINFO = "true" + +[context.branch-deplpy] + command = "hugo -s exampleSite -b $DEPLOY_PRIME_URL" + +[context.branch-deploy.environment] + HUGO_ENABLEGITINFO = "true" diff --git a/website/themes/hugo-theme-learn/static/css/atom-one-dark-reasonable.css b/website/themes/hugo-theme-learn/static/css/atom-one-dark-reasonable.css new file mode 100644 index 000000000..fd41c996a --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/atom-one-dark-reasonable.css @@ -0,0 +1,77 @@ +/* + +Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage + +Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax + +*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + line-height: 1.3em; + color: #abb2bf; + background: #282c34; + border-radius: 5px; +} +.hljs-keyword, .hljs-operator { + color: #F92672; +} +.hljs-pattern-match { + color: #F92672; +} +.hljs-pattern-match .hljs-constructor { + color: #61aeee; +} +.hljs-function { + color: #61aeee; +} +.hljs-function .hljs-params { + color: #A6E22E; +} +.hljs-function .hljs-params .hljs-typing { + color: #FD971F; +} +.hljs-module-access .hljs-module { + color: #7e57c2; +} +.hljs-constructor { + color: #e2b93d; +} +.hljs-constructor .hljs-string { + color: #9CCC65; +} +.hljs-comment, .hljs-quote { + color: #b18eb1; + font-style: italic; +} +.hljs-doctag, .hljs-formula { + color: #c678dd; +} +.hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst { + color: #e06c75; +} +.hljs-literal { + color: #56b6c2; +} +.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta-string { + color: #98c379; +} +.hljs-built_in, .hljs-class .hljs-title { + color: #e6c07b; +} +.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number { + color: #d19a66; +} +.hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title { + color: #61aeee; +} +.hljs-emphasis { + font-style: italic; +} +.hljs-strong { + font-weight: bold; +} +.hljs-link { + text-decoration: underline; +} diff --git a/website/themes/hugo-theme-learn/static/css/auto-complete.css b/website/themes/hugo-theme-learn/static/css/auto-complete.css new file mode 100644 index 000000000..ac6979ad3 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/auto-complete.css @@ -0,0 +1,47 @@ +.autocomplete-suggestions { + text-align: left; + cursor: default; + border: 1px solid #ccc; + border-top: 0; + background: #fff; + box-shadow: -1px 1px 3px rgba(0,0,0,.1); + + /* core styles should not be changed */ + position: absolute; + display: none; + z-index: 9999; + max-height: 254px; + overflow: hidden; + overflow-y: auto; + box-sizing: border-box; + +} +.autocomplete-suggestion { + position: relative; + cursor: pointer; + padding: 7px; + line-height: 23px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: #333; +} + +.autocomplete-suggestion b { + font-weight: normal; + color: #1f8dd6; +} + +.autocomplete-suggestion.selected { + background: #333; + color: #fff; +} + +.autocomplete-suggestion:hover { + background: #444; + color: #fff; +} + +.autocomplete-suggestion > .context { + font-size: 12px; +} diff --git a/website/themes/hugo-theme-learn/static/css/featherlight.min.css b/website/themes/hugo-theme-learn/static/css/featherlight.min.css new file mode 100644 index 000000000..058487f91 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/featherlight.min.css @@ -0,0 +1,8 @@ +/** + * Featherlight - ultra slim jQuery lightbox + * Version 1.7.13 - http://noelboss.github.io/featherlight/ + * + * Copyright 2018, Noël Raoul Bossart (http://www.noelboss.com) + * MIT Licensed. +**/ +html.with-featherlight{overflow:hidden}.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:rgba(0,0,0,0)}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:'';display:inline-block;height:100%;vertical-align:middle}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:25px 25px 0;border-bottom:25px solid transparent;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight link.featherlight-inner,.featherlight script.featherlight-inner,.featherlight style.featherlight-inner{display:none}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font-family:Arial,sans-serif;background:#fff;background:rgba(255,255,255,.3);color:#000;border:0;padding:0}.featherlight .featherlight-close-icon::-moz-focus-inner{border:0;padding:0}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0;-webkit-overflow-scrolling:touch}.featherlight iframe{border:0}.featherlight *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:0;margin-right:0;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}}@media print{html.with-featherlight>*>:not(.featherlight){display:none}} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/css/fontawesome-all.min.css b/website/themes/hugo-theme-learn/static/css/fontawesome-all.min.css new file mode 100644 index 000000000..de5647372 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/fontawesome-all.min.css @@ -0,0 +1 @@ +.fa,.fab,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{transform:scaleY(-1)}.fa-flip-horizontal.fa-flip-vertical,.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"}.fa-flip-horizontal.fa-flip-vertical{transform:scale(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adobe:before{content:"\f778"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-balance-scale:before{content:"\f24e"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edit:before{content:"\f044"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-handshake:before{content:"\f2b5"}.fa-hanukiah:before{content:"\f6e6"}.fa-hashtag:before{content:"\f292"}.fa-hat-wizard:before{content:"\f6e8"}.fa-haykal:before{content:"\f666"}.fa-hdd:before{content:"\f0a0"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hot-tub:before{content:"\f593"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-icicles:before{content:"\f7ad"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-instagram:before{content:"\f16d"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-nintendo-switch:before{content:"\f418"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-carry:before{content:"\f4ce"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-volume:before{content:"\f2a0"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-tripadvisor:before{content:"\f262"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-water:before{content:"\f773"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:normal;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands"}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-weight:400}@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/css/hugo-theme.css b/website/themes/hugo-theme-learn/static/css/hugo-theme.css new file mode 100644 index 000000000..741cab196 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/hugo-theme.css @@ -0,0 +1,254 @@ +/* Insert here special css for hugo theme, on top of any other imported css */ + + +/* Table of contents */ + +.progress ul { + list-style: none; + margin: 0; + padding: 0 5px; +} + +#TableOfContents { + font-size: 13px !important; + max-height: 85vh; + overflow: auto; + padding: 15px !important; +} + + +#TableOfContents > ul > li > ul > li > ul li { + margin-right: 8px; +} + +#TableOfContents > ul > li > a { + font-weight: bold; padding: 0 18px; margin: 0 2px; +} + +#TableOfContents > ul > li > ul > li > a { + font-weight: bold; +} + +#TableOfContents > ul > li > ul > li > ul > li > ul > li > ul > li { + display: none; +} + +body { + font-size: 16px !important; + color: #323232 !important; +} + +#body a.highlight, #body a.highlight:hover, #body a.highlight:focus { + text-decoration: none; + outline: none; + outline: 0; +} +#body a.highlight { + line-height: 1.1; + display: inline-block; +} +#body a.highlight:after { + display: block; + content: ""; + height: 1px; + width: 0%; + background-color: #0082a7; /*#CE3B2F*/ + -webkit-transition: width 0.5s ease; + -moz-transition: width 0.5s ease; + -ms-transition: width 0.5s ease; + transition: width 0.5s ease; +} +#body a.highlight:hover:after, #body a.highlight:focus:after { + width: 100%; +} +.progress { + position:absolute; + background-color: rgba(246, 246, 246, 0.97); + width: auto; + border: thin solid #ECECEC; + display:none; + z-index:200; +} + +#toc-menu { + border-right: thin solid #DAD8D8 !important; + padding-right: 1rem !important; + margin-right: 0.5rem !important; +} + +#sidebar-toggle-span { + border-right: thin solid #DAD8D8 !important; + padding-right: 0.5rem !important; + margin-right: 1rem !important; +} + +.btn { + display: inline-block !important; + padding: 6px 12px !important; + margin-bottom: 0 !important; + font-size: 14px !important; + font-weight: normal !important; + line-height: 1.42857143 !important; + text-align: center !important; + white-space: nowrap !important; + vertical-align: middle !important; + -ms-touch-action: manipulation !important; + touch-action: manipulation !important; + cursor: pointer !important; + -webkit-user-select: none !important; + -moz-user-select: none !important; + -ms-user-select: none !important; + user-select: none !important; + background-image: none !important; + border: 1px solid transparent !important; + border-radius: 4px !important; + -webkit-transition: all 0.15s !important; + -moz-transition: all 0.15s !important; + transition: all 0.15s !important; +} +.btn:focus { + /*outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px;*/ + outline: none !important; +} +.btn:hover, +.btn:focus { + color: #2b2b2b !important; + text-decoration: none !important; +} + +.btn-default { + color: #333 !important; + background-color: #fff !important; + border-color: #ccc !important; +} +.btn-default:hover, +.btn-default:focus, +.btn-default:active { + color: #fff !important; + background-color: #9e9e9e !important; + border-color: #9e9e9e !important; +} +.btn-default:active { + background-image: none !important; +} + +/* anchors */ +.anchor { + color: #00bdf3; + font-size: 0.5em; + cursor:pointer; + visibility:hidden; + margin-left: 0.5em; + position: absolute; + margin-top:0.1em; +} + +h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, h5:hover .anchor, h6:hover .anchor { + visibility:visible; +} + +/* Redfines headers style */ + +h2, h3, h4, h5, h6 { + font-weight: 400; + line-height: 1.1; +} + +h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { + font-weight: inherit; +} + +h2 { + font-size: 2.5rem; + line-height: 110% !important; + margin: 2.5rem 0 1.5rem 0; +} + +h3 { + font-size: 2rem; + line-height: 110% !important; + margin: 2rem 0 1rem 0; +} + +h4 { + font-size: 1.5rem; + line-height: 110% !important; + margin: 1.5rem 0 0.75rem 0; +} + +h5 { + font-size: 1rem; + line-height: 110% !important; + margin: 1rem 0 0.2rem 0; +} + +h6 { + font-size: 0.5rem; + line-height: 110% !important; + margin: 0.5rem 0 0.2rem 0; +} + +p { + margin: 1rem 0; +} + +figcaption h4 { + font-weight: 300 !important; + opacity: .85; + font-size: 1em; + text-align: center; + margin-top: -1.5em; +} + +.select-style { + border: 0; + width: 150px; + border-radius: 0px; + overflow: hidden; + display: inline-flex; +} + +.select-style svg { + fill: #ccc; + width: 14px; + height: 14px; + pointer-events: none; + margin: auto; +} + +.select-style svg:hover { + fill: #e6e6e6; +} + +.select-style select { + padding: 0; + width: 130%; + border: none; + box-shadow: none; + background: transparent; + background-image: none; + -webkit-appearance: none; + margin: auto; + margin-left: 0px; + margin-right: -20px; +} + +.select-style select:focus { + outline: none; +} + +.select-style :hover { + cursor: pointer; +} + +@media only all and (max-width: 47.938em) { + #breadcrumbs .links, #top-github-link-text { + display: none; + } +} + +.is-sticky #top-bar { + box-shadow: -1px 2px 5px 1px rgba(0, 0, 0, 0.1); +} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/css/hybrid.css b/website/themes/hugo-theme-learn/static/css/hybrid.css new file mode 100644 index 000000000..29735a189 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/hybrid.css @@ -0,0 +1,102 @@ +/* + +vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) + +*/ + +/*background color*/ +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #1d1f21; +} + +/*selection color*/ +.hljs::selection, +.hljs span::selection { + background: #373b41; +} + +.hljs::-moz-selection, +.hljs span::-moz-selection { + background: #373b41; +} + +/*foreground color*/ +.hljs { + color: #c5c8c6; +} + +/*color: fg_yellow*/ +.hljs-title, +.hljs-name { + color: #f0c674; +} + +/*color: fg_comment*/ +.hljs-comment, +.hljs-meta, +.hljs-meta .hljs-keyword { + color: #707880; +} + +/*color: fg_red*/ +.hljs-number, +.hljs-symbol, +.hljs-literal, +.hljs-deletion, +.hljs-link { + color: #cc6666 +} + +/*color: fg_green*/ +.hljs-string, +.hljs-doctag, +.hljs-addition, +.hljs-regexp, +.hljs-selector-attr, +.hljs-selector-pseudo { + color: #b5bd68; +} + +/*color: fg_purple*/ +.hljs-attribute, +.hljs-code, +.hljs-selector-id { + color: #b294bb; +} + +/*color: fg_blue*/ +.hljs-keyword, +.hljs-selector-tag, +.hljs-bullet, +.hljs-tag { + color: #81a2be; +} + +/*color: fg_aqua*/ +.hljs-subst, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #8abeb7; +} + +/*color: fg_orange*/ +.hljs-type, +.hljs-built_in, +.hljs-builtin-name, +.hljs-quote, +.hljs-section, +.hljs-selector-class { + color: #de935f; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} diff --git a/website/themes/hugo-theme-learn/static/css/nucleus.css b/website/themes/hugo-theme-learn/static/css/nucleus.css new file mode 100644 index 000000000..1897fc5d6 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/nucleus.css @@ -0,0 +1,615 @@ +*, *::before, *::after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } + +@-webkit-viewport { + width: device-width; } +@-moz-viewport { + width: device-width; } +@-ms-viewport { + width: device-width; } +@-o-viewport { + width: device-width; } +@viewport { + width: device-width; } +html { + font-size: 100%; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; } + +body { + margin: 0; } + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; } + +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; } + +audio:not([controls]) { + display: none; + height: 0; } + +[hidden], +template { + display: none; } + +a { + background: transparent; + text-decoration: none; } + +a:active, +a:hover { + outline: 0; } + +abbr[title] { + border-bottom: 1px dotted; } + +b, +strong { + font-weight: bold; } + +dfn { + font-style: italic; } + +mark { + background: #FFFF27; + color: #333; } + +sub, +sup { + font-size: 0.8rem; + line-height: 0; + position: relative; + vertical-align: baseline; } + +sup { + top: -0.5em; } + +sub { + bottom: -0.25em; } + +img { + border: 0; + max-width: 100%; } + +svg:not(:root) { + overflow: hidden; } + +figure { + margin: 1em 40px; } + +hr { + height: 0; } + +pre { + overflow: auto; } + +button, +input, +optgroup, +select, +textarea { + color: inherit; + font: inherit; + margin: 0; } + +button { + overflow: visible; } + +button, +select { + text-transform: none; } + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; } + +button[disabled], +html input[disabled] { + cursor: default; } + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; } + +input { + line-height: normal; } + +input[type="checkbox"], +input[type="radio"] { + padding: 0; } + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; } + +input[type="search"] { + -webkit-appearance: textfield; } + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } + +legend { + border: 0; + padding: 0; } + +textarea { + overflow: auto; } + +optgroup { + font-weight: bold; } + +table { + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + width: 100%; } + +tr, td, th { + vertical-align: middle; } + +th, td { + padding: 0.425rem 0; } + +th { + text-align: left; } + +.container { + width: 75em; + margin: 0 auto; + padding: 0; } + @media only all and (min-width: 60em) and (max-width: 74.938em) { + .container { + width: 60em; } } + @media only all and (min-width: 48em) and (max-width: 59.938em) { + .container { + width: 48em; } } + @media only all and (min-width: 30.063em) and (max-width: 47.938em) { + .container { + width: 30em; } } + @media only all and (max-width: 30em) { + .container { + width: 100%; } } + +.grid { + display: -webkit-box; + display: -moz-box; + display: box; + display: -webkit-flex; + display: -moz-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-flow: row; + -moz-flex-flow: row; + flex-flow: row; + list-style: none; + margin: 0; + padding: 0; } + @media only all and (max-width: 47.938em) { + .grid { + -webkit-flex-flow: row wrap; + -moz-flex-flow: row wrap; + flex-flow: row wrap; } } + +.block { + -webkit-box-flex: 1; + -moz-box-flex: 1; + box-flex: 1; + -webkit-flex: 1; + -moz-flex: 1; + -ms-flex: 1; + flex: 1; + min-width: 0; + min-height: 0; } + @media only all and (max-width: 47.938em) { + .block { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 100%; + -moz-flex: 0 100%; + -ms-flex: 0 100%; + flex: 0 100%; } } + +.content { + margin: 0.625rem; + padding: 0.938rem; } + +@media only all and (max-width: 47.938em) { + body [class*="size-"] { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 100%; + -moz-flex: 0 100%; + -ms-flex: 0 100%; + flex: 0 100%; } } + +.size-1-2 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 50%; + -moz-flex: 0 50%; + -ms-flex: 0 50%; + flex: 0 50%; } + +.size-1-3 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 33.33333%; + -moz-flex: 0 33.33333%; + -ms-flex: 0 33.33333%; + flex: 0 33.33333%; } + +.size-1-4 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 25%; + -moz-flex: 0 25%; + -ms-flex: 0 25%; + flex: 0 25%; } + +.size-1-5 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 20%; + -moz-flex: 0 20%; + -ms-flex: 0 20%; + flex: 0 20%; } + +.size-1-6 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 16.66667%; + -moz-flex: 0 16.66667%; + -ms-flex: 0 16.66667%; + flex: 0 16.66667%; } + +.size-1-7 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 14.28571%; + -moz-flex: 0 14.28571%; + -ms-flex: 0 14.28571%; + flex: 0 14.28571%; } + +.size-1-8 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 12.5%; + -moz-flex: 0 12.5%; + -ms-flex: 0 12.5%; + flex: 0 12.5%; } + +.size-1-9 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 11.11111%; + -moz-flex: 0 11.11111%; + -ms-flex: 0 11.11111%; + flex: 0 11.11111%; } + +.size-1-10 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 10%; + -moz-flex: 0 10%; + -ms-flex: 0 10%; + flex: 0 10%; } + +.size-1-11 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 9.09091%; + -moz-flex: 0 9.09091%; + -ms-flex: 0 9.09091%; + flex: 0 9.09091%; } + +.size-1-12 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 8.33333%; + -moz-flex: 0 8.33333%; + -ms-flex: 0 8.33333%; + flex: 0 8.33333%; } + +@media only all and (min-width: 48em) and (max-width: 59.938em) { + .size-tablet-1-2 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 50%; + -moz-flex: 0 50%; + -ms-flex: 0 50%; + flex: 0 50%; } + + .size-tablet-1-3 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 33.33333%; + -moz-flex: 0 33.33333%; + -ms-flex: 0 33.33333%; + flex: 0 33.33333%; } + + .size-tablet-1-4 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 25%; + -moz-flex: 0 25%; + -ms-flex: 0 25%; + flex: 0 25%; } + + .size-tablet-1-5 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 20%; + -moz-flex: 0 20%; + -ms-flex: 0 20%; + flex: 0 20%; } + + .size-tablet-1-6 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 16.66667%; + -moz-flex: 0 16.66667%; + -ms-flex: 0 16.66667%; + flex: 0 16.66667%; } + + .size-tablet-1-7 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 14.28571%; + -moz-flex: 0 14.28571%; + -ms-flex: 0 14.28571%; + flex: 0 14.28571%; } + + .size-tablet-1-8 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 12.5%; + -moz-flex: 0 12.5%; + -ms-flex: 0 12.5%; + flex: 0 12.5%; } + + .size-tablet-1-9 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 11.11111%; + -moz-flex: 0 11.11111%; + -ms-flex: 0 11.11111%; + flex: 0 11.11111%; } + + .size-tablet-1-10 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 10%; + -moz-flex: 0 10%; + -ms-flex: 0 10%; + flex: 0 10%; } + + .size-tablet-1-11 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 9.09091%; + -moz-flex: 0 9.09091%; + -ms-flex: 0 9.09091%; + flex: 0 9.09091%; } + + .size-tablet-1-12 { + -webkit-box-flex: 0; + -moz-box-flex: 0; + box-flex: 0; + -webkit-flex: 0 8.33333%; + -moz-flex: 0 8.33333%; + -ms-flex: 0 8.33333%; + flex: 0 8.33333%; } } +@media only all and (max-width: 47.938em) { + @supports not (flex-wrap: wrap) { + .grid { + display: block; + -webkit-box-lines: inherit; + -moz-box-lines: inherit; + box-lines: inherit; + -webkit-flex-wrap: inherit; + -moz-flex-wrap: inherit; + -ms-flex-wrap: inherit; + flex-wrap: inherit; } + + .block { + display: block; + -webkit-box-flex: inherit; + -moz-box-flex: inherit; + box-flex: inherit; + -webkit-flex: inherit; + -moz-flex: inherit; + -ms-flex: inherit; + flex: inherit; } } } +.first-block { + -webkit-box-ordinal-group: 0; + -webkit-order: -1; + -ms-flex-order: -1; + order: -1; } + +.last-block { + -webkit-box-ordinal-group: 2; + -webkit-order: 1; + -ms-flex-order: 1; + order: 1; } + +.fixed-blocks { + -webkit-flex-flow: row wrap; + -moz-flex-flow: row wrap; + flex-flow: row wrap; } + .fixed-blocks .block { + -webkit-box-flex: inherit; + -moz-box-flex: inherit; + box-flex: inherit; + -webkit-flex: inherit; + -moz-flex: inherit; + -ms-flex: inherit; + flex: inherit; + width: 25%; } + @media only all and (min-width: 60em) and (max-width: 74.938em) { + .fixed-blocks .block { + width: 33.33333%; } } + @media only all and (min-width: 48em) and (max-width: 59.938em) { + .fixed-blocks .block { + width: 50%; } } + @media only all and (max-width: 47.938em) { + .fixed-blocks .block { + width: 100%; } } + +body { + font-size: 1.05rem; + line-height: 1.7; } + +h1, h2, h3, h4, h5, h6 { + margin: 0.85rem 0 1.7rem 0; + text-rendering: optimizeLegibility; } + +h1 { + font-size: 3.25rem; } + +h2 { + font-size: 2.55rem; } + +h3 { + font-size: 2.15rem; } + +h4 { + font-size: 1.8rem; } + +h5 { + font-size: 1.4rem; } + +h6 { + font-size: 0.9rem; } + +p { + margin: 1.7rem 0; } + +ul, ol { + margin-top: 1.7rem; + margin-bottom: 1.7rem; } + ul ul, ul ol, ol ul, ol ol { + margin-top: 0; + margin-bottom: 0; } + +blockquote { + margin: 1.7rem 0; + padding-left: 0.85rem; } + +cite { + display: block; + font-size: 0.925rem; } + cite:before { + content: "\2014 \0020"; } + +pre { + margin: 1.7rem 0; + padding: 0.938rem; } + +code { + vertical-align: bottom; } + +small { + font-size: 0.925rem; } + +hr { + border-left: none; + border-right: none; + border-top: none; + margin: 1.7rem 0; } + +fieldset { + border: 0; + padding: 0.938rem; + margin: 0 0 1.7rem 0; } + +input, +label, +select { + display: block; } + +label { + margin-bottom: 0.425rem; } + label.required:after { + content: "*"; } + label abbr { + display: none; } + +textarea, input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="url"], input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], select[multiple=multiple] { + -webkit-transition: border-color; + -moz-transition: border-color; + transition: border-color; + border-radius: 0.1875rem; + margin-bottom: 0.85rem; + padding: 0.425rem 0.425rem; + width: 100%; } + textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { + outline: none; } + +textarea { + resize: vertical; } + +input[type="checkbox"], input[type="radio"] { + display: inline; + margin-right: 0.425rem; } + +input[type="file"] { + width: 100%; } + +select { + width: auto; + max-width: 100%; + margin-bottom: 1.7rem; } + +button, +input[type="submit"] { + cursor: pointer; + user-select: none; + vertical-align: middle; + white-space: nowrap; + border: inherit; } diff --git a/website/themes/hugo-theme-learn/static/css/perfect-scrollbar.min.css b/website/themes/hugo-theme-learn/static/css/perfect-scrollbar.min.css new file mode 100644 index 000000000..ebd2cb43b --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/perfect-scrollbar.min.css @@ -0,0 +1,2 @@ +/* perfect-scrollbar v0.6.13 */ +.ps-container{-ms-touch-action:auto;touch-action:auto;overflow:hidden !important;-ms-overflow-style:none}@supports (-ms-overflow-style: none){.ps-container{overflow:auto !important}}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){.ps-container{overflow:auto !important}}.ps-container.ps-active-x>.ps-scrollbar-x-rail,.ps-container.ps-active-y>.ps-scrollbar-y-rail{display:block;background-color:transparent}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container>.ps-scrollbar-x-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;bottom:0px;height:15px}.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;bottom:2px;height:6px}.ps-container>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x,.ps-container>.ps-scrollbar-x-rail:active>.ps-scrollbar-x{height:11px}.ps-container>.ps-scrollbar-y-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;right:0;width:15px}.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;right:2px;width:6px}.ps-container>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y,.ps-container>.ps-scrollbar-y-rail:active>.ps-scrollbar-y{width:11px}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container:hover>.ps-scrollbar-x-rail,.ps-container:hover>.ps-scrollbar-y-rail{opacity:.6}.ps-container:hover>.ps-scrollbar-x-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x{background-color:#999}.ps-container:hover>.ps-scrollbar-y-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y{background-color:#999} diff --git a/website/themes/hugo-theme-learn/static/css/tags.css b/website/themes/hugo-theme-learn/static/css/tags.css new file mode 100644 index 000000000..495d2f9f7 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/tags.css @@ -0,0 +1,49 @@ +/* Tags */ + +#head-tags{ + margin-left:1em; + margin-top:1em; +} + +#body .tags a.tag-link { + display: inline-block; + line-height: 2em; + font-size: 0.8em; + position: relative; + margin: 0 16px 8px 0; + padding: 0 10px 0 12px; + background: #8451a1; + + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); + box-shadow: 0 1px 2px rgba(0,0,0,0.2); + color: #fff; +} + +#body .tags a.tag-link:before { + content: ""; + position: absolute; + top:0; + left: -1em; + width: 0; + height: 0; + border-color: transparent #8451a1 transparent transparent; + border-style: solid; + border-width: 1em 1em 1em 0; +} + +#body .tags a.tag-link:after { + content: ""; + position: absolute; + top: 10px; + left: 1px; + width: 5px; + height: 5px; + -webkit-border-radius: 50%; + border-radius: 100%; + background: #fff; +} diff --git a/website/themes/hugo-theme-learn/static/css/theme-blue.css b/website/themes/hugo-theme-learn/static/css/theme-blue.css new file mode 100644 index 000000000..9771ae5e3 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/theme-blue.css @@ -0,0 +1,111 @@ + +:root{ + + --MAIN-TEXT-color:#323232; /* Color of text by default */ + --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ + --MAIN-LINK-color:#1C90F3; /* Color of links */ + --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */ + --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */ + + --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */ + --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */ + + --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */ + --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */ + --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */ + + --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */ + --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */ + --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ + --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ + --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ + --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ + + --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */ + --MENU-SECTION-HR-color: #20272b; /* Color of
    separator in menu */ + +} + +body { + color: var(--MAIN-TEXT-color) !important; +} + +textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { + border-color: none; + box-shadow: none; +} + +h2, h3, h4, h5 { + color: var(--MAIN-TITLES-TEXT-color) !important; +} + +a { + color: var(--MAIN-LINK-color); +} + +.anchor { + color: var(--MAIN-ANCHOR-color); +} + +a:hover { + color: var(--MAIN-LINK-HOVER-color); +} + +#sidebar ul li.visited > a .read-icon { + color: var(--MENU-VISITED-color); +} + +#body a.highlight:after { + display: block; + content: ""; + height: 1px; + width: 0%; + -webkit-transition: width 0.5s ease; + -moz-transition: width 0.5s ease; + -ms-transition: width 0.5s ease; + transition: width 0.5s ease; + background-color: var(--MAIN-LINK-HOVER-color); +} +#sidebar { + background-color: var(--MENU-SECTIONS-BG-color); +} +#sidebar #header-wrapper { + background: var(--MENU-HEADER-BG-color); + color: var(--MENU-SEARCH-BOX-color); + border-color: var(--MENU-HEADER-BORDER-color); +} +#sidebar .searchbox { + border-color: var(--MENU-SEARCH-BOX-color); + background: var(--MENU-SEARCH-BG-color); +} +#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { + background: var(--MENU-SECTIONS-ACTIVE-BG-color); +} +#sidebar .searchbox * { + color: var(--MENU-SEARCH-BOX-ICONS-color); +} + +#sidebar a { + color: var(--MENU-SECTIONS-LINK-color); +} + +#sidebar a:hover { + color: var(--MENU-SECTIONS-LINK-HOVER-color); +} + +#sidebar ul li.active > a { + background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); + color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; +} + +#sidebar hr { + border-color: var(--MENU-SECTION-HR-color); +} + +#body .tags a.tag-link { + background-color: var(--MENU-HEADER-BG-color); +} + +#body .tags a.tag-link:before { + border-right-color: var(--MENU-HEADER-BG-color); +} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/css/theme-green.css b/website/themes/hugo-theme-learn/static/css/theme-green.css new file mode 100644 index 000000000..3b0b1f721 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/theme-green.css @@ -0,0 +1,111 @@ + +:root{ + + --MAIN-TEXT-color:#323232; /* Color of text by default */ + --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ + --MAIN-LINK-color:#599a3e; /* Color of links */ + --MAIN-LINK-HOVER-color:#3f6d2c; /* Color of hovered links */ + --MAIN-ANCHOR-color: #599a3e; /* color of anchors on titles */ + + --MENU-HEADER-BG-color:#74b559; /* Background color of menu header */ + --MENU-HEADER-BORDER-color:#9cd484; /*Color of menu header border */ + + --MENU-SEARCH-BG-color:#599a3e; /* Search field background color (by default borders + icons) */ + --MENU-SEARCH-BOX-color: #84c767; /* Override search field border color */ + --MENU-SEARCH-BOX-ICONS-color: #c7f7c4; /* Override search field icons color */ + + --MENU-SECTIONS-ACTIVE-BG-color:#1b211c; /* Background color of the active section and its childs */ + --MENU-SECTIONS-BG-color:#222723; /* Background color of other sections */ + --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ + --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ + --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ + --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ + + --MENU-VISITED-color: #599a3e; /* Color of 'page visited' icons in menu */ + --MENU-SECTION-HR-color: #18211c; /* Color of
    separator in menu */ + +} + +body { + color: var(--MAIN-TEXT-color) !important; +} + +textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { + border-color: none; + box-shadow: none; +} + +h2, h3, h4, h5 { + color: var(--MAIN-TITLES-TEXT-color) !important; +} + +a { + color: var(--MAIN-LINK-color); +} + +.anchor { + color: var(--MAIN-ANCHOR-color); +} + +a:hover { + color: var(--MAIN-LINK-HOVER-color); +} + +#sidebar ul li.visited > a .read-icon { + color: var(--MENU-VISITED-color); +} + +#body a.highlight:after { + display: block; + content: ""; + height: 1px; + width: 0%; + -webkit-transition: width 0.5s ease; + -moz-transition: width 0.5s ease; + -ms-transition: width 0.5s ease; + transition: width 0.5s ease; + background-color: var(--MAIN-LINK-HOVER-color); +} +#sidebar { + background-color: var(--MENU-SECTIONS-BG-color); +} +#sidebar #header-wrapper { + background: var(--MENU-HEADER-BG-color); + color: var(--MENU-SEARCH-BOX-color); + border-color: var(--MENU-HEADER-BORDER-color); +} +#sidebar .searchbox { + border-color: var(--MENU-SEARCH-BOX-color); + background: var(--MENU-SEARCH-BG-color); +} +#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { + background: var(--MENU-SECTIONS-ACTIVE-BG-color); +} +#sidebar .searchbox * { + color: var(--MENU-SEARCH-BOX-ICONS-color); +} + +#sidebar a { + color: var(--MENU-SECTIONS-LINK-color); +} + +#sidebar a:hover { + color: var(--MENU-SECTIONS-LINK-HOVER-color); +} + +#sidebar ul li.active > a { + background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); + color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; +} + +#sidebar hr { + border-color: var(--MENU-SECTION-HR-color); +} + +#body .tags a.tag-link { + background-color: var(--MENU-HEADER-BG-color); +} + +#body .tags a.tag-link:before { + border-right-color: var(--MENU-HEADER-BG-color); +} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/css/theme-red.css b/website/themes/hugo-theme-learn/static/css/theme-red.css new file mode 100644 index 000000000..36c9278e5 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/theme-red.css @@ -0,0 +1,111 @@ + +:root{ + + --MAIN-TEXT-color:#323232; /* Color of text by default */ + --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ + --MAIN-LINK-color:#f31c1c; /* Color of links */ + --MAIN-LINK-HOVER-color:#d01616; /* Color of hovered links */ + --MAIN-ANCHOR-color: #f31c1c; /* color of anchors on titles */ + + --MENU-HEADER-BG-color:#dc1010; /* Background color of menu header */ + --MENU-HEADER-BORDER-color:#e23131; /*Color of menu header border */ + + --MENU-SEARCH-BG-color:#b90000; /* Search field background color (by default borders + icons) */ + --MENU-SEARCH-BOX-color: #ef2020; /* Override search field border color */ + --MENU-SEARCH-BOX-ICONS-color: #fda1a1; /* Override search field icons color */ + + --MENU-SECTIONS-ACTIVE-BG-color:#2b2020; /* Background color of the active section and its childs */ + --MENU-SECTIONS-BG-color:#312525; /* Background color of other sections */ + --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ + --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ + --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ + --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ + + --MENU-VISITED-color: #ff3333; /* Color of 'page visited' icons in menu */ + --MENU-SECTION-HR-color: #2b2020; /* Color of
    separator in menu */ + +} + +body { + color: var(--MAIN-TEXT-color) !important; +} + +textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { + border-color: none; + box-shadow: none; +} + +h2, h3, h4, h5 { + color: var(--MAIN-TITLES-TEXT-color) !important; +} + +a { + color: var(--MAIN-LINK-color); +} + +.anchor { + color: var(--MAIN-ANCHOR-color); +} + +a:hover { + color: var(--MAIN-LINK-HOVER-color); +} + +#sidebar ul li.visited > a .read-icon { + color: var(--MENU-VISITED-color); +} + +#body a.highlight:after { + display: block; + content: ""; + height: 1px; + width: 0%; + -webkit-transition: width 0.5s ease; + -moz-transition: width 0.5s ease; + -ms-transition: width 0.5s ease; + transition: width 0.5s ease; + background-color: var(--MAIN-LINK-HOVER-color); +} +#sidebar { + background-color: var(--MENU-SECTIONS-BG-color); +} +#sidebar #header-wrapper { + background: var(--MENU-HEADER-BG-color); + color: var(--MENU-SEARCH-BOX-color); + border-color: var(--MENU-HEADER-BORDER-color); +} +#sidebar .searchbox { + border-color: var(--MENU-SEARCH-BOX-color); + background: var(--MENU-SEARCH-BG-color); +} +#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { + background: var(--MENU-SECTIONS-ACTIVE-BG-color); +} +#sidebar .searchbox * { + color: var(--MENU-SEARCH-BOX-ICONS-color); +} + +#sidebar a { + color: var(--MENU-SECTIONS-LINK-color); +} + +#sidebar a:hover { + color: var(--MENU-SECTIONS-LINK-HOVER-color); +} + +#sidebar ul li.active > a { + background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); + color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; +} + +#sidebar hr { + border-color: var(--MENU-SECTION-HR-color); +} + +#body .tags a.tag-link { + background-color: var(--MENU-HEADER-BG-color); +} + +#body .tags a.tag-link:before { + border-right-color: var(--MENU-HEADER-BG-color); +} \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/css/theme.css b/website/themes/hugo-theme-learn/static/css/theme.css new file mode 100644 index 000000000..5ce91cd3f --- /dev/null +++ b/website/themes/hugo-theme-learn/static/css/theme.css @@ -0,0 +1,1136 @@ +@charset "UTF-8"; + +/* Tags */ +@import "tags.css"; + +#top-github-link, #body #breadcrumbs { + position: relative; + top: 50%; + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -o-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); +} +.button, .button-secondary { + display: inline-block; + padding: 7px 12px; +} +.button:active, .button-secondary:active { + margin: 2px 0 -2px 0; +} +@font-face { + font-family: 'Novacento Sans Wide'; + src: url("../fonts/Novecentosanswide-UltraLight-webfont.eot"); + src: url("../fonts/Novecentosanswide-UltraLight-webfont.eot?#iefix") format("embedded-opentype"), url("../fonts/Novecentosanswide-UltraLight-webfont.woff2") format("woff2"), url("../fonts/Novecentosanswide-UltraLight-webfont.woff") format("woff"), url("../fonts/Novecentosanswide-UltraLight-webfont.ttf") format("truetype"), url("../fonts/Novecentosanswide-UltraLight-webfont.svg#novecento_sans_wideultralight") format("svg"); + font-style: normal; + font-weight: 200; +} +@font-face { + font-family: 'Work Sans'; + font-style: normal; + font-weight: 300; + src: url("../fonts/Work_Sans_300.eot?#iefix") format("embedded-opentype"), url("../fonts/Work_Sans_300.woff") format("woff"), url("../fonts/Work_Sans_300.woff2") format("woff2"), url("../fonts/Work_Sans_300.svg#WorkSans") format("svg"), url("../fonts/Work_Sans_300.ttf") format("truetype"); +} +@font-face { + font-family: 'Work Sans'; + font-style: normal; + font-weight: 500; + src: url("../fonts/Work_Sans_500.eot?#iefix") format("embedded-opentype"), url("../fonts/Work_Sans_500.woff") format("woff"), url("../fonts/Work_Sans_500.woff2") format("woff2"), url("../fonts/Work_Sans_500.svg#WorkSans") format("svg"), url("../fonts/Work_Sans_500.ttf") format("truetype"); +} +body { + background: #fff; + color: #777; +} +body #chapter h1 { + font-size: 3.5rem; +} +@media only all and (min-width: 48em) and (max-width: 59.938em) { + body #chapter h1 { + font-size: 3rem; + } +} +@media only all and (max-width: 47.938em) { + body #chapter h1 { + font-size: 2rem; + } +} +a { + color: #00bdf3; +} +a:hover { + color: #0082a7; +} +pre { + position: relative; + color: #ffffff; +} +.bg { + background: #fff; + border: 1px solid #eaeaea; +} +b, strong, label, th { + font-weight: 600; +} +.default-animation, #header #logo-svg, #header #logo-svg path, #sidebar, #sidebar ul, #body, #body .padding, #body .nav { + -webkit-transition: all 0.5s ease; + -moz-transition: all 0.5s ease; + transition: all 0.5s ease; +} +#grav-logo { + max-width: 60%; +} +#grav-logo path { + fill: #fff !important; +} +#sidebar { + font-weight: 300 !important; +} +fieldset { + border: 1px solid #ddd; +} +textarea, input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="url"], input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], select[multiple=multiple] { + background-color: white; + border: 1px solid #ddd; + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06); +} +textarea:hover, input[type="email"]:hover, input[type="number"]:hover, input[type="password"]:hover, input[type="search"]:hover, input[type="tel"]:hover, input[type="text"]:hover, input[type="url"]:hover, input[type="color"]:hover, input[type="date"]:hover, input[type="datetime"]:hover, input[type="datetime-local"]:hover, input[type="month"]:hover, input[type="time"]:hover, input[type="week"]:hover, select[multiple=multiple]:hover { + border-color: #c4c4c4; +} +textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { + border-color: #00bdf3; + box-shadow: inset 0 1px 3px rgba(0,0,0,.06),0 0 5px rgba(0,169,218,.7) +} +#header-wrapper { + background: #8451a1; + color: #fff; + text-align: center; + border-bottom: 4px solid #9c6fb6; + padding: 1rem; +} +#header a { + display: inline-block; +} +#header #logo-svg { + width: 8rem; + height: 2rem; +} +#header #logo-svg path { + fill: #fff; +} +.searchbox { + margin-top: 1rem; + position: relative; + border: 1px solid #915eae; + background: #764890; + border-radius: 4px; +} +.searchbox label { + color: rgba(255, 255, 255, 0.8); + position: absolute; + left: 10px; + top: 3px; +} +.searchbox span { + color: rgba(255, 255, 255, 0.6); + position: absolute; + right: 10px; + top: 3px; + cursor: pointer; +} +.searchbox span:hover { + color: rgba(255, 255, 255, 0.9); +} +.searchbox input { + display: inline-block; + color: #fff; + width: 100%; + height: 30px; + background: transparent; + border: 0; + padding: 0 25px 0 30px; + margin: 0; + font-weight: 300; +} +.searchbox input::-webkit-input-placeholder { + color: rgba(255, 255, 255, 0.6); +} +.searchbox input::-moz-placeholder { + color: rgba(255, 255, 255, 0.6); +} +.searchbox input:-moz-placeholder { + color: rgba(255, 255, 255, 0.6); +} +.searchbox input:-ms-input-placeholder { + color: rgba(255, 255, 255, 0.6); +} +#sidebar-toggle-span { + display: none; +} +@media only all and (max-width: 47.938em) { + #sidebar-toggle-span { + display: inline; + } +} +#sidebar { + background-color: #322A38; + position: fixed; + top: 0; + width: 300px; + bottom: 0; + left: 0; + font-weight: 400; + font-size: 15px; +} +#sidebar a { + color: #ccc; +} +#sidebar a:hover { + color: #e6e6e6; +} +#sidebar a.subtitle { + color: rgba(204, 204, 204, 0.6); +} +#sidebar hr { + border-bottom: 1px solid #2a232f; +} +#sidebar a.padding { + padding: 0 1rem; +} +#sidebar h5 { + margin: 2rem 0 0; + position: relative; + line-height: 2; +} +#sidebar h5 a { + display: block; + margin-left: 0; + margin-right: 0; + padding-left: 1rem; + padding-right: 1rem; +} +#sidebar h5 i { + color: rgba(204, 204, 204, 0.6); + position: absolute; + right: 0.6rem; + top: 0.7rem; + font-size: 80%; +} +#sidebar h5.parent a { + background: #201b24; + color: #d9d9d9 !important; +} +#sidebar h5.active a { + background: #fff; + color: #777 !important; +} +#sidebar h5.active i { + color: #777 !important; +} +#sidebar h5 + ul.topics { + display: none; + margin-top: 0; +} +#sidebar h5.parent + ul.topics, #sidebar h5.active + ul.topics { + display: block; +} +#sidebar ul { + list-style: none; + padding: 0; + margin: 0; +} +#sidebar ul.searched a { + color: #999999; +} +#sidebar ul.searched .search-match a { + color: #e6e6e6; +} +#sidebar ul.searched .search-match a:hover { + color: white; +} +#sidebar ul.topics { + margin: 0 1rem; +} +#sidebar ul.topics.searched ul { + display: block; +} +#sidebar ul.topics ul { + display: none; + padding-bottom: 1rem; +} +#sidebar ul.topics ul ul { + padding-bottom: 0; +} +#sidebar ul.topics li.parent ul, #sidebar ul.topics > li.active ul { + display: block; +} +#sidebar ul.topics > li > a { + line-height: 2rem; + font-size: 1.1rem; +} +#sidebar ul.topics > li > a b { + opacity: 0.5; + font-weight: normal; +} +#sidebar ul.topics > li > a .fa { + margin-top: 9px; +} +#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { + background: #251f29; + margin-left: -1rem; + margin-right: -1rem; + padding-left: 1rem; + padding-right: 1rem; +} +#sidebar ul li.active > a { + background: #fff; + color: #777 !important; + margin-left: -1rem; + margin-right: -1rem; + padding-left: 1rem; + padding-right: 1rem; +} +#sidebar ul li { + padding: 0; +} +#sidebar ul li.visited + span { + margin-right: 16px; +} +#sidebar ul li a { + display: block; + padding: 2px 0; +} +#sidebar ul li a span { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + display: block; +} +#sidebar ul li > a { + padding: 4px 0; +} +#sidebar ul li.visited > a .read-icon { + color: #9c6fb6; + display: inline; +} +#sidebar ul li li { + padding-left: 1rem; + text-indent: 0.2rem; +} +#main { + background: #f7f7f7; + margin: 0 0 1.563rem 0; +} +#body { + position: relative; + margin-left: 300px; + min-height: 100%; +} +#body img, #body .video-container { + margin: 3rem auto; + display: block; + text-align: center; +} +#body img.border, #body .video-container.border { + border: 2px solid #e6e6e6 !important; + padding: 2px; +} +#body img.shadow, #body .video-container.shadow { + box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); +} +#body img.inline { + display: inline !important; + margin: 0 !important; + vertical-align: bottom; +} +#body .bordered { + border: 1px solid #ccc; +} +#body .padding { + padding: 3rem 6rem; +} +@media only all and (max-width: 59.938em) { + #body .padding { + position: static; + padding: 15px 3rem; + } +} +@media only all and (max-width: 47.938em) { + #body .padding { + padding: 5px 1rem; + } +} +#body h1 + hr { + margin-top: -1.7rem; + margin-bottom: 3rem; +} +@media only all and (max-width: 59.938em) { + #body #navigation { + position: static; + margin-right: 0 !important; + width: 100%; + display: table; + } +} +#body .nav { + position: fixed; + top: 0; + bottom: 0; + width: 4rem; + font-size: 50px; + height: 100%; + cursor: pointer; + display: table; + text-align: center; +} +#body .nav > i { + display: table-cell; + vertical-align: middle; + text-align: center; +} +@media only all and (max-width: 59.938em) { + #body .nav { + display: table-cell; + position: static; + top: auto; + width: 50%; + text-align: center; + height: 100px; + line-height: 100px; + padding-top: 0; + } + #body .nav > i { + display: inline-block; + } +} +#body .nav:hover { + background: #F6F6F6; +} +#body .nav.nav-pref { + left: 0; +} +#body .nav.nav-next { + right: 0; +} +#body-inner { + margin-bottom: 5rem; +} +#chapter { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + padding: 2rem 0; +} +#chapter #body-inner { + padding-bottom: 3rem; + max-width: 80%; +} +#chapter h3 { + font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + font-weight: 300; + text-align: center; +} +#chapter h1 { + font-size: 5rem; + border-bottom: 4px solid #F0F2F4; +} +#chapter p { + text-align: center; + font-size: 1.2rem; +} +#footer { + padding: 3rem 1rem; + color: #b3b3b3; + font-size: 13px; +} +#footer p { + margin: 0; +} +body { + font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + font-weight: 300; + line-height: 1.6; + font-size: 18px !important; +} +h2, h3, h4, h5, h6 { + font-family: "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + text-rendering: optimizeLegibility; + color: #5e5e5e; + font-weight: 400; + letter-spacing: -1px; +} +h1 { + font-family: "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + text-align: center; + text-transform: uppercase; + color: #222; + font-weight: 200; +} +blockquote { + border-left: 10px solid #F0F2F4; +} +blockquote p { + font-size: 1.1rem; + color: #999; +} +blockquote cite { + display: block; + text-align: right; + color: #666; + font-size: 1.2rem; +} +div.notices { + margin: 2rem 0; + position: relative; +} +div.notices p { + padding: 15px; + display: block; + font-size: 1rem; + margin-top: 0rem; + margin-bottom: 0rem; + color: #666; +} +div.notices p:first-child:before { + position: absolute; + top: 2px; + color: #fff; + font-family: "Font Awesome 5 Free"; + font-weight: 900; + content: "\f06a"; + left: 10px; +} +div.notices p:first-child:after { + position: absolute; + top: 2px; + color: #fff; + left: 2rem; +} +div.notices.info p { + border-top: 30px solid #F0B37E; + background: #FFF2DB; +} +div.notices.info p:first-child:after { + content: 'Info'; +} +div.notices.warning p { + border-top: 30px solid rgba(217, 83, 79, 0.8); + background: #FAE2E2; +} +div.notices.warning p:first-child:after { + content: 'Warning'; +} +div.notices.note p { + border-top: 30px solid #6AB0DE; + background: #E7F2FA; +} +div.notices.note p:first-child:after { + content: 'Note'; +} +div.notices.tip p { + border-top: 30px solid rgba(92, 184, 92, 0.8); + background: #E6F9E6; +} +div.notices.tip p:first-child:after { + content: 'Tip'; +} + +/* attachments shortcode */ + +section.attachments { + margin: 2rem 0; + position: relative; +} + +section.attachments label { + font-weight: 400; + padding-left: 0.5em; + padding-top: 0.2em; + padding-bottom: 0.2em; + margin: 0; +} + +section.attachments .attachments-files { + padding: 15px; + display: block; + font-size: 1rem; + margin-top: 0rem; + margin-bottom: 0rem; + color: #666; +} + +section.attachments.orange label { + color: #fff; + background: #F0B37E; +} + +section.attachments.orange .attachments-files { + background: #FFF2DB; +} + +section.attachments.green label { + color: #fff; + background: rgba(92, 184, 92, 0.8); +} + +section.attachments.green .attachments-files { + background: #E6F9E6; +} + +section.attachments.blue label { + color: #fff; + background: #6AB0DE; +} + +section.attachments.blue .attachments-files { + background: #E7F2FA; +} + +section.attachments.grey label { + color: #fff; + background: #505d65; +} + +section.attachments.grey .attachments-files { + background: #f4f4f4; +} + +/* Children shortcode */ + +/* Children shortcode */ +.children p { + font-size: small; + margin-top: 0px; + padding-top: 0px; + margin-bottom: 0px; + padding-bottom: 0px; +} +.children-li p { + font-size: small; + font-style: italic; + +} +.children-h2 p, .children-h3 p { + font-size: small; + margin-top: 0px; + padding-top: 0px; + margin-bottom: 0px; + padding-bottom: 0px; +} +.children h3,.children h2 { + margin-bottom: 0px; + margin-top: 5px; +} + +code, kbd, pre, samp { + font-family: "Consolas", menlo, monospace; + font-size: 92%; +} +code { + border-radius: 2px; + white-space: nowrap; + color: #5e5e5e; + background: #FFF7DD; + border: 1px solid #fbf0cb; + padding: 0px 2px; +} +code + .copy-to-clipboard { + margin-left: -1px; + border-left: 0 !important; + font-size: inherit !important; + vertical-align: middle; + height: 21px; + top: 0; +} +pre { + padding: 1rem; + margin: 2rem 0; + background: #282c34; + border: 0; + border-radius: 2px; + line-height: 1.15; +} +pre code { + color: whitesmoke; + background: inherit; + white-space: inherit; + border: 0; + padding: 0; + margin: 0; + font-size: 15px; +} +hr { + border-bottom: 4px solid #F0F2F4; +} +.page-title { + margin-top: -25px; + padding: 25px; + float: left; + clear: both; + background: #9c6fb6; + color: #fff; +} +#body a.anchor-link { + color: #ccc; +} +#body a.anchor-link:hover { + color: #9c6fb6; +} +#body-inner .tabs-wrapper.ui-theme-badges { + background: #1d1f21; +} +#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li { + font-size: 0.9rem; + text-transform: uppercase; +} +#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li a { + background: #35393c; +} +#body-inner .tabs-wrapper.ui-theme-badges .tabs-nav li.current a { + background: #4d5257; +} +#body-inner pre { + white-space: pre-wrap; +} +.tabs-wrapper pre { + margin: 1rem 0; + border: 0; + padding: 0; + background: inherit; +} +table { + border: 1px solid #eaeaea; + table-layout: auto; +} +th { + background: #f7f7f7; + padding: 0.5rem; +} +td { + padding: 0.5rem; + border: 1px solid #eaeaea; +} +.button { + background: #9c6fb6; + color: #fff; + box-shadow: 0 3px 0 #00a5d4; +} +.button:hover { + background: #00a5d4; + box-shadow: 0 3px 0 #008db6; + color: #fff; +} +.button:active { + box-shadow: 0 1px 0 #008db6; +} +.button-secondary { + background: #F8B450; + color: #fff; + box-shadow: 0 3px 0 #f7a733; +} +.button-secondary:hover { + background: #f7a733; + box-shadow: 0 3px 0 #f69b15; + color: #fff; +} +.button-secondary:active { + box-shadow: 0 1px 0 #f69b15; +} +.bullets { + margin: 1.7rem 0; + margin-left: -0.85rem; + margin-right: -0.85rem; + overflow: auto; +} +.bullet { + float: left; + padding: 0 0.85rem; +} +.two-column-bullet { + width: 50%; +} +@media only all and (max-width: 47.938em) { + .two-column-bullet { + width: 100%; + } +} +.three-column-bullet { + width: 33.33333%; +} +@media only all and (max-width: 47.938em) { + .three-column-bullet { + width: 100%; + } +} +.four-column-bullet { + width: 25%; +} +@media only all and (max-width: 47.938em) { + .four-column-bullet { + width: 100%; + } +} +.bullet-icon { + float: left; + background: #9c6fb6; + padding: 0.875rem; + width: 3.5rem; + height: 3.5rem; + border-radius: 50%; + color: #fff; + font-size: 1.75rem; + text-align: center; +} +.bullet-icon-1 { + background: #9c6fb6; +} +.bullet-icon-2 { + background: #00f3d8; +} +.bullet-icon-3 { + background: #e6f300; +} +.bullet-content { + margin-left: 4.55rem; +} +.tooltipped { + position: relative; +} +.tooltipped:after { + position: absolute; + z-index: 1000000; + display: none; + padding: 5px 8px; + font: normal normal 11px/1.5 "Work Sans", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + color: #fff; + text-align: center; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-wrap: break-word; + white-space: pre; + pointer-events: none; + content: attr(aria-label); + background: rgba(0, 0, 0, 0.8); + border-radius: 3px; + -webkit-font-smoothing: subpixel-antialiased; +} +.tooltipped:before { + position: absolute; + z-index: 1000001; + display: none; + width: 0; + height: 0; + color: rgba(0, 0, 0, 0.8); + pointer-events: none; + content: ""; + border: 5px solid transparent; +} +.tooltipped:hover:before, .tooltipped:hover:after, .tooltipped:active:before, .tooltipped:active:after, .tooltipped:focus:before, .tooltipped:focus:after { + display: inline-block; + text-decoration: none; +} +.tooltipped-s:after, .tooltipped-se:after, .tooltipped-sw:after { + top: 100%; + right: 50%; + margin-top: 5px; +} +.tooltipped-s:before, .tooltipped-se:before, .tooltipped-sw:before { + top: auto; + right: 50%; + bottom: -5px; + margin-right: -5px; + border-bottom-color: rgba(0, 0, 0, 0.8); +} +.tooltipped-se:after { + right: auto; + left: 50%; + margin-left: -15px; +} +.tooltipped-sw:after { + margin-right: -15px; +} +.tooltipped-n:after, .tooltipped-ne:after, .tooltipped-nw:after { + right: 50%; + bottom: 100%; + margin-bottom: 5px; +} +.tooltipped-n:before, .tooltipped-ne:before, .tooltipped-nw:before { + top: -5px; + right: 50%; + bottom: auto; + margin-right: -5px; + border-top-color: rgba(0, 0, 0, 0.8); +} +.tooltipped-ne:after { + right: auto; + left: 50%; + margin-left: -15px; +} +.tooltipped-nw:after { + margin-right: -15px; +} +.tooltipped-s:after, .tooltipped-n:after { + transform: translateX(50%); +} +.tooltipped-w:after { + right: 100%; + bottom: 50%; + margin-right: 5px; + transform: translateY(50%); +} +.tooltipped-w:before { + top: 50%; + bottom: 50%; + left: -5px; + margin-top: -5px; + border-left-color: rgba(0, 0, 0, 0.8); +} +.tooltipped-e:after { + bottom: 50%; + left: 100%; + margin-left: 5px; + transform: translateY(50%); +} +.tooltipped-e:before { + top: 50%; + right: -5px; + bottom: 50%; + margin-top: -5px; + border-right-color: rgba(0, 0, 0, 0.8); +} +.highlightable { + padding: 1rem 0 1rem; + overflow: auto; + position: relative; +} +.hljs::selection, .hljs span::selection { + background: #b7b7b7; +} +.lightbox-active #body { + overflow: visible; +} +.lightbox-active #body .padding { + overflow: visible; +} +#github-contrib i { + vertical-align: middle; +} +.featherlight img { + margin: 0 !important; +} +.lifecycle #body-inner ul { + list-style: none; + margin: 0; + padding: 2rem 0 0; + position: relative; +} +.lifecycle #body-inner ol { + margin: 1rem 0 1rem 0; + padding: 2rem; + position: relative; +} +.lifecycle #body-inner ol li { + margin-left: 1rem; +} +.lifecycle #body-inner ol strong, .lifecycle #body-inner ol label, .lifecycle #body-inner ol th { + text-decoration: underline; +} +.lifecycle #body-inner ol ol { + margin-left: -1rem; +} +.lifecycle #body-inner h3[class*='level'] { + font-size: 20px; + position: absolute; + margin: 0; + padding: 4px 10px; + right: 0; + z-index: 1000; + color: #fff; + background: #1ABC9C; +} +.lifecycle #body-inner ol h3 { + margin-top: 1rem !important; + right: 2rem !important; +} +.lifecycle #body-inner .level-1 + ol { + background: #f6fefc; + border: 4px solid #1ABC9C; + color: #16A085; +} +.lifecycle #body-inner .level-1 + ol h3 { + background: #2ECC71; +} +.lifecycle #body-inner .level-2 + ol { + background: #f7fdf9; + border: 4px solid #2ECC71; + color: #27AE60; +} +.lifecycle #body-inner .level-2 + ol h3 { + background: #3498DB; +} +.lifecycle #body-inner .level-3 + ol { + background: #f3f9fd; + border: 4px solid #3498DB; + color: #2980B9; +} +.lifecycle #body-inner .level-3 + ol h3 { + background: #34495E; +} +.lifecycle #body-inner .level-4 + ol { + background: #e4eaf0; + border: 4px solid #34495E; + color: #2C3E50; +} +.lifecycle #body-inner .level-4 + ol h3 { + background: #34495E; +} +#top-bar { + background: #F6F6F6; + border-radius: 2px; + padding: 0 1rem; + height: 0; + min-height: 3rem; +} +#top-github-link { + position: relative; + z-index: 1; + float: right; + display: block; +} +#body #breadcrumbs { + height: auto; + margin-bottom: 0; + padding-left: 0; + line-height: 1.4; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + width: 70%; + display: inline-block; + float: left; +} +#body #breadcrumbs span { + padding: 0 0.1rem; +} +@media only all and (max-width: 59.938em) { + #sidebar { + width: 230px; + } + #body { + margin-left: 230px; + } +} +@media only all and (max-width: 47.938em) { + #sidebar { + width: 230px; + left: -230px; + } + #body { + margin-left: 0; + width: 100%; + } + .sidebar-hidden { + overflow: hidden; + } + .sidebar-hidden #sidebar { + left: 0; + } + .sidebar-hidden #body { + margin-left: 230px; + overflow: hidden; + } + .sidebar-hidden #overlay { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 10; + background: rgba(255, 255, 255, 0.5); + cursor: pointer; + } +} +.copy-to-clipboard { + background-image: url(../images/clippy.svg); + background-position: 50% 50%; + background-size: 16px 16px; + background-repeat: no-repeat; + width: 27px; + height: 1.45rem; + top: -1px; + display: inline-block; + vertical-align: middle; + position: relative; + color: #5e5e5e; + background-color: #FFF7DD; + margin-left: -.2rem; + cursor: pointer; + border-radius: 0 2px 2px 0; + margin-bottom: 1px; +} +.copy-to-clipboard:hover { + background-color: #E8E2CD; +} +pre .copy-to-clipboard { + position: absolute; + right: 4px; + top: 4px; + background-color: #949bab; + color: #ccc; + border-radius: 2px; +} +pre .copy-to-clipboard:hover { + background-color: #656c72; + color: #fff; +} +.parent-element { + -webkit-transform-style: preserve-3d; + -moz-transform-style: preserve-3d; + transform-style: preserve-3d; +} + +#sidebar ul.topics > li > a .read-icon { + margin-top: 9px; +} + +#sidebar ul { + list-style: none; + padding: 0; + margin: 0; +} + +#sidebar #shortcuts li { + padding: 2px 0; + list-style: none; +} + +#sidebar ul li .read-icon { + display: none; + float: right; + font-size: 13px; + min-width: 16px; + margin: 4px 0 0 0; + text-align: right; +} +#sidebar ul li.visited > a .read-icon { + color: #00bdf3; + display: inline; +} + +#sidebar #shortcuts h3 { + font-family: "Novacento Sans Wide", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; + color: white ; + margin-top:1rem; + padding-left: 1rem; +} + +#searchResults { + text-align: left; +} + +option { + color: initial; +} diff --git a/website/themes/hugo-theme-learn/static/fonts/Inconsolata.eot b/website/themes/hugo-theme-learn/static/fonts/Inconsolata.eot new file mode 100644 index 000000000..0a705d653 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Inconsolata.eot differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Inconsolata.svg b/website/themes/hugo-theme-learn/static/fonts/Inconsolata.svg new file mode 100644 index 000000000..36775f074 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/fonts/Inconsolata.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/fonts/Inconsolata.ttf b/website/themes/hugo-theme-learn/static/fonts/Inconsolata.ttf new file mode 100644 index 000000000..4b8a36d24 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Inconsolata.ttf differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Inconsolata.woff b/website/themes/hugo-theme-learn/static/fonts/Inconsolata.woff new file mode 100644 index 000000000..6f39625e5 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Inconsolata.woff differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.eot b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.eot new file mode 100644 index 000000000..9984682fc Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.eot differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.svg b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.svg new file mode 100644 index 000000000..6fa1a66e3 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.ttf b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.ttf new file mode 100644 index 000000000..8cfb62dd5 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.ttf differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff new file mode 100644 index 000000000..d5c429079 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff2 b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff2 new file mode 100644 index 000000000..eefb4a318 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-Normal-webfont.woff2 differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.eot b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.eot new file mode 100644 index 000000000..2a26561f9 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.eot differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.svg b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.svg new file mode 100644 index 000000000..c4e903b61 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.ttf b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.ttf new file mode 100644 index 000000000..9ce9c7f99 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.ttf differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff new file mode 100644 index 000000000..381650c98 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff2 b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff2 new file mode 100644 index 000000000..7e659549b Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Novecentosanswide-UltraLight-webfont.woff2 differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.eot b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.eot new file mode 100644 index 000000000..4052e4f94 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.eot differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.svg b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.svg new file mode 100644 index 000000000..0ffbd3a84 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.ttf b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.ttf new file mode 100644 index 000000000..68019e1cc Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.ttf differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff new file mode 100644 index 000000000..a1bd9e469 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff2 b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff2 new file mode 100644 index 000000000..20c68a75c Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_200.woff2 differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.eot b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.eot new file mode 100644 index 000000000..ace799382 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.eot differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.svg b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.svg new file mode 100644 index 000000000..7d2936783 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.ttf b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.ttf new file mode 100644 index 000000000..35387c235 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.ttf differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff new file mode 100644 index 000000000..8d789eae9 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff2 b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff2 new file mode 100644 index 000000000..f6e216d64 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_300.woff2 differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.eot b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.eot new file mode 100644 index 000000000..9df692942 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.eot differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.svg b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.svg new file mode 100644 index 000000000..90a91c14c --- /dev/null +++ b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.ttf b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.ttf new file mode 100644 index 000000000..5b8cc5342 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.ttf differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff new file mode 100644 index 000000000..df058514f Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff differ diff --git a/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff2 b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff2 new file mode 100644 index 000000000..b06c54df0 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/fonts/Work_Sans_500.woff2 differ diff --git a/website/themes/hugo-theme-learn/static/images/clippy.svg b/website/themes/hugo-theme-learn/static/images/clippy.svg new file mode 100644 index 000000000..f4551735e --- /dev/null +++ b/website/themes/hugo-theme-learn/static/images/clippy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/themes/hugo-theme-learn/static/images/favicon.png b/website/themes/hugo-theme-learn/static/images/favicon.png new file mode 100644 index 000000000..df06e35d6 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/images/favicon.png differ diff --git a/website/themes/hugo-theme-learn/static/images/gopher-404.jpg b/website/themes/hugo-theme-learn/static/images/gopher-404.jpg new file mode 100644 index 000000000..2a5054389 Binary files /dev/null and b/website/themes/hugo-theme-learn/static/images/gopher-404.jpg differ diff --git a/website/themes/hugo-theme-learn/static/js/auto-complete.js b/website/themes/hugo-theme-learn/static/js/auto-complete.js new file mode 100644 index 000000000..0b4605456 --- /dev/null +++ b/website/themes/hugo-theme-learn/static/js/auto-complete.js @@ -0,0 +1,3 @@ +// JavaScript autoComplete v1.0.4 +// https://github.com/Pixabay/JavaScript-autoComplete +var autoComplete=function(){function e(e){function t(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function o(e,t,o){e.attachEvent?e.attachEvent("on"+t,o):e.addEventListener(t,o)}function s(e,t,o){e.detachEvent?e.detachEvent("on"+t,o):e.removeEventListener(t,o)}function n(e,s,n,l){o(l||document,s,function(o){for(var s,l=o.target||o.srcElement;l&&!(s=t(l,e));)l=l.parentElement;s&&n.call(l,o)})}if(document.querySelector){var l={selector:0,source:0,minChars:3,delay:150,offsetLeft:0,offsetTop:1,cache:1,menuClass:"",renderItem:function(e,t){t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+t.split(" ").join("|")+")","gi");return'
    '+e.replace(o,"$1")+"
    "},onSelect:function(){}};for(var c in e)e.hasOwnProperty(c)&&(l[c]=e[c]);for(var a="object"==typeof l.selector?[l.selector]:document.querySelectorAll(l.selector),u=0;u0?i.sc.scrollTop=n+i.sc.suggestionHeight+s-i.sc.maxHeight:0>n&&(i.sc.scrollTop=n+s)}else i.sc.scrollTop=0},o(window,"resize",i.updateSC),document.body.appendChild(i.sc),n("autocomplete-suggestion","mouseleave",function(){var e=i.sc.querySelector(".autocomplete-suggestion.selected");e&&setTimeout(function(){e.className=e.className.replace("selected","")},20)},i.sc),n("autocomplete-suggestion","mouseover",function(){var e=i.sc.querySelector(".autocomplete-suggestion.selected");e&&(e.className=e.className.replace("selected","")),this.className+=" selected"},i.sc),n("autocomplete-suggestion","mousedown",function(e){if(t(this,"autocomplete-suggestion")){var o=this.getAttribute("data-val");i.value=o,l.onSelect(e,o,this),i.sc.style.display="none"}},i.sc),i.blurHandler=function(){try{var e=document.querySelector(".autocomplete-suggestions:hover")}catch(t){var e=0}e?i!==document.activeElement&&setTimeout(function(){i.focus()},20):(i.last_val=i.value,i.sc.style.display="none",setTimeout(function(){i.sc.style.display="none"},350))},o(i,"blur",i.blurHandler);var r=function(e){var t=i.value;if(i.cache[t]=e,e.length&&t.length>=l.minChars){for(var o="",s=0;st||t>40)&&13!=t&&27!=t){var o=i.value;if(o.length>=l.minChars){if(o!=i.last_val){if(i.last_val=o,clearTimeout(i.timer),l.cache){if(o in i.cache)return void r(i.cache[o]);for(var s=1;s https://github.com/noelboss/featherlight/issues/317 +!function(u){"use strict";if(void 0!==u)if(u.fn.jquery.match(/-ajax/))"console"in window&&window.console.info("Featherlight needs regular jQuery, not the slim version.");else{var r=[],i=function(t){return r=u.grep(r,function(e){return e!==t&&0','
    ','",'
    '+n.loading+"
    ","
    ","
    "].join("")),o="."+n.namespace+"-close"+(n.otherClose?","+n.otherClose:"");return n.$instance=i.clone().addClass(n.variant),n.$instance.on(n.closeTrigger+"."+n.namespace,function(e){if(!e.isDefaultPrevented()){var t=u(e.target);("background"===n.closeOnClick&&t.is("."+n.namespace)||"anywhere"===n.closeOnClick||t.closest(o).length)&&(n.close(e),e.preventDefault())}}),this},getContent:function(){if(!1!==this.persist&&this.$content)return this.$content;var t=this,e=this.constructor.contentFilters,n=function(e){return t.$currentTarget&&t.$currentTarget.attr(e)},r=n(t.targetAttr),i=t.target||r||"",o=e[t.type];if(!o&&i in e&&(o=e[i],i=t.target&&r),i=i||n("href")||"",!o)for(var a in e)t[a]&&(o=e[a],i=t[a]);if(!o){var s=i;if(i=null,u.each(t.contentFilters,function(){return(o=e[this]).test&&(i=o.test(s)),!i&&o.regex&&s.match&&s.match(o.regex)&&(i=s),!i}),!i)return"console"in window&&window.console.error("Featherlight: no content filter found "+(s?' for "'+s+'"':" (no target specified)")),!1}return o.process.call(t,i)},setContent:function(e){return this.$instance.removeClass(this.namespace+"-loading"),this.$instance.toggleClass(this.namespace+"-iframe",e.is("iframe")),this.$instance.find("."+this.namespace+"-inner").not(e).slice(1).remove().end().replaceWith(u.contains(this.$instance[0],e[0])?"":e),this.$content=e.addClass(this.namespace+"-inner"),this},open:function(t){var n=this;if(n.$instance.hide().appendTo(n.root),!(t&&t.isDefaultPrevented()||!1===n.beforeOpen(t))){t&&t.preventDefault();var e=n.getContent();if(e)return r.push(n),s(!0),n.$instance.fadeIn(n.openSpeed),n.beforeContent(t),u.when(e).always(function(e){n.setContent(e),n.afterContent(t)}).then(n.$instance.promise()).done(function(){n.afterOpen(t)})}return n.$instance.detach(),u.Deferred().reject().promise()},close:function(e){var t=this,n=u.Deferred();return!1===t.beforeClose(e)?n.reject():(0===i(t).length&&s(!1),t.$instance.fadeOut(t.closeSpeed,function(){t.$instance.detach(),t.afterClose(e),n.resolve()})),n.promise()},resize:function(e,t){if(e&&t&&(this.$content.css("width","").css("height",""),this.$content.parent().width()');return n.onload=function(){r.naturalWidth=n.width,r.naturalHeight=n.height,t.resolve(r)},n.onerror=function(){t.reject(r)},n.src=e,t.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(e){return u(e)}},ajax:{regex:/./,process:function(e){var n=u.Deferred(),r=u("
    ").load(e,function(e,t){"error"!==t&&n.resolve(r.contents()),n.fail()});return n.promise()}},iframe:{process:function(e){var t=new u.Deferred,n=u("