CINXE.COM
Redirection — Kent Archaeological Society
<!doctype html> <html xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" lang="en-GB" > <head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- This is Squarespace. --><!-- kentarchaeology --> <base href=""> <meta charset="utf-8" /> <title>Redirection — Kent Archaeological Society</title> <meta http-equiv="Accept-CH" content="Sec-CH-UA-Platform-Version, Sec-CH-UA-Model" /><link rel="icon" type="image/x-icon" href="https://images.squarespace-cdn.com/content/v1/65df7835178a9d2b20f8d501/c421bdd0-0fb6-41e4-b081-a5aa7358a4a9/favicon.ico?format=100w"/> <link rel="canonical" href="https://www.kentarchaeology.org.uk/archive"/> <meta property="og:site_name" content="Kent Archaeological Society"/> <meta property="og:title" content="Redirection — Kent Archaeological Society"/> <meta property="og:url" content="https://www.kentarchaeology.org.uk/archive"/> <meta property="og:type" content="website"/> <meta itemprop="name" content="Redirection — Kent Archaeological Society"/> <meta itemprop="url" content="https://www.kentarchaeology.org.uk/archive"/> <meta name="twitter:title" content="Redirection — Kent Archaeological Society"/> <meta name="twitter:url" content="https://www.kentarchaeology.org.uk/archive"/> <meta name="twitter:card" content="summary"/> <meta name="description" content="" /> <link rel="preconnect" href="https://images.squarespace-cdn.com"> <script type="text/javascript" crossorigin="anonymous" defer="defer" nomodule="nomodule" src="//assets.squarespace.com/@sqs/polyfiller/1.6/legacy.js"></script> <script type="text/javascript" crossorigin="anonymous" defer="defer" src="//assets.squarespace.com/@sqs/polyfiller/1.6/modern.js"></script> <script type="text/javascript">SQUARESPACE_ROLLUPS = {};</script> <script>(function(rollups, name) { if (!rollups[name]) { rollups[name] = {}; } rollups[name].js = ["//assets.squarespace.com/universal/scripts-compressed/extract-css-runtime-cf51977555a15f8a54bc-min.en-US.js"]; })(SQUARESPACE_ROLLUPS, 'squarespace-extract_css_runtime');</script> <script crossorigin="anonymous" src="//assets.squarespace.com/universal/scripts-compressed/extract-css-runtime-cf51977555a15f8a54bc-min.en-US.js" defer ></script><script>(function(rollups, name) { if (!rollups[name]) { rollups[name] = {}; } rollups[name].js = ["//assets.squarespace.com/universal/scripts-compressed/extract-css-moment-js-vendor-6c569122bfa66a51a056-min.en-US.js"]; })(SQUARESPACE_ROLLUPS, 'squarespace-extract_css_moment_js_vendor');</script> <script crossorigin="anonymous" src="//assets.squarespace.com/universal/scripts-compressed/extract-css-moment-js-vendor-6c569122bfa66a51a056-min.en-US.js" defer ></script><script>(function(rollups, name) { if (!rollups[name]) { rollups[name] = {}; } rollups[name].js = ["//assets.squarespace.com/universal/scripts-compressed/cldr-resource-pack-32136deb9638cc6130b2-min.en-US.js"]; })(SQUARESPACE_ROLLUPS, 'squarespace-cldr_resource_pack');</script> <script crossorigin="anonymous" src="//assets.squarespace.com/universal/scripts-compressed/cldr-resource-pack-32136deb9638cc6130b2-min.en-US.js" defer ></script><script>(function(rollups, name) { if (!rollups[name]) { rollups[name] = {}; } rollups[name].js = ["//assets.squarespace.com/universal/scripts-compressed/common-vendors-stable-61293f01d648eef165fc-min.en-US.js"]; })(SQUARESPACE_ROLLUPS, 'squarespace-common_vendors_stable');</script> <script crossorigin="anonymous" src="//assets.squarespace.com/universal/scripts-compressed/common-vendors-stable-61293f01d648eef165fc-min.en-US.js" defer ></script><script>(function(rollups, name) { if (!rollups[name]) { rollups[name] = {}; } rollups[name].js = ["//assets.squarespace.com/universal/scripts-compressed/common-vendors-be0091dc488b10891ed6-min.en-US.js"]; })(SQUARESPACE_ROLLUPS, 'squarespace-common_vendors');</script> <script crossorigin="anonymous" src="//assets.squarespace.com/universal/scripts-compressed/common-vendors-be0091dc488b10891ed6-min.en-US.js" defer ></script><script>(function(rollups, name) { if (!rollups[name]) { rollups[name] = {}; } rollups[name].js = ["//assets.squarespace.com/universal/scripts-compressed/common-b33702450f88b3268daa-min.en-US.js"]; })(SQUARESPACE_ROLLUPS, 'squarespace-common');</script> <script crossorigin="anonymous" src="//assets.squarespace.com/universal/scripts-compressed/common-b33702450f88b3268daa-min.en-US.js" defer ></script><script>(function(rollups, name) { if (!rollups[name]) { rollups[name] = {}; } rollups[name].js = ["//assets.squarespace.com/universal/scripts-compressed/commerce-d4816d6d63cafdeef4a2-min.en-US.js"]; })(SQUARESPACE_ROLLUPS, 'squarespace-commerce');</script> <script crossorigin="anonymous" src="//assets.squarespace.com/universal/scripts-compressed/commerce-d4816d6d63cafdeef4a2-min.en-US.js" defer ></script><script>(function(rollups, name) { if (!rollups[name]) { rollups[name] = {}; } rollups[name].css = ["//assets.squarespace.com/universal/styles-compressed/commerce-5167cc0cf8ccd09a55ab-min.en-US.css"]; })(SQUARESPACE_ROLLUPS, 'squarespace-commerce');</script> <link rel="stylesheet" type="text/css" href="//assets.squarespace.com/universal/styles-compressed/commerce-5167cc0cf8ccd09a55ab-min.en-US.css"><script>(function(rollups, name) { if (!rollups[name]) { rollups[name] = {}; } rollups[name].js = ["//assets.squarespace.com/universal/scripts-compressed/user-account-core-482ae9ec6408c0fe1e8c-min.en-US.js"]; })(SQUARESPACE_ROLLUPS, 'squarespace-user_account_core');</script> <script crossorigin="anonymous" src="//assets.squarespace.com/universal/scripts-compressed/user-account-core-482ae9ec6408c0fe1e8c-min.en-US.js" defer ></script><script>(function(rollups, name) { if (!rollups[name]) { rollups[name] = {}; } rollups[name].css = ["//assets.squarespace.com/universal/styles-compressed/user-account-core-b6e8cafbf34b05da5c2b-min.en-US.css"]; })(SQUARESPACE_ROLLUPS, 'squarespace-user_account_core');</script> <link rel="stylesheet" type="text/css" href="//assets.squarespace.com/universal/styles-compressed/user-account-core-b6e8cafbf34b05da5c2b-min.en-US.css"><script data-name="static-context">Static = window.Static || {}; Static.SQUARESPACE_CONTEXT = {"betaFeatureFlags":["member_areas_feature","hideable_header_footer","commerce_site_visitor_metrics","campaigns_thumbnail_layout","nested_categories","campaigns_discount_section_in_automations","override_block_styles","accounting_orders_sync","gdpr_cookie_banner","visitor_react_forms","blueprint_content_replacement","hideable_header_footer_for_videos","campaigns_new_image_layout_picker","hideable_header_footer_for_courses","campaigns_black_friday_banners","hideable_header_footer_for_memberareas","campaigns_global_uc_ab","new_stacked_index","themes","collection_typename_switching","campaigns_import_discounts","fluid_engine","supports_versioned_template_assets","hide_header_footer_beta","i18n_beta_website_locales","campaigns_discount_section_in_blasts","toggle_preview_new_shortcut","is_feature_gate_refresh_enabled","fluid_engine_clean_up_grid_contextual_change","pages_panel_v3_search_bar","nested_categories_migration_enabled","contacts_and_campaigns_redesign","scripts_defer","unify_edit_mode_p2","commerce_clearpay","marketing_landing_page","enable_css_variable_tweaks"],"videoAssetsFeatureFlags":["mux-data-video-collection","mux-data-course-collection"],"facebookAppId":"314192535267336","facebookApiVersion":"v6.0","rollups":{"squarespace-announcement-bar":{"js":"//assets.squarespace.com/universal/scripts-compressed/announcement-bar-abc247145d9c909b7ca1-min.en-US.js"},"squarespace-audio-player":{"css":"//assets.squarespace.com/universal/styles-compressed/audio-player-ef238f99d44a3bdc6fbe-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/audio-player-7b2d6f5ce8ae62cf892f-min.en-US.js"},"squarespace-blog-collection-list":{"css":"//assets.squarespace.com/universal/styles-compressed/blog-collection-list-8ec841cacfb75d4282f4-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/blog-collection-list-44fda292525bdeb0ee8a-min.en-US.js"},"squarespace-calendar-block-renderer":{"css":"//assets.squarespace.com/universal/styles-compressed/calendar-block-renderer-b15e2d46a617c8add4b4-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/calendar-block-renderer-ba9e797b1c6edb9a3bac-min.en-US.js"},"squarespace-chartjs-helpers":{"css":"//assets.squarespace.com/universal/styles-compressed/chartjs-helpers-9e75b5d75bb5cb4c1f67-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/chartjs-helpers-6f4b03f58cff68354645-min.en-US.js"},"squarespace-comments":{"css":"//assets.squarespace.com/universal/styles-compressed/comments-a0d9356d7c1596ab2c53-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/comments-80a567d7afca7ea1dbfe-min.en-US.js"},"squarespace-custom-css-popup":{"css":"//assets.squarespace.com/universal/styles-compressed/custom-css-popup-d6e0f953c836d9289b10-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/custom-css-popup-73cf670716b518a340d3-min.en-US.js"},"squarespace-dialog":{"css":"//assets.squarespace.com/universal/styles-compressed/dialog-2dcac307baebe70727dc-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/dialog-dbb8daeadaf90e62b274-min.en-US.js"},"squarespace-events-collection":{"css":"//assets.squarespace.com/universal/styles-compressed/events-collection-b15e2d46a617c8add4b4-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/events-collection-297bf44c7cd0c7f15d78-min.en-US.js"},"squarespace-form-rendering-utils":{"js":"//assets.squarespace.com/universal/scripts-compressed/form-rendering-utils-a92219a77cf6d4679390-min.en-US.js"},"squarespace-forms":{"css":"//assets.squarespace.com/universal/styles-compressed/forms-b952cddb94c5d471b8d3-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/forms-49fd9d5237aa589917dd-min.en-US.js"},"squarespace-gallery-collection-list":{"css":"//assets.squarespace.com/universal/styles-compressed/gallery-collection-list-8ec841cacfb75d4282f4-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/gallery-collection-list-dabc951e1bbbe8467525-min.en-US.js"},"squarespace-image-zoom":{"css":"//assets.squarespace.com/universal/styles-compressed/image-zoom-8ec841cacfb75d4282f4-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/image-zoom-485cb3cf26fda8199e47-min.en-US.js"},"squarespace-pinterest":{"css":"//assets.squarespace.com/universal/styles-compressed/pinterest-8ec841cacfb75d4282f4-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/pinterest-7ad9f70c56d9c6b0ae65-min.en-US.js"},"squarespace-popup-overlay":{"css":"//assets.squarespace.com/universal/styles-compressed/popup-overlay-e89b4cc96c222ed66c64-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/popup-overlay-ece7db5c4bfceb54a50a-min.en-US.js"},"squarespace-product-quick-view":{"css":"//assets.squarespace.com/universal/styles-compressed/product-quick-view-2f87c3dcb76ca485179d-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/product-quick-view-d51df5b3db530fb8427d-min.en-US.js"},"squarespace-products-collection-item-v2":{"css":"//assets.squarespace.com/universal/styles-compressed/products-collection-item-v2-8ec841cacfb75d4282f4-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/products-collection-item-v2-1ed64b36a5caefb0bf3d-min.en-US.js"},"squarespace-products-collection-list-v2":{"css":"//assets.squarespace.com/universal/styles-compressed/products-collection-list-v2-8ec841cacfb75d4282f4-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/products-collection-list-v2-91090125416a47e4fecb-min.en-US.js"},"squarespace-search-page":{"css":"//assets.squarespace.com/universal/styles-compressed/search-page-917382e71b023cec7555-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/search-page-9f4098985bf13af25db5-min.en-US.js"},"squarespace-search-preview":{"js":"//assets.squarespace.com/universal/scripts-compressed/search-preview-4e7434a694d83d8766a0-min.en-US.js"},"squarespace-simple-liking":{"css":"//assets.squarespace.com/universal/styles-compressed/simple-liking-4279cc7bb78333b8db43-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/simple-liking-f5b368f59d68ab9f9480-min.en-US.js"},"squarespace-social-buttons":{"css":"//assets.squarespace.com/universal/styles-compressed/social-buttons-3a7d186e7e5e3b30911b-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/social-buttons-b71ef5af6c65212fb342-min.en-US.js"},"squarespace-tourdates":{"css":"//assets.squarespace.com/universal/styles-compressed/tourdates-8ec841cacfb75d4282f4-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/tourdates-22e5cff21f07efe64af0-min.en-US.js"},"squarespace-website-overlays-manager":{"css":"//assets.squarespace.com/universal/styles-compressed/website-overlays-manager-efd3c12d460f58781eb3-min.en-US.css","js":"//assets.squarespace.com/universal/scripts-compressed/website-overlays-manager-db7ec709521a62f0b755-min.en-US.js"}},"pageType":100,"website":{"id":"65df7835178a9d2b20f8d501","identifier":"kentarchaeology","websiteType":4,"contentModifiedOn":1732809574995,"cloneable":false,"hasBeenCloneable":false,"siteStatus":{},"language":"en-GB","timeZone":"Europe/London","machineTimeZoneOffset":0,"timeZoneOffset":0,"timeZoneAbbr":"GMT","siteTitle":"Kent Archaeological Society","fullSiteTitle":"Redirection \u2014 Kent Archaeological Society","siteDescription":"","logoImageId":"65df7a8d9f78b1738885ed6a","shareButtonOptions":{"7":true,"8":true,"6":true,"2":true,"4":true,"1":true,"3":true},"logoImageUrl":"//images.squarespace-cdn.com/content/v1/65df7835178a9d2b20f8d501/d3983e70-cd7c-46a7-aed2-10e0e96d0bd8/kas-logo.png","authenticUrl":"https://www.kentarchaeology.org.uk","internalUrl":"https://kentarchaeology.squarespace.com","baseUrl":"https://www.kentarchaeology.org.uk","primaryDomain":"www.kentarchaeology.org.uk","sslSetting":3,"isHstsEnabled":true,"socialAccounts":[{"serviceId":64,"screenname":"Instagram","addedOn":1709144117956,"profileUrl":"https://www.instagram.com/kentarchaeologicalsociety_kas","iconEnabled":true,"serviceName":"instagram-unauth"},{"serviceId":60,"screenname":"Facebook","addedOn":1709208822157,"profileUrl":"https://www.facebook.com/theKentArchaeologicalSociety1857/","iconEnabled":true,"serviceName":"facebook-unauth"},{"serviceId":69,"screenname":"YouTube","addedOn":1709208863472,"profileUrl":"https://www.youtube.com/channel/UCHBQA8tx6caQAdOU9Jb0yWw","iconEnabled":true,"serviceName":"youtube-unauth"},{"serviceId":82,"screenname":"TikTok","addedOn":1721495113692,"profileUrl":"https://www.tiktok.com/@kent.archaeologic","iconEnabled":true,"serviceName":"tiktok-unauth"},{"serviceId":74,"screenname":"URL","addedOn":1709208893267,"profileUrl":"https://sketchfab.com/kentarchaeologicalsociety","iconEnabled":true,"serviceName":"url"},{"serviceId":74,"screenname":"URL","addedOn":1712216778215,"profileUrl":"https://www.kentarchaeology.org.uk/search","iconEnabled":true,"serviceName":"url"},{"serviceId":74,"screenname":"URL","addedOn":1712216840904,"profileUrl":"https://www.kentarchaeology.org.uk/contact","iconEnabled":true,"serviceName":"url"},{"serviceId":74,"screenname":"URL","addedOn":1713259390634,"profileUrl":"https://www.kentarchaeology.org.uk/join","iconEnabled":true,"serviceName":"url"},{"serviceId":74,"screenname":"URL","addedOn":1721293068254,"profileUrl":"https://www.kentarchaeology.org.uk/stores","iconEnabled":true,"serviceName":"url"},{"serviceId":74,"screenname":"URL","addedOn":1714596296118,"profileUrl":"https://www.kentarchaeology.org.uk/support","iconEnabled":true,"serviceName":"url"}],"typekitId":"","statsMigrated":false,"imageMetadataProcessingEnabled":false,"screenshotId":"ced12e9ea27a46121619ac871f281c05da0590eb68cffb44d9937f4afb2108eb","captchaSettings":{"enabledForDonations":false},"showOwnerLogin":false},"websiteSettings":{"id":"65df7835178a9d2b20f8d51c","websiteId":"65df7835178a9d2b20f8d501","subjects":[],"country":"GB","state":"ENG","simpleLikingEnabled":true,"mobileInfoBarSettings":{"isContactEmailEnabled":false,"isContactPhoneNumberEnabled":false,"isLocationEnabled":false,"isBusinessHoursEnabled":false},"announcementBarSettings":{"style":1,"text":"<p class=\"\" data-rte-preserve-empty=\"true\" style=\"white-space:pre-wrap;\"></p>"},"commentLikesAllowed":true,"commentAnonAllowed":true,"commentThreaded":true,"commentApprovalRequired":true,"commentAvatarsOn":true,"commentSortType":2,"commentFlagThreshold":0,"commentFlagsAllowed":true,"commentEnableByDefault":true,"commentDisableAfterDaysDefault":0,"disqusShortname":"","commentsEnabled":true,"businessHours":{},"storeSettings":{"returnPolicy":null,"termsOfService":null,"privacyPolicy":null,"expressCheckout":false,"continueShoppingLinkUrl":"/","useLightCart":false,"showNoteField":false,"shippingCountryDefaultValue":"GB","billToShippingDefaultValue":false,"showShippingPhoneNumber":true,"isShippingPhoneRequired":false,"showBillingPhoneNumber":true,"isBillingPhoneRequired":false,"currenciesSupported":["USD","ARS","AUD","BRL","CAD","CHF","COP","CZK","DKK","EUR","GBP","HKD","IDR","ILS","INR","JPY","MXN","MYR","NOK","NZD","PHP","PLN","RUB","SEK","SGD","THB","ZAR"],"defaultCurrency":"GBP","selectedCurrency":"GBP","measurementStandard":1,"showCustomCheckoutForm":false,"checkoutPageMarketingOptInEnabled":true,"enableMailingListOptInByDefault":false,"sameAsRetailLocation":false,"merchandisingSettings":{"scarcityEnabledOnProductItems":false,"scarcityEnabledOnProductBlocks":false,"scarcityMessageType":"DEFAULT_SCARCITY_MESSAGE","scarcityThreshold":10,"multipleQuantityAllowedForServices":true,"restockNotificationsEnabled":false,"restockNotificationsMailingListSignUpEnabled":false,"relatedProductsEnabled":false,"relatedProductsOrdering":"random","soldOutVariantsDropdownDisabled":false,"productComposerOptedIn":false,"productComposerABTestOptedOut":false,"productReviewsEnabled":false},"minimumOrderSubtotalEnabled":false,"minimumOrderSubtotal":{"currency":"GBP","value":"0.00"},"isLive":true,"multipleQuantityAllowedForServices":true},"useEscapeKeyToLogin":false,"ssBadgeType":1,"ssBadgePosition":4,"ssBadgeVisibility":1,"ssBadgeDevices":1,"pinterestOverlayOptions":{"mode":"disabled"},"ampEnabled":false,"userAccountsSettings":{"loginAllowed":true,"signupAllowed":true}},"cookieSettings":{"isCookieBannerEnabled":true,"isRestrictiveCookiePolicyEnabled":false,"cookieBannerText":"<p class=\"\" style=\"white-space:pre-wrap;\">By using this website, you agree to our use of cookies. We use cookies to provide you with a great experience and to help our website run effectively. See the Society Privacy Policy at: www.kentarchaeology.org.uk/privacy</p>","cookieBannerTheme":"DARK","cookieBannerThemeName":"black","cookieBannerVariant":"BAR","cookieBannerPosition":"BOTTOM","cookieBannerCtaVariant":"ICON","cookieBannerCtaText":"Accept","cookieBannerAcceptType":"OPT_IN","cookieBannerOptOutCtaText":"Decline","cookieBannerHasOptOut":false,"cookieBannerHasManageCookies":false,"cookieBannerSavedPreferencesLayout":"PILL"},"websiteCloneable":false,"collection":{"title":"Redirection","id":"6623dfd78d02b37db1139c65","fullUrl":"/archive","type":10,"permissionType":1},"subscribed":false,"appDomain":"squarespace.com","templateTweakable":true,"tweakJSON":{"form-use-theme-colors":"true","header-logo-height":"50px","header-mobile-logo-max-height":"30px","header-vert-padding":"1vw","header-width":"Full","maxPageWidth":"1920px","pagePadding":"2vw","tweak-blog-alternating-side-by-side-image-aspect-ratio":"1:1 Square","tweak-blog-alternating-side-by-side-image-spacing":"6%","tweak-blog-alternating-side-by-side-meta-spacing":"20px","tweak-blog-alternating-side-by-side-primary-meta":"Categories","tweak-blog-alternating-side-by-side-read-more-spacing":"20px","tweak-blog-alternating-side-by-side-secondary-meta":"Date","tweak-blog-basic-grid-columns":"2","tweak-blog-basic-grid-image-aspect-ratio":"1:1 Square","tweak-blog-basic-grid-image-spacing":"30px","tweak-blog-basic-grid-meta-spacing":"0px","tweak-blog-basic-grid-primary-meta":"None","tweak-blog-basic-grid-read-more-spacing":"16px","tweak-blog-basic-grid-secondary-meta":"None","tweak-blog-item-custom-width":"90","tweak-blog-item-show-author-profile":"true","tweak-blog-item-width":"Custom","tweak-blog-masonry-columns":"4","tweak-blog-masonry-horizontal-spacing":"64px","tweak-blog-masonry-image-spacing":"20px","tweak-blog-masonry-meta-spacing":"10px","tweak-blog-masonry-primary-meta":"Categories","tweak-blog-masonry-read-more-spacing":"22px","tweak-blog-masonry-secondary-meta":"Date","tweak-blog-masonry-vertical-spacing":"231px","tweak-blog-side-by-side-image-aspect-ratio":"3:4 Three-Four (Vertical)","tweak-blog-side-by-side-image-spacing":"5%","tweak-blog-side-by-side-meta-spacing":"20px","tweak-blog-side-by-side-primary-meta":"Date","tweak-blog-side-by-side-read-more-spacing":"20px","tweak-blog-side-by-side-secondary-meta":"None","tweak-blog-single-column-image-spacing":"10px","tweak-blog-single-column-meta-spacing":"30px","tweak-blog-single-column-primary-meta":"Date","tweak-blog-single-column-read-more-spacing":"30px","tweak-blog-single-column-secondary-meta":"Categories","tweak-events-stacked-show-thumbnails":"true","tweak-events-stacked-thumbnail-size":"2:3 Standard (Vertical)","tweak-fixed-header":"true","tweak-fixed-header-style":"Basic","tweak-global-animations-animation-curve":"ease","tweak-global-animations-animation-delay":"0.6s","tweak-global-animations-animation-duration":"1.50s","tweak-global-animations-animation-style":"fade","tweak-global-animations-animation-type":"fade","tweak-global-animations-complexity-level":"detailed","tweak-global-animations-enabled":"true","tweak-portfolio-grid-basic-custom-height":"50","tweak-portfolio-grid-overlay-custom-height":"50","tweak-portfolio-hover-follow-acceleration":"10%","tweak-portfolio-hover-follow-animation-duration":"Fast","tweak-portfolio-hover-follow-animation-type":"Fade","tweak-portfolio-hover-follow-delimiter":"Bullet","tweak-portfolio-hover-follow-front":"false","tweak-portfolio-hover-follow-layout":"Inline","tweak-portfolio-hover-follow-size":"50","tweak-portfolio-hover-follow-text-spacing-x":"1.5","tweak-portfolio-hover-follow-text-spacing-y":"1.5","tweak-portfolio-hover-static-animation-duration":"Fast","tweak-portfolio-hover-static-animation-type":"Fade","tweak-portfolio-hover-static-delimiter":"Hyphen","tweak-portfolio-hover-static-front":"true","tweak-portfolio-hover-static-layout":"Inline","tweak-portfolio-hover-static-size":"50","tweak-portfolio-hover-static-text-spacing-x":"1.5","tweak-portfolio-hover-static-text-spacing-y":"1.5","tweak-portfolio-index-background-animation-duration":"Medium","tweak-portfolio-index-background-animation-type":"Fade","tweak-portfolio-index-background-custom-height":"50","tweak-portfolio-index-background-delimiter":"None","tweak-portfolio-index-background-height":"Large","tweak-portfolio-index-background-horizontal-alignment":"Center","tweak-portfolio-index-background-link-format":"Stacked","tweak-portfolio-index-background-persist":"false","tweak-portfolio-index-background-vertical-alignment":"Middle","tweak-portfolio-index-background-width":"Full","tweak-product-basic-item-click-action":"None","tweak-product-basic-item-gallery-aspect-ratio":"1:1 Square","tweak-product-basic-item-gallery-design":"Slideshow","tweak-product-basic-item-gallery-width":"53%","tweak-product-basic-item-hover-action":"Zoom","tweak-product-basic-item-image-spacing":"10vw","tweak-product-basic-item-image-zoom-factor":"1.5","tweak-product-basic-item-product-variant-display":"Dropdown","tweak-product-basic-item-thumbnail-placement":"Side","tweak-product-basic-item-variant-picker-layout":"Dropdowns","tweak-products-add-to-cart-button":"false","tweak-products-columns":"3","tweak-products-gutter-column":"2vw","tweak-products-gutter-row":"2vw","tweak-products-header-text-alignment":"Middle","tweak-products-image-aspect-ratio":"3:4 Three-Four (Vertical)","tweak-products-image-text-spacing":"2vw","tweak-products-mobile-columns":"1","tweak-products-text-alignment":"Middle","tweak-products-width":"Full","tweak-transparent-header":"false"},"templateId":"5c5a519771c10ba3470d8101","templateVersion":"7.1","pageFeatures":[1,4],"gmRenderKey":"QUl6YVN5Q0JUUk9xNkx1dkZfSUUxcjQ2LVQ0QWVUU1YtMGQ3bXk4","templateScriptsRootUrl":"https://static1.squarespace.com/static/vta/5c5a519771c10ba3470d8101/scripts/","impersonatedSession":false,"tzData":{"zones":[[0,"EU","GMT/BST",null]],"rules":{"EU":[[1981,"max",null,"Mar","lastSun","1:00u","1:00","S"],[1996,"max",null,"Oct","lastSun","1:00u","0",null]]}},"showAnnouncementBar":false,"recaptchaEnterpriseContext":{"recaptchaEnterpriseSiteKey":"6LdDFQwjAAAAAPigEvvPgEVbb7QBm-TkVJdDTlAv"},"i18nContext":{"timeZoneData":{"id":"Europe/London","name":"Greenwich Mean Time"}},"env":"PRODUCTION"};</script><script type="application/ld+json">{"url":"https://www.kentarchaeology.org.uk","name":"Kent Archaeological Society","description":"","image":"//images.squarespace-cdn.com/content/v1/65df7835178a9d2b20f8d501/d3983e70-cd7c-46a7-aed2-10e0e96d0bd8/kas-logo.png","@context":"http://schema.org","@type":"WebSite"}</script><script type="application/ld+json">{"image":"https://static1.squarespace.com/static/65df7835178a9d2b20f8d501/t/65df7a8d9f78b1738885ed6a/1732809574995/","openingHours":"","@context":"http://schema.org","@type":"LocalBusiness"}</script><link rel="stylesheet" type="text/css" href="https://static1.squarespace.com/static/versioned-site-css/65df7835178a9d2b20f8d501/509/5c5a519771c10ba3470d8101/65df7835178a9d2b20f8d521/1588/site.css"/><script data-sqs-type="cookiepreferencesgetter">(function(){window.getSquarespaceCookies = function() { const getCookiesAllowed = function(cookieName){ return ('; '+document.cookie).split('; ' + cookieName + '=').pop().split(';')[0] === 'true'}; return { performance: getCookiesAllowed('ss_performanceCookiesAllowed') ? 'accepted' : 'declined', marketing: getCookiesAllowed('ss_marketingCookiesAllowed') ? 'accepted' : 'declined' }}})()</script><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(function() { // Function to handle link redirection function handleLink(selector, redirectUrl) { $(selector).on('click', function(event) { event.preventDefault(); // Prevent default link behavior window.location.href = redirectUrl; // Redirect to the desired URL }); } // Attach handlers for each link handleLink('a[href="/journal"]', '/journal/category/Volumes'); handleLink('a[href="/magazine"]', '/magazine/category/Issues'); handleLink('a[href="/records"]', '/records/category/Sources'); handleLink('a[href="/notes"]', '/notes/category/Sources'); handleLink('a[href="/affiliates"]', '/affiliates/category/Society+Affiliates'); handleLink('a[href="/groups"]', '/groups/category/Society+Groups'); handleLink('a[href="/grants"]', '/grants/category/Funds'); }); </script> <script> $(document).ready(function() { // Check if the current URL contains /journal/, /magazine/, /affiliates/, /groups/, or /grants/ var currentUrl = window.location.href; var validUrlPattern = /\/journal\/|\/magazine\/|\/records\/|\/notes\/|\/affiliates\/|\/groups\/|\/grants\//; // Function to determine if a URL is internal (absolute or relative) function isInternalUrl(url) { // Check if the URL is an absolute internal URL (belongs to the site) var isAbsoluteInternal = url.includes("https://www.kentarchaeology.org.uk"); // Check if the URL is a relative URL (starts with "/") var isRelative = url.startsWith("/"); return isAbsoluteInternal || isRelative; } // Function to check if URL has only one forward slash after the domain function hasOneForwardSlash(url) { var path = new URL(url).pathname; return (path.match(/\//g) || []).length === 1; } // Thumbnail click handling based on URL pattern or internal link source if (validUrlPattern.test(currentUrl)) { // Handle the click on .blog-image-wrapper for specified URL patterns $(".blog-image-wrapper").click(function(event){ var parentContainer = $(this).closest(".hentry"); var blogMoreLink = parentContainer.find(".blog-more-link").attr("href"); if (blogMoreLink) { event.preventDefault(); // Prevent the original thumbnail click action window.location.href = blogMoreLink; // Redirect to the blog-more-link URL } else { return true; // Default behavior if no blog-more-link found } }); } else { // If the URL doesn't match the pattern and the title link is external $(".blog-image-wrapper").each(function() { var parentContainer = $(this).closest(".hentry"); var thumbnailLinkElement = $(this).find("a"); // Get the thumbnail link element var thumbnailLink = thumbnailLinkElement.attr("href"); // Get the thumbnail link URL // Check if the blog-more-link is external or internal var blogMoreLink = parentContainer.find(".blog-more-link").attr("href"); if (blogMoreLink && !isInternalUrl(blogMoreLink)) { // Replace the button content with the SVG icon only parentContainer.find(".blog-more-link").each(function() { // Clear the button content and append the SVG $(this).html(''); // Clear the button content $(this).append('<svg width="6vh" height="6vh" viewBox="0 0 51.463867 51.565079" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-343.5825,-128.79629)"><path style="fill:#1c4d85;stroke:none;stroke-width:0.264583" d="m 367.76707,128.90583 c -6.40917,0.84152 -11.94131,2.80986 -16.68052,7.42949 -2.16998,2.11527 -3.8833,4.6857 -5.17697,7.41485 -1.29616,2.73439 -2.15008,5.82244 -2.2876,8.85175 -0.18291,4.02926 0.24693,7.88782 1.75913,11.66822 4.34801,10.86965 15.88807,17.41733 27.41536,15.86455 12.18715,-1.6418 21.68941,-12.1605 22.22604,-24.41454 0.53664,-12.25686 -8.03739,-23.50864 -20.0131,-26.21833 -2.28757,-0.5176 -4.89823,-0.90377 -7.24234,-0.59599 m 3.01764,9.9457 c 1.63657,-0.23588 3.3015,0.32943 4.19734,1.78041 1.33129,2.15601 -0.13479,5.01924 -2.58793,5.40198 -1.60045,0.24966 -3.31045,-0.25559 -4.22781,-1.68022 -1.4025,-2.17824 0.11799,-5.14166 2.6184,-5.50217 m 4.32529,28.13449 c -0.14253,0.50585 -0.18548,1.35884 -0.55967,1.7453 -0.46613,0.48131 -1.53628,0.67283 -2.15621,0.90207 -2.54799,0.94201 -6.38593,1.42493 -8.13677,-1.23914 -0.68631,-1.04441 -0.63129,-2.23778 -0.52134,-3.42 0.26263,-2.8228 1.49956,-5.4921 2.09877,-8.24822 0.23366,-1.07458 0.72272,-2.46813 0.17673,-3.52018 -0.84021,-1.61916 -3.21299,-0.71468 -4.4809,-0.30216 0.10562,-0.5122 0.14555,-1.3506 0.48826,-1.7604 0.44771,-0.53533 1.59321,-0.69878 2.22762,-0.9245 2.42216,-0.86194 6.10499,-1.471 7.88268,0.975 0.76317,1.05014 0.73057,2.19755 0.67123,3.41989 -0.12805,2.63259 -1.23009,5.32162 -1.94427,7.84587 -0.35256,1.24619 -1.19146,3.67157 0.0478,4.66236 1.18362,0.94623 2.95085,0.1545 4.20609,-0.13589 z" id="path1387" /></g></svg>'); // Insert SVG icon $(this).attr("href", thumbnailLink); // Set correct link $(this).removeClass('custom-read-button'); // Remove button class $(this).css({ "background": "none", "padding": "0", "border": "none" }); // Ensure no background or borders $(this).attr("title", "Related information"); // Add tooltip }); } else if (blogMoreLink && isInternalUrl(blogMoreLink)) { // If the blog-more-link is internal, update the thumbnail image link to the blog-more-link thumbnailLinkElement.attr("href", blogMoreLink); // Update the thumbnail link to the internal blog-more-link } }); } // The link addition to the title should work on all pages if the button 'Link' is found var button = $("a:contains('Link')").filter(function() { return $(this).closest("div.button") && $(this).attr("href"); }); if (button.length > 0) { // If the button is found with a valid URL, proceed with the functionality var matchingLink = button.attr("href"); // Get the current page's title from the blog page (using <h1> element with .entry-title) var currentTitle = $(".entry-title").text().trim().toLowerCase(); // Check if the current URL matches the found URL, and take no action if they match if (currentUrl === matchingLink || currentUrl === matchingLink + '/') { console.log("Current URL matches the found URL. No action taken."); return; // Exit if the URLs match } // Get the link without the protocol (remove "https://" or "http://") var linkWithoutProtocol = matchingLink.replace(/(^\w+:|^)\/\//, ''); // Determine if the link is internal or external var isExternal = !isInternalUrl(matchingLink); // Set the tooltip: "Open page: [url]" for internal links, "External link: [url]" for external links var tooltipText = isExternal ? 'External link: ' + linkWithoutProtocol : 'Open page: ' + matchingLink; // Get the current title element var titleElement = $(".entry-title"); // Wrap the title text in an anchor tag with the matching link and tooltip var linkedTitle = '<a href="' + matchingLink + '" title="' + tooltipText + '">' + titleElement.text() + ' →</a>'; // Replace the title element with the linked title titleElement.html(linkedTitle); // Fetch the first paragraph from the external page only if the link is external if (isExternal) { $.get(matchingLink, function(pageContent) { var page = $("<div>").html(pageContent); // Create DOM from fetched page content var firstParagraph = page.find("p").first().text().trim(); // Get the first paragraph and trim it // Insert the first paragraph inside a blockquote with styling and ellipses if found if (firstParagraph) { var formattedParagraph = '“' + firstParagraph + '…”'; // Add quotation marks and ellipses titleElement.after('<blockquote class="excerpt">' + formattedParagraph + '</blockquote>'); // Add custom CSS for the blockquote to add a line to the left $(".excerpt").css({ "border-left": "4px solid #ccc", // Line on the left "padding-left": "10px", // Padding between line and text "font-style": "italic", // Italicize the text "color": "#555", // Optional: change text color to gray "margin-top": "20px" // Optional: add some space above the blockquote }); } }); } } else { console.log("No valid 'Link' button with URL found."); } // Modify titles on pages with one forward slash and external links $("h1.blog-title a").each(function() { var linkHref = $(this).attr("href"); if (!isInternalUrl(linkHref) && hasOneForwardSlash(currentUrl)) { $(this).html($(this).html() + ' →'); // Append space and right arrow to the title } }); // Target only SVGs within anchor tags that have the class 'blog-more-link' $('a.blog-more-link svg').css({ 'transition': 'transform 0.3s ease' // Smooth transition for SVG }); // Apply hover effect specifically to anchor tags with the class 'blog-more-link' $('a.blog-more-link').hover(function() { $(this).find('svg').css('transform', 'scale(1.2)'); // Grow by 20% }, function() { $(this).find('svg').css('transform', 'scale(1)'); // Reset to original size }); }); </script> <style> a.prev { display: block; /* Ensure the element respects block layout */ position: relative; /* Allow offset positioning relative to its normal position */ transform: translateY(50vh); /* Move the element 50vh down */ } .footer-sections { z-index: 9999 !important; position: relative; /* Ensure the element is positioned for z-index to take effect */ } @media (min-width: 700px) { #footer-sections { max-width: calc(100vw - 116px); left: 50px; } } @media (min-width: 700px) { .footer-background { max-width: calc(100vw - 16px); } } @media (min-width: 700px) { .header { max-width: calc(100vw - 16px); } } /* Responsive adjustments for narrow screens */ @media (max-width: 600px) { .section-label { padding-left: 10px !important; } } .blog-item-author-profile-wrapper { display: none !important; } .featured-image { position: relative; margin-bottom: 20px; width: 100%; /* or any specific width */ overflow: hidden; /* Ensures the image does not exceed the boundary of the div */ } @media (max-width: 700px) {.sidebar-title {padding-left: 10px !important; }} @media (max-width: 700px) {.author-name {margin-left: 10px; }} @media (max-width: 700px) {.author-bio {margin-left: 10px; }} @media (max-width: 700px) {.author-avatar-image {width: 50vw; margin-left: 25vw; border-radius: 50%; /* This creates the circle shape */ object-fit: cover;}} .featured-image::before { content: ""; display: block; padding-top: 75%; /* 4:3 aspect ratio -> (3/4) * 100% = 75% */ } .featured-image img { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; object-fit: cover; /* Covers the div, cropping as needed */ object-position: center; /* Centers the image within the div */ transform: translate(-50%, -50%); /* Adjusts the positioning to be centered */ } .sidecar { width: 50vw; height: 100vh; position: fixed; top: 0; right: -48vw; /* Starts off mostly hidden */ background-color: black; transition: right 0.5s, opacity 0.5s; /* Smooth transitions for moving and fading */ z-index: 100; overflow: hidden; display: flex; opacity: 0.1; /* Initially low opacity, controlled by JS */ flex-direction: column; align-items: center; justify-content: center; } /* .sidecar:hover - You might remove this if your JS handles all interaction */ .gallery-view { width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; } .gallery-view img { max-width: 100%; max-height: 80%; position: absolute; transition: opacity 0.5s, transform 0.5s; } .gallery-view img.active, .gallery-view img.next, .gallery-view img.prev { z-index: 2; /* Ensure active image is always on top */ } .gallery-view img.next, .gallery-view img.prev { z-index: 1; opacity: 0.5; } .gallery-view img.next { transform: translateY(100%); } .gallery-view img.prev { transform: translateY(-100%); } .hidden { display: none; } .map-icon { position: fixed; left: -35vw; /* Adjust this value as needed to ensure it starts off the screen */ top: 58vh; width: 35px; height: auto; cursor: pointer; z-index: 1000; transition: transform 0.3s ease; } .map-icon:hover { transform: scale(1.2); /* Enlarge the icon by 20% on hover */ } @media (min-width: 700px) { .search-icon { position: fixed; left: 10px; /* Adjust this value as needed to make it visible */ top: 38vh; /* Adjust according to layout requirements */ width: 5vw; height: auto; cursor: pointer; z-index: 1000; /* Ensure it is high enough to be above all other content */ transition: transform 0.3s ease; } } @media (max-width: 699px) { .search-icon { position: fixed; left: 10px; /* Adjust this value as needed to make it visible */ top: 55vh; /* Adjust according to layout requirements, 5vh lower than the original */ width: 5vw; height: auto; cursor: pointer; z-index: 1000; /* Ensure it is high enough to be above all other content */ transition: transform 0.3s ease; } } .search-icon:hover { transform: scale(1.2); /* Enlarge the icon by 20% on hover */ } @media (min-width: 700px) { .tags-icon { position: fixed; left: -60px; /* Adjust as needed */ top: 28vh; width: 5vw; height: auto; cursor: pointer; z-index: 1000; transition: transform 0.3s ease; } } @media (max-width: 699px) { .tags-icon { position: fixed; left: 10px; /* Adjust as needed */ top: 45vh; /* Adjust according to layout requirements, 5vh lower than the original */ width: 5vw; height: auto; cursor: pointer; z-index: 1002; transition: transform 0.3s ease; } } .tags-icon:hover { transform: scale(1.2); /* Enlarge the icon by 20% on hover */ } .link-icon { transition: transform 0.3s ease; } .link-icon:hover { transform: scale(1.2); /* Enlarge the icon by 20% on hover */ } </style> <script> document.addEventListener('DOMContentLoaded', (event) => { // Check if the current page URL contains the specified string if (window.location.href.includes('https://www.kentarchaeology.org.uk/-books')) { return; // Exit the script if the URL contains the specified string } function injectStyles() { const style = document.createElement('style'); style.innerHTML = ` .custom-read-button { display: inline-block; padding: 5px 10px; /* Reduced padding */ font-size: 16px; color: white !important; /* Force text color to white */ background-color: #12518D; /* Always the specified color */ border: none; border-radius: 25px; text-align: center; text-decoration: none; cursor: pointer; transition: transform 0.3s ease !important; /* Uniform transition duration */ } .custom-read-button:hover { transform: scale(1.1); /* Grow by 10% on hover */ } /* Ensure no button styles are applied to links containing the SVG */ a:has(svg) { all: unset; /* Remove all inherited styles */ display: inline-block; /* Ensure it behaves like an inline element */ cursor: pointer; /* Optional: Set pointer to hand for SVG */ } `; document.head.appendChild(style); } function transformReadLink(link) { // If the link contains an SVG, do not apply the custom button styles if (link.querySelector('svg')) { link.classList.remove('custom-read-button'); // Ensure no button styles are applied return; // Skip further processing if SVG is present } // Apply the custom button styles for non-SVG 'Read more' links link.innerText = 'Read'; link.classList.add('custom-read-button'); link.title = 'Read online'; // Add tooltip using title attribute } function searchAndTransformReadLinks() { let links = document.querySelectorAll('a'); links.forEach(link => { // Skip applying button styles if the link contains an SVG if (link.innerText.trim().toLowerCase() === 'read more' || link.querySelector('svg')) { transformReadLink(link); } }); } injectStyles(); // Initial search and transform searchAndTransformReadLinks(); // Set up MutationObserver to handle dynamically added elements let observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { if (mutation.type === 'childList' && mutation.addedNodes.length > 0) { mutation.addedNodes.forEach(node => { if (node.nodeType === Node.ELEMENT_NODE) { let links = node.querySelectorAll('a'); links.forEach(link => { if (link.innerText.trim().toLowerCase() === 'read more' || link.querySelector('svg')) { transformReadLink(link); } }); } }); } }); }); observer.observe(document.body, { childList: true, subtree: true }); }); </script><script> function checkAndRedirect() { const currentUrl = window.location.href; // Check if the current URL includes the string 'node' if (currentUrl.includes('node')) { const nodeNumberMatch = currentUrl.match(/node\/(\d+)/); if (!nodeNumberMatch) return; // Exit if no node number is found const nodeNumber = nodeNumberMatch[1]; // Create a new XMLHttpRequest object const xhr = new XMLHttpRequest(); xhr.open('GET', 'https://www.kentarchaeology.org.uk/permalinks', false); // `false` makes the request synchronous xhr.send(); // Parse the HTML response const parser = new DOMParser(); const doc = parser.parseFromString(xhr.responseText, 'text/html'); // Select all <p> elements within the div with class 'sqs-html-content' const paragraphs = doc.querySelectorAll('div.sqs-html-content p'); // Iterate through each paragraph to find the matching node for (let p of paragraphs) { const text = p.innerText.trim(); const parts = text.split('\t'); // Split by tab character if (parts[0] === nodeNumber) { window.location.href = `https://www.kentarchaeology.org.uk/${parts[1]}`; return; } } } } // Execute the function when the page loads checkAndRedirect(); </script><meta name="ROBOTS" content="NOINDEX"> <script>Static.COOKIE_BANNER_CAPABLE = true;</script> <!-- End of Squarespace Headers --> <link rel="stylesheet" type="text/css" href="https://static1.squarespace.com/static/vta/5c5a519771c10ba3470d8101/versioned-assets/1728407958569-DI71YIND73BBQN7RBZCZ/static.css"> </head> <body id="collection-6623dfd78d02b37db1139c65" class=" primary-button-style-solid primary-button-shape-pill secondary-button-style-outline secondary-button-shape-pill tertiary-button-style-outline tertiary-button-shape-pill form-use-theme-colors form-field-style-outline form-field-shape-pill form-field-border-all form-field-checkbox-type-icon form-field-checkbox-fill-outline form-field-checkbox-color-normal form-field-checkbox-shape-pill form-field-checkbox-layout-stack form-field-radio-type-icon form-field-radio-fill-outline form-field-radio-color-normal form-field-radio-shape-pill form-field-radio-layout-stack form-field-survey-fill-outline form-field-survey-color-normal form-field-survey-shape-pill form-field-hover-focus-outline form-submit-button-style-label header-overlay-alignment-left header-width-full tweak-fixed-header tweak-fixed-header-style-basic tweak-blog-alternating-side-by-side-width-full tweak-blog-alternating-side-by-side-image-aspect-ratio-11-square tweak-blog-alternating-side-by-side-text-alignment-left tweak-blog-alternating-side-by-side-read-more-style-hide tweak-blog-alternating-side-by-side-image-text-alignment-middle tweak-blog-alternating-side-by-side-delimiter-bullet tweak-blog-alternating-side-by-side-meta-position-top tweak-blog-alternating-side-by-side-primary-meta-categories tweak-blog-alternating-side-by-side-secondary-meta-date tweak-blog-alternating-side-by-side-excerpt-show tweak-blog-basic-grid-width-full tweak-blog-basic-grid-image-aspect-ratio-11-square tweak-blog-basic-grid-text-alignment-center tweak-blog-basic-grid-delimiter-bullet tweak-blog-basic-grid-image-placement-above tweak-blog-basic-grid-read-more-style-show tweak-blog-basic-grid-primary-meta-none tweak-blog-basic-grid-secondary-meta-none tweak-blog-basic-grid-excerpt-show tweak-blog-item-width-custom tweak-blog-item-text-alignment-left tweak-blog-item-meta-position-above-title tweak-blog-item-show-author-profile tweak-blog-item-delimiter-space tweak-blog-masonry-width-full tweak-blog-masonry-text-alignment-center tweak-blog-masonry-primary-meta-categories tweak-blog-masonry-secondary-meta-date tweak-blog-masonry-meta-position-top tweak-blog-masonry-read-more-style-hide tweak-blog-masonry-delimiter-space tweak-blog-masonry-image-placement-above tweak-blog-masonry-excerpt-show tweak-blog-side-by-side-width-full tweak-blog-side-by-side-image-placement-left tweak-blog-side-by-side-image-aspect-ratio-34-three-four-vertical tweak-blog-side-by-side-primary-meta-date tweak-blog-side-by-side-secondary-meta-none tweak-blog-side-by-side-meta-position-top tweak-blog-side-by-side-text-alignment-left tweak-blog-side-by-side-image-text-alignment-middle tweak-blog-side-by-side-read-more-style-show tweak-blog-side-by-side-delimiter-bullet tweak-blog-side-by-side-excerpt-show tweak-blog-single-column-width-full tweak-blog-single-column-text-alignment-left tweak-blog-single-column-image-placement-above tweak-blog-single-column-delimiter-bullet tweak-blog-single-column-read-more-style-hide tweak-blog-single-column-primary-meta-date tweak-blog-single-column-secondary-meta-categories tweak-blog-single-column-meta-position-top tweak-blog-single-column-content-title-only tweak-events-stacked-width-full tweak-events-stacked-height-small tweak-events-stacked-show-thumbnails tweak-events-stacked-thumbnail-size-23-standard-vertical tweak-events-stacked-date-style-with-text tweak-events-stacked-show-time tweak-events-stacked-show-location tweak-events-stacked-ical-gcal-links tweak-events-stacked-show-excerpt tweak-global-animations-enabled tweak-global-animations-complexity-level-detailed tweak-global-animations-animation-style-fade tweak-global-animations-animation-type-fade tweak-global-animations-animation-curve-ease tweak-portfolio-grid-basic-width-full tweak-portfolio-grid-basic-height-small tweak-portfolio-grid-basic-image-aspect-ratio-43-four-three tweak-portfolio-grid-basic-text-alignment-center tweak-portfolio-grid-basic-hover-effect-zoom tweak-portfolio-grid-overlay-width-full tweak-portfolio-grid-overlay-height-large tweak-portfolio-grid-overlay-image-aspect-ratio-11-square tweak-portfolio-grid-overlay-text-placement-center tweak-portfolio-grid-overlay-show-text-after-hover tweak-portfolio-index-background-link-format-stacked tweak-portfolio-index-background-width-full tweak-portfolio-index-background-height-large tweak-portfolio-index-background-vertical-alignment-middle tweak-portfolio-index-background-horizontal-alignment-center tweak-portfolio-index-background-delimiter-none tweak-portfolio-index-background-animation-type-fade tweak-portfolio-index-background-animation-duration-medium tweak-portfolio-hover-follow-layout-inline tweak-portfolio-hover-follow-delimiter-bullet tweak-portfolio-hover-follow-animation-type-fade tweak-portfolio-hover-follow-animation-duration-fast tweak-portfolio-hover-static-layout-inline tweak-portfolio-hover-static-front tweak-portfolio-hover-static-delimiter-hyphen tweak-portfolio-hover-static-animation-type-fade tweak-portfolio-hover-static-animation-duration-fast tweak-product-basic-item-product-variant-display-dropdown tweak-product-basic-item-product-subscription-display-radio tweak-product-basic-item-product-subscription-border-shape-square tweak-product-basic-item-width-full tweak-product-basic-item-gallery-aspect-ratio-11-square tweak-product-basic-item-text-alignment-left tweak-product-basic-item-navigation-none tweak-product-basic-item-description-position-below-price tweak-product-basic-item-description-position-mobile-below-add-to-cart-button tweak-product-basic-item-content-alignment-top tweak-product-basic-item-gallery-design-slideshow tweak-product-basic-item-gallery-placement-right tweak-product-basic-item-thumbnail-placement-side tweak-product-basic-item-click-action-none tweak-product-basic-item-hover-action-zoom tweak-product-basic-item-variant-picker-layout-dropdowns tweak-product-basic-item-add-to-cart-standalone tweak-product-basic-item-add-to-cart-mobile-standalone tweak-products-width-full tweak-products-image-aspect-ratio-34-three-four-vertical tweak-products-text-alignment-middle tweak-products-price-show tweak-products-nested-category-type-top tweak-products-header-text-alignment-middle image-block-poster-text-alignment-center image-block-card-content-position-center image-block-card-text-alignment-left image-block-overlap-content-position-center image-block-overlap-text-alignment-left image-block-collage-content-position-center image-block-collage-text-alignment-center image-block-stack-text-alignment-left hide-opentable-icons opentable-style-dark tweak-product-quick-view-button-style-floating tweak-product-quick-view-button-position-center tweak-product-quick-view-lightbox-excerpt-display-truncate tweak-product-quick-view-lightbox-show-arrows tweak-product-quick-view-lightbox-show-close-button tweak-product-quick-view-lightbox-controls-weight-light native-currency-code-gbp collection-6623dfd78d02b37db1139c65 collection-type-page collection-layout-default mobile-style-available sqs-seven-one " tabindex="-1" > <div id="siteWrapper" class="clearfix site-wrapper" > <div id="floatingCart" class="floating-cart hidden"> <a href="/cart" class="icon icon--stroke icon--fill icon--cart sqs-custom-cart"> <span class="Cart-inner"> <svg class="icon icon--cart" viewBox="0 0 31 24"> <g class="svg-icon cart-icon--odd"> <circle fill="none" stroke-miterlimit="10" cx="22.5" cy="21.5" r="1"/> <circle fill="none" stroke-miterlimit="10" cx="9.5" cy="21.5" r="1"/> <path fill="none" stroke-miterlimit="10" d="M0,1.5h5c0.6,0,1.1,0.4,1.1,1l1.7,13 c0.1,0.5,0.6,1,1.1,1h15c0.5,0,1.2-0.4,1.4-0.9l3.3-8.1c0.2-0.5-0.1-0.9-0.6-0.9H12"/> </g> </svg> <div class="legacy-cart icon-cart-quantity"> <span class="sqs-cart-quantity">0</span> </div> </span> </a> </div> <header data-test="header" id="header" class=" header theme-col--primary " data-section-theme="" data-controller="Header" data-current-styles="{ "layout": "navRight", "action": { "href": "https://members.kentarchaeology.org.uk/", "buttonText": "Services", "newWindow": false }, "showSocial": true, "socialOptions": { "socialBorderShape": "none", "socialBorderStyle": "outline", "socialBorderThickness": { "unit": "px", "value": 1.0 } }, "menuOverlayTheme": "light", "menuOverlayAnimation": "fade", "cartStyle": "text", "cartText": "Cart", "showEmptyCartState": true, "cartOptions": { "iconType": "stroke-1", "cartBorderShape": "none", "cartBorderStyle": "outline", "cartBorderThickness": { "unit": "px", "value": 1.0 } }, "showButton": false, "showCart": false, "showAccountLogin": false, "headerStyle": "solid", "languagePicker": { "enabled": false, "iconEnabled": false, "iconType": "globe", "flagShape": "shiny", "languageFlags": [ ] }, "mobileOptions": { "layout": "logoLeftNavRight", "menuIcon": "halfLineHamburger", "menuIconOptions": { "style": "doubleLineHamburger", "thickness": { "unit": "px", "value": 3.0 } } }, "dynamicOptions": { "border": { "enabled": false, "position": "allSides", "thickness": { "unit": "px", "value": 4.0 } } }, "solidOptions": { "headerOpacity": { "unit": "%", "value": 60.0 }, "border": { "enabled": false, "position": "allSides", "thickness": { "unit": "px", "value": 4.0 } }, "dropShadow": { "enabled": true, "blur": { "unit": "px", "value": 48.0 }, "spread": { "unit": "px", "value": 12.0 }, "distance": { "unit": "px", "value": 12.0 } }, "blurBackground": { "enabled": true, "blurRadius": { "unit": "px", "value": 2.0 } }, "backgroundColor": { "type": "SITE_PALETTE_COLOR", "sitePaletteColor": { "colorName": "lightAccent", "alphaModifier": 1.0 } } }, "gradientOptions": { "gradientType": "faded", "headerOpacity": { "unit": "%", "value": 100.0 }, "border": { "enabled": false, "position": "allSides", "thickness": { "unit": "px", "value": 4.0 } }, "dropShadow": { "enabled": true, "blur": { "unit": "px", "value": 48.0 }, "spread": { "unit": "px", "value": 12.0 }, "distance": { "unit": "px", "value": 12.0 } }, "blurBackground": { "enabled": false, "blurRadius": { "unit": "px", "value": 12.0 } }, "backgroundColor": { "type": "SITE_PALETTE_COLOR", "sitePaletteColor": { "colorName": "lightAccent", "alphaModifier": 1.0 } } }, "dropShadowOptions": { "enabled": true, "blur": { "unit": "px", "value": 48.0 }, "spread": { "unit": "px", "value": 12.0 }, "distance": { "unit": "px", "value": 12.0 } }, "borderOptions": { "enabled": false, "position": "allSides", "thickness": { "unit": "px", "value": 4.0 } }, "showPromotedElement": false, "buttonVariant": "primary", "blurBackground": { "enabled": true, "blurRadius": { "unit": "px", "value": 2.0 } }, "headerOpacity": { "unit": "%", "value": 60.0 } }" data-section-id="header" data-header-style="solid" data-language-picker="{ "enabled": false, "iconEnabled": false, "iconType": "globe", "flagShape": "shiny", "languageFlags": [ ] }" data-first-focusable-element tabindex="-1" style=" --solidHeaderBackgroundColor: hsla(var(--lightAccent-hsl), 1); --gradientHeaderBackgroundColor: hsla(var(--lightAccent-hsl), 1); " > <div class="sqs-announcement-bar-dropzone"></div> <div class="header-announcement-bar-wrapper"> <a href="#page" class="header-skip-link sqs-button-element--primary" > Skip to Content </a> <style> @supports (-webkit-backdrop-filter: none) or (backdrop-filter: none) { .header-blur-background { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); } } </style> <div class="header-border" data-header-style="solid" data-header-usability-enabled="true" data-header-border="false" data-test="header-border" style=" border-width: 0px !important; " ></div> <div class="header-dropshadow" data-header-style="solid" data-header-usability-enabled="true" data-header-dropshadow="true" data-test="header-dropshadow" style=" box-shadow: 0px 12px 48px 12px; " ></div> <div class="header-blur-background" data-test="header-blur-background" > <div class="header-background-solid" data-header-style="solid" data-test="header-background-solid" style="opacity: calc(60 * .01)" ></div> </div> <div class='header-inner container--fluid header-mobile-layout-logo-left-nav-right header-layout-nav-right ' style=" padding: 0; " data-test="header-inner" > <!-- Background --> <div class="header-background theme-bg--primary"></div> <div class="header-display-desktop" data-content-field="site-title"> <!-- Social --> <!-- Title and nav wrapper --> <div class="header-title-nav-wrapper"> <!-- Title --> <div class=" header-title " data-animation-role="header-element" > <div class="header-title-logo"> <a href="/" data-animation-role="header-element"> <img elementtiming="nbf-header-logo-desktop" src="//images.squarespace-cdn.com/content/v1/65df7835178a9d2b20f8d501/d3983e70-cd7c-46a7-aed2-10e0e96d0bd8/kas-logo.png?format=1500w" alt="Kent Archaeological Society" style="display:block" fetchpriority="high" loading="eager" decoding="async" data-loader="raw"> </a> </div> </div> <!-- Nav --> <div class="header-nav"> <div class="header-nav-wrapper"> <nav class="header-nav-list"> <div class="header-nav-item header-nav-item--folder"> <a class="header-nav-folder-title" href="/heritage" tabindex="-1" data-animation-role="header-element" > News </a> <div class="header-nav-folder-content"> <div class="header-nav-folder-item"> <a href="/events" > <span class="header-nav-folder-item-content"> Events </span> </a> </div> <div class="header-nav-folder-item"> <a href="/exhibitions" > <span class="header-nav-folder-item-content"> Exhibitions </span> </a> </div> <div class="header-nav-folder-item"> <a href="/news" > <span class="header-nav-folder-item-content"> News </span> </a> </div> </div> </div> <div class="header-nav-item header-nav-item--folder"> <a class="header-nav-folder-title" href="/publications" tabindex="-1" data-animation-role="header-element" > Publications </a> <div class="header-nav-folder-content"> <div class="header-nav-folder-item"> <a href="/books" > <span class="header-nav-folder-item-content"> Books </span> </a> </div> <div class="header-nav-folder-item"> <a href="/journal" > <span class="header-nav-folder-item-content"> Journal </span> </a> </div> <div class="header-nav-folder-item"> <a href="/magazine" > <span class="header-nav-folder-item-content"> Magazine </span> </a> </div> <div class="header-nav-folder-item"> <a href="/papers" > <span class="header-nav-folder-item-content"> Papers </span> </a> </div> <div class="header-nav-folder-item"> <a href="/reports" > <span class="header-nav-folder-item-content"> Reports </span> </a> </div> </div> </div> <div class="header-nav-item header-nav-item--folder"> <a class="header-nav-folder-title" href="/f7ee326d-9a1d-4090-8812-02fcc0421b00" tabindex="-1" data-animation-role="header-element" > Resources </a> <div class="header-nav-folder-content"> <div class="header-nav-folder-item"> <a href="/audio" > <span class="header-nav-folder-item-content"> Audio </span> </a> </div> <div class="header-nav-folder-item"> <a href="/images" > <span class="header-nav-folder-item-content"> Images </span> </a> </div> <div class="header-nav-folder-item"> <a href="/maps" > <span class="header-nav-folder-item-content"> Maps </span> </a> </div> <div class="header-nav-folder-item"> <a href="/models" > <span class="header-nav-folder-item-content"> Models </span> </a> </div> <div class="header-nav-folder-item"> <a href="/notes" > <span class="header-nav-folder-item-content"> Notes </span> </a> </div> <div class="header-nav-folder-item"> <a href="/records" > <span class="header-nav-folder-item-content"> Records </span> </a> </div> <div class="header-nav-folder-item"> <a href="/videos" > <span class="header-nav-folder-item-content"> Videos </span> </a> </div> </div> </div> <div class="header-nav-item header-nav-item--folder"> <a class="header-nav-folder-title" href="/society" tabindex="-1" data-animation-role="header-element" > Society </a> <div class="header-nav-folder-content"> <div class="header-nav-folder-item"> <a href="/about" > <span class="header-nav-folder-item-content"> About </span> </a> </div> <div class="header-nav-folder-item"> <a href="/affiliates" > <span class="header-nav-folder-item-content"> Affiliates </span> </a> </div> <div class="header-nav-folder-item"> <a href="/collections" > <span class="header-nav-folder-item-content"> Collections </span> </a> </div> <div class="header-nav-folder-item"> <a href="/grants" > <span class="header-nav-folder-item-content"> Grants </span> </a> </div> <div class="header-nav-folder-item"> <a href="/groups" > <span class="header-nav-folder-item-content"> Groups </span> </a> </div> <div class="header-nav-folder-item"> <a href="/library" > <span class="header-nav-folder-item-content"> Library </span> </a> </div> <div class="header-nav-folder-item"> <a href="/people" > <span class="header-nav-folder-item-content"> People </span> </a> </div> </div> </div> </nav> </div> </div> </div> <!-- Actions --> <div class="header-actions header-actions--right"> <div class="header-actions-action header-actions-action--social"> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.instagram.com/kentarchaeologicalsociety_kas" target="_blank" aria-label="Instagram"> <svg viewBox="23 23 64 64"> <use xlink:href="#instagram-unauth-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.facebook.com/theKentArchaeologicalSociety1857/" target="_blank" aria-label="Facebook"> <svg viewBox="23 23 64 64"> <use xlink:href="#facebook-unauth-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.youtube.com/channel/UCHBQA8tx6caQAdOU9Jb0yWw" target="_blank" aria-label="YouTube"> <svg viewBox="23 23 64 64"> <use xlink:href="#youtube-unauth-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.tiktok.com/@kent.archaeologic" target="_blank" aria-label="TikTok"> <svg viewBox="23 23 64 64"> <use xlink:href="#tiktok-unauth-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://sketchfab.com/kentarchaeologicalsociety" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/search" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/contact" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/join" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/stores" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/support" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> </div> <div class="showOnMobile"> </div> <div class="showOnDesktop"> </div> </div> <style> .top-bun, .patty, .bottom-bun { height: 3px; } </style> <!-- Burger --> <div class="header-burger menu-overlay-has-visible-non-navigation-items " data-animation-role="header-element"> <button class="header-burger-btn burger" data-test="header-burger"> <span hidden class="js-header-burger-open-title visually-hidden">Open Menu</span> <span hidden class="js-header-burger-close-title visually-hidden">Close Menu</span> <div class="burger-box"> <div class="burger-inner header-menu-icon-doubleLineHamburger"> <div class="top-bun"></div> <div class="patty"></div> <div class="bottom-bun"></div> </div> </div> </button> </div> </div> <div class="header-display-mobile" data-content-field="site-title"> <!-- Social --> <!-- Title and nav wrapper --> <div class="header-title-nav-wrapper"> <!-- Title --> <div class=" header-title " data-animation-role="header-element" > <div class="header-title-logo"> <a href="/" data-animation-role="header-element"> <img elementtiming="nbf-header-logo-desktop" src="//images.squarespace-cdn.com/content/v1/65df7835178a9d2b20f8d501/d3983e70-cd7c-46a7-aed2-10e0e96d0bd8/kas-logo.png?format=1500w" alt="Kent Archaeological Society" style="display:block" fetchpriority="high" loading="eager" decoding="async" data-loader="raw"> </a> </div> </div> <!-- Nav --> <div class="header-nav"> <div class="header-nav-wrapper"> <nav class="header-nav-list"> <div class="header-nav-item header-nav-item--folder"> <a class="header-nav-folder-title" href="/heritage" tabindex="-1" data-animation-role="header-element" > News </a> <div class="header-nav-folder-content"> <div class="header-nav-folder-item"> <a href="/events" > <span class="header-nav-folder-item-content"> Events </span> </a> </div> <div class="header-nav-folder-item"> <a href="/exhibitions" > <span class="header-nav-folder-item-content"> Exhibitions </span> </a> </div> <div class="header-nav-folder-item"> <a href="/news" > <span class="header-nav-folder-item-content"> News </span> </a> </div> </div> </div> <div class="header-nav-item header-nav-item--folder"> <a class="header-nav-folder-title" href="/publications" tabindex="-1" data-animation-role="header-element" > Publications </a> <div class="header-nav-folder-content"> <div class="header-nav-folder-item"> <a href="/books" > <span class="header-nav-folder-item-content"> Books </span> </a> </div> <div class="header-nav-folder-item"> <a href="/journal" > <span class="header-nav-folder-item-content"> Journal </span> </a> </div> <div class="header-nav-folder-item"> <a href="/magazine" > <span class="header-nav-folder-item-content"> Magazine </span> </a> </div> <div class="header-nav-folder-item"> <a href="/papers" > <span class="header-nav-folder-item-content"> Papers </span> </a> </div> <div class="header-nav-folder-item"> <a href="/reports" > <span class="header-nav-folder-item-content"> Reports </span> </a> </div> </div> </div> <div class="header-nav-item header-nav-item--folder"> <a class="header-nav-folder-title" href="/f7ee326d-9a1d-4090-8812-02fcc0421b00" tabindex="-1" data-animation-role="header-element" > Resources </a> <div class="header-nav-folder-content"> <div class="header-nav-folder-item"> <a href="/audio" > <span class="header-nav-folder-item-content"> Audio </span> </a> </div> <div class="header-nav-folder-item"> <a href="/images" > <span class="header-nav-folder-item-content"> Images </span> </a> </div> <div class="header-nav-folder-item"> <a href="/maps" > <span class="header-nav-folder-item-content"> Maps </span> </a> </div> <div class="header-nav-folder-item"> <a href="/models" > <span class="header-nav-folder-item-content"> Models </span> </a> </div> <div class="header-nav-folder-item"> <a href="/notes" > <span class="header-nav-folder-item-content"> Notes </span> </a> </div> <div class="header-nav-folder-item"> <a href="/records" > <span class="header-nav-folder-item-content"> Records </span> </a> </div> <div class="header-nav-folder-item"> <a href="/videos" > <span class="header-nav-folder-item-content"> Videos </span> </a> </div> </div> </div> <div class="header-nav-item header-nav-item--folder"> <a class="header-nav-folder-title" href="/society" tabindex="-1" data-animation-role="header-element" > Society </a> <div class="header-nav-folder-content"> <div class="header-nav-folder-item"> <a href="/about" > <span class="header-nav-folder-item-content"> About </span> </a> </div> <div class="header-nav-folder-item"> <a href="/affiliates" > <span class="header-nav-folder-item-content"> Affiliates </span> </a> </div> <div class="header-nav-folder-item"> <a href="/collections" > <span class="header-nav-folder-item-content"> Collections </span> </a> </div> <div class="header-nav-folder-item"> <a href="/grants" > <span class="header-nav-folder-item-content"> Grants </span> </a> </div> <div class="header-nav-folder-item"> <a href="/groups" > <span class="header-nav-folder-item-content"> Groups </span> </a> </div> <div class="header-nav-folder-item"> <a href="/library" > <span class="header-nav-folder-item-content"> Library </span> </a> </div> <div class="header-nav-folder-item"> <a href="/people" > <span class="header-nav-folder-item-content"> People </span> </a> </div> </div> </div> </nav> </div> </div> </div> <!-- Actions --> <div class="header-actions header-actions--right"> <div class="header-actions-action header-actions-action--social"> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.instagram.com/kentarchaeologicalsociety_kas" target="_blank" aria-label="Instagram"> <svg viewBox="23 23 64 64"> <use xlink:href="#instagram-unauth-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.facebook.com/theKentArchaeologicalSociety1857/" target="_blank" aria-label="Facebook"> <svg viewBox="23 23 64 64"> <use xlink:href="#facebook-unauth-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.youtube.com/channel/UCHBQA8tx6caQAdOU9Jb0yWw" target="_blank" aria-label="YouTube"> <svg viewBox="23 23 64 64"> <use xlink:href="#youtube-unauth-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.tiktok.com/@kent.archaeologic" target="_blank" aria-label="TikTok"> <svg viewBox="23 23 64 64"> <use xlink:href="#tiktok-unauth-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://sketchfab.com/kentarchaeologicalsociety" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/search" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/contact" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/join" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/stores" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> <a class="icon icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/support" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> </div> <div class="showOnMobile"> </div> <div class="showOnDesktop"> </div> </div> <style> .top-bun, .patty, .bottom-bun { height: 3px; } </style> <!-- Burger --> <div class="header-burger menu-overlay-has-visible-non-navigation-items " data-animation-role="header-element"> <button class="header-burger-btn burger" data-test="header-burger"> <span hidden class="js-header-burger-open-title visually-hidden">Open Menu</span> <span hidden class="js-header-burger-close-title visually-hidden">Close Menu</span> <div class="burger-box"> <div class="burger-inner header-menu-icon-doubleLineHamburger"> <div class="top-bun"></div> <div class="patty"></div> <div class="bottom-bun"></div> </div> </div> </button> </div> </div> </div> </div> <!-- (Mobile) Menu Navigation --> <div class="header-menu header-menu--folder-list light " data-section-theme="light" data-current-styles="{ "layout": "navRight", "action": { "href": "https://members.kentarchaeology.org.uk/", "buttonText": "Services", "newWindow": false }, "showSocial": true, "socialOptions": { "socialBorderShape": "none", "socialBorderStyle": "outline", "socialBorderThickness": { "unit": "px", "value": 1.0 } }, "menuOverlayTheme": "light", "menuOverlayAnimation": "fade", "cartStyle": "text", "cartText": "Cart", "showEmptyCartState": true, "cartOptions": { "iconType": "stroke-1", "cartBorderShape": "none", "cartBorderStyle": "outline", "cartBorderThickness": { "unit": "px", "value": 1.0 } }, "showButton": false, "showCart": false, "showAccountLogin": false, "headerStyle": "solid", "languagePicker": { "enabled": false, "iconEnabled": false, "iconType": "globe", "flagShape": "shiny", "languageFlags": [ ] }, "mobileOptions": { "layout": "logoLeftNavRight", "menuIcon": "halfLineHamburger", "menuIconOptions": { "style": "doubleLineHamburger", "thickness": { "unit": "px", "value": 3.0 } } }, "dynamicOptions": { "border": { "enabled": false, "position": "allSides", "thickness": { "unit": "px", "value": 4.0 } } }, "solidOptions": { "headerOpacity": { "unit": "%", "value": 60.0 }, "border": { "enabled": false, "position": "allSides", "thickness": { "unit": "px", "value": 4.0 } }, "dropShadow": { "enabled": true, "blur": { "unit": "px", "value": 48.0 }, "spread": { "unit": "px", "value": 12.0 }, "distance": { "unit": "px", "value": 12.0 } }, "blurBackground": { "enabled": true, "blurRadius": { "unit": "px", "value": 2.0 } }, "backgroundColor": { "type": "SITE_PALETTE_COLOR", "sitePaletteColor": { "colorName": "lightAccent", "alphaModifier": 1.0 } } }, "gradientOptions": { "gradientType": "faded", "headerOpacity": { "unit": "%", "value": 100.0 }, "border": { "enabled": false, "position": "allSides", "thickness": { "unit": "px", "value": 4.0 } }, "dropShadow": { "enabled": true, "blur": { "unit": "px", "value": 48.0 }, "spread": { "unit": "px", "value": 12.0 }, "distance": { "unit": "px", "value": 12.0 } }, "blurBackground": { "enabled": false, "blurRadius": { "unit": "px", "value": 12.0 } }, "backgroundColor": { "type": "SITE_PALETTE_COLOR", "sitePaletteColor": { "colorName": "lightAccent", "alphaModifier": 1.0 } } }, "dropShadowOptions": { "enabled": true, "blur": { "unit": "px", "value": 48.0 }, "spread": { "unit": "px", "value": 12.0 }, "distance": { "unit": "px", "value": 12.0 } }, "borderOptions": { "enabled": false, "position": "allSides", "thickness": { "unit": "px", "value": 4.0 } }, "showPromotedElement": false, "buttonVariant": "primary", "blurBackground": { "enabled": true, "blurRadius": { "unit": "px", "value": 2.0 } }, "headerOpacity": { "unit": "%", "value": 60.0 } }" data-section-id="overlay-nav" data-show-account-login="false" data-test="header-menu"> <div class="header-menu-bg theme-bg--primary"></div> <div class="header-menu-nav"> <nav class="header-menu-nav-list"> <div data-folder="root" class="header-menu-nav-folder"> <div class="header-menu-nav-folder-content"> <!-- Menu Navigation --> <div class="header-menu-nav-wrapper"> <div class="container header-menu-nav-item"> <a data-folder-id="/heritage" href="/heritage" > <div class="header-menu-nav-item-content"> <span class="visually-hidden">Folder:</span> <span>News</span> <span class="chevron chevron--right"></span> </div> </a> </div> <div data-folder="/heritage" class="header-menu-nav-folder"> <div class="header-menu-nav-folder-content"> <div class="header-menu-controls container header-menu-nav-item"> <a class="header-menu-controls-control header-menu-controls-control--active" data-action="back" href="/"> <span class="chevron chevron--left"></span><span>Back</span> </a> </div> <div class="container header-menu-nav-item"> <a href="/events" > <div class="header-menu-nav-item-content"> Events </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/exhibitions" > <div class="header-menu-nav-item-content"> Exhibitions </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/news" > <div class="header-menu-nav-item-content"> News </div> </a> </div> </div> </div> <div class="container header-menu-nav-item"> <a data-folder-id="/publications" href="/publications" > <div class="header-menu-nav-item-content"> <span class="visually-hidden">Folder:</span> <span>Publications</span> <span class="chevron chevron--right"></span> </div> </a> </div> <div data-folder="/publications" class="header-menu-nav-folder"> <div class="header-menu-nav-folder-content"> <div class="header-menu-controls container header-menu-nav-item"> <a class="header-menu-controls-control header-menu-controls-control--active" data-action="back" href="/"> <span class="chevron chevron--left"></span><span>Back</span> </a> </div> <div class="container header-menu-nav-item"> <a href="/books" > <div class="header-menu-nav-item-content"> Books </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/journal" > <div class="header-menu-nav-item-content"> Journal </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/magazine" > <div class="header-menu-nav-item-content"> Magazine </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/papers" > <div class="header-menu-nav-item-content"> Papers </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/reports" > <div class="header-menu-nav-item-content"> Reports </div> </a> </div> </div> </div> <div class="container header-menu-nav-item"> <a data-folder-id="/f7ee326d-9a1d-4090-8812-02fcc0421b00" href="/f7ee326d-9a1d-4090-8812-02fcc0421b00" > <div class="header-menu-nav-item-content"> <span class="visually-hidden">Folder:</span> <span>Resources</span> <span class="chevron chevron--right"></span> </div> </a> </div> <div data-folder="/f7ee326d-9a1d-4090-8812-02fcc0421b00" class="header-menu-nav-folder"> <div class="header-menu-nav-folder-content"> <div class="header-menu-controls container header-menu-nav-item"> <a class="header-menu-controls-control header-menu-controls-control--active" data-action="back" href="/"> <span class="chevron chevron--left"></span><span>Back</span> </a> </div> <div class="container header-menu-nav-item"> <a href="/audio" > <div class="header-menu-nav-item-content"> Audio </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/images" > <div class="header-menu-nav-item-content"> Images </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/maps" > <div class="header-menu-nav-item-content"> Maps </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/models" > <div class="header-menu-nav-item-content"> Models </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/notes" > <div class="header-menu-nav-item-content"> Notes </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/records" > <div class="header-menu-nav-item-content"> Records </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/videos" > <div class="header-menu-nav-item-content"> Videos </div> </a> </div> </div> </div> <div class="container header-menu-nav-item"> <a data-folder-id="/society" href="/society" > <div class="header-menu-nav-item-content"> <span class="visually-hidden">Folder:</span> <span>Society</span> <span class="chevron chevron--right"></span> </div> </a> </div> <div data-folder="/society" class="header-menu-nav-folder"> <div class="header-menu-nav-folder-content"> <div class="header-menu-controls container header-menu-nav-item"> <a class="header-menu-controls-control header-menu-controls-control--active" data-action="back" href="/"> <span class="chevron chevron--left"></span><span>Back</span> </a> </div> <div class="container header-menu-nav-item"> <a href="/about" > <div class="header-menu-nav-item-content"> About </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/affiliates" > <div class="header-menu-nav-item-content"> Affiliates </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/collections" > <div class="header-menu-nav-item-content"> Collections </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/grants" > <div class="header-menu-nav-item-content"> Grants </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/groups" > <div class="header-menu-nav-item-content"> Groups </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/library" > <div class="header-menu-nav-item-content"> Library </div> </a> </div> <div class="container header-menu-nav-item"> <a href="/people" > <div class="header-menu-nav-item-content"> People </div> </a> </div> </div> </div> </div> </div> <div class="header-menu-actions social-accounts"> <div class="header-menu-actions-action header-menu-actions-action--social mobile"> <a class="icon icon--lg icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.instagram.com/kentarchaeologicalsociety_kas" target="_blank" aria-label="Instagram"> <svg viewBox="23 23 64 64"> <use xlink:href="#instagram-unauth-icon" width="110" height="110"></use> </svg> </a> </div> <div class="header-menu-actions-action header-menu-actions-action--social mobile"> <a class="icon icon--lg icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.facebook.com/theKentArchaeologicalSociety1857/" target="_blank" aria-label="Facebook"> <svg viewBox="23 23 64 64"> <use xlink:href="#facebook-unauth-icon" width="110" height="110"></use> </svg> </a> </div> <div class="header-menu-actions-action header-menu-actions-action--social mobile"> <a class="icon icon--lg icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.youtube.com/channel/UCHBQA8tx6caQAdOU9Jb0yWw" target="_blank" aria-label="YouTube"> <svg viewBox="23 23 64 64"> <use xlink:href="#youtube-unauth-icon" width="110" height="110"></use> </svg> </a> </div> <div class="header-menu-actions-action header-menu-actions-action--social mobile"> <a class="icon icon--lg icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.tiktok.com/@kent.archaeologic" target="_blank" aria-label="TikTok"> <svg viewBox="23 23 64 64"> <use xlink:href="#tiktok-unauth-icon" width="110" height="110"></use> </svg> </a> </div> <div class="header-menu-actions-action header-menu-actions-action--social mobile"> <a class="icon icon--lg icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://sketchfab.com/kentarchaeologicalsociety" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> </div> <div class="header-menu-actions-action header-menu-actions-action--social mobile"> <a class="icon icon--lg icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/search" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> </div> <div class="header-menu-actions-action header-menu-actions-action--social mobile"> <a class="icon icon--lg icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/contact" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> </div> <div class="header-menu-actions-action header-menu-actions-action--social mobile"> <a class="icon icon--lg icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/join" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> </div> <div class="header-menu-actions-action header-menu-actions-action--social mobile"> <a class="icon icon--lg icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/stores" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> </div> <div class="header-menu-actions-action header-menu-actions-action--social mobile"> <a class="icon icon--lg icon--fill header-icon header-icon-border-shape-none header-icon-border-style-outline" href="https://www.kentarchaeology.org.uk/support" target="_blank" aria-label="URL"> <svg viewBox="23 23 64 64"> <use xlink:href="#url-icon" width="110" height="110"></use> </svg> </a> </div> </div> </div> </nav> </div> </div> </header> <main id="page" class="container" role="main"> <article class="sections" id="sections" data-page-sections="6623dfd78d02b37db1139c66"> <section data-test="page-section" data-section-theme="" class='page-section full-bleed-section layout-engine-section background-width--full-bleed section-height--small content-width--wide horizontal-alignment--center vertical-alignment--middle ' data-section-id="6623dffe2ab537735b4db2da" data-controller="SectionWrapperController" data-current-styles="{ "imageOverlayOpacity": 0.15, "backgroundWidth": "background-width--full-bleed", "sectionHeight": "section-height--small", "customSectionHeight": 1, "horizontalAlignment": "horizontal-alignment--center", "verticalAlignment": "vertical-alignment--middle", "contentWidth": "content-width--wide", "customContentWidth": 50, "backgroundColor": "", "sectionTheme": "", "sectionAnimation": "none", "backgroundMode": "image" }" data-current-context="{ "video": { "playbackSpeed": 0.5, "filter": 1, "filterStrength": 0, "zoom": 0, "videoSourceProvider": "none" }, "backgroundImageId": null, "backgroundMediaEffect": { "type": "none" }, "divider": { "enabled": false }, "typeName": "page" }" data-animation="none" data-fluid-engine-section > <div class="section-border" > <div class="section-background"> </div> </div> <div class='content-wrapper' style=' ' > <div class="content" > <div data-fluid-engine="true"><style> .fe-6623dfffc0fcb767b0a9f2ab { --grid-gutter: calc(var(--sqs-mobile-site-gutter, 6vw) - 11.0px); --cell-max-width: calc( ( var(--sqs-site-max-width, 1500px) - (11.0px * (8 - 1)) ) / 8 ); display: grid; position: relative; grid-area: 1/1/-1/-1; grid-template-rows: repeat(6,minmax(24px, auto)); grid-template-columns: minmax(var(--grid-gutter), 1fr) repeat(8, minmax(0, var(--cell-max-width))) minmax(var(--grid-gutter), 1fr); row-gap: 11.0px; column-gap: 11.0px; } @media (min-width: 768px) { .background-width--inset .fe-6623dfffc0fcb767b0a9f2ab { --inset-padding: calc(var(--sqs-site-gutter) * 2); } .fe-6623dfffc0fcb767b0a9f2ab { --grid-gutter: calc(var(--sqs-site-gutter, 4vw) - 11.0px); --cell-max-width: calc( ( var(--sqs-site-max-width, 1500px) - (11.0px * (24 - 1)) ) / 24 ); --inset-padding: 0vw; --row-height-scaling-factor: 0.0215; --container-width: min(var(--sqs-site-max-width, 1500px), calc(100vw - var(--sqs-site-gutter, 4vw) * 2 - var(--inset-padding) )); grid-template-rows: repeat(13,minmax(calc(var(--container-width) * var(--row-height-scaling-factor)), auto)); grid-template-columns: minmax(var(--grid-gutter), 1fr) repeat(24, minmax(0, var(--cell-max-width))) minmax(var(--grid-gutter), 1fr); } } .fe-block-yui_3_17_2_1_1713624652608_13636 { grid-area: 1/2/7/10; z-index: 1; @media (max-width: 767px) { } } .fe-block-yui_3_17_2_1_1713624652608_13636 .sqs-block { justify-content: flex-start; } .fe-block-yui_3_17_2_1_1713624652608_13636 .sqs-block-alignment-wrapper { align-items: flex-start; } @media (min-width: 768px) { .fe-block-yui_3_17_2_1_1713624652608_13636 { grid-area: 1/2/10/26; z-index: 1; } .fe-block-yui_3_17_2_1_1713624652608_13636 .sqs-block { justify-content: flex-start; } .fe-block-yui_3_17_2_1_1713624652608_13636 .sqs-block-alignment-wrapper { align-items: flex-start; } } </style><div class="fluid-engine fe-6623dfffc0fcb767b0a9f2ab"><div class="fe-block fe-block-yui_3_17_2_1_1713624652608_13636"><div class="sqs-block code-block sqs-block-code" data-block-type="23" id="block-yui_3_17_2_1_1713624652608_13636"><div class="sqs-block-content"> <script> // Function to check and modify the URL if necessary function checkAndRedirect() { // Get the current URL path let url = window.location.href; // Check if the URL contains '-and-illustrations' or '-illustrations' if (url.includes('-and-illustrations') || url.includes('-illustrations')) { // Replace the occurrences let newUrl = url.replace('-and-illustrations', '').replace('-illustrations', ''); // Redirect to the new URL window.location.replace(newUrl); } } // Run the function to check and redirect checkAndRedirect(); // This function will run when the window is loaded function setupPage() { // Getting the current page URL var currentUrl = window.location.href; // Construct the archive URL var archiveUrl = 'https://web.archive.org/web/20230816171914/' + encodeURIComponent(currentUrl); // Set the src of the iframe to the archive URL document.getElementById('archiveFrame').src = archiveUrl; // Add the header banner addHeaderBanner("Sorry, it looks like that content may have moved. If the link once existed, archived versions of the page will display below using the Internet Archive resource. If not, you may be able to find what you’re searching for using the search icon above. Please let us know using the Contact Form if this link needs to be restored."); } function addHeaderBanner(text) { const banner = document.createElement('div'); banner.textContent = text; banner.style.cssText = 'background-color: black; color: white; padding: 10px 20px; font-size: 1em; text-align: center; width: 100%; padding-top: 7.5vh; padding-bottom: 2.5vh; position: fixed; top: 15vh; left: 0; z-index: 1000'; document.body.appendChild(banner); const iframe = document.getElementById('archiveFrame'); if (iframe) { iframe.style.marginTop = banner.offsetHeight + 'px'; applyIframeStyles(iframe); } } function applyIframeStyles(iframe) { // Applying fixed positioning and other styles iframe.style.position = 'fixed'; iframe.style.left = '50%'; iframe.style.transform = 'translateX(-50%)'; // Adjust the top position based on window width if (window.innerWidth < 700) { iframe.style.top = '20vh'; // Start 20vh from the top } else { iframe.style.top = '50%'; // Center vertically iframe.style.transform += ' translateY(-50%)'; // Add Y-axis translation for centering } iframe.style.border = '0'; // Removes border document.body.style.overflow = 'hidden'; // Disable scrolling on the main page } window.addEventListener('load', setupPage); function romanToArabic(roman) { const romanNumeralMap = { 'I': 1, 'IV': 4, 'V': 5, 'IX': 9, 'X': 10, 'XL': 40, 'L': 50, 'XC': 90, 'C': 100, 'CD': 400, 'D': 500, 'CM': 900, 'M': 1000 }; let arabic = 0; let i = 0; roman = roman.toUpperCase(); while (i < roman.length) { if (i + 1 < roman.length && romanNumeralMap[roman.substring(i, i + 2)]) { arabic += romanNumeralMap[roman.substring(i, i + 2)]; i += 2; } else { arabic += romanNumeralMap[roman.charAt(i)]; i += 1; } } return arabic; } function isRomanNumeral(str) { const romanNumeralPattern = /^(?=[MDCLXVI])M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/i; return romanNumeralPattern.test(str); } function redirect() { const path = window.location.pathname; const parts = path.split('/'); const possibleRomanNumeral = parts.pop(); const parentPath = parts.pop(); if (parentPath === 'journal' && isRomanNumeral(possibleRomanNumeral)) { const arabicNumeral = romanToArabic(possibleRomanNumeral); if (arabicNumeral >= 1 && arabicNumeral <= 144) { window.location.href = `/journal/${arabicNumeral}`; } else { document.body.innerHTML = '<h1>Invalid Volume Number</h1>'; } } } document.addEventListener('DOMContentLoaded', redirect); </script> <iframe id="archiveFrame" style="width:100vw; height:85vh; border:none;"></iframe> </div></div></div></div></div> </div> </div> </section> </article> </main> <footer class="sections" id="footer-sections" data-footer-sections> <section data-test="page-section" data-section-theme="white-bold" class='page-section has-section-divider full-bleed-section layout-engine-section background-width--full-bleed content-width--wide horizontal-alignment--center vertical-alignment--bottom white-bold' data-section-id="65df7836178a9d2b20f8d54c" data-controller="SectionWrapperController" data-current-styles="{ "imageOverlayOpacity": 0.15, "backgroundWidth": "background-width--full-bleed", "customSectionHeight": 1, "horizontalAlignment": "horizontal-alignment--center", "verticalAlignment": "vertical-alignment--bottom", "contentWidth": "content-width--wide", "customContentWidth": 50, "sectionTheme": "white-bold", "sectionAnimation": "none", "backgroundMode": "image" }" data-current-context="{ "video": { "playbackSpeed": 0.5, "filter": 1, "filterStrength": 0, "zoom": 0, "videoSourceProvider": "none" }, "backgroundImageId": null, "backgroundMediaEffect": { "type": "none" }, "divider": { "enabled": true, "type": "none", "width": { "unit": "vw", "value": 100.0 }, "height": { "unit": "vw", "value": 6.0 }, "isFlipX": false, "isFlipY": false, "offset": { "unit": "px", "value": 0.0 }, "stroke": { "style": "none", "color": { "type": "THEME_COLOR" }, "thickness": { "unit": "px", "value": 2.0 }, "dashLength": { "unit": "px", "value": 5.0 }, "gapLength": { "unit": "px", "value": 15.0 }, "linecap": "square" } }, "typeName": "page" }" data-animation="none" data-fluid-engine-section > <div class="section-border" data-controller="SectionDivider" style="clip-path: url(#section-divider-65df7836178a9d2b20f8d54c);" > <div class="section-background"> </div> </div> <div class='content-wrapper' style=' ' > <div class="content" > <div data-fluid-engine="true"><style> .fe-65df7836178a9d2b20f8d54b { --grid-gutter: calc(var(--sqs-mobile-site-gutter, 6vw) - 11.0px); --cell-max-width: calc( ( var(--sqs-site-max-width, 1500px) - (11.0px * (8 - 1)) ) / 8 ); display: grid; position: relative; grid-area: 1/1/-1/-1; grid-template-rows: repeat(18,minmax(24px, auto)); grid-template-columns: minmax(var(--grid-gutter), 1fr) repeat(8, minmax(0, var(--cell-max-width))) minmax(var(--grid-gutter), 1fr); row-gap: 11.0px; column-gap: 11.0px; } @media (min-width: 768px) { .background-width--inset .fe-65df7836178a9d2b20f8d54b { --inset-padding: calc(var(--sqs-site-gutter) * 2); } .fe-65df7836178a9d2b20f8d54b { --grid-gutter: calc(var(--sqs-site-gutter, 4vw) - 11.0px); --cell-max-width: calc( ( var(--sqs-site-max-width, 1500px) - (11.0px * (24 - 1)) ) / 24 ); --inset-padding: 0vw; --row-height-scaling-factor: 0.0215; --container-width: min(var(--sqs-site-max-width, 1500px), calc(100vw - var(--sqs-site-gutter, 4vw) * 2 - var(--inset-padding) )); grid-template-rows: repeat(9,minmax(calc(var(--container-width) * var(--row-height-scaling-factor)), auto)); grid-template-columns: minmax(var(--grid-gutter), 1fr) repeat(24, minmax(0, var(--cell-max-width))) minmax(var(--grid-gutter), 1fr); } } .fe-block-600ad12656cec81d1db6 { grid-area: 3/2/5/10; z-index: 0; @media (max-width: 767px) { } } .fe-block-600ad12656cec81d1db6 .sqs-block { justify-content: flex-start; } .fe-block-600ad12656cec81d1db6 .sqs-block-alignment-wrapper { align-items: flex-start; } @media (min-width: 768px) { .fe-block-600ad12656cec81d1db6 { grid-area: 2/3/6/14; z-index: 0; } .fe-block-600ad12656cec81d1db6 .sqs-block { justify-content: flex-start; } .fe-block-600ad12656cec81d1db6 .sqs-block-alignment-wrapper { align-items: flex-start; } } .fe-block-8cacacbfd28b67f0cbfc { grid-area: 5/2/7/10; z-index: 4; @media (max-width: 767px) { } } .fe-block-8cacacbfd28b67f0cbfc .sqs-block { justify-content: flex-start; } .fe-block-8cacacbfd28b67f0cbfc .sqs-block-alignment-wrapper { align-items: flex-start; } @media (min-width: 768px) { .fe-block-8cacacbfd28b67f0cbfc { grid-area: 7/3/9/7; z-index: 4; } .fe-block-8cacacbfd28b67f0cbfc .sqs-block { justify-content: flex-start; } .fe-block-8cacacbfd28b67f0cbfc .sqs-block-alignment-wrapper { align-items: flex-start; } } .fe-block-yui_3_17_2_1_1726075806689_22333 { grid-area: 7/2/13/10; z-index: 5; @media (max-width: 767px) { } } .fe-block-yui_3_17_2_1_1726075806689_22333 .sqs-block { justify-content: flex-start; } .fe-block-yui_3_17_2_1_1726075806689_22333 .sqs-block-alignment-wrapper { align-items: flex-start; } @media (min-width: 768px) { .fe-block-yui_3_17_2_1_1726075806689_22333 { grid-area: 7/8/10/14; z-index: 5; } .fe-block-yui_3_17_2_1_1726075806689_22333 .sqs-block { justify-content: flex-start; } .fe-block-yui_3_17_2_1_1726075806689_22333 .sqs-block-alignment-wrapper { align-items: flex-start; } } .fe-block-74d7d37dca6545870b70 { grid-area: 13/6/17/10; z-index: 3; @media (max-width: 767px) { } } .fe-block-74d7d37dca6545870b70 .sqs-block { justify-content: flex-start; } .fe-block-74d7d37dca6545870b70 .sqs-block-alignment-wrapper { align-items: flex-start; } @media (min-width: 768px) { .fe-block-74d7d37dca6545870b70 { grid-area: 3/21/10/25; z-index: 3; } .fe-block-74d7d37dca6545870b70 .sqs-block { justify-content: flex-start; } .fe-block-74d7d37dca6545870b70 .sqs-block-alignment-wrapper { align-items: flex-start; } } </style><div class="fluid-engine fe-65df7836178a9d2b20f8d54b"><div class="fe-block fe-block-600ad12656cec81d1db6"><div class="sqs-block html-block sqs-block-html" data-blend-mode="NORMAL" data-block-type="2" data-border-radii="{"topLeft":{"unit":"px","value":0.0},"topRight":{"unit":"px","value":0.0},"bottomLeft":{"unit":"px","value":0.0},"bottomRight":{"unit":"px","value":0.0}}" id="block-600ad12656cec81d1db6"><div class="sqs-block-content"> <div class="sqs-html-content"> <h3 style="white-space:pre-wrap;">Kent Archaeological Society</h3><p class="sqsrte-large" style="white-space:pre-wrap;"><a href="https://www.kentarchaeology.org.uk/documents/charity-certificate" target=""><span style="text-decoration:underline">Registered Charity 1176989</span></a></p> </div> </div></div></div><div class="fe-block fe-block-8cacacbfd28b67f0cbfc"><div class="sqs-block socialaccountlinks-v2-block sqs-block-socialaccountlinks-v2" data-block-type="54" id="block-8cacacbfd28b67f0cbfc"><div class="sqs-block-content"> <div class="sqs-svg-icon--outer social-icon-alignment-left social-icons-color- social-icons-size-extra-large social-icons-style-regular " > <style> #block-8cacacbfd28b67f0cbfc .social-icons-style-border .sqs-svg-icon--wrapper { box-shadow: 0 0 0 2px inset; border: none; } </style> <nav class="sqs-svg-icon--list"> <a href="https://www.instagram.com/kentarchaeologicalsociety_kas" target="_blank" class="sqs-svg-icon--wrapper instagram-unauth" aria-label="Instagram"> <div> <svg class="sqs-svg-icon--social" viewBox="0 0 64 64"> <use class="sqs-use--icon" xlink:href="#instagram-unauth-icon"></use> <use class="sqs-use--mask" xlink:href="#instagram-unauth-mask"></use> </svg> </div> </a><a href="https://www.facebook.com/theKentArchaeologicalSociety1857/" target="_blank" class="sqs-svg-icon--wrapper facebook-unauth" aria-label="Facebook"> <div> <svg class="sqs-svg-icon--social" viewBox="0 0 64 64"> <use class="sqs-use--icon" xlink:href="#facebook-unauth-icon"></use> <use class="sqs-use--mask" xlink:href="#facebook-unauth-mask"></use> </svg> </div> </a><a href="https://www.youtube.com/channel/UCHBQA8tx6caQAdOU9Jb0yWw" target="_blank" class="sqs-svg-icon--wrapper youtube-unauth" aria-label="YouTube"> <div> <svg class="sqs-svg-icon--social" viewBox="0 0 64 64"> <use class="sqs-use--icon" xlink:href="#youtube-unauth-icon"></use> <use class="sqs-use--mask" xlink:href="#youtube-unauth-mask"></use> </svg> </div> </a><a href="https://www.tiktok.com/@kent.archaeologic" target="_blank" class="sqs-svg-icon--wrapper tiktok-unauth" aria-label="TikTok"> <div> <svg class="sqs-svg-icon--social" viewBox="0 0 64 64"> <use class="sqs-use--icon" xlink:href="#tiktok-unauth-icon"></use> <use class="sqs-use--mask" xlink:href="#tiktok-unauth-mask"></use> </svg> </div> </a><a href="https://sketchfab.com/kentarchaeologicalsociety" target="_blank" class="sqs-svg-icon--wrapper url" aria-label="URL"> <div> <svg class="sqs-svg-icon--social" viewBox="0 0 64 64"> <use class="sqs-use--icon" xlink:href="#url-icon"></use> <use class="sqs-use--mask" xlink:href="#url-mask"></use> </svg> </div> </a><a href="https://www.kentarchaeology.org.uk/search" target="_blank" class="sqs-svg-icon--wrapper url" aria-label="URL"> <div> <svg class="sqs-svg-icon--social" viewBox="0 0 64 64"> <use class="sqs-use--icon" xlink:href="#url-icon"></use> <use class="sqs-use--mask" xlink:href="#url-mask"></use> </svg> </div> </a><a href="https://www.kentarchaeology.org.uk/contact" target="_blank" class="sqs-svg-icon--wrapper url" aria-label="URL"> <div> <svg class="sqs-svg-icon--social" viewBox="0 0 64 64"> <use class="sqs-use--icon" xlink:href="#url-icon"></use> <use class="sqs-use--mask" xlink:href="#url-mask"></use> </svg> </div> </a><a href="https://www.kentarchaeology.org.uk/join" target="_blank" class="sqs-svg-icon--wrapper url" aria-label="URL"> <div> <svg class="sqs-svg-icon--social" viewBox="0 0 64 64"> <use class="sqs-use--icon" xlink:href="#url-icon"></use> <use class="sqs-use--mask" xlink:href="#url-mask"></use> </svg> </div> </a><a href="https://www.kentarchaeology.org.uk/stores" target="_blank" class="sqs-svg-icon--wrapper url" aria-label="URL"> <div> <svg class="sqs-svg-icon--social" viewBox="0 0 64 64"> <use class="sqs-use--icon" xlink:href="#url-icon"></use> <use class="sqs-use--mask" xlink:href="#url-mask"></use> </svg> </div> </a><a href="https://www.kentarchaeology.org.uk/support" target="_blank" class="sqs-svg-icon--wrapper url" aria-label="URL"> <div> <svg class="sqs-svg-icon--social" viewBox="0 0 64 64"> <use class="sqs-use--icon" xlink:href="#url-icon"></use> <use class="sqs-use--mask" xlink:href="#url-mask"></use> </svg> </div> </a> </nav> </div> </div></div></div><div class="fe-block fe-block-yui_3_17_2_1_1726075806689_22333"><div class="sqs-block code-block sqs-block-code" data-block-type="23" id="block-yui_3_17_2_1_1726075806689_22333"><div class="sqs-block-content"><a href=https://www.kentarchaeology.org.uk/support/nominate><img src=https://movementforgood.com/img/button.png alt="Button"></a></div></div></div><div class="fe-block fe-block-74d7d37dca6545870b70"><div class="sqs-block html-block sqs-block-html" data-blend-mode="NORMAL" data-block-type="2" data-border-radii="{"topLeft":{"unit":"px","value":0.0},"topRight":{"unit":"px","value":0.0},"bottomLeft":{"unit":"px","value":0.0},"bottomRight":{"unit":"px","value":0.0}}" id="block-74d7d37dca6545870b70"><div class="sqs-block-content"> <div class="sqs-html-content"> <p class="sqsrte-large" style="white-space:pre-wrap;"><a href="https://www.kentarchaeology.org.uk/documents">Documents</a><br><a href="/guidance">Guidance</a><br><a href="https://www.kentarchaeology.org.uk/licensing">Licensing</a><br><a href="/minutes" target="">Minutes</a><br><a href="/privacy" target="">Privacy</a></p> </div> </div></div></div></div></div> </div> </div> <div class="section-divider-display" style=" --stroke-thickness: 0; --stroke-dasharray: 0; --stroke-linecap: square; " > <style> .has-section-divider[data-section-id="65df7836178a9d2b20f8d54c"] { padding-bottom: var(--divider-height); z-index: var(--z-index); } .has-section-divider[data-section-id="65df7836178a9d2b20f8d54c"] .background-pause-button { bottom: calc(14px + var(--divider-height)); } .has-section-divider[data-section-id="65df7836178a9d2b20f8d54c"] .section-divider-svg-clip { display: none; } .has-section-divider[data-section-id="65df7836178a9d2b20f8d54c"].background-width--inset:not(.content-collection):not(.gallery-section):not(.user-items-list-section) { padding-bottom: calc(var(--sqs-site-gutter) + var(--divider-height)); } .has-section-divider[data-section-id="65df7836178a9d2b20f8d54c"].background-width--inset:not(.content-collection):not(.gallery-section):not(.user-items-list-section) .section-background { bottom: calc(var(--sqs-site-gutter) + var(--divider-height)); } .has-section-divider[data-section-id="65df7836178a9d2b20f8d54c"] .section-divider-block { height: var(--divider-height); } </style> <style data-section-divider-style> .has-section-divider[data-section-id="65df7836178a9d2b20f8d54c"] { padding-bottom: 6vw; } .has-section-divider[data-section-id="65df7836178a9d2b20f8d54c"].background-width--inset:not(.content-collection):not(.gallery-section):not(.user-items-list-section) { padding-bottom: calc(var(--sqs-site-gutter) + 6vw); } </style> <div class="section-divider-block"></div> <svg class="section-divider-svg-clip"> <clipPath id="section-divider-65df7836178a9d2b20f8d54c" clipPathUnits="objectBoundingBox" > <path class="section-divider-clip" d="M0,0" /> </clipPath> </svg> <svg class="section-divider-svg-stroke" viewBox="0 0 1 1" preserveAspectRatio="none"> <path class="section-divider-stroke" d="M0,0" vector-effect="non-scaling-stroke" /> </svg> </div> </section> </footer> </div> <script defer="defer" src="https://static1.squarespace.com/static/vta/5c5a519771c10ba3470d8101/scripts/site-bundle.72e5364d6a59fa8b809228ec33508ee5.js" type="text/javascript"></script> <script> // Prevent opening in new tab document.addEventListener('DOMContentLoaded', function() { var links = document.querySelectorAll('a[target="_blank"]'); links.forEach(function(link) { link.target = '_self'; }); }); // Membership icon replacement document.addEventListener('DOMContentLoaded', function () { var headerLink = document.querySelector('header a[href="https://www.kentarchaeology.org.uk/join"]'); if (headerLink) { headerLink.title = "Membership and subscriptions"; // Add a tooltip directly to the link headerLink.innerHTML = ` <style> .header-icon { transition: transform 0.3s ease; /* Smooth transition for the transform property */ } .header-icon:hover { transform: scale(1.2); /* Increase size by 20% on hover */ } </style> <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg width="101.58915mm" height="97.748016mm" viewBox="0 0 101.58915 97.748016" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <defs id="defs2" /> <g id="layer1" transform="translate(-68.408243,-154.75204)"> <path style="fill:#12518D;stroke-width:0.264583" d="m 71.528044,252.18021 c -2.054199,-0.61922 -3.119797,-2.32957 -3.119797,-5.00747 0,-4.51122 1.048821,-10.55067 2.691894,-15.5008 4.597871,-13.85212 15.615624,-25.54977 29.052859,-30.84569 l 2.88684,-1.13776 -1.80499,-1.90019 c -3.168584,-3.33569 -5.175473,-6.81029 -6.424698,-11.1233 -0.524674,-1.81146 -0.60503,-2.68628 -0.60503,-6.58681 0,-3.90053 0.08036,-4.77535 0.60503,-6.58681 2.384513,-8.23264 8.403088,-14.70199 16.194828,-17.40776 5.11242,-1.77536 11.55973,-1.77545 16.66993,-2.4e-4 7.76025,2.6958 13.79424,9.14545 16.15301,17.26574 0.81629,2.81012 1.01256,8.59759 0.39495,11.64563 -0.95419,4.70912 -3.19463,8.9794 -6.62338,12.62419 l -1.98122,2.10604 2.17989,0.85482 c 12.90647,5.06117 23.45822,15.60623 28.59672,28.5786 2.08826,5.27193 3.20335,10.44015 3.51834,16.30691 0.15951,2.97105 0.12867,3.30026 -0.41425,4.4218 -0.8981,1.85521 -1.9701,2.38631 -5.06782,2.51073 l -6.22016,0.10221 -0.17267,-4.18225 c -0.20605,-4.99074 -0.77728,-8.57499 -1.92499,-12.07863 -4.31841,-13.18295 -15.01226,-22.54009 -27.69555,-25.56341 -5.50393,-1.31198 -11.3825,-1.43121 -17.27728,-0.15274 -11.325516,2.45629 -21.32765,10.3784 -26.391443,20.90314 -2.43768,5.06657 -3.558469,9.98583 -3.842481,16.86509 l -0.171569,4.1557 -2.07256,-0.0208 c -1.13991,-0.0114 -6.74024,-0.12721 -7.134403,-0.24603 z m 51.330396,-58.3442 c 5.03779,-1.18781 9.18251,-5.30817 10.50365,-10.4419 0.4722,-1.83487 0.47412,-5.25716 0.004,-7.07384 -0.64203,-2.48084 -1.85703,-4.5525 -3.82132,-6.51561 -2.93076,-2.92899 -6.05235,-4.23735 -10.10977,-4.23735 -4.05741,0 -7.179,1.30836 -10.10976,4.23735 -2.87924,2.8775 -4.2083,6.06999 -4.2083,10.10867 0,3.35173 1.01561,6.27919 3.09952,8.93432 1.82646,2.32709 4.86222,4.29147 7.69277,4.97782 1.70837,0.41426 5.21444,0.41957 6.94922,0.0105 z" id="path179" /> </g> </svg> `; } }); // Support icon replacement document.addEventListener('DOMContentLoaded', function () { var link = document.querySelector('a[href="https://www.kentarchaeology.org.uk/support"]'); if (link) { link.title = "Support the Society"; // Add a tooltip directly to the link link.innerHTML = ` <style> .header-icon { transition: transform 0.3s ease; /* Smooth transition for the transform property */ } .header-icon:hover { transform: scale(1.2); /* Increase size by 20% on hover */ } </style> <svg width="164.99113mm" height="152.75317mm" viewBox="0 0 164.99113 152.75317" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-21.069855,-65.962339)"> <!-- Red interior path --> <path style="fill:#cc0000;fill-opacity:1;stroke:none" d="M 67.672471,182.74563 C 27.866563,142.85414 30.023105,143.997 26.390328,136.76288 c -5.176341,-10.30789 -6.578665,-21.14195 -4.193539,-32.39841 0.851926,-4.02061 1.796561,-6.782137 3.631931,-10.617507 5.637191,-11.780036 14.930935,-21.03854 27.085754,-25.102455 14.305363,-4.782941 28.922482,-3.085191 41.663286,4.839107 2.611016,1.623954 6.18706,4.426558 7.86349,6.162737 l 1.08029,1.118785 1.81969,-1.716601 c 7.92952,-7.480314 17.99202,-11.894209 29.45801,-12.921705 10.15703,-0.910199 21.39614,1.991928 30.35354,7.837789 7.22042,4.712251 12.37338,11.884231 16.15293,19.782343 1.83536,3.83537 2.78001,6.596897 3.63193,10.617507 2.38108,11.23736 0.97402,22.10801 -4.19354,32.39841 -3.65247,7.27333 -1.48523,6.11875 -41.30485,46.01213 l -35.87406,35.9405 z" /> <!-- Blue outline path --> <path style="fill:#1b4f8b;fill-opacity:1;stroke-width:0.264583" d="M 67.672471,182.74563 C 27.866563,142.85414 30.023105,143.997 26.390328,136.76288 c -5.176341,-10.30789 -6.578665,-21.14195 -4.193539,-32.39841 0.851926,-4.02061 1.796561,-6.782137 3.631931,-10.617507 5.637191,-11.780036 14.930935,-21.03854 27.085754,-25.102455 14.305363,-4.782941 28.922482,-3.085191 41.663286,4.839107 2.611016,1.623954 6.18706,4.426558 7.86349,6.162737 l 1.08029,1.118785 1.81969,-1.716601 c 7.92952,-7.480314 17.99202,-11.894209 29.45801,-12.921705 10.15703,-0.910199 21.39614,1.991928 30.35354,7.837789 7.22042,4.712251 12.37338,11.884231 16.15293,19.782343 1.83536,3.83537 2.78001,6.596897 3.63193,10.617507 2.38108,11.23736 0.97402,22.10801 -4.19354,32.39841 -3.65247,7.27333 -1.48523,6.11875 -41.30485,46.01213 l -35.87406,35.9405 z m 64.642219,-18.14691 c 30.52198,-30.61884 30.56878,-30.66898 32.84038,-35.18316 4.08358,-8.11498 4.45088,-18.20593 0.96993,-26.64731 -3.55381,-8.618072 -10.88013,-15.471873 -19.68808,-18.41827 -7.10968,-2.378298 -15.68683,-2.062613 -22.53649,0.829463 -5.37564,2.269712 -8.0753,4.43095 -15.40647,12.333801 -3.11508,3.357996 -5.68585,6.105446 -5.71282,6.105446 -0.027,0 -2.65428,-2.8022 -5.838451,-6.227097 -3.18417,-3.424901 -6.608048,-6.87933 -7.60862,-7.676509 -6.078474,-4.842873 -13.738593,-7.311422 -21.478405,-6.92163 -4.975788,0.25059 -8.551196,1.183394 -12.981733,3.38686 -15.915733,7.915471 -22.423294,27.522316 -14.393794,43.367536 2.280435,4.50016 2.68147,4.92978 32.951335,35.29995 15.996534,16.04953 29.203668,29.16574 29.349198,29.14711 0.14552,-0.0186 13.43583,-13.24691 29.53402,-29.39619 z" id="path327" /></g></svg> `; } }); // Support icon replacement document.addEventListener('DOMContentLoaded', function () { var link = document.querySelector('a[href="https://www.kentarchaeology.org.uk/stores"]'); if (link) { link.title = "Online stores"; // Add a tooltip directly to the link link.innerHTML = ` <style> .header-icon { transition: transform 0.3s ease; /* Smooth transition for the transform property */ } .header-icon:hover { transform: scale(1.2); /* Increase size by 20% on hover */ } </style> <svg width="122.34779mm" height="132.38565mm" viewBox="0 0 122.34779 132.38565" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-43.216699,-64.171316)"><path style="fill:#124f88;stroke:none;stroke-width:0.151925" d="m 76.180873,97.615658 h -15.19251 c -2.3117,0 -4.90187,-0.4029 -6.8102,1.20067 -1.75838,1.477472 -1.82523,3.548822 -2.02729,5.635962 -0.37252,3.84948 -0.84592,7.69547 -1.2154,11.54631 -1.48173,15.44532 -2.94309,30.92391 -4.792479,46.33717 -1.14354,9.53102 -2.262924,19.28082 -2.916203,28.86577 -0.179575,2.63287 2.06284,5.03936 4.696002,5.15938 9.62811,0.43755 19.37836,0.006 29.0177,0.006 h 57.883477 21.11759 c 2.92912,0 6.38845,0.61074 8.62783,-1.71524 1.58913,-1.6499 0.80064,-3.75407 0.79153,-5.72909 -0.0258,-5.36904 -0.93738,-10.93952 -1.62712,-16.25599 -1.04069,-8.01603 -1.57698,-16.1065 -2.34876,-24.1561 -0.93434,-9.73339 -2.09809,-19.44368 -3.13878,-29.16962 -0.47096,-4.39717 -0.90395,-8.80862 -1.22755,-13.21749 -0.14889,-2.03838 -0.0349,-4.85674 -1.46152,-6.489332 -2.0358,-2.33008 -4.55927,-2.01848 -7.36381,-2.01848 h -16.40277 c 0,-9.534215 0.88711,-16.451018 -5.84348,-24.008538 -9.17096,-10.297632 -25.54196,-12.464692 -37.156477,-5.02431 -3.9742,2.54596 -5.061793,4.171053 -7.376973,8.244933 -3.63831,6.40197 -3.11614,13.69772 -3.11614,20.787915 m 43.76471,0 H 86.967553 c 0,-5.159685 -0.81887,-11.075345 1.71812,-15.800215 5.86842,-10.92858 22.614967,-12.80212 30.095307,-2.36639 3.9268,5.47827 3.28127,11.80322 3.28127,18.166605 M 77.239206,110.06316 c 0,2.64958 -0.69187,6.42552 0.64993,8.81166 1.86716,3.32032 6.297587,3.09061 8.217007,-0.006 1.50421,-2.4267 0.86141,-6.06697 0.86141,-8.80573 h 35.094697 c 0,2.90998 -0.61712,6.49374 0.93799,9.08968 1.88767,3.15123 6.19047,2.63302 7.97787,-0.28395 1.47778,-2.41166 0.8125,-6.08596 0.8125,-8.80573 h 10.02706 c 0.72696,0 2.84024,-0.35839 3.34038,0.24354 0.80733,0.97186 0.51138,3.98408 0.63565,5.22577 0.48054,4.80402 0.94862,9.64375 1.53672,14.43288 1.64794,13.41834 2.83766,24.82255 4.18478,38.29542 0.38422,3.85009 0.84911,5.57788 1.21525,9.42964 0.21877,2.30014 0.62486,4.72639 1.16269,6.98855 -2.90416,0.28501 -6.83463,0.12661 -10.25237,0.15193 -6.68624,0.0495 -13.02006,0 -20.05926,0 H 55.513906 c 0.008,-2.77871 0.621287,-5.58994 0.88573,-8.35588 0.543037,-5.67989 1.273758,-9.22242 1.8231,-14.89895 1.101168,-11.37873 1.91152,-20.72421 3.45554,-32.06648 0.65221,-4.79111 0.81371,-9.62902 1.38859,-14.43289 0.13324,-1.11361 -0.1498,-3.94337 0.62943,-4.76999 0.58339,-0.61864 2.71642,-0.24354 3.51585,-0.24354 z" id="path181" /></g></svg> `; } }); // Contact icon replacement document.addEventListener('DOMContentLoaded', function () { var link = document.querySelector('a[href="https://www.kentarchaeology.org.uk/contact"]'); if (link) { link.title = "Contact the Society"; // Add a tooltip directly to the link link.innerHTML = ` <svg width="52.071472mm" height="52.701233mm" viewBox="0 0 52.071472 52.701233" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-26.453837,-199.79699)"><path style="fill:#1b4d86;stroke:none;stroke-width:0.091836" d="m 72.440043,199.85635 c -2.610618,0.37386 -4.379972,2.71245 -6.143588,4.47607 -3.282453,3.28245 -14.76781,15.36692 -18.210268,18.48179 -1.263052,1.14284 -2.481461,2.35654 -3.686157,3.56123 -0.515987,0.516 -1.278208,1.04789 -1.609142,1.70656 -0.607324,1.20891 -0.842491,2.79116 -1.199976,4.09572 -0.460358,1.68 -1.095407,3.34764 -1.456036,5.0514 -0.178913,0.84529 0.372849,1.63624 1.261625,1.63631 1.320049,7e-5 2.971039,-0.76645 4.232248,-1.15677 1.218551,-0.37708 2.462694,-0.68167 3.686157,-1.04469 0.499471,-0.14826 1.127281,-0.22328 1.57003,-0.50848 1.316295,-0.84774 2.385828,-2.39088 3.481637,-3.49994 2.658197,-2.69021 5.291479,-5.40533 7.920799,-8.12346 1.789899,-1.85031 9.244316,-9.53956 13.639744,-14.51591 0.590224,-0.66823 1.211767,-1.30334 1.708101,-2.05826 2.500438,-3.80309 -0.596633,-8.76011 -5.195174,-8.10157 M 69.3329,246.4821 H 41.373016 36.091703 c -1.46339,0 -3.528491,-0.001 -3.441809,3e-4 0.06657,10e-4 0.0296,0.01 0.0296,0.008 v -7.43872 -24.88756 -4.49552 c 0,-0.60879 0.03471,3.46202 -0.01319,-0.44815 -0.0332,-2.71356 -0.242304,-1.61367 -0.191107,-1.61367 h 2.928445 16.34681 c 0.77436,0 1.486904,0.0479 3.200557,-0.33888 1.378039,-0.80525 3.025792,-3.52897 0.505011,-5.35582 -0.658937,-0.47754 -1.680948,-0.42135 -2.419868,-0.42135 h -3.76527 -16.25498 -4.13262 c -0.73542,0 -1.45918,-0.0598 -1.98421,0.55965 -0.63679,0.75121 -0.40353,2.01717 -0.40353,2.93012 v 7.25504 28.65284 8.08157 c 0,0.96933 -0.26596,2.37479 0.56066,3.08634 0.72762,0.62623 1.94977,0.40343 2.83727,0.40343 h 7.07138 27.73448 7.71423 c 1.01359,0 2.28267,0.24924 2.9944,-0.64423 0.46194,-0.57994 0.40353,-1.32244 0.40353,-2.01901 v -3.94895 -16.07131 c 0,-1.64028 0.324233,-4.58513 -1.37754,-6.19599 -0.918821,-0.86973 -3.347909,0.17339 -3.724482,0.9877 -0.620261,1.34108 -0.747388,3.26082 -0.747388,4.65728 v 17.25684 m -25.425547,-14.8505 -0.06824,0.0682 z" id="path553" /></g></svg> `; } }); // Function to update the link function updateLink(link) { link.title = "Join the Society"; // Add a tooltip directly to the link link.innerHTML = ` <style> .header-icon { transition: transform 0.3s ease; /* Smooth transition for the transform property */ } .header-icon:hover { transform: scale(1.2); /* Increase size by 20% on hover */ } </style> <svg width="101.58915mm" height="97.748016mm" viewBox="0 0 101.58915 97.748016" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <defs id="defs2" /> <g id="layer1" transform="translate(-68.408243,-154.75204)"> <path style="fill:#12518D;stroke-width:0.264583" d="m 71.528044,252.18021 c -2.054199,-0.61922 -3.119797,-2.32957 -3.119797,-5.00747 0,-4.51122 1.048821,-10.55067 2.691894,-15.5008 4.597871,-13.85212 15.615624,-25.54977 29.052859,-30.84569 l 2.88684,-1.13776 -1.80499,-1.90019 c -3.168584,-3.33569 -5.175473,-6.81029 -6.424698,-11.1233 -0.524674,-1.81146 -0.60503,-2.68628 -0.60503,-6.58681 0,-3.90053 0.08036,-4.77535 0.60503,-6.58681 2.384513,-8.23264 8.403088,-14.70199 16.194828,-17.40776 5.11242,-1.77536 11.55973,-1.77545 16.66993,-2.4e-4 7.76025,2.6958 13.79424,9.14545 16.15301,17.26574 0.81629,2.81012 1.01256,8.59759 0.39495,11.64563 -0.95419,4.70912 -3.19463,8.9794 -6.62338,12.62419 l -1.98122,2.10604 2.17989,0.85482 c 12.90647,5.06117 23.45822,15.60623 28.59672,28.5786 2.08826,5.27193 3.20335,10.44015 3.51834,16.30691 0.15951,2.97105 0.12867,3.30026 -0.41425,4.4218 -0.8981,1.85521 -1.9701,2.38631 -5.06782,2.51073 l -6.22016,0.10221 -0.17267,-4.18225 c -0.20605,-4.99074 -0.77728,-8.57499 -1.92499,-12.07863 -4.31841,-13.18295 -15.01226,-22.54009 -27.69555,-25.56341 -5.50393,-1.31198 -11.3825,-1.43121 -17.27728,-0.15274 -11.325516,2.45629 -21.32765,10.3784 -26.391443,20.90314 -2.43768,5.06657 -3.558469,9.98583 -3.842481,16.86509 l -0.171569,4.1557 -2.07256,-0.0208 c -1.13991,-0.0114 -6.74024,-0.12721 -7.134403,-0.24603 z m 51.330396,-58.3442 c 5.03779,-1.18781 9.18251,-5.30817 10.50365,-10.4419 0.4722,-1.83487 0.47412,-5.25716 0.004,-7.07384 -0.64203,-2.48084 -1.85703,-4.5525 -3.82132,-6.51561 -2.93076,-2.92899 -6.05235,-4.23735 -10.10977,-4.23735 -4.05741,0 -7.179,1.30836 -10.10976,4.23735 -2.87924,2.8775 -4.2083,6.06999 -4.2083,10.10867 0,3.35173 1.01561,6.27919 3.09952,8.93432 1.82646,2.32709 4.86222,4.29147 7.69277,4.97782 1.70837,0.41426 5.21444,0.41957 6.94922,0.0105 z" id="path179" /> </g> </svg> `; } // Create a MutationObserver to observe changes in the DOM var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.addedNodes) { mutation.addedNodes.forEach(function(node) { // Check if the added node is within a header and is the specific link or contains it if (node.nodeType === 1 && node.matches('header a[href="https://www.kentarchaeology.org.uk/join"]')) { updateLink(node); } else if (node.nodeType === 1 && node.querySelector) { var link = node.querySelector('header a[href="https://www.kentarchaeology.org.uk/join"]'); if (link) { updateLink(link); } } }); } }); }); // Start observing the document body for added nodes observer.observe(document.body, { childList: true, subtree: true }); // Search icon replacement document.addEventListener('DOMContentLoaded', function () { var link = document.querySelector('a[href="https://www.kentarchaeology.org.uk/search"]'); if (link) { link.title = "Search the website"; // Add a tooltip directly to the link link.innerHTML = ` <svg width="53.00032mm" height="53.086411mm" viewBox="0 0 53.00032 53.086411" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-227.1513,-199.29986)"><path style="fill:#1b4f8a;stroke:none;stroke-width:0.111636" d="m 268.01565,234.52082 c 6.64244,-8.64285 4.61748,-22.02609 -3.12581,-29.23861 -5.99552,-5.58454 -15.1721,-7.52025 -22.88536,-4.69276 -2.77337,1.01667 -5.3919,2.49192 -7.59124,4.47845 -8.49897,7.67644 -9.58301,20.80181 -3.01416,30.0111 1.5015,2.10501 3.421,3.92981 5.58179,5.3497 5.6183,3.69214 12.64187,4.74955 19.08974,2.86402 1.38774,-0.4059 2.74736,-0.97391 4.01889,-1.6617 0.58932,-0.31872 1.35023,-1.02973 2.00777,-1.136 0.44788,-0.0723 0.83816,0.4529 1.11971,0.72831 0.82633,0.80858 1.6368,1.63413 2.45431,2.45163 l 6.13998,6.13998 c 1.51523,1.51523 2.9118,3.01048 5.24688,2.45152 2.5808,-0.61779 3.89353,-3.73656 2.57265,-6.02387 -0.97637,-1.69073 -2.87429,-3.09254 -4.24719,-4.46544 -2.34725,-2.34725 -4.65666,-5.34646 -7.36796,-7.25633 m -19.98283,-26.98407 c 1.71361,-0.20485 3.58485,-0.0367 5.24689,0.40178 1.65835,0.4375 3.1881,1.1628 4.57707,2.16697 8.17565,5.91033 7.81083,18.79881 -1.00472,23.9843 -1.64931,0.97011 -3.45402,1.6157 -5.35852,1.85036 -2.89495,0.35668 -6.00144,-0.0566 -8.59597,-1.45383 -7.34359,-3.95515 -10.04987,-13.7694 -5.24409,-20.72978 1.14817,-1.66293 2.6451,-3.10795 4.351,-4.19349 1.82849,-1.1637 3.89052,-1.77055 6.02834,-2.02631 z" id="path453" /></g></svg> `; } }); // Contact icon replacement // Function to update the contact link function updateContactLink(link) { link.title = "Contact the Society"; // Add a tooltip directly to the link link.innerHTML = ` <svg width="52.071472mm" height="52.701233mm" viewBox="0 0 52.071472 52.701233" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-26.453837,-199.79699)"><path style="fill:#1b4d86;stroke:none;stroke-width:0.091836" d="m 72.440043,199.85635 c -2.610618,0.37386 -4.379972,2.71245 -6.143588,4.47607 -3.282453,3.28245 -14.76781,15.36692 -18.210268,18.48179 -1.263052,1.14284 -2.481461,2.35654 -3.686157,3.56123 -0.515987,0.516 -1.278208,1.04789 -1.609142,1.70656 -0.607324,1.20891 -0.842491,2.79116 -1.199976,4.09572 -0.460358,1.68 -1.095407,3.34764 -1.456036,5.0514 -0.178913,0.84529 0.372849,1.63624 1.261625,1.63631 1.320049,7e-5 2.971039,-0.76645 4.232248,-1.15677 1.218551,-0.37708 2.462694,-0.68167 3.686157,-1.04469 0.499471,-0.14826 1.127281,-0.22328 1.57003,-0.50848 1.316295,-0.84774 2.385828,-2.39088 3.481637,-3.49994 2.658197,-2.69021 5.291479,-5.40533 7.920799,-8.12346 1.789899,-1.85031 9.244316,-9.53956 13.639744,-14.51591 0.590224,-0.66823 1.211767,-1.30334 1.708101,-2.05826 2.500438,-3.80309 -0.596633,-8.76011 -5.195174,-8.10157 M 69.3329,246.4821 H 41.373016 36.091703 c -1.46339,0 -3.528491,-0.001 -3.441809,3e-4 0.06657,10e-4 0.0296,0.01 0.0296,0.008 v -7.43872 -24.88756 -4.49552 c 0,-0.60879 0.03471,3.46202 -0.01319,-0.44815 -0.0332,-2.71356 -0.242304,-1.61367 -0.191107,-1.61367 h 2.928445 16.34681 c 0.77436,0 1.486904,0.0479 3.200557,-0.33888 1.378039,-0.80525 3.025792,-3.52897 0.505011,-5.35582 -0.658937,-0.47754 -1.680948,-0.42135 -2.419868,-0.42135 h -3.76527 -16.25498 -4.13262 c -0.73542,0 -1.45918,-0.0598 -1.98421,0.55965 -0.63679,0.75121 -0.40353,2.01717 -0.40353,2.93012 v 7.25504 28.65284 8.08157 c 0,0.96933 -0.26596,2.37479 0.56066,3.08634 0.72762,0.62623 1.94977,0.40343 2.83727,0.40343 h 7.07138 27.73448 7.71423 c 1.01359,0 2.28267,0.24924 2.9944,-0.64423 0.46194,-0.57994 0.40353,-1.32244 0.40353,-2.01901 v -3.94895 -16.07131 c 0,-1.64028 0.324233,-4.58513 -1.37754,-6.19599 -0.918821,-0.86973 -3.347909,0.17339 -3.724482,0.9877 -0.620261,1.34108 -0.747388,3.26082 -0.747388,4.65728 v 17.25684 m -25.425547,-14.8505 -0.06824,0.0682 z" id="path553" /></g></svg> `; } // Create a MutationObserver to observe changes in the DOM var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { mutation.addedNodes.forEach(function(node) { // Check if the added node is the specific link or contains it if (node.nodeType === 1 && node.matches('a[href="https://www.kentarchaeology.org.uk/contact"]')) { updateContactLink(node); } else if (node.nodeType === 1 && node.querySelector) { var link = node.querySelector('a[href="https://www.kentarchaeology.org.uk/contact"]'); if (link) { updateContactLink(link); } } }); }); }); // Start observing the document body for added nodes and subtree modifications observer.observe(document.body, { childList: true, subtree: true }); // Search icon replacement // Function to update the search link function updateSearchLink(link) { link.title = "Search the website"; // Add a tooltip directly to the link link.innerHTML = ` <svg width="53.00032mm" height="53.086411mm" viewBox="0 0 53.00032 53.086411" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-227.1513,-199.29986)"><path style="fill:#1b4f8a;stroke:none;stroke-width:0.111636" d="m 268.01565,234.52082 c 6.64244,-8.64285 4.61748,-22.02609 -3.12581,-29.23861 -5.99552,-5.58454 -15.1721,-7.52025 -22.88536,-4.69276 -2.77337,1.01667 -5.3919,2.49192 -7.59124,4.47845 -8.49897,7.67644 -9.58301,20.80181 -3.01416,30.0111 1.5015,2.10501 3.421,3.92981 5.58179,5.3497 5.6183,3.69214 12.64187,4.74955 19.08974,2.86402 1.38774,-0.4059 2.74736,-0.97391 4.01889,-1.6617 0.58932,-0.31872 1.35023,-1.02973 2.00777,-1.136 0.44788,-0.0723 0.83816,0.4529 1.11971,0.72831 0.82633,0.80858 1.6368,1.63413 2.45431,2.45163 l 6.13998,6.13998 c 1.51523,1.51523 2.9118,3.01048 5.24688,2.45152 2.5808,-0.61779 3.89353,-3.73656 2.57265,-6.02387 -0.97637,-1.69073 -2.87429,-3.09254 -4.24719,-4.46544 -2.34725,-2.34725 -4.65666,-5.34646 -7.36796,-7.25633 m -19.98283,-26.98407 c 1.71361,-0.20485 3.58485,-0.0367 5.24689,0.40178 1.65835,0.4375 3.1881,1.1628 4.57707,2.16697 8.17565,5.91033 7.81083,18.79881 -1.00472,23.9843 -1.64931,0.97011 -3.45402,1.6157 -5.35852,1.85036 -2.89495,0.35668 -6.00144,-0.0566 -8.59597,-1.45383 -7.34359,-3.95515 -10.04987,-13.7694 -5.24409,-20.72978 1.14817,-1.66293 2.6451,-3.10795 4.351,-4.19349 1.82849,-1.1637 3.89052,-1.77055 6.02834,-2.02631 z" id="path453" /></g></svg> `; } // Create a MutationObserver to observe changes in the DOM var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { mutation.addedNodes.forEach(function(node) { // Check if the added node is the specific link or contains it if (node.nodeType === 1 && node.matches('a[href="https://www.kentarchaeology.org.uk/search"]')) { updateSearchLink(node); } else if (node.nodeType === 1 && node.querySelector) { var link = node.querySelector('a[href="https://www.kentarchaeology.org.uk/search"]'); if (link) { updateSearchLink(link); } } }); }); }); // Start observing the document body for added nodes and subtree modifications observer.observe(document.body, { childList: true, subtree: true }); // Stores icon replacement function updateStoresLink(link) { link.title = "Online stores"; // Add a tooltip directly to the link link.innerHTML = ` <style> .header-icon { transition: transform 0.3s ease; /* Smooth transition for the transform property */ } .header-icon:hover { transform: scale(1.2); /* Increase size by 20% on hover */ } </style> <svg width="122.34779mm" height="132.38565mm" viewBox="0 0 122.34779 132.38565" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-43.216699,-64.171316)"><path style="fill:#124f88;stroke:none;stroke-width:0.151925" d="m 76.180873,97.615658 h -15.19251 c -2.3117,0 -4.90187,-0.4029 -6.8102,1.20067 -1.75838,1.477472 -1.82523,3.548822 -2.02729,5.635962 -0.37252,3.84948 -0.84592,7.69547 -1.2154,11.54631 -1.48173,15.44532 -2.94309,30.92391 -4.792479,46.33717 -1.14354,9.53102 -2.262924,19.28082 -2.916203,28.86577 -0.179575,2.63287 2.06284,5.03936 4.696002,5.15938 9.62811,0.43755 19.37836,0.006 29.0177,0.006 h 57.883477 21.11759 c 2.92912,0 6.38845,0.61074 8.62783,-1.71524 1.58913,-1.6499 0.80064,-3.75407 0.79153,-5.72909 -0.0258,-5.36904 -0.93738,-10.93952 -1.62712,-16.25599 -1.04069,-8.01603 -1.57698,-16.1065 -2.34876,-24.1561 -0.93434,-9.73339 -2.09809,-19.44368 -3.13878,-29.16962 -0.47096,-4.39717 -0.90395,-8.80862 -1.22755,-13.21749 -0.14889,-2.03838 -0.0349,-4.85674 -1.46152,-6.489332 -2.0358,-2.33008 -4.55927,-2.01848 -7.36381,-2.01848 h -16.40277 c 0,-9.534215 0.88711,-16.451018 -5.84348,-24.008538 -9.17096,-10.297632 -25.54196,-12.464692 -37.156477,-5.02431 -3.9742,2.54596 -5.061793,4.171053 -7.376973,8.244933 -3.63831,6.40197 -3.11614,13.69772 -3.11614,20.787915 m 43.76471,0 H 86.967553 c 0,-5.159685 -0.81887,-11.075345 1.71812,-15.800215 5.86842,-10.92858 22.614967,-12.80212 30.095307,-2.36639 3.9268,5.47827 3.28127,11.80322 3.28127,18.166605 M 77.239206,110.06316 c 0,2.64958 -0.69187,6.42552 0.64993,8.81166 1.86716,3.32032 6.297587,3.09061 8.217007,-0.006 1.50421,-2.4267 0.86141,-6.06697 0.86141,-8.80573 h 35.094697 c 0,2.90998 -0.61712,6.49374 0.93799,9.08968 1.88767,3.15123 6.19047,2.63302 7.97787,-0.28395 1.47778,-2.41166 0.8125,-6.08596 0.8125,-8.80573 h 10.02706 c 0.72696,0 2.84024,-0.35839 3.34038,0.24354 0.80733,0.97186 0.51138,3.98408 0.63565,5.22577 0.48054,4.80402 0.94862,9.64375 1.53672,14.43288 1.64794,13.41834 2.83766,24.82255 4.18478,38.29542 0.38422,3.85009 0.84911,5.57788 1.21525,9.42964 0.21877,2.30014 0.62486,4.72639 1.16269,6.98855 -2.90416,0.28501 -6.83463,0.12661 -10.25237,0.15193 -6.68624,0.0495 -13.02006,0 -20.05926,0 H 55.513906 c 0.008,-2.77871 0.621287,-5.58994 0.88573,-8.35588 0.543037,-5.67989 1.273758,-9.22242 1.8231,-14.89895 1.101168,-11.37873 1.91152,-20.72421 3.45554,-32.06648 0.65221,-4.79111 0.81371,-9.62902 1.38859,-14.43289 0.13324,-1.11361 -0.1498,-3.94337 0.62943,-4.76999 0.58339,-0.61864 2.71642,-0.24354 3.51585,-0.24354 z" id="path181" /></g></svg> `; } // Create a MutationObserver to observe changes in the DOM var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { mutation.addedNodes.forEach(function(node) { // Check if the added node is the specific link or contains it if (node.nodeType === 1 && node.matches('a[href="https://www.kentarchaeology.org.uk/stores"]')) { updateStoresLink(node); } else if (node.nodeType === 1 && node.querySelector) { var link = node.querySelector('a[href="https://www.kentarchaeology.org.uk/stores"]'); if (link) { updateStoresLink(link); } } }); }); }); // Start observing the document body for added nodes and subtree modifications observer.observe(document.body, { childList: true, subtree: true }); // Support icon replacement // Function to update the search link function updateSupportLink(link) { link.title = "Support the Society"; // Add a tooltip directly to the link link.innerHTML = ` <style> .header-icon { transition: transform 0.3s ease; /* Smooth transition for the transform property */ } .header-icon:hover { transform: scale(1.2); /* Increase size by 20% on hover */ } </style> <svg width="164.99113mm" height="152.75317mm" viewBox="0 0 164.99113 152.75317" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-21.069855,-65.962339)"> <!-- Red interior path --> <path style="fill:#cc0000;fill-opacity:1;stroke:none" d="M 67.672471,182.74563 C 27.866563,142.85414 30.023105,143.997 26.390328,136.76288 c -5.176341,-10.30789 -6.578665,-21.14195 -4.193539,-32.39841 0.851926,-4.02061 1.796561,-6.782137 3.631931,-10.617507 5.637191,-11.780036 14.930935,-21.03854 27.085754,-25.102455 14.305363,-4.782941 28.922482,-3.085191 41.663286,4.839107 2.611016,1.623954 6.18706,4.426558 7.86349,6.162737 l 1.08029,1.118785 1.81969,-1.716601 c 7.92952,-7.480314 17.99202,-11.894209 29.45801,-12.921705 10.15703,-0.910199 21.39614,1.991928 30.35354,7.837789 7.22042,4.712251 12.37338,11.884231 16.15293,19.782343 1.83536,3.83537 2.78001,6.596897 3.63193,10.617507 2.38108,11.23736 0.97402,22.10801 -4.19354,32.39841 -3.65247,7.27333 -1.48523,6.11875 -41.30485,46.01213 l -35.87406,35.9405 z" /> <!-- Blue outline path --> <path style="fill:#1b4f8b;fill-opacity:1;stroke-width:0.264583" d="M 67.672471,182.74563 C 27.866563,142.85414 30.023105,143.997 26.390328,136.76288 c -5.176341,-10.30789 -6.578665,-21.14195 -4.193539,-32.39841 0.851926,-4.02061 1.796561,-6.782137 3.631931,-10.617507 5.637191,-11.780036 14.930935,-21.03854 27.085754,-25.102455 14.305363,-4.782941 28.922482,-3.085191 41.663286,4.839107 2.611016,1.623954 6.18706,4.426558 7.86349,6.162737 l 1.08029,1.118785 1.81969,-1.716601 c 7.92952,-7.480314 17.99202,-11.894209 29.45801,-12.921705 10.15703,-0.910199 21.39614,1.991928 30.35354,7.837789 7.22042,4.712251 12.37338,11.884231 16.15293,19.782343 1.83536,3.83537 2.78001,6.596897 3.63193,10.617507 2.38108,11.23736 0.97402,22.10801 -4.19354,32.39841 -3.65247,7.27333 -1.48523,6.11875 -41.30485,46.01213 l -35.87406,35.9405 z m 64.642219,-18.14691 c 30.52198,-30.61884 30.56878,-30.66898 32.84038,-35.18316 4.08358,-8.11498 4.45088,-18.20593 0.96993,-26.64731 -3.55381,-8.618072 -10.88013,-15.471873 -19.68808,-18.41827 -7.10968,-2.378298 -15.68683,-2.062613 -22.53649,0.829463 -5.37564,2.269712 -8.0753,4.43095 -15.40647,12.333801 -3.11508,3.357996 -5.68585,6.105446 -5.71282,6.105446 -0.027,0 -2.65428,-2.8022 -5.838451,-6.227097 -3.18417,-3.424901 -6.608048,-6.87933 -7.60862,-7.676509 -6.078474,-4.842873 -13.738593,-7.311422 -21.478405,-6.92163 -4.975788,0.25059 -8.551196,1.183394 -12.981733,3.38686 -15.915733,7.915471 -22.423294,27.522316 -14.393794,43.367536 2.280435,4.50016 2.68147,4.92978 32.951335,35.29995 15.996534,16.04953 29.203668,29.16574 29.349198,29.14711 0.14552,-0.0186 13.43583,-13.24691 29.53402,-29.39619 z" id="path327" /></g></svg> `; } // Create a MutationObserver to observe changes in the DOM var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { mutation.addedNodes.forEach(function(node) { // Check if the added node is the specific link or contains it if (node.nodeType === 1 && node.matches('a[href="https://www.kentarchaeology.org.uk/support"]')) { updateSupportLink(node); } else if (node.nodeType === 1 && node.querySelector) { var link = node.querySelector('a[href="https://www.kentarchaeology.org.uk/support"]'); if (link) { updateSupportLink(link); } } }); }); }); // Start observing the document body for added nodes and subtree modifications observer.observe(document.body, { childList: true, subtree: true }); //J.2. Sliding footer document.addEventListener("DOMContentLoaded", function() { const excludedUrls = ["https://www.kentarchaeology.org.uk/"]; const currentUrl = window.location.href; if (!excludedUrls.includes(currentUrl) && window.innerWidth >= 1024 && window.innerWidth < 2500) { const footer = document.getElementById('footer-sections'); const iconContainer = document.createElement('div'); const backgroundDiv = document.createElement('div'); let isFooterPinned = false; backgroundDiv.classList.add('footer-background'); document.body.appendChild(backgroundDiv); iconContainer.classList.add('footer-icon-container'); const icon = document.createElement('div'); icon.classList.add('footer-icon'); iconContainer.appendChild(icon); document.body.appendChild(iconContainer); iconContainer.setAttribute('title', 'Pin footer'); icon.classList.add('rotated'); function updateFooterAndIcon(pinOpen) { footer.style.bottom = pinOpen ? "0" : "-100%"; footer.style.opacity = pinOpen ? "1" : "0"; icon.classList.toggle('rotated', !pinOpen); iconContainer.setAttribute('title', pinOpen ? 'Hide footer' : 'Pin footer'); backgroundDiv.style.opacity = pinOpen ? "0" : "1"; } function showFooterTemporarily(show) { if (!isFooterPinned) { footer.style.bottom = show ? "0" : "-100%"; footer.style.opacity = show ? "1" : "0"; backgroundDiv.style.opacity = show ? "0" : "1"; } } updateFooterAndIcon(false); iconContainer.addEventListener('click', function() { isFooterPinned = !isFooterPinned; updateFooterAndIcon(isFooterPinned); }); iconContainer.addEventListener('mouseover', function() { showFooterTemporarily(true); }); iconContainer.addEventListener('mouseout', function() { showFooterTemporarily(false); }); const style = document.createElement('style'); document.head.appendChild(style); style.textContent = ` #footer-sections { position: fixed; bottom: -100%; z-index: 1000; opacity: 0; transition: bottom 0.5s ease, opacity 0.5s ease; } .footer-icon-container { position: fixed; bottom: 5px; left: 50%; transform: translateX(-50%); z-index: 1002; cursor: pointer; } .footer-icon { width: 20px; height: 20px; background-image: url('data:image/svg+xml;utf8,<svg width="45.106873mm" height="28.257965mm" viewBox="0 0 45.106873 28.257965" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-249.0918,-46.235564)"><path style="fill:%231c4d85;stroke:none;stroke-width:0.264583" d="m 253.97113,46.304933 c -3.69067,0.653521 -6.16196,4.923102 -4.1729,8.342048 1.23005,2.114285 3.51407,3.839104 5.23124,5.55625 l 10.58333,10.583333 c 2.04946,2.049463 3.97378,4.173009 7.14375,3.617119 2.65457,-0.465402 4.55348,-3.143514 6.35,-4.940035 4.53866,-4.538663 10.44231,-9.027319 14.11579,-14.2875 1.72931,-2.475971 1.1049,-6.246284 -1.42611,-7.945438 -5.95788,-3.999442 -12.03963,6.277568 -16.12926,9.532938 -0.96228,0.765982 -3.96875,3.424766 -3.96875,3.424766 0,0 -3.09907,-2.555081 -3.96875,-3.424766 -3.15886,-3.158861 -8.64129,-11.364384 -13.75834,-10.458715 z"/></g></svg>'); background-size: contain; background-repeat: no-repeat; transition: transform 0.5s ease; /* Add this line */ } .rotated { transform: rotate(180deg); } .footer-background { position: fixed; bottom: 0; left: 0; right: 0; height: 20px; background-color: rgba(221, 221, 221, 0.5); opacity: 0; transition: opacity 0.5s ease; z-index: 1001; } `; function repositionIcon() { const bodyWidth = document.body.clientWidth; iconContainer.style.left = `${bodyWidth / 2}px`; } window.addEventListener('resize', repositionIcon); repositionIcon(); } }); //J.3. Sidebar //Styling for wide and narrow screens </script> <style> @media screen and (max-width: 750px) { .lefticons-background { display: none; } } </style> <script> // Function to insert the sidebar function insertSidebar() { // Check if the current URL matches the exclusion URL or contains '/search/' if (window.location.href === 'https://www.kentarchaeology.org.uk/' || window.location.href.includes('/search') || window.location.href.includes('/licensing') || window.location.href.includes('/privacy') || window.location.href.includes('/contact') || window.location.href.includes('/donate') || window.location.href.includes('/stores') || window.location.href.includes('/shop') || window.location.href.includes('/cart') || window.location.href.includes('/join') || window.location.href.includes('/support')) { return; // Exit the function if the URL matches or contains '/search/' } // Create a new div element for the sidebar const sidebar = document.createElement('div'); sidebar.className = 'lefticons-background'; // Assign the class 'lefticons-background' to the div sidebar.style.width = '50px'; // Set the width of the sidebar sidebar.style.height = '100vh'; // Full viewport height sidebar.style.position = 'fixed'; // Fix the sidebar to the left of the page sidebar.style.top = '0'; // Align to the top sidebar.style.left = '0'; // Align to the left side of the page sidebar.style.backgroundColor = 'white'; // Set background color sidebar.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.1)'; // Add shadow around the div sidebar.style.zIndex = '900'; // Set a higher z-index to ensure visibility // Ensure the sidebar is not already present to avoid duplication if (!document.querySelector('.lefticons-background')) { // Append the sidebar to the body of the document document.body.appendChild(sidebar); } } // Run the function to insert the sidebar when the DOM content is fully loaded document.addEventListener('DOMContentLoaded', insertSidebar); document.addEventListener('DOMContentLoaded', function() { var urlIncludes = ['/journal', '/magazine', '/reports', '/join', '/support', '/stores', '/exhibitions', '/minutes', '/notes', '/records', '/affiliates', '/search', '/news', '/shop', '/cart', '/books', '/papers', '/events', '/licensing', '/audio', '/documents', '/images', '/contact', '/maps', '/guidance', '/models', '/about', '/collections', '/library', '/videos', '/people', '/grants', '/groups']; // List of strings to match in the URL var currentUrl = window.location.href; // Function to check if the current URL includes any of the specified strings function urlMatchesList() { return urlIncludes.some(function(item) { return currentUrl.includes(item); }); } // If the URL matches, inject CSS if (urlMatchesList()) { var css = ` /* Sidebar styling */ :root { --sidebar-width: 30vw; /* Sidebar width */ --header-height: 0px; /* Default header height */ --footer-height: 0px; /* Default footer height */ } @media screen and (min-width: 700px) { .parent-container { display: flex; flex-wrap: nowrap; width: 100%; } .sidebar { flex: 0 0 var(--sidebar-width); /* Ensures the sidebar takes up the set width */ width: var(--sidebar-width); height: calc(100vh - var(--header-height) - var(--footer-height)); /* Adjust height dynamically */ overflow-y: auto; overflow-x: hidden; position: fixed; background-color: white; padding-left: 55px; z-index: 800; padding-right: 20px; top: var(--header-height); /* Adjust top position dynamically */ left: -33vw; /* Adjust based on the sidebar's width */ transition: left 0.5s ease; box-shadow: 12px 0px 48px 12px rgba(0, 0, 0, 0.1); /* Shadow settings */ } .sidebar .featured-image img { max-width: 100%; /* Ensure the image does not exceed the sidebar width */ height: auto; /* Maintain the aspect ratio */ } } .sidebar-visible .content { margin-left: 40vw; /* Adjust this value to match your sidebar's width */ } .author-avatar-image { border-radius: 50%; /* Makes the image circular */ max-width: 200px; /* Limits the width to 200px */ height: auto; /* Keeps the aspect ratio */ display: block; /* Ensures the image can be centered */ margin-left: auto; /* Centers the image horizontally */ padding-top: 20px; padding-bottom: 10px; margin-right: auto; /* Centers the image horizontally */ } /* Adjustments for narrow screens */ @media (max-width: 900px) { .author-avatar-image { width: 100%; margin-left: 0; /* Aligns the image to the left */ float: left; } } .author-name { font-weight: bold; } .sidebar-title { font-size: 1.5em; padding-bottom: 40px; } span.blog-item-tag-wrapper { padding-right: 10px; } `; // Dynamically set CSS variables for header and footer height var header = document.querySelector('header'); var footer = document.querySelector('.footer-background'); if (header) { var headerHeight = header.offsetHeight + 'px'; document.documentElement.style.setProperty('--header-height', headerHeight); } if (footer) { var footerHeight = footer.offsetHeight + 'px'; document.documentElement.style.setProperty('--footer-height', footerHeight); } // Monitor header and footer height changes var resizeObserver = new ResizeObserver(() => { if (header) { var dynamicHeaderHeight = header.offsetHeight + 'px'; document.documentElement.style.setProperty('--header-height', dynamicHeaderHeight); } if (footer) { var dynamicFooterHeight = footer.offsetHeight + 'px'; document.documentElement.style.setProperty('--footer-height', dynamicFooterHeight); } }); if (header) resizeObserver.observe(header); if (footer) resizeObserver.observe(footer); var styleSheet = document.createElement('style'); styleSheet.type = 'text/css'; styleSheet.innerText = css; document.head.appendChild(styleSheet); } }); //Refresh when transitioning from a wide to a narrow screen (function() { // Define the threshold for screen width var widthThreshold = 768; // Variable to store the width of the screen on the last check var lastWidth = window.innerWidth; window.addEventListener('resize', function() { // Check the current width of the window var currentWidth = window.innerWidth; // Check if we've crossed the threshold since the last resize event if ((lastWidth < widthThreshold && currentWidth >= widthThreshold) || (lastWidth >= widthThreshold && currentWidth < widthThreshold)) { // Refresh the page window.location.reload(); } // Update the lastWidth for the next event lastWidth = currentWidth; }); })(); //Sidebar functionality document.addEventListener("DOMContentLoaded", function () { // Check URL to determine if the script should run if ( !window.location.href.includes("/journal") && !window.location.href.includes("/magazine") && !window.location.href.includes("/reports") && !window.location.href.includes("/news") && !window.location.href.includes("/books") && !window.location.href.includes("/papers") && !window.location.href.includes("/audio") && !window.location.href.includes("/events") && !window.location.href.includes("/exhibitions") && !window.location.href.includes("/images") && !window.location.href.includes("/maps") && !window.location.href.includes("/minutes") && !window.location.href.includes("/join") && !window.location.href.includes("/support") && !window.location.href.includes("/guidance") && !window.location.href.includes("/models") && !window.location.href.includes("/notes") && !window.location.href.includes("/records") && !window.location.href.includes("/contact") && !window.location.href.includes("/search") && !window.location.href.includes("/videos") && !window.location.href.includes("/grants") && !window.location.href.includes("/collections") && !window.location.href.includes("/library") && !window.location.href.includes("/licensing") && !window.location.href.includes("/about") && !window.location.href.includes("/shop") && !window.location.href.includes("/stores") && !window.location.href.includes("/groups") && !window.location.href.includes("/documents") && !window.location.href.includes("/affiliates") && !window.location.href.includes("/people") ) { console.log("URL does not match list, script will not run."); return; } // Create and add sidebar to the DOM var sidebar = document.createElement('div'); sidebar.className = 'sidebar'; document.body.appendChild(sidebar); // Ensure it's added to the correct parent container // Store the original URL of the page when the script first loads const originalUrl = document.location.href; // Function to check if the sliding sidebar header has functioned function hasSlidingHeaderFunctioned() { // Use the stored original URL instead of the potentially modified current URL const urlPath = new URL(originalUrl).pathname; // Check if the URL path contains more than one forward slash const hasMultipleSlashes = urlPath.split('/').filter(Boolean).length > 1; // Check if the original URL contains specific strings that should allow the function to run const shouldInclude = originalUrl.includes('journal/category/') || originalUrl.includes('magazine/category/') || originalUrl.includes('reference/category/') || originalUrl.includes('records/category/') || originalUrl.includes('affiliates/') || originalUrl.includes('groups/') || originalUrl.includes('grants/'); // Exclude the URL if it does not have more than one forward slash or meets other exclusion conditions const isExcluded = !hasMultipleSlashes && !shouldInclude || originalUrl.includes('?') || originalUrl.includes('/tag/') || originalUrl.includes('/shop/') || originalUrl.includes('/category/') && !shouldInclude; // Check if the sliding header should function return !isExcluded && window.innerWidth >= 900; } // Function to insert the div before the og:image after it has loaded function insertDivBeforeImage() { // Check if the window width is greater than 750px if (window.innerWidth > 750) { // Find the og:image element const ogImage = document.querySelector('meta[property="og:image"]'); // Get the current URL path const path = window.location.pathname; const slashCount = (path.match(/\//g) || []).length; // Count the number of forward slashes in the URL // Determine the height of the spacer div based on the number of slashes const spacerHeight = (slashCount === 1) ? '15vh' : '5vh'; // If the og:image element is found if (ogImage) { const imageUrl = ogImage.getAttribute('content'); const img = new Image(); img.src = imageUrl; // Wait for the image to load img.onload = createAndInsertDiv; } else { // Fallback if no og:image is found createAndInsertDiv(); } } } // Helper function to fetch og:image from a given URL async function fetchOgImage(url) { try { const response = await fetch(url); const html = await response.text(); const parser = new DOMParser(); const doc = parser.parseFromString(html, 'text/html'); const ogImageMeta = doc.querySelector('meta[property="og:image"]'); return ogImageMeta ? ogImageMeta.content : null; } catch (error) { console.error('Failed to fetch og:image from URL:', url, error); return null; } } // Function to convert the category name to a URL-friendly format function convertToUrlFormat(categoryName) { return categoryName.replace(/\+/g, ' ').trim().toLowerCase().replace(/\s+/g, '-'); } // Main function to handle the image loading logic async function loadImage() { const currentUrl = window.location.href; const urlPattern = /https:\/\/www\.kentarchaeology\.org\.uk\/(journal|magazine|reference|records|grants|groups|affiliates)\/category\/([^\/]+)/; let imageUrl = ''; if (currentUrl === 'https://www.kentarchaeology.org.uk/contact') { // Use the specific image for the /contact page imageUrl = '/s/icon-contact.png'; } else if (currentUrl.includes('https://www.kentarchaeology.org.uk/search')) { // Use the specific image for the /search page imageUrl = '/s/search-icon.png'; } else if (urlPattern.test(currentUrl)) { const match = currentUrl.match(urlPattern); const basePath = match[1]; const categoryName = match[2]; const convertedCategoryName = convertToUrlFormat(categoryName); const modifiedUrl = `https://www.kentarchaeology.org.uk/${basePath}/${convertedCategoryName}`; imageUrl = await fetchOgImage(modifiedUrl); if (!imageUrl) { console.log('No corresponding page found; defaulting to current page og:image.'); imageUrl = document.querySelector('meta[property="og:image"]') ? document.querySelector('meta[property="og:image"]').content : ''; } } else { imageUrl = document.querySelector('meta[property="og:image"]') ? document.querySelector('meta[property="og:image"]').content : ''; } if (imageUrl) { let featuredImageContainer = document.createElement('div'); featuredImageContainer.className = 'featured-image'; var imgElement = document.createElement('img'); imgElement.src = imageUrl; // Wait for the image to load before inserting the div imgElement.onload = function () { insertDivBeforeImage(); // Call the function to insert the div after the image has loaded }; featuredImageContainer.appendChild(imgElement); sidebar.insertBefore(featuredImageContainer, sidebar.firstChild); // Keep this as the first child of the sidebar } else { console.log('Meta tag for og:image not found.'); insertDivBeforeImage(); // Call the function to insert the div if no image is found } } // Call the main function loadImage(); // Optionally, call the function on window resize to ensure the condition is re-evaluated if the window size changes window.addEventListener('resize', insertDivBeforeImage); // Create and add the sidebar title var sidebarTitle = document.createElement('h1'); // Use h1 instead of div sidebarTitle.className = 'sidebar-title'; sidebarTitle.style.marginLeft = '10px'; sidebarTitle.style.paddingBottom = '5px'; sidebarTitle.style.fontSize = '2em'; // Set font size to 2em // Remove specified strings from the document title var modifiedTitle = document.title.replace(/ — Kent Archaeological Society|Volumes — |Issues — |Sources — |Society Affiliates — |Society Groups — |Funds — /g, ''); // Italicize 'Archaeologia Cantiana' modifiedTitle = modifiedTitle.replace(/Archaeologia Cantiana/g, '<i>Archaeologia Cantiana</i>'); sidebarTitle.innerHTML = modifiedTitle; // Set modified title as innerHTML of h1 sidebar.appendChild(sidebarTitle); // Function to fetch og:description or og:image from the target URL function fetchDescriptionOrImage(url, fetchImageIfNoDescription) { fetch(url).then(response => response.text()).then(html => { var parser = new DOMParser(); var doc = parser.parseFromString(html, 'text/html'); var metaElement = doc.querySelector('meta[property="og:description"]'); var descriptionDiv; if (metaElement) { var description = metaElement.getAttribute('content'); // Insert the description below the title descriptionDiv = document.createElement('div'); descriptionDiv.innerHTML = description; descriptionDiv.style.marginBottom = '20px'; descriptionDiv.style.marginLeft = '10px'; // Insert description after the title sidebarTitle.insertAdjacentElement('afterend', descriptionDiv); } else if (fetchImageIfNoDescription) { // If no description found, fetch og:image instead var imageElement = doc.querySelector('meta[property="og:image"]'); if (imageElement) { var imageUrl = imageElement.getAttribute('content'); // Create an image element to display the og:image var imageDiv = document.createElement('div'); var img = document.createElement('img'); img.src = imageUrl; img.style.maxWidth = '100%'; img.style.marginLeft = '10px'; imageDiv.appendChild(img); imageDiv.style.marginBottom = '20px'; // Insert the image below the title sidebarTitle.insertAdjacentElement('afterend', imageDiv); } } }).catch(error => console.error('Error fetching description or image:', error)); } // Check the current URL and fetch the correct description var currentUrl = window.location.href; var match; // Array of URLs that need redirection to their landing pages for description fetching var categoryUrls = { "https://www.kentarchaeology.org.uk/journal/category/Volumes": "https://www.kentarchaeology.org.uk/journal", "https://www.kentarchaeology.org.uk/records/category/Sources": "https://www.kentarchaeology.org.uk/records", "https://www.kentarchaeology.org.uk/records": "https://www.kentarchaeology.org.uk/records", "https://www.kentarchaeology.org.uk/notes/category/Sources": "https://www.kentarchaeology.org.uk/notes", "https://www.kentarchaeology.org.uk/notes": "https://www.kentarchaeology.org.uk/notes", "https://www.kentarchaeology.org.uk/magazine/category/Issues": "https://www.kentarchaeology.org.uk/magazine", "https://www.kentarchaeology.org.uk/groups/category/society-groups": "https://www.kentarchaeology.org.uk/groups", "https://www.kentarchaeology.org.uk/affiliates/category/society-affiliates": "https://www.kentarchaeology.org.uk/affiliates", "https://www.kentarchaeology.org.uk/grants/category/funds": "https://www.kentarchaeology.org.uk/grants", "https://www.kentarchaeology.org.uk/journal": "https://www.kentarchaeology.org.uk/journal", "https://www.kentarchaeology.org.uk/magazine": "https://www.kentarchaeology.org.uk/magazine" }; // Check if the current URL matches any of the specified category URLs if (categoryUrls[currentUrl]) { fetchDescriptionOrImage(categoryUrls[currentUrl], true); } else if (match = currentUrl.match(/\/(journal|magazine|records)\/category\/(?:Volumes|Issues|Sources)/)) { // Match for journal, magazine, or records category pages with 'Volumes', 'Issues', or 'Sources' fetchDescriptionOrImage(`https://www.kentarchaeology.org.uk/${match[1]}`, true); } else if (match = currentUrl.match(/\/(groups|records|affiliates|grants)\/category\/(.+)/)) { // Match for groups, affiliates, or grants category pages var decodedName = match[2].toLowerCase().replace(/\+/g, '-'); fetchDescriptionOrImage(`https://www.kentarchaeology.org.uk/${match[1]}/${decodedName}`, true); } // Existing meta description handling code var metaElement = document.querySelector('meta[property="og:description"]'); var titleElement = document.querySelector('title'); var descriptionFound = false; if (metaElement) { var metaContent = metaElement.getAttribute('content'); metaContent = metaContent.replace(/ ,/g, ','); var pattern = /Archaeologia Cantiana, Volume (\d+)/; var match = metaContent.match(pattern); if (match) { var volumeNo = match[1]; var journalLink = 'https://www.kentarchaeology.org.uk/journal'; var volumeLink = `https://www.kentarchaeology.org.uk/journal/${volumeNo}`; // Extract the author's name and year part of the original description var authorPattern = /^(.*?, \d{4},)/; var authorMatch = metaContent.match(authorPattern); var authorPart = authorMatch ? authorMatch[1] : ''; metaContent = metaContent.replace('Archaeologia Cantiana', `<a href="${journalLink}" style="color: #00539B; font-style: italic;">Archaeologia Cantiana</a>`); metaContent = metaContent.replace(new RegExp(`Volume ${volumeNo}`), `<a href="${volumeLink}" style="color: #00539B;">Volume ${volumeNo}</a>`); if (titleElement) { var pageTitle = titleElement.textContent.trim(); pageTitle = pageTitle.replace(' — Kent Archaeological Society', '').trim(); // Use the extracted author part instead of hardcoding "Gillian M. Metcalfe" var formattedDescription = `${authorPart} '${pageTitle}', <a href="${journalLink}" style="color: #00539B; font-style: italic;">Archaeologia Cantiana</a>, <a href="${volumeLink}" style="color: #00539B;">Volume ${volumeNo}</a>. Maidstone: Kent Archaeological Society.`; metaContent = formattedDescription; } } var descriptionDiv = document.createElement('div'); descriptionDiv.innerHTML = metaContent; descriptionDiv.style.marginBottom = '20px'; descriptionDiv.style.marginLeft = '10px'; sidebarTitle.insertAdjacentElement('afterend', descriptionDiv); // Insert description after the title descriptionFound = true; // Mark that a description has been found } // Check if the current page URL includes the specified URL if (window.location.href.includes('https://www.kentarchaeology.org.uk/news')) { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>Contributions to the news blog are welcome. See the guidance for contributors and contact Digital Manager <a href="mailto:jacob.scott@kentarchaeology.org.uk">Jacob Scott</a>.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.marginLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL includes the specified URL if (window.location.href.includes('https://www.kentarchaeology.org.uk/records')) { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>Contributions to the records section are welcome. Contact Digital Manager <a href="mailto:jacob.scott@kentarchaeology.org.uk">Jacob Scott</a>.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.marginLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL matches the specified URL if (window.location.href.includes('https://www.kentarchaeology.org.uk/about')) { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>A list of patrons, trustees and members of staff is available on the Society <a href="https://www.kentarchaeology.org.uk">homepage</a> and you can find out more about the team, group chairs and secretaries in the <a href="https://www.kentarchaeology.org.uk/people">People</a> section.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.marginLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL matches the specified URL if (window.location.href.includes('https://www.kentarchaeology.org.uk/contact')) { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>Use this contact form for general queries to the Society. Email addresses are provided for members of the Management Team, contacts for Society Grants and Group Members. For membership queries contact <a href="mailto:membership@kentarchaeology.org.uk">membership@kentarchaeology.org.uk</a></p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.marginLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL matches the specified URL if (window.location.href.includes('https://www.kentarchaeology.org.uk/search')) { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>Search the entire website here or use the search icon on the left of each index page to search within a section.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.marginLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL matches the specified URL if (window.location.href.includes('https://www.kentarchaeology.org.uk/library')) { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>The Library is open to members for research by arrangement. Please email the <a href="mailto:craig.campbell@kentarchaeology.org.uk">Archivist</a> to arrange your visit during the open hours of <a href="https://museum.maidstone.gov.uk/visit-us/opening-times/">Maidstone Museum</a>. Archival material is held in store at our offices and should be requested ahead of your visit. Additional Society archives and historical documents are held in deposit at the <a href="https://www.kentarchives.org.uk/">Kent History and Library Centre</a>.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.marginLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL matches the specified URL if (window.location.href.includes('https://www.kentarchaeology.org.uk/journal')) { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>Contributions to the next volume are welcome. See the <a href="https://www.kentarchaeology.org.uk/guidance/journal-contributors">guidance for contributors</a> and contact Editor <a href="mailto:jason.mazzocchi@kentarchaeology.org.uk">Jason Mazzocchi</a>.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.marginLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL matches the specified URL if (window.location.href.includes('https://www.kentarchaeology.org.uk/reports')) { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>Archive reports are generated at the conclusion of projects and typically filed with the local authority. Reports are made available here for the purpose of independent research. Many reports are available only through <a href="https://www.kentarchives.org.uk/">Kent Archives</a> or <a href="https://webapps.kent.gov.uk/KCC.ExploringKentsPast.Web.Sites.Public/SingleResult.aspx?uid=TKE1046">Kent Historic Environment Record</a>.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.marginLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL matches the specified URL exactly if (window.location.href === 'https://www.kentarchaeology.org.uk/groups/category/society-groups') { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>Also see the minutes of the Society <a href="https://www.kentarchaeology.org.uk/minutes/tag/Publications+Committee">Publications Committee</a>.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.marginLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL matches the specified URL exactly if (window.location.href === 'https://www.kentarchaeology.org.uk/stores') { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>Become a Society Member to list your online store here.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.marginLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL includes the specified URL if (window.location.href.includes('https://www.kentarchaeology.org.uk/magazine')) { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>Contributions to the next issue are welcome. Contact Editor <a href="mailto:craig.campbell@kentarchaeology.org.uk">Craig Campbell</a>.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.paddingLeft = '10px'; sidebar.appendChild(customHtmlContent); } // Check if the current page URL includes the specified URL if (window.location.href.includes('https://www.kentarchaeology.org.uk/magazine-latest')) { var customHtmlContent = document.createElement('div'); customHtmlContent.innerHTML = '<p>Contributions to the next issue are welcome. Contact Editor <a href="mailto:craig.campbell@kentarchaeology.org.uk">Craig Campbell</a>.</p><br><br>'; customHtmlContent.style.marginBottom = '20px'; // Increase vertical space below the custom HTML content customHtmlContent.style.paddingLeft = '10px'; sidebar.appendChild(customHtmlContent); } (function() { // Check if the URL matches any of the specified patterns and does not contain '/tag/' or 'offset' if ( (window.location.href.includes('/affiliates/category/') || window.location.href.includes('/records/category/') || window.location.href.includes('/notes/category/') || window.location.href.includes('/journal/category/') || window.location.href.includes('/grants/category/') || window.location.href.includes('/magazine/category/') || window.location.href.includes('/groups/category/')) && !window.location.href.includes('/tag/') && !window.location.href.includes('offset') ) { // Get the current URL and decode it to match the target structure let currentUrl = window.location.href; let decodedUrl = decodeURIComponent(currentUrl); // Determine which category the URL belongs to and extract the entity name accordingly let entityName = ''; let basePath = ''; if (decodedUrl.includes('/affiliates/category/')) { entityName = decodedUrl.split('/affiliates/category/')[1]; basePath = 'affiliates'; } else if (decodedUrl.includes('/records/category/')) { entityName = decodedUrl.split('/records/category/')[1]; basePath = 'records'; } else if (decodedUrl.includes('/notes/category/')) { entityName = decodedUrl.split('/notes/category/')[1]; basePath = 'notes'; } else if (decodedUrl.includes('/journal/category/')) { entityName = decodedUrl.split('/journal/category/')[1]; basePath = 'journal'; } else if (decodedUrl.includes('/grants/category/')) { entityName = decodedUrl.split('/grants/category/')[1]; basePath = 'grants'; } else if (decodedUrl.includes('/magazine/category/')) { entityName = decodedUrl.split('/magazine/category/')[1]; basePath = 'magazine'; } else if (decodedUrl.includes('/groups/category/')) { entityName = decodedUrl.split('/groups/category/')[1]; basePath = 'groups'; } if (entityName) { // Replace + with - and remove any additional special characters (you may need to refine this step based on actual URL patterns) let targetEntityName = entityName.replace(/\+/g, '-').toLowerCase(); // Construct the target URL based on the base path let targetUrl = 'https://www.kentarchaeology.org.uk/' + basePath + '/' + targetEntityName; // Fetch the target page's HTML content fetch(targetUrl) .then(response => { if (response.ok) { return response.text(); } else { throw new Error('Network response was not ok.'); } }) .then(html => { // Parse the HTML content let parser = new DOMParser(); let doc = parser.parseFromString(html, 'text/html'); // Get all content within the div with class 'blog-item-content-wrapper' except buttons let contentWrapper = doc.querySelector('.blog-item-content-wrapper'); let contentElements = []; if (contentWrapper) { // Clone all children of the content wrapper except button containers (div.sqs-block-button-container) contentElements = Array.from(contentWrapper.children).filter(el => !el.classList.contains('sqs-block-button-container')).map(el => el.cloneNode(true)); } // Append the content elements to the sidebar let sidebar = document.querySelector('.sidebar'); if (sidebar) { // Append all other content from the content wrapper (excluding buttons) contentElements.forEach(element => { sidebar.appendChild(element); }); } else { console.error('Sidebar not found.'); } }) .catch(error => { console.error('There was a problem with the fetch operation:', error); }); } else { console.error('Entity name could not be extracted from the URL.'); } } })(); // Check the URL to determine if it includes '/search' var contentElement; if (window.location.href.includes('/search')) { // If URL contains '/search', use the #page element contentElement = document.querySelector('#page'); } else { // Otherwise, use the .content element contentElement = document.querySelector('.content'); } // If no content element is found, log a message and return if (!contentElement) { console.log('Content element not found'); return; } // Create the parent container and insert it into the DOM var parentContainer = document.createElement('div'); parentContainer.className = 'parent-container'; contentElement.parentNode.insertBefore(parentContainer, contentElement); // Move the sidebar and content element into the parent container parentContainer.appendChild(sidebar); parentContainer.appendChild(contentElement); // Optionally set some basic layout styles directly in JS (can also be done in CSS) parentContainer.style.display = 'flex'; sidebar.style.flex = '0 0 250px'; // Set sidebar width, adjust as needed contentElement.style.flex = '1'; // Allow content to take the remaining space // Function to copy and append the image to the sidebar, considering lazy loading attributes function copyAndAppendLazyLoadedImage() { // Select the image by its class const image = document.querySelector('.author-avatar-image'); // Check if the image exists and has a data-src or data-image attribute if (image && (image.dataset.src || image.dataset.image)) { // Clone the image node const imageClone = image.cloneNode(true); // If the image uses lazy loading, set the src attribute of the clone directly // Prefer data-src over data-image if both are present const imageUrl = image.dataset.src || image.dataset.image; imageClone.src = imageUrl; // Ensure the onerror handler is correctly set for the clone imageClone.onerror = function() { this.src = 'default-avatar.png'; }; // Remove lazy loading attributes to ensure the image loads imageClone.removeAttribute('data-src'); imageClone.removeAttribute('data-image'); imageClone.removeAttribute('data-load'); // Select the div with the class "sidebar" const sidebar = document.querySelector('.sidebar'); // Append the cloned image to the sidebar if (sidebar) { sidebar.appendChild(imageClone); } else { console.log('Sidebar not found'); } } else { console.log('Image with lazy loading attributes not found'); } } // Call the function to copy and append the lazy loaded image copyAndAppendLazyLoadedImage(); // Assuming the image already exists and just needs to be styled and positioned... function styleAndPositionAuthorImage() { const sidebar = document.querySelector('.sidebar'); if (!sidebar) { console.log('Sidebar not found'); return; } // Create or select the container for the author's image let imageContainer = sidebar.querySelector('.author-avatar-image'); if (!imageContainer) { imageContainer = document.createElement('div'); imageContainer.className = 'author-avatar-image'; sidebar.prepend(imageContainer); // Add the image container at the top of the sidebar } } // Call the function where appropriate in your script styleAndPositionAuthorImage(); // Select the original div and the existing sidebar const originalDiv = document.querySelector('.blog-item-author-profile-wrapper'); const sidebarDiv = document.querySelector('.sidebar'); // Assuming the sidebar div already exists // Extract the necessary elements and data from the original div const authorLink = originalDiv.querySelector('a').getAttribute('href'); const authorName = originalDiv.querySelector('.author-name').textContent; const authorBio = originalDiv.querySelector('.author-bio').innerHTML; // Using innerHTML to keep formatting and any nested tags // Create new elements for insertion into the sidebar const newContentDiv = document.createElement('div'); // Wrapper for the new content newContentDiv.innerHTML = ` <a href="${authorLink}"> <span class="author-name">${authorName}</span> </a> <div class="author-bio">${authorBio}</div> <br> `; // Append the new elements to the sidebar div, ensuring they are added below all other items sidebarDiv.appendChild(newContentDiv); }); //Tag clouds on index pages document.addEventListener('DOMContentLoaded', function () { // Predefined periods and a placeholder for place names const periodsOrder = ['Prehistoric', 'Bronze Age', 'Iron Age', 'Medieval', 'Modern']; let placeNames = new Set(); let spacerDiv; // To store the reference of the spacer above the spinner // Extract the section from the URL (e.g., 'books', 'news') function getSectionFromUrl() { const url = window.location.href; const pathParts = url.split('/'); return pathParts.length > 3 ? pathParts[3].toLowerCase() : null; } // Check if the current URL is the homepage, contains more than 2 forward slashes, or includes certain excluded paths function isExcludedUrl() { const url = window.location.href; const pathParts = url.split('/').filter(Boolean); // Filter out empty parts // Check if it's the homepage or contains more than 2 forward slashes (excluding protocol) const isHomePage = url === 'https://www.kentarchaeology.org.uk/'; const hasMoreThanTwoSlashes = pathParts.length > 3; // Check if the URL contains any of the excluded paths const excludedPaths = ['/documents', '/guidance', '/licensing', '/privacy', '/search', '/contact', '/join', '/shop', '/stores', '/support']; const containsExcludedPath = excludedPaths.some(path => url.includes(path)); // Return true if any of the conditions are met return isHomePage || hasMoreThanTwoSlashes || containsExcludedPath; } // Show a loading spinner in the sidebar beneath a 30vh spacer function showLoadingSpinner() { const sidebar = document.querySelector('.tags-container'); if (sidebar) { // Create a spacer div of 30vh spacerDiv = document.createElement('div'); spacerDiv.style.height = '30vh'; sidebar.appendChild(spacerDiv); // Create spinner const spinner = document.createElement('div'); spinner.classList.add('loading-spinner'); spinner.style.width = '50px'; spinner.style.height = '50px'; spinner.style.border = '5px solid #f3f3f3'; spinner.style.borderTop = '5px solid #12518D'; spinner.style.borderRadius = '50%'; spinner.style.animation = 'spin 1s linear infinite'; spinner.style.margin = '20px auto'; sidebar.appendChild(spinner); // Add CSS for spinner animation const style = document.createElement('style'); style.innerHTML = ` @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } `; document.head.appendChild(style); } } // Hide the loading spinner and remove the spacer function hideLoadingSpinner() { const spinner = document.querySelector('.loading-spinner'); if (spinner) { spinner.remove(); } if (spacerDiv) { spacerDiv.remove(); } } // Fetch and parse tag data async function fetchTagData() { try { const response = await fetch('https://www.kentarchaeology.org.uk/tags'); const pageText = await response.text(); const parser = new DOMParser(); const pageHTML = parser.parseFromString(pageText, 'text/html'); // Find the #tags div and get its content const tagDiv = pageHTML.querySelector('#tags'); if (!tagDiv) { console.error('Tag data div not found on https://www.kentarchaeology.org.uk/tags!'); return null; } // Parse the comma-separated data const tagArray = tagDiv.textContent.trim().split('\n'); const headers = tagArray[0].split(',').map(h => h.trim()); const data = tagArray.slice(1).map(row => row.split(',').map(cell => cell.trim())); return { headers, data }; } catch (error) { console.error('Error fetching tag data:', error); return null; } } // Fetch and parse place names for mapping async function fetchPlaceNames() { try { const response = await fetch('https://www.kentarchaeology.org.uk/mapping#coordinates'); const pageText = await response.text(); const rows = pageText.trim().split('\n').slice(1); // Remove headers rows.forEach(row => { const columns = row.split(','); placeNames.add(columns[0].trim()); // Assuming first column is the place name }); } catch (error) { console.error('Error fetching place data:', error); } } // Get the section with the maximum tag count for a given tag function getMaxTagSection(row, headers) { let maxCount = -1; let maxSection = ''; for (let i = 1; i < row.length; i++) { // Skip the tag name column const count = parseInt(row[i], 10); if (count > maxCount) { maxCount = count; maxSection = headers[i].toLowerCase(); } } return maxSection; } // Filter and categorize tags function categorizeTags(tagData, section = null) { const headers = tagData.headers; const categories = { periods: [], places: [], topics: [] }; tagData.data.forEach(row => { const tagName = row[0].replace(/\+/g, ' '); // Get the count of tagged items for the specified section or all sections if null let tagCount = 0; if (section) { const sectionIndex = headers.findIndex(header => header.toLowerCase() === section); tagCount = parseInt(row[sectionIndex], 10); } else { // Sum all counts across sections tagCount = row.slice(1).reduce((sum, val) => sum + parseInt(val, 10), 0); } // Skip tags with no items in the section if (tagCount <= 0) return; // Determine category if (periodsOrder.includes(tagName)) { categories.periods.push({ name: tagName, count: tagCount, row }); } else if (placeNames.has(tagName)) { categories.places.push({ name: tagName, count: tagCount, row }); } else { categories.topics.push({ name: tagName, count: tagCount, row }); } }); // Order periods according to periodsOrder array categories.periods.sort((a, b) => periodsOrder.indexOf(a.name) - periodsOrder.indexOf(b.name)); // Alphabetically order places and topics categories.places.sort((a, b) => a.name.localeCompare(b.name)); categories.topics.sort((a, b) => a.name.localeCompare(b.name)); return categories; } // Append a search box for filtering tags function appendSearchBox(sidebar) { const searchBox = document.createElement('input'); searchBox.type = 'text'; searchBox.placeholder = 'Search tags...'; searchBox.className = 'tag-search-box'; searchBox.style.margin = '10px 0'; searchBox.style.width = '100%'; // Fill 100% of the sidebar width searchBox.style.height = '30px'; // Slightly taller height searchBox.style.padding = '5px'; searchBox.style.boxSizing = 'border-box'; // Ensure padding does not affect width sidebar.appendChild(searchBox); return searchBox; } // Append a category of tags to the sidebar function appendCategoryToSidebar(categoryName, tags, headers, searchBox = null) { const sidebar = document.querySelector('.tags-container'); // Create header for category const header = document.createElement('h3'); header.textContent = categoryName; sidebar.appendChild(header); // Container to hold tags const tagsContainer = document.createElement('div'); tagsContainer.className = `${categoryName.toLowerCase()}-tags`; sidebar.appendChild(tagsContainer); // Append each tag as a link tags.forEach(tag => { const tagLink = document.createElement('a'); tagLink.textContent = tag.name; // Get section with the maximum count if in search view; otherwise use the specified section const section = window.location.href.includes('/search') ? getMaxTagSection(tag.row, headers) : getSectionFromUrl(); // Encode spaces as '+' instead of '%20' tagLink.href = `https://www.kentarchaeology.org.uk/${section}/tag/${encodeURIComponent(tag.name).replace(/%20/g, '+')}`; tagLink.style.fontSize = `${Math.min(1 + tag.count * 0.1, 2)}em`; // Cap font size tagLink.style.marginRight = '10px'; // Add spacing between words tagLink.style.display = 'inline-block'; tagLink.title = `${tag.count} tagged items`; // If it's a period, make it appear on a new line if (categoryName === 'Periods') { tagLink.style.display = 'block'; } tagsContainer.appendChild(tagLink); }); // Add search functionality if search box is provided if (searchBox) { searchBox.addEventListener('input', function () { const query = searchBox.value.toLowerCase(); Array.from(tagsContainer.children).forEach(tagLink => { tagLink.style.display = tagLink.textContent.toLowerCase().includes(query) ? '' : 'none'; }); }); } } // Toggle sidebar content visibility when the icon is clicked async function toggleSidebarContent() { // Hide all other content in the sidebar before starting the spinner and fetching data document.querySelectorAll('.sidebar > *:not(.tags-container)').forEach(child => { child.style.display = 'none'; }); showLoadingSpinner(); // Fetch data only once if (!placeNames.size) await fetchPlaceNames(); const tagData = await fetchTagData(); hideLoadingSpinner(); // Check if showing all tags or filtering by section const isSearchView = window.location.href.includes('/search'); const section = isSearchView ? null : getSectionFromUrl(); if (tagData) { const sidebar = document.querySelector('.tags-container'); // Insert header for all tags or section tags const headerText = isSearchView ? 'All tags' : `${section.charAt(0).toUpperCase() + section.slice(1)} tags`; const sectionHeader = document.createElement('h2'); sectionHeader.textContent = headerText; sidebar.appendChild(sectionHeader); // Append search box always, regardless of the number of tags const searchBox = appendSearchBox(sidebar); const categorizedTags = categorizeTags(tagData, section); appendCategoryToSidebar('Periods', categorizedTags.periods, tagData.headers, searchBox); appendCategoryToSidebar('Places', categorizedTags.places, tagData.headers, searchBox); appendCategoryToSidebar('Topics', categorizedTags.topics, tagData.headers, searchBox); } } // Check if the current URL is excluded before proceeding if (!isExcludedUrl() && !window.location.href.includes('/tag/')) { // Create tags icon and add click event const icon = document.createElement('div'); icon.innerHTML = `<svg width="30px" height="30px" viewBox="0 0 54.140942 54.175812" version="1.1" id="svg5" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-7.6233961,-81.345457)"><path style="fill:#1b4f8b;stroke:none;stroke-width:0.105625" d="m 37.832305,81.47701 c -3.29096,0.51802 -5.601932,3.86552 -7.816256,6.07989 l -16.160638,16.16064 -3.802503,3.8025 c -1.1675275,1.16747 -2.3485215,2.36769 -2.4252155,4.11938 -0.125071,2.8561 2.5079305,4.73021 4.3264675,6.54875 l 13.203135,13.20314 c 1.80038,1.80038 3.766908,4.50026 6.65438,4.08769 2.182003,-0.31181 3.604562,-2.19975 5.070005,-3.66519 l 8.978132,-8.97813 10.351258,-10.35126 c 1.651241,-1.65124 3.950481,-3.33247 4.931421,-5.49251 0.89433,-1.96959 0.56108,-4.33411 0.56108,-6.44313 V 88.19065 c 0,-2.23088 0.13742,-4.47787 -1.90125,-5.93733 -1.75158,-1.25399 -4.308551,-0.82268 -6.337503,-0.82268 H 43.11356 c -1.710387,0 -3.591359,-0.21962 -5.281255,0.0464 m 10.351259,8.99208 c 5.812231,0 5.805894,8.96313 0,8.96313 -5.80431,0 -5.819203,-8.96313 0,-8.96313 z" id="path496" /></g></svg>`; icon.className = 'tags-icon'; icon.title = 'Tags'; document.body.appendChild(icon); // Create container for tags in sidebar const sidebar = document.querySelector('.sidebar'); const tagsContainer = document.createElement('div'); tagsContainer.className = 'tags-container'; sidebar.appendChild(tagsContainer); tagsContainer.style.display = 'none'; // On icon click, toggle content visibility icon.addEventListener('click', function() { const isVisible = tagsContainer.style.display !== 'none'; tagsContainer.style.display = isVisible ? 'none' : ''; // Only fetch and display tags if showing for the first time if (!isVisible) { toggleSidebarContent(); } else { // Restore the original sidebar content when hiding document.querySelectorAll('.sidebar > *:not(.tags-container)').forEach(child => { child.style.display = ''; }); } }); // Initial setup: display the first tag cloud on load if URL does not contain '/tag/' or '/category/' if (!window.location.href.includes('/tag/') && !window.location.href.includes('/category/')) { const firstTagCloud = document.querySelector('.content .sqs-block.tagcloud-block'); if (firstTagCloud) { // Create h3 'Categories' title with 10px left padding const categoriesTitle = document.createElement('h3'); categoriesTitle.textContent = 'Categories'; categoriesTitle.style.paddingLeft = '10px'; sidebar.appendChild(categoriesTitle); // Append the cloned tag cloud const tagCloudClone = firstTagCloud.cloneNode(true); sidebar.appendChild(tagCloudClone); } } } }); // Metadata icon to store and restore the sidebar content, and insert the SVG dynamically document.addEventListener('DOMContentLoaded', function() { // List of URL segments to block the script's execution, including the homepage const blockedPaths = ['/', '/licensing', '/privacy', '/cart', '/documents', '/guidance', '/shop', '/contact', '/search', '/support', '/stores', '/join', '/donate']; // Check if the current URL matches any of the blocked paths const urlContainsBlockedPath = blockedPaths.some(path => window.location.pathname === path || window.location.pathname.startsWith(path + '/')); // Exit early if a blocked path is found in the URL if (urlContainsBlockedPath) return; // Continue with the script if no blocked paths are found and window width is greater than 700 if (window.innerWidth > 700) { const sidebar = document.querySelector('.sidebar'); // Select the first .sidebar element let originalChildren = []; // Variable to hold the original children nodes // Create SVG element for the restore icon const svgNS = "http://www.w3.org/2000/svg"; const restoreIcon = document.createElementNS(svgNS, "svg"); restoreIcon.setAttribute("viewBox", "0 0 51.463867 51.565079"); restoreIcon.setAttribute("id", "restoreIcon"); // Set initial size let defaultWidth = 35; let defaultHeight = 35; restoreIcon.style.width = `${defaultWidth}px`; restoreIcon.style.height = `${defaultHeight}px`; // Set styles for transition and scaling from the center restoreIcon.style.transition = 'transform 0.3s ease'; restoreIcon.style.transformOrigin = 'center center'; // Ensure scaling from center restoreIcon.style.transform = 'scale(1.2)'; // Start larger by default // Add a title element for tooltip const title = document.createElementNS(svgNS, "title"); title.textContent = "Showing page metadata"; // Default tooltip text restoreIcon.appendChild(title); const g = document.createElementNS(svgNS, "g"); g.setAttribute("transform", "translate(-343.5825,-128.79629)"); const path = document.createElementNS(svgNS, "path"); path.setAttribute("d", "m 367.76707,128.90583 c -6.40917,0.84152 -11.94131,2.80986 -16.68052,7.42949 -2.16998,2.11527 -3.8833,4.6857 -5.17697,7.41485 -1.29616,2.73439 -2.15008,5.82244 -2.2876,8.85175 -0.18291,4.02926 0.24693,7.88782 1.75913,11.66822 4.34801,10.86965 15.88807,17.41733 27.41536,15.86455 12.18715,-1.6418 21.68941,-12.1605 22.22604,-24.41454 0.53664,-12.25686 -8.03739,-23.50864 -20.0131,-26.21833 -2.28757,-0.5176 -4.89823,-0.90377 -7.24234,-0.59599 m 3.01764,9.9457 c 1.63657,-0.23588 3.3015,0.32943 4.19734,1.78041 1.33129,2.15601 -0.13479,5.01924 -2.58793,5.40198 -1.60045,0.24966 -3.31045,-0.25559 -4.22781,-1.68022 -1.4025,-2.17824 0.11799,-5.14166 2.6184,-5.50217 m 4.32529,28.13449 c -0.14253,0.50585 -0.18548,1.35884 -0.55967,1.7453 -0.46613,0.48131 -1.53628,0.67283 -2.15621,0.90207 -2.54799,0.94201 -6.38593,1.42493 -8.13677,-1.23914 -0.68631,-1.04441 -0.63129,-2.23778 -0.52134,-3.42 0.26263,-2.8228 1.49956,-5.4921 2.09877,-8.24822 0.23366,-1.07458 0.72272,-2.46813 0.17673,-3.52018 -0.84021,-1.61916 -3.21299,-0.71468 -4.4809,-0.30216 0.10562,-0.5122 0.14555,-1.3506 0.48826,-1.7604 0.44771,-0.53533 1.59321,-0.69878 2.22762,-0.9245 2.42216,-0.86194 6.10499,-1.471 7.88268,0.975 0.76317,1.05014 0.73057,2.19755 0.67123,3.41989 -0.12805,2.63259 -1.23009,5.32162 -1.94427,7.84587 -0.35256,1.24619 -1.19146,3.67157 0.0478,4.66236 1.18362,0.94623 2.95085,0.1545 4.20609,-0.13589 z"); path.setAttribute("style", "fill:#1b4f8a;stroke:none;stroke-width:0.100588"); path.setAttribute("fill-rule", "evenodd"); g.appendChild(path); restoreIcon.appendChild(g); document.body.appendChild(restoreIcon); // Add initial CSS class for hover effects restoreIcon.classList.add('no-hover'); // Capture the sidebar children nodes after a delay setTimeout(function() { // Store each child node in the originalChildren array originalChildren = Array.from(sidebar.children).map(child => child.cloneNode(true)); // Start content checking interval only after capturing original children setInterval(function() { if (!isOriginalContent(sidebar, originalChildren)) { // Content has changed, update tooltip, reduce icon size, and enable hover effect title.textContent = "Show page metadata"; restoreIcon.style.transform = 'scale(1)'; // Default size restoreIcon.classList.remove('no-hover'); restoreIcon.classList.add('has-hover'); } else { // Content is original, update tooltip, keep icon size larger, and disable hover effect title.textContent = "Showing page metadata"; restoreIcon.style.transform = 'scale(1.2)'; // 20% larger restoreIcon.classList.remove('has-hover'); restoreIcon.classList.add('no-hover'); } }, 500); // Check every 500 milliseconds }, 1000); // Delay of 1 second // Add an event listener to restore the sidebar children when clicked restoreIcon.addEventListener('click', function() { // Check if the sidebar content has been altered if (!isOriginalContent(sidebar, originalChildren)) { // Clear current sidebar content and restore original children nodes sidebar.innerHTML = ''; originalChildren.forEach(child => sidebar.appendChild(child.cloneNode(true))); } }); // Function to check if the sidebar content is equal to the original children function isOriginalContent(sidebar, originalChildren) { if (sidebar.children.length !== originalChildren.length) return false; return Array.from(sidebar.children).every((child, index) => child.isEqualNode(originalChildren[index])); } // Style for hover effect when content has changed const style = document.createElement('style'); style.innerHTML = ` .has-hover { transition: transform 0.3s ease; transform-origin: center center; /* Ensure scaling from center */ } .has-hover:hover { transform: scale(1.1); /* Slightly increase size on hover */ } .no-hover { transition: transform 0.3s ease; /* Smooth transition for size change */ } `; document.head.appendChild(style); } }); // Tags icon on blog pages // Tags icon on blog pages document.addEventListener('DOMContentLoaded', function() { // Count forward slashes in the URL var url = window.location.href; var slashCount = (url.match(/\//g) || []).length; // Define substrings to prevent script execution var excludedSubstrings = [ '/shop', '/join', '/stores', '/search', '/contact', '/support', '/documents', '/p/', '/guidance', '/minutes' ]; // Check if the current URL contains any excluded substrings if (excludedSubstrings.some(substring => url.includes(substring))) { console.log("Script execution skipped due to URL containing excluded substrings:", url); return; // Exit the script early if any of the substrings are found } // Only run script if there are four or more slashes if (slashCount >= 4) { var tagsExist = document.querySelectorAll('.blog-meta-item--tags').length > 0; // Hide tags on initial page load document.querySelectorAll('.blog-meta-item--tags').forEach(function(tagElement) { tagElement.style.display = 'none'; // Hide the tag elements initially }); // Create the icon element var icon = document.createElement('div'); icon.innerHTML = `<svg width="30px" height="30px" viewBox="0 0 54.140942 54.175812" version="1.1" id="svg5" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-7.6233961,-81.345457)"><path style="fill:${tagsExist ? '#1b4f8b' : '#d3d3d3'};stroke:none;stroke-width:0.105625" d="m 37.832305,81.47701 c -3.29096,0.51802 -5.601932,3.86552 -7.816256,6.07989 l -16.160638,16.16064 -3.802503,3.8025 c -1.1675275,1.16747 -2.3485215,2.36769 -2.4252155,4.11938 -0.125071,2.8561 2.5079305,4.73021 4.3264675,6.54875 l 13.203135,13.20314 c 1.80038,1.80038 3.766908,4.50026 6.65438,4.08769 2.182003,-0.31181 3.604562,-2.19975 5.070005,-3.66519 l 8.978132,-8.97813 10.351258,-10.35126 c 1.651241,-1.65124 3.950481,-3.33247 4.931421,-5.49251 0.89433,-1.96959 0.56108,-4.33411 0.56108,-6.44313 V 88.19065 c 0,-2.23088 0.13742,-4.47787 -1.90125,-5.93733 -1.75158,-1.25399 -4.308551,-0.82268 -6.337503,-0.82268 H 43.11356 c -1.710387,0 -3.591359,-0.21962 -5.281255,0.0464 m 10.351259,8.99208 c 5.812231,0 5.805894,8.96313 0,8.96313 -5.80431,0 -5.819203,-8.96313 0,-8.96313 z" id="path496" /></g></svg>`; icon.className = 'tags-icon'; // Use class for CSS positioning icon.title = tagsExist ? 'Tags' : 'No tags'; // Set tooltip text based on tags existence document.body.appendChild(icon); if (tagsExist) { var sidebar = document.querySelector('.sidebar'); var tagsMoved = false; var showingTags = false; icon.addEventListener('click', function() { showingTags = !showingTags; toggleSidebarContent(showingTags); }); function toggleSidebarContent(show) { // Hide all children of the sidebar initially Array.from(sidebar.children).forEach(function(child) { child.style.display = show ? 'none' : ''; // Hide or show child element based on `show` }); if (show) { if (!tagsMoved) { moveTagsToSidebar(); tagsMoved = true; } // Show the tags container after hiding all other sidebar content var tagsContainer = sidebar.querySelector('.tags-container'); if (tagsContainer) { tagsContainer.style.display = ''; } } } function moveTagsToSidebar() { var tagsContainer = document.createElement('div'); tagsContainer.className = 'tags-container'; tagsContainer.style.paddingLeft = '10px'; sidebar.appendChild(tagsContainer); var tagsTitle = document.createElement('h3'); tagsTitle.textContent = 'Tags'; tagsTitle.style.cssText = 'padding-top: 50px; padding-bottom: 10px; margin-left: 10px;'; tagsContainer.appendChild(tagsTitle); document.querySelectorAll('.blog-meta-item--tags').forEach(function(tagElement) { var tagClone = tagElement.cloneNode(true); tagClone.style.display = ''; // Ensure the cloned tag element is visible tagClone.style.marginLeft = '10px'; // Add margin-left to individual tag elements tagsContainer.appendChild(tagClone); // Remove the original tag element from the page tagElement.remove(); }); } // Update tags icon position based on sidebar visibility var updateTagsIconPosition = function(isSidebarVisible) { icon.style.left = isSidebarVisible ? '10px' : '-60px'; // Update position }; // Assuming sidebar event listeners are in place to call updateTagsIconPosition // Modify the sidebar script as necessary to call this function when its visibility changes } } }); document.addEventListener("DOMContentLoaded", () => { // Check if the current URL matches the desired URL if (window.location.href === "https://www.kentarchaeology.org.uk/journal") { // Find the div with id="index" const indexDiv = document.getElementById("index"); // Find the div with class="sidebar" const sidebarDiv = document.querySelector(".sidebar"); // If both elements are found, append the content of #index to .sidebar if (indexDiv && sidebarDiv) { // Add 5px padding to the left of #index indexDiv.style.paddingLeft = "10px"; sidebarDiv.appendChild(indexDiv.cloneNode(true)); // Clone the node and append console.log("Content from #index appended to .sidebar."); } else { console.warn("Required elements not found on the page."); } } else { console.log("The current URL does not match the target URL."); } // Add hover effect to underline links const style = document.createElement("style"); style.textContent = ` a:hover { text-decoration: underline; } `; document.head.appendChild(style); }); document.addEventListener("DOMContentLoaded", async () => { // Function to check URL format function isValidVolumeUrl(url) { const regex = /^https:\/\/www\.kentarchaeology\.org\.uk\/journal\/category\/Volume\+(\d+)$/; return regex.test(url); } // Function to extract volume number from URL function getVolumeNumber(url) { const regex = /^https:\/\/www\.kentarchaeology\.org\.uk\/journal\/category\/Volume\+(\d+)$/; const match = url.match(regex); return match ? match[1] : null; } // Function to fetch content from the corresponding page async function fetchVolumeContent(volumeNumber) { const url = `https://www.kentarchaeology.org.uk/journal/${volumeNumber}`; try { const response = await fetch(url); if (!response.ok) { throw new Error(`Failed to fetch content from ${url}`); } const htmlText = await response.text(); const parser = new DOMParser(); const doc = parser.parseFromString(htmlText, "text/html"); const contentWrapper = doc.querySelector(".blog-item-content-wrapper"); if (contentWrapper) { // Remove buttons containing the word "Articles" const links = contentWrapper.querySelectorAll("a"); links.forEach(link => { if (link.textContent.trim() === "Articles") { link.remove(); } }); return contentWrapper.innerHTML; } return null; } catch (error) { console.error(error); return null; } } // Main logic const currentUrl = window.location.href; if (isValidVolumeUrl(currentUrl)) { const volumeNumber = getVolumeNumber(currentUrl); if (volumeNumber) { const sidebar = document.querySelector(".sidebar"); if (sidebar) { const content = await fetchVolumeContent(volumeNumber); if (content) { const newContentDiv = document.createElement("div"); newContentDiv.innerHTML = content; // Add 10px left padding to the new div newContentDiv.style.paddingLeft = "10px"; sidebar.appendChild(newContentDiv); } else { console.error("No content found in '.blog-item-content-wrapper' for the specified volume."); } } else { console.error('Sidebar element with class "sidebar" not found.'); } } } }); // Search Icon on index pages document.addEventListener('DOMContentLoaded', function() { // Define substrings to prevent script execution var excludedSubstrings = [ 'journal/category/', '/shop', '/join', '/search', '/licensing', '/contact', '/stores', '/support', '/documents', '/p/', '/guidance', '/minutes' ]; // Check if the current URL contains any excluded substrings if (excludedSubstrings.some(substring => window.location.href.includes(substring))) { console.log("Script execution skipped due to URL containing excluded substrings:", window.location.href); return; // Exit the script if any of the substrings are found } var searchBlocks = document.querySelectorAll('.sqs-block.search-block.sqs-block-search'); if (!searchBlocks.length) return; // Early exit if no search blocks found var searchBlock = document.querySelector('.sqs-block.search-block.sqs-block-search'); searchBlock.style.display = 'none'; // Initially hide the search block var sidebar = document.querySelector('.sidebar'); var originalContent = Array.from(sidebar.children); // Grab all original sidebar children var tagsContainer = document.querySelector('.tags-container'); // Select the tags container var icon = document.createElement('div'); icon.innerHTML = `<svg width="35px" height="35px" viewBox="0 0 53.00032 53.086411" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-227.1513,-199.29986)"><path style="fill:#1b4f8a;stroke:none;stroke-width:0.111636" d="m 268.01565,234.52082 c 6.64244,-8.64285 4.61748,-22.02609 -3.12581,-29.23861 -5.99552,-5.58454 -15.1721,-7.52025 -22.88536,-4.69276 -2.77337,1.01667 -5.3919,2.49192 -7.59124,4.47845 -8.49897,7.67644 -9.58301,20.80181 -3.01416,30.0111 1.5015,2.10501 3.421,3.92981 5.58179,5.3497 5.6183,3.69214 12.64187,4.74955 19.08974,2.86402 1.38774,-0.4059 2.74736,-0.97391 4.01889,-1.6617 0.58932,-0.31872 1.35023,-1.02973 2.00777,-1.136 0.44788,-0.0723 0.83816,0.4529 1.11971,0.72831 0.82633,0.80858 1.6368,1.63413 2.45431,2.45163 l 6.13998,6.13998 c 1.51523,1.51523 2.9118,3.01048 5.24688,2.45152 2.5808,-0.61779 3.89353,-3.73656 2.57265,-6.02387 -0.97637,-1.69073 -2.87429,-3.09254 -4.24719,-4.46544 -2.34725,-2.34725 -4.65666,-5.34646 -7.36796,-7.25633 m -19.98283,-26.98407 c 1.71361,-0.20485 3.58485,-0.0367 5.24689,0.40178 1.65835,0.4375 3.1881,1.1628 4.57707,2.16697 8.17565,5.91033 7.81083,18.79881 -1.00472,23.9843 -1.64931,0.97011 -3.45402,1.6157 -5.35852,1.85036 -2.89495,0.35668 -6.00144,-0.0566 -8.59597,-1.45383 -7.34359,-3.95515 -10.04987,-13.7694 -5.24409,-20.72978 1.14817,-1.66293 2.6451,-3.10795 4.351,-4.19349 1.82849,-1.1637 3.89052,-1.77055 6.02834,-2.02631 z" id="path453" /></g></svg>`; // Directly inject your SVG code here icon.className = 'search-icon'; // Use class for CSS positioning icon.title = 'Search this section'; // Tooltip text added here icon.style.width = '35px'; // Set the width of the icon icon.style.height = 'auto'; // Set the height of the icon to auto for scaling icon.style.zIndex = '1000'; // Ensure the icon stays on top with z-index document.body.appendChild(icon); var isSearchVisible = false; // Track visibility state of the search // Create a header for the search block var header = document.createElement('h2'); header.textContent = 'Search'; header.style.textAlign = 'left'; header.style.marginTop = '20px'; header.style.marginLeft = '10px'; // Create a title div for the search block var titleLine1 = document.createElement('p'); titleLine1.textContent = 'Search the current section below or use the icon in the header to search the website.'; titleLine1.style.textAlign = 'left'; titleLine1.style.marginTop = '10px'; titleLine1.style.marginLeft = '10px'; // Create a footer message for below the search block var footerMessage = document.createElement('p'); footerMessage.textContent = 'Enter keyword or search term + Return/⏎'; footerMessage.style.textAlign = 'left'; footerMessage.style.marginTop = '-55vh'; footerMessage.style.marginLeft = '10px'; // Add 20px padding below the footer message footerMessage.style.paddingBottom = '20px'; // Toggle sidebar content visibility based on the search icon's click icon.addEventListener('click', function() { isSearchVisible = !isSearchVisible; // Toggle search visibility state on click showSearchInSidebar(isSearchVisible); }); function showSearchInSidebar(show) { if (show) { // Hide all original content and tags container if it exists originalContent.forEach(child => child.style.display = 'none'); if (tagsContainer) tagsContainer.style.display = 'none'; // Hide tags container sidebar.appendChild(header); // Add the header to the sidebar sidebar.appendChild(titleLine1); // Add the first title line to the sidebar sidebar.appendChild(searchBlock); // Move the search block to the sidebar if not already there sidebar.appendChild(footerMessage); // Add the footer message below the search block searchBlock.style.display = 'block'; // Display the search block sidebar.classList.add('stuck'); // Stick the sidebar open // Now append the list of volumes appendVolumeIndex(); // Add this line to append volumes when the search block is shown } else { // Show all original content and tags container if it exists originalContent.forEach(child => child.style.display = ''); if (tagsContainer) tagsContainer.style.display = ''; // Show tags container header.remove(); // Remove the header from the sidebar titleLine1.remove(); // Remove the first title line from the sidebar footerMessage.remove(); // Remove the footer message from the sidebar searchBlock.style.display = 'none'; // Hide the search block sidebar.classList.remove('stuck'); // Unstick the sidebar // Remove the list of volumes if they exist removeVolumeIndex(); // Ensure the volume list is removed when search is hidden } searchBlock.style.width = '100%'; // Fill the sidebar width when visible searchBlock.style.height = `calc(${sidebar.offsetHeight}px - 20vh)`; // Adjust height to fill the sidebar minus the space for the title, header, and footer } }); //Search Icon on blog pages document.addEventListener('DOMContentLoaded', function () { var exclusionList = [ 'https://www.kentarchaeology.org.uk', 'https://www.kentarchaeology.org.uk/news', 'https://www.kentarchaeology.org.uk/events', 'https://www.kentarchaeology.org.uk/books', 'https://www.kentarchaeology.org.uk/papers', 'https://www.kentarchaeology.org.uk/journal', 'https://www.kentarchaeology.org.uk/latest/journal', 'https://www.kentarchaeology.org.uk/latest/magazine', 'https://www.kentarchaeology.org.uk/articles', 'https://www.kentarchaeology.org.uk/notes', 'https://www.kentarchaeology.org.uk/records', 'https://www.kentarchaeology.org.uk/magazine', 'https://www.kentarchaeology.org.uk/reports', 'https://www.kentarchaeology.org.uk/licensing', 'https://www.kentarchaeology.org.uk/search', 'https://www.kentarchaeology.org.uk/join', 'https://www.kentarchaeology.org.uk/support', 'https://www.kentarchaeology.org.uk/audio', 'https://www.kentarchaeology.org.uk/documents', 'https://www.kentarchaeology.org.uk/images', 'https://www.kentarchaeology.org.uk/maps', 'https://www.kentarchaeology.org.uk/models', 'https://www.kentarchaeology.org.uk/videos', 'https://www.kentarchaeology.org.uk/about', 'https://www.kentarchaeology.org.uk/collections', 'https://www.kentarchaeology.org.uk/grants', 'https://www.kentarchaeology.org.uk/library', 'https://www.kentarchaeology.org.uk/groups', 'https://www.kentarchaeology.org.uk/affiliates', 'https://www.kentarchaeology.org.uk/people' ]; // Check if current URL is in the exclusion list or contains certain strings var currentUrl = window.location.href; // Define additional substrings to prevent script execution var exclusionSubstrings = [ '/category/', '/tag/', 'offset', '/shop', '/join', '/search', '/contact', '/stores', '/support', '/documents', '/p/', '/guidance', '/minutes' ]; // Check if the current URL is in the exclusion list or contains any excluded substrings if (exclusionList.includes(currentUrl) || exclusionSubstrings.some(substring => currentUrl.includes(substring))) { return; // Exit the script if any condition is met } var sidebar = document.querySelector('.sidebar'); // Assuming the sidebar exists if (!sidebar) { console.warn('No sidebar found to attach the search functionality.'); return; } var originalContent = Array.from(sidebar.children); // Store all original sidebar children var isSearchVisible = false; // Track visibility state of the search // Create a search icon var icon = document.createElement('div'); icon.innerHTML = `<svg width="35px" height="35px" viewBox="0 0 53.00032 53.086411" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-227.1513,-199.29986)"><path style="fill:#1b4f8a;stroke:none;stroke-width:0.111636" d="m 268.01565,234.52082 c 6.64244,-8.64285 4.61748,-22.02609 -3.12581,-29.23861 -5.99552,-5.58454 -15.1721,-7.52025 -22.88536,-4.69276 -2.77337,1.01667 -5.3919,2.49192 -7.59124,4.47845 -8.49897,7.67644 -9.58301,20.80181 -3.01416,30.0111 1.5015,2.10501 3.421,3.92981 5.58179,5.3497 5.6183,3.69214 12.64187,4.74955 19.08974,2.86402 1.38774,-0.4059 2.74736,-0.97391 4.01889,-1.6617 0.58932,-0.31872 1.35023,-1.02973 2.00777,-1.136 0.44788,-0.0723 0.83816,0.4529 1.11971,0.72831 0.82633,0.80858 1.6368,1.63413 2.45431,2.45163 l 6.13998,6.13998 c 1.51523,1.51523 2.9118,3.01048 5.24688,2.45152 2.5808,-0.61779 3.89353,-3.73656 2.57265,-6.02387 -0.97637,-1.69073 -2.87429,-3.09254 -4.24719,-4.46544 -2.34725,-2.34725 -4.65666,-5.34646 -7.36796,-7.25633 m -19.98283,-26.98407 c 1.71361,-0.20485 3.58485,-0.0367 5.24689,0.40178 1.65835,0.4375 3.1881,1.1628 4.57707,2.16697 8.17565,5.91033 7.81083,18.79881 -1.00472,23.9843 -1.64931,0.97011 -3.45402,1.6157 -5.35852,1.85036 -2.89495,0.35668 -6.00144,-0.0566 -8.59597,-1.45383 -7.34359,-3.95515 -10.04987,-13.7694 -5.24409,-20.72978 1.14817,-1.66293 2.6451,-3.10795 4.351,-4.19349 1.82849,-1.1637 3.89052,-1.77055 6.02834,-2.02631 z" id="path453" /></g></svg>`; // Directly inject your SVG code here icon.className = 'search-icon'; icon.title = 'Search this section'; // Tooltip text added here icon.style.cursor = 'pointer'; icon.style.width = '35px'; icon.style.height = 'auto'; icon.style.zIndex = '1000'; document.body.appendChild(icon); // Create elements for the search functionality within the sidebar var searchContainer = document.createElement('div'); searchContainer.style.display = 'none'; // Initially hidden searchContainer.style.width = 'calc(100% - 20px)'; searchContainer.style.padding = '10px'; sidebar.appendChild(searchContainer); var searchTitle = document.createElement('h3'); searchTitle.textContent = 'Search page'; searchContainer.appendChild(searchTitle); var searchDescription = document.createElement('p'); searchDescription.textContent = 'Search within this page here, search the collection page or search the website.'; searchContainer.appendChild(searchDescription); var searchInput = document.createElement('input'); searchInput.type = 'text'; searchInput.placeholder = 'Type to search...'; searchInput.style.width = '100%'; searchInput.style.padding = '5px'; searchInput.style.marginBottom = '10px'; searchInput.style.marginTop = '10px'; searchContainer.appendChild(searchInput); var searchResults = document.createElement('div'); searchResults.style.overflowY = 'auto'; searchResults.style.maxHeight = '200px'; // Adjust as needed searchContainer.appendChild(searchResults); // Toggle search container and original content visibility icon.addEventListener('click', function () { toggleSearchVisibility(); }); function toggleSearchVisibility() { isSearchVisible = !isSearchVisible; if (isSearchVisible) { // Hide original content and show search container originalContent.forEach(child => child.style.display = 'none'); searchContainer.style.display = 'block'; searchInput.focus(); } else { // Show original content and hide search container originalContent.forEach(child => child.style.display = ''); searchContainer.style.display = 'none'; clearHighlights(); searchResults.textContent = ''; searchInput.value = ''; } } searchInput.addEventListener('input', function () { performSearch(this.value); }); function performSearch(text) { clearHighlights(); if (!text) { searchResults.textContent = ''; return; } var results = highlightText(document.body, text); searchResults.innerHTML = ''; // Clear previous results if (results.length) { results.forEach((item, index) => { var resultItem = document.createElement('div'); resultItem.textContent = `Result ${index + 1}: ...${item.context}...`; resultItem.style.cursor = 'pointer'; resultItem.onclick = function () { item.element.scrollIntoView({ behavior: 'smooth', block: 'center' }); }; searchResults.appendChild(resultItem); }); } else { searchResults.textContent = 'No results found.'; } } function highlightText(node, text) { var results = []; if (node.nodeType === 3) { // Text node if (window.getComputedStyle(node.parentNode).display === 'none') return results; // Exclude hidden text var index = node.data.toUpperCase().indexOf(text.toUpperCase()); if (index >= 0) { var span = document.createElement('span'); span.textContent = node.data.substring(index, index + text.length); span.style.backgroundColor = 'yellow'; var restText = node.splitText(index); restText.data = restText.data.substring(text.length); node.parentNode.insertBefore(span, restText); var contextStart = Math.max(0, index - 20); var contextEnd = Math.min(node.data.length, index + text.length + 20); var context = node.data.substring(contextStart, contextEnd); results.push({ element: span, context: context }); results = results.concat(highlightText(restText, text)); } } else if (node.nodeType === 1 && node.childNodes && !/(script|style|textarea)/i.test(node.tagName)) { Array.from(node.childNodes).forEach(function (child) { results = results.concat(highlightText(child, text)); }); } return results; } function clearHighlights() { var highlighted = document.querySelectorAll('span[style*="background-color: yellow"]'); highlighted.forEach(function (span) { var parent = span.parentNode; parent.replaceChild(document.createTextNode(span.textContent), span); parent.normalize(); }); } }); // Map icon document.addEventListener('DOMContentLoaded', function () { var sidebar = document.querySelector('.sidebar'); var searchIcon = sidebar.querySelector('.search-icon'); // Assuming the search icon has a class 'search-icon' var tagsContainer = document.querySelector('.tags-container'); // Select the tags container if it exists // Fetch the map link meta tag var mapLinkHeader = document.querySelector('meta[name="map-link"]'); // Fetch the meta tag var mapLinkFound = !!mapLinkHeader && mapLinkHeader.getAttribute('content'); // Function to extract coordinates from meta tags function getCoordinatesFromMeta() { var latitude = document.querySelector('meta[property="og:latitude"]')?.getAttribute('content'); var longitude = document.querySelector('meta[property="og:longitude"]')?.getAttribute('content'); return { latitude, longitude }; } var { latitude, longitude } = getCoordinatesFromMeta(); var coordinatesMatchNoData = latitude === "40.7207559" && longitude === "-74.0007613"; // Check for exact match var coordinatesQuery = latitude && longitude && !coordinatesMatchNoData ? `¢er=${longitude};${latitude}&level=14` : ''; // Only append if coordinates exist and do not match no-data values var showDisclaimer = coordinatesQuery !== ''; // Only show disclaimer if coordinates are present and valid // Determine icon fill color and tooltip based on the presence of map-link meta tag and coordinate validity var iconFill = mapLinkFound && !coordinatesMatchNoData ? '#1b4f8a' : '#d3d3d3'; // Blue if map-link is found and coordinates are valid, grey otherwise var iconTitle = mapLinkFound && !coordinatesMatchNoData ? 'Location' : 'No location data'; // Tooltip based on presence and validity // Create the icon element with dynamic fill and tooltip var icon = document.createElement('div'); icon.innerHTML = `<svg width="40px" height="40px" viewBox="0 0 57.700378 58.215332" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <defs id="defs2" /> <g id="layer1" transform="translate(-163.35871,-319.77773)"> <path style="fill:${iconFill};stroke:none;stroke-width:0.0588972" d="m 187.09873,319.86262 c -2.97207,0.39025 -5.74153,0.89908 -8.4223,2.34908 -6.67688,3.61148 -11.57424,11.48798 -10.58471,19.2412 0.31115,2.43758 1.25186,4.74553 2.2931,6.94987 1.63581,3.46316 3.74557,6.72318 5.96982,9.83584 2.65008,3.70869 5.48233,7.30967 8.50894,10.71929 0.68203,0.76837 1.34616,1.55424 2.05616,2.29693 0.38702,0.4048 0.80083,0.82073 1.41583,0.74717 1.15498,-0.13811 2.25806,-1.92535 2.96984,-2.74962 2.35317,-2.72523 4.66778,-5.48168 6.82907,-8.3634 2.81275,-3.75028 5.49022,-7.63814 7.59032,-11.83834 1.20221,-2.40448 2.29275,-4.96485 2.61898,-7.65663 1.15886,-9.56108 -6.19204,-18.69858 -15.23753,-20.95996 -1.88089,-0.47022 -4.06727,-0.82618 -6.00752,-0.57143 m 0.35338,13.24373 c 0.89077,-0.10549 1.84355,-0.005 2.70928,0.21126 5.40334,1.35051 7.60516,8.1476 4.09783,12.43479 -0.56006,0.68456 -1.21505,1.27677 -1.97753,1.73134 -0.9625,0.57378 -2.00905,0.94407 -3.12156,1.07894 -0.93905,0.11379 -1.90738,0.0732 -2.82706,-0.16898 -5.2706,-1.38814 -7.52659,-7.60103 -4.45575,-12.06485 0.57218,-0.83169 1.35999,-1.55501 2.21765,-2.08426 1.03082,-0.63609 2.15776,-0.9963 3.35714,-1.13824 m 0.1767,2.65856 c -0.77727,0.10583 -1.51407,0.34278 -2.1792,0.76631 -0.53602,0.34131 -1.01804,0.81343 -1.38833,1.32895 -2.5804,3.59303 0.50422,8.61837 4.86326,8.0519 0.68486,-0.089 1.35158,-0.33978 1.94361,-0.69063 3.8464,-2.27908 2.88467,-8.27347 -1.41353,-9.34168 -0.58308,-0.14489 -1.22871,-0.19613 -1.82581,-0.11485" id="path1330" /> </g> </svg> `; // Inject SVG code with dynamic color icon.className = 'map-icon'; icon.title = iconTitle; // Tooltip text added dynamically // Check if the current URL contains any of the excluded strings var currentUrl = window.location.href; var excludedPaths = ['/shop', '/licensing', '/search', '/contact', '/join', '/stores', '/support', '/documents', '/p/', '/guidance', '/minutes']; var shouldHideIcons = excludedPaths.some(path => currentUrl.includes(path)); // If the URL contains any excluded paths, do not append the map icon if (!shouldHideIcons) { document.body.appendChild(icon); } var isMapVisible = false; // Track visibility state of the map // Only proceed if map link is found and coordinates do not match the no-data values if (mapLinkFound && !coordinatesMatchNoData && !shouldHideIcons) { var mapLink = mapLinkHeader.getAttribute('content'); // Extract content from the meta tag // Append coordinates to the map link var iframeSrc = `${mapLink}${coordinatesQuery}`; var viewLargerMapLink = `${mapLink}${coordinatesQuery}`; // Also append coordinates to the "Open in new tab" link // Create a small icon link for "View larger map" var viewLargerMapIcon = document.createElement('a'); viewLargerMapIcon.href = viewLargerMapLink; viewLargerMapIcon.target = '_blank'; viewLargerMapIcon.title = 'Open in new tab'; viewLargerMapIcon.innerHTML = '🗗'; viewLargerMapIcon.style.display = 'block'; viewLargerMapIcon.style.fontSize = '1rem'; viewLargerMapIcon.style.textAlign = 'right'; // Align to the right viewLargerMapIcon.style.marginRight = '10px'; // Ensure it's on the right side viewLargerMapIcon.style.marginTop = '0'; // Remove padding/margin from the top // Create the embed HTML with the map link var embedHTML = ` <style> .embed-container {position: relative; padding-bottom: 0; max-width: 100%; height: 75vh !important;} .embed-container iframe, .embed-container object, .embed-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } small {position: absolute; z-index: 40; bottom: 0; margin-bottom: -15px;} </style> <div class="embed-container"> <iframe id="map-iframe" width="500" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" title="3D Models & VR" src="${iframeSrc}"></iframe> </div>`; // Create a container for the embed var embedContainer = document.createElement('div'); embedContainer.innerHTML = embedHTML; // Styled disclaimer text in HTML form (only show if coordinates are present and valid) var disclaimer = document.createElement('div'); if (showDisclaimer) { disclaimer.innerHTML = `<strong style="color:red; vertical-align: top;">❗</strong> <span style="display:inline-block;">Please note location data is approximate. Be advised of local land ownership and public access restrictions.</span>`; disclaimer.style.border = '1px solid lightgray'; disclaimer.style.backgroundColor = '#f9f9f9'; disclaimer.style.padding = '8px'; disclaimer.style.margin = '10px'; disclaimer.style.borderRadius = '5px'; disclaimer.style.fontSize = '1rem'; // Increase font size disclaimer.style.color = '#333'; disclaimer.style.lineHeight = '1.3'; // Reduce line spacing disclaimer.style.display = 'flex'; disclaimer.style.alignItems = 'center'; } icon.addEventListener('click', function () { isMapVisible = !isMapVisible; toggleSidebarContent(isMapVisible); }); function toggleSidebarContent(show) { // Get all children of the sidebar var allChildren = Array.from(sidebar.children); if (show) { // Hide all children except the search icon allChildren.forEach(child => { if (child !== searchIcon) { child.style.display = 'none'; } }); sidebar.appendChild(viewLargerMapIcon); // Add the "View larger map" icon above the iframe sidebar.appendChild(embedContainer); // Add the embed code to the sidebar if (showDisclaimer) sidebar.appendChild(disclaimer); // Add the disclaimer text below the iframe only if needed embedContainer.style.display = 'block'; // Display the embed container sidebar.classList.add('stuck'); // Stick the sidebar open } else { // Show all original content allChildren.forEach(child => { child.style.display = ''; }); viewLargerMapIcon.remove(); // Remove the "View larger map" icon embedContainer.style.display = 'none'; // Hide the embed container if (showDisclaimer) disclaimer.remove(); // Remove the disclaimer text if it was added sidebar.classList.remove('stuck'); // Unstick the sidebar } embedContainer.style.width = '100%'; // Fill the sidebar width when visible embedContainer.style.height = '75vh'; // Force height to 75% of the viewport embedContainer.style.minHeight = '75vh'; // Ensure minimum height is 75% of the viewport } } else { console.warn('Meta tag for map-link not found, coordinates match no-data values, or URL does not match criteria for iframe embed.'); } }); document.addEventListener('DOMContentLoaded', function () { var currentUrl = window.location.href; // Define the base URL pattern for the excluded homepage var homepagePattern = /^https:\/\/www\.kentarchaeology\.org\.uk\/?$/; // List of URL segments to exclude var excludedSegments = ['/shop', '/search', '/contact', '/licensing', '/join', '/stores', '/support', '/documents', '/p/', '/guidance', '/minutes']; // If the current URL matches the homepage pattern or contains any excluded segments, exit early if (homepagePattern.test(currentUrl) || excludedSegments.some(segment => currentUrl.includes(segment))) { return; } // Trim URL after '?' character currentUrl = currentUrl.split('?')[0]; // Substitute '-latest/' with '/' in both the lookup URL and the display URL var lookupUrl = currentUrl.replace('-latest/', '/'); var displayUrl = currentUrl.replace('-latest/', '/'); // List of strings to remove entirely from the URL for display purposes var removeStrings = [ '/category/society-affiliates', '/category/society-groups', '/category/sources', '/category/funds', 'category/Volume+', 'category/Issue+' ]; // List of strings where only 'category/' should be removed var partialRemoveStrings = [ '/affiliates/category/', '/groups/category/', '/records/category/', '/notes/category/', '/grants/category/' ]; // Remove any of the specified strings from the display URL removeStrings.forEach(function (str) { displayUrl = displayUrl.replace(str, ''); }); // Remove 'category/' from the specified partial strings in the display URL partialRemoveStrings.forEach(function (str) { displayUrl = displayUrl.replace(str, str.replace('category/', '')); }); var sidebar = document.querySelector('.sidebar'); if (!sidebar) { console.error('Sidebar element not found.'); return; } var dataIcon = document.createElement('div'); dataIcon.className = 'link-icon'; dataIcon.title = 'Copy links'; dataIcon.innerHTML = ` <svg width="55.160152mm" height="55.21917mm" viewBox="0 0 55.160153 55.219169" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-84.971786,-109.32479)"><path style="fill:#1b4e8a;stroke:none;stroke-width:0.0699784" d="m 124.86999,109.40347 c -2.65239,0.35255 -5.13033,1.20106 -7.27775,2.84215 -1.58313,1.20985 -2.93252,2.78983 -4.33866,4.19597 -1.53561,1.53561 -3.63573,3.14847 -2.76086,5.59827 0.86143,2.41216 3.9402,3.01817 5.76993,1.3233 3.1463,-2.91446 5.68784,-7.10659 10.42678,-6.9905 0.62519,0.0153 1.23197,0.19762 1.81944,0.39552 0.76773,0.25871 1.46912,0.69433 2.09935,1.1995 0.79334,0.63589 1.41804,1.48543 1.87052,2.3927 1.05779,2.12105 0.83631,4.83026 -0.47368,6.78791 -0.88103,1.31657 -2.17122,2.38388 -3.28626,3.49892 l -5.1784,5.1784 c -2.03889,2.03889 -3.82152,4.10759 -6.85788,4.39674 -1.43617,0.13681 -3.00886,-0.34296 -4.19871,-1.13267 -1.58431,-1.05149 -2.80767,-2.50935 -4.89849,-1.69208 -2.24042,0.87571 -2.93426,3.74735 -1.37857,5.5658 2.05464,2.40159 5.36154,3.80858 8.44639,4.1787 3.55952,0.42707 7.20155,-0.60098 10.07689,-2.72916 1.10622,-0.81875 2.03917,-1.8792 3.00907,-2.8491 l 4.82851,-4.82851 c 3.28052,-3.28052 6.65432,-6.30639 7.39847,-11.12657 1.14191,-7.39622 -3.726,-14.52096 -11.10732,-15.99708 -1.26815,-0.25361 -2.70026,-0.37947 -3.98877,-0.20821 m -17.00475,17.28464 c -1.6412,0.2156 -3.23601,0.48446 -4.75853,1.18158 -2.32888,1.06634 -4.021657,2.74043 -5.808207,4.52698 l -4.75853,4.75853 c -3.28052,3.28052 -6.65432,6.30638 -7.39847,11.12656 -0.60506,3.919 0.41945,7.93681 2.88584,11.05659 3.45679,4.37253 9.62077,6.26314 14.939407,4.61683 3.99528,-1.23673 6.57685,-4.19584 9.44708,-7.06607 1.50692,-1.50692 3.19263,-3.18598 2.01104,-5.45832 -0.85821,-1.65037 -2.90459,-2.36296 -4.60024,-1.56542 -0.81517,0.38349 -1.40341,1.07942 -2.02937,1.70538 -2.75239,2.75239 -5.14257,6.05089 -9.377107,5.94711 -0.62518,-0.0153 -1.23197,-0.19762 -1.81943,-0.39552 -0.73996,-0.24933 -1.41686,-0.66325 -2.02938,-1.144 -0.79061,-0.62043 -1.39425,-1.427 -1.86779,-2.30824 -0.29776,-0.55423 -0.50923,-1.20097 -0.62176,-1.81944 -0.848,-4.6621 3.27968,-7.57803 6.19841,-10.49676 l 3.358957,-3.35896 c 2.01895,-2.01895 3.78401,-4.04069 6.78791,-4.32677 1.3848,-0.1319 2.8908,0.31393 4.05874,1.04233 0.66123,0.41239 1.17249,1.00762 1.81944,1.42665 1.17739,0.76263 2.65449,0.77039 3.84881,0.0435 2.32979,-1.41804 1.82798,-4.35139 0.07,-5.94137 -2.65918,-2.40516 -6.72415,-4.02831 -10.3568,-3.55113 z" id="path655" /></g></svg> `; dataIcon.style.cssText = 'position: fixed; top: 80vh; left: 10px; cursor: pointer; z-index: 1000;'; document.body.appendChild(dataIcon); var originalContent = sidebar.innerHTML; var isUrlVisible = false; dataIcon.addEventListener('click', function () { if (!isUrlVisible) { let urlPart = lookupUrl.split('kentarchaeology.org.uk/')[1].trim(); // Extract and trim the relevant part of the URL // Replace 'articles/' with 'journal/' in the search term urlPart = urlPart.replace('articles/', 'journal/'); // Create a new XMLHttpRequest object const xhr = new XMLHttpRequest(); xhr.open('GET', 'https://www.kentarchaeology.org.uk/permalinks', false); // Synchronous request xhr.send(); // Use a regular expression to find all <p> elements const regex = /<p[^>]*>(.*?)<\/p>/g; const matches = [...xhr.responseText.matchAll(regex)]; console.log('Matched paragraphs:', matches.length); // Debugging: log matched paragraphs // Iterate through each match to find the matching link let foundMatch = false; for (let match of matches) { const text = match[1].trim(); const parts = text.split('\t'); // Split by tab character console.log('Current parts:', parts); // Debugging: log current parts // Check if the second part (Link) matches the current URL part if (parts.length === 2 && parts[1] === urlPart) { const newUrl = `https://www.kentarchaeology.org.uk/node/${parts[0]}`; // Use the Node number to construct the URL // Generate citations let pageTitle = document.title; let ogDescription = document.querySelector('meta[property="og:description"]')?.content || ''; let chicagoCitation = `${pageTitle}. "${ogDescription}". ${displayUrl}`; let harvardCitation = `${pageTitle}. ${displayUrl}.`; // Check if URL contains '/journal' or '/magazine' if (currentUrl.includes('/journal') || currentUrl.includes('/magazine')) { chicagoCitation = `${pageTitle}. "${ogDescription}". Accessed at: ${displayUrl}`; harvardCitation = `${pageTitle}. (n.d.). ${displayUrl}`; } // Create the sidebar content with copy buttons and messages sidebar.innerHTML = ` <h1 style="text-align: left;">Page links</h1> <h3 style="text-align: left;">Hyperlinks</h3> <div style="margin-top: 10vh; padding: 10px; border: 1px solid lightgray; background-color: #fff; color: #333; position: relative; border-radius: 5px;" title="For referencing"> <div style="position: absolute; top: 5px; left: 10px; font-weight: bold;" title="For referencing">Permalink</div> <div style="position: absolute; top: 5px; right: 10px;"> <div class="sqs-block-button-container sqs-block-button-container--center preFade fadeIn" data-animation-role="button" data-alignment="center" data-button-size="medium" data-button-type="primary" style="transition-timing-function: ease; transition-duration: 1.5s; transition-delay: 0.385714s; padding-bottom: 10px;"> <button id="copyPermalink" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element" title="Copy to clipboard">Copy</button> </div> </div> <div style="margin-top: 30px; overflow-x: auto; white-space: nowrap; padding: 5px; scrollbar-width: thin; scrollbar-color: gray lightgray;" title="For referencing"> ${newUrl} </div> </div> <div style="margin-top: 20px; padding: 10px; border: 1px solid lightgray; background-color: #fff; color: #333; position: relative; border-radius: 5px;" title="For sharing online"> <div style="position: absolute; top: 5px; left: 10px; font-weight: bold;" title="For sharing online">URL</div> <div style="position: absolute; top: 5px; right: 10px;"> <div class="sqs-block-button-container sqs-block-button-container--center preFade fadeIn" data-animation-role="button" data-alignment="center" data-button-size="medium" data-button-type="primary" style="transition-timing-function: ease; transition-duration: 1.5s; transition-delay: 0.385714s; padding-bottom: 10px;"> <button id="copyURL" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element" title="Copy to clipboard">Copy</button> </div> </div> <div style="margin-top: 30px; overflow-x: auto; white-space: nowrap; padding: 5px; scrollbar-width: thin; scrollbar-color: gray lightgray;" title="For sharing online"> ${displayUrl} </div> </div> <h1 style="text-align: left;">Citations</h1> <div style="margin-top: 10vh; padding: 10px; border: 1px solid lightgray; background-color: #fff; color: #333; position: relative; border-radius: 5px;" title="Chicago citation"> <div style="position: absolute; top: 5px; left: 10px; font-weight: bold;">Chicago</div> <div style="position: absolute; top: 5px; right: 10px;"> <button id="copyChicagoCitation" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element" title="Copy to clipboard">Copy</button> </div> <div style="margin-top: 30px; word-wrap: break-word; white-space: normal; padding: 5px;">${chicagoCitation}</div> </div> <div style="margin-top: 20px; padding: 10px; border: 1px solid lightgray; background-color: #fff; color: #333; position: relative; border-radius: 5px;" title="Harvard citation"> <div style="position: absolute; top: 5px; left: 10px; font-weight: bold;">Harvard</div> <div style="position: absolute; top: 5px; right: 10px;"> <button id="copyHarvardCitation" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element" title="Copy to clipboard">Copy</button> </div> <div style="margin-top: 30px; word-wrap: break-word; white-space: normal; padding: 5px;">${harvardCitation}</div> </div> `; // Add CSS for even thinner scrollbars and hiding scrollbar arrows const style = document.createElement('style'); style.innerHTML = ` ::-webkit-scrollbar { height: 3px; /* Thinner scrollbar */ } ::-webkit-scrollbar-thumb { background-color: gray; } ::-webkit-scrollbar-thumb:hover { background-color: darkgray; } ::-webkit-scrollbar-button { width: 0; height: 0; display: none; /* Hide arrows */ } ::-webkit-scrollbar-track-piece { background: transparent; } `; document.head.appendChild(style); // Add event listeners to copy buttons document.getElementById('copyPermalink').addEventListener('click', function () { navigator.clipboard.writeText(newUrl); alert('Permalink copied to clipboard!'); }); document.getElementById('copyURL').addEventListener('click', function () { navigator.clipboard.writeText(displayUrl); alert('URL copied to clipboard!'); }); document.getElementById('copyChicagoCitation').addEventListener('click', function () { navigator.clipboard.writeText(chicagoCitation); alert('Chicago citation copied to clipboard!'); }); document.getElementById('copyHarvardCitation').addEventListener('click', function () { navigator.clipboard.writeText(harvardCitation); alert('Harvard citation copied to clipboard!'); }); isUrlVisible = true; foundMatch = true; break; } } if (!foundMatch) { // If no match is found, only display the second box with the current URL sidebar.innerHTML = ` <h3 style="text-align: left;">Hyperlinks</h3> <div style="margin-top: 20px; padding: 10px; border: 1px solid lightgray; background-color: #fff; color: #333; position: relative; border-radius: 5px;" title="For sharing online"> <div style="position: absolute; top: 5px; left: 10px; font-weight: bold;" title="For sharing online">URL</div> <div style="position: absolute; top: 5px; right: 10px;"> <div class="sqs-block-button-container sqs-block-button-container--center preFade fadeIn" data-animation-role="button" data-alignment="center" data-button-size="medium" data-button-type="primary" style="transition-timing-function: ease; transition-duration: 1.5s; transition-delay: 0.385714s; padding-bottom: 10px;"> <button id="copyURL" class="sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element" title="Copy to clipboard">Copy</button> </div> </div> <div style="margin-top: 30px; overflow-x: auto; white-space: nowrap; padding: 5px; scrollbar-width: thin; scrollbar-color: gray lightgray;" title="For sharing online"> ${displayUrl} </div> </div> `; // Add event listeners to copy buttons document.getElementById('copyURL').addEventListener('click', function () { navigator.clipboard.writeText(displayUrl); alert('URL copied to clipboard!'); }); isUrlVisible = true; } } else { sidebar.innerHTML = originalContent; isUrlVisible = false; } }); }); // Linked Data icon for FOAF document.addEventListener('DOMContentLoaded', function() { const currentUrl = window.location.href; // Check for URL conditions to determine icon behavior const isPeopleOrGroupOrCartPage = /\/people\/|\/group\/|\/cart\//.test(currentUrl); const isHomePage = currentUrl === 'https://www.kentarchaeology.org.uk/'; // Add sidebar if exists const sidebar = document.querySelector('.sidebar'); if (!sidebar) return; // If not a /people/, /group/, or /cart/ page, return here (no functionality) if (!isPeopleOrGroupOrCartPage || isHomePage) return; // Create icon element const dataIcon = document.createElement('div'); dataIcon.className = 'data-icon'; dataIcon.title = isPeopleOrGroupPage ? 'Linked Data' : 'No Linked Data'; dataIcon.innerHTML = ` <svg width="8.428246mm" height="10.088242mm" viewBox="0 0 13.428246 21.088242" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-127.93042,-90.422231)"><path style="fill:${isPeopleOrGroupPage ? '#12518D' : 'lightgrey'};stroke-width:0.0422074" d="m 130.52333,111.4766 c -0.77819,-0.18542 -1.13489,-0.36711 -1.68326,-0.85736 -0.15473,-0.13833 -0.60004,-0.7518 -0.60004,-0.82662 0,-0.02 -0.0412,-0.11453 -0.0915,-0.21015 -0.0945,-0.17966 -0.21812,-0.80316 -0.21812,-1.10048 0,-0.22423 0.14083,-1.02228 0.19108,-1.08284 0.022,-0.0266 0.0643,-0.11683 0.0938,-0.20058 0.0486,-0.13778 0.13066,-0.27812 0.3252,-0.55623 0.0763,-0.10902 0.49635,-0.52052 0.65706,-0.64363 0.14649,-0.11222 0.55047,-0.32462 0.61742,-0.32462 0.0302,0 0.10603,-0.0561 0.1687,-0.12472 l 0.11392,-0.12473 V 99.723484 96.53622 l -0.084,-0.113613 c -0.0512,-0.06922 -0.15593,-0.137504 -0.26792,-0.174704 -0.10116,-0.0336 -0.20481,-0.08626 -0.23034,-0.117017 -0.0255,-0.03076 -0.0695,-0.05593 -0.0977,-0.05593 -0.0282,0 -0.16104,-0.08999 -0.29519,-0.199979 -0.43569,-0.357258 -0.79,-0.799003 -0.90713,-1.130998 -0.0295,-0.08376 -0.0718,-0.174019 -0.0938,-0.200584 -0.0502,-0.06055 -0.19108,-0.858599 -0.19108,-1.082834 0,-0.297318 0.12359,-0.920824 0.21812,-1.100481 0.0503,-0.09561 0.0915,-0.190177 0.0915,-0.210141 0,-0.07483 0.44531,-0.688305 0.60004,-0.826635 0.55114,-0.492734 0.95408,-0.696525 1.7026,-0.861116 0.34964,-0.07688 0.71529,-0.04463 1.2771,0.11261 0.79666,0.222984 1.46767,0.802157 1.88847,1.629999 0.13728,0.270059 0.2985,0.953249 0.29667,1.257214 -0.002,0.298463 -0.15599,0.999975 -0.26374,1.199828 -0.0458,0.08482 -0.0832,0.170096 -0.0832,0.189493 0,0.165402 -0.83537,1.084342 -1.09384,1.203265 -0.0689,0.03169 -0.18589,0.09277 -0.26006,0.135735 -0.0742,0.04297 -0.16471,0.07812 -0.2012,0.07812 -0.0365,0 -0.11079,0.05823 -0.16508,0.129428 l -0.0987,0.129427 v 1.838106 c 0,3.333287 0.0125,3.307667 0.0117,3.362537 -0.003,0.17433 -0.0116,0.28151 0.0382,0.37488 0.061,0.11439 0.18949,0.11788 0.25973,0.0708 0.0703,-0.0471 0.22491,-0.15112 0.34371,-0.23124 0.11879,-0.0802 0.23481,-0.14569 0.25781,-0.14569 0.023,0 0.0714,-0.0327 0.10758,-0.0727 0.0362,-0.0399 0.0834,-0.0727 0.10504,-0.0727 0.0216,0 0.12126,-0.0386 0.22147,-0.0857 0.32157,-0.15143 0.57685,-0.24755 0.78178,-0.29439 0.10992,-0.0251 0.28161,-0.072 0.38154,-0.10418 0.2519,-0.0811 0.19434,-0.0839 0.42877,-0.13418 0.54716,-0.11733 0.17171,-0.0167 0.25166,-0.0359 0.08,-0.0193 0.25163,-0.0524 0.38154,-0.0738 0.1299,-0.0213 0.27413,-0.0636 0.3205,-0.0939 0.0464,-0.0303 0.14844,-0.0777 0.2268,-0.10529 0.0784,-0.0276 0.16306,-0.0678 0.18822,-0.0891 0.0251,-0.0214 0.14494,-0.10406 0.26622,-0.18383 0.31225,-0.20538 0.59649,-0.516227 0.87942,-0.96176 0.0899,-0.141587 0.15371,-0.307752 0.15371,-0.400396 0,-0.07258 -0.0283,-0.105686 -0.12485,-0.146028 -0.11704,-0.0489 -0.28614,-0.152107 -0.48962,-0.298842 -0.16905,-0.121914 -0.62544,-0.601563 -0.6959,-0.731389 -0.0392,-0.07215 -0.0857,-0.155709 -0.10349,-0.185687 -0.1086,-0.18332 -0.21698,-0.4496 -0.23863,-0.58632 -0.0139,-0.08722 -0.0483,-0.239228 -0.0765,-0.337785 -0.1295,-0.451054 0.0237,-1.330103 0.31392,-1.801172 0.0184,-0.02998 0.065,-0.112278 0.10335,-0.182888 0.0673,-0.123912 0.48143,-0.569765 0.6482,-0.697916 0.50133,-0.385249 1.1425,-0.609015 1.74505,-0.609015 0.51469,0 1.10433,0.183026 1.57115,0.487692 0.22351,0.145876 0.74293,0.673065 0.83172,0.844157 0.27451,0.529 0.32535,0.664444 0.38578,1.027765 0.0667,0.401343 0.0588,0.681624 -0.0327,1.152964 -0.0425,0.219095 -0.13183,0.433697 -0.36786,0.884204 -0.0874,0.166865 -0.70662,0.780967 -0.86034,0.85325 -0.066,0.03108 -0.16094,0.07989 -0.2109,0.10863 -0.0499,0.02867 -0.21405,0.1082 -0.36464,0.176669 -0.28934,0.131574 -0.33506,0.185045 -0.38307,0.447952 -0.014,0.07671 -0.0559,0.196737 -0.093,0.266686 -0.0371,0.06991 -0.0927,0.184409 -0.12345,0.254359 -0.10799,0.24567 -0.16612,0.34231 -0.48933,0.81351 -0.03,0.0437 -0.0872,0.11219 -0.12717,0.15219 -0.04,0.04 -0.12277,0.12931 -0.18399,0.19849 -0.23172,0.26181 -0.54076,0.52485 -0.85301,0.72601 -0.31631,0.20379 -0.33708,0.21588 -0.47099,0.27409 -0.07,0.0304 -0.18441,0.0852 -0.25436,0.12177 -0.07,0.0366 -0.17567,0.0779 -0.23493,0.092 -0.0592,0.014 -0.17372,0.055 -0.25437,0.0911 -0.0807,0.0361 -0.24471,0.0772 -0.36462,0.0913 -0.11992,0.0141 -0.32946,0.0487 -0.46568,0.077 -0.18209,0.0378 -0.0497,0.0111 -0.38745,0.11536 -0.40157,0.10385 0.005,-0.0284 -0.39648,0.10164 -0.50173,0.16261 -1.07,0.46302 -1.36869,0.72353 -0.22149,0.19318 -0.63577,0.62951 -0.6825,0.71882 -0.0288,0.0549 -0.0649,0.0999 -0.0804,0.0999 -0.0155,0 -0.0648,0.0695 -0.10961,0.15443 -0.0448,0.085 -0.0405,0.77418 -0.0379,0.8358 0.009,0.20593 0.003,0.26622 0.42457,0.47339 0.16073,0.0791 0.54385,0.41559 0.72408,0.63599 0.20515,0.25085 0.39066,0.52309 0.39159,0.57463 3.8e-4,0.0216 0.0381,0.10868 0.0839,0.19351 0.10775,0.19985 0.26196,0.90136 0.26375,1.19982 0.002,0.30397 -0.1594,0.98716 -0.29667,1.25721 -0.25703,0.50565 -0.73246,1.06576 -1.05483,1.24272 -0.0754,0.0413 -0.23284,0.12852 -0.3499,0.19365 -0.19401,0.10793 -0.54499,0.22172 -0.94815,0.30739 -0.19233,0.0409 -0.65127,0.0381 -0.83205,-0.005 z" id="path466" /></g></svg> `; dataIcon.style.cssText = 'position: fixed; top: 69vh; left: 10px; cursor: pointer; z-index: 1000; transition: transform 0.2s;'; dataIcon.onmouseover = () => { dataIcon.style.transform = 'scale(1.2)'; }; dataIcon.onmouseout = () => { dataIcon.style.transform = 'scale(1)'; }; document.body.appendChild(dataIcon); // Function to extract and display RDFa FOAF data dataIcon.addEventListener('click', function() { sidebar.innerHTML = '<h2>Linked Data</h2><h3 class="foaf-title">Friend Of A Friend (FOAF)</h3>'; const foafData = extractRDFaFOAF(document.body); displayFOAFDataInSidebar(foafData); }); // Extract RDFa FOAF triplicates from the current webpage function extractRDFaFOAF(element) { const rdfaData = []; // Find all entities marked with typeof const entities = element.querySelectorAll('[typeof]'); entities.forEach((entity, index) => { const type = entity.getAttribute('typeof').replace('foaf:', ''); // Remove 'foaf:' prefix const properties = Array.from(entity.querySelectorAll('[property]')).map((property, propIndex) => { // Add a unique identifier to each property element const uniqueId = `foaf-prop-${index}-${propIndex}`; property.setAttribute('data-foaf-id', uniqueId); // Add tooltip with format '{Class reference}: {value}' const propName = property.getAttribute('property').replace('foaf:', ''); const value = property.textContent.trim(); property.setAttribute('title', `${type}: ${value}`); // Style the item as blue on initial page load property.style.color = '#2952a3'; property.style.cursor = 'pointer'; // Add click handler to open tile and related pages for that value property.addEventListener('click', () => { clearSidebarAndDisplay(propName, value); // If screen is narrower than 750px, simulate click on toggle icon if (window.innerWidth < 750) { const toggleIcon = document.getElementById('toggle-icon'); if (toggleIcon) toggleIcon.click(); } }); return { propName: propName, value: value, uniqueId: uniqueId }; }); rdfaData.push({ entity, type, properties }); }); return rdfaData; } // Display unique FOAF entities within the sidebar function displayFOAFDataInSidebar(data) { const seenEntities = new Set(); // Create a container to wrap the grid layout const gridContainer = document.createElement('div'); gridContainer.style.cssText = 'display: flex; flex-wrap: wrap; gap: 0; width: 100%;'; data.forEach(({ entity, type, properties }) => { // Only process unique entities if (seenEntities.has(type)) return; seenEntities.add(type); properties.forEach(({ propName, value, uniqueId }) => { const entityContainer = document.createElement('div'); entityContainer.style.cssText = ` flex: 1; margin: 1px; padding: 5px; border: 1px solid #ccc; background-color: #fff; text-align: left; cursor: pointer; box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.2); transition: background-color 0.3s, color 0.3s; `; entityContainer.title = 'Related pages'; // Add entity reference in the upper left corner const entityReference = document.createElement('div'); entityReference.style.cssText = 'font-size: 0.8em; margin-bottom: 3px;'; entityReference.textContent = propName; // Add value as the main text const valueDiv = document.createElement('div'); valueDiv.style.cssText = 'font-size: 1em; line-height: 1.2em; word-wrap: break-word;'; valueDiv.textContent = value; // Append reference and value to container entityContainer.appendChild(entityReference); entityContainer.appendChild(valueDiv); // Add hover handler to scroll to the associated property in the body entityContainer.addEventListener('mouseenter', () => { highlightAndScrollToEntity(uniqueId); }); // Add hover effect to change color entityContainer.addEventListener('mouseover', () => { entityContainer.style.backgroundColor = '#000'; // Black background on hover entityContainer.style.color = '#fff'; // White text on hover }); entityContainer.addEventListener('mouseout', () => { entityContainer.style.backgroundColor = '#fff'; // Revert to white background entityContainer.style.color = '#000'; // Revert to black text }); // Add click handler to show the tile above 'Related Pages' entityContainer.addEventListener('click', () => { clearSidebarAndDisplay(propName, value); // If screen is narrower than 750px, simulate click on toggle icon if (window.innerWidth < 750) { const toggleIcon = document.getElementById('toggle-icon'); if (toggleIcon) toggleIcon.click(); } }); // Add container to grid gridContainer.appendChild(entityContainer); }); }); // Append grid container to the sidebar sidebar.appendChild(gridContainer); } // Clear sidebar and display the full-width tile and related pages function clearSidebarAndDisplay(propName, value) { // Clear sidebar contents sidebar.innerHTML = ''; // Create a container for the selected tile with 90% width of the sidebar const selectedTileContainer = document.createElement('div'); selectedTileContainer.style.cssText = 'width: 90%; margin: 0 auto 10px auto; padding: 10px; border: 1px solid #ccc; background-color: #e0e0e0; text-align: left;'; selectedTileContainer.classList.add('selected-tile'); // Add property name and value selectedTileContainer.innerHTML = ` <div style="font-size: 0.9em; margin-bottom: 5px;">${propName}</div> <div style="font-size: 1.2em; word-wrap: break-word;">${value}</div> `; // Add back button above the selected tile const backButton = document.createElement('div'); backButton.style.cssText = ` margin-bottom: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; margin-top: 5vh; background-color: #0a4e8c; /* Dark blue background */ color: white; /* White text */ border-radius: 30px; /* Rounded corners */ font-weight: bold; /* Bold text */ font-size: 16px; /* Similar size to your example */ text-align: center; width: 150px; /* Width to match your example */ transition: background-color 0.3s; `; backButton.classList.add('back-button'); backButton.textContent = 'All Linked Data'; // Add hover effect to back button backButton.addEventListener('mouseover', () => { backButton.style.backgroundColor = '#083a6a'; // Slightly darker blue on hover }); backButton.addEventListener('mouseout', () => { backButton.style.backgroundColor = '#0a4e8c'; // Revert to original blue }); // Handle back button click to revert to initial state backButton.addEventListener('click', () => { sidebar.innerHTML = '<h2>Linked Data</h2><h3 class="foaf-title">Friend Of A Friend (FOAF)</h3>'; const foafData = extractRDFaFOAF(document.body); displayFOAFDataInSidebar(foafData); }); // Add "Related Pages" title above the selected tile const relatedPagesTitle = document.createElement('h3'); relatedPagesTitle.textContent = 'Related pages'; // Insert the back button, "Related Pages" title, and tile sidebar.appendChild(backButton); sidebar.appendChild(relatedPagesTitle); sidebar.appendChild(selectedTileContainer); // Fetch related pages and display results fetchRelatedDataFromNQuadStore(value); } // Fetch related data from N-Quad store based on matching entity function fetchRelatedDataFromNQuadStore(searchValue) { // Clear any existing related pages section const existingRelatedSection = sidebar.querySelector('.related-pages-section'); if (existingRelatedSection) existingRelatedSection.remove(); // Create a container for related pages const relatedSection = document.createElement('div'); relatedSection.classList.add('related-pages-section'); relatedSection.style.cssText = 'margin-top: 10px;'; fetch('https://www.kentarchaeology.org.uk/foaf') .then(response => response.text()) .then(html => { const parser = new DOMParser(); const doc = parser.parseFromString(html, 'text/html'); const rows = doc.querySelectorAll('#n-quad-data tr'); const matchingPages = new Set(); // Find matching rows for the search value rows.forEach((row, index) => { if (index === 0) return; // Skip header row const cells = row.querySelectorAll('td'); const name = cells[0].textContent.trim(); const object = cells[2].textContent.trim(); // Check if the search value matches any name or object if (name.includes(searchValue) || object.includes(searchValue)) { matchingPages.add(cells[3].textContent.trim()); // Assume the URL is in the fourth column } }); // Display related pages or no results message if (matchingPages.size === 0) { relatedSection.innerHTML = '<div>No results found</div>'; } else { matchingPages.forEach(pageUrl => { const pageLinkDiv = document.createElement('div'); pageLinkDiv.style.cssText = 'padding: 5px; margin: 5px;'; pageLinkDiv.innerHTML = `<a href="${pageUrl}" target="_blank">${pageUrl}</a>`; relatedSection.appendChild(pageLinkDiv); }); } sidebar.appendChild(relatedSection); }) .catch(error => { console.error('Failed to fetch FOAF data:', error); relatedSection.innerHTML = '<div>No results found</div>'; sidebar.appendChild(relatedSection); }); } // Highlight and scroll to the associated property when tile is hovered function highlightAndScrollToEntity(uniqueId) { // Clear previous highlights document.querySelectorAll('.highlight-entity, .highlight-property').forEach(el => { el.classList.remove('highlight-entity', 'highlight-property'); }); // Find the element by its unique identifier const propertyElement = document.querySelector(`[data-foaf-id="${uniqueId}"]`); if (propertyElement) { // Highlight the property element in yellow propertyElement.classList.add('highlight-property'); // Highlight the parent entity (if it's a name element) in yellow const nameElement = propertyElement.closest('[property="foaf:name"]'); if (nameElement) nameElement.classList.add('highlight-entity'); // Scroll smoothly to the property element propertyElement.scrollIntoView({ behavior: 'smooth', block: 'center' }); } // Add styles for highlighting and entity/property styling const style = document.createElement('style'); style.textContent = ` .highlight-entity { background-color: yellow; padding: 0; border-radius: 0; } .highlight-property { background-color: yellow; padding: 0; border-radius: 0; } [property] { color: #2952a3; cursor: pointer; } [property]:hover { text-decoration: underline; } `; document.head.appendChild(style); } }); // Insert No Linked Data icon for single forward slash URLs (excluding homepage and /cart page) document.addEventListener('DOMContentLoaded', function() { const currentUrl = window.location.href; // Function to count forward slashes (excluding protocol) function countForwardSlashes(url) { return url.replace(/^https?:\/\//, '').split('/').length - 1; } // Check if the URL contains exactly one forward slash (excluding protocol) const isSingleSlashUrl = countForwardSlashes(currentUrl) === 1; // Exclude the homepage and /cart page const isHomePage = currentUrl === 'https://www.kentarchaeology.org.uk/'; const isCartPage = currentUrl === 'https://www.kentarchaeology.org.uk/cart'; // Exclude URLs containing specific substrings const excludedPaths = ['/guidance', '/licensing', '/privacy', '/search', '/contact', '/documents', '/licensing', '/minutes', '/privacy', '/guidance', '/shop', '/join', '/stores', '/support']; const containsExcludedPath = excludedPaths.some(path => currentUrl.includes(path)); // Only proceed if the URL meets conditions (single slash, not homepage, and doesn't contain excluded paths) if (isSingleSlashUrl && !isHomePage && !containsExcludedPath) { // Create icon element const noDataIcon = document.createElement('div'); noDataIcon.className = 'linked-data-icon'; noDataIcon.title = 'No Linked Data'; noDataIcon.innerHTML = ` <svg width="8.428246mm" height="10.088242mm" viewBox="0 0 13.428246 21.088242" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-127.93042,-90.422231)"><path style="fill:lightgrey;stroke-width:0.0422074" d="m 130.52333,111.4766 c -0.77819,-0.18542 -1.13489,-0.36711 -1.68326,-0.85736 -0.15473,-0.13833 -0.60004,-0.7518 -0.60004,-0.82662 0,-0.02 -0.0412,-0.11453 -0.0915,-0.21015 -0.0945,-0.17966 -0.21812,-0.80316 -0.21812,-1.10048 0,-0.22423 0.14083,-1.02228 0.19108,-1.08284 0.022,-0.0266 0.0643,-0.11683 0.0938,-0.20058 0.0486,-0.13778 0.13066,-0.27812 0.3252,-0.55623 0.0763,-0.10902 0.49635,-0.52052 0.65706,-0.64363 0.14649,-0.11222 0.55047,-0.32462 0.61742,-0.32462 0.0302,0 0.10603,-0.0561 0.1687,-0.12472 l 0.11392,-0.12473 V 99.723484 96.53622 l -0.084,-0.113613 c -0.0512,-0.06922 -0.15593,-0.137504 -0.26792,-0.174704 -0.10116,-0.0336 -0.20481,-0.08626 -0.23034,-0.117017 -0.0255,-0.03076 -0.0695,-0.05593 -0.0977,-0.05593 -0.0282,0 -0.16104,-0.08999 -0.29519,-0.199979 -0.43569,-0.357258 -0.79,-0.799003 -0.90713,-1.130998 -0.0295,-0.08376 -0.0718,-0.174019 -0.0938,-0.200584 -0.0502,-0.06055 -0.19108,-0.858599 -0.19108,-1.082834 0,-0.297318 0.12359,-0.920824 0.21812,-1.100481 0.0503,-0.09561 0.0915,-0.190177 0.0915,-0.210141 0,-0.07483 0.44531,-0.688305 0.60004,-0.826635 0.55114,-0.492734 0.95408,-0.696525 1.7026,-0.861116 0.34964,-0.07688 0.71529,-0.04463 1.2771,0.11261 0.79666,0.222984 1.46767,0.802157 1.88847,1.629999 0.13728,0.270059 0.2985,0.953249 0.29667,1.257214 -0.002,0.298463 -0.15599,0.999975 -0.26374,1.199828 -0.0458,0.08482 -0.0832,0.170096 -0.0832,0.189493 0,0.165402 -0.83537,1.084342 -1.09384,1.203265 -0.0689,0.03169 -0.18589,0.09277 -0.26006,0.135735 -0.0742,0.04297 -0.16471,0.07812 -0.2012,0.07812 -0.0365,0 -0.11079,0.05823 -0.16508,0.129428 l -0.0987,0.129427 v 1.838106 c 0,3.333287 0.0125,3.307667 0.0117,3.362537 -0.003,0.17433 -0.0116,0.28151 0.0382,0.37488 0.061,0.11439 0.18949,0.11788 0.25973,0.0708 0.0703,-0.0471 0.22491,-0.15112 0.34371,-0.23124 0.11879,-0.0802 0.23481,-0.14569 0.25781,-0.14569 0.023,0 0.0714,-0.0327 0.10758,-0.0727 0.0362,-0.0399 0.0834,-0.0727 0.10504,-0.0727 0.0216,0 0.12126,-0.0386 0.22147,-0.0857 0.32157,-0.15143 0.57685,-0.24755 0.78178,-0.29439 0.10992,-0.0251 0.28161,-0.072 0.38154,-0.10418 0.2519,-0.0811 0.19434,-0.0839 0.42877,-0.13418 0.54716,-0.11733 0.17171,-0.0167 0.25166,-0.0359 0.08,-0.0193 0.25163,-0.0524 0.38154,-0.0738 0.1299,-0.0213 0.27413,-0.0636 0.3205,-0.0939 0.0464,-0.0303 0.14844,-0.0777 0.2268,-0.10529 0.0784,-0.0276 0.16306,-0.0678 0.18822,-0.0891 0.0251,-0.0214 0.14494,-0.10406 0.26622,-0.18383 0.31225,-0.20538 0.59649,-0.516227 0.87942,-0.96176 0.0899,-0.141587 0.15371,-0.307752 0.15371,-0.400396 0,-0.07258 -0.0283,-0.105686 -0.12485,-0.146028 -0.11704,-0.0489 -0.28614,-0.152107 -0.48962,-0.298842 -0.16905,-0.121914 -0.62544,-0.601563 -0.6959,-0.731389 -0.0392,-0.07215 -0.0857,-0.155709 -0.10349,-0.185687 -0.1086,-0.18332 -0.21698,-0.4496 -0.23863,-0.58632 -0.0139,-0.08722 -0.0483,-0.239228 -0.0765,-0.337785 -0.1295,-0.451054 0.0237,-1.330103 0.31392,-1.801172 0.0184,-0.02998 0.065,-0.112278 0.10335,-0.182888 0.0673,-0.123912 0.48143,-0.569765 0.6482,-0.697916 0.50133,-0.385249 1.1425,-0.609015 1.74505,-0.609015 0.51469,0 1.10433,0.183026 1.57115,0.487692 0.22351,0.145876 0.74293,0.673065 0.83172,0.844157 0.27451,0.529 0.32535,0.664444 0.38578,1.027765 0.0667,0.401343 0.0588,0.681624 -0.0327,1.152964 -0.0425,0.219095 -0.13183,0.433697 -0.36786,0.884204 -0.0874,0.166865 -0.70662,0.780967 -0.86034,0.85325 -0.066,0.03108 -0.16094,0.07989 -0.2109,0.10863 -0.0499,0.02867 -0.21405,0.1082 -0.36464,0.176669 -0.28934,0.131574 -0.33506,0.185045 -0.38307,0.447952 -0.014,0.07671 -0.0559,0.196737 -0.093,0.266686 -0.0371,0.06991 -0.0927,0.184409 -0.12345,0.254359 -0.10799,0.24567 -0.16612,0.34231 -0.48933,0.81351 -0.03,0.0437 -0.0872,0.11219 -0.12717,0.15219 -0.04,0.04 -0.12277,0.12931 -0.18399,0.19849 -0.23172,0.26181 -0.54076,0.52485 -0.85301,0.72601 -0.31631,0.20379 -0.33708,0.21588 -0.47099,0.27409 -0.07,0.0304 -0.18441,0.0852 -0.25436,0.12177 -0.07,0.0366 -0.17567,0.0779 -0.23493,0.092 -0.0592,0.014 -0.17372,0.055 -0.25437,0.0911 -0.0807,0.0361 -0.24471,0.0772 -0.36462,0.0913 -0.11992,0.0141 -0.32946,0.0487 -0.46568,0.077 -0.18209,0.0378 -0.0497,0.0111 -0.38745,0.11536 -0.40157,0.10385 0.005,-0.0284 -0.39648,0.10164 -0.50173,0.16261 -1.07,0.46302 -1.36869,0.72353 -0.22149,0.19318 -0.63577,0.62951 -0.6825,0.71882 -0.0288,0.0549 -0.0649,0.0999 -0.0804,0.0999 -0.0155,0 -0.0648,0.0695 -0.10961,0.15443 -0.0448,0.085 -0.0405,0.77418 -0.0379,0.8358 0.009,0.20593 0.003,0.26622 0.42457,0.47339 0.16073,0.0791 0.54385,0.41559 0.72408,0.63599 0.20515,0.25085 0.39066,0.52309 0.39159,0.57463 3.8e-4,0.0216 0.0381,0.10868 0.0839,0.19351 0.10775,0.19985 0.26196,0.90136 0.26375,1.19982 0.002,0.30397 -0.1594,0.98716 -0.29667,1.25721 -0.25703,0.50565 -0.73246,1.06576 -1.05483,1.24272 -0.0754,0.0413 -0.23284,0.12852 -0.3499,0.19365 -0.19401,0.10793 -0.54499,0.22172 -0.94815,0.30739 -0.19233,0.0409 -0.65127,0.0381 -0.83205,-0.005 z" id="path466" /></g></svg> `; noDataIcon.style.cssText = 'position: fixed; top: 69vh; left: 10px; cursor: pointer; z-index: 1000; transition: transform 0.2s;'; noDataIcon.onmouseover = () => { noDataIcon.style.transform = 'scale(1.2)'; }; noDataIcon.onmouseout = () => { noDataIcon.style.transform = 'scale(1)'; }; // Append the icon to the body document.body.appendChild(noDataIcon); } }); // Linked Data icon for Events and Exhibitions document.addEventListener('DOMContentLoaded', function() { const currentUrl = window.location.href; // Check for URL conditions to determine icon behavior const isEventOrExhibitionPage = /\/events\/|\/exhibitions\//.test(currentUrl); // Only proceed if the current page is an event or exhibition page if (!isEventOrExhibitionPage) return; // Add sidebar if exists const sidebar = document.querySelector('.sidebar'); if (!sidebar) return; // Hide original map, Google Calendar, and ICS links document.querySelectorAll('.eventitem-meta-address-maplink, .eventitem-meta-export-google, .eventitem-meta-export-ical').forEach(element => { element.style.display = 'none'; }); // Create icon element const dataIcon = document.createElement('div'); dataIcon.className = 'data-icon'; dataIcon.title = 'Event Details'; dataIcon.innerHTML = ` <svg width="8.428246mm" height="10.088242mm" viewBox="0 0 13.428246 21.088242" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-127.93042,-90.422231)"><path style="fill:#12518D ;stroke-width:0.0422074" d="m 130.52333,111.4766 c -0.77819,-0.18542 -1.13489,-0.36711 -1.68326,-0.85736 -0.15473,-0.13833 -0.60004,-0.7518 -0.60004,-0.82662 0,-0.02 -0.0412,-0.11453 -0.0915,-0.21015 -0.0945,-0.17966 -0.21812,-0.80316 -0.21812,-1.10048 0,-0.22423 0.14083,-1.02228 0.19108,-1.08284 0.022,-0.0266 0.0643,-0.11683 0.0938,-0.20058 0.0486,-0.13778 0.13066,-0.27812 0.3252,-0.55623 0.0763,-0.10902 0.49635,-0.52052 0.65706,-0.64363 0.14649,-0.11222 0.55047,-0.32462 0.61742,-0.32462 0.0302,0 0.10603,-0.0561 0.1687,-0.12472 l 0.11392,-0.12473 V 99.723484 96.53622 l -0.084,-0.113613 c -0.0512,-0.06922 -0.15593,-0.137504 -0.26792,-0.174704 -0.10116,-0.0336 -0.20481,-0.08626 -0.23034,-0.117017 -0.0255,-0.03076 -0.0695,-0.05593 -0.0977,-0.05593 -0.0282,0 -0.16104,-0.08999 -0.29519,-0.199979 -0.43569,-0.357258 -0.79,-0.799003 -0.90713,-1.130998 -0.0295,-0.08376 -0.0718,-0.174019 -0.0938,-0.200584 -0.0502,-0.06055 -0.19108,-0.858599 -0.19108,-1.082834 0,-0.297318 0.12359,-0.920824 0.21812,-1.100481 0.0503,-0.09561 0.0915,-0.190177 0.0915,-0.210141 0,-0.07483 0.44531,-0.688305 0.60004,-0.826635 0.55114,-0.492734 0.95408,-0.696525 1.7026,-0.861116 0.34964,-0.07688 0.71529,-0.04463 1.2771,0.11261 0.79666,0.222984 1.46767,0.802157 1.88847,1.629999 0.13728,0.270059 0.2985,0.953249 0.29667,1.257214 -0.002,0.298463 -0.15599,0.999975 -0.26374,1.199828 -0.0458,0.08482 -0.0832,0.170096 -0.0832,0.189493 0,0.165402 -0.83537,1.084342 -1.09384,1.203265 -0.0689,0.03169 -0.18589,0.09277 -0.26006,0.135735 -0.0742,0.04297 -0.16471,0.07812 -0.2012,0.07812 -0.0365,0 -0.11079,0.05823 -0.16508,0.129428 l -0.0987,0.129427 v 1.838106 c 0,3.333287 0.0125,3.307667 0.0117,3.362537 -0.003,0.17433 -0.0116,0.28151 0.0382,0.37488 0.061,0.11439 0.18949,0.11788 0.25973,0.0708 0.0703,-0.0471 0.22491,-0.15112 0.34371,-0.23124 0.11879,-0.0802 0.23481,-0.14569 0.25781,-0.14569 0.023,0 0.0714,-0.0327 0.10758,-0.0727 0.0362,-0.0399 0.0834,-0.0727 0.10504,-0.0727 0.0216,0 0.12126,-0.0386 0.22147,-0.0857 0.32157,-0.15143 0.57685,-0.24755 0.78178,-0.29439 0.10992,-0.0251 0.28161,-0.072 0.38154,-0.10418 0.2519,-0.0811 0.19434,-0.0839 0.42877,-0.13418 0.54716,-0.11733 0.17171,-0.0167 0.25166,-0.0359 0.08,-0.0193 0.25163,-0.0524 0.38154,-0.0738 0.1299,-0.0213 0.27413,-0.0636 0.3205,-0.0939 0.0464,-0.0303 0.14844,-0.0777 0.2268,-0.10529 0.0784,-0.0276 0.16306,-0.0678 0.18822,-0.0891 0.0251,-0.0214 0.14494,-0.10406 0.26622,-0.18383 0.31225,-0.20538 0.59649,-0.516227 0.87942,-0.96176 0.0899,-0.141587 0.15371,-0.307752 0.15371,-0.400396 0,-0.07258 -0.0283,-0.105686 -0.12485,-0.146028 -0.11704,-0.0489 -0.28614,-0.152107 -0.48962,-0.298842 -0.16905,-0.121914 -0.62544,-0.601563 -0.6959,-0.731389 -0.0392,-0.07215 -0.0857,-0.155709 -0.10349,-0.185687 -0.1086,-0.18332 -0.21698,-0.4496 -0.23863,-0.58632 -0.0139,-0.08722 -0.0483,-0.239228 -0.0765,-0.337785 -0.1295,-0.451054 0.0237,-1.330103 0.31392,-1.801172 0.0184,-0.02998 0.065,-0.112278 0.10335,-0.182888 0.0673,-0.123912 0.48143,-0.569765 0.6482,-0.697916 0.50133,-0.385249 1.1425,-0.609015 1.74505,-0.609015 0.51469,0 1.10433,0.183026 1.57115,0.487692 0.22351,0.145876 0.74293,0.673065 0.83172,0.844157 0.27451,0.529 0.32535,0.664444 0.38578,1.027765 0.0667,0.401343 0.0588,0.681624 -0.0327,1.152964 -0.0425,0.219095 -0.13183,0.433697 -0.36786,0.884204 -0.0874,0.166865 -0.70662,0.780967 -0.86034,0.85325 -0.066,0.03108 -0.16094,0.07989 -0.2109,0.10863 -0.0499,0.02867 -0.21405,0.1082 -0.36464,0.176669 -0.28934,0.131574 -0.33506,0.185045 -0.38307,0.447952 -0.014,0.07671 -0.0559,0.196737 -0.093,0.266686 -0.0371,0.06991 -0.0927,0.184409 -0.12345,0.254359 -0.10799,0.24567 -0.16612,0.34231 -0.48933,0.81351 -0.03,0.0437 -0.0872,0.11219 -0.12717,0.15219 -0.04,0.04 -0.12277,0.12931 -0.18399,0.19849 -0.23172,0.26181 -0.54076,0.52485 -0.85301,0.72601 -0.31631,0.20379 -0.33708,0.21588 -0.47099,0.27409 -0.07,0.0304 -0.18441,0.0852 -0.25436,0.12177 -0.07,0.0366 -0.17567,0.0779 -0.23493,0.092 -0.0592,0.014 -0.17372,0.055 -0.25437,0.0911 -0.0807,0.0361 -0.24471,0.0772 -0.36462,0.0913 -0.11992,0.0141 -0.32946,0.0487 -0.46568,0.077 -0.18209,0.0378 -0.0497,0.0111 -0.38745,0.11536 -0.40157,0.10385 0.005,-0.0284 -0.39648,0.10164 -0.50173,0.16261 -1.07,0.46302 -1.36869,0.72353 -0.22149,0.19318 -0.63577,0.62951 -0.6825,0.71882 -0.0288,0.0549 -0.0649,0.0999 -0.0804,0.0999 -0.0155,0 -0.0648,0.0695 -0.10961,0.15443 -0.0448,0.085 -0.0405,0.77418 -0.0379,0.8358 0.009,0.20593 0.003,0.26622 0.42457,0.47339 0.16073,0.0791 0.54385,0.41559 0.72408,0.63599 0.20515,0.25085 0.39066,0.52309 0.39159,0.57463 3.8e-4,0.0216 0.0381,0.10868 0.0839,0.19351 0.10775,0.19985 0.26196,0.90136 0.26375,1.19982 0.002,0.30397 -0.1594,0.98716 -0.29667,1.25721 -0.25703,0.50565 -0.73246,1.06576 -1.05483,1.24272 -0.0754,0.0413 -0.23284,0.12852 -0.3499,0.19365 -0.19401,0.10793 -0.54499,0.22172 -0.94815,0.30739 -0.19233,0.0409 -0.65127,0.0381 -0.83205,-0.005 z" id="path466" /></g></svg> `; dataIcon.style.cssText = 'position: fixed; top: 69vh; left: 10px; cursor: pointer; z-index: 1000; transition: transform 0.2s;'; dataIcon.onmouseover = () => { dataIcon.style.transform = 'scale(1.2)'; }; dataIcon.onmouseout = () => { dataIcon.style.transform = 'scale(1)'; }; document.body.appendChild(dataIcon); // Function to extract and display schema.org Event data dataIcon.addEventListener('click', function() { sidebar.innerHTML = '<h2>Event Details</h2>'; const eventData = extractEventDetails(); displayEventDetailsInSidebar(eventData); }); // Extract Event details from JSON-LD in the <script> tag function extractEventDetails() { const scriptTags = document.querySelectorAll('script[type="application/ld+json"]'); for (let script of scriptTags) { try { const jsonData = JSON.parse(script.textContent); if (jsonData['@type'] === 'Event') { return jsonData; } } catch (e) { console.error('Invalid JSON-LD:', e); } } return null; } // Convert the date string to a simpler format function formatDateTime(dateTimeString) { const dateObj = new Date(dateTimeString); const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', hour12: true }; return dateObj.toLocaleDateString('en-US', options); } // Display schema.org Event details in the sidebar in a grid layout function displayEventDetailsInSidebar(eventData) { if (!eventData) { sidebar.innerHTML += '<div>No Event details found on this page.</div>'; return; } // Create a container to wrap the grid layout const gridContainer = document.createElement('div'); gridContainer.style.cssText = 'display: flex; flex-wrap: wrap; width: 100%;'; // Create and append grid items for event details const createGridItem = (label, value, isLink = false, linkUrl = '', fraction = '50%') => { const itemContainer = document.createElement('div'); itemContainer.style.cssText = ` flex: 1 1 ${fraction}; padding: 10px; border: 1px solid #ccc; background-color: #fff; text-align: left; cursor: pointer; box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.2); transition: background-color 0.3s, color 0.3s; width: ${fraction}; box-sizing: border-box; `; const labelDiv = document.createElement('div'); labelDiv.style.cssText = 'font-size: 0.9em; font-weight: bold; margin-bottom: 5px;'; labelDiv.textContent = label; const valueDiv = document.createElement('div'); valueDiv.style.cssText = 'font-size: 1em; word-wrap: break-word;'; valueDiv.textContent = value; itemContainer.appendChild(labelDiv); itemContainer.appendChild(valueDiv); // If the item is a link, add click functionality if (isLink) { itemContainer.addEventListener('click', () => { window.open(linkUrl, '_blank'); }); } else { // Add click handler to show the tile and related pages itemContainer.addEventListener('click', () => { clearSidebarAndDisplay(label, value); // If screen is narrower than 750px, simulate click on toggle icon if (window.innerWidth < 750) { const toggleIcon = document.getElementById('toggle-icon'); if (toggleIcon) toggleIcon.click(); } }); } // Hover effect: change to black with white text itemContainer.addEventListener('mouseover', () => { itemContainer.style.backgroundColor = '#000'; // Black background on hover itemContainer.style.color = '#fff'; // White text on hover }); itemContainer.addEventListener('mouseout', () => { itemContainer.style.backgroundColor = '#fff'; // Revert to white background itemContainer.style.color = '#000'; // Revert to black text }); gridContainer.appendChild(itemContainer); }; // Extract and add additional links (map, Google Calendar, ICS) - each takes up one-third of a row const mapLink = document.querySelector('.eventitem-meta-address-maplink'); if (mapLink) { createGridItem('Directions', 'Google Maps', true, mapLink.href, '33.33%'); } const googleCalendarLink = document.querySelector('.eventitem-meta-export-google'); if (googleCalendarLink) { createGridItem('Add to', 'Google Calendar', true, googleCalendarLink.href, '33.33%'); } const icsLink = document.querySelector('.eventitem-meta-export-ical'); if (icsLink) { createGridItem('Add to', 'ICS', true, icsLink.href, '33.33%'); } // Append event details tiles - each takes up half a row const location = (eventData.location?.address || '') .replace(/,?\s*England/g, '') .replace(/,?\s*ME\d+\s*\d+\s*/g, '') .replace(/,?\s*United Kingdom/g, ''); createGridItem('Title', eventData.name.replace(' — Kent Archaeological Society', '') || 'N/A', false, '', '50%'); createGridItem('Start', formatDateTime(eventData.startDate) || 'N/A', false, '', '50%'); createGridItem('End', formatDateTime(eventData.endDate) || 'N/A', false, '', '50%'); createGridItem('Location', `${eventData.location?.name || 'N/A'}, ${location}`, false, '', '50%'); // Display the image if present if (eventData.image && eventData.image.length > 0) { const imageItem = document.createElement('div'); imageItem.style.cssText = 'width: 100%; margin: 0;'; const image = document.createElement('img'); image.src = eventData.image[0]; image.alt = eventData.name; image.style.cssText = 'width: 100%; height: auto; display: block;'; imageItem.appendChild(image); gridContainer.appendChild(imageItem); } // Append grid container to the sidebar sidebar.appendChild(gridContainer); } // Clear sidebar and display a full-width tile with related pages function clearSidebarAndDisplay(propName, value) { // Clear sidebar contents sidebar.innerHTML = ''; // Create a container for the selected tile with 90% width of the sidebar const selectedTileContainer = document.createElement('div'); selectedTileContainer.style.cssText = 'width: 90%; margin: 0 auto 10px auto; padding: 10px; border: 1px solid #ccc; background-color: #e0e0e0; text-align: left;'; selectedTileContainer.classList.add('selected-tile'); // Add property name and value selectedTileContainer.innerHTML = ` <div style="font-size: 0.9em; margin-bottom: 5px;">${propName}</div> <div style="font-size: 1.2em; word-wrap: break-word;">${value}</div> `; // Add back button above the selected tile const backButton = document.createElement('div'); backButton.style.cssText = ` margin-bottom: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; margin-top: 5vh; background-color: #0a4e8c; /* Dark blue background */ color: white; /* White text */ border-radius: 30px; /* Rounded corners */ font-weight: bold; /* Bold text */ font-size: 16px; /* Similar size to your example */ text-align: center; width: 150px; /* Width to match your example */ transition: background-color 0.3s; `; backButton.classList.add('back-button'); backButton.textContent = 'All Event Details'; // Add hover effect to back button backButton.addEventListener('mouseover', () => { backButton.style.backgroundColor = '#083a6a'; // Slightly darker blue on hover }); backButton.addEventListener('mouseout', () => { backButton.style.backgroundColor = '#0a4e8c'; // Revert to original blue }); // Handle back button click to revert to initial state backButton.addEventListener('click', () => { sidebar.innerHTML = '<h2>Event Details</h2>'; const eventData = extractEventDetails(); displayEventDetailsInSidebar(eventData); }); // Add "Related Pages" title above the selected tile const relatedPagesTitle = document.createElement('h3'); relatedPagesTitle.textContent = 'Related pages'; // Insert the back button, "Related Pages" title, and tile sidebar.appendChild(backButton); sidebar.appendChild(relatedPagesTitle); sidebar.appendChild(selectedTileContainer); // Fetch related pages and display results fetchRelatedDataFromNQuadStore(value); } // Fetch related data from the array at /crm#crm function fetchRelatedDataFromNQuadStore(searchValue) { // Clear any existing related pages section const existingRelatedSection = sidebar.querySelector('.related-pages-section'); if (existingRelatedSection) existingRelatedSection.remove(); // Create a container for related pages const relatedSection = document.createElement('div'); relatedSection.classList.add('related-pages-section'); relatedSection.style.cssText = 'margin-top: 10px;'; fetch('https://www.kentarchaeology.org.uk/crm#crm') .then(response => response.text()) .then(text => { const rows = text.trim().split('\n'); const matchingPages = new Set(); // Find matching rows for the search value rows.forEach(row => { const cells = row.split(','); const name = cells[0].trim(); const object = cells[2].trim(); // Check if the search value matches any name or object if (name.includes(searchValue) || object.includes(searchValue)) { matchingPages.add(cells[3].trim()); // Assume the URL is in the fourth column } }); // Display related pages or no results message if (matchingPages.size === 0) { relatedSection.innerHTML = '<div>No results found</div>'; } else { matchingPages.forEach(pageUrl => { const pageLinkDiv = document.createElement('div'); pageLinkDiv.style.cssText = 'padding: 5px; margin: 5px;'; pageLinkDiv.innerHTML = `<a href="${pageUrl}" target="_blank">${pageUrl}</a>`; relatedSection.appendChild(pageLinkDiv); }); } sidebar.appendChild(relatedSection); }) .catch(error => { console.error('Failed to fetch related data:', error); relatedSection.innerHTML = '<div>No results found</div>'; sidebar.appendChild(relatedSection); }); } }); // Linked Data icon for Dublin Core and CIDOC document.addEventListener('DOMContentLoaded', function() { const currentUrl = window.location.href; // Check for URL conditions to determine icon behavior const isPublicationPage = /\/books\/|\/journal\/|\/magazine\/|\/papers\/|\/reports\//.test(currentUrl); const isCidocPage = /\/news\/|\/books\/|\/magazine\/|\/journal\/|\/reports\/|\/papers\/|\/audio\/|\/images\/|\/maps\/|\/models\/|\/videos\/|\/collections\/|\/library\//.test(currentUrl); // Add sidebar if exists const sidebar = document.querySelector('.sidebar'); if (!sidebar) return; // Only proceed if the current page matches either Dublin Core or CIDOC conditions if (!isPublicationPage && !isCidocPage) return; // Add Dublin Core JSON-LD on initial page load if it is a publication page if (isPublicationPage) { const publicationData = extractPublicationDetails(); insertJSONLDDublinCore(publicationData); } // Create icon element const dataIcon = document.createElement('div'); dataIcon.className = 'data-icon'; dataIcon.title = 'Linked Data'; dataIcon.innerHTML = ` <svg width="8.428246mm" height="10.088242mm" viewBox="0 0 13.428246 21.088242" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-127.93042,-90.422231)"><path style="fill:#12518D ;stroke-width:0.0422074" d="m 130.52333,111.4766 c -0.77819,-0.18542 -1.13489,-0.36711 -1.68326,-0.85736 -0.15473,-0.13833 -0.60004,-0.7518 -0.60004,-0.82662 0,-0.02 -0.0412,-0.11453 -0.0915,-0.21015 -0.0945,-0.17966 -0.21812,-0.80316 -0.21812,-1.10048 0,-0.22423 0.14083,-1.02228 0.19108,-1.08284 0.022,-0.0266 0.0643,-0.11683 0.0938,-0.20058 0.0486,-0.13778 0.13066,-0.27812 0.3252,-0.55623 0.0763,-0.10902 0.49635,-0.52052 0.65706,-0.64363 0.14649,-0.11222 0.55047,-0.32462 0.61742,-0.32462 0.0302,0 0.10603,-0.0561 0.1687,-0.12472 l 0.11392,-0.12473 V 99.723484 96.53622 l -0.084,-0.113613 c -0.0512,-0.06922 -0.15593,-0.137504 -0.26792,-0.174704 -0.10116,-0.0336 -0.20481,-0.08626 -0.23034,-0.117017 -0.0255,-0.03076 -0.0695,-0.05593 -0.0977,-0.05593 -0.0282,0 -0.16104,-0.08999 -0.29519,-0.199979 -0.43569,-0.357258 -0.79,-0.799003 -0.90713,-1.130998 -0.0295,-0.08376 -0.0718,-0.174019 -0.0938,-0.200584 -0.0502,-0.06055 -0.19108,-0.858599 -0.19108,-1.082834 0,-0.297318 0.12359,-0.920824 0.21812,-1.100481 0.0503,-0.09561 0.0915,-0.190177 0.0915,-0.210141 0,-0.07483 0.44531,-0.688305 0.60004,-0.826635 0.55114,-0.492734 0.95408,-0.696525 1.7026,-0.861116 0.34964,-0.07688 0.71529,-0.04463 1.2771,0.11261 0.79666,0.222984 1.46767,0.802157 1.88847,1.629999 0.13728,0.270059 0.2985,0.953249 0.29667,1.257214 -0.002,0.298463 -0.15599,0.999975 -0.26374,1.199828 -0.0458,0.08482 -0.0832,0.170096 -0.0832,0.189493 0,0.165402 -0.83537,1.084342 -1.09384,1.203265 -0.0689,0.03169 -0.18589,0.09277 -0.26006,0.135735 -0.0742,0.04297 -0.16471,0.07812 -0.2012,0.07812 -0.0365,0 -0.11079,0.05823 -0.16508,0.129428 l -0.0987,0.129427 v 1.838106 c 0,3.333287 0.0125,3.307667 0.0117,3.362537 -0.003,0.17433 -0.0116,0.28151 0.0382,0.37488 0.061,0.11439 0.18949,0.11788 0.25973,0.0708 0.0703,-0.0471 0.22491,-0.15112 0.34371,-0.23124 0.11879,-0.0802 0.23481,-0.14569 0.25781,-0.14569 0.023,0 0.0714,-0.0327 0.10758,-0.0727 0.0362,-0.0399 0.0834,-0.0727 0.10504,-0.0727 0.0216,0 0.12126,-0.0386 0.22147,-0.0857 0.32157,-0.15143 0.57685,-0.24755 0.78178,-0.29439 0.10992,-0.0251 0.28161,-0.072 0.38154,-0.10418 0.2519,-0.0811 0.19434,-0.0839 0.42877,-0.13418 0.54716,-0.11733 0.17171,-0.0167 0.25166,-0.0359 0.08,-0.0193 0.25163,-0.0524 0.38154,-0.0738 0.1299,-0.0213 0.27413,-0.0636 0.3205,-0.0939 0.0464,-0.0303 0.14844,-0.0777 0.2268,-0.10529 0.0784,-0.0276 0.16306,-0.0678 0.18822,-0.0891 0.0251,-0.0214 0.14494,-0.10406 0.26622,-0.18383 0.31225,-0.20538 0.59649,-0.516227 0.87942,-0.96176 0.0899,-0.141587 0.15371,-0.307752 0.15371,-0.400396 0,-0.07258 -0.0283,-0.105686 -0.12485,-0.146028 -0.11704,-0.0489 -0.28614,-0.152107 -0.48962,-0.298842 -0.16905,-0.121914 -0.62544,-0.601563 -0.6959,-0.731389 -0.0392,-0.07215 -0.0857,-0.155709 -0.10349,-0.185687 -0.1086,-0.18332 -0.21698,-0.4496 -0.23863,-0.58632 -0.0139,-0.08722 -0.0483,-0.239228 -0.0765,-0.337785 -0.1295,-0.451054 0.0237,-1.330103 0.31392,-1.801172 0.0184,-0.02998 0.065,-0.112278 0.10335,-0.182888 0.0673,-0.123912 0.48143,-0.569765 0.6482,-0.697916 0.50133,-0.385249 1.1425,-0.609015 1.74505,-0.609015 0.51469,0 1.10433,0.183026 1.57115,0.487692 0.22351,0.145876 0.74293,0.673065 0.83172,0.844157 0.27451,0.529 0.32535,0.664444 0.38578,1.027765 0.0667,0.401343 0.0588,0.681624 -0.0327,1.152964 -0.0425,0.219095 -0.13183,0.433697 -0.36786,0.884204 -0.0874,0.166865 -0.70662,0.780967 -0.86034,0.85325 -0.066,0.03108 -0.16094,0.07989 -0.2109,0.10863 -0.0499,0.02867 -0.21405,0.1082 -0.36464,0.176669 -0.28934,0.131574 -0.33506,0.185045 -0.38307,0.447952 -0.014,0.07671 -0.0559,0.196737 -0.093,0.266686 -0.0371,0.06991 -0.0927,0.184409 -0.12345,0.254359 -0.10799,0.24567 -0.16612,0.34231 -0.48933,0.81351 -0.03,0.0437 -0.0872,0.11219 -0.12717,0.15219 -0.04,0.04 -0.12277,0.12931 -0.18399,0.19849 -0.23172,0.26181 -0.54076,0.52485 -0.85301,0.72601 -0.31631,0.20379 -0.33708,0.21588 -0.47099,0.27409 -0.07,0.0304 -0.18441,0.0852 -0.25436,0.12177 -0.07,0.0366 -0.17567,0.0779 -0.23493,0.092 -0.0592,0.014 -0.17372,0.055 -0.25437,0.0911 -0.0807,0.0361 -0.24471,0.0772 -0.36462,0.0913 -0.11992,0.0141 -0.32946,0.0487 -0.46568,0.077 -0.18209,0.0378 -0.0497,0.0111 -0.38745,0.11536 -0.40157,0.10385 0.005,-0.0284 -0.39648,0.10164 -0.50173,0.16261 -1.07,0.46302 -1.36869,0.72353 -0.22149,0.19318 -0.63577,0.62951 -0.6825,0.71882 -0.0288,0.0549 -0.0649,0.0999 -0.0804,0.0999 -0.0155,0 -0.0648,0.0695 -0.10961,0.15443 -0.0448,0.085 -0.0405,0.77418 -0.0379,0.8358 0.009,0.20593 0.003,0.26622 0.42457,0.47339 0.16073,0.0791 0.54385,0.41559 0.72408,0.63599 0.20515,0.25085 0.39066,0.52309 0.39159,0.57463 3.8e-4,0.0216 0.0381,0.10868 0.0839,0.19351 0.10775,0.19985 0.26196,0.90136 0.26375,1.19982 0.002,0.30397 -0.1594,0.98716 -0.29667,1.25721 -0.25703,0.50565 -0.73246,1.06576 -1.05483,1.24272 -0.0754,0.0413 -0.23284,0.12852 -0.3499,0.19365 -0.19401,0.10793 -0.54499,0.22172 -0.94815,0.30739 -0.19233,0.0409 -0.65127,0.0381 -0.83205,-0.005 z" id="path466" /></g></svg> `; dataIcon.style.cssText = 'position: fixed; top: 69vh; left: 10px; cursor: pointer; z-index: 1000; transition: transform 0.2s;'; dataIcon.onmouseover = () => { dataIcon.style.transform = 'scale(1.2)'; }; dataIcon.onmouseout = () => { dataIcon.style.transform = 'scale(1)'; }; // Append icon only if not already present if (!document.querySelector('.data-icon')) { document.body.appendChild(dataIcon); } // Function to extract and display metadata from both Dublin Core and CIDOC when the icon is clicked dataIcon.addEventListener('click', function() { // Clear and set up the sidebar header sidebar.innerHTML = '<h2>Linked Data</h2>'; // Create unified metadata container const metadataContainer = document.createElement('div'); metadataContainer.style.cssText = 'display: flex; flex-wrap: wrap; gap: 0; width: 100%;'; sidebar.appendChild(metadataContainer); // Extract and display Dublin Core metadata if present if (isPublicationPage) { const publicationData = extractPublicationDetails(); appendDublinCoreDetails(metadataContainer, publicationData); } // Extract and display CIDOC RDFa if present if (isCidocPage) { const cidocData = extractRDFaCIDOC(document.body); appendCIDOCData(metadataContainer, cidocData); } }); // Function to extract publication details from <meta property="og:description"> and <title> function extractPublicationDetails() { const ogDescriptionMeta = document.querySelector('meta[property="og:description"]'); const titleElement = document.querySelector('title'); // Extract the title, removing " — Kent Archaeological Society" if present let pageTitle = titleElement ? titleElement.textContent.replace(' — Kent Archaeological Society', '').trim() : 'N/A'; if (ogDescriptionMeta) { const content = ogDescriptionMeta.getAttribute('content'); return parseHarvardReference(content, pageTitle); } return null; } // Function to parse the Harvard reference content function parseHarvardReference(reference, pageTitle) { const match = reference.match(/^(.+?),\s*(\d{4}),\s*(.+)\.\s+(.+?)\.$/); if (match) { return { creator: match[1].trim(), date: match[2].trim(), title: pageTitle, publication: match[3].trim(), publisher: match[4].trim() }; } return null; } // Function to append Dublin Core metadata to a container function appendDublinCoreDetails(container, publicationData) { if (!publicationData) return; const dublinCoreTriples = [ { label: 'dc:creator', value: publicationData.creator }, { label: 'dc:date', value: publicationData.date }, { label: 'dc:title', value: publicationData.title }, { label: 'dc:publication', value: publicationData.publication }, { label: 'dc:publisher', value: publicationData.publisher } ]; dublinCoreTriples.forEach(triple => { const itemContainer = document.createElement('div'); itemContainer.style.cssText = ` flex: 1; margin: 1px; padding: 5px; border: 1px solid #ccc; background-color: #fff; text-align: left; cursor: pointer; box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.2); transition: background-color 0.3s, color 0.3s; `; const labelDiv = document.createElement('div'); labelDiv.style.cssText = 'font-size: 0.9em; font-weight: bold; margin-bottom: 5px;'; labelDiv.textContent = triple.label; const valueDiv = document.createElement('div'); valueDiv.style.cssText = 'font-size: 1em; word-wrap: break-word;'; valueDiv.textContent = triple.value; // Add hover and click effects for Dublin Core addHoverAndClickEffects(itemContainer, triple.label, triple.value); itemContainer.appendChild(labelDiv); itemContainer.appendChild(valueDiv); container.appendChild(itemContainer); }); } // Function to insert Dublin Core metadata as JSON-LD function insertJSONLDDublinCore(publicationData) { if (!publicationData) return; const jsonLdScript = document.createElement('script'); jsonLdScript.type = 'application/ld+json'; const jsonLdData = { "@context": "https://schema.org", "@type": "CreativeWork", "name": publicationData.title, "creator": publicationData.creator, "datePublished": publicationData.date, "publisher": publicationData.publisher, "description": publicationData.publication }; jsonLdScript.textContent = JSON.stringify(jsonLdData); document.head.appendChild(jsonLdScript); } // Function to extract CIDOC RDFa data from the page function extractRDFaCIDOC(element) { const rdfaData = []; // Find all entities marked with typeof const entities = element.querySelectorAll('[typeof]'); entities.forEach((entity, index) => { const type = entity.getAttribute('typeof').replace('cidoc:', ''); // Remove 'cidoc:' prefix const properties = Array.from(entity.querySelectorAll('[property]')).map((property, propIndex) => { const uniqueId = `cidoc-prop-${index}-${propIndex}`; property.setAttribute('data-cidoc-id', uniqueId); // Style RDFa items to match the FOAF script color and hover behavior property.style.color = '#2952a3'; // Exact blue used in FOAF property.style.cursor = 'pointer'; const propName = property.getAttribute('property').replace('cidoc:', ''); const value = property.textContent.trim(); property.setAttribute('title', `crm:${propName}: ${value}`); // Add hover to underline text property.addEventListener('mouseover', () => { property.style.textDecoration = 'underline'; }); property.addEventListener('mouseout', () => { property.style.textDecoration = 'none'; }); return { propName: `crm:${propName}`, value: value, uniqueId: uniqueId }; }); rdfaData.push({ entity, type, properties }); }); return rdfaData; } // Function to append CIDOC data to a container function appendCIDOCData(container, data) { data.forEach(({ properties }) => { properties.forEach(({ propName, value, uniqueId }) => { const entityContainer = document.createElement('div'); entityContainer.style.cssText = ` flex: 1; margin: 1px; padding: 5px; border: 1px solid #ccc; background-color: #fff; text-align: left; cursor: pointer; box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.2); transition: background-color 0.3s, color 0.3s; `; const entityReference = document.createElement('div'); entityReference.style.cssText = 'font-size: 0.8em; margin-bottom: 3px; font-weight: bold;'; entityReference.textContent = propName; const valueDiv = document.createElement('div'); valueDiv.style.cssText = 'font-size: 1em; line-height: 1.2em; word-wrap: break-word;'; valueDiv.textContent = value; // Add hover and click effects for CIDOC addHoverAndClickEffects(entityContainer, propName, value, uniqueId); entityContainer.appendChild(entityReference); entityContainer.appendChild(valueDiv); container.appendChild(entityContainer); }); }); } // Function to add hover and click effects function addHoverAndClickEffects(container, propName, value, uniqueId = null) { // Add hover effect for black background and white text container.addEventListener('mouseover', () => { container.style.backgroundColor = '#000'; // Black background on hover container.style.color = '#fff'; // White text on hover highlightAndScrollToRDFa(uniqueId); // Highlight and scroll to the RDFa item }); container.addEventListener('mouseout', () => { container.style.backgroundColor = '#fff'; // Revert to white background container.style.color = '#000'; // Revert to black text }); // Add click functionality for full-width tile container.addEventListener('click', () => { clearSidebarAndDisplay(propName, value); }); } // Function to highlight RDFa item and scroll into view on hover function highlightAndScrollToRDFa(uniqueId) { if (!uniqueId) return; const rdfaElement = document.querySelector(`[data-cidoc-id="${uniqueId}"]`); if (rdfaElement) { // Highlight the element rdfaElement.style.backgroundColor = '#ffff99'; // Light yellow highlight rdfaElement.scrollIntoView({ behavior: 'smooth', block: 'center' }); // Remove the highlight after hover setTimeout(() => { rdfaElement.style.backgroundColor = ''; // Remove highlight after a short duration }, 1000); } } // Clear sidebar and display a full-width tile and related pages function clearSidebarAndDisplay(propName, value) { sidebar.innerHTML = ''; // Clear sidebar // Create a container for the selected tile const selectedTileContainer = document.createElement('div'); selectedTileContainer.style.cssText = 'width: 90%; margin: 0 auto 10px auto; padding: 10px; border: 1px solid #ccc; background-color: #e0e0e0; text-align: left;'; selectedTileContainer.classList.add('selected-tile'); // Add property name and value selectedTileContainer.innerHTML = ` <div style="font-size: 0.9em; margin-bottom: 5px;">${propName}</div> <div style="font-size: 1.2em; word-wrap: break-word;">${value}</div> `; // Add back button to show all data const backButton = document.createElement('div'); backButton.style.cssText = ` margin-bottom: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; margin-top: 5vh; background-color: #0a4e8c; /* Dark blue background */ color: white; /* White text */ border-radius: 30px; /* Rounded corners */ font-weight: bold; /* Bold text */ font-size: 16px; /* Similar size to your example */ text-align: center; width: 150px; /* Width to match your example */ transition: background-color 0.3s; `; backButton.classList.add('back-button'); backButton.textContent = 'All Linked Data'; // Add hover effect to back button backButton.addEventListener('mouseover', () => { backButton.style.backgroundColor = '#083a6a'; // Slightly darker blue on hover }); backButton.addEventListener('mouseout', () => { backButton.style.backgroundColor = '#0a4e8c'; // Revert to original blue }); // Handle back button click to revert to initial state backButton.addEventListener('click', () => { sidebar.innerHTML = '<h2>Linked Data</h2>'; const metadataContainer = document.createElement('div'); metadataContainer.style.cssText = 'display: flex; flex-wrap: wrap; gap: 0; width: 100%;'; sidebar.appendChild(metadataContainer); if (isPublicationPage) { const publicationData = extractPublicationDetails(); appendDublinCoreDetails(metadataContainer, publicationData); } if (isCidocPage) { const cidocData = extractRDFaCIDOC(document.body); appendCIDOCData(metadataContainer, cidocData); } }); // Append back button and selected tile to sidebar sidebar.appendChild(backButton); sidebar.appendChild(selectedTileContainer); // Fetch related data and display results fetchRelatedDataFromCRMStore(value); } // Fetch related data from CRM array based on matching entity function fetchRelatedDataFromCRMStore(searchValue) { // Clear any existing related pages section const existingRelatedSection = sidebar.querySelector('.related-pages-section'); if (existingRelatedSection) existingRelatedSection.remove(); // Create a container for related pages const relatedSection = document.createElement('div'); relatedSection.classList.add('related-pages-section'); relatedSection.style.cssText = 'margin-top: 10px;'; fetch('https://www.kentarchaeology.org.uk/crm#crm') .then(response => response.text()) .then(text => { // Extract the CRM array data const crmData = text.trim().split('\n'); const matchingPages = new Set(); // Search through the CRM array for matching entities crmData.forEach(line => { const cells = line.split(','); const name = cells[0].trim(); const object = cells[2].trim(); // Check if the search value matches any name or object if (name.includes(searchValue) || object.includes(searchValue)) { matchingPages.add(cells[3].trim()); // Assume the URL is in the fourth cell } }); // Display related pages or no results message if (matchingPages.size === 0) { relatedSection.innerHTML = '<div>No results found</div>'; } else { matchingPages.forEach(pageUrl => { const pageLinkDiv = document.createElement('div'); pageLinkDiv.style.cssText = 'padding: 5px; margin: 5px;'; pageLinkDiv.innerHTML = `<a href="${pageUrl}" target="_blank">${pageUrl}</a>`; relatedSection.appendChild(pageLinkDiv); }); } sidebar.appendChild(relatedSection); }) .catch(error => { console.error('Failed to fetch related data:', error); relatedSection.innerHTML = '<div>No results found</div>'; sidebar.appendChild(relatedSection); }); } }); document.addEventListener('DOMContentLoaded', function () { // Function to extract the tag from the URL function getTagFromUrl() { const url = window.location.href; const tagIndex = url.indexOf('/tag/'); if (tagIndex !== -1) { const tagPart = url.substring(tagIndex + 5); // Get part after /tag/ const nextSlashIndex = tagPart.indexOf('/'); return nextSlashIndex !== -1 ? tagPart.substring(0, nextSlashIndex) : tagPart; } return null; } // Function to create and show a loading spinner function showLoadingSpinner() { const sidebar = document.querySelector('.sidebar'); if (sidebar) { const spinner = document.createElement('div'); spinner.classList.add('loading-spinner'); spinner.style.width = '50px'; spinner.style.height = '50px'; spinner.style.border = '5px solid #f3f3f3'; spinner.style.borderTop = '5px solid #12518D'; spinner.style.borderRadius = '50%'; spinner.style.animation = 'spin 1s linear infinite'; spinner.style.margin = '20px auto'; spinner.style.display = 'block'; sidebar.appendChild(spinner); // Add CSS for spinner animation const style = document.createElement('style'); style.innerHTML = ` @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } `; document.head.appendChild(style); } } // Function to remove the loading spinner function hideLoadingSpinner() { const spinner = document.querySelector('.loading-spinner'); if (spinner) { spinner.remove(); } } // Function to fetch tag data from https://www.kentarchaeology.org.uk/tags async function fetchTagData() { try { const response = await fetch('https://www.kentarchaeology.org.uk/tags'); const pageText = await response.text(); const parser = new DOMParser(); const pageHTML = parser.parseFromString(pageText, 'text/html'); // Find the #tags div and get its content const tagDiv = pageHTML.querySelector('#tags'); if (!tagDiv) { console.error('Tag data div not found on https://www.kentarchaeology.org.uk/tags!'); return null; } // Parse the comma-separated data const tagArray = tagDiv.textContent.trim().split('\n'); const headers = tagArray[0].split(',').map(h => h.trim()); const data = tagArray.slice(1).map(row => row.split(',').map(cell => cell.trim())); return { headers, data }; } catch (error) { console.error('Error fetching tag data:', error); return null; } } // Function to search the tag data for the given tag function searchTagInData(tag, tagData) { const results = []; if (!tagData) { console.error('No tag data available!'); return results; } // Find the row matching the tag (case-insensitive) const matchingRow = tagData.data.find(row => decodeURIComponent(row[0]).toLowerCase() === tag.toLowerCase()); if (!matchingRow) { console.log(`No matching data found for tag: ${tag}`); return results; } // Loop through the columns to find non-zero values for (let i = 1; i < matchingRow.length; i++) { const sectionName = tagData.headers[i]; const articlesCount = parseInt(matchingRow[i], 10); if (articlesCount > 0) { const url = `${window.location.origin}/${sectionName.toLowerCase()}/tag/${tag}`; // Only add result if the URL does not match the current page if (url !== window.location.href) { results.push({ name: sectionName, articlesCount, url }); } } } return results; } // Function to append results to the sidebar with varying font sizes and tooltips function appendToSidebar(results) { const sidebar = document.querySelector('.sidebar'); if (!sidebar) { console.error('Sidebar not found!'); return; } if (results.length > 0) { const title = document.createElement('p'); title.innerText = 'Also tagged in:'; title.style.paddingLeft = '15px'; sidebar.appendChild(title); const tagCloud = document.createElement('div'); tagCloud.classList.add('tag-cloud'); tagCloud.style.paddingLeft = '15px'; tagCloud.style.paddingBottom = '20vh'; tagCloud.style.display = 'flex'; tagCloud.style.flexWrap = 'wrap'; tagCloud.style.gap = '0.5em'; results.forEach(result => { const tagLink = document.createElement('a'); tagLink.innerText = result.name; tagLink.href = result.url; // Calculate font size, limited to a maximum of 3em const fontSize = Math.min(1 + result.articlesCount * 0.1, 3); tagLink.style.whiteSpace = 'nowrap'; // Prevent wrapping tagLink.style.fontSize = `${fontSize}em`; // Tooltip showing the exact number of posts tagLink.title = `${result.articlesCount} tagged items`; tagCloud.appendChild(tagLink); }); sidebar.appendChild(tagCloud); } else { console.log('No results to display.'); } } // Main function to execute the above steps async function main() { showLoadingSpinner(); const tag = getTagFromUrl(); console.log(`Tag extracted from URL: ${tag}`); const tagData = await fetchTagData(); console.log('Tag data fetched:', tagData); if (tag && tagData) { const results = searchTagInData(tag, tagData); console.log('Results to be displayed:', results); appendToSidebar(results); } hideLoadingSpinner(); } main(); }); //Sliding sidebar document.addEventListener('DOMContentLoaded', function() { var isSidebarStuckOpen = false; var isStuck = false; // Declare the variable properly to track the "stuck" state of the sidebar function toggleSidebarVisibility(isVisible, adjustPadding = false) { var sidebar = document.querySelector('.sidebar'); var content = document.querySelector('.content'); var icons = document.querySelectorAll('.map-icon, .tags-icon, .comment-icon-container, .search-icon, .link-icon, .timeline-icon, #restoreIcon'); var timelineIcon = document.querySelector('.timeline-icon'); // Specific selector for the timeline icon sidebar.style.left = isVisible ? '0' : '-50vw'; sidebar.style.backgroundColor = isVisible ? 'white' : ''; icons.forEach(icon => { icon.style.left = isVisible ? '10px' : '-60px'; // Adjust icons including cinema button }); // Specifically handle timeline icon visibility if (timelineIcon) { timelineIcon.style.display = isVisible ? 'block' : 'none'; // Adjust visibility based on sidebar state } if (adjustPadding) { content.style.paddingLeft = isVisible ? '35vw' : '0'; content.style.paddingRight = isSidebarStuckOpen ? '0' : ''; } setTimeout(() => { allowHover = true; }, 500); if (isVisible) { content.classList.add('sidebar-visible'); } else { content.classList.remove('sidebar-visible'); } if (isVisible && !isStuck && isSidebarStuckOpen) { isSidebarStuckOpen = true; } else { isSidebarStuckOpen = false; } } function initializeSidebar() { // Check if window width is less than 700 pixels if (window.innerWidth < 700) { return; // Exit the function early if the window is too small } var sidebar = document.querySelector('.sidebar'); var content = document.querySelector('.content'); var icons = document.querySelectorAll('.map-icon, .tags-icon, .comment-icon-container, .search-icon, .link-icon, .timeline-icon, #restoreIcon'); var allowHover = true; // Allows hover to affect visibility only when true // Define substrings to check in the URL var excludedPaths = ['/journal-/', '/books-/', '/papers-/', '/about/']; // Function to check if the current URL contains any of the excluded paths function isUrlExcluded(url) { return excludedPaths.some(excludedPath => url.includes(excludedPath)); } // Only run the sidebar logic if the URL does not contain any of the excluded paths if (!isUrlExcluded(window.location.href)) { var isOpenByDefault = true; // logic to determine if sidebar is open by default on this page var isStuck = isOpenByDefault; // Ensure sidebar is "stuck" open if not excluded toggleSidebarVisibility(isOpenByDefault, true); } icons.forEach(icon => { icon.addEventListener('click', function() { if (!isSidebarStuckOpen) toggleSidebarVisibility(true, true); }); icon.addEventListener('mouseenter', function() { if (allowHover && !isStuck) toggleSidebarVisibility(true); }); icon.addEventListener('mouseleave', function() { if (allowHover && !isStuck) toggleSidebarVisibility(false); }); }); var closeIcon = document.getElementById('close-icon'); if (closeIcon) { closeIcon.addEventListener('mouseenter', function() { if (allowHover && isSidebarStuckOpen) toggleSidebarVisibility(false); }); closeIcon.addEventListener('click', function() { isStuck = !isStuck; toggleSidebarVisibility(isStuck, true); }); } var openIcon = document.getElementById('open-icon'); if (openIcon) { openIcon.addEventListener('mouseenter', function() { if (allowHover && isSidebarStuckOpen) toggleSidebarVisibility(true); }); openIcon.addEventListener('click', function() { isStuck = !isStuck; toggleSidebarVisibility(isStuck, true); }); } } initializeSidebar(); }); document.addEventListener('DOMContentLoaded', function () { function injectCSS() { var style = document.createElement('style'); style.innerHTML = ` .sidebar { width: 100vw; height: 85vh; background-color: #ffffff; position: fixed; top: 10vh; left: 0; display: block; /* Sidebar is visible by default */ z-index: 1001; overflow-y: auto; /* Make sidebar scrollable */ transition: visibility 0.3s ease, opacity 0.3s ease; padding-bottom: 50vh; /* Add 50vh padding to the inside bottom */ } .sidebar.hidden { visibility: hidden; opacity: 0; } #toggle-icon { position: fixed; top: 20px; right: 25vw; width: 40px; height: 40px; cursor: pointer; z-index: 1002; display: block; /* Initially visible with the close icon */ } #toggle-icon.hidden { display: none; /* Hide toggle icon when sidebar is visible */ } .new-icons-container.hidden { display: none; /* Hide new container when sidebar is hidden */ } .center-tooltip { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 10px 20px; background-color: #333; color: #fff; border-radius: 5px; font-size: 16px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); z-index: 1003; display: none; /* Hidden by default */ display: flex; /* Use flexbox to align items */ align-items: center; /* Center align vertically */ gap: 10px; /* Add space between icon and text */ } .center-tooltip svg { fill: #fff; /* Color of the hand icon */ width: 24px; /* Width of the hand icon */ height: 24px; /* Height of the hand icon */ } `; document.head.appendChild(style); } // Create the toggle icon dynamically var toggleIcon = document.createElement('div'); toggleIcon.id = 'toggle-icon'; // Define the "close" and "info" icons var closeIconSvg = ` <svg width="36px" height="36px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M18 6L6 18M6 6l12 12" stroke="rgb(18, 81, 141)" stroke-width="4" stroke-linecap="square" stroke-linejoin="square"/> </svg> `; var infoIconSvg = ` <svg width="5vh" height="5vh" viewBox="0 0 51.463867 51.565079" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <defs id="defs2" /> <g id="layer1" transform="translate(-343.5825,-128.79629)"> <path style="fill:#1c4d85;stroke:none;stroke-width:0.264583" d="m 367.76707,128.90583 c -6.40917,0.84152 -11.94131,2.80986 -16.68052,7.42949 -2.16998,2.11527 -3.8833,4.6857 -5.17697,7.41485 -1.29616,2.73439 -2.15008,5.82244 -2.2876,8.85175 -0.18291,4.02926 0.24693,7.88782 1.75913,11.66822 4.34801,10.86965 15.88807,17.41733 27.41536,15.86455 12.18715,-1.6418 21.68941,-12.1605 22.22604,-24.41454 0.53664,-12.25686 -8.03739,-23.50864 -20.0131,-26.21833 -2.28757,-0.5176 -4.89823,-0.90377 -7.24234,-0.59599 m 3.01764,9.9457 c 1.63657,-0.23588 3.3015,0.32943 4.19734,1.78041 1.33129,2.15601 -0.13479,5.01924 -2.58793,5.40198 -1.60045,0.24966 -3.31045,-0.25559 -4.22781,-1.68022 -1.4025,-2.17824 0.11799,-5.14166 2.6184,-5.50217 m 4.32529,28.13449 c -0.14253,0.50585 -0.18548,1.35884 -0.55967,1.7453 -0.46613,0.48131 -1.53628,0.67283 -2.15621,0.90207 -2.54799,0.94201 -6.38593,1.42493 -8.13677,-1.23914 -0.68631,-1.04441 -0.63129,-2.23778 -0.52134,-3.42 0.26263,-2.8228 1.49956,-5.4921 2.09877,-8.24822 0.23366,-1.07458 0.72272,-2.46813 0.17673,-3.52018 -0.84021,-1.61916 -3.21299,-0.71468 -4.4809,-0.30216 0.10562,-0.5122 0.14555,-1.3506 0.48826,-1.7604 0.44771,-0.53533 1.59321,-0.69878 2.22762,-0.9245 2.42216,-0.86194 6.10499,-1.471 7.88268,0.975 0.76317,1.05014 0.73057,2.19755 0.67123,3.41989 -0.12805,2.63259 -1.23009,5.32162 -1.94427,7.84587 -0.35256,1.24619 -1.19146,3.67157 0.0478,4.66236 1.18362,0.94623 2.95085,0.1545 4.20609,-0.13589 z" id="path1387" /> </g> </svg> `; // Set the initial icon to "close" toggleIcon.innerHTML = closeIconSvg; document.body.appendChild(toggleIcon); function updateToggleIcon() { var sidebar = document.querySelector('.sidebar'); // Ensure only one icon is visible at a time if (sidebar.classList.contains('hidden')) { // Sidebar is hidden, show "info" icon toggleIcon.innerHTML = infoIconSvg; } else { // Sidebar is visible, show "close" icon toggleIcon.innerHTML = closeIconSvg; } } function initializeSidebar() { injectCSS(); // Add click event listener to toggle sidebar visibility toggleIcon.addEventListener('click', function () { var sidebar = document.querySelector('.sidebar'); var newIconsContainer = document.querySelector('.new-icons-container'); var elementsToToggle = document.querySelectorAll('.map-icon, .tags-icon, .cinema-mode-button, .search-icon, .link-icon, .timeline-icon, #restoreIcon, .comment-icon-container, .custom-arrow-left, .pdf-icon, .toggle-icon, .license-svg, #speechIconContainer, .translate-icon'); if (sidebar.classList.contains('hidden')) { sidebar.classList.remove('hidden'); sidebar.scrollTop = 0; // Scroll to the top when sidebar is opened elementsToToggle.forEach(function(element) { element.classList.remove('hidden'); }); if (newIconsContainer) newIconsContainer.classList.remove('hidden'); } else { sidebar.classList.add('hidden'); elementsToToggle.forEach(function(element) { element.classList.add('hidden'); }); if (newIconsContainer) newIconsContainer.classList.add('hidden'); // Show tooltip in the center when the sidebar is hidden showCenterTooltip(); } // Update the icon based on the sidebar state updateToggleIcon(); }); } // Function to create and display the center tooltip function showCenterTooltip() { // Get the current URL var currentUrl = window.location.href; // Remove the protocol part (e.g., 'http://', 'https://') var urlWithoutProtocol = currentUrl.replace(/^[a-zA-Z]+:\/\//, ''); // Check if there are two or more forward slashes in the URL (excluding the protocol) if ((urlWithoutProtocol.match(/\//g) || []).length >= 2) { return; // If two or more slashes are found, do not show the tooltip } // Remove any existing center tooltip first to avoid duplicates var existingTooltip = document.getElementById('center-tooltip'); if (existingTooltip) { existingTooltip.remove(); } // Create a new tooltip element var tooltip = document.createElement('div'); tooltip.id = 'center-tooltip'; tooltip.className = 'center-tooltip'; // Use the CSS class defined for styling // Create the hand icon SVG var handIconSvg = ` <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M12 0C11.4477 0 11 0.447715 11 1V10H9.41421L5.70711 6.29289C5.31658 5.90237 4.68342 5.90237 4.29289 6.29289C3.90237 6.68342 3.90237 7.31658 4.29289 7.70711L8 11.4142V13H3C1.34315 13 0 14.3431 0 16V20C0 21.6569 1.34315 23 3 23H10.1213C11.2081 23 12.2529 22.5536 13 21.7574L20.4142 14.3431C21.1953 13.562 21.1953 12.438 20.4142 11.6569L16.6569 7.89949C15.8758 7.11837 14.7518 7.11837 13.9706 7.89949L13 8.87005V1C13 0.447715 12.5523 0 12 0Z" /> </svg> `; // Add the hand icon and text to the tooltip tooltip.innerHTML = handIconSvg + '<br><span style="white-space: nowrap;">Swipe and select</span>'; document.body.appendChild(tooltip); // Display the tooltip tooltip.style.display = 'flex'; // Remove the tooltip after a few seconds setTimeout(function() { tooltip.style.display = 'none'; }, 3000); // Tooltip will disappear after 3 seconds } function showTooltip() { // Check if the screen width is greater than 750 pixels if (window.innerWidth < 750) { // Remove any existing tooltip first to avoid duplicates var existingTooltip = document.getElementById('close-tooltip'); if (existingTooltip) { existingTooltip.remove(); } // Create a new tooltip element var tooltip = document.createElement('div'); tooltip.id = 'close-tooltip'; tooltip.textContent = 'Close Info'; tooltip.style.position = 'absolute'; tooltip.style.top = '60px'; // Adjust this value to position the tooltip correctly tooltip.style.right = '30vw'; // Adjust this value to position the tooltip correctly tooltip.style.padding = '5px 10px'; tooltip.style.backgroundColor = '#333'; tooltip.style.color = '#fff'; tooltip.style.borderRadius = '5px'; tooltip.style.fontSize = '12px'; tooltip.style.boxShadow = '0 2px 4px rgba(0, 0, 0, 0.2)'; tooltip.style.zIndex = '1003'; // Add a small arrow to point to the close icon tooltip.style.before = ` content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%); border-width: 5px; border-style: solid; border-color: transparent transparent #333 transparent; `; document.body.appendChild(tooltip); // Remove the tooltip after a few seconds setTimeout(function() { tooltip.remove(); }, 3000); // Tooltip will disappear after 3 seconds } } var sidebar = document.querySelector('.sidebar'); sidebar.addEventListener('scroll', function () { if (sidebar.scrollTop + sidebar.clientHeight >= sidebar.scrollHeight) { showTooltip(); } }); function checkScreenWidth() { var sidebar = document.querySelector('.sidebar'); if (window.innerWidth <= 700) { initializeSidebar(); toggleIcon.style.display = 'block'; if (window.location.href.includes('?offset=')) { if (sidebar) { sidebar.classList.add('hidden'); } var elementsToHide = document.querySelectorAll('.map-icon, .tags-icon, .cinema-mode-button, .search-icon, .link-icon, .timeline-icon, #restoreIcon, .comment-icon-container, .pdf-icon, .toggle-icon, .license-svg, #speechIconContainer, .translate-icon'); elementsToHide.forEach(function(element) { element.classList.add('hidden'); }); toggleIcon.classList.remove('hidden'); // Ensure toggle icon is visible var newIconsContainer = document.querySelector('.new-icons-container'); if (newIconsContainer) newIconsContainer.classList.add('hidden'); } } else { toggleIcon.style.display = 'none'; if (sidebar) { sidebar.classList.remove('hidden'); } var elementsToShow = document.querySelectorAll('.map-icon, .tags-icon, .cinema-mode-button, .search-icon, .link-icon, .timeline-icon, #restoreIcon, .comment-icon-container, .pdf-icon, .toggle-icon, .license-svg, #speechIconContainer, .translate-icon'); elementsToShow.forEach(function(element) { element.classList.remove('hidden'); }); var newIconsContainer = document.querySelector('.new-icons-container'); if (newIconsContainer) newIconsContainer.classList.remove('hidden'); } updateToggleIcon(); } checkScreenWidth(); window.addEventListener('resize', checkScreenWidth); }); // Function to update the toggle icon based on the sidebar state function updateToggleIcon() { var sidebar = document.querySelector('.sidebar'); var toggleIcon = document.getElementById('toggle-icon'); // Ensure only one icon is visible at a time if (sidebar.classList.contains('hidden')) { // Sidebar is hidden, show "info" icon toggleIcon.innerHTML = ` <svg width="5vh" height="5vh" viewBox="0 0 51.463867 51.565079" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <defs id="defs2" /> <g id="layer1" transform="translate(-343.5825,-128.79629)"> <path style="fill:#1c4d85;stroke:none;stroke-width:0.264583" d="m 367.76707,128.90583 c -6.40917,0.84152 -11.94131,2.80986 -16.68052,7.42949 -2.16998,2.11527 -3.8833,4.6857 -5.17697,7.41485 -1.29616,2.73439 -2.15008,5.82244 -2.2876,8.85175 -0.18291,4.02926 0.24693,7.88782 1.75913,11.66822 4.34801,10.86965 15.88807,17.41733 27.41536,15.86455 12.18715,-1.6418 21.68941,-12.1605 22.22604,-24.41454 0.53664,-12.25686 -8.03739,-23.50864 -20.0131,-26.21833 -2.28757,-0.5176 -4.89823,-0.90377 -7.24234,-0.59599 m 3.01764,9.9457 c 1.63657,-0.23588 3.3015,0.32943 4.19734,1.78041 1.33129,2.15601 -0.13479,5.01924 -2.58793,5.40198 -1.60045,0.24966 -3.31045,-0.25559 -4.22781,-1.68022 -1.4025,-2.17824 0.11799,-5.14166 2.6184,-5.50217 m 4.32529,28.13449 c -0.14253,0.50585 -0.18548,1.35884 -0.55967,1.7453 -0.46613,0.48131 -1.53628,0.67283 -2.15621,0.90207 -2.54799,0.94201 -6.38593,1.42493 -8.13677,-1.23914 -0.68631,-1.04441 -0.63129,-2.23778 -0.52134,-3.42 0.26263,-2.8228 1.49956,-5.4921 2.09877,-8.24822 0.23366,-1.07458 0.72272,-2.46813 0.17673,-3.52018 -0.84021,-1.61916 -3.21299,-0.71468 -4.4809,-0.30216 0.10562,-0.5122 0.14555,-1.3506 0.48826,-1.7604 0.44771,-0.53533 1.59321,-0.69878 2.22762,-0.9245 2.42216,-0.86194 6.10499,-1.471 7.88268,0.975 0.76317,1.05014 0.73057,2.19755 0.67123,3.41989 -0.12805,2.63259 -1.23009,5.32162 -1.94427,7.84587 -0.35256,1.24619 -1.19146,3.67157 0.0478,4.66236 1.18362,0.94623 2.95085,0.1545 4.20609,-0.13589 z" id="path1387" /> </g> </svg> `; } else { // Sidebar is visible, show "close" icon toggleIcon.innerHTML = ` <svg width="5vh" height="5vh" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M18 6L6 18M6 6l12 12" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> `; } } // Set up a MutationObserver to monitor changes to the sidebar's class attribute var sidebar = document.querySelector('.sidebar'); var observer = new MutationObserver(function (mutationsList) { mutationsList.forEach(function (mutation) { if (mutation.type === 'attributes' && mutation.attributeName === 'class') { updateToggleIcon(); } }); }); // Start observing the sidebar for attribute changes observer.observe(sidebar, { attributes: true }); </script> <script> document.addEventListener("DOMContentLoaded", function() { const baseUrls = [ 'https://www.kentarchaeology.org.uk/books', 'https://www.kentarchaeology.org.uk/papers', 'https://www.kentarchaeology.org.uk/journal-latest', 'https://www.kentarchaeology.org.uk/magazine-latest', 'https://www.kentarchaeology.org.uk/journal', 'https://www.kentarchaeology.org.uk/magazine', 'https://www.kentarchaeology.org.uk/audio', 'https://www.kentarchaeology.org.uk/magazine', 'https://www.kentarchaeology.org.uk/notes', 'https://www.kentarchaeology.org.uk/records', 'https://www.kentarchaeology.org.uk/images', 'https://www.kentarchaeology.org.uk/maps', 'https://www.kentarchaeology.org.uk/models', 'https://www.kentarchaeology.org.uk/videos' ]; const additionalPatterns = [ '/books/category/', '/books/browse/', '/books/tag/', '/journal/category/', '/journal/browse/', '/journal/tag/', '/papers/category/', '/papers/browse/', '/papers/tag/', '/audio/category/', '/audio/browse/', '/audio/tag/', '/magazine/category/', '/magazine/browse/', '/magazine/tag/', '/reports/category/', '/reports/browse/', '/reports/tag/', '/records/category/', '/records/browse/', '/records/tag/', '/notes/category/', '/notes/browse/', '/notes/tag/', '/images/category/', '/images/browse/', '/images/tag/', '/maps/category/', '/maps/browse/', '/maps/tag/', '/models/category/', '/models/browse/', '/models/tag/', '/videos/category/', '/videos/browse/', '/videos/tag/' ]; const currentPageUrl = window.location.href; const isUrlAllowed = baseUrls.some(url => currentPageUrl.startsWith(url)) || additionalPatterns.some(pattern => currentPageUrl.includes(pattern)); if (!isUrlAllowed) { return; } if (window.innerWidth <= 700) { return; } function addDynamicStyles() { const style = document.createElement('style'); document.head.appendChild(style); style.textContent = ` body, html { height: 100vh; margin: 0; overflow-x: hidden; scroll-snap-type: y mandatory; } h1 {font-size: 2em} .image-wrapper { height: 100vh; scroll-snap-align: center; overflow: hidden; position: relative; box-shadow: 0 0 40px 10px rgba(0, 0, 0, 0.5); cursor: pointer; /* Makes the thumbnail look clickable */ } .image-text-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0, 0, 0, 0.3); display: flex; align-items: center; justify-content: center; z-index: 2; } .text-content { text-align: center; color: white; padding: 20px; max-width: 80%; } .text-content h1 { color: white !important; } .image-wrapper img { position: absolute; top: 0; left: 0; height: 100vh; object-fit: cover; transition: opacity 0.5s; z-index: 1; } @media (max-width: 768px) { .text-content { font-size: 14px; } } @media (min-width: 769px) { .text-content { font-size: 20px; } } `; } function addTextOverlay() { document.querySelectorAll('.blog-single-column--container').forEach(container => { const imageWrapper = container.querySelector('.image-wrapper'); const titleElement = container.querySelector('h1 a'); // Get the <a> inside the title const dateElement = container.querySelector('.blog-date'); const moreLinkElement = container.querySelector('.blog-more-link'); const categoryElements = container.querySelectorAll('.blog-categories'); const excerptElement = container.querySelector('.blog-excerpt-wrapper p'); // Get the excerpt text // Extract the URL from the title's <a> element const titleLink = titleElement ? titleElement.href : null; // Check if the URL is from kentarchaeology.org.uk if (titleLink && titleLink.includes('https://www.kentarchaeology.org.uk/')) { // Make the entire image-wrapper clickable imageWrapper.style.cursor = 'pointer'; imageWrapper.addEventListener('click', function(event) { event.preventDefault(); // Prevent default click behavior window.location.href = titleLink; // Redirect to the title's href }); } // Create the overlay div const overlay = document.createElement('div'); overlay.className = 'image-text-overlay'; // Create a div for text content const textContent = document.createElement('div'); textContent.className = 'text-content'; textContent.innerHTML = ` <h1>${titleElement.innerText}</h1> <p>${dateElement.innerText}</p> <p>${Array.from(categoryElements).map(link => link.outerHTML).join(' ')} ${moreLinkElement ? moreLinkElement.outerHTML : ''}</p> <p>${excerptElement ? excerptElement.innerText : ''}</p> <!-- Include the excerpt if it exists --> `; overlay.appendChild(textContent); imageWrapper.appendChild(overlay); const imageUrl = imageWrapper.querySelector('img').src; imageWrapper.style.background = `linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('${imageUrl}') center/cover no-repeat`; titleElement.remove(); dateElement.remove(); moreLinkElement.remove(); categoryElements.forEach(el => el.remove()); }); } addDynamicStyles(); addTextOverlay(); }); </script><script> //Hide sidebar on blog pages // This function simulates a click on an element with the title "Hide sidebar" function clickHideSidebar() { const hideSidebarButton = document.querySelector('[title="Hide sidebar"]'); if (hideSidebarButton) { hideSidebarButton.click(); console.log('Clicked "Hide sidebar" button.'); } else { console.log('No button with title "Hide sidebar" found.'); } } // This function attempts to click the sidebar multiple times with delay if not immediately found function tryClickHideSidebar(attempts) { setTimeout(() => { const hideSidebarButton = document.querySelector('[title="Hide sidebar"]'); if (hideSidebarButton) { hideSidebarButton.click(); console.log('Clicked "Hide sidebar" button after delay.'); } else if (attempts > 0) { console.log(`Button not found, retrying... (${attempts} attempts left)`); tryClickHideSidebar(attempts - 1); } else { console.log('Failed to find the button after several attempts.'); } }, 1000); // Wait for 1 second before trying again } // Array of parts of URLs on which the script should run const targetUrlParts = [ '/p/', '/search' ]; // Array of parts of URLs on which the script should not run const excludeUrlParts = [ '/tag/', '/category/', '?offset=' ]; // Check if current URL contains any of the parts from targetUrlParts and none of the parts from excludeUrlParts if (targetUrlParts.some(part => window.location.href.includes(part)) && !excludeUrlParts.some(part => window.location.href.includes(part))) { tryClickHideSidebar(5); // Start the attempt process with 5 retries } </script><script> function appendCalendar() { const calendarBlock = document.querySelector('.calendar-block'); const sidebar = document.querySelector('.sidebar'); if (calendarBlock && sidebar) { console.log('Both elements found:', calendarBlock, sidebar); sidebar.appendChild(calendarBlock); // Appends the calendar to the sidebar } else { console.error('One or both elements not found'); } } document.addEventListener('DOMContentLoaded', appendCalendar); // Ensures the script runs after the document is fully loaded </script> <script> function modifySidebar() { // Check if the screen width is less than 700 pixels if (window.innerWidth < 700) { // Select all divs inside the element with the class 'sidebar' const sidebarDivs = document.querySelectorAll('.sidebar > div'); // Loop through each div and add 5vw padding to the left and right sidebarDivs.forEach(div => { div.style.paddingLeft = '5vw'; div.style.paddingRight = '5vw'; div.style.boxSizing = 'border-box'; // Include padding in the width calculation }); // Create a new div element const newDiv = document.createElement('div'); newDiv.style.height = '30vh'; // Directly setting the height style newDiv.style.marginTop = '10px'; // Setting margin top newDiv.style.textAlign = 'center'; // Setting text alignment newDiv.style.lineHeight = '30vh'; // Setting line height to center text vertically // Append the new div to the sidebar const sidebar = document.querySelector('.sidebar'); sidebar.appendChild(newDiv); } } // Run the function when the document is loaded window.onload = modifySidebar; document.addEventListener('DOMContentLoaded', function () { function injectCSS() { var style = document.createElement('style'); style.innerHTML = ` .sidebar { width: 100vw; height: 85vh; background-color: #ffffff; position: fixed; top: 10vh; left: 0; display: block; /* Sidebar is visible by default */ z-index: 1001; overflow-y: auto; /* Make sidebar scrollable */ transition: visibility 0.3s ease, opacity 0.3s ease; padding-bottom: 50vh; /* Add 50vh padding to the inside bottom */ } .sidebar.hidden { visibility: hidden; opacity: 0; } #toggle-icon { position: fixed; top: 20px; right: 25vw; width: 40px; height: 40px; cursor: pointer; z-index: 1002; display: block; /* Initially visible with the close icon */ } #toggle-icon.hidden { display: none; /* Hide toggle icon when sidebar is visible */ } .new-icons-container.hidden { display: none; /* Hide new container when sidebar is hidden */ } /* Media query to hide the close button on screens wider than 750px */ @media (min-width: 750px) { #toggle-icon { display: none; } } `; document.head.appendChild(style); } // Create the toggle icon dynamically var toggleIcon = document.createElement('div'); toggleIcon.id = 'toggle-icon'; // Set the initial icon to the "close" icon because the sidebar is visible by default var closeIconSvg = ` <svg width="5vh" height="5vh" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M18 6L6 18M6 6l12 12" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </svg> `; toggleIcon.innerHTML = closeIconSvg; // Set the initial icon document.body.appendChild(toggleIcon); function initializeSidebar() { injectCSS(); // Add click event listener to toggle sidebar visibility toggleIcon.addEventListener('click', function () { var sidebar = document.querySelector('.sidebar'); var newIconsContainer = document.querySelector('.new-icons-container'); var elementsToToggle = document.querySelectorAll('.map-icon, .tags-icon, .cinema-mode-button, .search-icon, .link-icon, .timeline-icon, #restoreIcon, .comment-icon-container, .pdf-icon, .toggle-icon, .license-svg, #speechIconContainer, .translate-icon'); // Define the "info" SVG icon var infoIconSvg = ` <svg width="5vh" height="5vh" viewBox="0 0 51.463867 51.565079" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <defs id="defs2" /> <g id="layer1" transform="translate(-343.5825,-128.79629)"> <path style="fill:#1c4d85;stroke:none;stroke-width:0.264583" d="m 367.76707,128.90583 c -6.40917,0.84152 -11.94131,2.80986 -16.68052,7.42949 -2.16998,2.11527 -3.8833,4.6857 -5.17697,7.41485 -1.29616,2.73439 -2.15008,5.82244 -2.2876,8.85175 -0.18291,4.02926 0.24693,7.88782 1.75913,11.66822 4.34801,10.86965 15.88807,17.41733 27.41536,15.86455 12.18715,-1.6418 21.68941,-12.1605 22.22604,-24.41454 0.53664,-12.25686 -8.03739,-23.50864 -20.0131,-26.21833 -2.28757,-0.5176 -4.89823,-0.90377 -7.24234,-0.59599 m 3.01764,9.9457 c 1.63657,-0.23588 3.3015,0.32943 4.19734,1.78041 1.33129,2.15601 -0.13479,5.01924 -2.58793,5.40198 -1.60045,0.24966 -3.31045,-0.25559 -4.22781,-1.68022 -1.4025,-2.17824 0.11799,-5.14166 2.6184,-5.50217 m 4.32529,28.13449 c -0.14253,0.50585 -0.18548,1.35884 -0.55967,1.7453 -0.46613,0.48131 -1.53628,0.67283 -2.15621,0.90207 -2.54799,0.94201 -6.38593,1.42493 -8.13677,-1.23914 -0.68631,-1.04441 -0.63129,-2.23778 -0.52134,-3.42 0.26263,-2.8228 1.49956,-5.4921 2.09877,-8.24822 0.23366,-1.07458 0.72272,-2.46813 0.17673,-3.52018 -0.84021,-1.61916 -3.21299,-0.71468 -4.4809,-0.30216 0.10562,-0.5122 0.14555,-1.3506 0.48826,-1.7604 0.44771,-0.53533 1.59321,-0.69878 2.22762,-0.9245 2.42216,-0.86194 6.10499,-1.471 7.88268,0.975 0.76317,1.05014 0.73057,2.19755 0.67123,3.41989 -0.12805,2.63259 -1.23009,5.32162 -1.94427,7.84587 -0.35256,1.24619 -1.19146,3.67157 0.0478,4.66236 1.18362,0.94623 2.95085,0.1545 4.20609,-0.13589 z" id="path1387" /> </g> </svg> `; if (sidebar.classList.contains('hidden')) { sidebar.classList.remove('hidden'); sidebar.scrollTop = 0; // Scroll to the top when sidebar is opened toggleIcon.classList.add('hidden'); elementsToToggle.forEach(function(element) { element.classList.remove('hidden'); }); if (newIconsContainer) newIconsContainer.classList.remove('hidden'); // Change info icon to close icon toggleIcon.innerHTML = closeIconSvg; } else { sidebar.classList.add('hidden'); toggleIcon.classList.remove('hidden'); elementsToToggle.forEach(function(element) { element.classList.add('hidden'); }); if (newIconsContainer) newIconsContainer.classList.add('hidden'); // Restore original info icon toggleIcon.innerHTML = infoIconSvg; } }); // Add resize event listener to show/hide close button based on window width window.addEventListener('resize', function () { if (window.innerWidth > 750) { toggleIcon.style.display = 'none'; // Hide close button on wider screens } else { toggleIcon.style.display = 'block'; // Show close button on smaller screens } }); // Initial check for window width if (window.innerWidth > 750) { toggleIcon.style.display = 'none'; // Hide close button initially if screen is wide } } initializeSidebar(); }); function checkScreenWidth() { var sidebar = document.querySelector('.sidebar'); if (window.innerWidth <= 700) { initializeSidebar(); toggleIcon.style.display = 'block'; if (window.location.href.includes('?offset=')) { if (sidebar) { sidebar.classList.add('hidden'); } var elementsToHide = document.querySelectorAll('.map-icon, .tags-icon, .cinema-mode-button, .search-icon, .link-icon, .timeline-icon, #restoreIcon, .pdf-icon, .toggle-icon, .license-svg, #speechIconContainer, .comment-icon-container, .translate-icon'); elementsToHide.forEach(function(element) { element.classList.add('hidden'); }); toggleIcon.classList.remove('hidden'); // Ensure toggle icon is visible var newIconsContainer = document.querySelector('.new-icons-container'); if (newIconsContainer) newIconsContainer.classList.add('hidden'); } } else { toggleIcon.style.display = 'none'; if (sidebar) { sidebar.classList.remove('hidden'); } // Ensure additional elements are visible on larger screens var elementsToShow = document.querySelectorAll('.map-icon, .tags-icon, .cinema-mode-button, .search-icon, .link-icon, .timeline-icon, #restoreIcon, .comment-icon-container, .pdf-icon, .toggle-icon, .license-svg, #speechIconContainer, .translate-icon'); elementsToShow.forEach(function(element) { element.classList.remove('hidden'); }); var newIconsContainer = document.querySelector('.new-icons-container'); if (newIconsContainer) newIconsContainer.classList.remove('hidden'); } } // Initial check checkScreenWidth(); // Check screen width on resize window.addEventListener('resize', checkScreenWidth); }); //Set the sidebar and header dimensions on index pages document.addEventListener('DOMContentLoaded', function() { var allowedUrls = [ "https://www.kentarchaeology.org.uk/news", "https://www.kentarchaeology.org.uk/", "https://www.kentarchaeology.org.uk/events", "https://www.kentarchaeology.org.uk/exhibitions", "https://www.kentarchaeology.org.uk/books", "https://www.kentarchaeology.org.uk/papers", "https://www.kentarchaeology.org.uk/contact", "https://www.kentarchaeology.org.uk/journal-latest", "https://www.kentarchaeology.org.uk/magazine-latest", "https://www.kentarchaeology.org.uk/journal", "https://www.kentarchaeology.org.uk/notes", "https://www.kentarchaeology.org.uk/records", "https://www.kentarchaeology.org.uk/magazine", "https://www.kentarchaeology.org.uk/reports", "https://www.kentarchaeology.org.uk/people", "https://www.kentarchaeology.org.uk/search", "https://www.kentarchaeology.org.uk/join", "https://www.kentarchaeology.org.uk/support", "https://www.kentarchaeology.org.uk/audio", "https://www.kentarchaeology.org.uk/images", "https://www.kentarchaeology.org.uk/maps", "https://www.kentarchaeology.org.uk/models", "https://www.kentarchaeology.org.uk/videos", "https://www.kentarchaeology.org.uk/about", "https://www.kentarchaeology.org.uk/collections", "https://www.kentarchaeology.org.uk/library", "https://www.kentarchaeology.org.uk/grants", "https://www.kentarchaeology.org.uk/affiliates", "https://www.kentarchaeology.org.uk/groups", "https://www.kentarchaeology.org.uk/shop", "https://www.kentarchaeology.org.uk/stores", "https://www.kentarchaeology.org.uk/documents" ]; var currentUrl = window.location.href; var scrollbarWidth = 17; // typical scrollbar width in pixels if (window.innerWidth > 700 && (allowedUrls.includes(currentUrl) || currentUrl.includes('/tag/') || currentUrl.includes('/category/') || currentUrl.includes('?offset='))) { var sidebar = document.querySelector('.sidebar'); if (sidebar) { sidebar.style.top = '14vh'; sidebar.style.height = '86vh'; } } }); </script> <script id="Text-to-speech icon"> document.addEventListener('DOMContentLoaded', () => { // Check if the script should run based on the URL if (!shouldRunScript()) return; // Function to check if the URL contains four forward slashes and excludes specific keywords function shouldRunScript() { const url = window.location.href; const excludedKeywords = ['/tag/', '/category/', '/shop/', '/join/', '/models/', '/maps/', '/images/', '/videos/', '/audio/']; // Check if the URL contains any excluded keywords for (const keyword of excludedKeywords) { if (url.includes(keyword)) { return false; } } // Check if the URL has 4 or more slashes return (url.split('/').length - 1) >= 4; } // Function to dynamically create and insert the speech icon function insertSpeechIcon() { const svgIcon = document.createElement('div'); svgIcon.id = 'speechIconContainer'; svgIcon.style.position = 'fixed'; svgIcon.style.right = '22px'; svgIcon.style.top = '41.5vh'; // Move 35px higher in total svgIcon.style.transform = 'translateY(-50%)'; svgIcon.style.zIndex = '1000'; svgIcon.style.cursor = 'pointer'; svgIcon.style.transition = 'transform 0.2s'; // Smooth transition for hover effect svgIcon.title = 'Read article'; // Initial tooltip svgIcon.innerHTML = getInitialAudioIcon(); // Set to initial audio icon svgIcon.onmouseover = () => svgIcon.style.transform = 'translateY(-50%) scale(1.1)'; // Grow by 10% on hover svgIcon.onmouseout = () => svgIcon.style.transform = 'translateY(-50%) scale(1)'; // Revert to original size when not hovered svgIcon.onclick = toggleSpeech; // Attach the function to handle click events document.body.appendChild(svgIcon); // Insert the icon into the body } // Function to get the Initial Audio Icon SVG function getInitialAudioIcon() { return ` <svg width="33" height="33" viewBox="0 0 46.150383 49.167503" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <defs id="defs2" /> <g id="layer1" transform="translate(-71.596552,-81.3328)"> <path style="fill:rgb(18, 81, 141);stroke-width:0.0683657" d="m 95.151347,130.40061 c -0.194989,-0.0698 -0.47187,-0.20657 -0.615292,-0.30388 -0.143421,-0.0973 -3.674653,-3.13248 -7.847181,-6.7448 l -7.586415,-6.56787 1.273243,-0.0183 -7.180578,-0.0183 -0.341828,-0.1812 c -0.435247,-0.23072 -0.818672,-0.61414 -1.049387,-1.04939 l -0.181196,-0.34183 -0.01805,-9.24132 c -0.01796,-9.197121 -0.01738,-9.243131 0.123315,-9.619171 0.197069,-0.52671 0.643655,-1.000742 1.173145,-1.24523 l 0.430737,-0.19889 7.257672,-0.0342 -1.196149,-0.0342 7.466814,-6.46056 c 4.106747,-3.5533 7.590707,-6.54526 7.742133,-6.64879 1.054881,-0.7212 2.58427,-0.31847 3.232213,0.85114 l 0.200864,0.36258 v 23.005061 23.00506 l -0.181887,0.34457 c -0.220936,0.41855 -0.712266,0.88491 -1.124315,1.06718 -0.446839,0.19766 -1.139227,0.22939 -1.577854,0.0723 z m 14.266943,-6.06941 c -0.639,-0.20326 -1.26833,-0.85402 -1.44594,-1.49516 -0.0997,-0.3597 -0.0981,-0.95289 0.003,-1.31998 0.0442,-0.15974 0.24773,-0.52891 0.45229,-0.82038 2.67523,-3.81177 4.17522,-7.75591 4.64756,-12.22049 0.11763,-1.11188 0.13442,-3.60537 0.032,-4.75141 -0.38592,-4.317751 -2.02426,-8.783621 -4.4759,-12.200701 -0.49478,-0.68962 -0.64492,-0.99218 -0.71939,-1.44973 -0.20643,-1.26836 0.72421,-2.45835 2.02926,-2.59475 0.49416,-0.0517 1.00349,0.0796 1.47744,0.38077 0.8749,0.55591 3.14104,4.39288 4.24173,7.18196 3.04834,7.724341 2.74636,16.281031 -0.83838,23.755581 -0.89762,1.87162 -2.57913,4.54958 -3.19973,5.09586 -0.57122,0.5028 -1.4516,0.6779 -2.2044,0.43843 z m -6.23233,-6.41221 c -1.0448,-0.22872 -1.76645,-1.1418 -1.76645,-2.23503 0,-0.51269 0.11682,-0.82222 0.62603,-1.65879 1.01294,-1.66414 1.70969,-3.54033 2.07376,-5.58416 0.15449,-0.86727 0.21505,-3.16285 0.10827,-4.10442 -0.2461,-2.1703 -0.91268,-4.24726 -1.91949,-5.980811 -0.90333,-1.55538 -0.85443,-1.43215 -0.85406,-2.15223 2.7e-4,-0.57022 0.0224,-0.69119 0.18119,-0.9913 0.2303,-0.43525 0.61381,-0.81876 1.04906,-1.04906 0.30031,-0.1589 0.42072,-0.18087 0.9913,-0.18087 0.57022,0 0.69119,0.022 0.99131,0.1806 0.50124,0.26482 0.79055,0.58121 1.2856,1.40597 1.48429,2.47281 2.37845,5.042781 2.75802,7.926991 0.14153,1.07552 0.16047,3.70309 0.0339,4.70585 -0.13018,1.03141 -0.45261,2.57432 -0.72928,3.48977 -0.58189,1.92533 -1.61636,4.12281 -2.53467,5.38425 -0.50782,0.69759 -1.42319,1.03399 -2.29451,0.84324 z" id="path270" /> </g> </svg> `; } // Function to get the modified Play Icon SVG with rounded edges function getPlayIcon() { return ` <svg width="40" height="40" viewBox="0 0 24 24" fill="rgb(18, 81, 141)" xmlns="http://www.w3.org/2000/svg" title="Play"> <path d="M7,4 C6.5,4 6,4.5 6,5 L6,19 C6,19.5 6.5,20 7,20 C7.2,20 7.5,19.9 7.7,19.7 L17.3,13.7 C17.7,13.4 17.7,12.6 17.3,12.3 L7.7,4.3 C7.5,4.1 7.2,4 7,4 Z" style="stroke-linejoin:round; stroke-linecap:round;"/> </svg> `; } // Function to get the modified Pause Icon SVG with rounded edges function getPauseIcon() { return ` <svg width="40" height="40" viewBox="0 0 24 24" fill="rgb(18, 81, 141)" xmlns="http://www.w3.org/2000/svg" title="Pause"> <rect x="5" y="4" width="4" height="16" rx="1.5" ry="1.5"></rect> <rect x="15" y="4" width="4" height="16" rx="1.5" ry="1.5"></rect> </svg> `; } let isPaused = false; // Track whether reading is paused or active let utterance; // SpeechSynthesisUtterance instance let currentSentenceIndex = 0; // Track the current sentence being spoken let sentences = []; // Array to store sentences to be spoken let isSpeaking = false; // Track if speech is currently active // Function to read text within the main content areas, skipping unwanted sections function speakContentText() { const synth = window.speechSynthesis; // Extract text from the main content, excluding elements like 'header', 'footer', 'nav', and 'sidebar' divs const contentAreas = document.querySelectorAll('body *:not(header):not(footer):not(nav):not(.sidebar):not(script):not(style)'); let bodyText = ''; contentAreas.forEach(node => { bodyText += extractTextFromNode(node) + ' '; }); // Split the extracted text into sentences sentences = bodyText.split(/([.!?]\s+)/).filter(Boolean); if (sentences.length === 0) { console.error('No sentences found to read.'); return; } isSpeaking = true; // Set speaking flag currentSentenceIndex = 0; // Reset the sentence index speakNextSentence(); // Start speaking } // Function to extract text recursively from a node and its children function extractTextFromNode(node) { let text = ''; node.childNodes.forEach(child => { if (child.nodeType === Node.TEXT_NODE) { text += child.textContent.trim() + ' '; } else if (child.nodeType === Node.ELEMENT_NODE && !['img', 'script', 'style', 'nav', 'header', 'footer'].includes(child.tagName.toLowerCase())) { text += extractTextFromNode(child); // Recursively extract text from child elements } }); return text.trim(); } // Function to highlight and scroll to the current sentence function highlightCurrentSentence() { const paragraphs = document.querySelectorAll('p.preFade.fadeIn'); let textFound = false; for (const p of paragraphs) { const nodeText = p.innerHTML; const currentSentence = sentences[currentSentenceIndex]; if (!nodeText.includes(currentSentence)) { continue; } textFound = true; const highlightedHTML = nodeText.replace( currentSentence, `<span class="highlight">${currentSentence}</span>` ); p.innerHTML = highlightedHTML; // Scroll to the highlighted sentence p.querySelector('.highlight').scrollIntoView({ behavior: 'smooth', block: 'center' }); break; } return textFound; } // Function to handle speaking the text function speakNextSentence() { if (currentSentenceIndex >= sentences.length) { isSpeaking = false; // Stop speaking when done return; } const currentSentence = sentences[currentSentenceIndex]; utterance = new SpeechSynthesisUtterance(currentSentence); utterance.onstart = () => highlightCurrentSentence(); utterance.onend = () => { if (!isPaused) { currentSentenceIndex++; speakNextSentence(); // Recursively speak the next sentence } }; window.speechSynthesis.speak(utterance); } // Function to toggle speech on/off function toggleSpeech() { const svgIconContainer = document.getElementById('speechIconContainer'); if (isSpeaking) { if (!isPaused) { window.speechSynthesis.pause(); isPaused = true; svgIconContainer.innerHTML = getPlayIcon(); // Change to play icon svgIconContainer.title = 'Play'; // Update tooltip } else { window.speechSynthesis.resume(); isPaused = false; svgIconContainer.innerHTML = getPauseIcon(); // Change to pause icon svgIconContainer.title = 'Pause'; // Update tooltip } } else { speakContentText(); // Start reading svgIconContainer.innerHTML = getPauseIcon(); // Set to pause icon svgIconContainer.title = 'Pause'; // Update tooltip } } // Insert the icon when the document is ready insertSpeechIcon(); }); </script> <style> .pdf-icon { position: fixed; top: 17vh; /* 50px lower than the previous position of 10px */ right: 13px; /* Adjusted to position 10px to the left */ width: 45px; height: 50px; cursor: pointer; transition: transform 0.2s; z-index: 9999; /* Ensure it is on top of other elements */ } .pdf-icon:hover { transform: scale(1.1); } .pdf-icon-grey { fill: lightgrey; /* Light grey color for the icon when no PDF version is available */ cursor: default; /* Change cursor to default for the grey icon */ } #speechIcon:hover { transform: scale(1.1); } </style> <script id="PDF-button"> document.addEventListener("DOMContentLoaded", function () { // Get the current URL const currentUrl = window.location.href; // Function to count occurrences of a character in a string function countOccurrences(str, char) { return (str.match(new RegExp(char, "g")) || []).length; } // Check if the URL meets the criteria const hasSixSlashes = countOccurrences(currentUrl, "/") > 3; const hasExcludedPath = currentUrl.includes('/tag/') || currentUrl.includes('/category/') || currentUrl.includes('/models/') || currentUrl.includes('/shop/') || currentUrl.includes('/donate/') || currentUrl.includes('/join/') || currentUrl.includes('/maps/') || currentUrl.includes('/images/') || currentUrl.includes('/videos/') || currentUrl.includes('/audio/'); // If URL doesn't have 6 slashes or contains an excluded path, do nothing if (!hasSixSlashes || hasExcludedPath) { return; } // Function to create the PDF icon function createPdfIcon(isAvailable, index = null) { const pdfIcon = document.createElementNS("http://www.w3.org/2000/svg", "svg"); pdfIcon.setAttribute("class", "pdf-icon"); pdfIcon.setAttribute("viewBox", "35 55 160 160"); pdfIcon.setAttribute("xmlns", "http://www.w3.org/2000/svg"); pdfIcon.setAttribute("preserveAspectRatio", "xMidYMid meet"); if (index !== null) { pdfIcon.dataset.index = index; // Set index to associate icon with a button } if (isAvailable) { pdfIcon.innerHTML = ` <title>Open as PDF</title> <path d="m 67.749272,213.31648 c -3.778707,-0.82107 -7.592778,-3.74382 -9.417888,-7.21701 -1.40322,-2.67033 -1.759091,-4.53685 -1.763659,-9.25028 l -0.0039,-4.0349 h -1.093782 c -1.614249,0 -3.01269,-0.5021 -4.179076,-1.50049 -1.966437,-1.68319 -1.895267,-0.80536 -1.812468,-22.35549 l 0.07387,-19.22578 0.795388,-1.14714 c 1.028845,-1.48384 3.152352,-2.60234 4.940597,-2.60234 h 1.275473 l 0.0039,-27.45052 c 0.0043,-30.423548 -0.06146,-29.192698 1.744062,-32.628608 1.861306,-3.54207 5.679153,-6.44354 9.56104,-7.26615 1.485866,-0.31487 6.493886,-0.37964 29.648226,-0.38346 l 27.860355,-0.005 17.05265,16.97489 17.05266,16.974888 v 44.56868 c 0,49.23814 0.109,46.02469 -1.67592,49.40757 -1.1513,2.182 -3.8495,4.82126 -6.01099,5.87969 -3.56001,1.74326 -1.19496,1.65487 -43.77455,1.63599 -31.426295,-0.0139 -38.936223,-0.0838 -40.275986,-0.37495 z M 147.98647,204.055 c 0.93942,-0.58083 1.49148,-1.18275 2.0297,-2.21302 l 0.7393,-1.41519 v -25.98763 c 0,-14.2932 -0.079,-33.32574 -0.17559,-42.29453 l -0.17559,-16.3069 -10.47389,-0.0747 -10.47389,-0.0747 -1.4552,-0.69058 c -2.15769,-1.02395 -3.81053,-2.62737 -4.81893,-4.67484 l -0.86962,-1.76568 -0.13229,-10.721948 -0.13229,-10.72195 -25.399995,-0.0693 c -17.74039,-0.0484 -25.826711,0.0187 -26.815028,0.22259 -0.993632,0.20495 -1.72757,0.57424 -2.464525,1.24003 -2.105789,1.90245 -1.932731,-0.67841 -2.013376,30.025938 l -0.0721,27.45052 34.997094,0.002 c 24.51604,0.001 35.31405,0.0882 36.05543,0.29101 1.6038,0.43875 3.43611,2.45393 3.80802,4.18807 0.40694,1.8975 0.40778,36.36895 0.001,37.98472 -0.36702,1.45756 -1.86408,3.23061 -3.26502,3.86694 -1.02506,0.4656 -2.65139,0.48767 -36.32883,0.49323 l -35.255847,0.006 0.0063,3.37344 c 0.0035,1.85539 0.111374,3.82603 0.239781,4.37921 0.46931,2.02174 2.08847,3.6399 4.122904,4.12034 0.638461,0.15078 16.052827,0.23264 39.043482,0.20735 l 37.98853,-0.0418 1.2904,-0.79784 z M 97.015485,181.97606 c 4.140915,-0.85442 6.712055,-2.4846 8.418885,-5.33784 1.16973,-1.95537 1.6845,-4.12055 1.68976,-7.10726 0.006,-3.20154 -0.67095,-5.5163 -2.16468,-7.40602 -2.66736,-3.37446 -7.130675,-4.75525 -14.264385,-4.41288 -1.81901,0.0873 -3.69425,0.2373 -4.16719,0.33335 l -0.8599,0.17462 v 11.98949 11.9895 l 0.99219,0.10378 c 3.03093,0.31705 7.99422,0.16044 10.35532,-0.32674 z m -5.32824,-3.88132 c -0.4276,-0.12552 -0.46302,-0.74056 -0.46302,-8.04202 v -7.90611 l 0.94893,-0.17802 c 2.44397,-0.45849 5.84259,0.59778 7.37267,2.2914 1.961535,2.17119 2.336135,6.91223 0.785695,9.94388 -0.866025,1.69338 -2.453745,3.0821 -4.020745,3.5168 -1.20495,0.33426 -3.99118,0.55968 -4.62353,0.37407 z m -21.629682,-0.20166 v -4.33789 l 2.058132,-0.0135 c 3.44261,-0.0226 5.63334,-0.7327 7.60739,-2.46594 3.1723,-2.78532 3.03713,-8.95998 -0.25105,-11.468 -1.91442,-1.4602 -3.58968,-1.83533 -8.22385,-1.8415 -2.32833,-0.003 -4.798877,0.0901 -5.490101,0.20721 l -1.25677,0.21285 v 12.02232 12.02233 h 2.778124 2.778125 z m 0.05868,-12.26472 0.07361,-3.63802 1.576592,-0.081 c 1.92588,-0.0989 3.61825,0.48823 4.27649,1.48375 0.68786,1.0403 0.63601,3.16152 -0.10263,4.19885 -0.83202,1.16845 -2.08434,1.67444 -4.14426,1.67444 h -1.753417 z m 46.243397,11.70781 v -4.89479 h 4.36562 4.36563 v -2.24896 -2.24896 h -4.36563 -4.36562 v -2.77812 -2.77813 h 4.7625 4.7625 v -2.24896 -2.24895 h -7.54063 -7.54062 v 12.17083 12.17083 h 2.77812 2.77813 z" fill="rgb(18, 81, 141)" /> `; } else { pdfIcon.innerHTML = ` <title>No PDF version</title> <path d="m 67.749272,213.31648 c -3.778707,-0.82107 -7.592778,-3.74382 -9.417888,-7.21701 -1.40322,-2.67033 -1.759091,-4.53685 -1.763659,-9.25028 l -0.0039,-4.0349 h -1.093782 c -1.614249,0 -3.01269,-0.5021 -4.179076,-1.50049 -1.966437,-1.68319 -1.895267,-0.80536 -1.812468,-22.35549 l 0.07387,-19.22578 0.795388,-1.14714 c 1.028845,-1.48384 3.152352,-2.60234 4.940597,-2.60234 h 1.275473 l 0.0039,-27.45052 c 0.0043,-30.423548 -0.06146,-29.192698 1.744062,-32.628608 1.861306,-3.54207 5.679153,-6.44354 9.56104,-7.26615 1.485866,-0.31487 6.493886,-0.37964 29.648226,-0.38346 l 27.860355,-0.005 17.05265,16.97489 17.05266,16.974888 v 44.56868 c 0,49.23814 0.109,46.02469 -1.67592,49.40757 -1.1513,2.182 -3.8495,4.82126 -6.01099,5.87969 -3.56001,1.74326 -1.19496,1.65487 -43.77455,1.63599 -31.426295,-0.0139 -38.936223,-0.0838 -40.275986,-0.37495 z M 147.98647,204.055 c 0.93942,-0.58083 1.49148,-1.18275 2.0297,-2.21302 l 0.7393,-1.41519 v -25.98763 c 0,-14.2932 -0.079,-33.32574 -0.17559,-42.29453 l -0.17559,-16.3069 -10.47389,-0.0747 -10.47389,-0.0747 -1.4552,-0.69058 c -2.15769,-1.02395 -3.81053,-2.62737 -4.81893,-4.67484 l -0.86962,-1.76568 -0.13229,-10.721948 -0.13229,-10.72195 -25.399995,-0.0693 c -17.74039,-0.0484 -25.826711,0.0187 -26.815028,0.22259 -0.993632,0.20495 -1.72757,0.57424 -2.464525,1.24003 -2.105789,1.90245 -1.932731,-0.67841 -2.013376,30.025938 l -0.0721,27.45052 34.997094,0.002 c 24.51604,0.001 35.31405,0.0882 36.05543,0.29101 1.6038,0.43875 3.43611,2.45393 3.80802,4.18807 0.40694,1.8975 0.40778,36.36895 0.001,37.98472 -0.36702,1.45756 -1.86408,3.23061 -3.26502,3.86694 -1.02506,0.4656 -2.65139,0.48767 -36.32883,0.49323 l -35.255847,0.006 0.0063,3.37344 c 0.0035,1.85539 0.111374,3.82603 0.239781,4.37921 0.46931,2.02174 2.08847,3.6399 4.122904,4.12034 0.638461,0.15078 16.052827,0.23264 39.043482,0.20735 l 37.98853,-0.0418 1.2904,-0.79784 z M 97.015485,181.97606 c 4.140915,-0.85442 6.712055,-2.4846 8.418885,-5.33784 1.16973,-1.95537 1.6845,-4.12055 1.68976,-7.10726 0.006,-3.20154 -0.67095,-5.5163 -2.16468,-7.40602 -2.66736,-3.37446 -7.130675,-4.75525 -14.264385,-4.41288 -1.81901,0.0873 -3.69425,0.2373 -4.16719,0.33335 l -0.8599,0.17462 v 11.98949 11.9895 l 0.99219,0.10378 c 3.03093,0.31705 7.99422,0.16044 10.35532,-0.32674 z m -5.32824,-3.88132 c -0.4276,-0.12552 -0.46302,-0.74056 -0.46302,-8.04202 v -7.90611 l 0.94893,-0.17802 c 2.44397,-0.45849 5.84259,0.59778 7.37267,2.2914 1.961535,2.17119 2.336135,6.91223 0.785695,9.94388 -0.866025,1.69338 -2.453745,3.0821 -4.020745,3.5168 -1.20495,0.33426 -3.99118,0.55968 -4.62353,0.37407 z m -21.629682,-0.20166 v -4.33789 l 2.058132,-0.0135 c 3.44261,-0.0226 5.63334,-0.7327 7.60739,-2.46594 3.1723,-2.78532 3.03713,-8.95998 -0.25105,-11.468 -1.91442,-1.4602 -3.58968,-1.83533 -8.22385,-1.8415 -2.32833,-0.003 -4.798877,0.0901 -5.490101,0.20721 l -1.25677,0.21285 v 12.02232 12.02233 h 2.778124 2.778125 z m 0.05868,-12.26472 0.07361,-3.63802 1.576592,-0.081 c 1.92588,-0.0989 3.61825,0.48823 4.27649,1.48375 0.68786,1.0403 0.63601,3.16152 -0.10263,4.19885 -0.83202,1.16845 -2.08434,1.67444 -4.14426,1.67444 h -1.753417 z m 46.243397,11.70781 v -4.89479 h 4.36562 4.36563 v -2.24896 -2.24896 h -4.36563 -4.36562 v -2.77812 -2.77813 h 4.7625 4.7625 v -2.24896 -2.24895 h -7.54063 -7.54062 v 12.17083 12.17083 h 2.77812 2.77813 z" fill="lightgrey" /> `; pdfIcon.classList.add('pdf-icon-grey'); } return pdfIcon; } // Determine the currently visible page anchor function getCurrentPageAnchor() { const anchors = Array.from(document.querySelectorAll('a[id^="p"]')); let visibleAnchor = null; let minDistance = Infinity; anchors.forEach(anchor => { const rect = anchor.getBoundingClientRect(); const distance = Math.abs(rect.top); if (rect.top >= 0 && distance < minDistance) { minDistance = distance; visibleAnchor = anchor; } }); return visibleAnchor ? visibleAnchor.id.replace('p', '') : null; } // Show all hidden PDF buttons and scroll to the very top of the blog-item-wrapper function showAllPdfButtons() { const pdfButtons = document.querySelectorAll('.pdf-button-hidden'); pdfButtons.forEach(button => { button.style.display = 'block'; button.classList.remove('pdf-button-hidden'); }); // Scroll to the top of the blog-item-wrapper element const blogWrapper = document.querySelector('.blog-item-wrapper'); if (blogWrapper) { blogWrapper.scrollIntoView({ behavior: 'smooth', block: 'start' }); } } // Get all button containers containing 'PDF' buttons const buttonContainers = document.querySelectorAll('.sqs-block-button-container'); const pdfLinks = []; if (buttonContainers.length > 0) { buttonContainers.forEach((container, index) => { // Find buttons that start with 'PDF' const pdfLink = container.querySelector('a.sqs-block-button-element--medium'); if (pdfLink && pdfLink.innerText.trim().startsWith('PDF')) { pdfLinks.push(pdfLink); // Set the tooltip text if (pdfLinks.length > 1) { pdfLink.setAttribute('title', `Open as PDF - ${pdfLink.innerText.trim()}`); } else { pdfLink.setAttribute('title', 'This article is currently only available in PDF (Portable Document Format).'); } // Create a PDF icon for the button const pdfIcon = createPdfIcon(true, index); // Append the icon to the body document.body.appendChild(pdfIcon); // Hide the button and add a class for easy reference pdfLink.style.display = 'none'; pdfLink.classList.add('pdf-button-hidden'); // Add event listener to the icon pdfIcon.addEventListener('click', function () { if (pdfLinks.length === 1) { // If only one PDF button, open it directly at the current page const currentPage = getCurrentPageAnchor(); let pdfUrl = pdfLinks[0].href; if (currentPage) { pdfUrl += `#page=${currentPage}`; } window.location.href = pdfUrl; } else { // Otherwise, show all buttons and scroll to the top showAllPdfButtons(); } }); } }); } // If no PDF buttons are found, append the grey icon if (pdfLinks.length === 0) { const greyPdfIcon = createPdfIcon(false); document.body.appendChild(greyPdfIcon); } }); </script> <style> /* Styles for the translate icon */ .translate-icon { position: fixed; right: 21px; /* Move 10px further to the right (20px + 10px) */ top: 31vh; /* Move 20px higher */ transform: translateY(-50%); cursor: pointer; transition: transform 0.2s ease; /* Smooth transition for hover effect */ z-index: 9999; /* Ensure the button is always on top */ } .translate-icon:hover { transform: translateY(-50%) scale(1.1); /* Grow by 10% on hover */ } .translate-svg { width: 25px; /* Set the desired size */ height: 25px; /* Set the desired size */ fill: rgb(18, 81, 141); /* Correct RGB color (18, 81, 141) */ } </style> <script id="Translate Button"> // Function to dynamically create the translate button function createTranslateButton() { // Get the current URL const currentUrl = window.location.href; // Check if the URL has exactly 5 forward slashes const slashCount = (currentUrl.match(/\//g) || []).length; // Define patterns to exclude specific URLs const excludePatterns = ['/category/', '/tag/', '/shop/', '/join/', '/donate/', '/models/', '/maps/', '/images/', '/videos/', '/audio/']; // Check if any exclude pattern is present in the URL const isExcluded = excludePatterns.some(pattern => currentUrl.includes(pattern)); // If the URL meets the criteria, create the translate button if (slashCount > 3 && !isExcluded) { // Create a new div element for the button const translateButton = document.createElement('div'); translateButton.className = 'translate-icon'; // Add the class for styling translateButton.title = 'Translate this page'; // Add the title for the tooltip translateButton.onclick = translatePage; // Attach the click event // Create the SVG icon as an inner HTML const svgIcon = ` <svg width="35" height="35" viewBox="0 0 80.812439 80.803772" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <defs id="defs2" /> <g id="layer1" transform="translate(-62.150926,-190.75149)"> <path style="fill:rgb(18, 81, 141);stroke-width:0.0395073" d="m 97.958943,271.51749 c -1.5603,-0.22756 -2.853616,-1.35004 -3.295365,-2.86006 -0.239322,-0.81808 -0.207025,-1.73954 0.0884,-2.52221 0.173226,-0.45892 20.491492,-41.04562 20.697092,-41.34343 0.54679,-0.79198 1.47743,-1.40657 2.44655,-1.61566 0.39462,-0.0851 1.28374,-0.0944 1.6112,-0.0168 1.11776,0.26492 1.96186,0.82533 2.53724,1.68452 0.15861,0.23684 3.65097,7.18205 10.45945,20.80058 8.28515,16.5722 10.23799,20.50737 10.30928,20.77414 0.24643,0.92227 0.19061,1.80967 -0.16917,2.68941 -0.36573,0.89431 -1.28109,1.79646 -2.17094,2.13962 -0.90381,0.34855 -1.74023,0.39595 -2.63448,0.14933 -0.90398,-0.24932 -1.69308,-0.82442 -2.24104,-1.6333 -0.0883,-0.13037 -1.29579,-2.50822 -2.68326,-5.2841 l -2.52268,-5.04705 h -11.66427 -11.66427 l -2.52505,5.04705 c -1.38878,2.77588 -2.59631,5.15161 -2.68339,5.27939 -0.0871,0.12777 -0.26613,0.35271 -0.39787,0.49986 -0.84353,0.94215 -2.234797,1.44287 -3.497427,1.25871 z M 126.34158,251.3532 c 0,-0.0516 -7.58922,-15.19051 -7.6151,-15.19051 -0.0163,0 -1.74079,3.42232 -3.83217,7.60515 l -3.80251,7.60515 h 7.62489 c 4.19369,0 7.62489,-0.009 7.62489,-0.0198 z m -60.739099,8.55184 c -0.852388,-0.13414 -1.658779,-0.53198 -2.238958,-1.10462 -1.564614,-1.54426 -1.620897,-4.02699 -0.12724,-5.61276 0.404605,-0.42955 0.682158,-0.61868 1.622924,-1.10584 2.85731,-1.47963 4.849193,-2.64635 7.159859,-4.19379 4.638062,-3.10608 8.787367,-6.67646 12.608697,-10.84949 0.344837,-0.37657 0.619496,-0.69658 0.610353,-0.71113 -0.0091,-0.0145 -0.340716,-0.47979 -0.73683,-1.03388 -2.661272,-3.72263 -4.961405,-7.63819 -6.939171,-11.81268 -0.928926,-1.96069 -1.430748,-3.15616 -1.534016,-3.65443 -0.08619,-0.41583 -0.0868,-1.20261 -0.0013,-1.6089 0.424657,-2.01696 2.295471,-3.39911 4.318383,-3.19041 0.96177,0.0992 1.791244,0.48852 2.452363,1.15097 0.44795,0.44885 0.671832,0.81533 1.106492,1.81126 1.444757,3.31034 3.048175,6.35012 4.918063,9.32371 0.486038,0.77293 1.578058,2.40995 1.60762,2.40995 0.01689,0 0.305681,-0.41335 0.641768,-0.91855 3.967029,-5.96317 6.908635,-12.31733 8.875005,-19.17091 0.217357,-0.75755 0.714337,-2.64544 0.715017,-2.71612 1.6e-4,-0.0163 -7.737703,-0.0297 -17.195253,-0.0297 -11.312058,-3e-5 -17.340015,-0.0137 -17.617784,-0.0401 -1.454364,-0.13791 -2.655116,-0.95627 -3.289073,-2.24161 -1.173947,-2.38018 0.299521,-5.26022 2.925478,-5.71815 0.298868,-0.0521 1.635141,-0.0596 10.62832,-0.0596 h 10.286473 v -2.03044 c 0,-1.12221 0.01837,-2.20947 0.04107,-2.43068 0.102551,-0.99934 0.502682,-1.81673 1.231712,-2.51615 0.766345,-0.73522 1.679768,-1.0995 2.756958,-1.0995 1.06514,0 1.987796,0.36377 2.7362,1.07879 0.398168,0.38041 0.659721,0.73715 0.876648,1.19567 0.378884,0.80086 0.416818,1.14821 0.416862,3.81707 l 3.3e-5,1.98524 h 10.286466 c 11.15147,0 10.57721,-0.0108 11.22525,0.21032 0.5797,0.19777 1.09523,0.51772 1.53341,0.95164 0.85609,0.84781 1.28631,2.03246 1.17236,3.22832 -0.0509,0.53449 -0.15798,0.91564 -0.39255,1.39753 -0.62426,1.28246 -1.80861,2.08982 -3.27494,2.23251 -0.20984,0.0204 -1.66567,0.0376 -3.23518,0.0381 l -2.85365,10e-4 -0.0214,0.0889 c -0.0118,0.0489 -0.13666,0.58646 -0.27752,1.19459 -0.95008,4.10183 -2.23942,8.096 -3.90973,12.11175 -1.54552,3.71573 -3.4485,7.4138 -5.611857,10.90558 -0.66496,1.07328 -1.95108,2.99841 -2.74238,4.10493 -0.39624,0.55409 -0.72743,1.01868 -0.73597,1.03243 -0.0178,0.0287 0.58752,0.70367 1.493,1.66487 0.34334,0.36447 0.70542,0.77337 0.80462,0.90867 0.56735,0.77374 0.85357,1.87533 0.73115,2.81396 -0.12245,0.93885 -0.46309,1.65287 -1.11001,2.32672 -1.16188,1.21024 -2.91073,1.56097 -4.463814,0.89524 -0.669409,-0.28695 -1.060477,-0.61242 -2.185508,-1.8189 l -0.459987,-0.49329 -0.521685,0.55255 c -4.977714,5.27225 -10.261284,9.5647 -16.291319,13.23531 -1.548629,0.94268 -3.620262,2.09485 -5.095278,2.83381 -0.803873,0.40272 -1.093606,0.52022 -1.496717,0.60695 -0.34538,0.0743 -1.108156,0.10281 -1.423474,0.0532 z" id="path235" /> </g> </svg> `; translateButton.innerHTML = svgIcon; // Set the SVG icon as the button content // Append the button to the body document.body.appendChild(translateButton); } } // Function to handle the translation function translatePage() { // Get the current URL const currentUrl = window.location.href; // Reformat the URL for Google Translate const translatedUrl = currentUrl .replace(/https?:\/\//, '') // Remove the protocol (http or https) .replace(/\./g, '-') // Replace dots with hyphens .replace(/\//, '.translate.goog/') + '?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp'; // Redirect to the new URL window.location.href = 'https://' + translatedUrl; } // Insert the button after the DOM content is fully loaded document.addEventListener('DOMContentLoaded', createTranslateButton); </script> <style> .license-icon { position: fixed; right: 22px; /* Initial right position */ top: 82vh; /* Move 500px further down */ transform: translateY(-50%); cursor: pointer; transition: transform 0.2s ease; /* Smooth transition for hover effect */ z-index: 9999; /* Ensure the button is always on top */ } .license-icon:hover { transform: translateY(-50%) scale(1.1); /* Grow by 10% on hover */ } .license-svg { width: 35px; /* Set the desired size */ height: 35px; /* Set the desired size */ fill: rgb(18, 81, 141); /* Set the fill color to the correct RGB */ } </style> <script id="Licensing button"> // Function to check URL validity function isValidUrl() { const url = window.location.href; // Get the current URL // Count the number of forward slashes in the URL const slashCount = (url.match(/\//g) || []).length; // Define the strings that should prevent the script from running const excludedStrings = ['/category/', '/tag/', '/shop/', '/models/', '/maps/', '/images/', '/videos/', '/audio/']; // Check if the URL has more than 3 slashes and does not contain any of the excluded strings return ( slashCount > 3 && !excludedStrings.some((str) => url.includes(str)) ); } // Function to dynamically create the license button function createLicenseButton() { // Create a new div element for the button const licenseButton = document.createElement('div'); licenseButton.className = 'license-icon'; // Add the class for styling licenseButton.title = 'Permissions and licensing'; // Add the title for the tooltip // Determine if the current page URL includes '-latest' const isLatest = window.location.href.includes('-latest'); // Change the link based on the URL condition licenseButton.onclick = function() { if (isLatest) { window.location.href = 'https://www.kentarchaeology.org.uk/licensing/copyright'; } else { window.location.href = 'https://www.kentarchaeology.org.uk/licensing/creative-commons'; } }; // SVG for the default and '-latest' icons const defaultSvgIcon = ` <svg class="license-svg" viewBox="0 0 87.832771 88.010887" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(-57.394285,-95.960759)"> <path d="m 99.14767,96.129328 c -2.7788,0.36486 -5.53713,0.42323 -8.29261,1.0763 -8.053764,1.90878 -15.263843,6.117882 -20.987299,12.103392 -13.314486,13.92424 -16.553017,35.38292 -6.876949,52.26072 2.97303,5.18581 7.003671,9.6849 11.710936,13.35248 4.659324,3.63017 9.977737,6.06448 15.635022,7.66323 5.31505,1.50217 11.13707,1.70344 16.58522,0.98733 13.87751,-1.82497 26.64588,-10.44634 33.31651,-22.78048 3.15776,-5.83868 4.65846,-12.50136 4.94697,-19.09028 0.34035,-7.77423 -1.41233,-15.86264 -5.11973,-22.71829 -6.0752,-11.23321 -17.07094,-19.504122 -29.60211,-22.009992 -3.55365,-0.71062 -7.69554,-1.31979 -11.31596,-0.84441 m 0,7.935092 c 2.73535,-0.32274 5.76475,0.005 8.46537,0.4579 12.66817,2.12442 23.37281,11.37492 27.66864,23.44507 1.58484,4.45304 2.1629,9.28522 1.9568,13.99378 -0.52641,12.02117 -6.95569,22.23845 -17.10014,28.58791 -4.37876,2.74071 -9.54722,4.53614 -14.68483,5.08648 -4.79529,0.51371 -9.61494,0.1129 -14.25292,-1.22014 -4.10951,-1.18118 -7.996412,-3.19896 -11.402342,-5.77364 -3.259946,-2.4642 -6.164433,-5.48401 -8.436608,-8.88605 -2.131373,-3.19128 -3.776506,-6.67279 -4.829236,-10.36576 -4.181989,-14.67162 2.238055,-30.29757 14.388802,-39.11763 5.514064,-4.00256 11.607664,-5.42699 18.226464,-6.20792 m 1.72763,42.64772 -5.44203,-2.67782 c -1.48394,3.56323 -6.57439,5.32265 -9.38965,2.07281 -2.221642,-2.56466 -2.420406,-7.20257 -1.25132,-10.27904 1.75501,-4.6182 8.13263,-4.63462 10.0363,-0.0864 l 1.98678,-0.92886 3.97354,-2.09449 c -3.38503,-7.2416 -14.42033,-8.23257 -20.126858,-3.41733 -3.50311,2.95597 -4.701047,7.62575 -4.397675,12.05547 0.278234,4.06416 1.899785,7.83954 5.347869,10.19049 5.984154,4.08031 16.296884,2.25197 19.263044,-4.83485 m 25.39611,0 -5.5284,-2.67782 c -1.86869,4.48838 -8.19241,5.1625 -10.37527,0.51829 -1.35662,-2.88617 -1.34902,-7.53185 0.53151,-10.193 1.60729,-2.27451 4.98429,-2.6995 7.25232,-1.20036 0.98077,0.6483 1.56056,1.60393 2.15953,2.58246 l 5.78755,-2.93696 c -1.00185,-3.40585 -5.22529,-5.62421 -8.46537,-6.16884 -5.77468,-0.97058 -11.7051,0.97783 -14.50274,6.42798 -0.64976,1.26575 -1.03303,2.66236 -1.26747,4.05992 -0.88472,5.27384 0.50343,11.19563 5.05892,14.38785 4.76229,3.33709 11.8618,2.73484 16.23969,-0.90553 1.19397,-0.99278 2.56484,-2.40581 3.10973,-3.89399 z"/> </g> </svg> `; const latestSvgIcon = ` <svg class="license-svg" viewBox="0 0 87.832764 88.01088" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(-46.850957,-75.682874)"> <path style="fill:#134e89;fill-opacity:1;stroke:none;stroke-width:0.0863814" d="m 88.604345,75.851442 c -2.7788,0.36486 -5.53713,0.42323 -8.29261,1.0763 -8.053764,1.90878 -15.263843,6.117882 -20.987299,12.103392 -13.314487,13.924236 -16.553018,35.382916 -6.876949,52.260716 2.97303,5.18581 7.003671,9.6849 11.710936,13.35248 4.659324,3.63017 9.977737,6.06448 15.635022,7.66323 5.31505,1.50217 11.13707,1.70344 16.58522,0.98733 13.877505,-1.82497 26.645875,-10.44634 33.316505,-22.78048 3.15776,-5.83868 4.65846,-12.50136 4.94697,-19.09028 0.34035,-7.77423 -1.41233,-15.86264 -5.11973,-22.718286 -6.0752,-11.23321 -17.07094,-19.504122 -29.602105,-22.009992 -3.55365,-0.71062 -7.69554,-1.31979 -11.31596,-0.84441 m 0,7.935092 c 2.73535,-0.32274 5.76475,0.005 8.46537,0.4579 12.668165,2.12442 23.372805,11.37492 27.668635,23.445066 1.58484,4.45304 2.1629,9.28522 1.9568,13.99378 -0.52641,12.02117 -6.95569,22.23845 -17.10014,28.58791 -4.37876,2.74071 -9.54722,4.53614 -14.684825,5.08648 -4.79529,0.51371 -9.61494,0.1129 -14.25292,-1.22014 -4.10951,-1.18118 -7.996412,-3.19896 -11.402342,-5.77364 -3.259946,-2.4642 -6.164433,-5.48401 -8.436608,-8.88605 -2.131373,-3.19128 -3.776506,-6.67279 -4.829236,-10.36576 -4.181989,-14.67162 2.238055,-30.297566 14.388802,-39.117626 5.514064,-4.00256 11.607664,-5.42699 18.226464,-6.20792 m 20.518945,47.300076 -8.54412,-4.20424 c -2.329823,5.59436 -10.321951,8.35669 -14.741977,3.25436 -3.488032,-4.02657 -3.800096,-11.3082 -1.964603,-16.13834 2.755408,-7.25068 12.768425,-7.27646 15.757232,-0.13565 l 3.119288,-1.45833 6.23856,-3.2884 c -5.31458,-11.369484 -22.640267,-12.925331 -31.599653,-5.36529 -5.499966,4.64095 -7.380756,11.97261 -6.904455,18.92738 0.436834,6.38083 2.982708,12.30827 8.396283,15.99931 9.395265,6.40619 25.586495,3.53565 30.243445,-7.59083" id="path312" /> </g> </svg> `; // Set the appropriate SVG icon based on the URL condition licenseButton.innerHTML = isLatest ? latestSvgIcon : defaultSvgIcon; // Append the button to the body document.body.appendChild(licenseButton); } // Insert the button after the DOM content is fully loaded if URL is valid document.addEventListener('DOMContentLoaded', function() { if (isValidUrl()) { createLicenseButton(); } }); </script> <style> /* Styling for the tour button */ .tour-icon { position: fixed; bottom: 5vh; right: 27px; cursor: pointer; z-index: 1001; width: 6.6933mm; /* One-quarter of the original width */ height: 10.2078mm; /* One-quarter of the original height */ transition: transform 0.2s ease-in-out; } /* On hover, increase size by 20% */ .tour-icon:hover { transform: scale(1.2); } /* SVG styling */ .tour-svg { fill: #12518D; stroke-width: 0.0697015; transition: transform 0.2s ease-in-out; } /* Dark overlay, initially covering the full screen */ .dark-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); z-index: 1000; display: none; } /* Center title styling using <h2> styles */ .center-title { position: fixed; top: 30%; left: 50%; transform: translate(-50%, -50%); z-index: 1002; text-align: center; display: none; } .center-title h2 { margin: 0; color: white; /* Header in white */ } /* Paragraphs in white */ .tour-description { margin-top: 20px; font-size: 1.2em; color: white; } /* Links for tours */ .tour-links { margin-top: 20px; font-size: 1.2em; } .tour-links a { color: white; text-decoration: underline; margin: 0 10px; cursor: pointer; } /* Navigation buttons for slides */ .tour-navigation { margin-top: 30px; font-size: 1.2em; color: white; } .tour-navigation a { margin: 0 20px; color: white; text-decoration: underline; cursor: pointer; } </style> <script id="Tour button"> function getTitleBasedOnUrl() { const url = window.location.href.replace(/^https?:\/\//, ''); // Remove protocol const slashCount = (url.match(/\//g) || []).length; // Title based on the number of slashes return slashCount === 1 ? 'Section tour' : 'Article page tour'; } function createTourButton() { // Create the button div const tourButton = document.createElement('div'); tourButton.className = 'tour-icon'; tourButton.title = 'Tour'; // Tooltip // Create the dark overlay const overlay = document.createElement('div'); overlay.className = 'dark-overlay'; // Create the centered title container const titleContainer = document.createElement('div'); titleContainer.className = 'center-title'; // Create the <h2> title const title = document.createElement('h2'); title.textContent = getTitleBasedOnUrl(); // Create description below title const description = document.createElement('p'); description.className = 'tour-description'; description.textContent = 'This tour will guide you around the website.'; // Create links for different tours const linksContainer = document.createElement('div'); linksContainer.className = 'tour-links'; linksContainer.innerHTML = ` <a id="website-tour">Website tour</a> <a id="section-tour">Section tour</a> <a id="page-tour">Page tour</a> `; // Navigation for slides const navigationContainer = document.createElement('div'); navigationContainer.className = 'tour-navigation'; navigationContainer.innerHTML = ` <a id="prev-slide" style="display: none;">Previous</a> <a id="next-slide">Next</a> `; // Append title, description, links, and navigation to title container titleContainer.appendChild(title); titleContainer.appendChild(description); titleContainer.appendChild(linksContainer); titleContainer.appendChild(navigationContainer); // Add elements to the body document.body.appendChild(overlay); document.body.appendChild(titleContainer); // Create the SVG for the button const svgIcon = ` <svg class="tour-svg" viewBox="0 0 26.773285 40.831322" xmlns="http://www.w3.org/2000/svg"> <g transform="translate(-106.47037,-51.927092)"> <path d="m 119.2306,92.723741 c -1.16422,-0.19585 -2.24684,-0.99615 -2.77025,-2.04784 -0.41303,-0.82991 -0.52715,-1.71053 -0.33001,-2.54674 0.4124,-1.74934 1.96958,-3.00443 3.72757,-3.00443 1.76269,0 3.31358,1.24798 3.72618,2.99841 0.43399,1.84115 -0.63004,3.7621 -2.44936,4.42199 -0.5037,0.1827 -1.38718,0.26557 -1.90413,0.17861 z m -0.36134,-9.760363 c -0.5805,-0.15889 -1.18693,-0.53121 -1.69604,-1.04128 -0.57015,-0.57124 -0.82003,-1.00391 -1.011,-1.75062 -0.12553,-0.49079 -0.13788,0.81049 -0.13787,-1.60653 1e-5,-3.33488 0.0559,-2.662477 0.73265,-4.001297 0.389,-0.76956 0.6193,-1.08374 1.28324,-1.75063 0.92492,-0.92904 1.81182,-1.44734 3.37302,-1.97118 0.88995,-0.29861 1.19381,-0.44482 1.75547,-0.84471 1.55181,-1.10485 2.40613,-2.77005 2.40363,-4.68507 -0.001,-0.9626 -0.15099,-1.66175 -0.52529,-2.4527 -0.74719,-1.57892 -1.96012,-2.56772 -3.86483,-3.15068 -0.20484,-0.0627 -0.66427,-0.096 -1.32433,-0.096 -0.66005,0 -1.11948,0.0333 -1.32432,0.096 -1.46219,0.44752 -2.31922,0.99797 -3.14609,2.02065 -0.73103,0.90415 -1.23872,2.21386 -1.24646,3.21552 -0.0133,1.72168 -0.81197,3.11438 -2.16394,3.77348 -2.13728,1.04195 -4.58448,-0.005 -5.32681,-2.27921 -0.38653,-1.18408 -0.13342,-3.57547 0.59778,-5.64794 0.81548,-2.31137 2.52828,-4.65194 4.4871,-6.13171 0.40955,-0.30939 1.33671,-0.93656 1.38453,-0.93656 0.0184,0 0.21685,-0.10362 0.44096,-0.23026 0.54139,-0.30594 1.44214,-0.68665 2.25,-0.95099 2.50672,-0.82021 5.61233,-0.81931 8.1241,0.002 4.94346,1.61713 8.41936,5.73956 9.19943,10.91056 0.22971,1.52271 0.0856,3.92582 -0.31712,5.28899 -0.35575,1.20415 -0.53228,1.64809 -1.09155,2.74506 -1.54398,3.02845 -4.03645,5.19829 -7.44156,6.47832 l -0.55761,0.20962 -0.0394,1.160467 c -0.0591,1.739861 -0.0633,0.70993 -0.15025,0.99618 -0.37705,1.24165 -1.49047,2.31032 -2.74844,2.63798 -0.45802,0.1193 -1.4696,0.11518 -1.91896,-0.008 z" id="path431" /> </g> </svg> `; tourButton.innerHTML = svgIcon; document.body.appendChild(tourButton); // Toggle dark overlay, cross state, and show/hide title on click tourButton.addEventListener('click', function() { const overlayVisible = overlay.style.display === 'none' || overlay.style.display === ''; overlay.style.display = overlayVisible ? 'block' : 'none'; titleContainer.style.display = overlayVisible ? 'block' : 'none'; const svgElement = tourButton.querySelector('.tour-svg'); svgElement.classList.toggle('cross'); }); // Event listener for "Page tour" link document.addEventListener('click', function(event) { if (event.target && event.target.id === 'page-tour') { title.textContent = 'Header'; description.textContent = 'Use the site header to navigate the sections of the website.'; // Reveal top 15vh and check .header visibility overlay.style.top = '14vh'; checkAndClickHeader(); // Show navigation for slides navigationContainer.querySelector('#prev-slide').style.display = 'inline'; navigationContainer.querySelector('#next-slide').style.display = 'inline'; } }); // Function to check and simulate a click on .header if needed function checkAndClickHeader() { const headerElement = document.querySelector('.header'); if (headerElement) { const headerRect = headerElement.getBoundingClientRect(); const viewportHeight = window.innerHeight; // If the header is not at least 50% visible, simulate a click if (headerRect.top >= 0 && headerRect.bottom <= viewportHeight * 0.5) { headerElement.click(); } } } // Handle slide navigation navigationContainer.querySelector('#next-slide').addEventListener('click', function() { title.textContent = 'Next Section'; description.textContent = 'This section will provide further details.'; overlay.style.top = '0'; // Dark overlay covers full screen again }); navigationContainer.querySelector('#prev-slide').addEventListener('click', function() { title.textContent = 'Header'; description.textContent = 'Use the site header to navigate the sections of the website.'; overlay.style.top = '15vh'; // Reveal top 15vh again checkAndClickHeader(); }); } // Initialize button on DOMContentLoaded if URL is valid document.addEventListener('DOMContentLoaded', function() { if (isValidUrl()) { createTourButton(); } }); </script> <style> /* Gallery Button */ .gallery-icon { position: fixed; right: 12px; top: 63vh; transform: translateY(-50%); cursor: pointer; transition: transform 0.2s ease; z-index: 9999; } .gallery-icon.no-images { cursor: default; /* Disable pointer events if no images are found */ } .gallery-icon:hover { transform: translateY(-50%) scale(1.2); /* Grow by 20% */ } /* Gallery SVG Icon */ .gallery-svg { width: 55px; height: 55px; fill: rgb(18, 81, 141); } .gallery-svg.no-images { fill: lightgrey; /* Change icon color to grey if no images */ } /* Gallery Overlay */ .gallery-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); display: flex; align-items: center; justify-content: center; z-index: 1000; } /* Gallery Close Button */ .gallery-close { position: absolute; top: 20px; right: 30px; font-size: 24px; color: white; cursor: pointer; transition: transform 0.2s ease; /* Add transition for hover effect */ } .gallery-close:hover { transform: scale(1.2); /* Grow by 20% when hovered */ } /* Gallery Navigation Arrows */ .gallery-left-arrow, .gallery-right-arrow { position: absolute; top: 50%; font-size: 36px; color: white; cursor: pointer; user-select: none; transition: transform 0.2s ease; /* Add transition for hover effect */ } .gallery-left-arrow:hover, .gallery-right-arrow:hover { transform: scale(1.2); /* Grow by 20% when hovered */ } .gallery-left-arrow { left: 70px; } .gallery-right-arrow { right: 70px; } /* Gallery Content */ .gallery-content { max-width: 90%; max-height: 80%; overflow: hidden; text-align: center; } .gallery-item { display: flex; flex-direction: column; align-items: center; } .caption { color: white; margin-top: 8px; font-size: 16px; } </style> <script id="Gallery button"> // Function to check URL validity function isValidUrl() { const url = window.location.href; const slashCount = (url.match(/\//g) || []).length; const excludedStrings = ['/category/', '/tag/', '/shop/', '/join/', '/donate/', '/models/', '/maps/', '/images/', '/videos/', '/audio/']; return ( slashCount > 3 && !excludedStrings.some((str) => url.includes(str)) ); } // Function to get the og:image from meta tags function getOgImage() { const metaTag = document.querySelector('meta[property="og:image"]'); return metaTag ? metaTag.getAttribute('content') : null; } // Function to dynamically create the gallery button function createGalleryButton() { const galleryButton = document.createElement('div'); galleryButton.className = 'gallery-icon'; galleryButton.title = 'Images gallery'; // Check for images const images = document.querySelectorAll('.sqs-block.image-block img'); const ogImage = getOgImage(); if (images.length > 0 || ogImage) { galleryButton.onclick = function() { openGallery(ogImage); // Pass ogImage to the gallery }; } // SVG Icon (no change needed here) const svgIcon = ` <svg class="gallery-svg" viewBox="0 0 149 232" xmlns="http://www.w3.org/2000/svg" width="149" height="232"> <path d="M143.209,105.968c0,6.25-5.113,11.364-11.363,11.364H18.203c-6.25 0-11.363-5.113-11.363-11.364v-86.37c0-6.25,5.113-11.363 11.363-11.363h113.643c6.25,0,11.363,5.113,11.363,11.363V105.968z M18.203,17.326c-1.207,0-2.271,1.068-2.271,2.271v86.37c0,1.207,1.065 2.271,2.271,2.271h113.643c1.203,0,2.274-1.064 2.274-2.271v-86.37c0-1.203-1.071-2.271-2.274-2.271H18.203z M38.661,53.691c-7.529,0-13.641-6.108-13.641-13.635s6.112-13.638,13.641-13.638 c7.526,0,13.632,6.111,13.632,13.638S46.188,53.691,38.661,53.691z M125.025,99.15H25.02V85.51l22.73-22.724l11.363,11.36l36.365-36.361l29.547,29.547V99.15z"/> </svg> `; galleryButton.innerHTML = svgIcon; document.body.appendChild(galleryButton); } // Function to open the gallery view function openGallery(ogImage) { const galleryOverlay = document.createElement('div'); galleryOverlay.className = 'gallery-overlay'; // Create SVG for the close button icon const closeIcon = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); closeIcon.setAttribute('width', '36px'); // Set the width of the SVG closeIcon.setAttribute('height', '36px'); // Set the height of the SVG closeIcon.setAttribute('viewBox', '0 0 24 24'); // Set the viewBox to match the provided SVG const closePath = document.createElementNS('http://www.w3.org/2000/svg', 'path'); closePath.setAttribute('d', 'M18 6L6 18M6 6l12 12'); // Set the path as given closePath.setAttribute('stroke', '#ffffff'); // Change stroke color to white closePath.setAttribute('stroke-width', '4'); // Set the stroke width closePath.setAttribute('stroke-linecap', 'square'); // Set the stroke linecap to square closePath.setAttribute('stroke-linejoin', 'square'); // Set the stroke linejoin to square closeIcon.appendChild(closePath); const closeButton = document.createElement('div'); closeButton.className = 'gallery-close'; closeButton.title = 'Close gallery'; closeButton.appendChild(closeIcon); closeButton.onclick = function() { document.body.removeChild(galleryOverlay); }; document.body.appendChild(closeButton); // Create left arrow icon const leftArrowIcon = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); leftArrowIcon.setAttribute('width', '45px'); leftArrowIcon.setAttribute('height', '45px'); leftArrowIcon.setAttribute('viewBox', '240 40 60 60'); leftArrowIcon.style.cssText = 'transform: rotate(90deg); fill: #ffffff; display: block; transition: transform 0.2s ease;'; const leftArrowPath = document.createElementNS('http://www.w3.org/2000/svg', 'path'); leftArrowPath.setAttribute('d', 'm 253.97113,46.304933 c -3.69067,0.653521 -6.16196,4.923102 -4.1729,8.342048 1.23005,2.114285 3.51407,3.839104 5.23124,5.55625 l 10.58333,10.583333 c 2.04946,2.049463 3.97378,4.173009 7.14375,3.617119 2.65457,-0.465402 4.55348,-3.143514 6.35,-4.940035 4.53866,-4.538663 10.44231,-9.027319 14.11579,-14.2875 1.72931,-2.475971 1.1049,-6.246284 -1.42611,-7.945438 -5.95788,-3.999442 -12.03963,6.277568 -16.12926,9.532938 -0.96228,0.765982 -3.96875,3.424766 -3.96875,3.424766 0,0 -3.09907,-2.555081 -3.96875,-3.424766 -3.15886,-3.158861 -8.64129,-11.364384 -13.75834,-10.458715 z'); leftArrowPath.style.fill = '#ffffff'; leftArrowIcon.appendChild(leftArrowPath); const leftArrow = document.createElement('div'); leftArrow.className = 'gallery-left-arrow'; leftArrow.title = 'Previous image'; leftArrow.appendChild(leftArrowIcon); leftArrow.onclick = function() { navigateGallery(-1); }; document.body.appendChild(leftArrow); // Create right arrow icon const upArrowIcon = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); upArrowIcon.setAttribute('width', '45px'); upArrowIcon.setAttribute('height', '45px'); upArrowIcon.setAttribute('viewBox', '240 40 60 60'); upArrowIcon.style.cssText = 'transform: rotate(270deg); fill: #ffffff; display: block; transition: transform 0.2s ease;'; const upArrowPath = document.createElementNS('http://www.w3.org/2000/svg', 'path'); upArrowPath.setAttribute('d', 'm 253.97113,46.304933 c -3.69067,0.653521 -6.16196,4.923102 -4.1729,8.342048 1.23005,2.114285 3.51407,3.839104 5.23124,5.55625 l 10.58333,10.583333 c 2.04946,2.049463 3.97378,4.173009 7.14375,3.617119 2.65457,-0.465402 4.55348,-3.143514 6.35,-4.940035 4.53866,-4.538663 10.44231,-9.027319 14.11579,-14.2875 1.72931,-2.475971 1.1049,-6.246284 -1.42611,-7.945438 -5.95788,-3.999442 -12.03963,6.277568 -16.12926,9.532938 -0.96228,0.765982 -3.96875,3.424766 -3.96875,3.424766 0,0 -3.09907,-2.555081 -3.96875,-3.424766 -3.15886,-3.158861 -8.64129,-11.364384 -13.75834,-10.458715 z'); upArrowPath.style.fill = '#ffffff'; upArrowIcon.appendChild(upArrowPath); const rightArrow = document.createElement('div'); rightArrow.className = 'gallery-right-arrow'; rightArrow.title = 'Next image'; rightArrow.appendChild(upArrowIcon); rightArrow.onclick = function() { navigateGallery(1); }; document.body.appendChild(rightArrow); const galleryContent = document.createElement('div'); galleryContent.className = 'gallery-content'; // Add og:image as the first image, if it exists if (ogImage) { const galleryItem = document.createElement('div'); galleryItem.className = 'gallery-item'; galleryItem.style.display = 'block'; // First image, show by default const imageElement = document.createElement('img'); imageElement.src = ogImage; imageElement.alt = 'Featured image'; imageElement.style.maxWidth = '100%'; imageElement.style.maxHeight = '90vh'; imageElement.style.objectFit = 'contain'; const caption = document.createElement('div'); caption.className = 'caption'; if ('Featured image') { caption.textContent = 'Featured image'; galleryItem.appendChild(caption); } galleryItem.appendChild(imageElement); galleryContent.appendChild(galleryItem); } // Add other images on the page const images = document.querySelectorAll('.sqs-block.image-block img'); images.forEach((img, index) => { const galleryItem = document.createElement('div'); galleryItem.className = 'gallery-item'; galleryItem.style.display = (!ogImage && index === 0) ? 'block' : 'none'; const imageElement = document.createElement('img'); imageElement.src = img.getAttribute('data-src') || img.src; imageElement.alt = img.alt; imageElement.style.maxWidth = '100%'; imageElement.style.maxHeight = '90vh'; imageElement.style.objectFit = 'contain'; const caption = document.createElement('div'); caption.className = 'caption'; if (img.alt) { caption.textContent = img.alt; galleryItem.appendChild(caption); } galleryItem.appendChild(imageElement); galleryContent.appendChild(galleryItem); }); galleryOverlay.appendChild(closeButton); galleryOverlay.appendChild(leftArrow); galleryOverlay.appendChild(galleryContent); galleryOverlay.appendChild(rightArrow); document.body.appendChild(galleryOverlay); let currentImageIndex = 0; function navigateGallery(direction) { const items = document.querySelectorAll('.gallery-item'); items[currentImageIndex].style.display = 'none'; currentImageIndex = (currentImageIndex + direction + items.length) % items.length; items[currentImageIndex].style.display = 'block'; } } // Insert the button after the DOM content is fully loaded if URL is valid document.addEventListener('DOMContentLoaded', function() { if (isValidUrl()) { createGalleryButton(); } }); </script> <style> .cinema-mode-button { position: fixed; top: 69vh; /* Adjust based on desired vertical position */ right: 20px; width: 40px; height: 40px; display: block; /* Ensure the button is visible */ border: none; z-index: 1001; background: none; transition: transform 0.3s ease; } .cinema-mode-button:hover { transform: scale(1.2); /* Enlarge the icon by 20% on hover */ } /* Dark mode styling for the cinema mode */ .cinema-mode { background-color: black; color: white; /* Adjust text color for dark mode */ } </style> <script> // Function to check if the URL contains four forward slashes and excludes specific keywords function shouldRunScript() { const url = window.location.href; const excludedKeywords = ['/tag/', '/category/', '/shop/', '/models/', '/maps/', '/images/', '/videos/', '/audio/']; // Check if the URL contains any excluded keywords for (const keyword of excludedKeywords) { if (url.includes(keyword)) { return false; } } // Check if the URL has 4 or more slashes return (url.split('/').length - 1) >= 4; } // Cinema mode button document.addEventListener('DOMContentLoaded', function () { // Run the script only if the shouldRunScript function returns true if (!shouldRunScript()) { return; } // Check if the button already exists to avoid duplicates var existingButton = document.querySelector('.cinema-mode-button'); if (!existingButton) { // Create the cinema mode button var toggleButton = document.createElement('button'); toggleButton.className = 'cinema-mode-button'; toggleButton.setAttribute('aria-label', 'Toggle Dark Mode'); toggleButton.setAttribute('role', 'button'); toggleButton.title = 'Dark/light background'; // SVG code as innerHTML toggleButton.innerHTML = `<svg width="30px" height="30px" viewBox="0 0 52.786324 52.956055" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g transform="translate(86.948298,-215.36654)"><path style="fill:#1b4f8a;stroke:none;stroke-width:0.103232" d="m -62.437363,215.49998 c -5.195676,0.6822 -9.905336,2.08054 -14.142811,5.31229 -2.758055,2.10356 -5.141996,4.73774 -6.872426,7.75439 -6.916278,12.05721 -3.274577,27.68347 8.317677,35.40864 2.266566,1.51039 4.803187,2.67103 7.432718,3.39098 3.524244,0.96491 7.222434,1.19635 10.839381,0.7092 3.802145,-0.51224 7.543383,-1.9067 10.736149,-4.03132 3.863981,-2.57131 7.038784,-6.04579 9.160928,-10.18561 5.594773,-10.91464 2.589787,-24.92015 -6.993052,-32.57503 -2.648732,-2.11584 -5.641743,-3.69926 -8.877969,-4.69435 -2.981553,-0.91678 -6.479782,-1.49896 -9.600595,-1.08919 m 16.515604,13.29451 c 0.346757,0 0.618361,0.46424 0.805624,0.70126 0.598024,0.75669 1.136277,1.54766 1.632204,2.37434 2.192033,3.65339 3.013761,7.96953 2.604548,12.1814 -0.993197,10.22246 -10.333336,18.09495 -20.525658,17.64868 -3.428651,-0.1502 -6.795466,-1.22299 -9.703827,-3.03358 -0.561067,-0.34934 -2.559435,-1.3926 -2.559435,-2.12555 0,-0.47683 0.806966,-1.03325 1.114185,-1.34047 l 3.406662,-3.40667 13.523418,-13.52341 7.123022,-7.12303 c 0.515438,-0.51543 1.825352,-2.35297 2.579257,-2.35297 z"/></g></svg>`; // Append the button to the body document.body.appendChild(toggleButton); // Add click event listener for toggling cinema mode toggleButton.addEventListener('click', function () { document.body.classList.toggle('cinema-mode'); // Change the text color for all h1 elements based on the mode if (document.body.classList.contains('cinema-mode')) { document.querySelectorAll('h1').forEach(function (h1) { h1.style.color = 'white'; // Set h1 text color to white }); } else { document.querySelectorAll('h1').forEach(function (h1) { h1.style.color = ''; // Reset h1 text color }); } }); } }); </script> <style> /* Styling for the icons */ .permissions-icon, .translate-icon, .pdf-icon, #speechIconContainer, svg.license-icon { transition: transform 0.2s ease; } .permissions-icon:hover, .translate-icon:hover { transform: translateY(-50%) scale(1.1); } @media (max-width: 750px) { #dynamic-right-icon { display: none; } } </style> <script id="Hide sidecar icon"> // Function to check if the script should run on the current page function shouldRunScript() { var url = window.location.href; // Count forward slashes in the URL var slashCount = (url.match(/\//g) || []).length; // Check if the URL contains any of the forbidden substrings var forbiddenSubstrings = ['/category/', '/tag/', '/models/', '/shop/', '/maps/', '/images/', '/videos/', '/audio/']; var containsForbidden = forbiddenSubstrings.some(substring => url.includes(substring)); // Return true only if there are exactly 5 slashes and no forbidden substrings return slashCount > 3 && !containsForbidden; } // Run the script only if the conditions are met if (shouldRunScript()) { // Create and display initial icon function createIcon() { var iconContainer = document.createElement('div'); // Container for the SVG iconContainer.id = 'dynamic-right-icon'; iconContainer.title = 'Hide icons'; // Initial tooltip when the icons are shown iconContainer.innerHTML = `<svg width="20px" height="20px" viewBox="0 0 45.106873 28.257965" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-249.0918,-46.235564)"><path style="fill:#1c4d85;stroke:none;stroke-width:0.264583" d="m 253.97113,46.304933 c -3.69067,0.653521 -6.16196,4.923102 -4.1729,8.342048 1.23005,2.114285 3.51407,3.839104 5.23124,5.55625 l 10.58333,10.583333 c 2.04946,2.049463 3.97378,4.173009 7.14375,3.617119 2.65457,-0.465402 4.55348,-3.143514 6.35,-4.940035 4.53866,-4.538663 10.44231,-9.027319 14.11579,-14.2875 1.72931,-2.475971 1.1049,-6.246284 -1.42611,-7.945438 -5.95788,-3.999442 -12.03963,6.277568 -16.12926,9.532938 -0.96228,0.765982 -3.96875,3.424766 -3.96875,3.424766 0,0 -3.09907,-2.555081 -3.96875,-3.424766 -3.15886,-3.158861 -8.64129,-11.364384 -13.75834,-10.458715 z" id="path1008" /></g></svg>`; iconContainer.style.cssText = 'position: fixed; right: 25px; top: 51vh; transform: translateY(-50%) rotate(270deg); z-index: 2000; cursor: pointer; transition: transform 0.5s ease;'; document.body.appendChild(iconContainer); iconContainer.addEventListener('mouseover', function() { iconContainer.style.transition = 'transform 0.5s ease'; // Easing on scale iconContainer.style.transform = getCurrentTransform() + ' scale(1.2)'; }); iconContainer.addEventListener('mouseleave', function() { iconContainer.style.transform = getCurrentTransform(); }); iconContainer.addEventListener('click', function() { toggleIcons(iconContainer); }); } // Function to get the current transform state of the icon function getCurrentTransform() { var iconContainer = document.getElementById('dynamic-right-icon'); return iconContainer.style.transform.includes('rotate(90deg)') ? 'translateY(-50%) rotate(90deg)' : 'translateY(-50%) rotate(270deg)'; } // Function to toggle the icons visibility and update tooltip/icon state function toggleIcons(icon) { var iconsToToggle = document.querySelectorAll('.permissions-icon, .translate-icon, .pdf-icon, #speechIconContainer, .license-icon, .tour-icon, .custom-arrow-down, .cinema-mode-button, .gallery-icon, .iconsbackground'); if (icon.title === 'Hide icons') { // Hide icons iconsToToggle.forEach(function(element) { element.style.display = 'none'; }); icon.title = 'Show icons'; // Change tooltip icon.style.transform = 'translateY(-50%) rotate(90deg)'; // Rotate icon } else { // Show icons iconsToToggle.forEach(function(element) { element.style.display = 'block'; }); icon.title = 'Hide icons'; // Change tooltip icon.style.transform = 'translateY(-50%) rotate(270deg)'; // Rotate back } } // Initial icon creation createIcon(); } </script> <style> #floatingCart {z-index: 9999;} .header {z-index: 1000; } @media (min-width: 750px) { #floatingCart { right: 80px;} } @media (max-width: 750px) { .iconsbackground { display: none; } } </style> <script id="Sidecar background"> // Function to check URL validity function isUrlValid() { const url = window.location.href; // Get the current URL // Check for 4 or more forward slashes in the URL const slashCount = (url.match(/\//g) || []).length; if (slashCount < 4) return false; // Check for specific URL formats (Issue+[no.] or Journal+[no.]) const magazineIssuePattern = /\/magazine\/Issue\+\d+/; const journalIssuePattern = /\/journal\/Journal\+\d+/; if (magazineIssuePattern.test(url) || journalIssuePattern.test(url)) return false; // Check for excluded strings in the URL const excludedStrings = ['/search', '/category/', '/tag/', '/shop/', '/models/', '/maps/', '/images/', '/videos/', '/audio/']; for (const str of excludedStrings) { if (url.includes(str)) return false; } // Check for URLs containing '/affiliates/', '/groups/', or '/grants/' unless they also contain '/category/' const restrictedPaths = ['/affiliates/', '/groups/', '/grants/']; for (const path of restrictedPaths) { if (url.includes(path) && !url.includes('/category/')) return false; } // Check for specific URL endings const excludedEndings = [ '/records/textus-roffensis', '/records/custumale-roffense', '/records/tithe-commutation-surveys, '/records/rochester-bestiary', '/records/monumental-inscriptions', '/records/feet-of-fines', '/records/wills', '/notes/dialect', '/notes/motifs', '/notes/medical-personnel-canterbury' ]; for (const ending of excludedEndings) { if (url.endsWith(ending)) return false; } return true; } // Function to insert the sidebar function insertSidebar() { const sidebar = document.createElement('div'); // Create a new div element sidebar.className = 'iconsbackground'; // Assign the class 'iconsbackground' to the div sidebar.style.width = '50px'; sidebar.style.height = '100vh'; // Full viewport height sidebar.style.position = 'fixed'; sidebar.style.top = '0'; sidebar.style.right = '15px'; // Align to the right side of the page sidebar.style.backgroundColor = 'white'; sidebar.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.1)'; // Add shadow around the div sidebar.style.zIndex = '100'; // Set a high z-index to ensure visibility document.body.appendChild(sidebar); // Append the new div to the body applyCustomStyles(); // Apply the additional CSS } // Function to apply custom CSS function applyCustomStyles() { const style = document.createElement('style'); style.textContent = ` /* Basic styling for body */ @media (min-width: 750px) { content { margin: 10px; /* Apply the margin to content element */ } } `; document.head.appendChild(style); // Append the style to the document head } // Function to check and insert the sidebar if the screen is wider than 750px function checkScreenWidth() { if (window.innerWidth > 750 && !document.querySelector('.iconsbackground')) { insertSidebar(); } else if (window.innerWidth <= 750) { const sidebar = document.querySelector('.iconsbackground'); if (sidebar) { sidebar.remove(); // Remove the sidebar if the screen width is 750px or less } } } // Initial check when the page loads window.addEventListener('load', function() { if (isUrlValid()) checkScreenWidth(); }); // Event listener for window resize to check if width changes window.addEventListener('resize', function() { if (isUrlValid()) checkScreenWidth(); }); </script> <style> /* Styling for the dynamically created container */ .new-icons-container { display: flex; gap: 10px; /* Spacing between icons */ justify-content: start; /* Aligns icons to the left initially */ overflow-x: auto; /* Allows horizontal scrolling */ position: fixed; /* Positions the container at the bottom of the page */ bottom: 0; /* Aligns it to the bottom */ left: 0; /* Starts from the left side of the page */ right: 0; /* Ends at the right side of the page */ padding: 10px; /* Padding around the container */ background-color: white; /* Background color for visibility */ z-index: 1000; /* Ensures it stays above other content */ box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); /* Adds a subtle shadow for better visibility */ } .icon-wrapper { flex: 0 0 auto; /* Prevents wrapping and maintains icon size */ display: flex; /* Flex to center align the icon */ align-items: center; /* Vertical centering */ justify-content: center; /* Horizontal centering */ margin: 0 5px; /* Space between icons */ box-sizing: border-box; /* Ensure padding and border are included in the width */ } /* Specific styling for the license symbol to ensure proper alignment */ .license-svg { display: inline-block; /* Make sure it is treated as an inline element */ vertical-align: middle; /* Align the symbol vertically */ } /* Make all icons selectable */ .new-icons-container * { pointer-events: auto; /* Ensure all icons are selectable */ } </style> <script id="clean the url"> // Function to remove specific query parameters from the URL function removeQueryParams(paramsToRemove) { // Get the current URL let url = window.location.href; // Create a URL object let urlObj = new URL(url); // Get the search parameters let params = new URLSearchParams(urlObj.search); // Remove specified parameters paramsToRemove.forEach(param => params.delete(param)); // Update the URL without reloading the page let newUrl = urlObj.origin + urlObj.pathname; if (params.toString()) { newUrl += '?' + params.toString(); } history.replaceState(null, '', newUrl); } // Run the function after all other scripts and content have loaded window.addEventListener('load', () => { removeQueryParams(['offset', 'reversePaginate']); }); document.addEventListener('DOMContentLoaded', (event) => { let url = window.location.href; let rqIndex = url.indexOf('?rq='); if (rqIndex !== -1) { let cleanUrl = url.substring(0, rqIndex); console.log("The processed URL is: " + cleanUrl); // Optional: Update the URL in the address bar without reloading the page history.replaceState(null, null, cleanUrl); } }); </script> <style>.custom-arrow-up { transition: transform 0.3s ease; /* Adds a smooth transition effect */ } .custom-arrow-up:hover { transform: scale(1.2); /* Scales the icon to 120% of its original size */ }</style> <script> document.addEventListener('DOMContentLoaded', function() { function handlePageFunctionality() { // Check if the page width is greater than 750px if (window.innerWidth > 750) { // Get the current page URL const currentUrl = window.location.href; // Check if the URL contains 2 or more forward slashes after the protocol (e.g., http://) const urlPath = currentUrl.split('//')[1] || ''; // Get the part after the protocol const forwardSlashCount = (urlPath.match(/\//g) || []).length; // Check for invalid strings in the URL const hasInvalidString = currentUrl.includes('/category/') || currentUrl.includes('offset') || currentUrl.includes('/tag/'); // Proceed only if there are 2 or more forward slashes and no invalid strings if (forwardSlashCount >= 2 && !hasInvalidString) { const itemPagination = document.getElementById('itemPagination'); if (itemPagination) { // Hide the original div itemPagination.style.display = 'none'; // Get the previous and next links and titles const prevLink = itemPagination.querySelector('.item-pagination-link--prev'); const nextLink = itemPagination.querySelector('.item-pagination-link--next'); const prevTitle = prevLink ? 'Previous: ' + prevLink.querySelector('.item-pagination-title').textContent : 'Previous'; const nextTitle = nextLink ? 'Next: ' + nextLink.querySelector('.item-pagination-title').textContent : 'Next'; // Create style element for hover effect const style = document.createElement('style'); style.textContent = ` .custom-arrow-up:hover svg { transform: scale(1.1) rotate(180deg); /* Apply scaling and maintain rotation on hover */ } .custom-arrow-down:hover svg { transform: scale(1.2); /* Increase size by 10% on hover for down arrow */ } .custom-arrow-up svg, .custom-arrow-down svg { transition: transform 0.2s ease; /* Ensure smooth transition for both arrows */ } `; document.head.appendChild(style); // Create up arrow button dynamically and assign unique classes const upArrow = document.createElement('a'); upArrow.href = prevLink ? prevLink.href : '#'; upArrow.title = prevTitle; upArrow.className = 'custom-arrow-up'; upArrow.style.cssText = 'position:fixed !important; top:6vh !important; left:-3px !important; z-index:900 !important; cursor:pointer !important; display: block !important;'; // Create SVG for up arrow icon const upArrowIcon = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); upArrowIcon.setAttribute('width', '45px'); // Increased size by 80% upArrowIcon.setAttribute('height', '45px'); // Increased size by 80% upArrowIcon.setAttribute('viewBox', '240 40 60 60'); upArrowIcon.style.cssText = 'transform: rotate(90deg); fill: #1c4d85; display: block; transition: transform 0.2s ease;'; const upArrowPath = document.createElementNS('http://www.w3.org/2000/svg', 'path'); upArrowPath.setAttribute('d', 'm 253.97113,46.304933 c -3.69067,0.653521 -6.16196,4.923102 -4.1729,8.342048 1.23005,2.114285 3.51407,3.839104 5.23124,5.55625 l 10.58333,10.583333 c 2.04946,2.049463 3.97378,4.173009 7.14375,3.617119 2.65457,-0.465402 4.55348,-3.143514 6.35,-4.940035 4.53866,-4.538663 10.44231,-9.027319 14.11579,-14.2875 1.72931,-2.475971 1.1049,-6.246284 -1.42611,-7.945438 -5.95788,-3.999442 -12.03963,6.277568 -16.12926,9.532938 -0.96228,0.765982 -3.96875,3.424766 -3.96875,3.424766 0,0 -3.09907,-2.555081 -3.96875,-3.424766 -3.15886,-3.158861 -8.64129,-11.364384 -13.75834,-10.458715 z'); upArrowPath.style.fill = '#1c4d85'; upArrowIcon.appendChild(upArrowPath); upArrow.appendChild(upArrowIcon); document.body.appendChild(upArrow); // Create down arrow button dynamically and assign unique classes const downArrow = document.createElement('a'); downArrow.href = nextLink ? nextLink.href : '#'; downArrow.title = nextTitle; downArrow.className = 'custom-arrow-down'; downArrow.style.cssText = 'position:fixed !important; top:7vh !important; right:7px !important; z-index:800 !important; cursor:pointer !important; display: block !important;'; // Create SVG for down arrow icon const downArrowIcon = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); downArrowIcon.setAttribute('width', '45px'); // Increased size by 80% downArrowIcon.setAttribute('height', '45px'); // Increased size by 80% downArrowIcon.setAttribute('viewBox', '240 40 60 60'); downArrowIcon.style.cssText = 'transform: rotate(270deg); fill: #1c4d85; display: block; transition: transform 0.2s ease;'; const downArrowPath = document.createElementNS('http://www.w3.org/2000/svg', 'path'); downArrowPath.setAttribute('d', 'm 253.97113,46.304933 c -3.69067,0.653521 -6.16196,4.923102 -4.1729,8.342048 1.23005,2.114285 3.51407,3.839104 5.23124,5.55625 l 10.58333,10.583333 c 2.04946,2.049463 3.97378,4.173009 7.14375,3.617119 2.65457,-0.465402 4.55348,-3.143514 6.35,-4.940035 4.53866,-4.538663 10.44231,-9.027319 14.11579,-14.2875 1.72931,-2.475971 1.1049,-6.246284 -1.42611,-7.945438 -5.95788,-3.999442 -12.03963,6.277568 -16.12926,9.532938 -0.96228,0.765982 -3.96875,3.424766 -3.96875,3.424766 0,0 -3.09907,-2.555081 -3.96875,-3.424766 -3.15886,-3.158861 -8.64129,-11.364384 -13.75834,-10.458715 z'); downArrowPath.style.fill = '#1c4d85'; downArrowIcon.appendChild(downArrowPath); downArrow.appendChild(downArrowIcon); document.body.appendChild(downArrow); } } } } // Initial check when the page is loaded handlePageFunctionality(); // Check again if the window is resized window.addEventListener('resize', handlePageFunctionality); }); </script> <style> .custom-arrow-left { transition: transform 0.3s ease; /* Adds a smooth transition effect */ } .custom-arrow-left:hover { transform: scale(1.2); /* Scales the icon to 120% of its original size */ } @media (min-width: 750px) { .custom-arrow-left { display: none; /* Hides the icons when the screen width is wider than 750px */ } } /* CSS for the icon styling and hover effect */ .comment-icon-container { position: fixed; bottom: 6vh; left: 7px !important; width: 30px; height: 30px; cursor: pointer; z-index: 1000; /* Ensure it appears on top */ transition: transform 0.2s ease-in-out; /* Smooth transition for hover effect */ } .comment-icon-container:hover { transform: scale(1.1); /* Grow by 10% on hover */ } /* CSS to move the div 100px higher, add padding between icons, and scale on hover for mobile devices */ @media (max-width: 768px) { /* Adjust the max-width as needed for your mobile breakpoint */ .header-menu-actions { position: relative; top: -75px; /* Moves the div 100px higher */ left: -50px; /* Moves the div 100px higher */ } .header-menu-actions .icon { transform: scale(1.5); /* Increases the size of the icons by 50% */ transform-origin: center; /* Ensures the scaling is from the center */ display: inline-block; /* Ensures the transform works correctly */ margin: 10px; /* Adds 10px of space between icons (5px on each side) */ transition: transform 0.3s ease; /* Smooth transition for the transform property */ } .header-menu-actions .icon:hover, .header-menu-actions .icon:focus { transform: scale(1.8); /* Increases the size of the icons by 20% on hover or focus */ } } @media screen and (max-width: 750px) { .blog-more-link { display: none !important; } } @media screen and (min-width: 750px) { .blog-item-inner-wrapper { transform: translateX(-20px); } } </style> <script> document.addEventListener("DOMContentLoaded", function () { console.log("DOM fully loaded and parsed."); // Get the current page URL const currentUrl = window.location.href; console.log("Current URL:", currentUrl); // Check the number of slashes in the URL (excluding the protocol) const urlPath = currentUrl.replace(/^https?:\/\//, ''); // Remove protocol const slashCount = (urlPath.match(/\//g) || []).length; // Prevent script execution if there is only one slash in the URL path if (slashCount === 1) { console.log("Script execution skipped due to single slash in URL:", currentUrl); return; } // Define the URLs where the script should not run const excludedUrls = [ "https://www.kentarchaeology.org.uk/search", "https://www.kentarchaeology.org.uk/contact", "https://www.kentarchaeology.org.uk/donate", "https://www.kentarchaeology.org.uk/licensing", "https://www.kentarchaeology.org.uk/guidance", "https://www.kentarchaeology.org.uk/privacy", "https://www.kentarchaeology.org.uk/" ]; // Define substrings to prevent script execution const excludedSubstrings = [ '/tag/', '/category/', 'offset', // Additional substrings to prevent script execution '/shop', '/join', '/donate', '/stores', '/support', '/documents', '/p/', '/guidance', '/minutes' ]; // Check if the current URL is in the excluded URLs if (excludedUrls.includes(currentUrl)) { console.log("Script execution skipped for excluded URL:", currentUrl); return; // Exit the script early if the URL is excluded } // Check if the current URL contains any excluded substrings if (excludedSubstrings.some(substring => currentUrl.includes(substring))) { console.log("Script execution skipped due to URL containing excluded substrings:", currentUrl); return; // Exit the script early if any of the substrings are found } console.log("Proceeding with script execution."); // Select the comments section const commentsSection = document.querySelector('section.blog-item-comments'); console.log("Comments section found:", commentsSection); // Select the target sidebar where the comments will be moved const sidebar = document.querySelector('.sidebar'); console.log("Sidebar found:", sidebar); // Create a div container for the SVG icon const svgIconContainer = document.createElement('div'); svgIconContainer.className = 'comment-icon-container'; // Use the class for styling if (commentsSection && sidebar) { console.log("Both comments section and sidebar are available. Proceeding with DOM manipulation."); // Move the comments section to the sidebar sidebar.appendChild(commentsSection); // Hide the comments section initially commentsSection.style.display = 'none'; // Set the tooltip for available comments svgIconContainer.title = 'Comments'; // Add the SVG icon to the container (normal blue version) svgIconContainer.innerHTML = ` <svg width="40" height="40" viewBox="0 0 60 60" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-56.419706,-164.20289)"><path style="fill:#12518D;stroke-width:0.264583" d="m 68.500199,210.38933 c -0.0643,0 0.01872,-0.84153 0.1427,-1.76896 0.123985,-0.92742 0.355458,-2.74105 0.514394,-4.03027 0.158937,-1.28923 0.333728,-2.41648 0.388436,-2.50499 0.248053,-0.40135 -1.811076,-1.40119 -2.902837,-2.03525 -4.673001,-2.71395 -7.912785,-6.53172 -9.617656,-11.3335 -0.802303,-2.25969 -0.808271,-6.67196 -0.01236,-9.1688 2.276212,-7.14099 9.164633,-12.52533 19.086543,-14.91901 1.501879,-0.36234 2.816613,-0.43846 7.32222,-0.42401 4.914849,0.0158 5.696756,0.0752 7.444265,0.56527 1.073919,0.3012 2.342852,0.64593 2.819841,0.76606 1.030802,0.2596 4.033945,1.51835 5.306808,2.22432 4.569507,2.53437 8.259747,6.3988 9.872907,10.33894 1.03023,2.51636 1.19734,3.50151 1.09782,6.47191 -0.14184,4.23327 -1.0428,6.60307 -3.8266,10.06507 -2.6775,3.32979 -7.351935,6.44978 -11.975782,7.99332 -3.629386,1.21157 -8.562057,1.836 -12.831011,1.62429 -3.424677,-0.16984 -3.894697,-0.9033 -7.183054,1.82354 -1.247336,1.03434 -2.433534,2.01768 -2.635987,2.18519 -0.202459,0.16752 -0.773969,0.62825 -1.27002,1.02387 -0.496052,0.39562 -0.967198,0.82425 -1.046996,0.95251 -0.1425,0.22904 -0.463362,0.1505 -0.693602,0.1505 z m 3.836996,-23.25074 c 1.608324,-1.05381 2.067417,-3.45389 0.942724,-4.92843 -1.176574,-1.54257 -2.88579,-1.95814 -4.506558,-1.09571 -0.969642,0.51596 -1.938832,2.0286 -1.944772,3.03524 -0.0046,0.73395 0.734094,2.36416 1.259532,2.78068 1.066512,0.84544 3.122767,0.9462 4.249074,0.20822 z m 12.703209,0.0794 c 0.781631,-0.37095 1.798236,-2.14716 1.798236,-3.14188 0,-0.34741 -0.298313,-1.09171 -0.662916,-1.654 -2.005794,-3.09341 -6.415233,-1.831 -6.415233,1.83666 0,2.64605 2.723488,4.17247 5.279913,2.95922 z m 12.520148,0.0946 c 1.723782,-0.87898 2.433458,-3.01362 1.556129,-4.68069 -1.727711,-3.28291 -6.524865,-2.12136 -6.524865,1.57988 0,2.69808 2.589432,4.31406 4.968736,3.10081 z" id="path279" /></g></svg> `; // Variable to track the state of the sidebar content let isCommentsVisible = false; // Add an event listener to show/hide the comments section and restore/hide sidebar content svgIconContainer.addEventListener('click', function () { console.log("SVG icon clicked."); if (commentsSection && sidebar) { console.log("Toggling visibility of comments section."); // Toggle the display state if (!isCommentsVisible) { console.log("Showing comments section."); // Hide all other content in the sidebar Array.from(sidebar.children).forEach(function(child) { if (child !== commentsSection) { child.style.display = 'none'; } }); // Show the comments section commentsSection.style.display = 'block'; } else { console.log("Hiding comments section."); // Show all other content in the sidebar Array.from(sidebar.children).forEach(function(child) { if (child !== commentsSection) { child.style.display = 'block'; } }); // Hide the comments section commentsSection.style.display = 'none'; } // Toggle the visibility state isCommentsVisible = !isCommentsVisible; } }); } else { console.warn("Comments section or sidebar not found."); // Set the tooltip for unavailable comments svgIconContainer.title = 'Commenting not available'; // Add the SVG icon to the container (light grey version) svgIconContainer.innerHTML = ` <svg width="40" height="40" viewBox="0 0 60 60" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-56.419706,-164.20289)"><path style="fill:#12518D;stroke-width:0.264583" d="m 68.500199,210.38933 c -0.0643,0 0.01872,-0.84153 0.1427,-1.76896 0.123985,-0.92742 0.355458,-2.74105 0.514394,-4.03027 0.158937,-1.28923 0.333728,-2.41648 0.388436,-2.50499 0.248053,-0.40135 -1.811076,-1.40119 -2.902837,-2.03525 -4.673001,-2.71395 -7.912785,-6.53172 -9.617656,-11.3335 -0.802303,-2.25969 -0.808271,-6.67196 -0.01236,-9.1688 2.276212,-7.14099 9.164633,-12.52533 19.086543,-14.91901 1.501879,-0.36234 2.816613,-0.43846 7.32222,-0.42401 4.914849,0.0158 5.696756,0.0752 7.444265,0.56527 1.073919,0.3012 2.342852,0.64593 2.819841,0.76606 1.030802,0.2596 4.033945,1.51835 5.306808,2.22432 4.569507,2.53437 8.259747,6.3988 9.872907,10.33894 1.03023,2.51636 1.19734,3.50151 1.09782,6.47191 -0.14184,4.23327 -1.0428,6.60307 -3.8266,10.06507 -2.6775,3.32979 -7.351935,6.44978 -11.975782,7.99332 -3.629386,1.21157 -8.562057,1.836 -12.831011,1.62429 -3.424677,-0.16984 -3.894697,-0.9033 -7.183054,1.82354 -1.247336,1.03434 -2.433534,2.01768 -2.635987,2.18519 -0.202459,0.16752 -0.773969,0.62825 -1.27002,1.02387 -0.496052,0.39562 -0.967198,0.82425 -1.046996,0.95251 -0.1425,0.22904 -0.463362,0.1505 -0.693602,0.1505 z m 3.836996,-23.25074 c 1.608324,-1.05381 2.067417,-3.45389 0.942724,-4.92843 -1.176574,-1.54257 -2.88579,-1.95814 -4.506558,-1.09571 -0.969642,0.51596 -1.938832,2.0286 -1.944772,3.03524 -0.0046,0.73395 0.734094,2.36416 1.259532,2.78068 1.066512,0.84544 3.122767,0.9462 4.249074,0.20822 z m 12.703209,0.0794 c 0.781631,-0.37095 1.798236,-2.14716 1.798236,-3.14188 0,-0.34741 -0.298313,-1.09171 -0.662916,-1.654 -2.005794,-3.09341 -6.415233,-1.831 -6.415233,1.83666 0,2.64605 2.723488,4.17247 5.279913,2.95922 z m 12.520148,0.0946 c 1.723782,-0.87898 2.433458,-3.01362 1.556129,-4.68069 -1.727711,-3.28291 -6.524865,-2.12136 -6.524865,1.57988 0,2.69808 2.589432,4.31406 4.968736,3.10081 z" id="path279" /></g></svg> `; } // Append the SVG container to the body document.body.appendChild(svgIconContainer); console.log("SVG icon added to the body."); }); </script> <style> /* CSS for the icon styling and hover effect */ .comment-icon-container { position: fixed; bottom: 6vh; left: 7px !important; width: 30px; height: 30px; cursor: pointer; z-index: 1000; /* Ensure it appears on top */ transition: transform 0.2s ease-in-out; /* Smooth transition for hover effect */ } .comment-icon-container:hover { transform: scale(1.1); /* Grow by 10% on hover */ } /* Style for the comments title with top margin */ .comments-title { margin-top: 16vh; padding-left: 5px; /* Reduced gap next to exclamation */ } /* Style for the textbox */ .comment-warning-box { display: flex; align-items: center; padding: 10px; border: 1px solid #ccc; background-color: #f8f8f8; border-radius: 5px; margin-top: 30px; font-size: 18px; /* Slightly larger font size */ line-height: 1.3; /* Decreased gap between lines */ font-family: serif; margin-left: 5px; /* Reduced gap next to exclamation */ } /* Exclamation mark style */ .comment-warning-box::before { content: "❗"; color: red; font-size: 20px; /* Slightly smaller exclamation mark */ margin-right: 8px; /* Reduced gap next to exclamation */ } </style> <script> document.addEventListener("DOMContentLoaded", function () { console.log("DOM fully loaded and parsed."); // Get the current page URL const currentUrl = window.location.href; console.log("Current URL:", currentUrl); // Check the number of slashes in the URL (excluding the protocol) const urlPath = currentUrl.replace(/^https?:\/\//, ''); // Remove protocol const slashCount = (urlPath.match(/\//g) || []).length; // Check if the URL is the homepage const isHomepage = currentUrl === 'https://www.kentarchaeology.org.uk/' || currentUrl === 'https://kentarchaeology.org.uk/'; // Check if the URL matches the contact or search pages const isContactOrSearchPage = currentUrl === 'https://www.kentarchaeology.org.uk/contact' || currentUrl === 'https://www.kentarchaeology.org.uk/search' || currentUrl === 'https://www.kentarchaeology.org.uk/donate'; // List of substrings that should allow script execution const urlContainsAllowedString = currentUrl.includes('/tag/') || currentUrl.includes('/category/') || currentUrl.includes('offset') || currentUrl.includes('/affiliates/category') || currentUrl.includes('/grants/category/') || currentUrl.includes('/groups/category/'); // List of substrings that should prevent script execution const urlContainsExcludedString = currentUrl.includes('/shop') || currentUrl.includes('/join') || currentUrl.includes('/stores') || currentUrl.includes('/support') || currentUrl.includes('/licensing') || currentUrl.includes('/privacy') || currentUrl.includes('/documents') || currentUrl.includes('/p/') || currentUrl.includes('/guidance') || currentUrl.includes('/minutes'); // Stop script execution if it's the homepage, contact page, search page, // or if it contains any excluded strings if (isHomepage || isContactOrSearchPage || urlContainsExcludedString || (slashCount !== 1 && !urlContainsAllowedString)) { console.log("Script execution skipped; URL does not meet criteria:", currentUrl); return; } console.log("Proceeding with script execution."); // Select the target sidebar where the comments will be shown const sidebar = document.querySelector('.sidebar'); console.log("Sidebar found:", sidebar); // Create a div container for the SVG icon const svgIconContainer = document.createElement('div'); svgIconContainer.className = 'comment-icon-container'; // Use the class for styling // Add the SVG icon to the container (normal blue version) svgIconContainer.innerHTML = ` <svg width="40" height="40" viewBox="0 0 60 60" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-56.419706,-164.20289)"><path style="fill:#12518D;stroke-width:0.264583" d="m 68.500199,210.38933 c -0.0643,0 0.01872,-0.84153 0.1427,-1.76896 0.123985,-0.92742 0.355458,-2.74105 0.514394,-4.03027 0.158937,-1.28923 0.333728,-2.41648 0.388436,-2.50499 0.248053,-0.40135 -1.811076,-1.40119 -2.902837,-2.03525 -4.673001,-2.71395 -7.912785,-6.53172 -9.617656,-11.3335 -0.802303,-2.25969 -0.808271,-6.67196 -0.01236,-9.1688 2.276212,-7.14099 9.164633,-12.52533 19.086543,-14.91901 1.501879,-0.36234 2.816613,-0.43846 7.32222,-0.42401 4.914849,0.0158 5.696756,0.0752 7.444265,0.56527 1.073919,0.3012 2.342852,0.64593 2.819841,0.76606 1.030802,0.2596 4.033945,1.51835 5.306808,2.22432 4.569507,2.53437 8.259747,6.3988 9.872907,10.33894 1.03023,2.51636 1.19734,3.50151 1.09782,6.47191 -0.14184,4.23327 -1.0428,6.60307 -3.8266,10.06507 -2.6775,3.32979 -7.351935,6.44978 -11.975782,7.99332 -3.629386,1.21157 -8.562057,1.836 -12.831011,1.62429 -3.424677,-0.16984 -3.894697,-0.9033 -7.183054,1.82354 -1.247336,1.03434 -2.433534,2.01768 -2.635987,2.18519 -0.202459,0.16752 -0.773969,0.62825 -1.27002,1.02387 -0.496052,0.39562 -0.967198,0.82425 -1.046996,0.95251 -0.1425,0.22904 -0.463362,0.1505 -0.693602,0.1505 z m 3.836996,-23.25074 c 1.608324,-1.05381 2.067417,-3.45389 0.942724,-4.92843 -1.176574,-1.54257 -2.88579,-1.95814 -4.506558,-1.09571 -0.969642,0.51596 -1.938832,2.0286 -1.944772,3.03524 -0.0046,0.73395 0.734094,2.36416 1.259532,2.78068 1.066512,0.84544 3.122767,0.9462 4.249074,0.20822 z m 12.703209,0.0794 c 0.781631,-0.37095 1.798236,-2.14716 1.798236,-3.14188 0,-0.34741 -0.298313,-1.09171 -0.662916,-1.654 -2.005794,-3.09341 -6.415233,-1.831 -6.415233,1.83666 0,2.64605 2.723488,4.17247 5.279913,2.95922 z m 12.520148,0.0946 c 1.723782,-0.87898 2.433458,-3.01362 1.556129,-4.68069 -1.727711,-3.28291 -6.524865,-2.12136 -6.524865,1.57988 0,2.69808 2.589432,4.31406 4.968736,3.10081 z" id="path279" /></g></svg> `; // Add an event listener to show comments section svgIconContainer.addEventListener('click', function () { console.log("SVG icon clicked."); if (sidebar) { console.log("Hiding sidebar content and showing comments."); // Hide all other content in the sidebar Array.from(sidebar.children).forEach(function(child) { child.style.display = 'none'; }); // Create and display title and paragraph with styles const commentsTitle = document.createElement('h2'); commentsTitle.className = 'comments-title'; commentsTitle.textContent = 'Commenting'; const commentsInfo = document.createElement('p'); commentsInfo.textContent = 'Commenting is now available on articles and resources. Visitors can highlight relevant information, provide additional context, reflection or flag an inaccuracy.'; commentsInfo.style.marginLeft = '10px'; const commentWarningBox = document.createElement('div'); commentWarningBox.className = 'comment-warning-box'; commentWarningBox.textContent = 'Please note comments are moderated prior to publication.'; sidebar.appendChild(commentsTitle); sidebar.appendChild(commentsInfo); sidebar.appendChild(commentWarningBox); } }); // Append the SVG container to the body document.body.appendChild(svgIconContainer); console.log("SVG icon added to the body."); }); </script> <script> document.addEventListener('DOMContentLoaded', function () { // Check if the current URL is the homepage if (window.location.pathname === '/' || window.location.pathname === '/index.html') { return; // Exit the script if it's the homepage } function createIconsContainer() { // Check if the new div already exists to prevent duplicates if (document.querySelector('.new-icons-container')) return; // Create the new div container for the icons const newDiv = document.createElement('div'); newDiv.classList.add('new-icons-container'); // Define the icons to move by their selectors const iconSelectors = [ '.tags-icon', '.search-icon', '.map-icon', '.link-icon', '.data-icon', '.linked-data-icon', '.custom-arrow-left', '.lefticons-background', '#restoreIcon', '.comment-icon-container', '.pdf-icon', '.toggle-icon', '.translate-icon', '#speechIconContainer', '.gallery-icon', '.cinema-mode-button', '.license-svg', '.tour-icon' ]; // Append each icon to a wrapper div and then to the new container iconSelectors.forEach(selector => { const icon = document.querySelector(selector); if (icon) { // Create a wrapper div for each icon const iconWrapper = document.createElement('div'); iconWrapper.classList.add('icon-wrapper'); // Reset any previous styles that may interfere with layout icon.style.position = 'static'; icon.style.margin = '0 auto'; // Center the icon inside the wrapper icon.style.flex = '0 1 auto'; // Special handling for the license symbol to ensure proper alignment and selection if (selector === '.license-svg') { icon.style.display = 'inline-block'; icon.style.verticalAlign = 'middle'; } // Append the icon to its wrapper iconWrapper.appendChild(icon); // Append the wrapper to the new container newDiv.appendChild(iconWrapper); } }); // Append the new div to the body document.body.appendChild(newDiv); } function handleResize() { if (window.innerWidth < 750) { createIconsContainer(); } else { // Optionally, remove the dynamically created container if the width is above 750px const newIconsContainer = document.querySelector('.new-icons-container'); if (newIconsContainer) newIconsContainer.remove(); } } // Run on page load handleResize(); // Add event listener for window resize window.addEventListener('resize', handleResize); }); </script> <script> document.addEventListener('DOMContentLoaded', function() { // Get the current URL const currentUrl = window.location.href; // Regular expressions to match the desired formats and extract numbers or names const journalPattern = /^https:\/\/www\.kentarchaeology\.org\.uk\/journal\/category\/Volume\+(\d+)$/; const magazinePattern = /^https:\/\/www\.kentarchaeology\.org\.uk\/magazine\/category\/Issue\+(\d+)$/; const grantsPattern = /^https:\/\/www\.kentarchaeology\.org\.uk\/grants\/category\/([^\/]+)$/; const groupsPattern = /^https:\/\/www\.kentarchaeology\.org\.uk\/groups\/category\/([^\/]+)$/; const affiliatesPattern = /^https:\/\/www\.kentarchaeology\.org\.uk\/affiliates\/category\/([^\/]+)$/; const recordsPattern = /^https:\/\/www\.kentarchaeology\.org\.uk\/records\/category\/([^\/]+)$/; // New pattern for records const referencePattern = /^https:\/\/www\.kentarchaeology\.org\.uk\/notes\/category\/([^\/]+)$/; // Match the URL against the patterns const journalMatch = currentUrl.match(journalPattern); const magazineMatch = currentUrl.match(magazinePattern); const grantsMatch = currentUrl.match(grantsPattern); const groupsMatch = currentUrl.match(groupsPattern); const affiliatesMatch = currentUrl.match(affiliatesPattern); const recordsMatch = currentUrl.match(recordsPattern); // Match the records pattern const referenceMatch = currentUrl.match(referencePattern); // If the URL matches the journal pattern if (journalMatch) { const volumeNumber = journalMatch[1]; const shortenedJournalUrl = `https://www.kentarchaeology.org.uk/journal/${volumeNumber}`; window.history.pushState({}, '', shortenedJournalUrl); console.log("Updated Journal URL:", shortenedJournalUrl); } // If the URL matches the magazine pattern else if (magazineMatch) { const issueNumber = magazineMatch[1]; const shortenedMagazineUrl = `https://www.kentarchaeology.org.uk/magazine/${issueNumber}`; window.history.pushState({}, '', shortenedMagazineUrl); console.log("Updated Magazine URL:", shortenedMagazineUrl); } // If the URL matches the grants pattern else if (grantsMatch) { const categoryName = grantsMatch[1]; const shortenedGrantsUrl = `https://www.kentarchaeology.org.uk/grants/${categoryName}`; window.history.pushState({}, '', shortenedGrantsUrl); console.log("Updated Grants URL:", shortenedGrantsUrl); } // If the URL matches the groups pattern else if (groupsMatch) { const categoryName = groupsMatch[1]; const shortenedGroupsUrl = `https://www.kentarchaeology.org.uk/groups/${categoryName}`; window.history.pushState({}, '', shortenedGroupsUrl); console.log("Updated Groups URL:", shortenedGroupsUrl); } // If the URL matches the affiliates pattern else if (affiliatesMatch) { const categoryName = affiliatesMatch[1]; const shortenedAffiliatesUrl = `https://www.kentarchaeology.org.uk/affiliates/${categoryName}`; window.history.pushState({}, '', shortenedAffiliatesUrl); console.log("Updated Affiliates URL:", shortenedAffiliatesUrl); } // If the URL matches the records pattern (newly added) else if (recordsMatch) { const categoryName = recordsMatch[1]; const shortenedRecordsUrl = `https://www.kentarchaeology.org.uk/records/${categoryName}`; window.history.pushState({}, '', shortenedRecordsUrl); console.log("Updated Records URL:", shortenedRecordsUrl); } // If the URL matches the records pattern (newly added) else if (referenceMatch) { const categoryName = referenceMatch[1]; const shortenedReferenceUrl = `https://www.kentarchaeology.org.uk/notes/${categoryName}`; window.history.pushState({}, '', shortenedReferenceUrl); console.log("Updated Reference URL:", shortenedReferenceUrl); } }); (function() { let currentUrl = window.location.href; // Check if the URL includes any of the specified sections if (currentUrl.includes('/affiliates/') || currentUrl.includes('/grants/') || currentUrl.includes('/groups/') || currentUrl.includes('/notes/') || currentUrl.includes('/records/')) { // Check for uppercase letters or plus signs in the URL if (/[A-Z+]/.test(currentUrl)) { // Replace uppercase letters with lowercase and plus signs with hyphens let newUrl = currentUrl.replace(/[A-Z]/g, (match) => match.toLowerCase()) .replace(/\+/g, '-'); // Update the URL in the address bar without reloading the page window.history.replaceState(null, null, newUrl); } } })(); </script> <script> document.addEventListener('DOMContentLoaded', function() { // List of URLs to match and trim the last portion const urlsToMatch = [ 'https://www.kentarchaeology.org.uk/groups/society-groups', 'https://www.kentarchaeology.org.uk/affiliates/society-affiliates', 'https://www.kentarchaeology.org.uk/grants/funds', 'https://www.kentarchaeology.org.uk/records/sources', 'https://www.kentarchaeology.org.uk/notes/sources' // Added records section trimming ]; // Function to trim the URL as it appears in the address bar function trimAddressBarUrl() { const currentAddress = window.location.href; // Check if the current address matches any of the URLs in the list for (const url of urlsToMatch) { if (currentAddress === url) { const trimmedAddress = url.substring(0, url.lastIndexOf('/')); window.history.replaceState(null, '', trimmedAddress); break; } } } // Call the function to trim the address if needed trimAddressBarUrl(); }); </script> <style> @media (max-width: 750px) { .gallery-svg { transform: translateY(40px); /* Moves the SVG icon 20px lower */ } #speechIconContainer svg { transform: translateY(25px); /* Moves only the SVG icons within the container 40px lower */ } .translate-icon { transform: translateY(5px); /* Moves the div 10px lower */ } } </style> <script> // Function to change the color of the specified divs function changeDivColors() { // Select the elements using their class names const elements = document.querySelectorAll('.burger-inner div'); // Define the new color const newColor = 'rgb(18, 81, 141)'; // Apply the new color to the background of each selected element elements.forEach(element => { element.style.backgroundColor = newColor; }); } // Ensure the function runs after the DOM content is loaded window.addEventListener('load', changeDivColors); </script> <script> // Function to check if the current URL is the homepage function isHomepage() { return window.location.href === 'https://www.kentarchaeology.org.uk/' || window.location.href === 'https://www.kentarchaeology.org.uk/index.html'; } // Function to add a tooltip to the top right of the screen function addTooltip() { // Create the tooltip element const tooltip = document.createElement('div'); tooltip.textContent = 'Menu'; tooltip.style.position = 'fixed'; tooltip.style.top = '10vh'; tooltip.style.right = '30px'; tooltip.style.padding = '5px 10px'; tooltip.style.backgroundColor = '#333'; tooltip.style.color = '#fff'; tooltip.style.borderRadius = '4px'; tooltip.style.fontSize = '14px'; tooltip.style.zIndex = '1000'; tooltip.style.boxShadow = '0 2px 5px rgba(0, 0, 0, 0.2)'; tooltip.style.cursor = 'pointer'; // Add the tooltip to the body document.body.appendChild(tooltip); // Remove the tooltip after 3 seconds setTimeout(() => { document.body.removeChild(tooltip); }, 3000); } // Check if the current URL is the homepage and add the tooltip if it is if (isHomepage() && window.innerWidth < 750) { addTooltip(); } </script> <script> document.addEventListener('DOMContentLoaded', function() { // Function to constrain the width of all elements function constrainElements() { if (window.innerWidth < 750) { document.querySelectorAll('*').forEach(function(element) { element.style.maxWidth = '100vw'; element.style.boxSizing = 'border-box'; // Include padding and border in the element's width }); } } // Run the function after all scripts have loaded window.addEventListener('load', constrainElements); // Also run it whenever the window is resized window.addEventListener('resize', constrainElements); }); (function() { // List of URLs to check against const targetUrls = [ "https://www.kentarchaeology.org.uk/affiliates/category/society-affiliates", "https://www.kentarchaeology.org.uk/grants/category/funds", "https://www.kentarchaeology.org.uk/groups/category/society-groups" ]; // Get the current URL const currentUrl = window.location.href; // Check if the current URL matches any of the target URLs if (targetUrls.includes(currentUrl)) { // Create a new style element const style = document.createElement('style'); // Add the CSS rule with !important style.innerHTML = ` .blog-date { display: none !important; } `; // Append the style element to the document head document.head.appendChild(style); } })(); </script> <style> /* Container that uses Flexbox to center the iframe */ .iframe-container { display: flex; justify-content: center; /* Center horizontally */ align-items: center; /* Center vertically */ position: fixed; /* Fixed position relative to the viewport */ top: 0; left: 0; width: 100vw; /* Full viewport width */ height: 100vh; /* Full viewport height */ overflow: hidden; /* Hide any overflow content */ z-index: 50; /* Ensure it's positioned correctly */ background-color: rgba(0, 0, 0, 0.8); /* Slight background to highlight iframe */ transition: left 0.3s ease, width 0.3s ease; /* Smooth transition for the container */ } /* Iframe styling */ .responsive-iframe { width: 95vw; /* Set width to 95% of the viewport width */ height: 95vh; /* Set height to 95% of the viewport height */ border: none; /* Remove any default border */ max-width: 100%; /* Ensure it doesn't overflow the container */ max-height: 100%; /* Ensure it doesn't overflow the container */ transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease; /* Smooth transition for iframe movement and resizing */ } /* Hide iframes on small screens */ @media (max-width: 750px) { .iframe-container { display: none; /* Initially hide the iframe container */ max-height: 75vh; top: 10vh; } } @media (min-width: 750px) { article.eventitem { padding-right: 50px; } } </style> <script> document.addEventListener("DOMContentLoaded", function () { const url = window.location.href; // Check if the URL contains '/videos/' but does NOT contain '/tag/', '/category/', or '?offset=' if ( url.includes('/videos/') && !url.includes('/tag/') && !url.includes('/category/') && !url.includes('?offset=') ) { document.body.style.overflow = 'hidden'; // Disable x and y overflow on the page // Find or create an iframe container let container = document.querySelector('.iframe-container'); if (!container) { // Create the container if it does not exist container = document.createElement('div'); container.className = 'iframe-container'; document.body.appendChild(container); } // Targeting all iframes on the page const iframes = document.querySelectorAll('iframe'); iframes.forEach(iframe => { iframe.classList.add('responsive-iframe'); // Apply the responsive class container.appendChild(iframe); // Move each iframe inside the container }); // Function to adjust the position and size of the iframe container and video const adjustIframePositionAndSize = (shouldMove) => { const sidebarWidth = 30; // Additional 30px to move when sidebar is open const shiftLeft = 230; // Shift the iframe 200px to the left const availableWidth = window.innerWidth - (shouldMove ? 34 * window.innerWidth / 100 + sidebarWidth : 0); const aspectRatio = 16 / 9; // Assuming the video has a 16:9 aspect ratio if (shouldMove) { // Move the iframe container 34vw to the right, plus 30px container.style.left = `calc(34vw + ${sidebarWidth}px)`; // Adjust the container's width to fit within the viewport when the sidebar is open container.style.width = `calc(100vw - 34vw - ${sidebarWidth}px)`; // Resize the iframe to fit within the available width const iframeWidth = availableWidth * 0.95; // 95% of the available width const iframeHeight = iframeWidth / aspectRatio; // Maintain aspect ratio iframes.forEach(iframe => { iframe.style.width = `${iframeWidth}px`; iframe.style.height = `${iframeHeight}px`; // Move iframe half of 34vw and 200px to the left to avoid overflow iframe.style.transform = `translateX(calc(17vw - ${shiftLeft}px))`; }); } else { container.style.left = '0'; // Reset container position container.style.width = '100vw'; // Reset container to full width iframes.forEach(iframe => { iframe.style.width = '95vw'; // Reset iframe to 95% of the viewport width iframe.style.height = '95vh'; // Reset iframe to 95% of the viewport height iframe.style.transform = 'translateX(0)'; // Reset iframe position }); } }; // Function to check if the sidebar is more than 50% visible const observeSidebarVisibility = () => { const sidebar = document.querySelector('.sidebar'); if (!sidebar) return; const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.target === sidebar) { // Adjust iframe position and size based on sidebar visibility adjustIframePositionAndSize(entry.intersectionRatio > 0.5); } }); }, { threshold: [0.5] }); observer.observe(sidebar); }; // Check if the window width is greater than 750px before setting the observer if (window.innerWidth > 750) { observeSidebarVisibility(); } // Listen for window resize to handle changes in viewport width window.addEventListener('resize', () => { if (window.innerWidth > 750) { observeSidebarVisibility(); } else { container.style.display = 'none'; // Hide container on smaller screens } }); // Toggle iframe visibility when toggle-icon is clicked const toggleIcon = document.getElementById('toggle-icon'); if (toggleIcon) { toggleIcon.addEventListener('click', () => { if (window.innerWidth <= 750) { if (container.style.display === 'none' || container.style.display === '') { container.style.display = 'flex'; // Show the container } else { container.style.display = 'none'; // Hide the container } } }); } } }); </script> <script> $(window).on('load', function() { var prevLink = $('a[rel="prev"]'); var nextLink = $('a[rel="next"]'); var firstArticle = $('article').first(); var articles = $('article'); var lastArticle = articles.last(); var canRedirect = false; // Flag to control redirection after delay var initialScrollDone = false; // Flag to track when the initial scroll has completed // Function to create the image-wrapper div function createImageWrapper() { var div = $('<div></div>') .addClass('image-wrapper') .css({ position: 'relative', height: '100vh', display: 'flex', justifyContent: 'center', alignItems: 'center' }); return div; } // Function to create and return a spinner function createSpinner() { var spinner = $('<div></div>') .addClass('loading-spinner') .css({ width: '50px', height: '50px', border: '5px solid #f3f3f3', borderTop: '5px solid #12518D', borderRadius: '50%', animation: 'spin 1s linear infinite', margin: '20px auto', display: 'block' }); return spinner; } // Function to observe and redirect when wrappers come into view function observeWrapper(wrapper, linkElement) { if (!wrapper || !linkElement) return; var observer = new IntersectionObserver(function(entries, observer) { entries.forEach(function(entry) { if (entry.isIntersecting) { window.location.href = linkElement.attr('href'); observer.unobserve(entry.target); // Stop observing after redirect } }); }, { root: null, rootMargin: '0px', threshold: 0.5 // Trigger when 50% of the element is visible }); observer.observe(wrapper[0]); // Observe the wrapper div } // Function to add observer after 2 seconds on mobile devices function delayObserverForMobile(wrapper, linkElement) { if ($(window).width() < 750) { setTimeout(function() { observeWrapper(wrapper, linkElement); }, 2000); } else { observeWrapper(wrapper, linkElement); } } // Function to manually trigger the redirection when the top spinner is fully in view function fallbackRedirect(linkElement) { $(window).on('scroll', function() { if ($(window).scrollTop() === 0 && canRedirect && initialScrollDone) { window.location.href = linkElement.attr('href'); } }); } // Function to scroll to the first image-wrapper (excluding the inserted top one) on devices < 750px function scrollToFirstImageWrapper() { if ($(window).width() < 750) { var wrappers = $('.image-wrapper'); if (wrappers.length > 1) { var firstRealWrapper = wrappers.eq(1); firstRealWrapper[0].scrollIntoView({ behavior: 'smooth' }); setTimeout(function() { initialScrollDone = true; }, 1000); setTimeout(function() { canRedirect = true; }, 1500); } } else { canRedirect = true; initialScrollDone = true; } } // Function to insert the div without altering the scroll position function insertDivWithoutScrollChange(wrapper, firstArticle) { var currentScrollPosition = $(window).scrollTop(); firstArticle.before(wrapper); $(window).scrollTop(currentScrollPosition); } // Insert the prev button into the image-wrapper before the first article if (prevLink.length && firstArticle.length) { var prevDiv = createImageWrapper(); var spinner = createSpinner(); prevDiv.append(spinner); prevDiv.append(prevLink); prevLink.css({ opacity: '0', position: 'absolute' }); insertDivWithoutScrollChange(prevDiv, firstArticle); delayObserverForMobile(prevDiv, prevLink); scrollToFirstImageWrapper(); fallbackRedirect(prevLink); } // Insert the next button into the image-wrapper after the last article if (nextLink.length && lastArticle.length) { var nextDiv = createImageWrapper(); var spinner = createSpinner(); nextDiv.append(spinner); nextDiv.append(nextLink); nextLink.css({ opacity: '0', position: 'absolute' }); lastArticle.after(nextDiv); delayObserverForMobile(nextDiv, nextLink); } }); </script> <script> document.addEventListener("DOMContentLoaded", function () { const url = window.location.href; if (url.includes('/models/') && url !== 'https://www.kentarchaeology.org.uk/models' && !url.includes('/category/') && !url.includes('/tag/') && !url.includes('offset')) { document.body.style.overflow = 'hidden'; let container = document.querySelector('.iframe-container'); if (!container) { container = document.createElement('div'); container.className = 'iframe-container'; document.body.appendChild(container); } const iframes = document.querySelectorAll('iframe'); iframes.forEach(iframe => { iframe.classList.add('responsive-iframe'); container.appendChild(iframe); }); // Keep the vertical dimensions unchanged const adjustIframeWidth = (sidebarVisible) => { const sidebar = document.querySelector('.sidebar'); let containerLeftOffset = 0; if (sidebarVisible && window.innerWidth > 750) { // When sidebar is visible, adjust iframe container's left offset based on sidebar width const sidebarWidth = sidebar.offsetWidth; containerLeftOffset = sidebarWidth; } // Adjust iframe container's left margin, but keep the vertical dimensions as is container.style.marginLeft = `${containerLeftOffset}px`; container.style.width = `calc(100vw - ${containerLeftOffset}px)`; // Ensure the iframes take up the full width of the container iframes.forEach(iframe => { iframe.style.width = '100%'; iframe.style.height = '100vh'; // Maintain the original full-height style }); }; const observeSidebarVisibility = () => { const sidebar = document.querySelector('.sidebar'); if (!sidebar) return; const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.target === sidebar) { const isSidebarVisible = entry.intersectionRatio > 0.5; adjustIframeWidth(isSidebarVisible); } }); }, { threshold: [0.5] }); observer.observe(sidebar); }; if (window.innerWidth > 750) { observeSidebarVisibility(); } window.addEventListener('resize', () => { if (window.innerWidth > 750) { observeSidebarVisibility(); } else { container.style.display = 'none'; // Hide the iframe container on smaller screens } }); const toggleIcon = document.getElementById('toggle-icon'); if (toggleIcon) { toggleIcon.addEventListener('click', () => { if (window.innerWidth <= 750) { if (container.style.display === 'none' || container.style.display === '') { container.style.display = 'flex'; } else { container.style.display = 'none'; } } }); } } }); </script> <style> @media (max-width: 749px) { .facebook-embed, iframe[src*="facebook.com/plugins"] { width: calc(100% - 10px); /* Adjust width and add padding */ } } @media (min-width: 750px) { .facebook-embed, iframe[src*="facebook.com/plugins"] { width: 80%; /* Adjust width as needed */ margin: 0 auto; /* Centers the embed */ } } /* Default styling for the custom arrows */ .custom-arrow-up, .custom-arrow-down { display: block !important; } /* Media query to hide arrows on wide screens */ @media (min-width: 751px) { .custom-arrow-up, .custom-arrow-down { display: none !important; } } .custom-arrow-down svg { display: none !important; } </style> <script> document.addEventListener("DOMContentLoaded", function() { // Select all Facebook embed iframes const facebookEmbeds = document.querySelectorAll('iframe[src*="facebook.com/plugins"]'); // Check if any Facebook embed is found if (facebookEmbeds.length > 0) { // Select all h1 elements with the specified class const h1Elements = document.querySelectorAll('h1.entry-title.entry-title--large.p-name'); // Hide each h1 element found h1Elements.forEach(h1 => { h1.style.display = 'none'; }); } }); </script> <script> // Function to handle the intersection and redirect the user function observeAndRedirect(linkElement) { function handleIntersection(entries, observer) { entries.forEach(function(entry) { if (entry.isIntersecting) { window.location.href = $(entry.target).attr('href'); observer.disconnect(); } }); } var observer = new IntersectionObserver(handleIntersection, { root: null, threshold: 0.5 }); observer.observe(linkElement[0]); } // Set up a MutationObserver to wait for the DOM to fully load var mutationObserver = new MutationObserver(function(mutationsList, observer) { var linkElement = $('a[rel="next"]'); if (linkElement.length) { observeAndRedirect(linkElement); observer.disconnect(); } }); mutationObserver.observe(document, { childList: true, subtree: true }); document.addEventListener("DOMContentLoaded", function() { // Function to check if URL has more than one forward slash (excluding protocol) function hasMultipleSlashes() { // Get the current URL path const urlPath = window.location.pathname; // Count the number of slashes in the URL path const slashCount = urlPath.split('/').length - 1; // Return true if there are more than one slashes return slashCount > 1; } // Function to check if the page width is less than 750px function isPageNarrow() { return window.innerWidth < 750; } // Run the check and simulate the click if both conditions are true if (hasMultipleSlashes() && isPageNarrow()) { const toggleIcon = document.getElementById('toggle-icon'); if (toggleIcon) { toggleIcon.click(); } } }); </script> <style> /* Container for centering the flickr slideshow */ .slideshow-container { display: flex; justify-content: center; /* Center horizontally */ align-items: center; /* Center vertically */ position: fixed; /* Fixed position relative to the viewport */ top: 0; left: 0; width: calc(100vw - 15px); /* Full viewport width minus space for the scrollbar */ height: 100vh; /* Full viewport height */ overflow: hidden; /* Hide any overflow content */ z-index: 50; /* Ensure it's positioned correctly */ background-color: rgba(0, 0, 0, 0.8); /* Add a slight background to make the slideshow stand out */ padding-left: 15px; /* Ensure there's space on the left for the scrollbar */ transition: left 0.3s ease, width 0.3s ease; /* Smooth transition when the sidebar is toggled */ } /* Embedded content styling */ .responsive-embed { width: 95vw; /* Set width to 95% of the viewport width */ height: 95vh; /* Set height to 95% of the viewport height */ border: none; /* Remove any default border */ max-width: 100%; /* Ensure it doesn't overflow the container */ max-height: 100%; /* Ensure it doesn't overflow the container */ transition: transform 0.3s ease; /* Smooth transition for embed movement */ } /* Hide the slideshow on small screens */ @media (max-width: 750px) { .slideshow-container { display: none; /* Hide the container on small screens */ } } </style> <script id="Sidecar background"> // Function to check URL validity function isUrlValid() { const url = window.location.href; // Get the current URL // Check for 4 or more forward slashes in the URL const slashCount = (url.match(/\//g) || []).length; if (slashCount < 4) return false; // Check for specific URL formats (Issue+[no.] or Journal+[no.]) const magazineIssuePattern = /\/magazine\/category\/Issue\+\d+/; const journalIssuePattern = /\/journal\/category\/Journal\+\d+/; if (magazineIssuePattern.test(url) || journalIssuePattern.test(url)) return false; // Check for excluded strings in the URL const excludedStrings = ['/search', '/category/', '/tag/', '/shop/', '/models/', '/maps/', '/images/', '/videos/', '/audio/']; for (const str of excludedStrings) { if (url.includes(str)) return false; } // Check for URLs containing '/affiliates/', '/groups/', or '/grants/' unless they also contain '/category/' const restrictedPaths = ['/affiliates/', '/groups/', '/grants/']; for (const path of restrictedPaths) { if (url.includes(path) && !url.includes('/category/')) return false; } return true; } // Function to insert the sidebar function insertSidebar() { const sidebar = document.createElement('div'); // Create a new div element sidebar.className = 'iconsbackground'; // Assign the class 'iconsbackground' to the div sidebar.style.width = '50px'; sidebar.style.height = '100vh'; // Full viewport height sidebar.style.position = 'fixed'; sidebar.style.top = '0'; sidebar.style.right = '15px'; // Align to the right side of the page sidebar.style.backgroundColor = 'white'; sidebar.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.1)'; // Add shadow around the div sidebar.style.zIndex = '100'; // Set a high z-index to ensure visibility document.body.appendChild(sidebar); // Append the new div to the body applyCustomStyles(); // Apply the additional CSS } // Function to apply custom CSS function applyCustomStyles() { const style = document.createElement('style'); style.textContent = ` /* Basic styling for body */ @media (min-width: 750px) { content { margin: 10px; /* Apply the margin to content element */ } } `; document.head.appendChild(style); // Append the style to the document head } // Function to check and insert the sidebar if the screen is wider than 750px function checkScreenWidth() { if (window.innerWidth > 750 && !document.querySelector('.iconsbackground')) { insertSidebar(); } else if (window.innerWidth <= 750) { const sidebar = document.querySelector('.iconsbackground'); if (sidebar) { sidebar.remove(); // Remove the sidebar if the screen width is 750px or less } } } // Initial check when the page loads window.addEventListener('load', function() { if (isUrlValid()) checkScreenWidth(); }); // Event listener for window resize to check if width changes window.addEventListener('resize', function() { if (isUrlValid()) checkScreenWidth(); }); </script> <script> document.addEventListener("DOMContentLoaded", function () { const url = window.location.href; // Check if the URL contains '/images/' and make sure there's a Flickr embed on the page const flickrEmbedExists = document.querySelector('a[data-flickr-embed="true"]') !== null; if ( url.includes('/images/') && !url.includes('/tag/') && !url.includes('/category/') && !url.includes('?offset=') && flickrEmbedExists // Only proceed if a Flickr embed is found ) { // Create the container for the slideshow let container = document.createElement('div'); container.className = 'slideshow-container'; document.body.appendChild(container); // Function to move and refresh the Flickr embed const moveAndRefreshFlickrEmbed = () => { const flickrEmbed = document.querySelector('a[data-flickr-embed="true"]'); if (flickrEmbed) { const flickrEmbedClone = flickrEmbed.cloneNode(true); flickrEmbed.remove(); // Append the cloned embed to the container container.appendChild(flickrEmbedClone); // Re-insert the Flickr script to reinitialize the embed const flickrScript = document.createElement('script'); flickrScript.src = "//embedr.flickr.com/assets/client-code.js"; flickrScript.async = true; flickrScript.charset = "utf-8"; document.body.appendChild(flickrScript); flickrEmbedClone.classList.add('responsive-embed'); } }; // Function to adjust the position and size of the container based on sidebar visibility const adjustContainerPosition = (shouldMove) => { const sidebarWidth = 30; // Add 30px when the sidebar is open if (shouldMove) { // Move the container 34vw to the right and then an additional 30px container.style.left = `calc(34vw + ${sidebarWidth}px)`; // Reduce the container's width to fit within the viewport when the sidebar is open container.style.width = `calc(100vw - 34vw - ${sidebarWidth}px - 15px)`; // Move the embed only half the distance (translate it within the container) document.querySelector('.responsive-embed').style.transform = 'translateX(17vw)'; } else { // Reset container and embed position when the sidebar is closed container.style.left = '0'; container.style.width = 'calc(100vw - 15px)'; // Reset to full width document.querySelector('.responsive-embed').style.transform = 'translateX(0)'; } }; // Observe the sidebar visibility const observeSidebarVisibility = () => { const sidebar = document.querySelector('.sidebar'); if (!sidebar) return; const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if (entry.target === sidebar) { adjustContainerPosition(entry.intersectionRatio > 0.5); } }); }, { threshold: [0.5] }); observer.observe(sidebar); }; // Wait for the page to fully load and then refresh the embed window.addEventListener('load', function () { moveAndRefreshFlickrEmbed(); if (window.innerWidth > 750) { observeSidebarVisibility(); } }); // Adjust container size on window resize window.addEventListener('resize', () => { if (window.innerWidth <= 750) { container.style.display = 'none'; // Hide on small screens } else { container.style.display = 'flex'; // Show on larger screens observeSidebarVisibility(); } }); } }); document.addEventListener('DOMContentLoaded', function() { // Check if the URL contains any of the specified substrings var allowedPaths = ['/news', '/books', '/papers', '/journal', '/events', '/exhibitions', '/reports', '/magazine', '/search', '/reports', '/members', '/audio', '/images', '/maps', '/documents', '/models', '/guidance', '/notes', '/records', '/join', '/contact', '/shop', '/support', '/stores', '/videos', '/about', '/collections', '/library', '/grants', '/affiliates', '/groups', '/members', '/people']; var currentPath = window.location.pathname; var isAllowedPath = allowedPaths.some(path => currentPath.includes(path)); // Check if the screen width is greater than 700 pixels var isScreenWidthValid = window.innerWidth > 700; if (!isAllowedPath || !isScreenWidthValid) { return; // Exit the script if the URL does not contain any of the substrings or screen width is too small } var isSidebarOpen = true; // Set this based on the actual initial state of your sidebar var sidebar = document.querySelector('.sidebar'); var content = document.querySelector('.content'); var mapsIcons = document.querySelectorAll('.map-icon'); var tagsIcons = document.querySelectorAll('.tags-icon'); var commentsIcons = document.querySelectorAll('.comment-icon-container'); var linkedDataIcons = document.querySelectorAll('.data-icon'); var leftArrowIcon = document.querySelectorAll('.custom-arrow-left'); var leftIconsBackground = document.querySelectorAll('.lefticons-background'); var searchIcons = document.querySelectorAll('.search-icon'); var dataIcons = document.querySelectorAll('.link-icon'); var timelineIcons = document.querySelectorAll('.timeline-icon'); var restoreIcons = document.querySelectorAll('#restoreIcon'); var citationsIcons = document.querySelectorAll('.citations-icon'); // Added citations icon var customArrowUp = document.querySelector('.custom-arrow-up'); // Select the custom arrow up element var iconWrapper; // Select the specific <svg> element inside the <a> tag with class "custom-arrow-left" var leftArrowSvg = document.querySelector('a.custom-arrow-left > svg'); function toggleIconsVisibility(isVisible) { var displayState = isVisible ? 'block' : 'none'; mapsIcons.forEach(icon => icon.style.display = displayState); tagsIcons.forEach(icon => icon.style.display = displayState); commentsIcons.forEach(icon => icon.style.display = displayState); linkedDataIcons.forEach(icon => icon.style.display = displayState); leftArrowIcon.forEach(icon => icon.style.display = displayState); leftIconsBackground.forEach(icon => icon.style.display = displayState); searchIcons.forEach(icon => icon.style.display = displayState); dataIcons.forEach(icon => icon.style.display = displayState); timelineIcons.forEach(icon => icon.style.display = displayState); restoreIcons.forEach(icon => icon.style.display = displayState); citationsIcons.forEach(icon => icon.style.display = displayState); // Toggle citations icon // Toggle the visibility of custom-arrow-up if (customArrowUp) { customArrowUp.style.display = displayState; } // Override the !important by setting the property with priority if (leftArrowSvg) { leftArrowSvg.style.setProperty('display', displayState, 'important'); } } function toggleSidebar() { isSidebarOpen = !isSidebarOpen; sidebar.style.left = isSidebarOpen ? '0' : '-35vw'; content.style.paddingLeft = isSidebarOpen ? '35vw' : '0'; if (iconWrapper) { iconWrapper.querySelector('svg').style.transform = isSidebarOpen ? 'rotate(90deg)' : 'rotate(-90deg)'; iconWrapper.querySelector('svg').style.fill = isSidebarOpen ? '#1c4d85' : '#cccccc'; iconWrapper.setAttribute('title', isSidebarOpen ? 'Hide sidebar' : 'Show sidebar'); } toggleIconsVisibility(isSidebarOpen); } function createIcon() { iconWrapper = document.createElement('div'); iconWrapper.id = 'icon-wrapper'; iconWrapper.style.position = 'fixed'; iconWrapper.style.top = '49vh'; iconWrapper.style.left = '16px'; iconWrapper.style.width = '25px'; iconWrapper.style.cursor = 'pointer'; iconWrapper.style.zIndex = '1000'; iconWrapper.style.transition = 'transform 0.3s ease-out'; iconWrapper.setAttribute('title', isSidebarOpen ? 'Hide sidebar' : 'Show sidebar'); iconWrapper.innerHTML = `<svg width="20px" height="20px" viewBox="0 0 45.106873 28.257965" version="1.1" id="svg5" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs2" /><g id="layer1" transform="translate(-249.0918,-46.235564)"><path style="fill:#1c4d85;stroke:none;stroke-width:0.264583" d="m 253.97113,46.304933 c -3.69067,0.653521 -6.16196,4.923102 -4.1729,8.342048 1.23005,2.114285 3.51407,3.839104 5.23124,5.55625 l 10.58333,10.583333 c 2.04946,2.049463 3.97378,4.173009 7.14375,3.617119 2.65457,-0.465402 4.55348,-3.143514 6.35,-4.940035 4.53866,-4.538663 10.44231,-9.027319 14.11579,-14.2875 1.72931,-2.475971 1.1049,-6.246284 -1.42611,-7.945438 -5.95788,-3.999442 -12.03963,6.277568 -16.12926,9.532938 -0.96228,0.765982 -3.96875,3.424766 -3.96875,3.424766 0,0 -3.09907,-2.555081 -3.96875,-3.424766 -3.15886,-3.158861 -8.64129,-11.364384 -13.75834,-10.458715 z" id="path1008" /></g></svg>`; document.body.appendChild(iconWrapper); iconWrapper.addEventListener('click', toggleSidebar); iconWrapper.addEventListener('mouseenter', function() { this.style.transform = 'scale(1.2)'; }); iconWrapper.addEventListener('mouseleave', function() { this.style.transform = 'scale(1)'; }); // Set initial rotation and title based on whether the sidebar is open iconWrapper.querySelector('svg').style.transform = isSidebarOpen ? 'rotate(90deg)' : 'rotate(0deg)'; iconWrapper.setAttribute('title', isSidebarOpen ? 'Hide sidebar' : 'Show sidebar'); } // Prevent default behavior of <a> tag containing SVG document.querySelectorAll('a.custom-arrow-left').forEach(function(anchor) { anchor.addEventListener('click', function(event) { event.preventDefault(); // Prevents the default navigation behavior of <a> toggleSidebar(); }); }); createIcon(); // Create the icon when DOM is loaded toggleIconsVisibility(isSidebarOpen); // Initial visibility set }); // JavaScript to handle redirect on link click document.addEventListener("DOMContentLoaded", function() { // Select all anchor tags within the div with id="index" const indexDiv = document.querySelector("#index"); if (!indexDiv) return; // Exit if the div does not exist const links = indexDiv.querySelectorAll("a[href^='/journal/']"); links.forEach(link => { // Add a click event listener to each link link.addEventListener("click", function(event) { event.preventDefault(); // Prevent the default action // Extract the journal number from the href attribute const journalNumber = link.getAttribute("href").match(/\/journal\/(\d+)/)[1]; // Construct the new URL const newUrl = `/journal/category/Volume+${journalNumber}`; // Redirect to the new URL window.location.href = newUrl; }); }); }); </script><svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="display:none" data-usage="social-icons-svg"><symbol id="instagram-unauth-icon" viewBox="0 0 64 64"><path d="M46.91,25.816c-0.073-1.597-0.326-2.687-0.697-3.641c-0.383-0.986-0.896-1.823-1.73-2.657c-0.834-0.834-1.67-1.347-2.657-1.73c-0.954-0.371-2.045-0.624-3.641-0.697C36.585,17.017,36.074,17,32,17s-4.585,0.017-6.184,0.09c-1.597,0.073-2.687,0.326-3.641,0.697c-0.986,0.383-1.823,0.896-2.657,1.73c-0.834,0.834-1.347,1.67-1.73,2.657c-0.371,0.954-0.624,2.045-0.697,3.641C17.017,27.415,17,27.926,17,32c0,4.074,0.017,4.585,0.09,6.184c0.073,1.597,0.326,2.687,0.697,3.641c0.383,0.986,0.896,1.823,1.73,2.657c0.834,0.834,1.67,1.347,2.657,1.73c0.954,0.371,2.045,0.624,3.641,0.697C27.415,46.983,27.926,47,32,47s4.585-0.017,6.184-0.09c1.597-0.073,2.687-0.326,3.641-0.697c0.986-0.383,1.823-0.896,2.657-1.73c0.834-0.834,1.347-1.67,1.73-2.657c0.371-0.954,0.624-2.045,0.697-3.641C46.983,36.585,47,36.074,47,32S46.983,27.415,46.91,25.816z M44.21,38.061c-0.067,1.462-0.311,2.257-0.516,2.785c-0.272,0.7-0.597,1.2-1.122,1.725c-0.525,0.525-1.025,0.85-1.725,1.122c-0.529,0.205-1.323,0.45-2.785,0.516c-1.581,0.072-2.056,0.087-6.061,0.087s-4.48-0.015-6.061-0.087c-1.462-0.067-2.257-0.311-2.785-0.516c-0.7-0.272-1.2-0.597-1.725-1.122c-0.525-0.525-0.85-1.025-1.122-1.725c-0.205-0.529-0.45-1.323-0.516-2.785c-0.072-1.582-0.087-2.056-0.087-6.061s0.015-4.48,0.087-6.061c0.067-1.462,0.311-2.257,0.516-2.785c0.272-0.7,0.597-1.2,1.122-1.725c0.525-0.525,1.025-0.85,1.725-1.122c0.529-0.205,1.323-0.45,2.785-0.516c1.582-0.072,2.056-0.087,6.061-0.087s4.48,0.015,6.061,0.087c1.462,0.067,2.257,0.311,2.785,0.516c0.7,0.272,1.2,0.597,1.725,1.122c0.525,0.525,0.85,1.025,1.122,1.725c0.205,0.529,0.45,1.323,0.516,2.785c0.072,1.582,0.087,2.056,0.087,6.061S44.282,36.48,44.21,38.061z M32,24.297c-4.254,0-7.703,3.449-7.703,7.703c0,4.254,3.449,7.703,7.703,7.703c4.254,0,7.703-3.449,7.703-7.703C39.703,27.746,36.254,24.297,32,24.297z M32,37c-2.761,0-5-2.239-5-5c0-2.761,2.239-5,5-5s5,2.239,5,5C37,34.761,34.761,37,32,37z M40.007,22.193c-0.994,0-1.8,0.806-1.8,1.8c0,0.994,0.806,1.8,1.8,1.8c0.994,0,1.8-0.806,1.8-1.8C41.807,22.999,41.001,22.193,40.007,22.193z"/></symbol><symbol id="instagram-unauth-mask" viewBox="0 0 64 64"><path d="M43.693,23.153c-0.272-0.7-0.597-1.2-1.122-1.725c-0.525-0.525-1.025-0.85-1.725-1.122c-0.529-0.205-1.323-0.45-2.785-0.517c-1.582-0.072-2.056-0.087-6.061-0.087s-4.48,0.015-6.061,0.087c-1.462,0.067-2.257,0.311-2.785,0.517c-0.7,0.272-1.2,0.597-1.725,1.122c-0.525,0.525-0.85,1.025-1.122,1.725c-0.205,0.529-0.45,1.323-0.516,2.785c-0.072,1.582-0.087,2.056-0.087,6.061s0.015,4.48,0.087,6.061c0.067,1.462,0.311,2.257,0.516,2.785c0.272,0.7,0.597,1.2,1.122,1.725s1.025,0.85,1.725,1.122c0.529,0.205,1.323,0.45,2.785,0.516c1.581,0.072,2.056,0.087,6.061,0.087s4.48-0.015,6.061-0.087c1.462-0.067,2.257-0.311,2.785-0.516c0.7-0.272,1.2-0.597,1.725-1.122s0.85-1.025,1.122-1.725c0.205-0.529,0.45-1.323,0.516-2.785c0.072-1.582,0.087-2.056,0.087-6.061s-0.015-4.48-0.087-6.061C44.143,24.476,43.899,23.682,43.693,23.153z M32,39.703c-4.254,0-7.703-3.449-7.703-7.703s3.449-7.703,7.703-7.703s7.703,3.449,7.703,7.703S36.254,39.703,32,39.703z M40.007,25.793c-0.994,0-1.8-0.806-1.8-1.8c0-0.994,0.806-1.8,1.8-1.8c0.994,0,1.8,0.806,1.8,1.8C41.807,24.987,41.001,25.793,40.007,25.793z M0,0v64h64V0H0z M46.91,38.184c-0.073,1.597-0.326,2.687-0.697,3.641c-0.383,0.986-0.896,1.823-1.73,2.657c-0.834,0.834-1.67,1.347-2.657,1.73c-0.954,0.371-2.044,0.624-3.641,0.697C36.585,46.983,36.074,47,32,47s-4.585-0.017-6.184-0.09c-1.597-0.073-2.687-0.326-3.641-0.697c-0.986-0.383-1.823-0.896-2.657-1.73c-0.834-0.834-1.347-1.67-1.73-2.657c-0.371-0.954-0.624-2.044-0.697-3.641C17.017,36.585,17,36.074,17,32c0-4.074,0.017-4.585,0.09-6.185c0.073-1.597,0.326-2.687,0.697-3.641c0.383-0.986,0.896-1.823,1.73-2.657c0.834-0.834,1.67-1.347,2.657-1.73c0.954-0.371,2.045-0.624,3.641-0.697C27.415,17.017,27.926,17,32,17s4.585,0.017,6.184,0.09c1.597,0.073,2.687,0.326,3.641,0.697c0.986,0.383,1.823,0.896,2.657,1.73c0.834,0.834,1.347,1.67,1.73,2.657c0.371,0.954,0.624,2.044,0.697,3.641C46.983,27.415,47,27.926,47,32C47,36.074,46.983,36.585,46.91,38.184z M32,27c-2.761,0-5,2.239-5,5s2.239,5,5,5s5-2.239,5-5S34.761,27,32,27z"/></symbol><symbol id="facebook-unauth-icon" viewBox="0 0 64 64"><path d="M34.1,47V33.3h4.6l0.7-5.3h-5.3v-3.4c0-1.5,0.4-2.6,2.6-2.6l2.8,0v-4.8c-0.5-0.1-2.2-0.2-4.1-0.2 c-4.1,0-6.9,2.5-6.9,7V28H24v5.3h4.6V47H34.1z"/></symbol><symbol id="facebook-unauth-mask" viewBox="0 0 64 64"><path d="M0,0v64h64V0H0z M39.6,22l-2.8,0c-2.2,0-2.6,1.1-2.6,2.6V28h5.3l-0.7,5.3h-4.6V47h-5.5V33.3H24V28h4.6V24 c0-4.6,2.8-7,6.9-7c2,0,3.6,0.1,4.1,0.2V22z"/></symbol><symbol id="youtube-unauth-icon" viewBox="0 0 64 64"><path d="M46.7,26c0,0-0.3-2.1-1.2-3c-1.1-1.2-2.4-1.2-3-1.3C38.3,21.4,32,21.4,32,21.4h0 c0,0-6.3,0-10.5,0.3c-0.6,0.1-1.9,0.1-3,1.3c-0.9,0.9-1.2,3-1.2,3S17,28.4,17,30.9v2.3c0,2.4,0.3,4.9,0.3,4.9s0.3,2.1,1.2,3 c1.1,1.2,2.6,1.2,3.3,1.3c2.4,0.2,10.2,0.3,10.2,0.3s6.3,0,10.5-0.3c0.6-0.1,1.9-0.1,3-1.3c0.9-0.9,1.2-3,1.2-3s0.3-2.4,0.3-4.9 v-2.3C47,28.4,46.7,26,46.7,26z M28.9,35.9l0-8.4l8.1,4.2L28.9,35.9z"/></symbol><symbol id="youtube-unauth-mask" viewBox="0 0 64 64"><path d="M0,0v64h64V0H0z M47,33.1c0,2.4-0.3,4.9-0.3,4.9s-0.3,2.1-1.2,3c-1.1,1.2-2.4,1.2-3,1.3 C38.3,42.5,32,42.6,32,42.6s-7.8-0.1-10.2-0.3c-0.7-0.1-2.2-0.1-3.3-1.3c-0.9-0.9-1.2-3-1.2-3S17,35.6,17,33.1v-2.3 c0-2.4,0.3-4.9,0.3-4.9s0.3-2.1,1.2-3c1.1-1.2,2.4-1.2,3-1.3c4.2-0.3,10.5-0.3,10.5-0.3h0c0,0,6.3,0,10.5,0.3c0.6,0.1,1.9,0.1,3,1.3 c0.9,0.9,1.2,3,1.2,3s0.3,2.4,0.3,4.9V33.1z M28.9,35.9l8.1-4.2l-8.1-4.2L28.9,35.9z"/></symbol><symbol id="tiktok-unauth-icon" viewBox="0 0 64 64"><path d="M37.9281 17C38.4298 21.2545 40.825 23.7941 45 24.0658V28.8451C42.5859 29.0794 40.4652 28.3016 38.0038 26.821V35.7423C38.0038 47.147 25.4788 50.7361 20.4233 42.5457C17.1856 37.3073 19.1642 28.1048 29.5496 27.73V32.781C28.7296 32.9058 27.9219 33.1002 27.1355 33.362C24.835 34.1398 23.5191 35.583 23.8883 38.1413C24.5889 43.033 33.6584 44.4856 32.901 34.9176V17H37.9091H37.9281Z" /></symbol><symbol id="tiktok-unauth-mask" viewBox="0 0 64 64"><path fill-rule="evenodd" clip-rule="evenodd" d="M64 0H0V64H64V0ZM45.44 23.54C41 23.25 38.5 20.54 38 16H32.68V35.12C33.48 45.33 23.9 43.78 23.16 38.56C22.78 35.83 24.16 34.29 26.6 33.46C27.4272 33.1806 28.2771 32.9732 29.14 32.84V27.45C18.18 27.85 16.08 37.67 19.5 43.26C24.82 52 38.05 48.17 38.05 36V26.48C40.65 28.06 42.89 28.89 45.44 28.64V23.54Z" /></symbol><symbol id="url-icon" viewBox="0 0 64 64"><path d="M40.038 24c2.203 0 4.08.801 5.633 2.404C47.224 27.956 48 29.834 48 32.038c0 2.203-.776 4.106-2.329 5.709-1.552 1.552-3.43 2.328-5.633 2.328h-6.46v-3.08h6.46c1.352 0 2.504-.475 3.455-1.427 1.002-1.002 1.502-2.178 1.502-3.53 0-1.353-.5-2.504-1.502-3.456-.952-1.001-2.103-1.502-3.455-1.502h-6.46V24h6.46zm-14.423 9.615V30.46h12.77v3.155h-12.77zm-5.183-5.033c-.952.952-1.427 2.103-1.427 3.456 0 1.352.475 2.529 1.427 3.53 1.002.952 2.178 1.427 3.53 1.427h6.46v3.08h-6.46c-2.203 0-4.08-.776-5.633-2.329C16.776 36.145 16 34.241 16 32.038c0-2.204.776-4.082 2.329-5.634C19.88 24.8 21.759 24 23.962 24h6.46v3.08h-6.46c-1.352 0-2.529.5-3.53 1.502z"/></symbol><symbol id="url-mask" viewBox="0 0 64 64"><path fill-rule="evenodd" clip-rule="evenodd" d="M64 0H0v64h64V0zM45.671 26.404C44.12 24.8 42.241 24 40.038 24h-6.46v3.08h6.46c1.352 0 2.504.5 3.455 1.502 1.002.952 1.502 2.103 1.502 3.456 0 1.352-.5 2.529-1.502 3.53-.952.952-2.103 1.427-3.455 1.427h-6.46v3.08h6.46c2.203 0 4.08-.776 5.633-2.329C47.224 36.145 48 34.241 48 32.038c0-2.204-.776-4.082-2.329-5.634zm-7.286 4.056h-12.77v3.155h12.77V30.46zm-19.38 1.578c0-1.353.475-2.504 1.427-3.456 1.002-1.001 2.178-1.502 3.53-1.502h6.46V24h-6.46c-2.203 0-4.08.801-5.633 2.404C16.776 27.956 16 29.834 16 32.038c0 2.203.776 4.106 2.329 5.709 1.552 1.552 3.43 2.328 5.633 2.328h6.46v-3.08h-6.46c-1.352 0-2.529-.475-3.53-1.427-.952-1.002-1.427-2.178-1.427-3.53z"/></symbol><symbol id="url-icon" viewBox="0 0 64 64"><path d="M40.038 24c2.203 0 4.08.801 5.633 2.404C47.224 27.956 48 29.834 48 32.038c0 2.203-.776 4.106-2.329 5.709-1.552 1.552-3.43 2.328-5.633 2.328h-6.46v-3.08h6.46c1.352 0 2.504-.475 3.455-1.427 1.002-1.002 1.502-2.178 1.502-3.53 0-1.353-.5-2.504-1.502-3.456-.952-1.001-2.103-1.502-3.455-1.502h-6.46V24h6.46zm-14.423 9.615V30.46h12.77v3.155h-12.77zm-5.183-5.033c-.952.952-1.427 2.103-1.427 3.456 0 1.352.475 2.529 1.427 3.53 1.002.952 2.178 1.427 3.53 1.427h6.46v3.08h-6.46c-2.203 0-4.08-.776-5.633-2.329C16.776 36.145 16 34.241 16 32.038c0-2.204.776-4.082 2.329-5.634C19.88 24.8 21.759 24 23.962 24h6.46v3.08h-6.46c-1.352 0-2.529.5-3.53 1.502z"/></symbol><symbol id="url-mask" viewBox="0 0 64 64"><path fill-rule="evenodd" clip-rule="evenodd" d="M64 0H0v64h64V0zM45.671 26.404C44.12 24.8 42.241 24 40.038 24h-6.46v3.08h6.46c1.352 0 2.504.5 3.455 1.502 1.002.952 1.502 2.103 1.502 3.456 0 1.352-.5 2.529-1.502 3.53-.952.952-2.103 1.427-3.455 1.427h-6.46v3.08h6.46c2.203 0 4.08-.776 5.633-2.329C47.224 36.145 48 34.241 48 32.038c0-2.204-.776-4.082-2.329-5.634zm-7.286 4.056h-12.77v3.155h12.77V30.46zm-19.38 1.578c0-1.353.475-2.504 1.427-3.456 1.002-1.001 2.178-1.502 3.53-1.502h6.46V24h-6.46c-2.203 0-4.08.801-5.633 2.404C16.776 27.956 16 29.834 16 32.038c0 2.203.776 4.106 2.329 5.709 1.552 1.552 3.43 2.328 5.633 2.328h6.46v-3.08h-6.46c-1.352 0-2.529-.475-3.53-1.427-.952-1.002-1.427-2.178-1.427-3.53z"/></symbol><symbol id="url-icon" viewBox="0 0 64 64"><path d="M40.038 24c2.203 0 4.08.801 5.633 2.404C47.224 27.956 48 29.834 48 32.038c0 2.203-.776 4.106-2.329 5.709-1.552 1.552-3.43 2.328-5.633 2.328h-6.46v-3.08h6.46c1.352 0 2.504-.475 3.455-1.427 1.002-1.002 1.502-2.178 1.502-3.53 0-1.353-.5-2.504-1.502-3.456-.952-1.001-2.103-1.502-3.455-1.502h-6.46V24h6.46zm-14.423 9.615V30.46h12.77v3.155h-12.77zm-5.183-5.033c-.952.952-1.427 2.103-1.427 3.456 0 1.352.475 2.529 1.427 3.53 1.002.952 2.178 1.427 3.53 1.427h6.46v3.08h-6.46c-2.203 0-4.08-.776-5.633-2.329C16.776 36.145 16 34.241 16 32.038c0-2.204.776-4.082 2.329-5.634C19.88 24.8 21.759 24 23.962 24h6.46v3.08h-6.46c-1.352 0-2.529.5-3.53 1.502z"/></symbol><symbol id="url-mask" viewBox="0 0 64 64"><path fill-rule="evenodd" clip-rule="evenodd" d="M64 0H0v64h64V0zM45.671 26.404C44.12 24.8 42.241 24 40.038 24h-6.46v3.08h6.46c1.352 0 2.504.5 3.455 1.502 1.002.952 1.502 2.103 1.502 3.456 0 1.352-.5 2.529-1.502 3.53-.952.952-2.103 1.427-3.455 1.427h-6.46v3.08h6.46c2.203 0 4.08-.776 5.633-2.329C47.224 36.145 48 34.241 48 32.038c0-2.204-.776-4.082-2.329-5.634zm-7.286 4.056h-12.77v3.155h12.77V30.46zm-19.38 1.578c0-1.353.475-2.504 1.427-3.456 1.002-1.001 2.178-1.502 3.53-1.502h6.46V24h-6.46c-2.203 0-4.08.801-5.633 2.404C16.776 27.956 16 29.834 16 32.038c0 2.203.776 4.106 2.329 5.709 1.552 1.552 3.43 2.328 5.633 2.328h6.46v-3.08h-6.46c-1.352 0-2.529-.475-3.53-1.427-.952-1.002-1.427-2.178-1.427-3.53z"/></symbol><symbol id="url-icon" viewBox="0 0 64 64"><path d="M40.038 24c2.203 0 4.08.801 5.633 2.404C47.224 27.956 48 29.834 48 32.038c0 2.203-.776 4.106-2.329 5.709-1.552 1.552-3.43 2.328-5.633 2.328h-6.46v-3.08h6.46c1.352 0 2.504-.475 3.455-1.427 1.002-1.002 1.502-2.178 1.502-3.53 0-1.353-.5-2.504-1.502-3.456-.952-1.001-2.103-1.502-3.455-1.502h-6.46V24h6.46zm-14.423 9.615V30.46h12.77v3.155h-12.77zm-5.183-5.033c-.952.952-1.427 2.103-1.427 3.456 0 1.352.475 2.529 1.427 3.53 1.002.952 2.178 1.427 3.53 1.427h6.46v3.08h-6.46c-2.203 0-4.08-.776-5.633-2.329C16.776 36.145 16 34.241 16 32.038c0-2.204.776-4.082 2.329-5.634C19.88 24.8 21.759 24 23.962 24h6.46v3.08h-6.46c-1.352 0-2.529.5-3.53 1.502z"/></symbol><symbol id="url-mask" viewBox="0 0 64 64"><path fill-rule="evenodd" clip-rule="evenodd" d="M64 0H0v64h64V0zM45.671 26.404C44.12 24.8 42.241 24 40.038 24h-6.46v3.08h6.46c1.352 0 2.504.5 3.455 1.502 1.002.952 1.502 2.103 1.502 3.456 0 1.352-.5 2.529-1.502 3.53-.952.952-2.103 1.427-3.455 1.427h-6.46v3.08h6.46c2.203 0 4.08-.776 5.633-2.329C47.224 36.145 48 34.241 48 32.038c0-2.204-.776-4.082-2.329-5.634zm-7.286 4.056h-12.77v3.155h12.77V30.46zm-19.38 1.578c0-1.353.475-2.504 1.427-3.456 1.002-1.001 2.178-1.502 3.53-1.502h6.46V24h-6.46c-2.203 0-4.08.801-5.633 2.404C16.776 27.956 16 29.834 16 32.038c0 2.203.776 4.106 2.329 5.709 1.552 1.552 3.43 2.328 5.633 2.328h6.46v-3.08h-6.46c-1.352 0-2.529-.475-3.53-1.427-.952-1.002-1.427-2.178-1.427-3.53z"/></symbol><symbol id="url-icon" viewBox="0 0 64 64"><path d="M40.038 24c2.203 0 4.08.801 5.633 2.404C47.224 27.956 48 29.834 48 32.038c0 2.203-.776 4.106-2.329 5.709-1.552 1.552-3.43 2.328-5.633 2.328h-6.46v-3.08h6.46c1.352 0 2.504-.475 3.455-1.427 1.002-1.002 1.502-2.178 1.502-3.53 0-1.353-.5-2.504-1.502-3.456-.952-1.001-2.103-1.502-3.455-1.502h-6.46V24h6.46zm-14.423 9.615V30.46h12.77v3.155h-12.77zm-5.183-5.033c-.952.952-1.427 2.103-1.427 3.456 0 1.352.475 2.529 1.427 3.53 1.002.952 2.178 1.427 3.53 1.427h6.46v3.08h-6.46c-2.203 0-4.08-.776-5.633-2.329C16.776 36.145 16 34.241 16 32.038c0-2.204.776-4.082 2.329-5.634C19.88 24.8 21.759 24 23.962 24h6.46v3.08h-6.46c-1.352 0-2.529.5-3.53 1.502z"/></symbol><symbol id="url-mask" viewBox="0 0 64 64"><path fill-rule="evenodd" clip-rule="evenodd" d="M64 0H0v64h64V0zM45.671 26.404C44.12 24.8 42.241 24 40.038 24h-6.46v3.08h6.46c1.352 0 2.504.5 3.455 1.502 1.002.952 1.502 2.103 1.502 3.456 0 1.352-.5 2.529-1.502 3.53-.952.952-2.103 1.427-3.455 1.427h-6.46v3.08h6.46c2.203 0 4.08-.776 5.633-2.329C47.224 36.145 48 34.241 48 32.038c0-2.204-.776-4.082-2.329-5.634zm-7.286 4.056h-12.77v3.155h12.77V30.46zm-19.38 1.578c0-1.353.475-2.504 1.427-3.456 1.002-1.001 2.178-1.502 3.53-1.502h6.46V24h-6.46c-2.203 0-4.08.801-5.633 2.404C16.776 27.956 16 29.834 16 32.038c0 2.203.776 4.106 2.329 5.709 1.552 1.552 3.43 2.328 5.633 2.328h6.46v-3.08h-6.46c-1.352 0-2.529-.475-3.53-1.427-.952-1.002-1.427-2.178-1.427-3.53z"/></symbol><symbol id="url-icon" viewBox="0 0 64 64"><path d="M40.038 24c2.203 0 4.08.801 5.633 2.404C47.224 27.956 48 29.834 48 32.038c0 2.203-.776 4.106-2.329 5.709-1.552 1.552-3.43 2.328-5.633 2.328h-6.46v-3.08h6.46c1.352 0 2.504-.475 3.455-1.427 1.002-1.002 1.502-2.178 1.502-3.53 0-1.353-.5-2.504-1.502-3.456-.952-1.001-2.103-1.502-3.455-1.502h-6.46V24h6.46zm-14.423 9.615V30.46h12.77v3.155h-12.77zm-5.183-5.033c-.952.952-1.427 2.103-1.427 3.456 0 1.352.475 2.529 1.427 3.53 1.002.952 2.178 1.427 3.53 1.427h6.46v3.08h-6.46c-2.203 0-4.08-.776-5.633-2.329C16.776 36.145 16 34.241 16 32.038c0-2.204.776-4.082 2.329-5.634C19.88 24.8 21.759 24 23.962 24h6.46v3.08h-6.46c-1.352 0-2.529.5-3.53 1.502z"/></symbol><symbol id="url-mask" viewBox="0 0 64 64"><path fill-rule="evenodd" clip-rule="evenodd" d="M64 0H0v64h64V0zM45.671 26.404C44.12 24.8 42.241 24 40.038 24h-6.46v3.08h6.46c1.352 0 2.504.5 3.455 1.502 1.002.952 1.502 2.103 1.502 3.456 0 1.352-.5 2.529-1.502 3.53-.952.952-2.103 1.427-3.455 1.427h-6.46v3.08h6.46c2.203 0 4.08-.776 5.633-2.329C47.224 36.145 48 34.241 48 32.038c0-2.204-.776-4.082-2.329-5.634zm-7.286 4.056h-12.77v3.155h12.77V30.46zm-19.38 1.578c0-1.353.475-2.504 1.427-3.456 1.002-1.001 2.178-1.502 3.53-1.502h6.46V24h-6.46c-2.203 0-4.08.801-5.633 2.404C16.776 27.956 16 29.834 16 32.038c0 2.203.776 4.106 2.329 5.709 1.552 1.552 3.43 2.328 5.633 2.328h6.46v-3.08h-6.46c-1.352 0-2.529-.475-3.53-1.427-.952-1.002-1.427-2.178-1.427-3.53z"/></symbol></svg> </body> </html>