Procházet zdrojové kódy

Rename news to about netboot.xyz

Displays version and retrieves upstream version to
let user know a new version may be available.
Antony Messerli před 5 roky
rodič
revize
92c03e2bf0

+ 52 - 0
roles/netbootxyz/templates/menu/about.ipxe.j2

@@ -0,0 +1,52 @@
+#!ipxe
+set esc:hex 1b
+set bold ${esc:string}[1m
+set ital ${esc:string}[3m
+set under ${esc:string}[4m
+set boldoff ${esc:string}[22m
+set italoff ${esc:string}[23m
+set underoff ${esc:string}[24m
+set fs_bla ${esc:string}[30m
+set fg_red ${esc:string}[31m
+set fg_gre ${esc:string}[32m
+set fg_yel ${esc:string}[33m
+set fg_blu ${esc:string}[34m
+set fg_mag ${esc:string}[35m
+set fg_cya ${esc:string}[36m
+set fg_whi ${esc:string}[37m
+
+:netabout
+echo Attempting to retrieve latest upstream version...
+chain https://boot.netboot.xyz/version.ipxe ||
+menu ${fg_cya}${bold}About netboot.xyz (Version: {{ boot_version }})
+item exit ${bold}Exit back to main menu...${boldoff}
+item --gap --  --------------------------------------------------------------------------
+item about ${fg_gre}${bold}Self Hosting and Live Booting - November 29, 2019
+item about ${fg_gre}${bold}Full Article: ${fg_whi}${bold}https://netboot.xyz/blog/
+item about
+item about ${fg_yel}${bold}* Self hosting options using Ansible and Docker (soon)
+item about ${fg_yel}${bold}* Live Boot options now available with more on the way
+item about ${fg_yel}${bold}${space}Allows you to PXE boot into a Live Desktop from Github
+item about ${fg_yel}${bold}* netboot.xyz repo moving to netbootxyz org on github
+item --gap --  --------------------------------------------------------------------------
+item about ${fg_cya}${bold}Follow us on Twitter: ${fg_whi}${bold}@netbootxyz
+item --gap --  --------------------------------------------------------------------------
+item about ${fg_gre}${bold}Join us on Discord: ${fg_whi}${bold}https://discord.gg/An6PA2a
+item --gap --  --------------------------------------------------------------------------
+item about ${fg_gre}${bold}Sponsorship: ${fg_whi}${bold}https://opencollective.com/netbootxyz
+item --gap --  --------------------------------------------------------------------------
+isset ${upstream_version} && goto display_version || goto skip_version
+:display_version
+iseq ${boot_version} ${upstream_version} || item --gap --  ${fg_gre}${bold}Latest netboot.xyz version available: ${fg_whi}${bold}${upstream_version}
+item --gap --  --------------------------------------------------------------------------
+:skip_version
+choose selected || goto exit
+goto ${selected}
+
+:about
+clear menu
+goto netabout
+
+:exit
+clear menu
+exit

+ 4 - 4
roles/netbootxyz/templates/menu/menu.ipxe.j2

@@ -54,8 +54,8 @@ iseq ${menu_utils} 1 && item utils-${platform} ${space} Utilities ||
 iseq ${arch} x86_64 && set bits 64 || set bits 32
 item changebits ${space} Architecture: ${arch} (${bits}bit)
 item shell ${space} iPXE shell
-item news ${space} netboot.xyz news
 item netinfo ${space} Network card info
+item about ${space} About netboot.xyz
 {% if sigs_menu | bool %}
 item --gap Signature Checks:
 item sig_check ${space} netboot.xyz [ enabled: ${sigs_enabled} ]
@@ -110,9 +110,9 @@ goto main_menu
 iseq ${img_sigs_enabled} true && set img_sigs_enabled false || set img_sigs_enabled true
 goto main_menu
 
-:news
-chain https://boot.netboot.xyz/news.ipxe ||
-chain news.ipxe || goto error
+:about
+chain https://boot.netboot.xyz/about.ipxe ||
+chain about.ipxe || goto error
 goto main_menu
 
 :custom-github

+ 0 - 45
roles/netbootxyz/templates/menu/news.ipxe.j2

@@ -1,45 +0,0 @@
-#!ipxe
-set esc:hex 1b
-set bold ${esc:string}[1m
-set ital ${esc:string}[3m
-set under ${esc:string}[4m
-set boldoff ${esc:string}[22m
-set italoff ${esc:string}[23m
-set underoff ${esc:string}[24m
-set fs_bla ${esc:string}[30m
-set fg_red ${esc:string}[31m
-set fg_gre ${esc:string}[32m
-set fg_yel ${esc:string}[33m
-set fg_blu ${esc:string}[34m
-set fg_mag ${esc:string}[35m
-set fg_cya ${esc:string}[36m
-set fg_whi ${esc:string}[37m
-
-:netnews
-menu ${fg_cya}${bold}netboot.xyz updates
-item exit ${bold}Exit back to main menu...${boldoff}
-item --gap --  --------------------------------------------------------------------------
-item news ${fg_gre}${bold}Self Hosting and Live Booting - November 29, 2019
-item news ${fg_gre}${bold}Full Article: ${fg_whi}${bold}https://netboot.xyz/blog/
-item news
-item news ${fg_yel}${bold}* Self hosting options using Ansible and Docker (soon)
-item news ${fg_yel}${bold}* Live Boot options now available with more on the way
-item news ${fg_yel}${bold}${space}Allows you to PXE boot into a Live Desktop from Github
-item news ${fg_yel}${bold}* netboot.xyz repo moving to netbootxyz org on github
-item --gap --  --------------------------------------------------------------------------
-item news ${fg_cya}${bold}Follow us on Twitter: ${fg_whi}${bold}@netbootxyz
-item --gap --  --------------------------------------------------------------------------
-item news ${fg_gre}${bold}Join us on Discord: ${fg_whi}${bold}https://discord.gg/An6PA2a
-item --gap --  --------------------------------------------------------------------------
-item news ${fg_gre}${bold}Sponsorship: ${fg_whi}${bold}https://opencollective.com/netbootxyz
-item --gap --  --------------------------------------------------------------------------
-choose selected || goto exit
-goto ${selected}
-
-:news
-clear menu
-goto netnews
-
-:exit
-clear menu
-exit