diff --git a/docs/_static/css/cookie-banner.css b/docs/_static/css/cookie-banner.css new file mode 100644 index 00000000..afcf7922 --- /dev/null +++ b/docs/_static/css/cookie-banner.css @@ -0,0 +1,82 @@ +/* Cookie policy styling WILL BE REMOVED when implementation of new theme with vanilla is implemented */ +.cookie-policy { + overflow: auto; + top: 35%; + z-index: 50; + position: fixed; +} + +dialog.cookie-policy { + background-color: var(--color-code-background); + color: var(--color-code-foreground); + height: auto; + max-height: 60vh; + max-width: 40rem; + padding: 0 1rem 0 1rem; + width: auto; +} + +header.p-modal__header { + margin-bottom: .5rem; +} + +header.p-modal__header::after { + background-color: #d9d9d9; + content: ""; + height: 1px; + left: 0; + margin-left: 1rem; + margin-right: 1rem; + position: absolute; + right: 0; +} + +h2#cookie-policy-title.p-modal__title { + align-self: flex-end; + font-size: 1.5rem; + font-style: normal; + font-weight: 275; + line-height: 2rem; + margin: 0 0 1.05rem 0; + padding: 0.45rem 0 0 0; +} + +.cookie-policy p { + font-size: 1rem; + line-height: 1.5rem; + margin-top: 0; + padding-top: .4rem; +} + +.cookie-policy p a { + text-decoration: none; + color: var(--color-link); +} +.cookie-policy button { + border-style: solid; + border-width: 1.5px; + cursor: pointer; + display: inline-block; + font-size: 1rem; + font-weight: 400; + justify-content: center; + line-height: 1.5rem; + padding: calc(.4rem - 1px) 1rem; + text-align: center; + text-decoration: none; + transition-duration: .1s; + transition-property: background-color,border-color; + transition-timing-function: cubic-bezier(0.55,0.055,0.675,0.19); +} + +.cookie-policy button { + background-color: #fff; + border-color: rgba(0,0,0,0.56); + color: #000; +} + +.cookie-policy .p-button--positive { + background-color: #0e8420; + border-color: #0e8420; + color: #fff; +} diff --git a/docs/_static/js/bundle.js b/docs/_static/js/bundle.js new file mode 100644 index 00000000..a79e20ca --- /dev/null +++ b/docs/_static/js/bundle.js @@ -0,0 +1 @@ +(()=>{"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function t(t){for(var n=1;ncookie policy.',buttonAccept:"Accept all and visit site",buttonManage:"Manage your tracker settings"},manager:{title:"Tracking choices",body1:"We use cookies to recognise visitors and remember your preferences.",body2:"They enhance user experience, personalise content and ads, provide social media features, measure campaign effectiveness, and analyse site traffic.",body3:"Select the types of trackers you consent to, both by us, and third parties.",body4:'Learn more at data privacy: cookie policy - you can change your choices at any time from the footer of the site.',acceptAll:"Accept all",acceptAllHelp:'This will switch all toggles "ON".',SavePreferences:"Save preferences"}},zh:{notification:{title:"您的追踪器设置",body1:"我们使用cookie和相似的方法来识别访问者和记住偏好设置。我们也用它们来衡量活动的效果和网站流量分析。",body2:"选择”接受“,您同意我们和受信的第三方来使用这些方式。",body3:'更多内容或者随时地变更您的同意选择,请点击我们的 cookie策略.',buttonAccept:"接受全部和访问网站",buttonManage:"管理您的追踪器设置"},manager:{title:"追踪选项",body1:"我们使用cookie来识别访问者和记住您的偏好设置",body2:"它们增强用户体验,使内容和广告个性化,提供社交媒体功能,衡量活动效果和网站流量分析。",body3:"选择您同意授予我们和受信的第三方的追踪类型。",body4:'点击数据隐私:cookie策略了解更多,您可以在网站底部随时更改您的选择。',acceptAll:"接受全部",acceptAllHelp:"这将把全部开关变为”开启“。",SavePreferences:"保存偏好设置"}},ja:{notification:{title:"トラッキング機能の設定",body1:"当社は、当社のウェブサイトを訪問された方の識別や傾向の記録を行うために、クッキーおよび類似の手法を利用します。また、キャンペーンの効果の測定やサイトのトラフィックの分析にもクッキーを利用します。",body2:"「同意」を選択すると、当社および信頼できる第三者による上記の手法の利用に同意したものとみなされます。",body3:'詳細または同意の変更については、いつでも当社のクッキーに関するポリシーをご覧になることができます。',buttonAccept:"すべて同意してサイトにアクセス",buttonManage:"トラッキング機能の設定の管理"},manager:{title:"トラッキング機能の選択",body1:"当社は、当社のウェブサイトを訪問された方の識別や傾向の記録を行うために、クッキーを利用します。",body2:"クッキーは、お客様の利便性の向上、お客様に合わせたコンテンツや広告の表示、ソーシャルメディア機能の提供、キャンペーンの効果の測定、サイトのトラフィックの分析に役立ちます。",body3:"当社および第三者によるトラッキング機能のタイプから、お客様が同意されるものをお選びください。",body4:'詳細は、データプライバシー:クッキーに関するポリシーをご覧ください。お客様が選んだ設定は、本サイトの下部からいつでも変更できます。',acceptAll:"すべて同意",acceptAllHelp:"同意されるとすべての設定が「ON」に切り替わります。",SavePreferences:"設定を保存"}}},d={ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied",functionality_storage:"denied",personalization_storage:"denied",security_storage:"denied"},u=["security_storage"],p=["ad_storage","ad_user_data","ad_personalization","analytics_storage"],f=["functionality_storage","personalization_storage"],h=["ad_storage","ad_user_data","ad_personalization","analytics_storage","functionality_storage","personalization_storage"],y=function(e){var t=new Date;t.setTime(t.getTime()+31536e6);var n="expires="+t.toUTCString();document.cookie="_cookies_accepted="+e+"; "+n+"; samesite=lax;path=/;",S(e)&&_()},b=function(){for(var e=document.cookie.split(";"),t="",n="",o=0;o\n ")}},{key:"render",value:function(e){this.container.innerHTML=this.getNotificationMarkup(e),this.initaliseListeners()}},{key:"initaliseListeners",value:function(){var e=this;this.container.querySelector(".js-close").addEventListener("click",(function(t){y("all"),v("all"),e.destroyComponent()})),this.container.querySelector(".js-manage").addEventListener("click",(function(t){e.renderManager()}))}}]),e}(),L=function(){function e(t,n,i){o(this,e),this.language=i,this.id=t.id,this.title=m(t,i).title,this.description=m(t,i).description,this.enableSwitcher=t.enableSwitcher,this.container=n,this.element,this.render()}return a(e,[{key:"render",value:function(){var e=this.cookieIsTrue(),t=document.createElement("div");t.classList.add("u-sv3"),t.innerHTML="\n ".concat(''),"\n

",this.title,"

\n

").concat(this.description,"

"),this.container.appendChild(t),this.element=t.querySelector(".js-".concat(this.id,"-switch"))}},{key:"cookieIsTrue",value:function(){var e=b();return!(!e||e!==this.id&&"all"!==e)||e&&e===this.id}},{key:"isChecked",value:function(){return!!this.element&&this.element.checked}},{key:"getId",value:function(){return this.id}}]),e}(),E=function(){function e(t,n){o(this,e),this.container=t,this.controlsStore=[],this.destroyComponent=n}return a(e,[{key:"getManagerMarkup",value:function(e){var t=g(e).manager;return'\n ")}},{key:"render",value:function(e){var t=this;this.container.innerHTML=this.getManagerMarkup(e);var n=this.container.querySelector(".controls");s.forEach((function(o){var i=new L(o,n,e);t.controlsStore.push(i)})),this.initaliseListeners()}},{key:"initaliseListeners",value:function(){var e=this;this.container.querySelector(".js-close").addEventListener("click",(function(){y("all"),v("all"),e.destroyComponent()})),this.container.querySelector(".js-save-preferences").addEventListener("click",(function(){e.savePreferences(),e.destroyComponent()}))}},{key:"savePreferences",value:function(){var e=this.controlsStore.filter((function(e){return e.isChecked()}));this.controlsStore.length===e.length?y("all"):this.controlsStore.forEach((function(e){e.isChecked()&&y(e.getId())})),function(e){var n=e.filter((function(e){return e.isChecked()})),o=t({},d);n.forEach((function(e){o=k(o,e.id)})),w(o)}(this.controlsStore)}}]),e}();window.gtag||(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},window.gtag("consent","default",d));var O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null,n=document.documentElement.lang,o=!1,i=function(e){e&&e.preventDefault(),null===t&&((t=document.createElement("dialog")).classList.add("cookie-policy"),t.setAttribute("open",!0),document.body.appendChild(t),new j(t,a,r).render(n),document.getElementById("cookie-policy-button-accept").focus())},a=function(){new E(t,r).render(n)},r=function(){"function"==typeof e&&e(),document.body.removeChild(t),t=null},c=function(){if(!o){var e;o=!0,(e=b())&&v(e);var t=document.querySelector(".js-revoke-cookie-manager");t&&t.addEventListener("click",i),function(){var e=b();return!e||"true"==e}()&&"hide"!==new URLSearchParams(window.location.search).get("cp")&&i()}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c,!1):c()},P=function(e){document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"))},A=P("_cookies_accepted");function M(){var e,t;if(("all"===(null===(e=A=P("_cookies_accepted"))||void 0===e?void 0:e[2])||"performance"===(null===(t=A)||void 0===t?void 0:t[2]))&&!P("user_id")){var n=([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)}));document.cookie="user_id="+n+";max-age=31536000;",dataLayer.push({user_id:n})}}A?(M(),O()):O(M)})(); diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html new file mode 100644 index 00000000..0143bf3c --- /dev/null +++ b/docs/_templates/footer.html @@ -0,0 +1,92 @@ + +
+
+ {%- if show_copyright %} + + {%- endif %} + + {# mod: removed "Made with" #} + + {%- if last_updated -%} +
+ {% trans last_updated=last_updated|e -%} + Last updated on {{ last_updated }} + {%- endtrans -%} +
+ {%- endif %} + + {%- if show_source and has_source and sourcename %} + + {%- endif %} +
+
+ {% if has_contributor_listing and display_contributors and pagename and page_source_suffix %} + {% set contributors = get_contributors_for_file(pagename, page_source_suffix) %} + {% if contributors %} + {% if contributors | length > 1 %} + Thanks to the {{ contributors |length }} contributors! + {% else %} + Thanks to our contributor! + {% endif %} +
+ + {% endif %} + {% endif %} +
+ +
diff --git a/docs/_templates/header.html b/docs/_templates/header.html new file mode 100644 index 00000000..7dc37188 --- /dev/null +++ b/docs/_templates/header.html @@ -0,0 +1,75 @@ + diff --git a/docs/conf.py b/docs/conf.py index 44ce5829..0face926 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -161,8 +161,8 @@ # Template and asset locations -html_static_path = [".sphinx/_static"] -templates_path = [".sphinx/_templates"] +html_static_path = ["_static"] +templates_path = ["_templates"] ############# @@ -253,6 +253,7 @@ html_css_files = [ "css/pdf.css", + "css/cookie-banner.css", ] # Add redirects, so they can be updated here to land with docs being moved @@ -262,7 +263,9 @@ # Adds custom JavaScript files, located under 'html_static_path' # html_js_files = [] - +html_js_files = [ + "js/bundle.js" +] # Specifies a reST snippet to be appended to each .rst file diff --git a/docs/how-to-guides/manage-ubuntu-core/add-a-system-user.md b/docs/how-to-guides/manage-ubuntu-core/add-a-system-user.md index 72404e1b..b363d7db 100644 --- a/docs/how-to-guides/manage-ubuntu-core/add-a-system-user.md +++ b/docs/how-to-guides/manage-ubuntu-core/add-a-system-user.md @@ -63,6 +63,8 @@ When a model assertion lacks a `system-user-authority` field, the system-user as - a key registered to the store account specified by the `brand-id` field (_bJzr2XzZg6Qv6Z53dsjhg20975Skjs_ in our example) - the key that's part of the [account-key](/reference/assertions/account-key) assertion when the system-user assertion is submitted to the device + +(specifying-system-user-authority)= #### Specifying system-user-authority The optional `system-user-authority` field can be added to a model assertion to list a set of account IDs that are authorised to sign system-user assertions for any image built with the assertion: diff --git a/docs/reference/assertions/model.md b/docs/reference/assertions/model.md index 343e9aa7..53dafe80 100644 --- a/docs/reference/assertions/model.md +++ b/docs/reference/assertions/model.md @@ -63,7 +63,7 @@ The index for this assertion is the tuple \<`series`, `brand-id`, `model`\> and * `prefer-encrypted`: do encrypt if the hardware supports it. * `encrypted`: ensure encryption is used and fail if the device does not support it. -- `system-user-authority` is used to list a set of account IDs that are authorised to sign system user assertions for any image built with the assertion. See [Specifying system-user-authority](/how-to-guides/manage-ubuntu-core/add-a-system-user.md#specifying-system-user-authority) for more details. +- `system-user-authority` is used to list a set of account IDs that are authorised to sign system user assertions for any image built with the assertion. See {ref}`specifying-system-user-authority` for more details. - `timestamp` can be generated with the ` date -Iseconds --utc` command. @@ -101,7 +101,7 @@ They're added as a structured list with a single `presence` attribute for whethe The modes for which the component must be present can be specified as well. Syntax is as follows: -```yaml +```text components: # optional : presence: "optional"|"required" @@ -124,7 +124,7 @@ The modes for which the component must be present can be specified as well. Synt * `prefer-enforce` initially enforces the validation-set before permitting it to be forgotten. The following is a sample _validation-sets_ declaration: - ```json + ```text "validation-sets": [ { "account-id": , diff --git a/docs/tutorials/build-your-first-image/create-a-model.md b/docs/tutorials/build-your-first-image/create-a-model.md index 89cd2733..84e55f13 100644 --- a/docs/tutorials/build-your-first-image/create-a-model.md +++ b/docs/tutorials/build-your-first-image/create-a-model.md @@ -60,7 +60,6 @@ This needs to be provided at the end of the process; we’ll come back to this. "default-channel": "24/stable", "id": "YbGa9O3dAXl88YLI6Y1bGG74pwBxZyKg" }, - ... ``` This section lists the snaps to be included in the image. **pi** (shown above), **pi-kernel**, **core24** and **snapd** are the four snaps required for a functioning Ubuntu Core device. The additional **console-conf** snap is required for Ubuntu Core 24 devices. diff --git a/docs/tutorials/try-pre-built-images/install-on-a-device/install-on-mediatek.md b/docs/tutorials/try-pre-built-images/install-on-a-device/install-on-mediatek.md index 8c23dcbe..f2a960a5 100644 --- a/docs/tutorials/try-pre-built-images/install-on-a-device/install-on-mediatek.md +++ b/docs/tutorials/try-pre-built-images/install-on-a-device/install-on-mediatek.md @@ -271,9 +271,9 @@ You can now connect to your Ubuntu Core machine with the _ssh_ command and your For example: -```bash +```text $ ssh user@10.0.2.15 -The authenticity of host '192.168.1.68 (192.168.1.68)' can't be established. +The authenticity of host "192.168.1.68 (192.168.1.68)" can't be established. ED25259 key fingerprint is SHA256:VD5KH7hM5RxQ15mM70zyJvgmg. This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes diff --git a/docs/tutorials/try-pre-built-images/install-on-a-device/install-on-renesas.md b/docs/tutorials/try-pre-built-images/install-on-a-device/install-on-renesas.md index 2c288412..b039bb89 100644 --- a/docs/tutorials/try-pre-built-images/install-on-a-device/install-on-renesas.md +++ b/docs/tutorials/try-pre-built-images/install-on-a-device/install-on-renesas.md @@ -236,7 +236,7 @@ You can now connect to your Ubuntu Core machine with the _ssh_ command and your For example: -```bash +```text $ ssh user@10.0.2.15 The authenticity of host '192.168.1.68 (192.168.1.68)' can't be established. ED25259 key fingerprint is SHA256:VD5KH7hM5RxQ15mM70zyJvgmg. diff --git a/docs/tutorials/try-pre-built-images/install-on-a-device/use-raspberry-pi-imager.md b/docs/tutorials/try-pre-built-images/install-on-a-device/use-raspberry-pi-imager.md index 94c77beb..c4384401 100644 --- a/docs/tutorials/try-pre-built-images/install-on-a-device/use-raspberry-pi-imager.md +++ b/docs/tutorials/try-pre-built-images/install-on-a-device/use-raspberry-pi-imager.md @@ -156,7 +156,7 @@ You can now connect to your Ubuntu Core machine with the _ssh_ command and your For example: -```no-highlight +```text $ ssh user@10.0.2.15 The authenticity of host '192.168.1.68 (192.168.1.68)' can't be established. ED25259 key fingerprint is SHA256:VD5KH7hM5RxQ15mM70zyJvgmg. diff --git a/docs/tutorials/try-pre-built-images/install-on-a-device/use-the-dd-command.md b/docs/tutorials/try-pre-built-images/install-on-a-device/use-the-dd-command.md index 3422706f..ceb3d3b9 100644 --- a/docs/tutorials/try-pre-built-images/install-on-a-device/use-the-dd-command.md +++ b/docs/tutorials/try-pre-built-images/install-on-a-device/use-the-dd-command.md @@ -167,7 +167,7 @@ Each time the device starts up, if a display connected it will show its various You can now connect to your Ubuntu Core machine with the _ssh_ command and your username followed by the IP address of your device: -```no-highlight +```text $ ssh account@10.0.2.15 The authenticity of host '10.0.2.15 (10.0.2.15)' can't be established. ECDSA key fingerprint is SHA256:EiZUZG50l1Dvr1/aR940EX/lKW4qLfkRiMaMFwuzuf8